|
|
|
@ -57,16 +57,16 @@ public class OtherRecordsService implements IOtherRecordsService { |
|
|
|
//通过t_patient_information_record里面的分解任务id 找到患者平车id 最新的 拿到患者平车id t_patient_information_record
|
|
|
|
//拿到患者平车id
|
|
|
|
ProjectVo.BindCar bindCar = stepTaskDao.getBindCarTaskId(param.getId()); |
|
|
|
if (bindCar == null) { |
|
|
|
/*if (bindCar == null) { |
|
|
|
log.info("没有找到绑定的平车信息:{}", param); |
|
|
|
throw new BaseException(CodeEnum.PARAM_ERROR); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
//判断是否是图片是否为空
|
|
|
|
if (CollectionUtil.isNotEmpty(param.getPictures())){ |
|
|
|
for (int i = 0; i < param.getPictures().size(); i++) { |
|
|
|
PatientInformationRecord patientInformationRecord = new PatientInformationRecord(); |
|
|
|
patientInformationRecord.setId(snowflake.nextId()); |
|
|
|
patientInformationRecord.setPatientCarId(bindCar.getId()); |
|
|
|
patientInformationRecord.setPatientCarId(bindCar == null ? 0 : bindCar.getId()); |
|
|
|
patientInformationRecord.setTaskSubId(param.getId()); |
|
|
|
//上传图片
|
|
|
|
patientInformationRecord.setInformationType((byte) 0); |
|
|
|
@ -80,7 +80,7 @@ public class OtherRecordsService implements IOtherRecordsService { |
|
|
|
if(!StringUtil.isEmpty(param.getRecords())) { |
|
|
|
PatientInformationRecord patientInformationRecord = new PatientInformationRecord(); |
|
|
|
patientInformationRecord.setId(snowflake.nextId()); |
|
|
|
patientInformationRecord.setPatientCarId(bindCar.getId()); |
|
|
|
patientInformationRecord.setPatientCarId(bindCar == null ? 0 : bindCar.getId()); |
|
|
|
patientInformationRecord.setTaskSubId(param.getId()); |
|
|
|
patientInformationRecord.setInformationType((byte) 1); |
|
|
|
patientInformationRecord.setContent(param.getRecords()); |
|
|
|
@ -97,10 +97,6 @@ public class OtherRecordsService implements IOtherRecordsService { |
|
|
|
PatientInformationRecordExample patientInformationRecordExample = new PatientInformationRecordExample(); |
|
|
|
patientInformationRecordExample.createCriteria().andTaskSubIdEqualTo(param.getId()); |
|
|
|
List<PatientInformationRecord> patientInformationRecords = patientInformationRecordMapper.selectByExample(patientInformationRecordExample); |
|
|
|
if(CollectionUtil.isEmpty(patientInformationRecords)){ |
|
|
|
log.info("没有找到对应的的任务"); |
|
|
|
throw new BaseException(CodeEnum.PARAM_ERROR); |
|
|
|
} |
|
|
|
for (PatientInformationRecord patientInformationRecord : patientInformationRecords) { |
|
|
|
OtherRecordsVo.TypeAndComment query = new OtherRecordsVo.TypeAndComment(); |
|
|
|
query.setComment(patientInformationRecord.getContent()); |
|
|
|
|