feat: 英德中医院,病程记录是否删除

master
wyb 1 year ago
parent cac84cbd81
commit a361a3b048

@ -136,6 +136,7 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
private void cancelReport(String patientId, XmlUtil xmlUtil) { private void cancelReport(String patientId, XmlUtil xmlUtil) {
String reportNo = null; String reportNo = null;
String bcjlType = null; String bcjlType = null;
String bcjlDelete = null;
String reportName = null; String reportName = null;
String reportSource = null; String reportSource = null;
Node reportNoNode = xmlUtil.getNode("/Request/Msg/REPORT_NO"); Node reportNoNode = xmlUtil.getNode("/Request/Msg/REPORT_NO");
@ -147,6 +148,12 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
if (Func.isNotEmpty(bcjlTypeNode)) { if (Func.isNotEmpty(bcjlTypeNode)) {
bcjlType = bcjlTypeNode.getTextContent(); bcjlType = bcjlTypeNode.getTextContent();
} }
Node bcjlDeleteNode = xmlUtil.getNode("/Request/Msg/BCJL_DELETE");
if (Func.isNotEmpty(bcjlDeleteNode)) {
bcjlDelete = bcjlDeleteNode.getTextContent();
}
Node reportNameNode = xmlUtil.getNode("/Request/Msg/CATALOG_NAME"); Node reportNameNode = xmlUtil.getNode("/Request/Msg/CATALOG_NAME");
if (Func.isNotEmpty(reportNameNode)) { if (Func.isNotEmpty(reportNameNode)) {
reportName = reportNameNode.getTextContent(); reportName = reportNameNode.getTextContent();
@ -171,12 +178,12 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
final String shubcjl = "2"; final String shubcjl = "2";
// 病程记录 // 病程记录
if (bcjl.equals(bcjlType)) { if (bcjl.equals(bcjlType)) {
cancelBcjlEMRReport(patientId); cancelBcjlEMRReport(patientId,bcjlDelete);
return; return;
} }
// 术后病程记录 // 术后病程记录
if (shubcjl.equals(bcjlType)) { if (shubcjl.equals(bcjlType)) {
cancelShuBcjlEMRReport(patientId); cancelShuBcjlEMRReport(patientId,bcjlDelete);
return; return;
} }
// 体温单 // 体温单
@ -218,8 +225,7 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
List<Long> taskIds = tasks.stream().map(AfCollectTask::getId).collect(Collectors.toList()); List<Long> taskIds = tasks.stream().map(AfCollectTask::getId).collect(Collectors.toList());
scanAssortMapper.cancel(fileIds); scanAssortMapper.cancel(fileIds);
// 任务移动作废表,删除任务 // 任务移动作废表,删除任务
collectTaskMapper.moveCancel(taskIds); moveTaskAndDel(taskIds);
collectTaskMapper.del(taskIds);
} }
private void cancelHuiZhenEMRReport(String patientId, String reportName) { private void cancelHuiZhenEMRReport(String patientId, String reportName) {
@ -273,7 +279,7 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
* *
* @param patientId * @param patientId
*/ */
private void cancelBcjlEMRReport(String patientId) { private void cancelBcjlEMRReport(String patientId,String delete) {
AfCollectTask task = new AfCollectTask(); AfCollectTask task = new AfCollectTask();
task.setPatientId(patientId); task.setPatientId(patientId);
task.setC6("病程记录"); task.setC6("病程记录");
@ -285,7 +291,11 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
List<Long> fileIds = tasks.stream().map(AfCollectTask::getAfArchiveDetailId).collect(Collectors.toList()); List<Long> fileIds = tasks.stream().map(AfCollectTask::getAfArchiveDetailId).collect(Collectors.toList());
List<Long> taskIds = tasks.stream().map(AfCollectTask::getId).collect(Collectors.toList()); List<Long> taskIds = tasks.stream().map(AfCollectTask::getId).collect(Collectors.toList());
scanAssortMapper.cancel(fileIds); scanAssortMapper.cancel(fileIds);
updateTaskForRecollect(taskIds); if("1".equals(delete)){
moveTaskAndDel(taskIds);
}else {
updateTaskForRecollect(taskIds);
}
} }
@ -294,7 +304,7 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
* *
* @param patientId * @param patientId
*/ */
private void cancelShuBcjlEMRReport(String patientId) { private void cancelShuBcjlEMRReport(String patientId,String delete) {
AfCollectTask task = new AfCollectTask(); AfCollectTask task = new AfCollectTask();
task.setPatientId(patientId); task.setPatientId(patientId);
task.setC6("术后病程记录"); task.setC6("术后病程记录");
@ -306,7 +316,11 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
List<Long> fileIds = tasks.stream().map(AfCollectTask::getAfArchiveDetailId).collect(Collectors.toList()); List<Long> fileIds = tasks.stream().map(AfCollectTask::getAfArchiveDetailId).collect(Collectors.toList());
List<Long> taskIds = tasks.stream().map(AfCollectTask::getId).collect(Collectors.toList()); List<Long> taskIds = tasks.stream().map(AfCollectTask::getId).collect(Collectors.toList());
scanAssortMapper.cancel(fileIds); scanAssortMapper.cancel(fileIds);
updateTaskForRecollect(taskIds); if("1".equals(delete)){
moveTaskAndDel(taskIds);
}else {
updateTaskForRecollect(taskIds);
}
} }
/** /**
@ -365,6 +379,14 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
return reportDeleteLog; return reportDeleteLog;
} }
/**
*
*/
private void moveTaskAndDel(List<Long> taskIds) {
collectTaskMapper.moveCancel(taskIds);
collectTaskMapper.del(taskIds);
}
/** /**
* *
*/ */

Loading…
Cancel
Save