|
|
|
@ -1,22 +1,22 @@
|
|
|
|
|
package com.ruoyi.system.service.impl;
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
|
|
import com.ruoyi.system.domain.TPatientHospitalDoctor;
|
|
|
|
|
import com.ruoyi.system.domain.TRecord;
|
|
|
|
|
import com.ruoyi.system.domain.req.TRecordResultReq;
|
|
|
|
|
import com.ruoyi.system.domain.resp.RecordHistoryDataResp;
|
|
|
|
|
import com.ruoyi.system.domain.resp.TRecordResp;
|
|
|
|
|
import com.ruoyi.system.mapper.TRecordMapper;
|
|
|
|
|
import com.ruoyi.system.service.ITRecordService;
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import com.ruoyi.system.mapper.TRecordMapper;
|
|
|
|
|
import com.ruoyi.system.domain.TRecord;
|
|
|
|
|
import com.ruoyi.system.service.ITRecordService;
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 诊断记录信息Service业务层处理
|
|
|
|
@ -76,10 +76,30 @@ public class TRecordServiceImpl implements ITRecordService
|
|
|
|
|
@Override
|
|
|
|
|
public int updateTRecord(TRecord tRecord)
|
|
|
|
|
{
|
|
|
|
|
// 处理无图片信息
|
|
|
|
|
if (tRecord.getAiResult() != null) {
|
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(tRecord.getAiResult());
|
|
|
|
|
tRecord.setAiResult2(noPicture(jsonObject));
|
|
|
|
|
}
|
|
|
|
|
if (tRecord.getUpdateResult() != null) {
|
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(tRecord.getUpdateResult());
|
|
|
|
|
tRecord.setUpdateResult2(noPicture(jsonObject));
|
|
|
|
|
}
|
|
|
|
|
tRecord.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
return tRecordMapper.updateTRecord(tRecord);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static String noPicture(JSONObject jsonObject) {
|
|
|
|
|
jsonObject.getJSONObject("shezhi").getJSONObject("shemian").put("img_sz", null);
|
|
|
|
|
jsonObject.getJSONObject("shezhi").getJSONObject("yudian").put("img_sz_yudian", null);
|
|
|
|
|
jsonObject.getJSONObject("shezhi").getJSONObject("yuban").put("img_sz_yuban", null);
|
|
|
|
|
jsonObject.getJSONObject("shezhi").getJSONObject("liewen").put("img_sz_liewen", null);
|
|
|
|
|
jsonObject.getJSONObject("shetai").put("img_st", null);
|
|
|
|
|
jsonObject.getJSONObject("shexia").put("img_sx", null);
|
|
|
|
|
jsonObject.getJSONObject("shexia").put("img_sx_vein", null);
|
|
|
|
|
return jsonObject.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 批量删除诊断记录信息
|
|
|
|
|
*
|
|
|
|
|