修改医护提交姓名

master
tan 1 year ago
parent 5fef2f8eba
commit 3037a0faca

@ -21,6 +21,8 @@
"filetitle":"FILENAME",
//
"doctorSubmitTime":"SUBMIT_TIME",
//
"submitName":"REC_SUB_NAME",
//id
"sealId":"SEAL_ID",
//,&

@ -21,6 +21,10 @@
"filetitle":"FILENAME",
//
"nurseSubmitTime":"SUBMIT_TIME",
//
"submitName":"SUBMIT_NURSE_NAME",
//id
"sealId":"SEAL_ID",
//,&
"downurl":"PDF_PATH",
//id

@ -86,22 +86,23 @@ public interface IAfCollectTaskService extends IService<AfCollectTask> {
int deleteByPatientIdAndSysFlag(String patientId, String sysFlag);
/**
*
*
*
* @param reportDownDto
* @param nurseSubmitTime
* @param nurseSubmitName
* @return
*/
int updateNurseSubmitTime(ReportDownDto reportDownDto, String nurseSubmitTime);
int updateNurseSubmitTime(ReportDownDto reportDownDto, String nurseSubmitTime,String nurseSubmitName);
/**
*
*
*
* @param reportDownDto
* @param doctorSubmitTime
* @param doctorSubmitName
* @return
*/
int updateDoctorSubmitTime(ReportDownDto reportDownDto, String doctorSubmitTime);
int updateDoctorSubmitTime(ReportDownDto reportDownDto, String doctorSubmitTime,String doctorSubmitName);
/**
*

@ -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;

@ -331,7 +331,7 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
}
@Override
public int updateNurseSubmitTime(ReportDownDto reportDownDto, String nurseSubmitTime) {
public int updateNurseSubmitTime(ReportDownDto reportDownDto, String nurseSubmitTime,String nurseSubmitName) {
String patientId = getpatientIdByEmpId(reportDownDto.getPatient().getJzh());
TBasicExtend tBasicExtend = tBasicExtendMapper.selectByPatientId(patientId);
@ -344,7 +344,6 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
// tBasicExtend.setNurseSubmitTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(nurseSubmitTime));
update = tBasicExtendMapper.updatenurseSubmitTime(tBasicExtend);
if (null != patientId && null != tBasicExtend.getNurseSubmitTime()) {
String name = getNameByPatientId(patientId);
Map<String, Object> headMap = new HashMap<>();
headMap.put("Content-Type", "application/json");
Map<String, List<String>> params = new HashMap<>();
@ -353,13 +352,13 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
list.add(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(tBasicExtend.getNurseSubmitTime()));
params.put(patientId, list);
params = JSON.parseObject(JSON.toJSONString(params), Map.class);
String post = HttpUtils.postSubmit("http://192.9.100.171:9102/basic/tlog/saveLog?nodeCode=again_submit&" + "userName=" + name + "&" + "name=" + name, headMap, params);
String post = HttpUtils.postSubmit("http://192.9.100.171:9102/basic/tlog/saveLog?nodeCode=again_submit&" + "userName=" + nurseSubmitName + "&" + "name=" + nurseSubmitName, headMap, params);
Map resMap = JSON.parseObject(post, Map.class);
long l7 = System.currentTimeMillis();
if (String.valueOf(resMap.get("code")).equals("500")) {
throw new RuntimeException(String.valueOf(resMap.get("msg")));
log.info("调用示踪接口出错!"+String.valueOf(resMap.get("msg")));
} else {
System.err.println("返回值为--" + resMap);
log.info("调用示踪接口返回值为--" + resMap);
}
}
} else {
@ -378,7 +377,7 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
}
@Override
public int updateDoctorSubmitTime(ReportDownDto reportDownDto, String doctorSubmitTime) {
public int updateDoctorSubmitTime(ReportDownDto reportDownDto, String doctorSubmitTime, String doctorSubmitName) {
String patientId = getpatientIdByEmpId(reportDownDto.getPatient().getJzh());
TBasicExtend tBasicExtend = tBasicExtendMapper.selectByPatientId(patientId);
int update = 0;
@ -392,7 +391,6 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
update = tBasicExtendMapper.updateDoctorSubmitTime(tBasicExtend);
try {
if (null != patientId && null != tBasicExtend.getDoctorSubmitTime()) {
String name = getNameByPatientId(patientId);
Map<String, Object> headMap = new HashMap<>();
headMap.put("Content-Type", "application/json");
Map<String, List<String>> params = new HashMap<>();
@ -402,13 +400,13 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
params.put(patientId, list);
params = JSON.parseObject(JSON.toJSONString(params), Map.class);
long l = System.currentTimeMillis();
String post = HttpUtils.postSubmit("http://192.9.100.171:9102/basic/tlog/saveLog?nodeCode=again_submit&" + "userName=" + name + "&" + "name=" + name, headMap, params);
String post = HttpUtils.postSubmit("http://192.9.100.171:9102/basic/tlog/saveLog?nodeCode=again_submit&" + "userName=" + doctorSubmitName + "&" + "name=" + doctorSubmitName, headMap, params);
long l1 = System.currentTimeMillis();
log.info("调用示踪接口耗时{}", (l1 - l));
Map resMap = JSON.parseObject(post, Map.class);
long l7 = System.currentTimeMillis();
if (String.valueOf(resMap.get("code")).equals("500")) {
log.info("调用示踪接口返回----" + resMap);
log.info("调用示踪接口出错!" + resMap);
throw new RuntimeException(String.valueOf(resMap.get("msg")));
} else {
log.info("调用示踪接口返回----" + resMap);

@ -21,8 +21,8 @@
<!-- 活动文件的名字会根据fileNamePattern的值每隔一段时间改变一次 -->
<!-- 文件名log/demo.2017-12-05.0.log -->
<fileNamePattern>log/demo.%d.%i.log</fileNamePattern>
<!-- 每产生一个日志文件,该日志文件的保存期限为30天 -->
<maxHistory>90</maxHistory>
<!-- 每产生一个日志文件,该日志文件的保存期限为180天 -->
<maxHistory>180</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- maxFileSize:这是活动文件的大小默认值是10MB测试时可改成1KB看效果 -->
<maxFileSize>10MB</maxFileSize>

Loading…
Cancel
Save