fwq
2024-09-24 94d306263d618111065c36d0e45a6f1863bdd7c4
其-适应症程度匹配
1个文件已修改
14 ■■■■■ 已修改文件
phi_platform_user/src/main/java/com/hx/phip/controller/micro/MicroRecordV2Controller.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/controller/micro/MicroRecordV2Controller.java
@@ -1375,12 +1375,18 @@
                detailVoMap.put(indication.getName(), mjIndicationDetailVo);
            }
        }
        //查询治疗建议-程度类型数据
        sqlMap.put("degreeType", BaseClassifyConstants.TYPE_TREAT_PLAN_DEGREE);
        sqlSentence.sqlSentence(" select id,name,sortNo,type from base_classify where isDel = 0 and isUp = 1 AND type = #{m.degreeType} ", sqlMap);
        List<Map<String, Object>> degreeTypeList = commonService.selectListMap(BaseClassifyMapper.class, sqlSentence);
        //转换程度类型列表<程度名称,程度标识>
        Map<String, String> degreeMap = degreeTypeList.stream().collect(Collectors.toMap(m -> m.get("name").toString(), m -> m.get("id").toString()));
        //3.处理治疗设备和治疗项目
        if (indicationList != null && indicationList.size() > 0) {
            //先查询适应症关联的治疗方案
            sqlMap.put("typeStr", TreatPlan.TYPE_STR_INDICATION);
            sql.delete(0, sql.length());
            sql.append(" SELECT t.id,d.name FROM treat_plan AS t ");
            sql.append(" SELECT t.id,d.name,t.degreeTypeId FROM treat_plan AS t ");
            sql.append(" JOIN treat_plan_indication AS p ON p.treatPlanId = t.id ");
            sql.append(" JOIN indication AS d ON d.id = p.indicationId ");
            sql.append(" WHERE t.isDel = #{m.isDel} AND t.typeStr = #{m.typeStr} AND t.isUp = #{m.isUp}   ");
@@ -1410,6 +1416,12 @@
                    if (mjIndicationDetailVo == null) {
                        continue;
                    }
                    //查看程度匹配度
                    String degreeId = degreeMap.get(mjIndicationDetailVo.getDegree());
                    if (StringUtils.noNull(degreeId) && !degreeId.equals(treatPlan.getDegreeTypeId())) {
                        logger.info("当前治疗方案与适应症的匹配程度不匹配,当前是{},客户适应症是{},{}", treatPlan.getDegreeTypeId(), degreeId, mjIndicationDetailVo.getDegree());
                        continue;
                    }
                    deviceTotalList = mjIndicationDetailVo.getDeviceList();
                    if (deviceTotalList == null){
                        deviceTotalList = new ArrayList<>();