xiaochan 2 veckor sedan
förälder
incheckning
6c9e2baa36

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>13.5.8</version>
+    <version>13.6.1</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

+ 5 - 0
src/main/java/thyyxxk/webserver/controller/zhuyuanyizheng/JianYanJianChaController.java

@@ -187,4 +187,9 @@ public class JianYanJianChaController {
     public ResultVo<List<GetDropdownBox>> buWeiShuJu(String name) {
         return server.buWeiShuJu(name);
     }
+
+    @GetMapping("/selectBuWeiAll")
+    public ResultVo<List<GetDropdownBox>> selectBuWeiAll() {
+        return server.selectBuWeiAll();
+    }
 }

+ 16 - 22
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/JianYanJianChaDao.java

@@ -564,34 +564,14 @@ public interface JianYanJianChaDao {
     @Select("select note , collection_info as collectionInfo from ${tableName} where zy_order_code= #{orderCode}")
     JSONObject getExamineIllustrate(String orderCode, String tableName);
 
-
-    @Select("select a.order_code                  as code,\n" +
-            "       c.name                        as name,\n" +
-            "       cast(rtrim(isnull(nullif(c.del_flag,\n" +
-            "                                ''),\n" +
-            "                         0)) as int)    item_del_flag,\n" +
-            "       cast(rtrim(isnull(nullif(a.del_flag,\n" +
-            "                                ''),\n" +
-            "                         0)) as int) as order_del_flag,\n" +
-            "       e.gender_restriction,\n" +
-            "       e.max_age_restriction,\n" +
-            "       e.min_age_restriction,limit_times \n" +
-            "from yz_order_item a with (NOLOCK)\n" +
-            "         left join yz_order_occurence b with (NOLOCK) on (a.order_code = b.order_code)\n" +
-            "         left join zd_charge_item c with (NOLOCK) on (c.code = b.occ_code)\n" +
-            "         left join ${tableName} e with (NOLOCK) on (a.order_code = e.zy_order_code) " +
-            " where  ${ew.sqlSegment};")
-    List<JyJcCheckItemDto> selectJyJcCheckItemDto(@Param("ew") QueryWrapper<?> queryWrapper, @Param("tableName") String tableName);
-
-
     @Select("select gender_restriction,\n" +
             "       max_age_restriction,\n" +
             "       min_age_restriction,\n" +
-            "       zy_order_code as code," +
+            "       zy_order_code as code,rtrim(class) as order_type," +
             " rtrim(name) as name," +
             " cast(rtrim(isnull(nullif(del_flag,\n" +
             "                                ''),\n" +
-            "                         0)) as int) as del_flag, ${col}  " +
+            "                         0)) as int) as del_flag ${col}  " +
             " from ${tableName} \n" +
             " where ${ew.sqlSegment};")
     List<JyJcCheckItemDto> selectJyJcCheckItemDtoByOrderCode(@Param("ew") QueryWrapper<?> queryWrapper,
@@ -611,4 +591,18 @@ public interface JianYanJianChaDao {
             "         left join zd_charge_item c on (c.code = b.occ_code)\n" +
             "where ${ew.sqlSegment};")
     List<JyJcCheckItemDto.ItemInfo> selectItemDetailsByOrderCode(@Param("ew") QueryWrapper<?> queryWrapper);
+
+
+    @Select("select rtrim(code) code, rtrim(name) name , rtrim(parent_code) as parent_code\n" +
+            "from ysh_zd_part_code\n" +
+            "where isnull(del_flag, 0) = 0\n")
+    List<GetDropdownBox> selectBuWeiAll();
+
+
+    @Select("select rtrim(parent_code) as parent_code\n" +
+            "from ysh_zd_part_code\n" +
+            "where isnull(del_flag, 0) = 0\n" +
+            "  and parent_code is not null\n" +
+            "group by parent_code")
+    List<String> selectBuWeiParentCode();
 }

+ 1 - 0
src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/jianyanjiancha/dto/JyJcCheckItemDto.java

@@ -15,6 +15,7 @@ public class JyJcCheckItemDto {
      * 判断条件是 当前数量 大于 a 》limitTimes就不收费了
      */
     private Integer limitTimes;
+    private String orderType;
 
     /**
      * 现在是检查表才有的,如果医生选了加收的话,就需要收这个费用

+ 15 - 5
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/JianYanJianChaShenQingService.java

@@ -510,9 +510,7 @@ public class JianYanJianChaShenQingService {
                 if (StringUtil.isBlank(item.getDiagCode())) {
                     cuoWuXinXi.append(baoCunCuoWuXinXi(index, "临床诊断不能为空。"));
                 }
-//                if (StringUtil.isBlank(item.getInspectPart())) {
-//                    cuoWuXinXi.append(baoCunCuoWuXinXi(index, "部位不能为空"));
-//                }
+
             } else {
                 if (StringUtil.isBlank(item.getInspectStuff())) {
                     cuoWuXinXi.append(baoCunCuoWuXinXi(index, "标本不能为空。"));
@@ -533,7 +531,10 @@ public class JianYanJianChaShenQingService {
         Map<String, JyJcCheckItemDto> jc = getItemInfo(jcCodes, true);
         Map<String, JyJcCheckItemDto> jy = getItemInfo(jyCodes, false);
 
+        List<String> needPart = new ArrayList<>();
+
         if (JC_TYPE.equals(param.getReqType())) {
+            needPart = dao.selectBuWeiParentCode();
             List<YshYjReq> yshYjReqs = handleSurcharge(param.getList(), jc);
             param.getList().addAll(yshYjReqs);
         }
@@ -548,6 +549,11 @@ public class JianYanJianChaShenQingService {
             // 检查
             if (JC_TYPE.equals(param.getReqType())) {
                 itemInfo = jc.get(item.getOrderCode());
+                if (needPart.contains(itemInfo.getOrderType())) {
+                    if (StringUtil.isBlank(item.getInspectPart())) {
+                        cuoWuXinXi.append(baoCunCuoWuXinXi(finalI, "此项目部位不能为空,请选择。"));
+                    }
+                }
             } else {
                 // 检验
                 itemInfo = jy.get(item.getOrderCode());
@@ -625,7 +631,7 @@ public class JianYanJianChaShenQingService {
             String col = "";
             String tableName = "jy_zd_item";
             if (isCheck) {
-                col = "limit_times,(select rtrim(c.zy_order_code) from jc_zd_item c where c.code = jc_zd_item.surcharge) as surcharge," +
+                col = ",limit_times,(select rtrim(c.zy_order_code) from jc_zd_item c where c.code = jc_zd_item.surcharge) as surcharge," +
                       "(select rtrim(c.name) from jc_zd_item c where c.code = jc_zd_item.surcharge) as surcharge_name ";
                 tableName = "jc_zd_item";
             }
@@ -719,7 +725,6 @@ public class JianYanJianChaShenQingService {
         return String.format("第【%d】个%s<br>", index, xinXi);
     }
 
-
     /*-------------------------------------------------------------- 下面是检验的逻辑 -----------------------------------------------------------------------------------------------------*/
     public ResultVo<List<YshYjReq>> huoQuJianYan(@NotNull ChaXunJianChaHeJianYan param) {
         QueryWrapper<?> qw = new QueryWrapper<>();
@@ -964,5 +969,10 @@ public class JianYanJianChaShenQingService {
     public ResultVo<JSONObject> getExamineIllustrate(String orderCode, Boolean isCheck) {
         return ResultVoUtil.success(dao.getExamineIllustrate(orderCode, isCheck ? "jc_zd_item" : "jy_zd_item"));
     }
+
+    public ResultVo<List<GetDropdownBox>> selectBuWeiAll() {
+        return ResultVoUtil.success(dao.selectBuWeiAll());
+    }
+
 }