|
|
|
@ -98,22 +98,7 @@ public class TaskServiceImpl implements TaskService {
|
|
|
|
|
List<ArchiveOtherExtVo> others = archiveOtherExtMapper.getOtherByMidAndFlag(archiveMasters.get(0).getId(), Integer.parseInt(collectId));
|
|
|
|
|
if (CollectionUtils.isEmpty(others)) {
|
|
|
|
|
//任务表新增
|
|
|
|
|
dto.setId(SnowflakeIdWorker.idWorker.nextId());
|
|
|
|
|
dto.setSycTime(SycTime.format(date));
|
|
|
|
|
dto.setOtherID("0");
|
|
|
|
|
dto.setSysFlag(Integer.parseInt(collectId));
|
|
|
|
|
dto.setSysUpdateTime(SycTime.format(date));
|
|
|
|
|
dto.setJzh(archiveMasters.get(0).getPatientId());
|
|
|
|
|
dto.setZyh(archiveMasters.get(0).getInpNo());
|
|
|
|
|
dto.setStatusFlag(0);
|
|
|
|
|
dto.setMID(archiveMasters.get(0).getId());
|
|
|
|
|
if (collectId.equals("8")) {
|
|
|
|
|
dto.setC1("长临医嘱");
|
|
|
|
|
}
|
|
|
|
|
if (collectId.equals("1")) {
|
|
|
|
|
dto.setC1("护理记录");
|
|
|
|
|
}
|
|
|
|
|
archiveOtherExtMapper.addOther(dto);
|
|
|
|
|
addOther(collectId, dto, date, SycTime, archiveMasters);
|
|
|
|
|
}
|
|
|
|
|
archiveOtherExtMapper.updateStatic(masterId, collectId);
|
|
|
|
|
GenerateQueue(archiveMasters.get(0), printParam, 10, collectId);
|
|
|
|
@ -142,23 +127,7 @@ public class TaskServiceImpl implements TaskService {
|
|
|
|
|
//查询任务表数据,是否存在,不存在时任务表新增,存在时将任务状态改为0
|
|
|
|
|
List<ArchiveOtherExtVo> others = archiveOtherExtMapper.getOtherByMidAndFlag(masterId, Integer.parseInt(collectId));
|
|
|
|
|
if (CollectionUtils.isEmpty(others)) {
|
|
|
|
|
//任务表新增
|
|
|
|
|
dto.setId(SnowflakeIdWorker.idWorker.nextId());
|
|
|
|
|
dto.setSycTime(SycTime.format(date));
|
|
|
|
|
dto.setOtherID("0");
|
|
|
|
|
dto.setSysFlag(Integer.parseInt(collectId));
|
|
|
|
|
dto.setSysUpdateTime(SycTime.format(date));
|
|
|
|
|
dto.setJzh(archiveMasters.get(0).getPatientId());
|
|
|
|
|
dto.setZyh(archiveMasters.get(0).getInpNo());
|
|
|
|
|
dto.setStatusFlag(0);
|
|
|
|
|
dto.setMID(archiveMasters.get(0).getId());
|
|
|
|
|
if (collectId.equals("8")) {
|
|
|
|
|
dto.setC1("长临医嘱");
|
|
|
|
|
}
|
|
|
|
|
if (collectId.equals("1")) {
|
|
|
|
|
dto.setC1("护理记录");
|
|
|
|
|
}
|
|
|
|
|
archiveOtherExtMapper.addOther(dto);
|
|
|
|
|
addOther(collectId, dto, date, SycTime, archiveMasters);
|
|
|
|
|
} else {
|
|
|
|
|
archiveOtherExtMapper.updateStatic(masterId, collectId);
|
|
|
|
|
}
|
|
|
|
@ -315,6 +284,20 @@ public class TaskServiceImpl implements TaskService {
|
|
|
|
|
//查询当前患者要补偿采集器是否存在任务,不存在时新增任务
|
|
|
|
|
List<ArchiveOtherExtVo> others = archiveOtherExtMapper.getOtherByMidAndFlag(archiveMasters.get(0).getId(), Integer.parseInt(collectId));
|
|
|
|
|
if (CollectionUtils.isEmpty(others)) {
|
|
|
|
|
addOther(collectId, dto, date, SycTime, archiveMasters);
|
|
|
|
|
}
|
|
|
|
|
//存在任务表中修改任务表状态
|
|
|
|
|
archiveOtherExtMapper.updateStatic(masterId, collectId);
|
|
|
|
|
GenerateQueue(archiveMasters.get(0), printParam, 10, collectId);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("masterId为:" + masterId + "的患者补偿采集器id为:"+collectId+"失败", e.getMessage(), e);
|
|
|
|
|
}
|
|
|
|
|
log.info("masterId为:" + masterId + "的患者补偿采集器id为:"+collectId+"成功");
|
|
|
|
|
}
|
|
|
|
|
return CommonResult.success("补偿完成");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addOther(String collectId, ArchiveOtherExtDto dto, Date date, SimpleDateFormat SycTime, List<ArchiveMasterVo> archiveMasters) {
|
|
|
|
|
//任务表新增
|
|
|
|
|
dto.setId(SnowflakeIdWorker.idWorker.nextId());
|
|
|
|
|
dto.setSycTime(SycTime.format(date));
|
|
|
|
@ -331,17 +314,10 @@ public class TaskServiceImpl implements TaskService {
|
|
|
|
|
if (collectId.equals("1")) {
|
|
|
|
|
dto.setC1("护理记录");
|
|
|
|
|
}
|
|
|
|
|
archiveOtherExtMapper.addOther(dto);
|
|
|
|
|
}
|
|
|
|
|
//存在任务表中修改任务表状态
|
|
|
|
|
archiveOtherExtMapper.updateStatic(masterId, collectId);
|
|
|
|
|
GenerateQueue(archiveMasters.get(0), printParam, 10, collectId);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("masterId为:" + masterId + "的患者补偿采集器id为:"+collectId+"失败", e.getMessage(), e);
|
|
|
|
|
}
|
|
|
|
|
log.info("masterId为:" + masterId + "的患者补偿采集器id为:"+collectId+"成功");
|
|
|
|
|
if (collectId.equals("2")){
|
|
|
|
|
dto.setC1("电子病例");
|
|
|
|
|
}
|
|
|
|
|
return CommonResult.success("补偿完成");
|
|
|
|
|
archiveOtherExtMapper.addOther(dto);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|