App端诊断记录上传入参实体修改

master
gongzhenkun 2 years ago
parent 654b8f61e6
commit ccd37938a4

@ -3,7 +3,10 @@ package com.ruoyi.web.controller.api;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.*; import com.ruoyi.system.domain.THospital;
import com.ruoyi.system.domain.TPatient;
import com.ruoyi.system.domain.TPatientHospitalDoctor;
import com.ruoyi.system.domain.TRecord;
import com.ruoyi.system.domain.req.AppPatientHospitalDoctor; import com.ruoyi.system.domain.req.AppPatientHospitalDoctor;
import com.ruoyi.system.domain.req.AppPatientReq; import com.ruoyi.system.domain.req.AppPatientReq;
import com.ruoyi.system.domain.req.AppRecordReq; import com.ruoyi.system.domain.req.AppRecordReq;
@ -113,7 +116,7 @@ public class AppController extends BaseController
{ {
itPatientHospitalDoctorService.insertTPatientHospitalDoctor(tPatientHospitalDoctor); itPatientHospitalDoctorService.insertTPatientHospitalDoctor(tPatientHospitalDoctor);
} }
return AjaxResult.success(); return AjaxResult.success("预约成功");
} }
@PutMapping("/record/ai/finish/{id}") @PutMapping("/record/ai/finish/{id}")

@ -20,6 +20,7 @@ public class AppRecordReq implements Serializable {
/** /**
* ID * ID
*/ */
@ApiModelProperty("记录id")
private Long id; private Long id;
/** /**
@ -31,45 +32,27 @@ public class AppRecordReq implements Serializable {
/** /**
* *
*/ */
@ApiModelProperty("医生") @ApiModelProperty("医生id")
private Long doctorId; private Long doctorId;
/** /**
* *
*/ */
@ApiModelProperty("医院") @ApiModelProperty("医院id")
private Long hospitalId; private Long hospitalId;
/**
* 0 1
*/
@ApiModelProperty("状态 0=预约,1=就诊")
private String status;
/** /**
* ai * ai
*/ */
@ApiModelProperty("ai诊断结果") @ApiModelProperty("ai诊断结果")
private String aiResult; private String aiResult;
/**
* ai
*/
@ApiModelProperty("ai诊断结果无图片")
private String aiResult2;
/** /**
* *
*/ */
@ApiModelProperty("医生诊断结果") @ApiModelProperty("医生诊断结果")
private String updateResult; private String updateResult;
/**
*
*/
@ApiModelProperty("医生诊断结果,无图片")
private String updateResult2;
/** /**
* *
*/ */
@ -80,13 +63,13 @@ public class AppRecordReq implements Serializable {
/** /**
* *
*/ */
@ApiModelProperty("舌下") @ApiModelProperty("舌下(Base64编码)")
private String imgSx; private String imgSx;
/** /**
* *
*/ */
@ApiModelProperty("舌上") @ApiModelProperty("舌上(Base64编码)")
private String imgSm; private String imgSm;
/** /**
@ -139,14 +122,6 @@ public class AppRecordReq implements Serializable {
this.hospitalId = hospitalId; this.hospitalId = hospitalId;
} }
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getAiResult() { public String getAiResult() {
return aiResult; return aiResult;
} }
@ -155,14 +130,6 @@ public class AppRecordReq implements Serializable {
this.aiResult = aiResult; this.aiResult = aiResult;
} }
public String getAiResult2() {
return aiResult2;
}
public void setAiResult2(String aiResult2) {
this.aiResult2 = aiResult2;
}
public String getUpdateResult() { public String getUpdateResult() {
return updateResult; return updateResult;
} }
@ -171,14 +138,6 @@ public class AppRecordReq implements Serializable {
this.updateResult = updateResult; this.updateResult = updateResult;
} }
public String getUpdateResult2() {
return updateResult2;
}
public void setUpdateResult2(String updateResult2) {
this.updateResult2 = updateResult2;
}
public Date getUploadTime() { public Date getUploadTime() {
return uploadTime; return uploadTime;
} }

@ -1,22 +1,22 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.TPatientHospitalDoctor; import com.ruoyi.system.domain.TPatientHospitalDoctor;
import com.ruoyi.system.domain.TRecord;
import com.ruoyi.system.domain.req.TRecordResultReq; import com.ruoyi.system.domain.req.TRecordResultReq;
import com.ruoyi.system.domain.resp.RecordHistoryDataResp; import com.ruoyi.system.domain.resp.RecordHistoryDataResp;
import com.ruoyi.system.domain.resp.TRecordResp; 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.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TRecordMapper;
import com.ruoyi.system.domain.TRecord; import java.util.*;
import com.ruoyi.system.service.ITRecordService; import java.util.stream.Collectors;
/** /**
* Service * Service
@ -76,10 +76,30 @@ public class TRecordServiceImpl implements ITRecordService
@Override @Override
public int updateTRecord(TRecord tRecord) 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()); tRecord.setUpdateTime(DateUtils.getNowDate());
return tRecordMapper.updateTRecord(tRecord); 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();
}
/** /**
* *
* *

Loading…
Cancel
Save