ANDRU-PC\Andru
2023-09-14 fd9b0cb657b4712c733288cfb37716e4c3a9b6a8
phi_platform_user/src/main/java/com/hx/phip/controller/consultation/ConsultationRecordController.java
@@ -137,13 +137,13 @@
        }
        //返回基本信息
        if (StringUtils.isEmpty(consultRecordDto.getContent())) {
            sql.delete(0, sql.length());
            sql.append(" select * from consultation_record where isDel = 0 and id!= #{m.consultationRecordId} and userId = #{m.userId} order by createTime desc limit 1 ");
            sqlSentence.setSqlSentence(sql.toString());
            ConsultationRecord consultContent = commonService.selectOne(ConsultationRecordMapper.class, sqlSentence);
            consultRecordDto.setContent(consultContent != null ? consultContent.getContent() : null);
        }
//        if (StringUtils.isEmpty(consultRecordDto.getContent())) {
//            sql.delete(0, sql.length());
//            sql.append(" select * from consultation_record where isDel = 0 and id!= #{m.consultationRecordId} and userId = #{m.userId} order by createTime desc limit 1 ");
//            sqlSentence.setSqlSentence(sql.toString());
//            ConsultationRecord consultContent = commonService.selectOne(ConsultationRecordMapper.class, sqlSentence);
//            consultRecordDto.setContent(consultContent != null ? consultContent.getContent() : null);
//        }
        //非初复诊返回下面的值
        if (consultRecordDto.getConsultType() >= 2) {
@@ -183,7 +183,7 @@
                }
            } else {
                //不为空 则拿取当前存储的上一次治疗项目数据
                lastTreatProjectList = JSON.parseObject(JSON.toJSONString(consultRecordDto.getLastTreatProjects()), new TypeReference<List<Map<String, Object>>>() {
                lastTreatProjectList = JSON.parseObject(consultRecordDto.getLastTreatProjects(), new TypeReference<List<Map<String, Object>>>() {
                });
                consultRecordDto.setLastTreatProjectList(lastTreatProjectList);
            }
@@ -539,7 +539,7 @@
                    && !"[]".equals(consultationRecord.getLastTreatProjects())
                    && !"null".equals(consultationRecord.getLastTreatProjects())){
                // 治疗项目
                lastTreatProject = JSON.parseObject(JSON.toJSONString(consultationRecord.getLastTreatProjects()), new TypeReference<List<Map<String, Object>>>() {
                lastTreatProject = JSON.parseObject(consultationRecord.getLastTreatProjects(), new TypeReference<List<Map<String, Object>>>() {
                });
                data.put("lastTreatProject", lastTreatProject);
            } else {