|
|
@ -5,12 +5,14 @@ import com.docus.core.util.Func;
|
|
|
|
import com.docus.infrastructure.core.exception.BaseException;
|
|
|
|
import com.docus.infrastructure.core.exception.BaseException;
|
|
|
|
import com.docus.infrastructure.redis.service.IdService;
|
|
|
|
import com.docus.infrastructure.redis.service.IdService;
|
|
|
|
import com.docus.infrastructure.redis.service.RedisOps;
|
|
|
|
import com.docus.infrastructure.redis.service.RedisOps;
|
|
|
|
|
|
|
|
import com.docus.infrastructure.web.api.CommonResult;
|
|
|
|
import com.docus.infrastructure.web.api.ResultCode;
|
|
|
|
import com.docus.infrastructure.web.api.ResultCode;
|
|
|
|
import com.docus.server.collection.entity.TBasic;
|
|
|
|
import com.docus.server.collection.entity.TBasic;
|
|
|
|
import com.docus.server.collection.mapper.TBasicMapper;
|
|
|
|
import com.docus.server.collection.mapper.TBasicMapper;
|
|
|
|
import com.docus.server.report.api.ShunDePeopleService;
|
|
|
|
import com.docus.server.report.api.ShunDePeopleService;
|
|
|
|
import com.docus.server.report.api.TaskDistributeService;
|
|
|
|
import com.docus.server.report.api.TaskDistributeService;
|
|
|
|
import com.docus.server.report.api.dto.*;
|
|
|
|
import com.docus.server.report.api.dto.*;
|
|
|
|
|
|
|
|
import com.docus.server.report.api.vo.SdRyBloodReportVO;
|
|
|
|
import com.docus.server.report.config.SdRyCollectNurseInsertSugarConfig;
|
|
|
|
import com.docus.server.report.config.SdRyCollectNurseInsertSugarConfig;
|
|
|
|
import com.docus.server.report.config.SdRyReportQueryConfig;
|
|
|
|
import com.docus.server.report.config.SdRyReportQueryConfig;
|
|
|
|
import com.docus.server.report.config.TaskValidateConfig;
|
|
|
|
import com.docus.server.report.config.TaskValidateConfig;
|
|
|
@ -71,6 +73,44 @@ public class ReportJob {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
RedisOps redisOps;
|
|
|
|
RedisOps redisOps;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 输血报告采集
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@XxlJob("SdRyBloodCollectJob")
|
|
|
|
|
|
|
|
public void sdRyBloodCollectJob() {
|
|
|
|
|
|
|
|
String bloodCollectorId = sdRyReportQueryConfig.getBloodCollectorId();
|
|
|
|
|
|
|
|
ReportDownTwoDto reportDownTwoDto = taskDistributeService.getNoViewTaskByCollectorId(bloodCollectorId);
|
|
|
|
|
|
|
|
if (reportDownTwoDto == null) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
String patientId = reportDownTwoDto.getPatient().getPatientId();
|
|
|
|
|
|
|
|
String inpatientNo = reportDownTwoDto.getPatient().getInpatientNo();
|
|
|
|
|
|
|
|
Integer admissTimes = reportDownTwoDto.getHospitals().get(0).getAdmissTimes();
|
|
|
|
|
|
|
|
Long taskId = reportDownTwoDto.getTasks().get(0).getTaskId();
|
|
|
|
|
|
|
|
CommonResult<List<SdRyBloodReportVO>> bloodViewReport = shunDePeopleService.getBloodView(inpatientNo, admissTimes);
|
|
|
|
|
|
|
|
List<SdRyBloodReportVO> sdRyBloodReportVOList = bloodViewReport.getData();
|
|
|
|
|
|
|
|
if (ResultCode.SUCCESS.getCode().equals(bloodViewReport.getCode()) && Func.isNotEmpty(sdRyBloodReportVOList)) {
|
|
|
|
|
|
|
|
ReportDto reportDto;
|
|
|
|
|
|
|
|
for (SdRyBloodReportVO bloodReportVO : sdRyBloodReportVOList) {
|
|
|
|
|
|
|
|
reportDto = new ReportDto();
|
|
|
|
|
|
|
|
reportDto.setSysFlag(bloodCollectorId);
|
|
|
|
|
|
|
|
reportDto.setTaskId(taskId);
|
|
|
|
|
|
|
|
reportDto.setDownUrl(bloodReportVO.getFileUrl());
|
|
|
|
|
|
|
|
reportDto.setFileTitle(bloodReportVO.getFileId() + bloodReportVO.getFileDesc());
|
|
|
|
|
|
|
|
reportDto.setSerialnum(bloodReportVO.getFileId());
|
|
|
|
|
|
|
|
reportDto.setAssortId(ZdAssortConfig.getZdAssortId(sdRyReportQueryConfig.getBloodDefaultAssortType()));
|
|
|
|
|
|
|
|
reportDto.setAdmisstimes(admissTimes);
|
|
|
|
|
|
|
|
reportDto.setInpatientNo(inpatientNo);
|
|
|
|
|
|
|
|
reportDto.setPatientId(patientId);
|
|
|
|
|
|
|
|
reportDto.setDowntype(1);
|
|
|
|
|
|
|
|
reportDto.setFileSource("1");
|
|
|
|
|
|
|
|
reportDto.setFilestoragetype("1");
|
|
|
|
|
|
|
|
reportService.report(reportDto);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
log.info("病案号:{},住院次数:{},输血报告单采集:{} 份", inpatientNo, admissTimes, Func.isEmpty(sdRyBloodReportVOList) ? 0 : sdRyBloodReportVOList.size());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@XxlJob("SdRyLisCollectJob")
|
|
|
|
@XxlJob("SdRyLisCollectJob")
|
|
|
|
public void sdRyLisCollectJob() {
|
|
|
|
public void sdRyLisCollectJob() {
|
|
|
|
String reportQueryLisCollectorId = sdRyReportQueryConfig.getReportQueryLisCollectorId();
|
|
|
|
String reportQueryLisCollectorId = sdRyReportQueryConfig.getReportQueryLisCollectorId();
|
|
|
@ -512,8 +552,6 @@ public class ReportJob {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param visitSn 住院号_住院次数
|
|
|
|
* @param visitSn 住院号_住院次数
|
|
|
|
* @param patientSn 患者id
|
|
|
|
* @param patientSn 患者id
|
|
|
|
* @return 就诊次数
|
|
|
|
* @return 就诊次数
|
|
|
|