|
|
|
@ -121,7 +121,7 @@ public class MesProductionRecordGenerateStepService extends BaseStepService {
|
|
|
|
|
if (Objects.equal(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(), workCell.getIsCountFinish())) {
|
|
|
|
|
// 保存班次加工数量上下文
|
|
|
|
|
MesProdShiftContext mesProdShiftKvBean = prodShiftRecordService.getMesProdShiftKvBean(reqBean.getOrganizeCode(), reqBean.getWorkCenterCode());
|
|
|
|
|
Integer amount = productionCustomContextStepService.dispatchProductionStatisticsContext(reqBean, productionPsOutContextList.size(), mesProdShiftKvBean);
|
|
|
|
|
Integer amount = productionCustomContextStepService.dispatchProductionStatisticsContext(reqBean, getProductionStatisticsQty(productionPsOutContextList), mesProdShiftKvBean);
|
|
|
|
|
this.sendMessage(reqBean, new StationResultBean().writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), String.format("生产线[%s]工位[%s]当前累加数[%s]已累计加工数[%s]", reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), productionPsOutContextList.size(), amount), MesPcnEnumUtil.STATION_BUSI_TYPE.RUNNING_INFO, MesPcnEnumUtil.STATION_DATA_TYPE.TEXT);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -129,6 +129,11 @@ public class MesProductionRecordGenerateStepService extends BaseStepService {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Integer getProductionStatisticsQty(List<MesProductionPsOutContext> productionPsOutContextList) {
|
|
|
|
|
Double qty = productionPsOutContextList.stream().filter(o -> null != o).mapToDouble(MesProductionPsOutContext::getQty).sum();
|
|
|
|
|
return qty.intValue();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void saveProductionRecordData(StationRequestBean reqBean, MesWorkCenter workCenter, MesScanMonitorContext scanMonitorContext, String mouldNo,
|
|
|
|
|
List<MesProdRuleContext> prodRuleContextList, MesProductionProcessContext productionProcessContext, MesProductionPsOutContext productionPsOutContext,
|
|
|
|
|
Map<Integer, MesProdRuleContext> prMap, MesCellEquipContext cellEquipContext, MesProductionPsInContext productionPsInContext, MesProductionPartContext productionPartContext) {
|
|
|
|
|