diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/UShellMesController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/UShellMesController.java index 467e9a0..e7f6bf8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/UShellMesController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/UShellMesController.java @@ -226,7 +226,7 @@ public class UShellMesController { calendar.set(Calendar.SECOND, 0); Date endTime = calendar.getTime(); -// List info = iScadaUkHourDataRepository.findByRecordTimeBetween(beginTime,endTime); + //List info = iScadaUkHourDataRepository.findByRecordTimeBetween(beginTime,endTime); List info = imosPrPlanService.findByRecordTimeBetweenNew(); List infoList = info.stream().sorted(Comparator.comparing(ScadaUkHourData:: getRecordTime)).collect(Collectors.toList()); @@ -250,11 +250,17 @@ public class UShellMesController { @ResponseBody public String getPlanData(){ - OrderInfo planInfoList = imosPrPlanService.getSumUHullPlanInfo().get(0); + String jsonInfo = ""; - String jsonInfo = JSONArray.toJSONString(planInfoList); + try{ + OrderInfo planInfoList = imosPrPlanService.getSumUHullPlanInfo().get(0); + + jsonInfo = JSONArray.toJSONString(planInfoList); - System.out.println("U壳计划汇总:"+jsonInfo); + System.out.println("U壳计划汇总:"+jsonInfo); + }catch (Exception ex) { + System.out.println("U壳计划汇总异常:"+ex.getMessage()); + } return jsonInfo; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/scada/ScadaUkHourData.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/scada/ScadaUkHourData.java index a5d1e7e..f9e86aa 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/scada/ScadaUkHourData.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/scada/ScadaUkHourData.java @@ -33,6 +33,6 @@ public class ScadaUkHourData { // @Column(name = "DEVICESTATE") // public int DEVICESTATE; - @Column(name = "RECORDTIME") + @Column(name = "recordTime") public Date recordTime; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ImosPrPlanServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ImosPrPlanServiceImpl.java index a0bf65f..3ce4823 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ImosPrPlanServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ImosPrPlanServiceImpl.java @@ -768,6 +768,7 @@ public class ImosPrPlanServiceImpl implements IImosPrPlanService } @Override + @DataSource(value = DataSourceType.MASTER) public List findByRecordTimeBetweenNew() { return imosPrPlanMapper.findByRecordTimeBetweenNew(in_id); }