From 582b930e06e46b9e89471c6dca962a4ecb3eb6f8 Mon Sep 17 00:00:00 2001 From: wenjy Date: Sun, 20 Nov 2022 18:25:16 +0800 Subject: [PATCH 1/4] =?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 --- .../java/com/ruoyi/system/domain/scada/ScadaUkHourData.java | 2 +- .../main/java/com/ruoyi/system/mapper/ImosPrPlanMapper.java | 1 + .../ruoyi/system/service/impl/ImosPrPlanServiceImpl.java | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) 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 f9e86aa..a5d1e7e 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/mapper/ImosPrPlanMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ImosPrPlanMapper.java index 73fb0f5..6f81533 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ImosPrPlanMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ImosPrPlanMapper.java @@ -231,6 +231,7 @@ public interface ImosPrPlanMapper */ List getAluminumClassPlanInfo(int in_id); + @DataSource(value = DataSourceType.MASTER) List findByRecordTimeBetweenNew(int in_id); } 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 3ce4823..080ccb0 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 @@ -488,7 +488,7 @@ public class ImosPrPlanServiceImpl implements IImosPrPlanService map.put("0",orderTypeItem); Long planQtyItem = orderInfo.stream().filter(x->x.getOrderType().equals(orderTypeItem)).collect(Collectors.toList()).stream().mapToLong(OrderInfo ::getPlannedProduction).sum()/orderInfo.stream().filter(x->x.getOrderType().equals(orderTypeItem)).collect(Collectors.toList()).size(); map.put("1",planQtyItem); - map.put("2","10"); + map.put("2",planQtyItem/10); for(int i = 7;i < 19;i++){ Long recordTimeitem = Convert.toLong(i); @@ -768,9 +768,9 @@ public class ImosPrPlanServiceImpl implements IImosPrPlanService } @Override - @DataSource(value = DataSourceType.MASTER) public List findByRecordTimeBetweenNew() { - return imosPrPlanMapper.findByRecordTimeBetweenNew(in_id); + List byRecordTimeBetweenNew = imosPrPlanMapper.findByRecordTimeBetweenNew(in_id); + return byRecordTimeBetweenNew; } @Override From 3d2fa662713c66d718ccbc6963ef1623d04c39d9 Mon Sep 17 00:00:00 2001 From: wangh <123456> Date: Mon, 21 Nov 2022 15:25:39 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E4=B8=8D=E8=89=AF?= =?UTF-8?q?=E7=8E=87=E5=86=99=E6=AD=BB=E5=92=8C=E4=B8=80=E5=A4=84=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84=E5=9C=B0=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/scada/FoamerMesController.java | 2 +- .../ruoyi/system/domain/scada/OrderInfo.java | 1 + .../service/impl/ImosPrPlanServiceImpl.java | 31 ++----------------- .../mapper/system/ImosPrPlanMapper.xml | 1 + 4 files changed, 6 insertions(+), 29 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/FoamerMesController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/FoamerMesController.java index 16ebe22..55e0894 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/FoamerMesController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/FoamerMesController.java @@ -92,7 +92,7 @@ public class FoamerMesController { @ResponseBody public String getPlanHourInfo() throws Exception { String jsonInfo = iImosPrPlanService.getFoamerPlanHourInfo(); - System.out.println("小时数据:" + jsonInfo); +// System.out.println("小时数据:" + jsonInfo); return jsonInfo; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/scada/OrderInfo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/scada/OrderInfo.java index 411aafb..c83a934 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/scada/OrderInfo.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/scada/OrderInfo.java @@ -24,6 +24,7 @@ public class OrderInfo { private long plannedProduction; private long actualProduction; + private long target; private long 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 080ccb0..a467ea2 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 @@ -182,7 +182,7 @@ public class ImosPrPlanServiceImpl implements IImosPrPlanService public String getFoamerPlanHourInfo() { List orderInfo = imosPrPlanMapper.getFoamerPlanHourInfo(in_id); - List orderTypeList = new ArrayList<>(); + /* List orderTypeList = new ArrayList<>(); List planQtyList = new ArrayList<>(); List recordTimeList = new ArrayList<>(); orderInfo.forEach(x->orderTypeList.add(x.getOrderType())); @@ -278,35 +278,10 @@ public class ImosPrPlanServiceImpl implements IImosPrPlanService } } - /*if(9-list1.size() > 0){ - for(int i = 0;i<9-list1.size();i++){ - Map map2 = new HashMap<>(); - map2.put("0","C"+(list1.size())); - map2.put("1",""); - map2.put("2",""); - map2.put("3",""); - map2.put("4",""); - map2.put("5",""); - map2.put("6",""); - map2.put("7",""); - map2.put("8",""); - map2.put("9",""); - map2.put("10",""); - map2.put("11",""); - map2.put("12",""); - map2.put("13",""); - map2.put("14",""); - map2.put("15",""); - map2.put("16",""); - map2.put("17",""); - map2.put("18",""); - map2.entrySet().stream().sorted(Map.Entry.comparingByKey()); - list1.add(map2); - } - }*/ - String info = JSONArray.toJSONString(list1); +*/ + String info = JSONArray.toJSONString(orderInfo); return info; } diff --git a/ruoyi-system/src/main/resources/mapper/system/ImosPrPlanMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ImosPrPlanMapper.xml index 6076aed..76d2e16 100644 --- a/ruoyi-system/src/main/resources/mapper/system/ImosPrPlanMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/ImosPrPlanMapper.xml @@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + From a5b82e2fd0242f28098bbbbecfd89dd3a8d6c9b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Mon, 21 Nov 2022 16:55:11 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E6=B3=A1?= =?UTF-8?q?=E7=BA=BF=E7=94=9F=E4=BA=A7=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/scada/NorthFoamerMesPlan.html | 245 ++++++++---------- 1 file changed, 111 insertions(+), 134 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan.html b/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan.html index b3acfc6..e4c4384 100644 --- a/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan.html +++ b/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan.html @@ -2,26 +2,27 @@ - + 发泡SCADA数据平台 - - - + + + - + - - + +