Browse Source

修复父类码问题

hurugang 5 năm trước cách đây
mục cha
commit
708ce0508e

+ 7 - 2
src/main/java/cn/hnthyy/thmz/controller/MzChargeDetailController.java

@@ -41,6 +41,8 @@ public class MzChargeDetailController {
     private MzReceiptSerialService mzReceiptSerialService;
     @Autowired
     private MzPatientMiService mzPatientMiService;
+    @Autowired
+    private ZyZdAuditItemService zyZdAuditItemService;
 
     /**
      * 查询费用列表
@@ -954,8 +956,6 @@ public class MzChargeDetailController {
             thmzmxsrParamsVo.setHisData(YesNoEnum.YES);
             //历史数据
             List<Map<String, Object>> depetBusinessReportsHis = mzChargeDetailService.queryDepetBusinessReport(thmzmxsrParamsVo);
-
-
             if (fomartThmzBussinessReport(resultMap, depetBusinessReports, depetBusinessReportsHis)) return resultMap;
             resultMap.put("code", -1);
             resultMap.put("message", "未查询到科室核算报表");
@@ -986,14 +986,19 @@ public class MzChargeDetailController {
             Set<String> depetSet = new HashSet<>();
             //父类码与核算码的关系
             Map<String, List<String>> parentMap = new HashMap<>();
+            List<ZyZdAuditItem> zyZdAuditItems= zyZdAuditItemService.querytAll();
+            //实际项目与父类码对应关系,因为数据查询中的父类码不准
+            Map<String, String> auditMap =  zyZdAuditItems.stream().collect(Collectors.toMap(ZyZdAuditItem::getName,ZyZdAuditItem::getParentCode));
             for (Map<String, Object> map : depetBusinessReports) {
                 repeatSet.add((Date) map.get("charge_dcount_date"));
+                map.put("parent",auditMap.get(map.get("audit_code")));
                 fomartData(mzBillItemMap, parentList, depetList, depetSet, parentMap, map);
             }
             for (Map<String, Object> map : depetBusinessReportsHis) {
                 if (repeatSet.contains(map.get("charge_dcount_date"))) {
                     continue;
                 }
+                map.put("parent",auditMap.get(map.get("audit_code")));
                 depetBusinessReports.add(map);
                 fomartData(mzBillItemMap, parentList, depetList, depetSet, parentMap, map);
             }

+ 8 - 4
src/main/java/cn/hnthyy/thmz/controller/ScheduleOfMedicalController.java

@@ -402,10 +402,14 @@ public class ScheduleOfMedicalController {
                 return resultMap;
             }
             //消化内镜科   心电图检查不合格
-            if (xhnk.equals(scheduleOfMedical.getDepNo()) && YesNoEnum.YES.code.equals(scheduleOfMedicalApply.getXdtjcjg())) {
-                resultMap.put("code", -1);
-                resultMap.put("message", "保存医技排班失败,心电图检查结果不正常,无法进行预约");
-                return resultMap;
+            if (xhnk.equals(scheduleOfMedical.getDepNo())) {
+                if( YesNoEnum.YES.code.equals(scheduleOfMedicalApply.getXdtjcjg())){
+                    resultMap.put("code", -1);
+                    resultMap.put("message", "保存医技排班失败,心电图检查结果不正常,无法进行预约");
+                    return resultMap;
+                }
+            }else {
+                scheduleOfMedicalApply.setXdtjcjg(null);
             }
             if (StringUtils.isBlank(scheduleOfMedicalApply.getActOrderNo())) {
                 resultMap.put("code", -1);

+ 22 - 0
src/main/java/cn/hnthyy/thmz/entity/his/ZyZdAuditItem.java

@@ -0,0 +1,22 @@
+package cn.hnthyy.thmz.entity.his;
+
+import lombok.Data;
+
+/**
+ * 住院字典
+ */
+@Data
+public class ZyZdAuditItem {
+    //编码
+    private String code;
+    //名称
+    private String name;
+    //拼音编码
+    private String pyCode;
+    //五笔编码
+    private String wbCode;
+    //父类码
+    private String parentCode;
+    //删除标志
+    private Integer delFlag;
+}

+ 13 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/ZyZdAuditItemMapper.java

@@ -0,0 +1,13 @@
+package cn.hnthyy.thmz.mapper.his;
+
+import cn.hnthyy.thmz.entity.his.ZyZdAuditItem;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+public interface ZyZdAuditItemMapper {
+
+    @Select("select rtrim(code) code,rtrim(name) name,rtrim(py_code) py_code,rtrim(d_code) wb_code,rtrim(parent_code) parent_code,rtrim(del_flag) del_flag from zy_zd_audit_item ")
+    List<ZyZdAuditItem> selectAll();
+
+}

+ 11 - 0
src/main/java/cn/hnthyy/thmz/service/his/ZyZdAuditItemService.java

@@ -0,0 +1,11 @@
+package cn.hnthyy.thmz.service.his;
+
+import cn.hnthyy.thmz.entity.his.ZyZdAuditItem;
+
+import java.util.List;
+
+public interface ZyZdAuditItemService {
+
+    List<ZyZdAuditItem> querytAll();
+
+}

+ 19 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/ZyZdAuditItemServiceImpl.java

@@ -0,0 +1,19 @@
+package cn.hnthyy.thmz.service.impl.his;
+
+import cn.hnthyy.thmz.entity.his.ZyZdAuditItem;
+import cn.hnthyy.thmz.mapper.his.ZyZdAuditItemMapper;
+import cn.hnthyy.thmz.service.his.ZyZdAuditItemService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+@Service
+public class ZyZdAuditItemServiceImpl implements ZyZdAuditItemService {
+    @SuppressWarnings("all")
+    @Autowired
+    private ZyZdAuditItemMapper zyZdAuditItemMapper;
+    @Override
+    public List<ZyZdAuditItem> querytAll() {
+        return zyZdAuditItemMapper.selectAll();
+    }
+}