|
|
|
@ -27,9 +27,8 @@ import com.docus.bgts.wzh.mapper.AfInterfaceCollectMapper;
|
|
|
|
import com.docus.bgts.wzh.mapper.AfInterfaceCollectSubMapper;
|
|
|
|
import com.docus.bgts.wzh.mapper.AfInterfaceCollectSubMapper;
|
|
|
|
import com.docus.bgts.wzh.mapper.TBasicExtendMapper;
|
|
|
|
import com.docus.bgts.wzh.mapper.TBasicExtendMapper;
|
|
|
|
import com.docus.bgts.wzh.mapper.TBasicMapper;
|
|
|
|
import com.docus.bgts.wzh.mapper.TBasicMapper;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
@ -44,8 +43,8 @@ import java.util.function.Function;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, AfCollectTask> implements IAfCollectTaskService {
|
|
|
|
public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, AfCollectTask> implements IAfCollectTaskService {
|
|
|
|
private final Logger log = LoggerFactory.getLogger(this.getClass());
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
AfCollectTaskMapper afCollectTaskMapper;
|
|
|
|
AfCollectTaskMapper afCollectTaskMapper;
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
@ -59,23 +58,23 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String getpatientIdByJzh(String jzh) {
|
|
|
|
public String getpatientIdByJzh(String jzh) {
|
|
|
|
String patientId = this.afCollectTaskMapper.getpatientIdByJzh(jzh);
|
|
|
|
String patientId = afCollectTaskMapper.getpatientIdByJzh(jzh);
|
|
|
|
return patientId;
|
|
|
|
return patientId;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String getpatientIdBysealId(String sealId) {
|
|
|
|
public String getpatientIdBysealId(String sealId) {
|
|
|
|
return this.afCollectTaskMapper.getPatientIdBysealId(sealId);
|
|
|
|
return afCollectTaskMapper.getPatientIdBysealId(sealId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String getNameByPatientId(String patientId) {
|
|
|
|
public String getNameByPatientId(String patientId) {
|
|
|
|
return this.afCollectTaskMapper.selectNameByPatientId(patientId);
|
|
|
|
return afCollectTaskMapper.selectNameByPatientId(patientId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String getOutpatientIdByJzhel(String jzh) {
|
|
|
|
public String getOutpatientIdByJzhel(String jzh) {
|
|
|
|
return this.afCollectTaskMapper.selectPatientByjzh(jzh);
|
|
|
|
return afCollectTaskMapper.selectPatientByjzh(jzh);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@ -117,10 +116,10 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void insertSeal(ReportDownDto reportDownDto) {
|
|
|
|
public void insertSeal(ReportDownDto reportDownDto) {
|
|
|
|
if (((ReportDownScanFileDto) reportDownDto.getScanfiles().get(0)).getFiletype() == 1) {
|
|
|
|
if (((ReportDownScanFileDto) reportDownDto.getScanfiles().get(0)).getFiletype() == 1) {
|
|
|
|
this.log.info("新增封存任务表初始数据:" + reportDownDto);
|
|
|
|
log.info("新增封存任务表初始数据:" + reportDownDto);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String patientId = this.getpatientIdBysealId(reportDownDto.getPatient().getSealId());
|
|
|
|
String patientId = getpatientIdBysealId(reportDownDto.getPatient().getSealId());
|
|
|
|
if (StringUtils.isBlank(patientId)) {
|
|
|
|
if (StringUtils.isBlank(patientId)) {
|
|
|
|
throw new RuntimeException("操作的病案信息不存在");
|
|
|
|
throw new RuntimeException("操作的病案信息不存在");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
@ -131,7 +130,7 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
|
|
|
|
|
|
|
|
for (ReportDownScanFileDto scanfile : scanfiles) {
|
|
|
|
for (ReportDownScanFileDto scanfile : scanfiles) {
|
|
|
|
long l = System.currentTimeMillis();
|
|
|
|
long l = System.currentTimeMillis();
|
|
|
|
AfCollectTask afCollectTask = (AfCollectTask) this.afCollectTaskMapper.selectOne((Wrapper) ((QueryWrapper) (new QueryWrapper()).eq("C1", scanfile.getSerialnum())).eq("sysflag", reportDownDto.getCollectorid()));
|
|
|
|
AfCollectTask afCollectTask = (AfCollectTask) afCollectTaskMapper.selectOne((Wrapper) ((QueryWrapper) (new QueryWrapper()).eq("C1", scanfile.getSerialnum())).eq("sysflag", reportDownDto.getCollectorid()));
|
|
|
|
if (afCollectTask != null && afCollectTask.getId() != null) {
|
|
|
|
if (afCollectTask != null && afCollectTask.getId() != null) {
|
|
|
|
afCollectTask.setPatientId(patientId);
|
|
|
|
afCollectTask.setPatientId(patientId);
|
|
|
|
afCollectTask.setSysflag(reportDownDto.getCollectorid());
|
|
|
|
afCollectTask.setSysflag(reportDownDto.getCollectorid());
|
|
|
|
@ -140,7 +139,7 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
afCollectTask.setC1(scanfile.getSerialnum());
|
|
|
|
afCollectTask.setC1(scanfile.getSerialnum());
|
|
|
|
afCollectTask.setC2(scanfile.getFiletitle());
|
|
|
|
afCollectTask.setC2(scanfile.getFiletitle());
|
|
|
|
afCollectTask.setC3(reportDownDto.getPatient().getJzh());
|
|
|
|
afCollectTask.setC3(reportDownDto.getPatient().getJzh());
|
|
|
|
save = this.afCollectTaskMapper.updateById(afCollectTask);
|
|
|
|
save = afCollectTaskMapper.updateById(afCollectTask);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
afCollectTask = new AfCollectTask();
|
|
|
|
afCollectTask = new AfCollectTask();
|
|
|
|
afCollectTask.setPatientId(patientId);
|
|
|
|
afCollectTask.setPatientId(patientId);
|
|
|
|
@ -150,16 +149,16 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
afCollectTask.setC1(scanfile.getSerialnum());
|
|
|
|
afCollectTask.setC1(scanfile.getSerialnum());
|
|
|
|
afCollectTask.setC2(scanfile.getFiletitle());
|
|
|
|
afCollectTask.setC2(scanfile.getFiletitle());
|
|
|
|
afCollectTask.setC3(reportDownDto.getPatient().getJzh());
|
|
|
|
afCollectTask.setC3(reportDownDto.getPatient().getJzh());
|
|
|
|
save = this.afCollectTaskMapper.insert(afCollectTask);
|
|
|
|
save = afCollectTaskMapper.insert(afCollectTask);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (save <= 0) {
|
|
|
|
if (save <= 0) {
|
|
|
|
this.log.info("封存任务表操作出错");
|
|
|
|
log.info("封存任务表操作出错");
|
|
|
|
throw new RuntimeException("封存插入病案任务表数据出错");
|
|
|
|
throw new RuntimeException("封存插入病案任务表数据出错");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (afCollectTask.getId() == null) {
|
|
|
|
if (afCollectTask.getId() == null) {
|
|
|
|
this.log.info("封存插入任务id为空!");
|
|
|
|
log.info("封存插入任务id为空!");
|
|
|
|
throw new RuntimeException("封存插入任务id为空");
|
|
|
|
throw new RuntimeException("封存插入任务id为空");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -172,19 +171,19 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void updateInterfaceCollect(String collectSubId, int state) {
|
|
|
|
public void updateInterfaceCollect(String collectSubId, int state) {
|
|
|
|
AfInterfaceCollectSub afInterfaceCollectSub = (AfInterfaceCollectSub) this.afInterfaceCollectSubMapper.selectById(collectSubId);
|
|
|
|
AfInterfaceCollectSub afInterfaceCollectSub = (AfInterfaceCollectSub) afInterfaceCollectSubMapper.selectById(collectSubId);
|
|
|
|
if (afInterfaceCollectSub == null) {
|
|
|
|
if (afInterfaceCollectSub == null) {
|
|
|
|
throw new RuntimeException("afInterfaceCollectSub表数据为空");
|
|
|
|
throw new RuntimeException("afInterfaceCollectSub表数据为空");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
afInterfaceCollectSub.setState(state);
|
|
|
|
afInterfaceCollectSub.setState(state);
|
|
|
|
int i = this.afInterfaceCollectSubMapper.updateById(afInterfaceCollectSub);
|
|
|
|
int i = afInterfaceCollectSubMapper.updateById(afInterfaceCollectSub);
|
|
|
|
if (i <= 0) {
|
|
|
|
if (i <= 0) {
|
|
|
|
throw new RuntimeException("记录任务数时出错");
|
|
|
|
throw new RuntimeException("记录任务数时出错");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (state == 1) {
|
|
|
|
if (state == 1) {
|
|
|
|
AfInterfaceCollect afInterfaceCollect = (AfInterfaceCollect) this.afInterfaceCollectMapper.selectById(afInterfaceCollectSub.getAfInterfaceCollectId());
|
|
|
|
AfInterfaceCollect afInterfaceCollect = (AfInterfaceCollect) afInterfaceCollectMapper.selectById(afInterfaceCollectSub.getAfInterfaceCollectId());
|
|
|
|
afInterfaceCollect.setCompleteCount(afInterfaceCollect.getCompleteCount() + 1);
|
|
|
|
afInterfaceCollect.setCompleteCount(afInterfaceCollect.getCompleteCount() + 1);
|
|
|
|
i = this.afInterfaceCollectMapper.updateById(afInterfaceCollect);
|
|
|
|
i = afInterfaceCollectMapper.updateById(afInterfaceCollect);
|
|
|
|
if (i <= 0) {
|
|
|
|
if (i <= 0) {
|
|
|
|
throw new RuntimeException("记录任务数时出错");
|
|
|
|
throw new RuntimeException("记录任务数时出错");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -196,57 +195,57 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<String> listJZHByDate(String date1, String date2) {
|
|
|
|
public List<String> listJZHByDate(String date1, String date2) {
|
|
|
|
return this.afCollectTaskMapper.listJZHByDate(date1, date2);
|
|
|
|
return afCollectTaskMapper.listJZHByDate(date1, date2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void invokeRepoalFile(CanlcelDto canlcelDto) throws Exception {
|
|
|
|
public void invokeRepoalFile(CanlcelDto canlcelDto) throws Exception {
|
|
|
|
Map<String, Object> headMap = new HashMap();
|
|
|
|
Map<String, Object> headMap = new HashMap();
|
|
|
|
headMap.put("Content-Type", "application/json");
|
|
|
|
headMap.put("Content-Type", "application/json");
|
|
|
|
this.log.info("开始文件撤回操作:" + canlcelDto);
|
|
|
|
log.info("开始文件撤回操作:" + canlcelDto);
|
|
|
|
String post = HttpUtils.post(String.valueOf(FileUtils.getJsonByName(Codes.REPOAL.getMessage())), headMap, (Map) JSON.parseObject(JSON.toJSONString(canlcelDto), Map.class));
|
|
|
|
String post = HttpUtils.post(String.valueOf(FileUtils.getJsonByName(Codes.REPOAL.getMessage())), headMap, (Map) JSON.parseObject(JSON.toJSONString(canlcelDto), Map.class));
|
|
|
|
Map resMap = (Map) JSON.parseObject(post, Map.class);
|
|
|
|
Map resMap = (Map) JSON.parseObject(post, Map.class);
|
|
|
|
if (String.valueOf(resMap.get("code")).equals("500")) {
|
|
|
|
if (String.valueOf(resMap.get("code")).equals("500")) {
|
|
|
|
this.log.error(String.valueOf(resMap.get("msg")));
|
|
|
|
log.error(String.valueOf(resMap.get("msg")));
|
|
|
|
throw new RuntimeException(String.valueOf(resMap.get("msg")));
|
|
|
|
throw new RuntimeException(String.valueOf(resMap.get("msg")));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String selectJzh(String inPatientNo, String examApplyDate) {
|
|
|
|
public String selectJzh(String inPatientNo, String examApplyDate) {
|
|
|
|
return this.afCollectTaskMapper.selectJzh(inPatientNo, examApplyDate);
|
|
|
|
return afCollectTaskMapper.selectJzh(inPatientNo, examApplyDate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String getAssortIdByAssortId(String assortId) {
|
|
|
|
public String getAssortIdByAssortId(String assortId) {
|
|
|
|
return this.afCollectTaskMapper.getAssortIdByAssortId(assortId);
|
|
|
|
return afCollectTaskMapper.getAssortIdByAssortId(assortId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String getAssortIdByAssortName(String assortId) {
|
|
|
|
public String getAssortIdByAssortName(String assortId) {
|
|
|
|
return this.afCollectTaskMapper.getAssortIdByAssortName(assortId);
|
|
|
|
return afCollectTaskMapper.getAssortIdByAssortName(assortId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void insertZdAssort(ZdAssort zdAssort) {
|
|
|
|
public void insertZdAssort(ZdAssort zdAssort) {
|
|
|
|
this.afCollectTaskMapper.insertZdAssort(zdAssort);
|
|
|
|
afCollectTaskMapper.insertZdAssort(zdAssort);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int cancelTsaByPatientIdAndSource(String patientId, String assortId) {
|
|
|
|
public int cancelTsaByPatientIdAndSource(String patientId, String assortId) {
|
|
|
|
return this.afCollectTaskMapper.cancelTsaByPatientIdAndSource(patientId, assortId);
|
|
|
|
return afCollectTaskMapper.cancelTsaByPatientIdAndSource(patientId, assortId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int updateNurseSubmitTime(ReportDownDto reportDownDto, String nurseSubmitTime, String nurseSubmitName) {
|
|
|
|
public int updateNurseSubmitTime(ReportDownDto reportDownDto, String nurseSubmitTime, String nurseSubmitName) {
|
|
|
|
String patientId = this.getpatientIdByJzh(reportDownDto.getPatient().getJzh());
|
|
|
|
String patientId = getpatientIdByJzh(reportDownDto.getPatient().getJzh());
|
|
|
|
TBasicExtend tBasicExtend = this.tBasicExtendMapper.selectByPatientId(patientId);
|
|
|
|
TBasicExtend tBasicExtend = tBasicExtendMapper.selectByPatientId(patientId);
|
|
|
|
int update = 0;
|
|
|
|
int update = 0;
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (null != tBasicExtend) {
|
|
|
|
if (null != tBasicExtend) {
|
|
|
|
tBasicExtend.setNurseSubmitTime(new Date());
|
|
|
|
tBasicExtend.setNurseSubmitTime(new Date());
|
|
|
|
update = this.tBasicExtendMapper.updatenurseSubmitTime(tBasicExtend);
|
|
|
|
update = tBasicExtendMapper.updatenurseSubmitTime(tBasicExtend);
|
|
|
|
if (null != patientId && null != tBasicExtend.getNurseSubmitTime()) {
|
|
|
|
if (null != patientId && null != tBasicExtend.getNurseSubmitTime()) {
|
|
|
|
Map<String, Object> headMap = new HashMap();
|
|
|
|
Map<String, Object> headMap = new HashMap();
|
|
|
|
headMap.put("Content-Type", "application/json");
|
|
|
|
headMap.put("Content-Type", "application/json");
|
|
|
|
@ -260,20 +259,20 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
Map resMap = (Map) JSON.parseObject(post, Map.class);
|
|
|
|
Map resMap = (Map) JSON.parseObject(post, Map.class);
|
|
|
|
long l7 = System.currentTimeMillis();
|
|
|
|
long l7 = System.currentTimeMillis();
|
|
|
|
if (String.valueOf(resMap.get("code")).equals("500")) {
|
|
|
|
if (String.valueOf(resMap.get("code")).equals("500")) {
|
|
|
|
this.log.info("调用示踪接口出错!" + String.valueOf(resMap.get("msg")));
|
|
|
|
log.info("调用示踪接口出错!" + String.valueOf(resMap.get("msg")));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.log.info("调用示踪接口返回值为--" + resMap);
|
|
|
|
log.info("调用示踪接口返回值为--" + resMap);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
TBasicExtend tBasicExtend1 = new TBasicExtend();
|
|
|
|
TBasicExtend tBasicExtend1 = new TBasicExtend();
|
|
|
|
tBasicExtend1.setPatientId(patientId);
|
|
|
|
tBasicExtend1.setPatientId(patientId);
|
|
|
|
tBasicExtend1.setNurseSubmitTime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).parse(nurseSubmitTime));
|
|
|
|
tBasicExtend1.setNurseSubmitTime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).parse(nurseSubmitTime));
|
|
|
|
update = this.tBasicExtendMapper.insert(tBasicExtend1);
|
|
|
|
update = tBasicExtendMapper.insert(tBasicExtend1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
this.log.error(e.getMessage());
|
|
|
|
log.error(e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return update;
|
|
|
|
return update;
|
|
|
|
@ -281,17 +280,17 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int updateDoctorSubmitTime(ReportDownDto reportDownDto, String doctorSubmitTime, String doctorSubmitName) {
|
|
|
|
public int updateDoctorSubmitTime(ReportDownDto reportDownDto, String doctorSubmitTime, String doctorSubmitName) {
|
|
|
|
String patientId = this.getpatientIdByJzh(reportDownDto.getPatient().getJzh());
|
|
|
|
String patientId = getpatientIdByJzh(reportDownDto.getPatient().getJzh());
|
|
|
|
TBasicExtend tBasicExtend = this.tBasicExtendMapper.selectByPatientId(patientId);
|
|
|
|
TBasicExtend tBasicExtend = tBasicExtendMapper.selectByPatientId(patientId);
|
|
|
|
int update = 0;
|
|
|
|
int update = 0;
|
|
|
|
this.log.info("医生提交方法------");
|
|
|
|
log.info("医生提交方法------");
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
Date submitTime = simple.parse(doctorSubmitTime);
|
|
|
|
Date submitTime = simple.parse(doctorSubmitTime);
|
|
|
|
if (null != tBasicExtend) {
|
|
|
|
if (null != tBasicExtend) {
|
|
|
|
tBasicExtend.setDoctorSubmitTime(submitTime);
|
|
|
|
tBasicExtend.setDoctorSubmitTime(submitTime);
|
|
|
|
update = this.tBasicExtendMapper.updateDoctorSubmitTime(tBasicExtend);
|
|
|
|
update = tBasicExtendMapper.updateDoctorSubmitTime(tBasicExtend);
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (null != patientId && null != tBasicExtend.getDoctorSubmitTime()) {
|
|
|
|
if (null != patientId && null != tBasicExtend.getDoctorSubmitTime()) {
|
|
|
|
@ -306,30 +305,30 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
long l = System.currentTimeMillis();
|
|
|
|
long l = System.currentTimeMillis();
|
|
|
|
String post = HttpUtils.postSubmit("http://192.9.100.171:9102/basic/tlog/saveLog?nodeCode=again_submit&userName=" + doctorSubmitName + "&name=" + doctorSubmitName, 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();
|
|
|
|
long l1 = System.currentTimeMillis();
|
|
|
|
this.log.info("调用示踪接口耗时{}", l1 - l);
|
|
|
|
log.info("调用示踪接口耗时{}", l1 - l);
|
|
|
|
Map resMap = (Map) JSON.parseObject(post, Map.class);
|
|
|
|
Map resMap = (Map) JSON.parseObject(post, Map.class);
|
|
|
|
long l7 = System.currentTimeMillis();
|
|
|
|
long l7 = System.currentTimeMillis();
|
|
|
|
if (String.valueOf(resMap.get("code")).equals("500")) {
|
|
|
|
if (String.valueOf(resMap.get("code")).equals("500")) {
|
|
|
|
this.log.info("调用示踪接口出错!" + resMap);
|
|
|
|
log.info("调用示踪接口出错!" + resMap);
|
|
|
|
throw new RuntimeException(String.valueOf(resMap.get("msg")));
|
|
|
|
throw new RuntimeException(String.valueOf(resMap.get("msg")));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.log.info("调用示踪接口返回----" + resMap);
|
|
|
|
log.info("调用示踪接口返回----" + resMap);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.log.info("未调用示踪接口-----");
|
|
|
|
log.info("未调用示踪接口-----");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
this.log.error(e.getMessage());
|
|
|
|
log.error(e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
TBasicExtend tBasicExtend1 = new TBasicExtend();
|
|
|
|
TBasicExtend tBasicExtend1 = new TBasicExtend();
|
|
|
|
tBasicExtend1.setPatientId(patientId);
|
|
|
|
tBasicExtend1.setPatientId(patientId);
|
|
|
|
tBasicExtend1.setDoctorSubmitTime(submitTime);
|
|
|
|
tBasicExtend1.setDoctorSubmitTime(submitTime);
|
|
|
|
update = this.tBasicExtendMapper.insert(tBasicExtend1);
|
|
|
|
update = tBasicExtendMapper.insert(tBasicExtend1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
this.log.error(e.getMessage());
|
|
|
|
log.error(e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return update;
|
|
|
|
return update;
|
|
|
|
@ -337,25 +336,25 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void insertNurseState(ReportDownDto reportDownDto, String nurseSubmitTime) {
|
|
|
|
public void insertNurseState(ReportDownDto reportDownDto, String nurseSubmitTime) {
|
|
|
|
TBasic tBasic = this.tBasicMapper.selectByjzh(reportDownDto.getPatient().getJzh());
|
|
|
|
TBasic tBasic = tBasicMapper.selectByjzh(reportDownDto.getPatient().getJzh());
|
|
|
|
if (null == tBasic) {
|
|
|
|
if (null == tBasic) {
|
|
|
|
throw new RuntimeException("操作的病案信息不存在");
|
|
|
|
throw new RuntimeException("操作的病案信息不存在");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (null != nurseSubmitTime && !"".equals(nurseSubmitTime)) {
|
|
|
|
if (null != nurseSubmitTime && !"".equals(nurseSubmitTime)) {
|
|
|
|
tBasic.setNurseState(1);
|
|
|
|
tBasic.setNurseState(1);
|
|
|
|
int update = this.tBasicMapper.update(tBasic);
|
|
|
|
int update = tBasicMapper.update(tBasic);
|
|
|
|
if (update > 0) {
|
|
|
|
if (update > 0) {
|
|
|
|
this.log.info("护士提交状态修改成功!");
|
|
|
|
log.info("护士提交状态修改成功!");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.log.info("护士提交状态修改失败!");
|
|
|
|
log.info("护士提交状态修改失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
tBasic.setNurseState(0);
|
|
|
|
tBasic.setNurseState(0);
|
|
|
|
int update = this.tBasicMapper.update(tBasic);
|
|
|
|
int update = tBasicMapper.update(tBasic);
|
|
|
|
if (update > 0) {
|
|
|
|
if (update > 0) {
|
|
|
|
this.log.info("护士提交状态修改成功!");
|
|
|
|
log.info("护士提交状态修改成功!");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.log.info("护士提交状态修改失败!");
|
|
|
|
log.info("护士提交状态修改失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -364,25 +363,25 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void insertDoctorState(ReportDownDto reportDownDto, String doctorSubmitTime) {
|
|
|
|
public void insertDoctorState(ReportDownDto reportDownDto, String doctorSubmitTime) {
|
|
|
|
TBasic tBasic = this.tBasicMapper.selectByjzh(reportDownDto.getPatient().getJzh());
|
|
|
|
TBasic tBasic = tBasicMapper.selectByjzh(reportDownDto.getPatient().getJzh());
|
|
|
|
if (null == tBasic) {
|
|
|
|
if (null == tBasic) {
|
|
|
|
throw new RuntimeException("操作的病案信息不存在");
|
|
|
|
throw new RuntimeException("操作的病案信息不存在");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (null != doctorSubmitTime && !"".equals(doctorSubmitTime)) {
|
|
|
|
if (null != doctorSubmitTime && !"".equals(doctorSubmitTime)) {
|
|
|
|
tBasic.setDoctorState(1);
|
|
|
|
tBasic.setDoctorState(1);
|
|
|
|
int update = this.tBasicMapper.update(tBasic);
|
|
|
|
int update = tBasicMapper.update(tBasic);
|
|
|
|
if (update > 0) {
|
|
|
|
if (update > 0) {
|
|
|
|
this.log.info("医生提交状态修改成功!");
|
|
|
|
log.info("医生提交状态修改成功!");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.log.info("医生提交状态修改失败!");
|
|
|
|
log.info("医生提交状态修改失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
tBasic.setDoctorState(0);
|
|
|
|
tBasic.setDoctorState(0);
|
|
|
|
int update = this.tBasicMapper.update(tBasic);
|
|
|
|
int update = tBasicMapper.update(tBasic);
|
|
|
|
if (update > 0) {
|
|
|
|
if (update > 0) {
|
|
|
|
this.log.info("医生提交状态修改成功!");
|
|
|
|
log.info("医生提交状态修改成功!");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.log.info("医生提交状态修改失败!");
|
|
|
|
log.info("医生提交状态修改失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -391,11 +390,11 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public TBasic selectDisDateIsNull(String inPatientNo) {
|
|
|
|
public TBasic selectDisDateIsNull(String inPatientNo) {
|
|
|
|
return this.afCollectTaskMapper.selectDisDateIsNull(inPatientNo);
|
|
|
|
return afCollectTaskMapper.selectDisDateIsNull(inPatientNo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String selectDisDateIsNullJzh(String inPatientNo, String examApplyDate) {
|
|
|
|
public String selectDisDateIsNullJzh(String inPatientNo, String examApplyDate) {
|
|
|
|
return this.afCollectTaskMapper.selectDisDateIsNullJzh(inPatientNo, examApplyDate);
|
|
|
|
return afCollectTaskMapper.selectDisDateIsNullJzh(inPatientNo, examApplyDate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|