|
|
|
@ -8,10 +8,7 @@ import com.docus.server.collection.entity.TBasic;
|
|
|
|
|
import com.docus.server.collection.mapper.TBasicMapper;
|
|
|
|
|
import com.docus.server.report.api.ShunDePeopleService;
|
|
|
|
|
import com.docus.server.report.api.TaskDistributeService;
|
|
|
|
|
import com.docus.server.report.api.dto.ReportDownTwoDto;
|
|
|
|
|
import com.docus.server.report.api.dto.ReportDto;
|
|
|
|
|
import com.docus.server.report.api.dto.SdJxReportDto;
|
|
|
|
|
import com.docus.server.report.api.dto.SdPacsServerConfig;
|
|
|
|
|
import com.docus.server.report.api.dto.*;
|
|
|
|
|
import com.docus.server.report.config.SdRyReportQueryConfig;
|
|
|
|
|
import com.docus.server.report.config.ZdAssortConfig;
|
|
|
|
|
import com.docus.server.report.entity.AfJobTime;
|
|
|
|
@ -137,9 +134,37 @@ public class ReportJob {
|
|
|
|
|
*/
|
|
|
|
|
@XxlJob("SdRyNurseInsertSugarCollectJob")
|
|
|
|
|
public void sdRyNurseInsertSugarCollectJob(){
|
|
|
|
|
String reportQueryZyInspectCollectorId = sdRyReportQueryConfig.getReportQueryZyInspectCollectorId();
|
|
|
|
|
ReportDownTwoDto reportDownTwoDto = taskDistributeService.getNoviewTaskByCollectorId(reportQueryZyInspectCollectorId);
|
|
|
|
|
//todo 移动护理报告采集未完成 文永斌 2023年6月27日12:25:43
|
|
|
|
|
String reportQueryNurseInsertSugarCollectorId = sdRyReportQueryConfig.getReportQueryNurseInsertSugarCollectorId();
|
|
|
|
|
ReportDownTwoDto reportDownTwoDto = taskDistributeService.getNoviewTaskByCollectorId(reportQueryNurseInsertSugarCollectorId);
|
|
|
|
|
if (reportDownTwoDto==null) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
String patientId = reportDownTwoDto.getPatient().getPatientId();
|
|
|
|
|
String inpatientNo = reportDownTwoDto.getPatient().getInpatientNo();
|
|
|
|
|
Integer admissTimes = reportDownTwoDto.getHospitals().get(0).getAdmissTimes();
|
|
|
|
|
final String traceCode = "nurse_print_doc";
|
|
|
|
|
SdNurseInsertSugarRequest sdNurseInsertSugarRequest = new SdNurseInsertSugarRequest(inpatientNo, admissTimes.toString(), traceCode);
|
|
|
|
|
SdNurseInsertSugarResponse sdNurseInsertSugarResponse = shunDePeopleService.getNurseInsertSugarReport(sdNurseInsertSugarRequest);
|
|
|
|
|
List<SdNurseInsertSugarResponse.NisData> nurseInsertSugarReportList = sdNurseInsertSugarResponse.getData();
|
|
|
|
|
if(Func.isNotEmpty(nurseInsertSugarReportList)){
|
|
|
|
|
ReportDto reportDto;
|
|
|
|
|
for (SdNurseInsertSugarResponse.NisData nisReport : nurseInsertSugarReportList) {
|
|
|
|
|
reportDto = new ReportDto();
|
|
|
|
|
reportDto.setSysFlag(reportQueryNurseInsertSugarCollectorId);
|
|
|
|
|
reportDto.setTaskId(reportDownTwoDto.getTasks().get(0).getTaskId());
|
|
|
|
|
reportDto.setDownUrl(nisReport.getUrl());
|
|
|
|
|
reportDto.setFileTitle(nisReport.getForm_name());
|
|
|
|
|
reportDto.setSerialnum(nisReport.getForm_id());
|
|
|
|
|
reportDto.setAssortId(ZdAssortConfig.getZdAssortId(nisReport.getForm_type()));
|
|
|
|
|
reportDto.setAdmisstimes(admissTimes);
|
|
|
|
|
reportDto.setInpatientNo(inpatientNo);
|
|
|
|
|
reportDto.setPatientId(patientId);
|
|
|
|
|
reportDto.setDowntype(1);
|
|
|
|
|
reportDto.setFileSource("1");
|
|
|
|
|
reportDto.setFilestoragetype("1");
|
|
|
|
|
reportService.report(reportDto);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|