Ver Fonte

优化代码

xiaochan há 3 anos atrás
pai
commit
2abba1f42e

+ 4 - 1
src/main/java/thyyxxk/webserver/dao/his/casefrontsheet/JieShouHuiZhenDao.java

@@ -20,7 +20,10 @@ import thyyxxk.webserver.entity.casefrontsheet.JieShouHuiZhenPojo;
 @Mapper
 public interface JieShouHuiZhenDao {
 
-    @Select("select bed_no,name,a.admiss_times,a.inpatient_no,req_times from ysh_hz_record a with(nolock) " +
+    @Select("select bed_no,name,a.admiss_times,a.inpatient_no,req_times,hz_type," +
+            "dept_code_name =   (select rtrim(name) from zd_unit_code with (nolock) where code = dept_code), " +
+            "req_dept1_name =   (select rtrim(name) from zd_unit_code with (nolock) where code = req_dept1) " +
+            "from ysh_hz_record a with(nolock) " +
             " inner join zy_actpatient b with(nolock) on " +
             "    (b.inpatient_no = a.inpatient_no)" +
             " ${ew.customSqlSegment} ")

+ 4 - 0
src/main/java/thyyxxk/webserver/entity/casefrontsheet/JieShouHuiZhenPojo.java

@@ -22,6 +22,10 @@ public class JieShouHuiZhenPojo {
     private Integer sex;
     private Date reqDate;
     private String reqDept1;
+    /**
+     * 会诊科室的名字
+     */
+    private String reqDept1Name;
     private String reqDept2;
     private Integer reqTimes;
     private Date birthDate;

+ 0 - 1
src/main/java/thyyxxk/webserver/service/casefrontsheet/JieShouHuiZhenService.java

@@ -53,7 +53,6 @@ public class JieShouHuiZhenService {
             qw.and(QueryWrapper -> QueryWrapper.in("req_dept1", deptList).or().in("req_dept2", deptList));
         }
         Page<JieShouHuiZhenPojo> page = new Page<>(currentPage, pageSize);
-        log.info("会诊申请查看 开始时间:{},结束时间:{}", startTime, endTime);
         dao.getHuiZhenData(page, qw);
         return ResultVoUtil.success(page);
     }

+ 5 - 2
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/CaoYaoYiZhuServer.java

@@ -83,7 +83,10 @@ public class CaoYaoYiZhuServer {
                 .or()
                 .like("name", name)
                 .or()
-                .like("d_code", name))
+                .like("d_code", name)
+                .or()
+                .like("code", name)
+        )
                 .eq("group_no", groupNo);
         dao.huoQuCaoYao(page, qw);
         return ResultVoUtil.success(page);
@@ -118,7 +121,7 @@ public class CaoYaoYiZhuServer {
     }
 
     public ResultVo<String> cunMuBan(YzOrderPatternCy param) {
-        log.info("插入模板草药模板:{}",JSON.toJSONString(param));
+        log.info("插入模板草药模板:{}", JSON.toJSONString(param));
         dao.chaRuMuBan(param.getList(), param.getPatternName(), TokenUtil.getTokenUserId(),
                 PingYinUtils.pyShouZiMuDaXie(param.getPatternName()), PingYinUtils.getWBCode(param.getPatternName()),
                 param.getDeptCode());