|
|
|
@ -103,6 +103,9 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
String empId = String.valueOf(FileUtils.getJsonByName(Codes.EMP_ID.getMessage()));
|
|
|
|
|
//电子病历封存id
|
|
|
|
|
String seal = String.valueOf(FileUtils.getJsonByName("sealId"));
|
|
|
|
|
//提交人姓名
|
|
|
|
|
String submitName = String.valueOf(FileUtils.getJsonByName("submitName"));
|
|
|
|
|
|
|
|
|
|
//判断是否为撤销
|
|
|
|
|
String isJudge = String.valueOf(FileUtils.getJsonByName("isJudge"));
|
|
|
|
|
if (StringUtils.isBlank(isJudge) || isJudge.equals("0")) {
|
|
|
|
@ -156,6 +159,8 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
reportDownPatientDto = new ReportDownPatientDto();
|
|
|
|
|
//获取jzh
|
|
|
|
|
String empIdText = getElementText(elementRoot, empId.split(","));
|
|
|
|
|
//获取提交人姓名
|
|
|
|
|
String submit = getElementText(elementRoot, submitName.split(","));
|
|
|
|
|
//获取封存id
|
|
|
|
|
String sealId = getElementTextCanBeEmpty(elementRoot, seal.split(","));
|
|
|
|
|
if (null != sealId && !"".equals(sealId)) {
|
|
|
|
@ -165,6 +170,7 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
sealCollect(sealId);
|
|
|
|
|
reportDownDto.setPatient(reportDownPatientDto);
|
|
|
|
|
List<Element> elementList = xmlUtils.getJsonByName(elementRoot);
|
|
|
|
|
doctorSubmitTime = getElementText(elementRoot, doctorSubmitTime.split(","));
|
|
|
|
|
for (Element element : elementList) {
|
|
|
|
|
filetitle = getElementText(element, filetitleKey.split(","));
|
|
|
|
|
downurl = getElementText(element, downurlKey.split(","));
|
|
|
|
@ -172,9 +178,10 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
//添加护理提交时间
|
|
|
|
|
if (collectorid.equals("1")) {
|
|
|
|
|
nurseSubmitTime = getElementText(element, nurseSubmitTime.split(","));
|
|
|
|
|
afCollectTaskService.updateNurseSubmitTime(reportDownDto, nurseSubmitTime);
|
|
|
|
|
afCollectTaskService.updateNurseSubmitTime(reportDownDto, nurseSubmitTime,submit);
|
|
|
|
|
afCollectTaskService.insertNurseState(reportDownDto, nurseSubmitTime);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取电子病历排序时间
|
|
|
|
|
sortingTime = getElementTextCanBeEmpty(element, sortingTimeKey.split(","));
|
|
|
|
|
//获取采集流水号
|
|
|
|
@ -197,7 +204,10 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
} else {
|
|
|
|
|
reportDownDto.setScanfiles(reportDownDtoArr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//插入医生提交时间
|
|
|
|
|
afCollectTaskService.updateDoctorSubmitTime(reportDownDto, doctorSubmitTime,submit);
|
|
|
|
|
//插入医生提交状态
|
|
|
|
|
afCollectTaskService.insertDoctorState(reportDownDto, doctorSubmitTime);
|
|
|
|
|
afCollectTaskService.insertSeal(reportDownDto);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -247,31 +257,31 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// doctorSubmitTime = getElementText(elementRoot, doctorSubmitTime.split(","));
|
|
|
|
|
doctorSubmitTime = getElementText(elementRoot, doctorSubmitTime.split(","));
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 删除电子病历数据
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// long l2 = System.currentTimeMillis();
|
|
|
|
|
// String patientId = afCollectTaskService.getpatientIdByEmpId(empIdText);
|
|
|
|
|
// long l3 = System.currentTimeMillis();
|
|
|
|
|
// logger.info("查询patient_id耗时" + (l3 - l2));
|
|
|
|
|
// //删除af_downfile表数据
|
|
|
|
|
// long l4 = System.currentTimeMillis();
|
|
|
|
|
// int i = afCollectTaskService.deleteByPatientIdAndCollectorId(patientId, collectorid);
|
|
|
|
|
// long l5 = System.currentTimeMillis();
|
|
|
|
|
// logger.info("删除" + empIdText + "af_downfile表" + i + "条数据耗时-----" + (l5 - l4));
|
|
|
|
|
// //删除t_scan_assort表数据
|
|
|
|
|
// long l8 = System.currentTimeMillis();
|
|
|
|
|
// int i1 = afCollectTaskService.deleteByPatientIdAndAssortId(patientId, assortid);
|
|
|
|
|
// long l11 = System.currentTimeMillis();
|
|
|
|
|
// logger.info("删除" + empIdText + "t_scan_assort表" + i1 + "条数据耗时-----" + (l11 - l8));
|
|
|
|
|
// //删除af_collect_task表数据
|
|
|
|
|
// long l9 = System.currentTimeMillis();
|
|
|
|
|
// int i2 = afCollectTaskService.deleteByPatientIdAndSysFlag(patientId, collectorid);
|
|
|
|
|
// long l10 = System.currentTimeMillis();
|
|
|
|
|
// logger.info("删除" + empIdText + "af_collect_task表" + i2 + "条数据耗时-----" + (l10 - l9));
|
|
|
|
|
long l2 = System.currentTimeMillis();
|
|
|
|
|
String patientId = afCollectTaskService.getpatientIdByEmpId(empIdText);
|
|
|
|
|
long l3 = System.currentTimeMillis();
|
|
|
|
|
logger.info("查询patient_id耗时" + (l3 - l2));
|
|
|
|
|
//删除af_downfile表数据
|
|
|
|
|
long l4 = System.currentTimeMillis();
|
|
|
|
|
int i = afCollectTaskService.deleteByPatientIdAndCollectorId(patientId, collectorid);
|
|
|
|
|
long l5 = System.currentTimeMillis();
|
|
|
|
|
logger.info("删除" + empIdText + "af_downfile表" + i + "条数据耗时-----" + (l5 - l4));
|
|
|
|
|
//删除t_scan_assort表数据
|
|
|
|
|
long l8 = System.currentTimeMillis();
|
|
|
|
|
int i1 = afCollectTaskService.deleteByPatientIdAndAssortId(patientId, assortid);
|
|
|
|
|
long l11 = System.currentTimeMillis();
|
|
|
|
|
logger.info("删除" + empIdText + "t_scan_assort表" + i1 + "条数据耗时-----" + (l11 - l8));
|
|
|
|
|
//删除af_collect_task表数据
|
|
|
|
|
long l9 = System.currentTimeMillis();
|
|
|
|
|
int i2 = afCollectTaskService.deleteByPatientIdAndSysFlag(patientId, collectorid);
|
|
|
|
|
long l10 = System.currentTimeMillis();
|
|
|
|
|
logger.info("删除" + empIdText + "af_collect_task表" + i2 + "条数据耗时-----" + (l10 - l9));
|
|
|
|
|
reportDownPatientDto.setJzh(empIdText);
|
|
|
|
|
logger.info("患者主索引号:" + empIdText);
|
|
|
|
|
reportDownDto.setPatient(reportDownPatientDto);
|
|
|
|
@ -283,18 +293,18 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
//添加护理提交时间
|
|
|
|
|
if (collectorid.equals("1")) {
|
|
|
|
|
nurseSubmitTime = getElementText(element, nurseSubmitTime.split(","));
|
|
|
|
|
afCollectTaskService.updateNurseSubmitTime(reportDownDto, nurseSubmitTime);
|
|
|
|
|
afCollectTaskService.updateNurseSubmitTime(reportDownDto, nurseSubmitTime,submit);
|
|
|
|
|
afCollectTaskService.insertNurseState(reportDownDto, nurseSubmitTime);
|
|
|
|
|
}
|
|
|
|
|
//获取电子病历排序时间
|
|
|
|
|
// sortingTime = getElementTextCanBeEmpty(element, sortingTimeKey.split(","));
|
|
|
|
|
sortingTime = getElementTextCanBeEmpty(element, sortingTimeKey.split(","));
|
|
|
|
|
//获取采集流水号
|
|
|
|
|
serialnum = getElementText(element, serialnmnKey.split(","));
|
|
|
|
|
reportDownScanFileDto = new ReportDownScanFileDto();
|
|
|
|
|
reportDownScanFileDto.setDownurl(downurl);
|
|
|
|
|
reportDownScanFileDto.setFiletitle(filetitle);
|
|
|
|
|
reportDownScanFileDto.setSerialnum(serialnum);
|
|
|
|
|
// reportDownScanFileDto.setSortdate(sortingTime);
|
|
|
|
|
reportDownScanFileDto.setSortdate(sortingTime);
|
|
|
|
|
reportDownScanFileDto.setFilesource(Integer.parseInt(String.valueOf(FileUtils.getJsonByName("filesource"))));
|
|
|
|
|
reportDownScanFileDto.setFilestoragetype(Integer.parseInt(String.valueOf(FileUtils.getJsonByName("filestoragetype"))));
|
|
|
|
|
//判断是否为base64
|
|
|
|
@ -331,9 +341,9 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//插入医生提交时间
|
|
|
|
|
// afCollectTaskService.updateDoctorSubmitTime(reportDownDto, doctorSubmitTime);
|
|
|
|
|
afCollectTaskService.updateDoctorSubmitTime(reportDownDto, doctorSubmitTime,submit);
|
|
|
|
|
//插入医生提交状态
|
|
|
|
|
// afCollectTaskService.insertDoctorState(reportDownDto, doctorSubmitTime);
|
|
|
|
|
afCollectTaskService.insertDoctorState(reportDownDto, doctorSubmitTime);
|
|
|
|
|
//插入文件af_collect_task表数据
|
|
|
|
|
// synchronized (lock) {
|
|
|
|
|
// System.err.println(reportDownDto);
|
|
|
|
@ -383,10 +393,10 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
TBasicWebService service = new TBasicWebService();
|
|
|
|
|
service.sealCollect("");
|
|
|
|
|
}
|
|
|
|
|
// public static void main(String[] args) {
|
|
|
|
|
// TBasicWebService service = new TBasicWebService();
|
|
|
|
|
// service.sealCollect("");
|
|
|
|
|
// }
|
|
|
|
|
private void sealCollect(String sealId) {
|
|
|
|
|
final String systemCollectConfigFileName = "dataConfig" + File.separator + "SystemCollectConfig";
|
|
|
|
|
List<SystemCollectConfig.CollectConfig> sealCollectConfigs;
|
|
|
|
|