瀏覽代碼

没有过会诊的医嘱看不到

xiaochan 5 月之前
父節點
當前提交
fea9cae281

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

@@ -21,13 +21,14 @@ import java.util.List;
 public interface JieShouHuiZhenDao {
 
     @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), " +
+            "dept_code_name =   (select rtrim(name) from zd_unit_code with (nolock) where code = a.dept_code), " +
             "req_dept1_name =   (select rtrim(name) from zd_unit_code with (nolock) where code = req_dept1)," +
             " admiss_date " +
             "from ysh_hz_record a with(nolock) " +
             " inner join view_zy_patient_all b with(nolock) on " +
-            "    (b.inpatient_no = a.inpatient_no and a.admiss_times = b.admiss_times)" +
-            " ${ew.customSqlSegment} ")
+            "    (b.inpatient_no = a.inpatient_no and a.admiss_times = b.admiss_times),view_yz_all_order c " +
+            " ${ew.customSqlSegment} and a.act_order_no = c.act_order_no " +
+            "  and c.status_flag not in ('1', '2')")
     List<JieShouHuiZhenPojo> getHuiZhenData(@Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper);
 
 

+ 5 - 5
src/main/java/thyyxxk/webserver/service/inpatient/casefrontsheet/JieShouHuiZhenService.java

@@ -67,12 +67,12 @@ public class JieShouHuiZhenService implements Assertion {
         Set<String> deptList = publicServer.getChildDeptByUserCode();
         QueryWrapper<?> qw = new QueryWrapper<>();
 
-        String dateName = "req_date";
+        String dateName = "a.req_date";
         if (history) {
-            qw.eq("status_flag", "2");
-            dateName = "hz_date";
+            qw.eq("a.status_flag", "2");
+            dateName = "a.hz_date";
         } else {
-            qw.eq("status_flag", "1");
+            qw.eq("a.status_flag", "1");
         }
 
         if (StringUtil.notBlank(startTime)) {
@@ -81,7 +81,7 @@ public class JieShouHuiZhenService implements Assertion {
         }
 
         if (publicServer.noNeedRule()) {
-            qw.in("req_dept1", deptList);
+            qw.in("a.req_dept1", deptList);
         }
 
         return ResultVoUtil.success(dao.getHuiZhenData(qw));

+ 1 - 1
src/main/resources/application-cytest.yml

@@ -15,7 +15,7 @@ spring:
     cache: false
   datasource:
     dynamic:
-      primary: dev
+      primary: his
       strict: false
       datasource:
         his: