1
0
Преглед на файлове

user、dg、pv1、pv2表的基本增删查改

Ciallo преди 9 месеца
родител
ревизия
5035c2e9bf

+ 17 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/work/controller/DgController.java

@@ -2,6 +2,10 @@ package com.ruoyi.web.work.controller;
 
 import java.util.Arrays;
 import java.util.List;
+
+import com.ruoyi.common.annotation.Anonymous;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -23,13 +27,17 @@ import com.ruoyi.common.core.page.TableDataInfo;
  * @author lsw
  * @date 2024-07-19
  */
+@Api(tags = "诊断管理")
+@Anonymous
 @RestController
 @RequestMapping("/work/dg")
 public class DgController extends BaseController {
     @Autowired
     private IDgService dgService;
 
-    @PreAuthorize("@ss.hasPermi('work:dg:list')")
+    @ApiOperation(value = "获取诊断列表")
+    @Anonymous
+    //@PreAuthorize("@ss.hasPermi('work:dg:list')")
     @GetMapping("/list")
     public TableDataInfo list(Dg dg){
         startPage();
@@ -37,27 +45,31 @@ public class DgController extends BaseController {
         return getDataTable(list);
     }
 
-    @PreAuthorize("@ss.hasPermi('work:dg:query')")
+    @Anonymous
+    //@PreAuthorize("@ss.hasPermi('work:dg:query')")
     @GetMapping(value = "/detail/{id}")
     public AjaxResult detail(@PathVariable("id") Long id){
         return AjaxResult.success(dgService.getById(id));
     }
 
-    @PreAuthorize("@ss.hasPermi('work:dg:add')")
+    @Anonymous
+    //@PreAuthorize("@ss.hasPermi('work:dg:add')")
     @Log(title = "诊断", businessType = BusinessType.INSERT)
     @PostMapping("/add")
     public AjaxResult add(@RequestBody Dg dg){
         return toAjax(dgService.save(dg));
     }
 
-    @PreAuthorize("@ss.hasPermi('work:dg:edit')")
+    @Anonymous
+    //@PreAuthorize("@ss.hasPermi('work:dg:edit')")
     @Log(title = "诊断", businessType = BusinessType.UPDATE)
     @PostMapping("/edit")
     public AjaxResult edit(@RequestBody Dg dg){
         return toAjax(dgService.updateById(dg));
     }
 
-    @PreAuthorize("@ss.hasPermi('work:dg:remove')")
+    @Anonymous
+    //@PreAuthorize("@ss.hasPermi('work:dg:remove')")
     @Log(title = "诊断", businessType = BusinessType.DELETE)
     @GetMapping("/remove/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids){

+ 2 - 2
ruoyi-admin/src/main/resources/application.yml

@@ -18,7 +18,7 @@ ruoyi:
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为8080
-  port: 9191
+  port: 9999
   servlet:
     # 应用的访问路径
     context-path: /
@@ -146,7 +146,7 @@ swagger:
   # 是否开启swagger
   enabled: true
   # 请求前缀
-  pathMapping: /dev-api
+  pathMapping:
 
 # 防止XSS攻击
 xss:

+ 18 - 0
ruoyi-admin/src/main/resources/mapper/work/DgMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.web.work.mapper.DgMapper">
+    
+    <select id="selectList" resultType="com.ruoyi.web.work.domain.Dg">
+        select * from tb_dg
+        <where>  
+            <if test="patientId != null  and patientId != ''"> and patient_id = #{patientId}</if>
+            <if test="diagnosticCode != null  and diagnosticCode != ''"> and diagnostic_code = #{diagnosticCode}</if>
+            <if test="diagnosisTime != null  and diagnosisTime != ''"> and diagnosis_time = #{diagnosisTime}</if>
+            <if test="diagnosticType != null  and diagnosticType != ''"> and diagnostic_type = #{diagnosticType}</if>
+            <if test="diagnosticCategoryCode != null  and diagnosticCategoryCode != ''"> and diagnostic_category_code = #{diagnosticCategoryCode}</if>
+        </where>
+    </select>
+
+</mapper>

+ 29 - 0
ruoyi-admin/src/main/resources/mapper/work/Pv1Mapper.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.web.work.mapper.Pv1Mapper">
+    
+    <select id="selectList" resultType="com.ruoyi.web.work.domain.Pv1">
+        select * from tb_pv1
+        <where>  
+            <if test="patientId != null "> and patient_id = #{patientId}</if>
+            <if test="cardId != null "> and card_id = #{cardId}</if>
+            <if test="patientCategory != null  and patientCategory != ''"> and patient_category = #{patientCategory}</if>
+            <if test="bed != null  and bed != ''"> and bed = #{bed}</if>
+            <if test="physician != null  and physician != ''"> and physician = #{physician}</if>
+            <if test="nurseCode != null  and nurseCode != ''"> and nurse_code = #{nurseCode}</if>
+            <if test="hospitalizedNumber != null  and hospitalizedNumber != ''"> and hospitalized_number = #{hospitalizedNumber}</if>
+            <if test="feeCategory != null  and feeCategory != ''"> and fee_category = #{feeCategory}</if>
+            <if test="dischargeMethod != null  and dischargeMethod != ''"> and discharge_method = #{dischargeMethod}</if>
+            <if test="medicalCode != null  and medicalCode != ''"> and medical_code = #{medicalCode}</if>
+            <if test="hospitalStatus != null  and hospitalStatus != ''"> and hospital_status = #{hospitalStatus}</if>
+            <if test="registrationStatus != null  and registrationStatus != ''"> and registration_status = #{registrationStatus}</if>
+            <if test="admissionTime != null  and admissionTime != ''"> and admission_time = #{admissionTime}</if>
+            <if test="dischargeTime != null  and dischargeTime != ''"> and discharge_time = #{dischargeTime}</if>
+            <if test="msgId != null "> and msg_id = #{msgId}</if>
+            <if test="department != null  and department != ''"> and department = #{department}</if>
+        </where>
+    </select>
+
+</mapper>

+ 20 - 0
ruoyi-admin/src/main/resources/mapper/work/Pv2Mapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.web.work.mapper.Pv2Mapper">
+    
+    <select id="selectList" resultType="com.ruoyi.web.work.domain.Pv2">
+        select * from tb_pv2
+        <where>  
+            <if test="patientId != null "> and patient_id = #{patientId}</if>
+            <if test="level != null  and level != ''"> and level = #{level}</if>
+            <if test="entryTime != null  and entryTime != ''"> and entry_time = #{entryTime}</if>
+            <if test="exitTime != null  and exitTime != ''"> and exit_time = #{exitTime}</if>
+            <if test="reasonArea != null  and reasonArea != ''"> and reason_area = #{reasonArea}</if>
+            <if test="babyCode != null  and babyCode != ''"> and baby_code = #{babyCode}</if>
+            <if test="msgId != null  and msgId != ''"> and msg_id = #{msgId}</if>
+        </where>
+    </select>
+
+</mapper>