|
|
|
@ -751,7 +751,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//移库 转正常、放行:8000移至2000
|
|
|
|
|
MesMove move = createMove(model, sourceValue, target, org, workCenterCode, MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE);
|
|
|
|
|
MesMove move = createLotMove(model,mesNcPersonModel.getQty(), sourceValue, target, org, workCenterCode, MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE);
|
|
|
|
|
ConvertBean.serviceModelInitialize(move, model.getUserName());
|
|
|
|
|
moveRepository.save(move);
|
|
|
|
|
}
|
|
|
|
@ -824,7 +824,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
}
|
|
|
|
|
//partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
|
|
MesMove move = createMove(model, sourceValue, mesNcPersonModel.getInventoryLocationCode(), org,workCenterCode, MesExtEnumUtil.MOVE_TYPE.RETURN_MOVE);
|
|
|
|
|
MesMove move = createLotMove(model,mesNcPersonModel.getQty(), sourceValue, mesNcPersonModel.getInventoryLocationCode(), org,workCenterCode, MesExtEnumUtil.MOVE_TYPE.RETURN_MOVE);
|
|
|
|
|
ConvertBean.serviceModelInitialize(move, model.getUserName());
|
|
|
|
|
moveRepository.save(move);
|
|
|
|
|
|
|
|
|
@ -864,7 +864,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
sourceValue = refundSource;
|
|
|
|
|
}
|
|
|
|
|
//移库 转报废 根据责任方库区对应关系的主数据,选择哪个责任方,就移动到哪个库区(8000移至8002/8003)
|
|
|
|
|
MesMove move = createMove(model, sourceValue, mesNcPersonModel.getInventoryLocationCode(), org, workCenterCode, MesExtEnumUtil.MOVE_TYPE.SCRAP_MOVE);
|
|
|
|
|
MesMove move = createLotMove(model,mesNcPersonModel.getQty(), sourceValue, mesNcPersonModel.getInventoryLocationCode(), org, workCenterCode, MesExtEnumUtil.MOVE_TYPE.SCRAP_MOVE);
|
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
|
moveRepository.save(move);
|
|
|
|
|
} else if (type == MesExtEnumUtil.PART_INSPECTION_NC_STATUS.RELEASE.getValue()) {
|
|
|
|
@ -904,7 +904,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
target = version.getReceiveInventoryPoint();
|
|
|
|
|
}
|
|
|
|
|
//移库 转正常、放行:8000移至2000
|
|
|
|
|
MesMove move = createMove(model, sourceValue, target, org, workCenterCode, MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE);
|
|
|
|
|
MesMove move = createLotMove(model,mesNcPersonModel.getQty(), sourceValue, target, org, workCenterCode, MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE);
|
|
|
|
|
ConvertBean.serviceModelInitialize(move, model.getUserName());
|
|
|
|
|
moveRepository.save(move);
|
|
|
|
|
|
|
|
|
@ -1009,6 +1009,33 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
return move;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private MesMove createLotMove(MesNcProcessingInputModel model,double qty, String source, String target, String org, String workCenterCode, MesExtEnumUtil.MOVE_TYPE moveType) {
|
|
|
|
|
GenSerialNoModel serialNoModel = new GenSerialNoModel("INPUT_DEFECT_ZRSUM");
|
|
|
|
|
serialNoModel.setPartNo(model.getPart().getPartNo());
|
|
|
|
|
ResultBean rb = syncFuncService.syncSerialNo(serialNoModel, model.getPartInspection().getModifyUser(), org, 1);
|
|
|
|
|
String zrsum = "";
|
|
|
|
|
if (null != rb && !CollectionUtils.isEmpty(rb.getResultList())) {
|
|
|
|
|
zrsum = (rb.getResultList().get(0)).toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MesMove move = new MesMove();
|
|
|
|
|
move.setMatnr(model.getPart().getPartNo());
|
|
|
|
|
move.setOrganizeCode(org);
|
|
|
|
|
move.setFactoryCode(org);
|
|
|
|
|
move.setLgort(source);
|
|
|
|
|
move.setUmlgo(target);
|
|
|
|
|
move.setMenge(qty);
|
|
|
|
|
move.setMeins(model.getPart().getUnit());
|
|
|
|
|
move.setZrsum(zrsum);
|
|
|
|
|
move.setPostDate(TimeTool.getToday());
|
|
|
|
|
move.setPostTime(TimeTool.getTimeShortWithColon());
|
|
|
|
|
move.setMoveType(moveType.getValue());
|
|
|
|
|
move.setPartInspectionId(model.getPartInspection().getId());
|
|
|
|
|
move.setProductSn(model.getSn());
|
|
|
|
|
move.setWorkCenter(prodOrgExtService.getErpWorkCenterCode(org, workCenterCode));
|
|
|
|
|
return move;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private MesMove createMove(MesNcProcessingInputModel model, String source, String target, String org, String workCenterCode, MesExtEnumUtil.MOVE_TYPE moveType, String partNo) {
|
|
|
|
|
GenSerialNoModel serialNoModel = new GenSerialNoModel("INPUT_DEFECT_ZRSUM");
|
|
|
|
|
serialNoModel.setPartNo(partNo);
|
|
|
|
|