| | |
| | | } |
| | | |
| | | //返回基本信息 |
| | | 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) { |
| | |
| | | } |
| | | } 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); |
| | | } |
| | |
| | | && !"[]".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 { |