APP新增重新拍摄接口

master
gongzhenkun 2 years ago
parent 389f4ea02f
commit e25d831392

@ -39,4 +39,28 @@ public class MpController extends BaseController {
List<PatientHistoryRecordResp> resp = tRecordService.queryPatientHistoryRecord(tRecord);
return AjaxResult.success(resp);
}
/**
*
*
* @return {@code AjaxResult}
*/
@ApiOperation("APP重新拍摄")
@Log(title = "APP重新拍摄", businessType = BusinessType.INSERT)
@GetMapping("/record/reschedule/{recordId}")
public AjaxResult reschedule(@PathVariable("recordId") Long recordId){
// 逻辑删除本条记录
TRecord tRecord = tRecordService.selectTRecordById(recordId);
TRecord delRecord = new TRecord();
delRecord.setId(recordId);
delRecord.setDelFlag("2");
tRecordService.updateTRecord(delRecord);
// 重新生成一条记录
tRecord.setId(null);
tRecord.setDelFlag("0");
tRecordService.insertTRecord(tRecord);
AjaxResult success = AjaxResult.success();
success.put("recordId", tRecord.getId());
return success;
}
}

@ -79,8 +79,24 @@ public class TRecord extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date aiResultModifyTime;
/**
*
*/
private String appointmentTime;
/**
* 0: 1:
*/
private String delFlag;
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public void setId(Long id)
{
this.id = id;

@ -68,7 +68,9 @@ public class TRecordServiceImpl implements ITRecordService
@Override
public int insertTRecord(TRecord tRecord)
{
tRecord.setCreateTime(DateUtils.getNowDate());
if (null == tRecord.getCreateTime()) {
tRecord.setCreateTime(DateUtils.getNowDate());
}
return tRecordMapper.insertTRecord(tRecord);
}

@ -171,7 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sex !=null and sex !=''">and tp.sex = #{sex} </if>
<if test="identifier !=null and identifier != ''">and tp.identifier like concat('%', #{identifier}, '%')</if>
<if test="delFlag == null">
and td.del_flag = '0' and tp.del_flag = '0'
and td.del_flag = '0' and tp.del_flag = '0' and tr.del_flag = '0'
</if>
<if test="createTime != null and createTime !='' and createTime != 'all'">
and DATE_FORMAT(tp.create_time,'%Y-%m') = #{createTime}
@ -314,7 +314,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sex !=null and sex !=''">and tp.sex = #{sex} </if>
<if test="identifier !=null and identifier != ''">and tp.identifier like concat('%', #{identifier}, '%')</if>
<if test="delFlag == null">
and td.del_flag = '0' and tp.del_flag = '0'
and td.del_flag = '0' and tp.del_flag = '0' and tr.del_flag = '0'
</if>
<if test="createTime != null and createTime !='' and createTime != 'all'">
and DATE_FORMAT(tp.create_time,'%Y-%m') = #{createTime}
@ -355,6 +355,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="responseTime != null">response_time,</if>
<if test="aiResultReturnTime != null">ai_result_return_time,</if>
<if test="aiResultModifyTime != null">ai_result_modify_time,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="patientId != null">#{patientId},</if>
@ -373,6 +374,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="responseTime != null">#{responseTime},</if>
<if test="aiResultReturnTime != null">#{aiResultReturnTime},</if>
<if test="aiResultModifyTime != null">#{aiResultModifyTime},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
@ -395,6 +397,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="responseTime != null">response_time = #{responseTime},</if>
<if test="aiResultReturnTime != null">ai_result_return_time = #{aiResultReturnTime},</if>
<if test="aiResultModifyTime != null">ai_result_modify_time = #{aiResultModifyTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>

Loading…
Cancel
Save