From 3bb0455b09474c699688cda4f5ada0c5be8545d1 Mon Sep 17 00:00:00 2001 From: wenjy Date: Sun, 20 Nov 2022 17:25:24 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E6=95=B0=E6=8D=AE=E6=BA=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/scada/UShellMesController.java | 14 ++++++++++---- .../ruoyi/system/domain/scada/ScadaUkHourData.java | 2 +- .../system/service/impl/ImosPrPlanServiceImpl.java | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) 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); }