diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesEquipmentLogService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesEquipmentLogService.java index 34bcaba..de0af0c 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesEquipmentLogService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesEquipmentLogService.java @@ -165,6 +165,8 @@ public class MesEquipmentLogService implements IMesEquipmentLogService { } MesEquipmentLog equipmentLog = mesEquipmentLogExtService.queryMesEquipmentLog(mesEquipmentVariable.getOrganizeCode(), Integer.valueOf(equipLogMqttMsg.getPTCode()), mesEquipmentVariable.getId()); ConvertBean.serviceModelUpdate(equipmentLog, "mqtt"); + equipmentLog.setEquipVariableValue(equipLogMqttMsg.getValue()); + equipmentLog.setEquipVariableStatus(MesExtEnumUtil.EQUIP_VARIABLE_NEED_NEW_VALUE.TRUE.getEquipVariableStatus()); mesEquipmentLogRepository.update(equipmentLog); MesEquipmentLogDetail mesEquipmentLogDetail = new MesEquipmentLogDetail(); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java index 7024ecb..57136c7 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java @@ -298,7 +298,7 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService { mesProductionRepeatAssembly.setAssemblyStatus(MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_10.getValue()); mesProductionRepeatAssembly.setId(null); mesProductionRepeatAssembly.setIsOrigSn(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue()); - mesProductionRepeatAssembly.setFid(UUID.randomUUID().toString()); + mesProductionRepeatAssembly.setFid(UUID .randomUUID().toString()); mesProductionAssembly.setRepeatAssemblySn(sn); mesProductionAssemblyRepository.update(mesProductionAssembly); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java index 2951877..ba9e438 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java @@ -99,10 +99,11 @@ public class MesProductionRecordGenerateStepService extends BaseStepService { //保存上下文产品加工规则信息集合 productionDispatchContextStepService.saveProdRuleDataContext(reqBean, prodRuleContextList); - + LOGGER.info("产线【{}】,工位【{}】,加工数累加{},{}",reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), productionPsOutContextList.size(),mesWorkCell.getIsCountFinish()); if (Objects.equal(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(),mesWorkCell.getIsCountFinish())) { // 保存班次加工数量上下文 productionCustomContextStepService.addProductionStatisticsContext(reqBean,productionPsOutContextList.size()); + } return execSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), stepResult, "生成加工记录成功!"); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionCustomContextStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionCustomContextStepService.java index 7c12f2d..d3c9277 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionCustomContextStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionCustomContextStepService.java @@ -22,6 +22,7 @@ import org.springframework.util.StringUtils; import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.logging.Logger; /** * @Description : 获取生产过程上下文对象接口实现【BUSI】 @@ -182,7 +183,8 @@ public class MesProductionCustomContextStepService extends BaseStepService imple public Boolean addProductionStatisticsContext(StationRequestBean reqBean, int count) { MesProdShiftContext mesProdShiftKvBean = getMesProdShiftKvBean(reqBean.getOrganizeCode(), reqBean.getWorkCenterCode()); - String key = new StringJoiner(MesPcnExtConstWords.AND).add(mesProdShiftKvBean.getShiftGroup()).add(mesProdShiftKvBean.getShiftCode()).toString(); + //String key = new StringJoiner(MesPcnExtConstWords.AND).add(mesProdShiftKvBean.getShiftGroup()).add(mesProdShiftKvBean.getShiftCode()).toString(); + String key = new StringJoiner(MesPcnExtConstWords.AND).add(mesProdShiftKvBean.getShiftGroup()).toString(); List stationKvBeans = getProductionStatisticsContext(reqBean); if (CollectionUtils.isEmpty(stationKvBeans)) { @@ -193,7 +195,7 @@ public class MesProductionCustomContextStepService extends BaseStepService imple saveProductionStatisticsContext(reqBean, generateStationKvBeans); } else { stationKvBeans.stream().forEach(stationKvBean -> { - if (Objects.equal(stationKvBean.getKey(), key)) { + if (stationKvBean.getKey().contains(key)) { stationKvBean.setValue(stationKvBean == null ? count + "" : (Integer.valueOf(stationKvBean.getValue()) + count) + ""); } });