Browse Source

检查部位的问题,医技检查执行科室的问题

xiaochan 1 month ago
parent
commit
19819df943

+ 31 - 29
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/JianYanJianChaDao.java

@@ -183,32 +183,36 @@ public interface JianYanJianChaDao {
     List<Map<String, String>> selectTemplateContent(@Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper);
 
 
-    @Select("SELECT                 rtrim(a.order_code)                  as orderCode,\n" +
-            "                       rtrim(a.order_name)                  as orderName,\n" +
-            "                       rtrim(a.order_code)                  as code,\n" +
-            "                       rtrim(a.order_name)                  as name,\n" +
-            "                       rtrim(a.yb_comment)                     ybComment,\n" +
-            "                       '0'                                  as checkFlag,\n" +
-            "                       a.exec_dept                          as execDept,\n" +
-            "                       a.order_type                         as orderType,\n" +
+    @Select("SELECT                 rtrim(a.order_code) as        orderCode,\n" +
+            "                       rtrim(a.order_name) as        orderName,\n" +
+            "                       rtrim(a.order_code) as        code,\n" +
+            "                       rtrim(a.order_name) as        name,\n" +
+            "                       rtrim(a.yb_comment)           ybComment,\n" +
+            "                       '0'                 as        checkFlag,\n" +
+            "                       jyjc.exec_unit      as        execDept,\n" +
+            "                       a.order_type        as        orderType,\n" +
             "                       (select rtrim(name)\n" +
             "                        from zd_unit_code with (NOLOCK)\n" +
-            "                        where code = a.exec_dept)              execDeptName,\n" +
-            "                       CONVERT(varchar(100), GETDATE(), 20) as startTime,\n" +
-            "                       inspect_stuff                        as inspectStuff,\n" +
-            "    inspectStuffName = (select rtrim(name) from jy_zd_sample with (NOLOCK) where code = inspect_stuff)," +
-            "    inspect_part AS inspectPart, " +
-            "       (select rtrim(name)\n" +
-            "        from ysh_zd_part_code\n" +
-            "        where code = inspect_part)         inspectPartName,\n" +
-            "                       rtrim(c.tc_no)                       as tc_no,\n" +
-            "                       '2'                                  as isTheParentNode,\n" +
-            "                       class                                as classes,\n" +
+            "                        where code = jyjc.exec_unit) execDeptName,\n" +
+            "                       CONVERT(varchar(100),\n" +
+            "                               GETDATE(),\n" +
+            "                               20)         as        startTime,\n" +
+            "                       b.inspect_stuff     as        inspectStuff,\n" +
+            "    inspectStuffName = (select rtrim(name)\n" +
+            "                        from jy_zd_sample with (NOLOCK)\n" +
+            "                        where code = b.inspect_stuff),\n" +
+            "                       b.inspect_part      AS        inspectPart,\n" +
+            "                       (select rtrim(name)\n" +
+            "                        from ysh_zd_part_code\n" +
+            "                        where code = b.inspect_part) inspectPartName,\n" +
+            "                       rtrim(c.tc_no)      as        tc_no,\n" +
+            "                       '2'                 as        isTheParentNode,\n" +
+            "                       class               as        classes,\n" +
             "                       note,\n" +
-            "                       collection_info as collectionInfo,\n" +
-            "                       gender_restriction AS genderRestriction,\n" +
-            "                       min_age_restriction AS minAgeRestriction,\n" +
-            "                       max_age_restriction AS maxAgeRestriction\n" +
+            "                       collection_info     as        collectionInfo,\n" +
+            "                       gender_restriction  AS        genderRestriction,\n" +
+            "                       min_age_restriction AS        minAgeRestriction,\n" +
+            "                       max_age_restriction AS        maxAgeRestriction\n" +
             "FROM yz_order_item a with (NOLOCK),\n" +
             "     zy_tc_detail_yj b with (NOLOCK),\n" +
             "     zy_tc_yj c with (NOLOCK),\n" +
@@ -221,8 +225,9 @@ public interface JianYanJianChaDao {
             "  and isnull(jyjc.zy_flag, '0') != '1'\n" +
             "  and c.tc_no = #{code}\n" +
             "  and c.req_type = #{type}\n" +
-            "order by item_no ")
-    List<Map<String, String>> getTemplateByCodeAndType(@Param("code") String code, @Param("type") String type,
+            "order by item_no;")
+    List<Map<String, String>> getTemplateByCodeAndType(@Param("code") String code,
+                                                       @Param("type") String type,
                                                        @Param("tableName") String tableName);
 
     @Select("<script>" +
@@ -295,10 +300,7 @@ public interface JianYanJianChaDao {
             "insert into zy_tc_detail_yj (tc_no, order_code,  inspect_part, inspect_stuff, item_no) " +
             "values " +
             "<foreach collection='list' item='item' index='index' separator=','>" +
-            "(#{tcNo}, #{item.orderCode},  " +
-            "(select bw_code " +
-            "from jc_zd_item " +
-            "where zy_order_code = #{item.orderCode}) , #{item.inspectStuff}" +
+            "(#{tcNo}, #{item.orderCode}, #{item.inspectPart}, #{item.inspectStuff}" +
             ", ${index} + 1)" +
             "</foreach>" +
             "</script>")

+ 1 - 0
src/main/java/thyyxxk/webserver/entity/casefrontsheet/YshHzRecord.java

@@ -157,6 +157,7 @@ public class YshHzRecord implements Serializable {
     private String ybSelfFlag;
 
     private String inspectStuff;
+    private String inspectPart;
 
     public String getHzTypeName() {
         if (hzType == null) {

+ 1 - 1
src/main/java/thyyxxk/webserver/service/inpatient/xmlr/XiangMuLuRuService.java

@@ -784,7 +784,7 @@ public class XiangMuLuRuService {
 
     @Transactional(rollbackFor = Exception.class)
     public ResultVo<String> caiFenPiPei(ZyDetailCharge zyDetailCharge) {
-        String inpatientNo = publicServer.getInpatientNo(zyDetailCharge.getInpatientNo());
+        String inpatientNo = PublicServer.getInpatientNo(zyDetailCharge.getInpatientNo());
         Integer infantFlag = PublicServer.getInfantFlag(zyDetailCharge.getInpatientNo());
         if (ListUtil.isBlank(zyDetailCharge.getList())) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请选择数据。");