diff --git a/productionboard/src/main/java/com/productionboard/entity/MesProduction/PlanInfo.java b/productionboard/src/main/java/com/productionboard/entity/MesProduction/PlanInfo.java index 861d1e9..b838c04 100644 --- a/productionboard/src/main/java/com/productionboard/entity/MesProduction/PlanInfo.java +++ b/productionboard/src/main/java/com/productionboard/entity/MesProduction/PlanInfo.java @@ -23,17 +23,18 @@ 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/PlanInfoMapper.java b/productionboard/src/main/java/com/productionboard/mapper/PlanInfoMapper.java index 61d5515..cf29ae3 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/PlanInfoMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/PlanInfoMapper.java @@ -2,10 +2,15 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.MesProduction.DeviceFault; +import com.productionboard.entity.MesProduction.MesTeamStatistics; import com.productionboard.entity.MesProduction.PlanInfo; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; +import java.util.List; + /** * MES物料库存统计 * @author WenJY @@ -14,4 +19,15 @@ import org.springframework.stereotype.Repository; @Mapper @Repository public interface PlanInfoMapper extends BaseMapper{ + + /** + * 铝内胆成型线生产计划 + * @author WenJY + * @date 2022-10-01 17:27 + * @param in_id + * @return java.util.List + */ + @Select("select * from table ( scada_mesPlan_aluminumLiner(#{in_id}) )") + List getAluminumLinerMesPlan(@Param("in_id") Integer 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 4dc9957..9de704d 100644 --- a/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java +++ b/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java @@ -168,6 +168,18 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { @Override public List getProductionPlan() { QueryWrapper wrapper = new QueryWrapper<>(); - return planInfoMapper.selectList(wrapper); + List aluminumLinerMesPlan = planInfoMapper.getAluminumLinerMesPlan(this.in_id); + for (PlanInfo planInfo :aluminumLinerMesPlan){ + planInfo.setOq(planInfo.getOq() == null ? "0" : planInfo.getOq()); + planInfo.setAq(planInfo.getAq() == null ? "0" : planInfo.getAq()); + + int oq = Integer.parseInt(planInfo.getOq()); + int aq = Integer.parseInt(planInfo.getAq()); + + planInfo.setCha((oq -aq)+""); + //map.put("17",String.format("%.1f%%", ((double)actualQtuitem / (double)planQtyItem * 100))); + planInfo.setRound(String.format("%.1f%%", ((double)aq / (double)oq * 100))); + } + return aluminumLinerMesPlan; } } diff --git a/productionboard/src/main/resources/static/js/aluminumLiner/index.js b/productionboard/src/main/resources/static/js/aluminumLiner/index.js index 824287d..4618190 100644 --- a/productionboard/src/main/resources/static/js/aluminumLiner/index.js +++ b/productionboard/src/main/resources/static/js/aluminumLiner/index.js @@ -42,7 +42,7 @@ $(() => { console.log(res) Res.data=res.map(val => { - return [val.spe,val.aq,val.oq,val.cha,val.round,] + return [val.spe,val.oq,val.aq,val.cha,val.round,] }) Res.header = ['型号', '计划数', '完成数', '差异数', '执行进度'] console.log(Res) diff --git a/productionboard/target/classes/com/productionboard/controller/AluminumTtankController.class b/productionboard/target/classes/com/productionboard/controller/AluminumTtankController.class index 9d21166..1e94fcd 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/TankShellController.class b/productionboard/target/classes/com/productionboard/controller/TankShellController.class index a681720..a64f12f 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/mapper/MesHourProdutionStatisticsMapper.class b/productionboard/target/classes/com/productionboard/mapper/MesHourProdutionStatisticsMapper.class index a9b4124..2f68b62 100644 Binary files a/productionboard/target/classes/com/productionboard/mapper/MesHourProdutionStatisticsMapper.class and b/productionboard/target/classes/com/productionboard/mapper/MesHourProdutionStatisticsMapper.class differ diff --git a/productionboard/target/classes/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.class b/productionboard/target/classes/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.class index 88930f7..a6823e1 100644 Binary files a/productionboard/target/classes/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.class and b/productionboard/target/classes/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.class differ diff --git a/productionboard/target/classes/com/productionboard/mapper/MesTeamStatisticsMapper.class b/productionboard/target/classes/com/productionboard/mapper/MesTeamStatisticsMapper.class index 7f585d8..1262924 100644 Binary files a/productionboard/target/classes/com/productionboard/mapper/MesTeamStatisticsMapper.class and b/productionboard/target/classes/com/productionboard/mapper/MesTeamStatisticsMapper.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 720e5da..693b5f6 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