From a9571ede97d1be893d34c450af75755e853b83c8 Mon Sep 17 00:00:00 2001 From: wenjy Date: Fri, 10 Jun 2022 11:30:50 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E7=AE=B1=E5=A3=B3=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E7=9C=8B=E6=9D=BFloss=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AluminumLinerkController.java | 4 +-- .../controller/TankShellDeviceController.java | 31 ++++++++++++++++++ .../AluminumLossStatistics.java | 17 +--------- .../TankShellLossStatistics.java | 27 +++++++++++++++ .../mapper/TankShellLossStatisticsMapper.java | 13 ++++++++ .../service/ITankShellDeviceInfoService.java | 13 ++++++++ .../impl/TankShellDeviceInfoServiceImpl.java | 15 +++++++++ .../controller/AluminumLinerkController.class | Bin 6311 -> 6311 bytes .../TankShellDeviceController.class | Bin 1935 -> 4036 bytes .../AluminumLossStatistics.class | Bin 1966 -> 2301 bytes .../service/ITankShellDeviceInfoService.class | Bin 346 -> 510 bytes .../impl/TankShellDeviceInfoServiceImpl.class | Bin 8396 -> 8937 bytes 12 files changed, 102 insertions(+), 18 deletions(-) create mode 100644 productionboard/src/main/java/com/productionboard/entity/TankShellDevice/TankShellLossStatistics.java create mode 100644 productionboard/src/main/java/com/productionboard/mapper/TankShellLossStatisticsMapper.java diff --git a/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java b/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java index b0170dc..d415a76 100644 --- a/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java +++ b/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java @@ -105,8 +105,8 @@ public class AluminumLinerkController { if(lossStatisticsList.size() > 0){ lossStatisticsList.forEach(x->{ JSONObject jsonObject = new JSONObject(); - jsonObject.put("name",x.getxValue()); - jsonObject.put("value",x.getyValue()); + jsonObject.put("name",x.getXValue()); + jsonObject.put("value",x.getYValue()); jsonObjectList.add(jsonObject); }); } diff --git a/productionboard/src/main/java/com/productionboard/controller/TankShellDeviceController.java b/productionboard/src/main/java/com/productionboard/controller/TankShellDeviceController.java index 4d9bb41..202dd3e 100644 --- a/productionboard/src/main/java/com/productionboard/controller/TankShellDeviceController.java +++ b/productionboard/src/main/java/com/productionboard/controller/TankShellDeviceController.java @@ -1,5 +1,9 @@ package com.productionboard.controller; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.productionboard.entity.AluminumDevice.AluminumLossStatistics; +import com.productionboard.entity.TankShellDevice.TankShellLossStatistics; import com.productionboard.service.ITankShellDeviceInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -7,6 +11,9 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; +import java.util.ArrayList; +import java.util.List; + /** * 箱壳自动成型线设备看板 * @author WenJY @@ -32,6 +39,30 @@ public class TankShellDeviceController { return iTankShellDeviceInfoService.getDataInformationJson(); } + /** + * loss统计 + * @author WenJY + * @date 2022-06-10 11:28 + * @return java.lang.String + */ + @GetMapping("/getLossStatistics") + @ResponseBody + public String lossStatistics(){ + List lossStatisticsList = iTankShellDeviceInfoService.getLossStatisticsList(); + + List jsonObjectList = new ArrayList<>(); + if(lossStatisticsList.size() > 0){ + lossStatisticsList.forEach(x->{ + JSONObject jsonObject = new JSONObject(); + jsonObject.put("name",x.getXValue()); + jsonObject.put("value",x.getYValue()); + jsonObjectList.add(jsonObject); + }); + } + String s = JSONArray.toJSONString(jsonObjectList); + return s; + } + /** * 设备产量能耗对比 * @author WenJY diff --git a/productionboard/src/main/java/com/productionboard/entity/AluminumDevice/AluminumLossStatistics.java b/productionboard/src/main/java/com/productionboard/entity/AluminumDevice/AluminumLossStatistics.java index 7ed12bb..b8656f9 100644 --- a/productionboard/src/main/java/com/productionboard/entity/AluminumDevice/AluminumLossStatistics.java +++ b/productionboard/src/main/java/com/productionboard/entity/AluminumDevice/AluminumLossStatistics.java @@ -13,6 +13,7 @@ import java.io.Serializable; * @author WenJY * @date 2022年06月07日 10:55 */ +@Data @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) @TableName("SCADA_LCB_DEVICEINFO_3") @@ -23,20 +24,4 @@ public class AluminumLossStatistics implements Serializable { @TableField("VALUE") public String yValue; - - public String getxValue() { - return xValue; - } - - public void setxValue(String xValue) { - this.xValue = xValue; - } - - public String getyValue() { - return yValue; - } - - public void setyValue(String yValue) { - this.yValue = yValue; - } } diff --git a/productionboard/src/main/java/com/productionboard/entity/TankShellDevice/TankShellLossStatistics.java b/productionboard/src/main/java/com/productionboard/entity/TankShellDevice/TankShellLossStatistics.java new file mode 100644 index 0000000..81231ef --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/entity/TankShellDevice/TankShellLossStatistics.java @@ -0,0 +1,27 @@ +package com.productionboard.entity.TankShellDevice; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * @author WenJY + * @date 2022年06月10日 11:23 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("SCADA_UK_DEVICEINFO_4") +public class TankShellLossStatistics implements Serializable { + + @TableField("NAME") + public String xValue; + + @TableField("VALUE") + public String yValue; + +} diff --git a/productionboard/src/main/java/com/productionboard/mapper/TankShellLossStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/TankShellLossStatisticsMapper.java new file mode 100644 index 0000000..ef17c8e --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/mapper/TankShellLossStatisticsMapper.java @@ -0,0 +1,13 @@ +package com.productionboard.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.productionboard.entity.TankShellDevice.TankShellLossStatistics; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author WenJY + * @date 2022年06月10日 11:25 + */ +@Mapper +public interface TankShellLossStatisticsMapper extends BaseMapper { +} diff --git a/productionboard/src/main/java/com/productionboard/service/ITankShellDeviceInfoService.java b/productionboard/src/main/java/com/productionboard/service/ITankShellDeviceInfoService.java index d2e1a04..c13040b 100644 --- a/productionboard/src/main/java/com/productionboard/service/ITankShellDeviceInfoService.java +++ b/productionboard/src/main/java/com/productionboard/service/ITankShellDeviceInfoService.java @@ -1,5 +1,10 @@ package com.productionboard.service; +import com.productionboard.entity.AluminumDevice.AluminumLossStatistics; +import com.productionboard.entity.TankShellDevice.TankShellLossStatistics; + +import java.util.List; + /** * 箱壳设备数据 * @author WenJY @@ -23,6 +28,14 @@ public interface ITankShellDeviceInfoService { */ public String getRunParameters(); + /** + * 获取Loss统计 + * @author WenJY + * @date 2022-06-10 11:26 + * @return java.util.List + */ + public List getLossStatisticsList(); + /** * 获取设备参数值 * @author WenJY diff --git a/productionboard/src/main/java/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.java b/productionboard/src/main/java/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.java index d7f9874..e3f3c74 100644 --- a/productionboard/src/main/java/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.java +++ b/productionboard/src/main/java/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.java @@ -32,6 +32,9 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi @Autowired private TankShellDevicePrameterValueMapper tankShellDevicePrameterValueMapper; + @Autowired + private TankShellLossStatisticsMapper tankShellLossStatisticsMapper; + @Autowired private TankShellThisMonthEnergyMapper tankShellThisMonthEnergyMapper; @@ -112,6 +115,18 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi return JSONArray.toJSONString(result); } + /** + * 获取Loss统计 + * @author WenJY + * @date 2022-06-10 11:26 + * @return java.util.List + */ + @Override + public List getLossStatisticsList() { + List tankShellLossStatistics = tankShellLossStatisticsMapper.selectList(null); + return tankShellLossStatistics; + } + @Override public String getDeviceParameterValue() { /*Calendar calendar = Calendar.getInstance(); diff --git a/productionboard/target/classes/com/productionboard/controller/AluminumLinerkController.class b/productionboard/target/classes/com/productionboard/controller/AluminumLinerkController.class index bac8d1385d4e3f83bc9b524cad45616ecc64f80f..95d961a6d26f07886a99c51ce04907774ef7cdaa 100644 GIT binary patch delta 20 bcmZ2(xZH4qq5xyWWF-L~#>mb20u~$qL{kOG delta 20 bcmZ2(xZH4qq5xyXWF-L~#>&n40u~$qMw12z diff --git a/productionboard/target/classes/com/productionboard/controller/TankShellDeviceController.class b/productionboard/target/classes/com/productionboard/controller/TankShellDeviceController.class index 18b6ef0fa26507597f66ec95fe92ef54da6748fb..c5db8d5116ebff0316a071785cfb371ed98f3c33 100644 GIT binary patch literal 4036 zcmb_f`E%1o6#h1s6Gs$dZfLn0$O)p{5K0RPN5BD^&~Wuy+nYp0k&GkA%!Yzm*inb`&O^VUkF@Z})xgeoy)9-v@sJ*oU9e*no?zc%cpJF`^%% z?YM*&^eXv$NaXc}f_@bBL+QtO3KMCp&~TG!Sh%4#Q?2OJ z8(XtZr{JXE3T(74NoQ(wQrY&Pnz0IM$QgG>m8X{ihjRsY+AMi)v0Ml&*U7umE1G_E zYz{5X+Apwvr0fLNv>LN~D{rggj^hSWgZKi6a;`UF`X$eDCdNHEt!}yAl$lr3@y&5r z2wZR0lobZ^csX!yS)M8qwx#5$aqG4~Hg`kLNYj?iggF{$Bz=0+a;)H(Kx0?;m_XBj zTcjDwbC#pdm#6c}yCkWLW_AnG9+RG>_c5_4n6#+ekwl{lt`m5!Z7a{LGkc(NLIs*F zr>Lmis;=%N{q`jqeoN)eJQ=HPKCOabSt>au6a-<7nBJ0Y5Wt*C!8E^Qmb0L326@uuF zAoH49N6(h#oIO?ta5T~DiYXM#)_Z(@pR3We{}|QSn+PmzD=+hs+2sdXPxI{Ph4YcJ zA=ffmT$rNA!(2$AM7yH!;hw`{n79&S-(vs-AY1L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