diff --git a/ruoyi-admin/src/main/java/com/ruoyi/script/service/impl/PatientScriptServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/script/service/impl/PatientScriptServiceImpl.java index 3d1547f..f67a12a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/script/service/impl/PatientScriptServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/script/service/impl/PatientScriptServiceImpl.java @@ -707,7 +707,6 @@ public class PatientScriptServiceImpl implements PatientScriptService { public void scanData() throws IOException, InterruptedException, TemplateException { PatientScript patientScript =new PatientScript(); patientScript.setStatus("生成中"); - patientScript.setType("noDti"); List patientScripts = scriptMapper.selectList(patientScript); if (CollectionUtil.isNotEmpty(patientScripts)){ return; @@ -724,48 +723,52 @@ public class PatientScriptServiceImpl implements PatientScriptService { // } PatientScript patientScript2 =new PatientScript(); patientScript2.setStatus("待生成"); - patientScript2.setType("noDti"); List patientScriptList = scriptMapper.selectList(patientScript2); //获取最后一个 if (CollectionUtil.isNotEmpty(patientScriptList)){ PatientScript patientScript1 = patientScriptList.get(patientScriptList.size() - 1); - this.save(patientScript1); + if (patientScript1.getType().equals("dti")){ + this.saveDti(patientScript1); + }else { + this.save(patientScript1); + } + } } - @Scheduled(cron = "0 0/3 * * * ?") - public void scanDataDti() throws IOException, InterruptedException, TemplateException { - PatientScript patientScript =new PatientScript(); - patientScript.setStatus("生成中"); - patientScript.setType("dti"); - List patientScripts = scriptMapper.selectList(patientScript); - if (CollectionUtil.isNotEmpty(patientScripts)){ - return; - } -// PatientScript patientScript3 =new PatientScript(); -// patientScript3.setStatus("生成异常"); -// patientScript3.setType("dti"); -// List patientScriptList3 = scriptMapper.selectList(patientScript3); -// //获取最后一个 -// if (CollectionUtil.isNotEmpty(patientScriptList3)){ -// PatientScript patientScript1 = patientScriptList3.get(patientScriptList3.size() - 1); -// this.saveDti(patientScript1); +// @Scheduled(cron = "0 0/3 * * * ?") +// public void scanDataDti() throws IOException, InterruptedException, TemplateException { +// PatientScript patientScript =new PatientScript(); +// patientScript.setStatus("生成中"); +// patientScript.setType("dti"); +// List patientScripts = scriptMapper.selectList(patientScript); +// if (CollectionUtil.isNotEmpty(patientScripts)){ // return; // } - PatientScript patientScript2 =new PatientScript(); - patientScript2.setStatus("待生成"); - patientScript2.setType("dti"); - List patientScriptList = scriptMapper.selectList(patientScript2); - //获取最后一个 - if (CollectionUtil.isNotEmpty(patientScriptList)){ - PatientScript patientScript1 = patientScriptList.get(patientScriptList.size() - 1); - this.saveDti(patientScript1); - } - - - } +//// PatientScript patientScript3 =new PatientScript(); +//// patientScript3.setStatus("生成异常"); +//// patientScript3.setType("dti"); +//// List patientScriptList3 = scriptMapper.selectList(patientScript3); +//// //获取最后一个 +//// if (CollectionUtil.isNotEmpty(patientScriptList3)){ +//// PatientScript patientScript1 = patientScriptList3.get(patientScriptList3.size() - 1); +//// this.saveDti(patientScript1); +//// return; +//// } +// PatientScript patientScript2 =new PatientScript(); +// patientScript2.setStatus("待生成"); +// patientScript2.setType("dti"); +// List patientScriptList = scriptMapper.selectList(patientScript2); +// //获取最后一个 +// if (CollectionUtil.isNotEmpty(patientScriptList)){ +// PatientScript patientScript1 = patientScriptList.get(patientScriptList.size() - 1); +// this.saveDti(patientScript1); +// } +// +// +// } @Override public void exportReport(HttpServletResponse response, Long reportId) throws Exception {