增加召回时删除病案管理系统7张表的关联数据

master
zengwh 5 years ago
parent af4473e172
commit e1fe20f4f4

@ -13,8 +13,5 @@ public interface ArchiveCallbackInfoMapper {
List<ArchiveCallbackInfoVo> selectAll(ArchiveCallbackInfoVo callbackInfoVo);
/**
* masterId
* */
ArchiveCallbackInfoVo lastBylogTitle(@Param("masterId")String masterId);
int deleteRecordByRecall(@Param("patientId")String patientId);
}

@ -74,6 +74,7 @@ public class ArchiveCallbackInfoService {
Integer targetCode = EnumVerify.DocState.CallBacked.getCode();
archiveFlowInfoService.insertFlowInfo(masterId,currentCode,remark,targetCode,new Date());
//TODO 删除病案资料
callbackInfoMapper.deleteRecordByRecall(masterId);
}
private String getAddressIp(){

@ -108,4 +108,15 @@
</where>
order by archive_callback_info.callback_time desc
</select>
<delete id="deleteRecordByRecall">
begin
delete from commomtable where patient_id = #{patientId};
delete from commomtable1 where patient_id = #{patientId};
delete from t_diag where patient_id = #{patientId};
delete from t_basic where patient_id = #{patientId};
delete from t_operate where patient_id = #{patientId};
delete from t_admiss_thing where patient_id = #{patientId};
delete from archive_archived where patient_id = #{patientId};
end
</delete>
</mapper>
Loading…
Cancel
Save