diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCenterOneService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCenterOneService.java index c725d5d..804f9e7 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCenterOneService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCenterOneService.java @@ -49,7 +49,7 @@ public class JxCenterWorkingBoardCenterOneService implements IJxCenterWorkingBoa @Override public Map queryCenterWorkingBoardData(Map dataMap) { - dataMap = proxyService0.queryCenterWorkingBoardData(dataMap); + proxyService0.queryCenterWorkingBoardData(dataMap); MesWorkCenterExt workCenterExtDb = (MesWorkCenterExt) dataMap.get(MesWorkCenterExt.class.getSimpleName()); @@ -57,7 +57,7 @@ public class JxCenterWorkingBoardCenterOneService implements IJxCenterWorkingBoa packProxyCondition(dataMap, workCenterExtDb, curTime); - dataMap = proxyService.queryCenterWorkingBoardData(dataMap); + proxyService.queryCenterWorkingBoardData(dataMap); List shiftProdCenterRecordList = (List) dataMap.get(MesShiftProdCenterRecord.class.getSimpleName()); diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCenterThreeService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCenterThreeService.java index 7545676..025bbbb 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCenterThreeService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCenterThreeService.java @@ -71,15 +71,15 @@ public class JxCenterWorkingBoardCenterThreeService extends JxCenterWorkingBoard @Override public Map queryCenterWorkingBoardData(Map dataMap) { - dataMap = proxyService0.queryCenterWorkingBoardData(dataMap); + proxyService0.queryCenterWorkingBoardData(dataMap); - dataMap = proxyService1.queryCenterWorkingBoardData(dataMap); + proxyService1.queryCenterWorkingBoardData(dataMap); MesWorkCenterExt workCenterExtDb = (MesWorkCenterExt) dataMap.get(MesWorkCenterExt.class.getSimpleName()); packProxyCondition(dataMap, workCenterExtDb); - dataMap = proxyService.queryCenterWorkingBoardData(dataMap); + proxyService.queryCenterWorkingBoardData(dataMap); List workOrderList = (List) dataMap.get(MesWorkOrder.class.getSimpleName()); @@ -111,6 +111,7 @@ public class JxCenterWorkingBoardCenterThreeService extends JxCenterWorkingBoard dataMap.remove(MesWorkCenterExt.class.getSimpleName()); dataMap.remove(MesWorkOrder.class.getSimpleName()); dataMap.remove(MesOutPutStatistics.class.getSimpleName()); + dataMap.remove(MesOutPutStatisticsTimeSegment.class.getSimpleName()); dataMap.remove(MesExtConstWords.COMPLET_QTY); dataMap.remove(MesExtConstWords.START_TIME); dataMap.remove(MesExtConstWords.END_TIME); diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCenterTwoService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCenterTwoService.java index 8823414..1dcb29c 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCenterTwoService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCenterTwoService.java @@ -51,15 +51,15 @@ public class JxCenterWorkingBoardCenterTwoService extends JxCenterWorkingBoardCo @Override public Map queryCenterWorkingBoardData(Map dataMap) { - dataMap = proxyService0.queryCenterWorkingBoardData(dataMap); + proxyService0.queryCenterWorkingBoardData(dataMap); - dataMap = proxyService1.queryCenterWorkingBoardData(dataMap); + proxyService1.queryCenterWorkingBoardData(dataMap); MesWorkCenterExt workCenterExtDb = (MesWorkCenterExt) dataMap.get(MesWorkCenterExt.class.getSimpleName()); packProxyCondition(dataMap, workCenterExtDb); - dataMap = proxyService.queryCenterWorkingBoardData(dataMap); + proxyService.queryCenterWorkingBoardData(dataMap); List workOrderList = (List) dataMap.get(MesWorkOrder.class.getSimpleName()); @@ -73,7 +73,7 @@ public class JxCenterWorkingBoardCenterTwoService extends JxCenterWorkingBoardCo dataMap.put("点检作业", getOrderJobStatistics(workCenterExtDb)); - dataMap.put("当日计划台数", getTodayOrderPlanQty(workOrderList, workCenterExtDb, dataMap)); + dataMap.put("当日计划台数", getTodayOrderPlanQty(workOrderList, workCenterExtDb.getWorkTime(), dataMap)); dataMap.put("当日实绩台数", getWorkTimeQty(outPutStatisticsList, dataMap)); @@ -99,6 +99,7 @@ public class JxCenterWorkingBoardCenterTwoService extends JxCenterWorkingBoardCo dataMap.remove(MesWorkCenterExt.class.getSimpleName()); dataMap.remove(MesShiftProdCenterRecord.class.getSimpleName()); dataMap.remove(MesWorkOrder.class.getSimpleName()); + dataMap.remove(MesRepairTask.class.getSimpleName()); dataMap.remove(MesOutPutStatistics.class.getSimpleName()); dataMap.remove(MesExtConstWords.QTY); dataMap.remove(MesExtConstWords.COMPLET_QTY); @@ -154,8 +155,8 @@ public class JxCenterWorkingBoardCenterTwoService extends JxCenterWorkingBoardCo return new StringJoiner(MesExtConstWords.SINGLE_SLASH).add(getListSizeStr(orderJobList4Complete)).add(getListSizeStr(orderJobList)).toString(); } - private String getTodayOrderPlanQty(List workOrderList, MesWorkCenterExt workCenterExtDb, Map dataMap) { - Double qty = CollectionUtils.isEmpty(workOrderList) ? new Double(0) : workOrderList.stream().filter(o -> (null != o && o.getStartTime().contains(workCenterExtDb.getWorkTime()))).mapToDouble(MesWorkOrder::getQty).sum(); + private String getTodayOrderPlanQty(List workOrderList, String workTime, Map dataMap) { + Double qty = statisticsOrderPlanQty(workOrderList, workTime); dataMap.put(MesExtConstWords.QTY, qty); return getQtyStr(qty); } diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCommonService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCommonService.java index 2a87cda..58bb249 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCommonService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardCommonService.java @@ -2,9 +2,11 @@ package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.busi.jx; import cn.estsh.i3plus.ext.mes.api.busi.jx.IJxCenterWorkingBoardService; import cn.estsh.i3plus.ext.mes.pojo.bean.MesOutPutStatistics; +import cn.estsh.i3plus.ext.mes.pojo.bean.MesShiftProdCenterRecord; import cn.estsh.i3plus.ext.mes.pojo.bean.MesWorkCenterExt; import cn.estsh.i3plus.ext.mes.pojo.util.MesExtConstWords; import cn.estsh.i3plus.platform.common.tool.MathOperation; +import cn.estsh.i3plus.platform.common.tool.TimeTool; import cn.estsh.i3plus.pojo.mes.bean.MesWorkOrder; import cn.estsh.impp.framework.boot.util.SpringContextsUtil; import lombok.extern.slf4j.Slf4j; @@ -12,6 +14,7 @@ import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import java.math.BigDecimal; +import java.text.ParseException; import java.util.Comparator; import java.util.List; import java.util.Map; @@ -63,6 +66,19 @@ public class JxCenterWorkingBoardCommonService implements IJxCenterWorkingBoardS return CollectionUtils.isEmpty(outPutStatisticsList) ? null : outPutStatisticsList.stream().filter(o -> null != o).sorted(Comparator.comparing(MesOutPutStatistics::getModifyDatetime).reversed()).collect(Collectors.toList()); } + public Double statisticsOrderPlanQty(List workOrderList, String workTime) { + return CollectionUtils.isEmpty(workOrderList) ? new Double(0) : workOrderList.stream().filter(o -> (null != o && o.getStartTime().contains(workTime))).mapToDouble(MesWorkOrder::getQty).sum(); + } + + public Double getStatisticsTime(MesShiftProdCenterRecord shiftProdCenterRecord, String curTime) { + try { + String endTime = shiftProdCenterRecord.getEndTime().compareTo(curTime) <= 0 ? shiftProdCenterRecord.getEndTime() : curTime; + return MathOperation.mul(new Double(TimeTool.getSecoundsBetweenTime(2, shiftProdCenterRecord.getStartTime(), endTime)), shiftProdCenterRecord.getWorkerQty()); + } catch (ParseException e) { + return new Double(0); + } + } + public String getQtyStr(Double qty) { return qty.intValue() + "台"; } public String getListSizeStr(List list) { return CollectionUtils.isEmpty(list) ? MesExtConstWords.ZERO_STR : String.valueOf(list.size()); } diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardDispatchService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardDispatchService.java index 13ce9d6..ec4c375 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardDispatchService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardDispatchService.java @@ -48,10 +48,16 @@ public class JxCenterWorkingBoardDispatchService implements IJxCenterWorkingBoar case "monitor01": return new JxCenterWorkingBoardWatchService(new JxCenterWorkingBoardMonitorOneService( - new JxCenterWorkingBoardProxyAllCenterService(), new JxCenterWorkingBoardProxyStandardWorkService(), new JxCenterWorkingBoardProxyWorkingStatusService(), new JxCenterWorkingBoardProxyEnergyRateService(), + new JxCenterWorkingBoardProxyAllCenterService(), new JxCenterWorkingBoardProxyStandardWorkService(), new JxCenterWorkingBoardProxyProductionScheduleService(), new JxCenterWorkingBoardProxyEnergyRateService(), new JxCenterWorkingBoardProxyWorkingStatusService(), new JxCenterWorkingBoardProxyOrderService(new JxCenterWorkingBoardProxyOutPutService(new JxCenterWorkingBoardProxyRepairService(new JxCenterWorkingBoardProxySpcrService()))) )).queryCenterWorkingBoardData(dataMap); + case "mobile01": + return new JxCenterWorkingBoardWatchService(new JxCenterWorkingBoardMobileOneService( + new JxCenterWorkingBoardProxyAllCenterService(), new JxCenterWorkingBoardProxyStandardWorkService(), new JxCenterWorkingBoardProxyProductionScheduleService(), new JxCenterWorkingBoardProxyEnergyRateService(), + new JxCenterWorkingBoardProxyOrderService(new JxCenterWorkingBoardProxyOutPutService(new JxCenterWorkingBoardProxySpcrService())) + )).queryCenterWorkingBoardData(dataMap); + default: return dataMap; } diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardMobileOneService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardMobileOneService.java new file mode 100644 index 0000000..b49cdfd --- /dev/null +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardMobileOneService.java @@ -0,0 +1,196 @@ +package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.busi.jx; + +import cn.estsh.i3plus.ext.mes.api.base.bu.IBusiConfigService; +import cn.estsh.i3plus.ext.mes.api.busi.jx.IJxCenterWorkingBoardService; +import cn.estsh.i3plus.ext.mes.pojo.bean.MesBusiConfig; +import cn.estsh.i3plus.ext.mes.pojo.bean.MesOutPutStatistics; +import cn.estsh.i3plus.ext.mes.pojo.bean.MesShiftProdCenterRecord; +import cn.estsh.i3plus.ext.mes.pojo.bean.MesWorkCenterExt; +import cn.estsh.i3plus.ext.mes.pojo.model.jx.JxCenterWorkingBoardBusiModel; +import cn.estsh.i3plus.ext.mes.pojo.util.MesExtConstWords; +import cn.estsh.i3plus.ext.mes.pojo.util.MesExtEnumUtil; +import cn.estsh.i3plus.platform.common.tool.MathOperation; +import cn.estsh.i3plus.platform.common.tool.TimeTool; +import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; +import cn.estsh.i3plus.pojo.mes.bean.MesWorkOrder; +import cn.estsh.impp.framework.boot.util.SpringContextsUtil; +import com.alibaba.fastjson.JSONObject; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author : wangjie + * @CreateDate : 2022-02-15 + * @Modify: + **/ +@Slf4j +public class JxCenterWorkingBoardMobileOneService extends JxCenterWorkingBoardCommonService implements IJxCenterWorkingBoardService { + + private IJxCenterWorkingBoardService proxyService0; + + private IJxCenterWorkingBoardService proxyService1; + + private IJxCenterWorkingBoardService proxyService2; + + private IJxCenterWorkingBoardService proxyService3; + + private IJxCenterWorkingBoardService proxyService; + + private IBusiConfigService busiConfigService; + + public JxCenterWorkingBoardMobileOneService(IJxCenterWorkingBoardService proxyService0, IJxCenterWorkingBoardService proxyService1, IJxCenterWorkingBoardService proxyService2, IJxCenterWorkingBoardService proxyService3, IJxCenterWorkingBoardService proxyService) { + this.proxyService0 = proxyService0; + this.proxyService1 = proxyService1; + this.proxyService2 = proxyService2; + this.proxyService3 = proxyService3; + this.proxyService = proxyService; + this.busiConfigService = (IBusiConfigService) SpringContextsUtil.getBean("busiConfigService"); + } + + @Override + public Map queryCenterWorkingBoardData(Map dataMap) { + + proxyService0.queryCenterWorkingBoardData(dataMap); + + proxyService1.queryCenterWorkingBoardData(dataMap); + + List workCenterExtDbList = (List) dataMap.get(MesWorkCenterExt.class.getSimpleName()); + + packProxyCondition(dataMap, workCenterExtDbList); + + proxyService.queryCenterWorkingBoardData(dataMap); + + proxyService2.queryCenterWorkingBoardData(dataMap); + + calcOntologyLineData(workCenterExtDbList, dataMap); + + return clearUselessData(dataMap); + } + + @Override + public Map clearUselessData(Map dataMap) { + dataMap.remove(MesWorkCenterExt.class.getSimpleName()); + dataMap.remove(MesWorkOrder.class.getSimpleName()); + dataMap.remove(MesOutPutStatistics.class.getSimpleName()); + dataMap.remove(MesShiftProdCenterRecord.class.getSimpleName()); + dataMap.remove(MesExtConstWords.START_TIME); + dataMap.remove(MesExtConstWords.END_TIME); + dataMap.remove(MesExtConstWords.WORK_TIME); + dataMap.remove(MesExtConstWords.WORK_CENTER_CODE); + dataMap.remove(MesExtConstWords.STANDARD_WORK); + dataMap.remove("serviceTime"); + dataMap.remove("standardTime"); + dataMap.remove("curTime"); + return dataMap; + } + + private void packProxyCondition(Map dataMap, List workCenterExtDbList) { + List workTimeList = workCenterExtDbList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getWorkTime()) && !StringUtils.isEmpty(o.getShiftCode()))).map(MesWorkCenterExt::getWorkTime).collect(Collectors.toList()); + if (CollectionUtils.isEmpty(workTimeList)) return; + Collections.sort(workTimeList); + dataMap.put(MesExtConstWords.START_TIME, workTimeList.get(0)); + dataMap.put(MesExtConstWords.END_TIME, workTimeList.get(workTimeList.size() - 1)); + dataMap.put("curTime", TimeTool.getNowTime(true)); + dataMap.put("onlyCalcRate", CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValueStr()); + } + + private List execConfigListSortSeq(String organizeCode) { + List busiConfigList = busiConfigService.getConfigListSortSeq(organizeCode, MesExtConstWords.BOARD_WORK_SHOW_FLAG); + if (!CollectionUtils.isEmpty(busiConfigList)) execCachedCenterWorkingBoardData(organizeCode, CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValueStr(), MesExtConstWords.BOARD_WORK_SHOW_FLAG, JSONObject.toJSONString(busiConfigList)); + return busiConfigList; + } + + private Map calcOntologyLineData(List workCenterExtDbList, Map dataMap) { + + String organizeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE); + String curTime = (String) dataMap.get("curTime"); + + JxCenterWorkingBoardBusiModel psData1 = new JxCenterWorkingBoardBusiModel().title("本体能率"); + JxCenterWorkingBoardBusiModel psData2 = new JxCenterWorkingBoardBusiModel().title("项目"); + + String busiConfigList4Cached = (String) execCachedCenterWorkingBoardData(organizeCode, MesExtConstWords.ZERO_STR, MesExtConstWords.BOARD_WORK_SHOW_FLAG, null); + List busiConfigList = !StringUtils.isEmpty(busiConfigList4Cached) ? JSONObject.parseArray(busiConfigList4Cached, MesBusiConfig.class) : execConfigListSortSeq(organizeCode); + if (CollectionUtils.isEmpty(busiConfigList)) return packOntologyLineData(dataMap, psData1, psData2); + + Map workCenterExtDbMap = workCenterExtDbList.stream().filter(o -> null != o).collect(Collectors.toMap(MesWorkCenterExt::getWorkCenterCode, o -> o)); + + Map> centerMap4OrderFilter = (Map>) dataMap.get(MesWorkOrder.class.getSimpleName()); + Map> centerMap4OutPutFilter = (Map>) dataMap.get(MesOutPutStatistics.class.getSimpleName()); + List shiftProdCenterRecordList = (List) dataMap.get(MesShiftProdCenterRecord.class.getSimpleName()); + + Double planQtyAmount = new Double(0); + Double qtyAmount = new Double(0); + + for (MesBusiConfig busiConfig : busiConfigList) { + if (null == busiConfig || !workCenterExtDbMap.containsKey(busiConfig.getCfgValue())) continue; + MesWorkCenterExt workCenterExtDb = workCenterExtDbMap.get(busiConfig.getCfgValue()); + if (StringUtils.isEmpty(workCenterExtDb.getLineType()) || !workCenterExtDb.getLineType().equals(MesExtEnumUtil.LINE_TYPE.ONTOLOGY_LINE.getValueStr())) continue; + dataMap.put(MesExtConstWords.WORK_TIME, workCenterExtDb.getWorkTime()); + dataMap.put(MesExtConstWords.WORK_CENTER_CODE, workCenterExtDb.getWorkCenterCode()); + + List workOrderList = CollectionUtils.isEmpty(centerMap4OrderFilter) ? null : centerMap4OrderFilter.get(workCenterExtDb.getWorkCenterCode()); + List outPutStatisticsListFilter = CollectionUtils.isEmpty(centerMap4OutPutFilter) ? null : centerMap4OutPutFilter.get(workCenterExtDb.getWorkCenterCode()); + dataMap.put(MesOutPutStatistics.class.getSimpleName(), outPutStatisticsListFilter); + + proxyService3.queryCenterWorkingBoardData(dataMap); + + Double planQty = statisticsOrderPlanQty(workOrderList, workCenterExtDb.getWorkTime()); + Double qty = getOutPutStatisticsList2AmountQty(outPutStatisticsListFilter); + + planQtyAmount = MathOperation.add(planQtyAmount, planQty); + qtyAmount = MathOperation.add(qtyAmount, qty); + + psData1.addChartData(workCenterExtDb.getWorkCenterCode(), planQty, qty, + getBigDecimalPercent(divThenMul100Format1RoundHalfUp((Double) dataMap.get("standardTime"), (Double) dataMap.get("serviceTime"))), + getBigDecimalPercent(divThenMul100Format1RoundHalfUp(qty, planQty))); + + psData2.addChartData(workCenterExtDb.getWorkCenterCode(), + getRealWorkQty(shiftProdCenterRecordList, workCenterExtDb), + getNonWorkingTime(shiftProdCenterRecordList, workCenterExtDb, curTime)); + + } + + psData1.obj(getStandardRateCfg(organizeCode)); + psData2.obj(new StringJoiner(MesExtConstWords.COMMA).add(String.valueOf(planQtyAmount.intValue())).add(String.valueOf(qtyAmount.intValue())).toString()); + + return packOntologyLineData(dataMap, psData1, psData2); + + } + + private String getStandardRateCfg(String organizeCode) { + String busiConfig4Cached = (String) execCachedCenterWorkingBoardData(organizeCode, MesExtConstWords.ZERO_STR, MesExtConstWords.SX_STANDARD_RATE_CFG, null); + MesBusiConfig busiConfig = !StringUtils.isEmpty(busiConfig4Cached) ? JSONObject.parseObject(busiConfig4Cached, MesBusiConfig.class) : execStandardRateCfg(organizeCode); + return null == busiConfig ? getBigDecimalPercent(format1RounHalfUp(new Double(0))) : busiConfig.getCfgValue(); + } + + private MesBusiConfig execStandardRateCfg(String organizeCode) { + MesBusiConfig busiConfig = busiConfigService.getBusiConfigByCfgCode(organizeCode, MesExtConstWords.SX_STANDARD_RATE_CFG); + if (null != busiConfig) execCachedCenterWorkingBoardData(organizeCode, CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValueStr(), MesExtConstWords.SX_STANDARD_RATE_CFG, JSONObject.toJSONString(busiConfig)); + return busiConfig; + } + + private Double getRealWorkQty(List shiftProdCenterRecordList, MesWorkCenterExt workCenterExtDb) { + Optional optional = CollectionUtils.isEmpty(shiftProdCenterRecordList) ? null : + shiftProdCenterRecordList.stream().filter(o -> (null != o && MesExtEnumUtil.SHIFT_PROD_TYPE.START_OR_END_SHIFT_TIME.getValue() == o.getProdType() && + o.getWorkCenterCode().equals(workCenterExtDb.getWorkCenterCode()) && o.getWorkTime().equals(workCenterExtDb.getWorkTime()) && o.getShiftCode().equals(workCenterExtDb.getWorkTime()))).findFirst(); + return (null == optional || !optional.isPresent()) ? new Double(0) : optional.get().getWorkerQty(); + } + + private Object getNonWorkingTime(List shiftProdCenterRecordList, MesWorkCenterExt workCenterExtDb, String curTime) { + List stopList = CollectionUtils.isEmpty(shiftProdCenterRecordList) ? null : + shiftProdCenterRecordList.stream().filter(o -> (null != o && MesExtEnumUtil.SHIFT_PROD_TYPE.UNNORMAL_STOP_CENTER.getValue() == o.getProdType() && + o.getWorkCenterCode().equals(workCenterExtDb.getWorkCenterCode()) && o.getWorkTime().equals(workCenterExtDb.getWorkTime()) && o.getShiftCode().equals(workCenterExtDb.getWorkTime()) && o.getStartTime().compareTo(curTime) <= 0)).collect(Collectors.toList()); + return CollectionUtils.isEmpty(stopList) ? new Double(0) : stopList.stream().filter(o -> null != o).mapToDouble(o -> getStatisticsTime(o, curTime)).sum(); + } + + private Map packOntologyLineData(Map dataMap, JxCenterWorkingBoardBusiModel psData1, JxCenterWorkingBoardBusiModel psData2) { + dataMap.put("本体能率", psData1); + dataMap.put("项目", psData2); + return dataMap; + } + +} diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardMonitorOneService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardMonitorOneService.java index 62e208e..27eb99a 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardMonitorOneService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardMonitorOneService.java @@ -43,6 +43,8 @@ public class JxCenterWorkingBoardMonitorOneService extends JxCenterWorkingBoardC private IJxCenterWorkingBoardService proxyService3; + private IJxCenterWorkingBoardService proxyService4; + private IJxCenterWorkingBoardService proxyService; private MesPlantInfoRepository plantInfoRepository; @@ -55,11 +57,12 @@ public class JxCenterWorkingBoardMonitorOneService extends JxCenterWorkingBoardC private MesOutPutStatisticsRepository outPutStatisticsRepository; - public JxCenterWorkingBoardMonitorOneService(IJxCenterWorkingBoardService proxyService0, IJxCenterWorkingBoardService proxyService1, IJxCenterWorkingBoardService proxyService2, IJxCenterWorkingBoardService proxyService3, IJxCenterWorkingBoardService proxyService) { + public JxCenterWorkingBoardMonitorOneService(IJxCenterWorkingBoardService proxyService0, IJxCenterWorkingBoardService proxyService1, IJxCenterWorkingBoardService proxyService2, IJxCenterWorkingBoardService proxyService3, IJxCenterWorkingBoardService proxyService4, IJxCenterWorkingBoardService proxyService) { this.proxyService0 = proxyService0; this.proxyService1 = proxyService1; this.proxyService2 = proxyService2; this.proxyService3 = proxyService3; + this.proxyService4 = proxyService4; this.proxyService = proxyService; this.plantInfoRepository = (MesPlantInfoRepository) SpringContextsUtil.getBean("mesPlantInfoRepository"); this.numberOfSafeOperationDaysService = (IMesNumberOfSafeOperationDaysService) SpringContextsUtil.getBean("mesNumberOfSafeOperationDaysService"); @@ -71,15 +74,15 @@ public class JxCenterWorkingBoardMonitorOneService extends JxCenterWorkingBoardC @Override public Map queryCenterWorkingBoardData(Map dataMap) { - dataMap = proxyService0.queryCenterWorkingBoardData(dataMap); + proxyService0.queryCenterWorkingBoardData(dataMap); - dataMap = proxyService1.queryCenterWorkingBoardData(dataMap); + proxyService1.queryCenterWorkingBoardData(dataMap); List workCenterExtDbList = (List) dataMap.get(MesWorkCenterExt.class.getSimpleName()); packProxyCondition(dataMap, workCenterExtDbList); - dataMap = proxyService.queryCenterWorkingBoardData(dataMap); + proxyService.queryCenterWorkingBoardData(dataMap); String organizeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE); @@ -93,7 +96,7 @@ public class JxCenterWorkingBoardMonitorOneService extends JxCenterWorkingBoardC dataMap.put("当年累计总事故数", getCurYearAmountAccident(organizeCode)); - dataMap.put("生产进度", getProductionSchedule(organizeCode, workCenterExtDbList, dataMap)); + proxyService2.queryCenterWorkingBoardData(dataMap); calcOntologyLineData(organizeCode, workCenterExtDbList, dataMap); @@ -105,6 +108,8 @@ public class JxCenterWorkingBoardMonitorOneService extends JxCenterWorkingBoardC dataMap.remove(MesWorkCenterExt.class.getSimpleName()); dataMap.remove(MesWorkOrder.class.getSimpleName()); dataMap.remove(MesOutPutStatistics.class.getSimpleName()); + dataMap.remove(MesRepairTask.class.getSimpleName()); + dataMap.remove(MesShiftProdCenterRecord.class.getSimpleName()); dataMap.remove(MesExtConstWords.START_TIME); dataMap.remove(MesExtConstWords.END_TIME); dataMap.remove(MesExtConstWords.WORK_TIME); @@ -143,71 +148,6 @@ public class JxCenterWorkingBoardMonitorOneService extends JxCenterWorkingBoardC return accidentDateService.queryBuAccidentDaysBoard(organizeCode); } - private Map> getCenterMap4Order(List workOrderList) { - return CollectionUtils.isEmpty(workOrderList) ? null : workOrderList.stream().filter(o -> null != o).collect(Collectors.groupingBy(MesWorkOrder::getWorkCenterCode)); - } - - private Map> getCenterMap4OutPut(List outPutStatisticsList) { - return CollectionUtils.isEmpty(outPutStatisticsList) ? null : outPutStatisticsList.stream().filter(o -> null != o).collect(Collectors.groupingBy(MesOutPutStatistics::getWorkCenterCode)); - } - - private JxCenterWorkingBoardBusiModel getProductionSchedule(String organizeCode, List workCenterExtDbList, Map dataMap) { - - JxCenterWorkingBoardBusiModel psData = new JxCenterWorkingBoardBusiModel().title("生产进度"); - - List workOrderList = (List) dataMap.get(MesWorkOrder.class.getSimpleName()); - List outPutStatisticsList = (List) dataMap.get(MesOutPutStatistics.class.getSimpleName()); - if (CollectionUtils.isEmpty(workOrderList) && CollectionUtils.isEmpty(outPutStatisticsList)) return psData; - - String categoryCodeCfg4Cached = (String) execCachedCenterWorkingBoardData(organizeCode, MesExtConstWords.ZERO_STR, MesExtConstWords.SX_CATEGORY_CFG, null); - MesBusiConfig categoryCodeCfg = !StringUtils.isEmpty(categoryCodeCfg4Cached) ? JSONObject.parseObject(categoryCodeCfg4Cached, MesBusiConfig.class) : execCatagoryCodeCfg(organizeCode); - if (null == categoryCodeCfg || StringUtils.isEmpty(categoryCodeCfg.getCfgValue()) || StringUtils.isEmpty(categoryCodeCfg.getCfgValueSeq())) return psData; - - String[] categoryCodeArr = categoryCodeCfg.getCfgValueSeq().split(MesExtConstWords.COMMA); - String[] categoryNameArr = categoryCodeCfg.getCfgValue().split(MesExtConstWords.COMMA); - if (categoryCodeArr.length != categoryNameArr.length) return psData; - - Map> centerMap4OutPutFilter = new HashMap<>(); - - Map> centerMap4Order = getCenterMap4Order(workOrderList); - Map> centerMap4OutPut = getCenterMap4OutPut(outPutStatisticsList); - - Map> categoryCodeMap4Order = new HashMap<>(); - Map> categoryCodeMap4OutPut = new HashMap<>(); - - for (MesWorkCenterExt workCenterExtDb : workCenterExtDbList) { - if (null == workCenterExtDb) continue; - if (StringUtils.isEmpty(workCenterExtDb.getCategoryCode()) || StringUtils.isEmpty(workCenterExtDb.getWorkTime()) || StringUtils.isEmpty(workCenterExtDb.getShiftCode())) continue; - - List workOrderList4Center = CollectionUtils.isEmpty(centerMap4Order) ? null : getWorkOrderListByWorkTime(centerMap4Order.get(workCenterExtDb.getWorkCenterCode()), workCenterExtDb.getWorkTime()); - List outPutStatisticsList4Center = CollectionUtils.isEmpty(centerMap4OutPut) ? null : getOutPutStatisticsListByWorkTime(centerMap4OutPut.get(workCenterExtDb.getWorkCenterCode()), workCenterExtDb.getWorkTime()); - - List categoryCodeList4Order = (!CollectionUtils.isEmpty(categoryCodeMap4Order) && categoryCodeMap4Order.containsKey(workCenterExtDb.getCategoryCode())) ? categoryCodeMap4Order.get(workCenterExtDb.getCategoryCode()) : new ArrayList<>(); - List categoryCodeList4OutPut = (!CollectionUtils.isEmpty(categoryCodeMap4OutPut) && categoryCodeMap4OutPut.containsKey(workCenterExtDb.getCategoryCode())) ? categoryCodeMap4OutPut.get(workCenterExtDb.getCategoryCode()) : new ArrayList<>(); - if (!CollectionUtils.isEmpty(workOrderList4Center)) categoryCodeList4Order.addAll(workOrderList4Center); - if (!CollectionUtils.isEmpty(outPutStatisticsList4Center)) categoryCodeList4OutPut.addAll(outPutStatisticsList4Center); - - categoryCodeMap4Order.put(workCenterExtDb.getCategoryCode(), categoryCodeList4Order); - categoryCodeMap4OutPut.put(workCenterExtDb.getCategoryCode(), categoryCodeList4OutPut); - - if (!CollectionUtils.isEmpty(outPutStatisticsList4Center)) centerMap4OutPutFilter.put(workCenterExtDb.getWorkCenterCode(), sortOutPutStatisticsList(outPutStatisticsList4Center)); - } - - for (int i = 0; i < categoryCodeArr.length; i ++) { - List workOrderList4Category = CollectionUtils.isEmpty(categoryCodeMap4Order) ? null : categoryCodeMap4Order.get(categoryCodeArr[i]); - List outPutStatisticsList4Category = CollectionUtils.isEmpty(categoryCodeMap4OutPut) ? null : categoryCodeMap4OutPut.get(categoryCodeArr[i]); - - Double planQtyAmount = getWorkOrderList2AmountQty(workOrderList4Category); - Double completeQtyAmount = getOutPutStatisticsList2AmountQty(outPutStatisticsList4Category); - - psData.addChartData(categoryNameArr[i], completeQtyAmount, planQtyAmount, getBigDecimalPercent(divThenMul100Format1RoundHalfUp(completeQtyAmount, planQtyAmount))); - } - - dataMap.put(MesOutPutStatistics.class.getSimpleName(), centerMap4OutPutFilter); - - return psData; - } - private Map calcOntologyLineData(String organizeCode, List workCenterExtDbList, Map dataMap) { JxCenterWorkingBoardBusiModel psData1 = new JxCenterWorkingBoardBusiModel().title("本体产线状态"); @@ -236,7 +176,7 @@ public class JxCenterWorkingBoardMonitorOneService extends JxCenterWorkingBoardC MesOutPutStatistics outPutStatistics = !CollectionUtils.isEmpty(outPutStatisticsListFilter) ? outPutStatisticsListFilter.get(0) : getOutPutStatisticsByCenter(organizeCode, workCenterExtDb.getWorkCenterCode()); List outPutStatisticsList2Order = (null == outPutStatistics || CollectionUtils.isEmpty(outPutStatisticsListFilter)) ? null : outPutStatisticsListFilter.stream().filter(o -> (null != o && o.getWorkOrderNo().equals(outPutStatistics.getWorkOrderNo()))).collect(Collectors.toList()); - psData1.addChartData(workCenterExtDb.getWorkCenterCode(), null == outPutStatistics ? null : outPutStatistics.getPartNo(), getRepairRate(outPutStatisticsList2Order, repairTaskList, workCenterExtDb), proxyService2.queryCenterWorkingBoardData(dataMap).get(MesExtConstWords.STATUS)); + psData1.addChartData(workCenterExtDb.getWorkCenterCode(), null == outPutStatistics ? null : outPutStatistics.getPartNo(), getRepairRate(outPutStatisticsList2Order, repairTaskList, workCenterExtDb), proxyService4.queryCenterWorkingBoardData(dataMap).get(MesExtConstWords.STATUS)); proxyService3.queryCenterWorkingBoardData(dataMap); @@ -250,12 +190,6 @@ public class JxCenterWorkingBoardMonitorOneService extends JxCenterWorkingBoardC return packOntologyLineWorkingStatusAndEnergyRate(dataMap, psData1, psData2); } - private MesBusiConfig execCatagoryCodeCfg(String organizeCode) { - MesBusiConfig catagoryCodeCfg = busiConfigService.getBusiConfigByCfgCode(organizeCode, MesExtConstWords.SX_CATEGORY_CFG); - if (null != catagoryCodeCfg) execCachedCenterWorkingBoardData(organizeCode, CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValueStr(), MesExtConstWords.SX_CATEGORY_CFG, JSONObject.toJSONString(catagoryCodeCfg)); - return catagoryCodeCfg; - } - private List execConfigListSortSeq(String organizeCode) { List busiConfigList = busiConfigService.getConfigListSortSeq(organizeCode, MesExtConstWords.BOARD_WORK_SHOW_FLAG); if (!CollectionUtils.isEmpty(busiConfigList)) execCachedCenterWorkingBoardData(organizeCode, CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValueStr(), MesExtConstWords.BOARD_WORK_SHOW_FLAG, JSONObject.toJSONString(busiConfigList)); diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyEnergyRateService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyEnergyRateService.java index 1a5c22b..8c7e601 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyEnergyRateService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyEnergyRateService.java @@ -9,6 +9,7 @@ import cn.estsh.i3plus.platform.common.tool.MathOperation; import cn.estsh.i3plus.platform.common.tool.TimeTool; import lombok.extern.slf4j.Slf4j; import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; import java.text.ParseException; import java.util.List; @@ -21,7 +22,7 @@ import java.util.stream.Collectors; * @Modify: **/ @Slf4j -public class JxCenterWorkingBoardProxyEnergyRateService implements IJxCenterWorkingBoardService { +public class JxCenterWorkingBoardProxyEnergyRateService extends JxCenterWorkingBoardCommonService implements IJxCenterWorkingBoardService { private IJxCenterWorkingBoardService proxyService; @@ -45,22 +46,25 @@ public class JxCenterWorkingBoardProxyEnergyRateService implements IJxCenterWork Map partStandardWorkMap = (Map) dataMap.get(MesExtConstWords.STANDARD_WORK); List filterList2OutPut = CollectionUtils.isEmpty(outPutStatisticsList) ? null : - outPutStatisticsList.stream().filter(o -> (null != o && o.getWorkCenterCode().equals(workCenterCode) && o.getWorkTime().equals(workTime) && o.getShiftCode().equals(shiftCode))).collect(Collectors.toList()); + outPutStatisticsList.stream().filter(o -> (null != o && o.getWorkCenterCode().equals(workCenterCode) && o.getWorkTime().equals(workTime) && (StringUtils.isEmpty(shiftCode) || o.getShiftCode().equals(shiftCode)))).collect(Collectors.toList()); List filterList2ShiftProd = CollectionUtils.isEmpty(shiftProdCenterRecordList) ? null : - shiftProdCenterRecordList.stream().filter(o -> (null != o && o.getWorkCenterCode().equals(workCenterCode) && o.getWorkTime().equals(workTime) && o.getShiftCode().equals(shiftCode) && o.getStartTime().compareTo(curTime) <= 0)).collect(Collectors.toList()); + shiftProdCenterRecordList.stream().filter(o -> (null != o && o.getWorkCenterCode().equals(workCenterCode) && o.getWorkTime().equals(workTime) && (StringUtils.isEmpty(shiftCode) || o.getShiftCode().equals(shiftCode)) && o.getStartTime().compareTo(curTime) <= 0)).collect(Collectors.toList()); - List stopList = getShiftProdDataListByFlag(filterList2ShiftProd, false); List prodList = getShiftProdDataListByFlag(filterList2ShiftProd, true); - Double serviceTime = CollectionUtils.isEmpty(prodList) ? new Double(0) : prodList.stream().filter(o -> null != o).mapToDouble(o -> getStatisticsTime(o, curTime)).sum(); - Double nonWorkingTime = CollectionUtils.isEmpty(stopList) ? new Double(0) : stopList.stream().filter(o -> null != o).mapToDouble(o -> getStatisticsTime(o, curTime)).sum(); - Double standardTime = CollectionUtils.isEmpty(filterList2OutPut) ? new Double(0) : filterList2OutPut.stream().filter(o -> null != o).mapToDouble(o -> getStatisticsTime(o, partStandardWorkMap)).sum(); - Double workingTime = MathOperation.sub(serviceTime, nonWorkingTime); - dataMap.put("serviceTime", serviceTime); - dataMap.put("nonWorkingTime", nonWorkingTime); + + Double standardTime = CollectionUtils.isEmpty(filterList2OutPut) ? new Double(0) : filterList2OutPut.stream().filter(o -> null != o).mapToDouble(o -> getStatisticsTime(o, partStandardWorkMap)).sum(); dataMap.put("standardTime", standardTime); - dataMap.put("workingTime", workingTime); + + if (!dataMap.containsKey("onlyCalcRate")) { + List stopList = getShiftProdDataListByFlag(filterList2ShiftProd, false); + Double nonWorkingTime = CollectionUtils.isEmpty(stopList) ? new Double(0) : stopList.stream().filter(o -> null != o).mapToDouble(o -> getStatisticsTime(o, curTime)).sum(); + dataMap.put("nonWorkingTime", nonWorkingTime); + + Double workingTime = MathOperation.sub(serviceTime, nonWorkingTime); + dataMap.put("workingTime", workingTime); + } return dataMap; } @@ -71,15 +75,6 @@ public class JxCenterWorkingBoardProxyEnergyRateService implements IJxCenterWork else return shiftProdCenterRecordList.stream().filter(o -> (null != o && (MesExtEnumUtil.SHIFT_PROD_TYPE.NORMAL_PROD.getValue() == o.getProdType() || MesExtEnumUtil.SHIFT_PROD_TYPE.UNNORMAL_PROD.getValue() == o.getProdType()))).collect(Collectors.toList()); } - private Double getStatisticsTime(MesShiftProdCenterRecord shiftProdCenterRecord, String curTime) { - try { - String endTime = shiftProdCenterRecord.getEndTime().compareTo(curTime) <= 0 ? shiftProdCenterRecord.getEndTime() : curTime; - return MathOperation.mul(new Double(TimeTool.getSecoundsBetweenTime(2, shiftProdCenterRecord.getStartTime(), endTime)), shiftProdCenterRecord.getWorkerQty()); - } catch (ParseException e) { - return new Double(0); - } - } - private Double getStatisticsTime(MesOutPutStatistics outPutStatistics, Map partStandardWorkMap) { return MathOperation.mul(outPutStatistics.getQty(), ((!CollectionUtils.isEmpty(partStandardWorkMap) && partStandardWorkMap.containsKey(outPutStatistics.getPartNo())) ? Double.parseDouble(partStandardWorkMap.get(outPutStatistics.getPartNo())) : new Double(0))); } diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyOrderService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyOrderService.java index f8900b9..73ddfc9 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyOrderService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyOrderService.java @@ -36,16 +36,16 @@ public class JxCenterWorkingBoardProxyOrderService implements IJxCenterWorkingBo @Override public Map queryCenterWorkingBoardData(Map dataMap) { - if (null != proxyService) dataMap = proxyService.queryCenterWorkingBoardData(dataMap); + if (null != proxyService) proxyService.queryCenterWorkingBoardData(dataMap); - String orgainzeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE); + String organizeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE); String workCenterCode = (String) dataMap.get(MesExtConstWords.WORK_CENTER_CODE); String startTime = (String) dataMap.get(MesExtConstWords.START_TIME); String endTime = (String) dataMap.get(MesExtConstWords.END_TIME); if (StringUtils.isEmpty(startTime) || StringUtils.isEmpty(endTime)) return dataMap; - DdlPackBean packBean = DdlPackBean.getDdlPackBean(orgainzeCode); + DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode); DdlPreparedPack.getStringEqualPack(workCenterCode, MesExtConstWords.WORK_CENTER_CODE, packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.WORK_ORDER_TYPE.STANDARD_ORDER.getValue(), MesExtConstWords.WORK_ORDER_TYPE, packBean); DdlPreparedPack.timeBuilder(startTime + MesExtConstWords.APPEND_ZERO_HMS, endTime + MesExtConstWords.APPEND_24_HMS, MesExtConstWords.START_TIME, true, true, packBean); diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyOutPutService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyOutPutService.java index de8734b..cdf5e21 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyOutPutService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyOutPutService.java @@ -36,9 +36,9 @@ public class JxCenterWorkingBoardProxyOutPutService implements IJxCenterWorkingB @Override public Map queryCenterWorkingBoardData(Map dataMap) { - if (null != proxyService) dataMap = proxyService.queryCenterWorkingBoardData(dataMap); + if (null != proxyService) proxyService.queryCenterWorkingBoardData(dataMap); - String orgainzeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE); + String organizeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE); String workCenterCode = (String) dataMap.get(MesExtConstWords.WORK_CENTER_CODE); String workTime = (String) dataMap.get(MesExtConstWords.WORK_TIME); String startTime = (String) dataMap.get(MesExtConstWords.START_TIME); @@ -48,10 +48,10 @@ public class JxCenterWorkingBoardProxyOutPutService implements IJxCenterWorkingB if (!StringUtils.isEmpty(workCenterCode) && !StringUtils.isEmpty(workTime)) outPutStatisticsList = outPutStatisticsRepository.findByProperty( new String[]{MesExtConstWords.ORGANIZE_CODE, MesExtConstWords.IS_DELETED, MesExtConstWords.IS_VALID, MesExtConstWords.WORK_CENTER_CODE, MesExtConstWords.WORK_TIME, MesExtConstWords.WORK_ORDER_TYPE}, - new Object[]{orgainzeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), workCenterCode, workTime, MesExtEnumUtil.WORK_ORDER_TYPE.STANDARD_ORDER.getValue()}, + new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), workCenterCode, workTime, MesExtEnumUtil.WORK_ORDER_TYPE.STANDARD_ORDER.getValue()}, " order by modifyDatetime desc "); else if (!StringUtils.isEmpty(startTime) && !StringUtils.isEmpty(endTime)) { - DdlPackBean packBean = DdlPackBean.getDdlPackBean(orgainzeCode); + DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.WORK_ORDER_TYPE.STANDARD_ORDER.getValue(), MesExtConstWords.WORK_ORDER_TYPE, packBean); DdlPreparedPack.timeBuilder(startTime, endTime, MesExtConstWords.WORK_TIME, true, true, packBean); outPutStatisticsList = outPutStatisticsRepository.findByHqlWhere(packBean); diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyProductionScheduleService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyProductionScheduleService.java new file mode 100644 index 0000000..9e49832 --- /dev/null +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyProductionScheduleService.java @@ -0,0 +1,124 @@ +package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.busi.jx; + +import cn.estsh.i3plus.ext.mes.api.base.bu.IBusiConfigService; +import cn.estsh.i3plus.ext.mes.api.busi.jx.IJxCenterWorkingBoardService; +import cn.estsh.i3plus.ext.mes.pojo.bean.MesBusiConfig; +import cn.estsh.i3plus.ext.mes.pojo.bean.MesOutPutStatistics; +import cn.estsh.i3plus.ext.mes.pojo.bean.MesWorkCenterExt; +import cn.estsh.i3plus.ext.mes.pojo.model.jx.JxCenterWorkingBoardBusiModel; +import cn.estsh.i3plus.ext.mes.pojo.util.MesExtConstWords; +import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; +import cn.estsh.i3plus.pojo.mes.bean.MesWorkOrder; +import cn.estsh.impp.framework.boot.util.SpringContextsUtil; +import com.alibaba.fastjson.JSONObject; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @Author : wangjie + * @CreateDate : 2022-02-15 + * @Modify: + **/ +@Slf4j +public class JxCenterWorkingBoardProxyProductionScheduleService extends JxCenterWorkingBoardCommonService implements IJxCenterWorkingBoardService { + + private IBusiConfigService busiConfigService; + + public JxCenterWorkingBoardProxyProductionScheduleService() { + this.busiConfigService = (IBusiConfigService) SpringContextsUtil.getBean("busiConfigService"); + } + + @Override + public Map queryCenterWorkingBoardData(Map dataMap) { + + String organizeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE); + + List workCenterExtDbList = (List) dataMap.get(MesWorkCenterExt.class.getSimpleName()); + + dataMap.put("生产进度", getProductionSchedule(organizeCode, workCenterExtDbList, dataMap)); + + return dataMap; + } + + private JxCenterWorkingBoardBusiModel getProductionSchedule(String organizeCode, List workCenterExtDbList, Map dataMap) { + + JxCenterWorkingBoardBusiModel psData = new JxCenterWorkingBoardBusiModel().title("生产进度"); + + List workOrderList = (List) dataMap.get(MesWorkOrder.class.getSimpleName()); + List outPutStatisticsList = (List) dataMap.get(MesOutPutStatistics.class.getSimpleName()); + if (CollectionUtils.isEmpty(workOrderList) && CollectionUtils.isEmpty(outPutStatisticsList)) return psData; + + String categoryCodeCfg4Cached = (String) execCachedCenterWorkingBoardData(organizeCode, MesExtConstWords.ZERO_STR, MesExtConstWords.SX_CATEGORY_CFG, null); + MesBusiConfig categoryCodeCfg = !StringUtils.isEmpty(categoryCodeCfg4Cached) ? JSONObject.parseObject(categoryCodeCfg4Cached, MesBusiConfig.class) : execCatagoryCodeCfg(organizeCode); + if (null == categoryCodeCfg || StringUtils.isEmpty(categoryCodeCfg.getCfgValue()) || StringUtils.isEmpty(categoryCodeCfg.getCfgValueSeq())) return psData; + + String[] categoryCodeArr = categoryCodeCfg.getCfgValueSeq().split(MesExtConstWords.COMMA); + String[] categoryNameArr = categoryCodeCfg.getCfgValue().split(MesExtConstWords.COMMA); + if (categoryCodeArr.length != categoryNameArr.length) return psData; + + Map> centerMap4OrderFilter = new HashMap<>(); + Map> centerMap4OutPutFilter = new HashMap<>(); + + Map> centerMap4Order = getCenterMap4Order(workOrderList); + Map> centerMap4OutPut = getCenterMap4OutPut(outPutStatisticsList); + + Map> categoryCodeMap4Order = new HashMap<>(); + Map> categoryCodeMap4OutPut = new HashMap<>(); + + for (MesWorkCenterExt workCenterExtDb : workCenterExtDbList) { + if (null == workCenterExtDb) continue; + if (StringUtils.isEmpty(workCenterExtDb.getCategoryCode()) || StringUtils.isEmpty(workCenterExtDb.getWorkTime()) || StringUtils.isEmpty(workCenterExtDb.getShiftCode())) continue; + + List workOrderList4Center = CollectionUtils.isEmpty(centerMap4Order) ? null : getWorkOrderListByWorkTime(centerMap4Order.get(workCenterExtDb.getWorkCenterCode()), workCenterExtDb.getWorkTime()); + List outPutStatisticsList4Center = CollectionUtils.isEmpty(centerMap4OutPut) ? null : getOutPutStatisticsListByWorkTime(centerMap4OutPut.get(workCenterExtDb.getWorkCenterCode()), workCenterExtDb.getWorkTime()); + + List categoryCodeList4Order = (!CollectionUtils.isEmpty(categoryCodeMap4Order) && categoryCodeMap4Order.containsKey(workCenterExtDb.getCategoryCode())) ? categoryCodeMap4Order.get(workCenterExtDb.getCategoryCode()) : new ArrayList<>(); + List categoryCodeList4OutPut = (!CollectionUtils.isEmpty(categoryCodeMap4OutPut) && categoryCodeMap4OutPut.containsKey(workCenterExtDb.getCategoryCode())) ? categoryCodeMap4OutPut.get(workCenterExtDb.getCategoryCode()) : new ArrayList<>(); + if (!CollectionUtils.isEmpty(workOrderList4Center)) categoryCodeList4Order.addAll(workOrderList4Center); + if (!CollectionUtils.isEmpty(outPutStatisticsList4Center)) categoryCodeList4OutPut.addAll(outPutStatisticsList4Center); + + categoryCodeMap4Order.put(workCenterExtDb.getCategoryCode(), categoryCodeList4Order); + categoryCodeMap4OutPut.put(workCenterExtDb.getCategoryCode(), categoryCodeList4OutPut); + + if (!CollectionUtils.isEmpty(workOrderList4Center)) centerMap4OrderFilter.put(workCenterExtDb.getWorkCenterCode(), workOrderList4Center); + if (!CollectionUtils.isEmpty(outPutStatisticsList4Center)) centerMap4OutPutFilter.put(workCenterExtDb.getWorkCenterCode(), sortOutPutStatisticsList(outPutStatisticsList4Center)); + } + + for (int i = 0; i < categoryCodeArr.length; i ++) { + List workOrderList4Category = CollectionUtils.isEmpty(categoryCodeMap4Order) ? null : categoryCodeMap4Order.get(categoryCodeArr[i]); + List outPutStatisticsList4Category = CollectionUtils.isEmpty(categoryCodeMap4OutPut) ? null : categoryCodeMap4OutPut.get(categoryCodeArr[i]); + + Double planQtyAmount = getWorkOrderList2AmountQty(workOrderList4Category); + Double completeQtyAmount = getOutPutStatisticsList2AmountQty(outPutStatisticsList4Category); + + psData.addChartData(categoryNameArr[i], completeQtyAmount, planQtyAmount, getBigDecimalPercent(divThenMul100Format1RoundHalfUp(completeQtyAmount, planQtyAmount))); + } + + dataMap.put(MesWorkOrder.class.getSimpleName(), centerMap4OrderFilter); + dataMap.put(MesOutPutStatistics.class.getSimpleName(), centerMap4OutPutFilter); + + return psData; + } + + private MesBusiConfig execCatagoryCodeCfg(String organizeCode) { + MesBusiConfig catagoryCodeCfg = busiConfigService.getBusiConfigByCfgCode(organizeCode, MesExtConstWords.SX_CATEGORY_CFG); + if (null != catagoryCodeCfg) execCachedCenterWorkingBoardData(organizeCode, CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValueStr(), MesExtConstWords.SX_CATEGORY_CFG, JSONObject.toJSONString(catagoryCodeCfg)); + return catagoryCodeCfg; + } + + private Map> getCenterMap4Order(List workOrderList) { + return CollectionUtils.isEmpty(workOrderList) ? null : workOrderList.stream().filter(o -> null != o).collect(Collectors.groupingBy(MesWorkOrder::getWorkCenterCode)); + } + + private Map> getCenterMap4OutPut(List outPutStatisticsList) { + return CollectionUtils.isEmpty(outPutStatisticsList) ? null : outPutStatisticsList.stream().filter(o -> null != o).collect(Collectors.groupingBy(MesOutPutStatistics::getWorkCenterCode)); + } + +} diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyRepairService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyRepairService.java index 21207e1..fd859ea 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyRepairService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyRepairService.java @@ -37,7 +37,7 @@ public class JxCenterWorkingBoardProxyRepairService implements IJxCenterWorkingB if (null != proxyService) proxyService.queryCenterWorkingBoardData(dataMap); - String orgainzeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE); + String organizeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE); String workCenterCode = (String) dataMap.get(MesExtConstWords.WORK_CENTER_CODE); String workTime = (String) dataMap.get(MesExtConstWords.WORK_TIME); String startTime = (String) dataMap.get(MesExtConstWords.START_TIME); @@ -47,9 +47,9 @@ public class JxCenterWorkingBoardProxyRepairService implements IJxCenterWorkingB if (!StringUtils.isEmpty(workCenterCode) && !StringUtils.isEmpty(workTime)) repairTaskDbList = repairTaskRepository.findByProperty( new String[]{MesExtConstWords.ORGANIZE_CODE, MesExtConstWords.IS_DELETED, MesExtConstWords.IS_VALID, MesExtConstWords.WORK_CENTER_CODE, MesExtConstWords.WORK_TIME}, - new Object[]{orgainzeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), workCenterCode, workTime}); + new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), workCenterCode, workTime}); else if (!StringUtils.isEmpty(startTime) && !StringUtils.isEmpty(endTime)) { - DdlPackBean packBean = DdlPackBean.getDdlPackBean(orgainzeCode); + DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode); DdlPreparedPack.timeBuilder(startTime, endTime, MesExtConstWords.WORK_TIME, true, true, packBean); repairTaskDbList = repairTaskRepository.findByHqlWhere(packBean); } diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxySpcrService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxySpcrService.java index e0bab62..d6d5a16 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxySpcrService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxySpcrService.java @@ -32,7 +32,7 @@ public class JxCenterWorkingBoardProxySpcrService implements IJxCenterWorkingBoa @Override public Map queryCenterWorkingBoardData(Map dataMap) { - String orgainzeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE); + String organizeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE); String workCenterCode = (String) dataMap.get(MesExtConstWords.WORK_CENTER_CODE); String workTime = (String) dataMap.get(MesExtConstWords.WORK_TIME); String shiftCode = (String) dataMap.get(MesExtConstWords.SHIFT_CODE); @@ -43,9 +43,9 @@ public class JxCenterWorkingBoardProxySpcrService implements IJxCenterWorkingBoa if (!StringUtils.isEmpty(workCenterCode) && !StringUtils.isEmpty(workTime) && !StringUtils.isEmpty(shiftCode)) shiftProdCenterRecordList = shiftProdCenterRecordRepository.findByProperty( new String[]{MesExtConstWords.ORGANIZE_CODE, MesExtConstWords.IS_DELETED, MesExtConstWords.IS_VALID, MesExtConstWords.WORK_CENTER_CODE, MesExtConstWords.WORK_TIME, MesExtConstWords.SHIFT_CODE}, - new Object[]{orgainzeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), workCenterCode, workTime, shiftCode}); + new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), workCenterCode, workTime, shiftCode}); else if (!StringUtils.isEmpty(startTime) && !StringUtils.isEmpty(endTime)) { - DdlPackBean packBean = DdlPackBean.getDdlPackBean(orgainzeCode); + DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode); DdlPreparedPack.timeBuilder(startTime, endTime, MesExtConstWords.WORK_TIME, true, true, packBean); shiftProdCenterRecordList = shiftProdCenterRecordRepository.findByHqlWhere(packBean); } diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyTimeSegmentService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyTimeSegmentService.java index 906ec60..18a4f88 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyTimeSegmentService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/jx/JxCenterWorkingBoardProxyTimeSegmentService.java @@ -31,7 +31,7 @@ public class JxCenterWorkingBoardProxyTimeSegmentService implements IJxCenterWor @Override public Map queryCenterWorkingBoardData(Map dataMap) { - String orgainzeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE); + String organizeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE); String workCenterCode = (String) dataMap.get(MesExtConstWords.WORK_CENTER_CODE); String workTime = (String) dataMap.get(MesExtConstWords.WORK_TIME); String shiftCode = (String) dataMap.get(MesExtConstWords.SHIFT_CODE); @@ -40,7 +40,7 @@ public class JxCenterWorkingBoardProxyTimeSegmentService implements IJxCenterWor List outPutStatisticsTimeSegmentList = outPutStatisticsTimeSegmentRepository.findByProperty( new String[]{MesExtConstWords.ORGANIZE_CODE, MesExtConstWords.IS_DELETED, MesExtConstWords.IS_VALID, MesExtConstWords.WORK_CENTER_CODE, MesExtConstWords.WORK_TIME, MesExtConstWords.SHIFT_CODE, MesExtConstWords.WORK_ORDER_TYPE}, - new Object[]{orgainzeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), workCenterCode, workTime, shiftCode, MesExtEnumUtil.WORK_ORDER_TYPE.STANDARD_ORDER.getValue()}); + new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), workCenterCode, workTime, shiftCode, MesExtEnumUtil.WORK_ORDER_TYPE.STANDARD_ORDER.getValue()}); if (CollectionUtils.isEmpty(outPutStatisticsTimeSegmentList)) return dataMap; diff --git a/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/model/jx/JxCenterWorkingBoardBusiModel.java b/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/model/jx/JxCenterWorkingBoardBusiModel.java index 3313c18..1dba2a1 100644 --- a/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/model/jx/JxCenterWorkingBoardBusiModel.java +++ b/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/model/jx/JxCenterWorkingBoardBusiModel.java @@ -29,11 +29,19 @@ public class JxCenterWorkingBoardBusiModel extends JxEChartsReportCommonDataMode @ApiParam("标题") private String title; + @ApiParam("数据") + private Object obj; + public JxCenterWorkingBoardBusiModel title(String title) { this.title = title; return this; } + public JxCenterWorkingBoardBusiModel obj(Object obj) { + this.obj = obj; + return this; + } + public JxCenterWorkingBoardBusiModel addChartData2ChartDataLists(Integer size, String key, Object value, Object value2, Object value3) { if (CollectionUtils.isEmpty(this.chartDataLists)) this.chartDataLists = new LinkedList<>(); List chartDataList = (CollectionUtils.isEmpty(this.chartDataLists) || this.chartDataLists.get(this.chartDataLists.size() - 1).size() == size) ? new LinkedList<>() : this.chartDataLists.get(this.chartDataLists.size() - 1); @@ -42,6 +50,12 @@ public class JxCenterWorkingBoardBusiModel extends JxEChartsReportCommonDataMode return this; } + public JxCenterWorkingBoardBusiModel addChartData(String key, Object value, Object value2, Object value3, Object value4) { + if (CollectionUtils.isEmpty(this.chartDataList)) this.chartDataList = new LinkedList<>(); + this.chartDataList.add(new JxEChartsReportCommonDataModel.SxDataModel(key, value, value2, value3, value4)); + return this; + } + public JxCenterWorkingBoardBusiModel addChartData(String key, Object value, Object value2, Object value3) { if (CollectionUtils.isEmpty(this.chartDataList)) this.chartDataList = new LinkedList<>(); this.chartDataList.add(new JxEChartsReportCommonDataModel.SxDataModel(key, value, value2, value3)); diff --git a/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/util/MesExtConstWords.java b/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/util/MesExtConstWords.java index bfdc767..617c640 100644 --- a/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/util/MesExtConstWords.java +++ b/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/util/MesExtConstWords.java @@ -951,4 +951,7 @@ public class MesExtConstWords { //流水号截至位置 public static final String SEQNO_END_INDEX = "SEQNO_END_INDEX"; + //标准综合能率配置 + public static final String SX_STANDARD_RATE_CFG = "SX_STANDARD_RATE_CFG"; + }