|
|
|
@ -95,6 +95,22 @@ public class JxCenterWorkingBoardBusiTwoService implements IJxCenterWorkingBoard
|
|
|
|
|
|
|
|
|
|
dataMap.put("生产计划进度", getProductionSchedule(workOrderList, outPutStatisticsList, workCenterExtDb));
|
|
|
|
|
|
|
|
|
|
return clearUselessData(dataMap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> clearUselessData(Map<String, Object> dataMap) {
|
|
|
|
|
dataMap.remove(MesWorkCenterExt.class.getSimpleName());
|
|
|
|
|
dataMap.remove(MesShiftProdCenterRecord.class.getSimpleName());
|
|
|
|
|
dataMap.remove(MesWorkOrder.class.getSimpleName());
|
|
|
|
|
dataMap.remove(MesOutPutStatistics.class.getSimpleName());
|
|
|
|
|
dataMap.remove(MesExtConstWords.STANDARD_WORK);
|
|
|
|
|
dataMap.remove(MesExtConstWords.QTY);
|
|
|
|
|
dataMap.remove(MesExtConstWords.COMPLET_QTY);
|
|
|
|
|
dataMap.remove("serviceTime");
|
|
|
|
|
dataMap.remove("nonWorkingTime");
|
|
|
|
|
dataMap.remove("standardTime");
|
|
|
|
|
dataMap.remove("workingTime");
|
|
|
|
|
return dataMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -221,15 +237,15 @@ public class JxCenterWorkingBoardBusiTwoService implements IJxCenterWorkingBoard
|
|
|
|
|
|
|
|
|
|
Map<String, List<MesOutPutStatistics>> itemMap2OutPut = CollectionUtils.isEmpty(outPutList) ? null : outPutList.stream().filter(o -> null != o).collect(Collectors.groupingBy(MesOutPutStatistics::getWorkOrderNo));
|
|
|
|
|
|
|
|
|
|
psData.addChartData(partNo, statisticsPlanQty(orderList, itemMap2OutPut), getOutPutStatisticsList2AmountQty(outPutList), !CollectionUtils.isEmpty(psData.getChartDataList()) ? "#ffffff" : "#00ff00");
|
|
|
|
|
psData.addChartData(partNo, statisticsPlanQty(orderList, itemMap2OutPut, workCenterExtDb), getOutPutStatisticsList2AmountQty(outPutList), !CollectionUtils.isEmpty(psData.getChartDataList()) ? "#ffffff" : "#00ff00");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return psData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Double statisticsPlanQty(List<MesWorkOrder> orderList, Map<String, List<MesOutPutStatistics>> itemMap2OutPut) {
|
|
|
|
|
private Double statisticsPlanQty(List<MesWorkOrder> orderList, Map<String, List<MesOutPutStatistics>> itemMap2OutPut, MesWorkCenterExt workCenterExtDb) {
|
|
|
|
|
return CollectionUtils.isEmpty(orderList) ? new Double(0) :
|
|
|
|
|
orderList.stream().filter(o -> null != o).mapToDouble(o -> MathOperation.add(MathOperation.sub(o.getQty(), o.getCompleteQty()), getOutPutQty(o.getOrderNo(), itemMap2OutPut))).sum();
|
|
|
|
|
orderList.stream().filter(o -> null != o).mapToDouble(o -> o.getStartTime().contains(workCenterExtDb.getWorkTime()) ? o.getQty() : MathOperation.add(MathOperation.sub(o.getQty(), o.getCompleteQty()), getOutPutQty(o.getOrderNo(), itemMap2OutPut))).sum();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Double getOutPutQty(String workOrderNo, Map<String, List<MesOutPutStatistics>> itemMap2OutPut) {
|
|
|
|
|