diff --git a/productionboard/src/main/java/com/productionboard/controller/AdsorptionTankController.java b/productionboard/src/main/java/com/productionboard/controller/AdsorptionTankController.java index 7d0c91e..4519f2c 100644 --- a/productionboard/src/main/java/com/productionboard/controller/AdsorptionTankController.java +++ b/productionboard/src/main/java/com/productionboard/controller/AdsorptionTankController.java @@ -78,7 +78,8 @@ public class AdsorptionTankController { @ResponseBody public String getMaterialProdutionStatisticsJson(){ - List mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1001"); + List mesMaterialProductionStatisticsList = + iMesProductionDataService.getMesMaterialProductionStatisticsList("1001"); return JSONArray.toJSONString(mesMaterialProductionStatisticsList); } @@ -92,7 +93,7 @@ public class AdsorptionTankController { @GetMapping("/getMaterialStoreJson") @ResponseBody public String getMesMaterialStoreStatisticsJson(){ - List mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1001"); + List mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("L001"); return JSONArray.toJSONString(mesMaterialStoreStatisticsList); } diff --git a/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java b/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java index 58d5807..1b34772 100644 --- a/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java +++ b/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java @@ -5,7 +5,12 @@ import com.alibaba.fastjson.JSONObject; import com.productionboard.entity.AluminumDevice.AluminumDeviceDataInformation; import com.productionboard.entity.AluminumDevice.AluminumLossStatistics; import com.productionboard.entity.AluminumDevice.AluminumOeeStatistics; +import com.productionboard.entity.MesProduction.DeviceFault; +import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; +import com.productionboard.entity.MesProduction.PlanInfo; +import com.productionboard.mapper.PlanInfoMapper; import com.productionboard.service.IAluminumDeviceInfoService; +import com.productionboard.service.IMesProductionDataService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; @@ -26,10 +31,12 @@ import java.util.List; public class AluminumLinerkController { private String prefix = "aluminumLiner/index"; - + @Autowired + private IMesProductionDataService iMesProductionDataService; @Autowired private IAluminumDeviceInfoService aluminumDeviceInfoService; + private SimpleDateFormat hourFormat = new SimpleDateFormat("HH"); @GetMapping() @@ -124,18 +131,8 @@ public class AluminumLinerkController { @GetMapping("/getStatisticalOutputByModel") @ResponseBody public String getStatisticalOutputByModel() { - String info = - "{\n" - + "\t\"datas\":[\n" - + " {\"ranking\": 1,\"station\":\"SC227\",\"value\": 199999},\n" - + " {\"ranking\": 2,\"station\":\"SC228\",\"value\": 104970},\n" - + " {\"ranking\": 3,\"station\":\"SC229\",\"value\": 29034},\n" - + " {\"ranking\": 4,\"station\":\"SC223\",\"value\": 23489},\n" - + " {\"ranking\": 5,\"station\":\"SC224\",\"value\": 18203}\n" - + " ],\n" - + "\t\"plan\":[290000, 290000, 290000, 290000, 290000, 290000]\n" - + "}"; - return info; + List list=iMesProductionDataService.selectDeviceFaultByType("铝内胆"); + return JSONArray.toJSONString(list); } /** @@ -148,24 +145,16 @@ public class AluminumLinerkController { @GetMapping("/getInventoryStatistics") @ResponseBody public String getInventoryStatistics() { - String info = - "{\n" - + "\t\"datas\":[\n" - + " {\n" - + " \"name\": \"SC528\",\n" - + " \"value\": 175.17\n" - + " },\n" - + " {\n" - + " \"name\": \"SC529\",\n" - + " \"value\": 148.35\n" - + " },\n" - + " {\n" - + " \"name\": \"SC327\",\n" - + " \"value\": 95.36\n" - + " }\n" - + " ]\n" - + "}"; - return info; + List mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("L001"); + return JSONArray.toJSONString(mesMaterialStoreStatisticsList); + + } + @GetMapping("/getProductionPlan") + @ResponseBody + public String getProductionPlan() { + List PlanInfos = iMesProductionDataService.getProductionPlan(); + return JSONArray.toJSONString(PlanInfos); + } } diff --git a/productionboard/src/main/java/com/productionboard/controller/AluminumTtankController.java b/productionboard/src/main/java/com/productionboard/controller/AluminumTtankController.java index 37e523c..4d9b9c4 100644 --- a/productionboard/src/main/java/com/productionboard/controller/AluminumTtankController.java +++ b/productionboard/src/main/java/com/productionboard/controller/AluminumTtankController.java @@ -44,7 +44,7 @@ public class AluminumTtankController { @GetMapping("/getTeamStatisticsJson") @ResponseBody public String getTeamStatisticsJson(){ - List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1002"); + List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("铝内胆"); if(mesTeamStatisticsList.size()>0){ return JSONArray.toJSONString(mesTeamStatisticsList.get(0)); } @@ -60,7 +60,8 @@ public class AluminumTtankController { @GetMapping("/getHourProdutionJson") @ResponseBody public String getHourProdutionStatisticsJson(){ - List mesHourProdutionStatisticsList = iMesProductionDataService.getMesHourProdutionStatisticsList("1002"); + List mesHourProdutionStatisticsList = + iMesProductionDataService.getMesHourProdutionStatisticsList("铝内胆"); if(mesHourProdutionStatisticsList.size()>0){ return JSONArray.toJSONString(mesHourProdutionStatisticsList); } @@ -77,7 +78,8 @@ public class AluminumTtankController { @ResponseBody public String getMaterialProdutionStatisticsJson(){ - List mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1002"); + List mesMaterialProductionStatisticsList = + iMesProductionDataService.getMesMaterialProductionStatisticsList("1006"); return JSONArray.toJSONString(mesMaterialProductionStatisticsList); } @@ -87,11 +89,15 @@ public class AluminumTtankController { * @author WenJY * @date 2022-06-09 17:18 * @return java.lang.String + * L001 内胆库存 + * U001 箱壳库存 */ @GetMapping("/getMaterialStoreJson") @ResponseBody public String getMesMaterialStoreStatisticsJson(){ - List mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1002"); + List mesMaterialStoreStatisticsList = + + iMesProductionDataService.getMesMaterialStoreStatisticsList("L001"); return JSONArray.toJSONString(mesMaterialStoreStatisticsList); } diff --git a/productionboard/src/main/java/com/productionboard/controller/PreassembleController.java b/productionboard/src/main/java/com/productionboard/controller/PreassembleController.java index 5c00eeb..815c5db 100644 --- a/productionboard/src/main/java/com/productionboard/controller/PreassembleController.java +++ b/productionboard/src/main/java/com/productionboard/controller/PreassembleController.java @@ -44,7 +44,7 @@ public class PreassembleController { @GetMapping("/getTeamStatisticsJson") @ResponseBody public String getTeamStatisticsJson(){ - List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1002"); + List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1001"); if(mesTeamStatisticsList.size()>0){ return JSONArray.toJSONString(mesTeamStatisticsList.get(0)); } @@ -77,7 +77,7 @@ public class PreassembleController { @ResponseBody public String getMaterialProdutionStatisticsJson(){ - List mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1002"); + List mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1001"); return JSONArray.toJSONString(mesMaterialProductionStatisticsList); } diff --git a/productionboard/src/main/java/com/productionboard/controller/TankShellController.java b/productionboard/src/main/java/com/productionboard/controller/TankShellController.java index 2d5e9bb..e26f58f 100644 --- a/productionboard/src/main/java/com/productionboard/controller/TankShellController.java +++ b/productionboard/src/main/java/com/productionboard/controller/TankShellController.java @@ -2,10 +2,7 @@ package com.productionboard.controller; import com.alibaba.fastjson.JSONArray; import com.productionboard.entity.BasicScadaDeviceinfo; -import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; -import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; -import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; -import com.productionboard.entity.MesProduction.MesTeamStatistics; +import com.productionboard.entity.MesProduction.*; import com.productionboard.service.IMesProductionDataService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -45,7 +42,7 @@ public class TankShellController { @GetMapping("/getTeamStatisticsJson") @ResponseBody public String getTeamStatisticsJson(){ - List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1002"); + List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1006"); if(mesTeamStatisticsList.size()>0){ return JSONArray.toJSONString(mesTeamStatisticsList.get(0)); } @@ -61,7 +58,7 @@ public class TankShellController { @GetMapping("/getHourProdutionJson") @ResponseBody public String getHourProdutionStatisticsJson(){ - List mesHourProdutionStatisticsList = iMesProductionDataService.getMesHourProdutionStatisticsList("1002"); + List mesHourProdutionStatisticsList = iMesProductionDataService.getMesHourProdutionStatisticsList("箱壳"); if(mesHourProdutionStatisticsList.size()>0){ return JSONArray.toJSONString(mesHourProdutionStatisticsList); } @@ -69,7 +66,7 @@ public class TankShellController { } /** - * 通过工位号获取MES物料产量 + * 通过工位号获取MES物料产量 按类型统计箱壳 * @author WenJY * @date 2022-06-09 17:06 * @return java.lang.String @@ -78,7 +75,8 @@ public class TankShellController { @ResponseBody public String getMaterialProdutionStatisticsJson(){ - List mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1002"); + List mesMaterialProductionStatisticsList = + iMesProductionDataService.getMesMaterialProductionStatisticsList("1006"); return JSONArray.toJSONString(mesMaterialProductionStatisticsList); } @@ -103,22 +101,12 @@ public class TankShellController { * @date 2022/4/20 10:15 * @return java.lang.String */ - @GetMapping("/getStatisticalOutputByModel") - @ResponseBody - public String getStatisticalOutputByModel() { - String info = - "{\n" - + "\t\"datas\":[\n" - + " {\"ranking\": 1,\"station\":\"SC227\",\"value\": 199999},\n" - + " {\"ranking\": 2,\"station\":\"SC228\",\"value\": 104970},\n" - + " {\"ranking\": 3,\"station\":\"SC229\",\"value\": 29034},\n" - + " {\"ranking\": 4,\"station\":\"SC223\",\"value\": 23489},\n" - + " {\"ranking\": 5,\"station\":\"SC224\",\"value\": 18203}\n" - + " ],\n" - + "\t\"plan\":[290000, 290000, 290000, 290000, 290000, 290000]\n" - + "}"; - return info; - } +// @GetMapping("/getStatisticalOutputByModel") +// @ResponseBody +// public String getStatisticalOutputByModel() { +// List list=iMesProductionDataService.selectDeviceFaultByType("铝内胆"); +// return JSONArray.toJSONString(list); +// } /** * 库存 统计 diff --git a/productionboard/src/main/java/com/productionboard/controller/test.java b/productionboard/src/main/java/com/productionboard/controller/test.java new file mode 100644 index 0000000..5c2b67a --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/controller/test.java @@ -0,0 +1,19 @@ +package com.productionboard.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +/** + * @author wanghao + * @date 2022/9/29 11:48 + */ +@Controller() +@RequestMapping("/index") +public class test { + + @GetMapping() + private String index(){ + return "/index"; + } +} diff --git a/productionboard/src/main/java/com/productionboard/entity/MesProduction/DeviceFault.java b/productionboard/src/main/java/com/productionboard/entity/MesProduction/DeviceFault.java new file mode 100644 index 0000000..fdbcaa2 --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/entity/MesProduction/DeviceFault.java @@ -0,0 +1,35 @@ +package com.productionboard.entity.MesProduction; + +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月09日 17:10 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("SCADA_DEVICE_FAULT") +public class DeviceFault implements Serializable { + + /** 名称 */ + @TableField("STATION") + private String station; + + /** 数量 */ + @TableField("VALUE") + private String value; + + /** 类型 */ + @TableField("TYPE") + private String hullStoreAmount; + + +} diff --git a/productionboard/src/main/java/com/productionboard/entity/MesProduction/PlanInfo.java b/productionboard/src/main/java/com/productionboard/entity/MesProduction/PlanInfo.java new file mode 100644 index 0000000..861d1e9 --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/entity/MesProduction/PlanInfo.java @@ -0,0 +1,42 @@ +package com.productionboard.entity.MesProduction; + +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月09日 17:10 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("SCADA_PLAN_INFO") +public class PlanInfo implements Serializable { + + /** 物料名称 */ + @TableField("SPE") + private String spe; + + /** 内胆库库存 */ + @TableField("OQ") + private String oq; + + /** 箱壳库库存 */ + @TableField("AQ") + private String aq; + + /** 工位编号 */ + @TableField("ROUND") + private String round; + @TableField("CHA") + private String cha; + + + +} diff --git a/productionboard/src/main/java/com/productionboard/mapper/DeviceFaultMapper.java b/productionboard/src/main/java/com/productionboard/mapper/DeviceFaultMapper.java new file mode 100644 index 0000000..62e8bb4 --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/mapper/DeviceFaultMapper.java @@ -0,0 +1,17 @@ +package com.productionboard.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.productionboard.entity.MesProduction.DeviceFault; +import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** + * MES物料库存统计 + * @author WenJY + * @date 2022年06月09日 17:14 + */ +@Mapper +@Repository +public interface DeviceFaultMapper extends BaseMapper{ +} diff --git a/productionboard/src/main/java/com/productionboard/mapper/PlanInfoMapper.java b/productionboard/src/main/java/com/productionboard/mapper/PlanInfoMapper.java new file mode 100644 index 0000000..61d5515 --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/mapper/PlanInfoMapper.java @@ -0,0 +1,17 @@ +package com.productionboard.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.productionboard.entity.MesProduction.DeviceFault; +import com.productionboard.entity.MesProduction.PlanInfo; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** + * MES物料库存统计 + * @author WenJY + * @date 2022年06月09日 17:14 + */ +@Mapper +@Repository +public interface PlanInfoMapper extends BaseMapper{ +} diff --git a/productionboard/src/main/java/com/productionboard/service/IMesProductionDataService.java b/productionboard/src/main/java/com/productionboard/service/IMesProductionDataService.java index cec6210..b856ed6 100644 --- a/productionboard/src/main/java/com/productionboard/service/IMesProductionDataService.java +++ b/productionboard/src/main/java/com/productionboard/service/IMesProductionDataService.java @@ -1,9 +1,6 @@ package com.productionboard.service; -import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; -import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; -import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; -import com.productionboard.entity.MesProduction.MesTeamStatistics; +import com.productionboard.entity.MesProduction.*; import com.productionboard.mapper.MesHourProdutionStatisticsMapper; import java.util.List; @@ -50,4 +47,8 @@ public interface IMesProductionDataService { * @return java.util.List */ List getMesMaterialStoreStatisticsList(String locationNumber); + + List selectDeviceFaultByType(String type); + + List getProductionPlan(); } diff --git a/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java b/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java index f8d1c32..b487858 100644 --- a/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java +++ b/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java @@ -1,14 +1,8 @@ package com.productionboard.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; -import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; -import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; -import com.productionboard.entity.MesProduction.MesTeamStatistics; -import com.productionboard.mapper.MesHourProdutionStatisticsMapper; -import com.productionboard.mapper.MesMaterialProductionStatisticsMapper; -import com.productionboard.mapper.MesMaterialStoreStatisticsMapper; -import com.productionboard.mapper.MesTeamStatisticsMapper; +import com.productionboard.entity.MesProduction.*; +import com.productionboard.mapper.*; import com.productionboard.service.IMesProductionDataService; import org.apache.ibatis.annotations.Select; import org.springframework.beans.factory.annotation.Autowired; @@ -34,6 +28,10 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { @Autowired private MesMaterialStoreStatisticsMapper materialStoreStatisticsMapper; + @Autowired + private DeviceFaultMapper deviceFaultMapper; + @Autowired + private PlanInfoMapper planInfoMapper; /** * 通过工位号获取工位信息 * @author WenJY @@ -60,7 +58,7 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { @Select("") public List getMesHourProdutionStatisticsList(String locationNumber) { QueryWrapper wrapper = new QueryWrapper(); -// wrapper.eq("POSIONID",locationNumber); + wrapper.eq("POSIONID",locationNumber); List mesHourProdutionStatistics = hourProdutionStatisticsMapper.selectList(wrapper); return mesHourProdutionStatistics; } @@ -90,8 +88,21 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { @Override public List getMesMaterialStoreStatisticsList(String locationNumber) { QueryWrapper wrapper = new QueryWrapper<>(); -// wrapper.eq("POSIONID",locationNumber); + wrapper.eq("POSIONID",locationNumber); List mesMaterialStoreStatistics = materialStoreStatisticsMapper.selectList(wrapper); return mesMaterialStoreStatistics; } + + @Override + public List selectDeviceFaultByType(String type) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("TYPE",type); + return deviceFaultMapper.selectList(wrapper); + } + + @Override + public List getProductionPlan() { + QueryWrapper wrapper = new QueryWrapper<>(); + return planInfoMapper.selectList(wrapper); + } } diff --git a/productionboard/src/main/resources/static/js/aluminumLiner/index.js b/productionboard/src/main/resources/static/js/aluminumLiner/index.js index 4e6b8d5..ba73f92 100644 --- a/productionboard/src/main/resources/static/js/aluminumLiner/index.js +++ b/productionboard/src/main/resources/static/js/aluminumLiner/index.js @@ -27,19 +27,20 @@ $(() => { }); //库存情况 - $.getJSON('/tankShell/getInventoryStatistics', function (result) { + $.getJSON('/aluminumLiner/getInventoryStatistics', function (result) { inventory(result, document.getElementById("inventory")); }); //生产计划 $.ajax({ - url: '/storage/getProductionPlan', - type: 'GET', + url: '/aluminumLiner/getProductionPlan', + type: 'get', dataType: 'JSON', success: function (res) { let Res = res - Res.data.forEach(val => { + console.log("生产计划"+res) + res.data.forEach(val => { val[0] = 'sc-228NE' val[1] = '431' val[2] = '0' @@ -71,7 +72,8 @@ $(() => { //设备故障排名 - $.getJSON('/tankShell/getStatisticalOutputByModel', function (result) { + $.getJSON('/aluminumLiner/getStatisticalOutputByModel', function (result) { + equipmentFailure(result, document.getElementById("equipmentFailure")); }); diff --git a/productionboard/src/main/resources/static/js/common/echarts.common.js b/productionboard/src/main/resources/static/js/common/echarts.common.js index ed22707..9113034 100644 --- a/productionboard/src/main/resources/static/js/common/echarts.common.js +++ b/productionboard/src/main/resources/static/js/common/echarts.common.js @@ -1702,45 +1702,20 @@ const OEEStatistics = (res, ids) => { const inventory = (res, ids) => { let mycharts = echarts.init(ids); - let xAxisData = []; - let seriesData1 = []; + let sum = 0; let barTopColor = ["#02c3f1"]; let barBottomColor = [ "rgba(2,195,241,0.1)", ]; - let Res = - { - datas: [ - { - name: 'SC-279', - value: 2 - }, - { - name: 'SC-606', - value: 6 - }, - { - name: 'SC-387NE', - value: 31 - }, - { - name: 'SC-329', - value: 2 - }, - { - name: 'SC-279', - value: 9 - }, - ] - } - - Res.datas.forEach((item) => { - xAxisData.push(item.name); - seriesData1.push(item.value); - sum += item.value; - }); + const xAxisData = res.map(val => val.materialName) + const seriesData1 = res.map(val => val.lineStoreAmount) + // Res.forEach((item) => { + // xAxisData.push(item.name); + // seriesData1.push(item.value); + // sum += item.value; + // }); let option = { grid: { @@ -2157,12 +2132,12 @@ const loss = (res, ids) => { //设备故障排名 const equipmentFailure = (res, ids) => { let mycharts = echarts.init(ids); - - + // console.log("设备故障排名1"+res) let stationData = []; let values = []; - res.datas.forEach(function (it, index) { + res.forEach(function (it, index) { + stationData.push(it.station); values.push(it.value); }); diff --git a/productionboard/target/classes/com/productionboard/controller/AdsorptionTankController.class b/productionboard/target/classes/com/productionboard/controller/AdsorptionTankController.class index f0dd4fd..1ead10a 100644 Binary files a/productionboard/target/classes/com/productionboard/controller/AdsorptionTankController.class and b/productionboard/target/classes/com/productionboard/controller/AdsorptionTankController.class differ diff --git a/productionboard/target/classes/com/productionboard/controller/AluminumLinerkController.class b/productionboard/target/classes/com/productionboard/controller/AluminumLinerkController.class index 150759e..1c7ab65 100644 Binary files a/productionboard/target/classes/com/productionboard/controller/AluminumLinerkController.class and b/productionboard/target/classes/com/productionboard/controller/AluminumLinerkController.class differ diff --git a/productionboard/target/classes/com/productionboard/controller/AluminumTtankController.class b/productionboard/target/classes/com/productionboard/controller/AluminumTtankController.class index 85f4c74..18b4c8f 100644 Binary files a/productionboard/target/classes/com/productionboard/controller/AluminumTtankController.class and b/productionboard/target/classes/com/productionboard/controller/AluminumTtankController.class differ diff --git a/productionboard/target/classes/com/productionboard/controller/PreassembleController.class b/productionboard/target/classes/com/productionboard/controller/PreassembleController.class index cd4196e..925cfd8 100644 Binary files a/productionboard/target/classes/com/productionboard/controller/PreassembleController.class and b/productionboard/target/classes/com/productionboard/controller/PreassembleController.class differ diff --git a/productionboard/target/classes/com/productionboard/controller/TankShellController.class b/productionboard/target/classes/com/productionboard/controller/TankShellController.class index b237e27..13c2d4a 100644 Binary files a/productionboard/target/classes/com/productionboard/controller/TankShellController.class and b/productionboard/target/classes/com/productionboard/controller/TankShellController.class differ diff --git a/productionboard/target/classes/com/productionboard/service/IMesProductionDataService.class b/productionboard/target/classes/com/productionboard/service/IMesProductionDataService.class index 200ce87..3b792d2 100644 Binary files a/productionboard/target/classes/com/productionboard/service/IMesProductionDataService.class and b/productionboard/target/classes/com/productionboard/service/IMesProductionDataService.class differ diff --git a/productionboard/target/classes/com/productionboard/service/impl/MesProductionDataServiceImpl.class b/productionboard/target/classes/com/productionboard/service/impl/MesProductionDataServiceImpl.class index cc4afc2..96926f3 100644 Binary files a/productionboard/target/classes/com/productionboard/service/impl/MesProductionDataServiceImpl.class and b/productionboard/target/classes/com/productionboard/service/impl/MesProductionDataServiceImpl.class differ diff --git a/productionboard/target/classes/static/js/aluminumLiner/index.js b/productionboard/target/classes/static/js/aluminumLiner/index.js index 4e6b8d5..9ae6442 100644 --- a/productionboard/target/classes/static/js/aluminumLiner/index.js +++ b/productionboard/target/classes/static/js/aluminumLiner/index.js @@ -27,18 +27,19 @@ $(() => { }); //库存情况 - $.getJSON('/tankShell/getInventoryStatistics', function (result) { + $.getJSON('/aluminumLiner/getInventoryStatistics', function (result) { inventory(result, document.getElementById("inventory")); }); //生产计划 $.ajax({ - url: '/storage/getProductionPlan', - type: 'GET', + url: '/aluminumLiner/getProductionPlan', + type: 'get', dataType: 'JSON', success: function (res) { let Res = res + console.log("生产计划"+res) Res.data.forEach(val => { val[0] = 'sc-228NE' val[1] = '431' @@ -71,7 +72,8 @@ $(() => { //设备故障排名 - $.getJSON('/tankShell/getStatisticalOutputByModel', function (result) { + $.getJSON('/aluminumLiner/getStatisticalOutputByModel', function (result) { + equipmentFailure(result, document.getElementById("equipmentFailure")); }); diff --git a/productionboard/target/classes/static/js/common/echarts.common.js b/productionboard/target/classes/static/js/common/echarts.common.js index ed22707..9113034 100644 --- a/productionboard/target/classes/static/js/common/echarts.common.js +++ b/productionboard/target/classes/static/js/common/echarts.common.js @@ -1702,45 +1702,20 @@ const OEEStatistics = (res, ids) => { const inventory = (res, ids) => { let mycharts = echarts.init(ids); - let xAxisData = []; - let seriesData1 = []; + let sum = 0; let barTopColor = ["#02c3f1"]; let barBottomColor = [ "rgba(2,195,241,0.1)", ]; - let Res = - { - datas: [ - { - name: 'SC-279', - value: 2 - }, - { - name: 'SC-606', - value: 6 - }, - { - name: 'SC-387NE', - value: 31 - }, - { - name: 'SC-329', - value: 2 - }, - { - name: 'SC-279', - value: 9 - }, - ] - } - - Res.datas.forEach((item) => { - xAxisData.push(item.name); - seriesData1.push(item.value); - sum += item.value; - }); + const xAxisData = res.map(val => val.materialName) + const seriesData1 = res.map(val => val.lineStoreAmount) + // Res.forEach((item) => { + // xAxisData.push(item.name); + // seriesData1.push(item.value); + // sum += item.value; + // }); let option = { grid: { @@ -2157,12 +2132,12 @@ const loss = (res, ids) => { //设备故障排名 const equipmentFailure = (res, ids) => { let mycharts = echarts.init(ids); - - + // console.log("设备故障排名1"+res) let stationData = []; let values = []; - res.datas.forEach(function (it, index) { + res.forEach(function (it, index) { + stationData.push(it.station); values.push(it.value); });