forked from I3-YF/i3plus-mes-yfai
jx mes BI
parent
a1c62ab5a6
commit
22f0600776
@ -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<String, Object> queryCenterWorkingBoardData(Map<String, Object> dataMap) {
|
||||
|
||||
proxyService0.queryCenterWorkingBoardData(dataMap);
|
||||
|
||||
proxyService1.queryCenterWorkingBoardData(dataMap);
|
||||
|
||||
List<MesWorkCenterExt> workCenterExtDbList = (List<MesWorkCenterExt>) dataMap.get(MesWorkCenterExt.class.getSimpleName());
|
||||
|
||||
packProxyCondition(dataMap, workCenterExtDbList);
|
||||
|
||||
proxyService.queryCenterWorkingBoardData(dataMap);
|
||||
|
||||
proxyService2.queryCenterWorkingBoardData(dataMap);
|
||||
|
||||
calcOntologyLineData(workCenterExtDbList, dataMap);
|
||||
|
||||
return clearUselessData(dataMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> clearUselessData(Map<String, Object> 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<String, Object> dataMap, List<MesWorkCenterExt> workCenterExtDbList) {
|
||||
List<String> 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<MesBusiConfig> execConfigListSortSeq(String organizeCode) {
|
||||
List<MesBusiConfig> 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<String, Object> calcOntologyLineData(List<MesWorkCenterExt> workCenterExtDbList, Map<String, Object> 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<MesBusiConfig> busiConfigList = !StringUtils.isEmpty(busiConfigList4Cached) ? JSONObject.parseArray(busiConfigList4Cached, MesBusiConfig.class) : execConfigListSortSeq(organizeCode);
|
||||
if (CollectionUtils.isEmpty(busiConfigList)) return packOntologyLineData(dataMap, psData1, psData2);
|
||||
|
||||
Map<String, MesWorkCenterExt> workCenterExtDbMap = workCenterExtDbList.stream().filter(o -> null != o).collect(Collectors.toMap(MesWorkCenterExt::getWorkCenterCode, o -> o));
|
||||
|
||||
Map<String, List<MesWorkOrder>> centerMap4OrderFilter = (Map<String, List<MesWorkOrder>>) dataMap.get(MesWorkOrder.class.getSimpleName());
|
||||
Map<String, List<MesOutPutStatistics>> centerMap4OutPutFilter = (Map<String, List<MesOutPutStatistics>>) dataMap.get(MesOutPutStatistics.class.getSimpleName());
|
||||
List<MesShiftProdCenterRecord> shiftProdCenterRecordList = (List<MesShiftProdCenterRecord>) 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<MesWorkOrder> workOrderList = CollectionUtils.isEmpty(centerMap4OrderFilter) ? null : centerMap4OrderFilter.get(workCenterExtDb.getWorkCenterCode());
|
||||
List<MesOutPutStatistics> 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<MesShiftProdCenterRecord> shiftProdCenterRecordList, MesWorkCenterExt workCenterExtDb) {
|
||||
Optional<MesShiftProdCenterRecord> 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<MesShiftProdCenterRecord> shiftProdCenterRecordList, MesWorkCenterExt workCenterExtDb, String curTime) {
|
||||
List<MesShiftProdCenterRecord> 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<String, Object> packOntologyLineData(Map<String, Object> dataMap, JxCenterWorkingBoardBusiModel psData1, JxCenterWorkingBoardBusiModel psData2) {
|
||||
dataMap.put("本体能率", psData1);
|
||||
dataMap.put("项目", psData2);
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
}
|
@ -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<String, Object> queryCenterWorkingBoardData(Map<String, Object> dataMap) {
|
||||
|
||||
String organizeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE);
|
||||
|
||||
List<MesWorkCenterExt> workCenterExtDbList = (List<MesWorkCenterExt>) dataMap.get(MesWorkCenterExt.class.getSimpleName());
|
||||
|
||||
dataMap.put("生产进度", getProductionSchedule(organizeCode, workCenterExtDbList, dataMap));
|
||||
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
private JxCenterWorkingBoardBusiModel getProductionSchedule(String organizeCode, List<MesWorkCenterExt> workCenterExtDbList, Map<String, Object> dataMap) {
|
||||
|
||||
JxCenterWorkingBoardBusiModel psData = new JxCenterWorkingBoardBusiModel().title("生产进度");
|
||||
|
||||
List<MesWorkOrder> workOrderList = (List<MesWorkOrder>) dataMap.get(MesWorkOrder.class.getSimpleName());
|
||||
List<MesOutPutStatistics> outPutStatisticsList = (List<MesOutPutStatistics>) 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<String, List<MesWorkOrder>> centerMap4OrderFilter = new HashMap<>();
|
||||
Map<String, List<MesOutPutStatistics>> centerMap4OutPutFilter = new HashMap<>();
|
||||
|
||||
Map<String, List<MesWorkOrder>> centerMap4Order = getCenterMap4Order(workOrderList);
|
||||
Map<String, List<MesOutPutStatistics>> centerMap4OutPut = getCenterMap4OutPut(outPutStatisticsList);
|
||||
|
||||
Map<String, List<MesWorkOrder>> categoryCodeMap4Order = new HashMap<>();
|
||||
Map<String, List<MesOutPutStatistics>> 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<MesWorkOrder> workOrderList4Center = CollectionUtils.isEmpty(centerMap4Order) ? null : getWorkOrderListByWorkTime(centerMap4Order.get(workCenterExtDb.getWorkCenterCode()), workCenterExtDb.getWorkTime());
|
||||
List<MesOutPutStatistics> outPutStatisticsList4Center = CollectionUtils.isEmpty(centerMap4OutPut) ? null : getOutPutStatisticsListByWorkTime(centerMap4OutPut.get(workCenterExtDb.getWorkCenterCode()), workCenterExtDb.getWorkTime());
|
||||
|
||||
List<MesWorkOrder> categoryCodeList4Order = (!CollectionUtils.isEmpty(categoryCodeMap4Order) && categoryCodeMap4Order.containsKey(workCenterExtDb.getCategoryCode())) ? categoryCodeMap4Order.get(workCenterExtDb.getCategoryCode()) : new ArrayList<>();
|
||||
List<MesOutPutStatistics> 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<MesWorkOrder> workOrderList4Category = CollectionUtils.isEmpty(categoryCodeMap4Order) ? null : categoryCodeMap4Order.get(categoryCodeArr[i]);
|
||||
List<MesOutPutStatistics> 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<String, List<MesWorkOrder>> getCenterMap4Order(List<MesWorkOrder> workOrderList) {
|
||||
return CollectionUtils.isEmpty(workOrderList) ? null : workOrderList.stream().filter(o -> null != o).collect(Collectors.groupingBy(MesWorkOrder::getWorkCenterCode));
|
||||
}
|
||||
|
||||
private Map<String, List<MesOutPutStatistics>> getCenterMap4OutPut(List<MesOutPutStatistics> outPutStatisticsList) {
|
||||
return CollectionUtils.isEmpty(outPutStatisticsList) ? null : outPutStatisticsList.stream().filter(o -> null != o).collect(Collectors.groupingBy(MesOutPutStatistics::getWorkCenterCode));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue