| | |
| | | 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} "); |
| | |
| | | if (mjIndicationDetailVo == null) { |
| | | continue; |
| | | } |
| | | //查看程度匹配度 |
| | | String degreeId = degreeMap.get(mjIndicationDetailVo.getDegree()); |
| | | if (StringUtils.noNull(degreeId) && StringUtils.noNull(treatPlan.getDegreeTypeId()) |
| | | && !degreeId.equals(treatPlan.getDegreeTypeId())) { |
| | | logger.info("适应症:{},程度不匹配,方案的{},客户的{},{}",mjIndicationDetailVo.getName() |
| | | , treatPlan.getDegreeTypeId(), degreeId, mjIndicationDetailVo.getDegree()); |
| | | continue; |
| | | } |
| | | deviceTotalList = mjIndicationDetailVo.getDeviceList(); |
| | | if (deviceTotalList == null){ |
| | | deviceTotalList = new ArrayList<>(); |