|
|
|
@ -71,13 +71,14 @@ public class MesProductionReocrdGenerateStepService extends BaseStepService {
|
|
|
|
|
*/
|
|
|
|
|
MesProductionProcessContext productionProcessContext = productionProcessContextStepService.getEquipmentVariableList(reqBean, MesExtEnumUtil.EQUIP_VARIABLE_TYPE.PRODUCTION.getValue());
|
|
|
|
|
MesWorkCell mesWorkCell = productionProcessContext.getWorkCell();
|
|
|
|
|
MesProdShiftContext mesProdShiftKvBean = productionCustomContextStepService.getMesProdShiftKvBean(reqBean.getOrganizeCode(), reqBean.getWorkCenterCode());
|
|
|
|
|
|
|
|
|
|
List<MesProductionPsOutContext> mesProduceSnContexts = mesProductionDispatchContextStepService.getProductionPsOutContext(reqBean);
|
|
|
|
|
|
|
|
|
|
List<MesProductionRecord> mesProductionRecords = new ArrayList<>();
|
|
|
|
|
mesProduceSnContexts.forEach(mesProductionPsOutContext -> {
|
|
|
|
|
|
|
|
|
|
MesProductionRecord mesProductionRecord = getMesProductionRecord(productionProcessContext, mesProductionPsOutContext, reqBean);
|
|
|
|
|
MesProductionRecord mesProductionRecord = getMesProductionRecord(productionProcessContext, mesProductionPsOutContext,mesProdShiftKvBean, reqBean);
|
|
|
|
|
ConvertBean.serviceModelInitialize(mesProductionRecord, reqBean.getUserInfo());
|
|
|
|
|
mesProductionRecords.add(mesProductionRecord);
|
|
|
|
|
});
|
|
|
|
@ -91,7 +92,7 @@ public class MesProductionReocrdGenerateStepService extends BaseStepService {
|
|
|
|
|
return execSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(), stepResult, "生成加工记录成功");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private MesProductionRecord getMesProductionRecord(MesProductionProcessContext productionProcessContext, MesProductionPsOutContext mesProduceSn, StationRequestBean reqBean) {
|
|
|
|
|
private MesProductionRecord getMesProductionRecord(MesProductionProcessContext productionProcessContext, MesProductionPsOutContext mesProduceSn,MesProdShiftContext mesProdShiftKvBean, StationRequestBean reqBean) {
|
|
|
|
|
MesProductionRecord mesProductionRecord = new MesProductionRecord();
|
|
|
|
|
|
|
|
|
|
mesProductionRecord.setSerialNumber(mesProduceSn.getSerialNumber());
|
|
|
|
@ -106,8 +107,9 @@ public class MesProductionReocrdGenerateStepService extends BaseStepService {
|
|
|
|
|
mesProductionRecord.setIsComplete(MesEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
|
|
|
|
|
mesProductionRecord.setCompleteDateTime(DateUtil.formatDateTime(new Date()));
|
|
|
|
|
mesProductionRecord.setLotNo(mesProduceSn.getLotNo());
|
|
|
|
|
//mesProductionRecord.setShiftGroup();
|
|
|
|
|
//mesProductionRecord.setWorkOrderNo(productionProcessContext.get);
|
|
|
|
|
mesProductionRecord.setShiftGroup(mesProdShiftKvBean.getShiftGroup());
|
|
|
|
|
mesProductionRecord.setShiftCode(mesProdShiftKvBean.getShiftCode());
|
|
|
|
|
mesProductionRecord.setWorkOrderNo(mesProduceSn.getWorkOrderNo());
|
|
|
|
|
|
|
|
|
|
String mouldNo = "";
|
|
|
|
|
MesEquipVariableCollectContext mesFirstMouldNoCollectContext = mesProductionDispatchContextStepService.getFirstMouldNoContext(reqBean);
|
|
|
|
|