diff --git a/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java b/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java index cbcf824..fa5661c 100644 --- a/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java +++ b/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java @@ -131,7 +131,7 @@ public class AluminumLinerkController { @GetMapping("/getStatisticalOutputByModel") @ResponseBody public String getStatisticalOutputByModel() { - List list=iMesProductionDataService.selectDeviceFaultByType("1#内胆吸附机"); + List list=iMesProductionDataService.selectDeviceFaultByType("1005"); return JSONArray.toJSONString(list); } diff --git a/productionboard/src/main/java/com/productionboard/controller/PreassembleController.java b/productionboard/src/main/java/com/productionboard/controller/PreassembleController.java index 7f9506b..878cb92 100644 --- a/productionboard/src/main/java/com/productionboard/controller/PreassembleController.java +++ b/productionboard/src/main/java/com/productionboard/controller/PreassembleController.java @@ -50,7 +50,7 @@ public class PreassembleController { mesTeamStatistics.setClassName("白班"); int planAmount = Integer.parseInt(mesTeamStatistics.getPlanAmount() == null ? "0" : mesTeamStatistics.getPlanAmount()); int actualAmount= Integer.parseInt(mesTeamStatistics.getActualAmount() == null ? "0" : mesTeamStatistics.getActualAmount()); - mesTeamStatistics.setDifferenceAmount((planAmount - actualAmount)+""); + mesTeamStatistics.setDifferenceAmount(Math.abs(planAmount - actualAmount)+""); return JSONArray.toJSONString(mesTeamStatistics); } return JSONArray.toJSONString(new MesTeamStatistics()); diff --git a/productionboard/src/main/java/com/productionboard/controller/TankShellController.java b/productionboard/src/main/java/com/productionboard/controller/TankShellController.java index d653b32..3d9ea0c 100644 --- a/productionboard/src/main/java/com/productionboard/controller/TankShellController.java +++ b/productionboard/src/main/java/com/productionboard/controller/TankShellController.java @@ -32,7 +32,15 @@ public class TankShellController { public String index() { return prefix; } - +/** + * 工位号9.30前记录为 + * 1001 吸附内胆生产 + * 1003 铝内胆生产 + * 1004 吸附内胆预装北 + * 1005 铝内胆预装 + * Proce_Code =1029 发泡前出库南线 + * Proce_Code =1012 发泡前出库北线 + */ /** * 班组统计 * @author WenJY @@ -90,9 +98,9 @@ public class TankShellController { @GetMapping("/getMaterialStoreJson") @ResponseBody public String getMesMaterialStoreStatisticsJson(){ - List list=new ArrayList(2); - list.add("L001"); - list.add("U001"); +// List list=new ArrayList(2); +// list.add("L001"); +// list.add("U001"); // List mesMaterialStoreStatisticsList= iMesProductionDataService.getMesMaterialStoreStatisticsListByList(list); List mesMaterialStoreStatisticsList= iMesProductionDataService.getMesMaterialStoreStatisticsList("1009"); return JSONArray.toJSONString(mesMaterialStoreStatisticsList); diff --git a/productionboard/src/main/java/com/productionboard/entity/MesProduction/DeviceFault.java b/productionboard/src/main/java/com/productionboard/entity/MesProduction/DeviceFault.java index fdbcaa2..809b9b3 100644 --- a/productionboard/src/main/java/com/productionboard/entity/MesProduction/DeviceFault.java +++ b/productionboard/src/main/java/com/productionboard/entity/MesProduction/DeviceFault.java @@ -28,8 +28,9 @@ public class DeviceFault implements Serializable { private String value; /** 类型 */ - @TableField("TYPE") + @TableField("NAME") private String hullStoreAmount; + private String name; } diff --git a/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java index 1ef86d8..461c242 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java @@ -1,6 +1,7 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.productionboard.entity.MesProduction.DeviceFault; import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; import com.productionboard.entity.MesProduction.MesTeamStatistics; import org.apache.ibatis.annotations.Mapper; @@ -67,5 +68,8 @@ public interface MesMaterialStoreStatisticsMapper extends BaseMapper getAdsorptionTankStoreStatistics4(@Param("in_id") Integer in_id); + @Select("select * from table ( scada_adsorb_fault(#{in_id}) )") + List selectDeviceFaultByType1005(int in_id); } 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 9286e42..81e6b97 100644 --- a/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java +++ b/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java @@ -180,7 +180,10 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics6(this.in_id); break; case "1009": - mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics9(this.in_id); +// mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics9(this.in_id); + +//wh 跟铝内胆生产数据监控 看板查一样的两个仓库 + mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics6(this.in_id); break; case "1010": mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics10(this.in_id); @@ -202,9 +205,7 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { @Override public List selectDeviceFaultByType(String type) { - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq("TYPE",type); - return deviceFaultMapper.selectScadaAdsorbFault(this.in_id); + return materialStoreStatisticsMapper.selectDeviceFaultByType1005(this.in_id); } @Override 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 34fd12f..7c75747 100644 --- a/productionboard/src/main/resources/static/js/common/echarts.common.js +++ b/productionboard/src/main/resources/static/js/common/echarts.common.js @@ -2151,7 +2151,7 @@ const equipmentFailure = (res, ids) => { res.forEach(function (it, index) { - stationData.push(it.station); + stationData.push(it.name); values.push(it.value); }); let option = { diff --git a/productionboard/src/main/resources/static/js/foamBox/index.js b/productionboard/src/main/resources/static/js/foamBox/index.js index 534791c..a920f1b 100644 --- a/productionboard/src/main/resources/static/js/foamBox/index.js +++ b/productionboard/src/main/resources/static/js/foamBox/index.js @@ -2,7 +2,7 @@ $(() => { //班组计划统计 $.getJSON(`/foamBox/getTeamStatisticsJson?ids=${ids}`, function (result) { - onDutyPlan(result.planAmount, result.actualAmount, result.differenceAmount,) + onDutyPlan(result.planAmount, result.actualAmount, result.planAmount- result.actualAmount) }); //设备运行状态 diff --git a/productionboard/src/main/resources/static/js/tankShell/index.js b/productionboard/src/main/resources/static/js/tankShell/index.js index 7ba7fed..f8b2819 100644 --- a/productionboard/src/main/resources/static/js/tankShell/index.js +++ b/productionboard/src/main/resources/static/js/tankShell/index.js @@ -2,7 +2,7 @@ $(()=>{ //班组统计 // onDutyPlan(1234,1202,33); $.getJSON('/tankShell/getTeamStatisticsJson', function (result) { - storageStatistics(result.className, result.planAmount, result.actualAmount, result.differenceAmount,) + storageStatistics('白班', result.planAmount, result.actualAmount, result.differenceAmount,) }); //按型号统计产量 diff --git a/productionboard/target/classes/com/productionboard/controller/AluminumLinerkController.class b/productionboard/target/classes/com/productionboard/controller/AluminumLinerkController.class index 93b5e6a..b45c2b6 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 a33f608..cca5a2f 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 bbb34d6..848fb81 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 6d71eee..51f8340 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/entity/MesProduction/MesTeamStatistics.class b/productionboard/target/classes/com/productionboard/entity/MesProduction/MesTeamStatistics.class index e18d73f..ef8ad20 100644 Binary files a/productionboard/target/classes/com/productionboard/entity/MesProduction/MesTeamStatistics.class and b/productionboard/target/classes/com/productionboard/entity/MesProduction/MesTeamStatistics.class differ diff --git a/productionboard/target/classes/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.class b/productionboard/target/classes/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.class index d2fe201..05b2994 100644 Binary files a/productionboard/target/classes/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.class and b/productionboard/target/classes/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.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 7cfc6c1..d1c8388 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/common/echarts.common.js b/productionboard/target/classes/static/js/common/echarts.common.js index 80ab7ca..2a6bcd1 100644 --- a/productionboard/target/classes/static/js/common/echarts.common.js +++ b/productionboard/target/classes/static/js/common/echarts.common.js @@ -365,7 +365,7 @@ const threeDimensionalCylindrical = (res, ids) => { axisLabel: { show: true, margin: 25, - align: "center", + // align: "center", textStyle: { fontSize: 14, color: "#A8A6AB", @@ -382,7 +382,7 @@ const threeDimensionalCylindrical = (res, ids) => { }, }, }, - interval: 0, + interval: 3, }, yAxis: { splitLine: { @@ -1169,9 +1169,22 @@ const bluePolygonHistogram = (res, ids) => { //多个立体柱状图 const multipleThreeDimensionalCylindrical = (res, ids) => { let mycharts = echarts.init(ids); - const xValue = res.map(val => val.materialName?.split(',')[0] || ' ') - const lineStoreAmount = res.map(val => val.lineStoreAmount) || [] - const hullStoreAmount = res.map(val => val.hullStoreAmount || '0') + const value = [] + res.forEach(e=>{ + if(!(value.includes(e.materialName))){ + value.push(e.materialName) + } + }) + const data = value.map(e => { + return { + materialName:e, + lineStoreAmount:res.filter( val => val.materialName === e).filter(val => val.hullStoreAmount === 'L001')?.[0]?.lineStoreAmount || 0, + hullStoreAmount:res.filter( val => val.materialName === e).filter(val => val.hullStoreAmount === 'U001')?.[0]?.lineStoreAmount || 0 + } + }) + const xValue = data.map(val => val.materialName) + const lineStoreAmount = data.map(val => val.lineStoreAmount) + const hullStoreAmount = data.map(val => val.hullStoreAmount) let lineColor = "#406A92"; let labelColor = "#fff"; let fontSize = "12"; @@ -2138,7 +2151,7 @@ const equipmentFailure = (res, ids) => { res.forEach(function (it, index) { - stationData.push(it.station); + stationData.push(it.name); values.push(it.value); }); let option = { diff --git a/productionboard/target/classes/static/js/foamBox/index.js b/productionboard/target/classes/static/js/foamBox/index.js index 534791c..a920f1b 100644 --- a/productionboard/target/classes/static/js/foamBox/index.js +++ b/productionboard/target/classes/static/js/foamBox/index.js @@ -2,7 +2,7 @@ $(() => { //班组计划统计 $.getJSON(`/foamBox/getTeamStatisticsJson?ids=${ids}`, function (result) { - onDutyPlan(result.planAmount, result.actualAmount, result.differenceAmount,) + onDutyPlan(result.planAmount, result.actualAmount, result.planAmount- result.actualAmount) }); //设备运行状态 diff --git a/productionboard/target/classes/static/js/tankShell/index.js b/productionboard/target/classes/static/js/tankShell/index.js index 7ba7fed..f8b2819 100644 --- a/productionboard/target/classes/static/js/tankShell/index.js +++ b/productionboard/target/classes/static/js/tankShell/index.js @@ -2,7 +2,7 @@ $(()=>{ //班组统计 // onDutyPlan(1234,1202,33); $.getJSON('/tankShell/getTeamStatisticsJson', function (result) { - storageStatistics(result.className, result.planAmount, result.actualAmount, result.differenceAmount,) + storageStatistics('白班', result.planAmount, result.actualAmount, result.differenceAmount,) }); //按型号统计产量