|
|
@ -329,6 +329,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
MesProduceSn sn = getProduceSn(model.getSn(), org);
|
|
|
|
MesProduceSn sn = getProduceSn(model.getSn(), org);
|
|
|
|
|
|
|
|
|
|
|
|
String source = configService.getCfgValue(org, "LGORT");
|
|
|
|
String source = configService.getCfgValue(org, "LGORT");
|
|
|
|
|
|
|
|
String refundSource = configService.getCfgValue(org, "REFUND");
|
|
|
|
if (!StringUtils.isEmpty(model.getProductVersion())) {
|
|
|
|
if (!StringUtils.isEmpty(model.getProductVersion())) {
|
|
|
|
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
|
|
|
|
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
|
|
|
|
DdlPreparedPack.getStringEqualPack(model.getPart().getPartNo(), "partNo", ddlPackBean);
|
|
|
|
DdlPreparedPack.getStringEqualPack(model.getPart().getPartNo(), "partNo", ddlPackBean);
|
|
|
@ -360,9 +361,12 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
model.getPartInspection().setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.NORMAL.getValue());
|
|
|
|
model.getPartInspection().setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.NORMAL.getValue());
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(), model.getUserName());
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(), model.getUserName());
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
String sourceValue = configService.getCfgValue(org, "UMLGO");
|
|
|
|
|
|
|
|
if (model.getOptType() == 2) {
|
|
|
|
|
|
|
|
sourceValue = refundSource;
|
|
|
|
|
|
|
|
}
|
|
|
|
//移库 转正常、放行:8000移至2000
|
|
|
|
//移库 转正常、放行:8000移至2000
|
|
|
|
MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), configService.getCfgValue(org, "LGORT"), org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE);
|
|
|
|
MesMove move = createMove(model, sourceValue, configService.getCfgValue(org, "LGORT"), org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE);
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
moveRepository.save(move);
|
|
|
|
moveRepository.save(move);
|
|
|
|
|
|
|
|
|
|
|
@ -415,7 +419,12 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(),model.getUserName());
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(),model.getUserName());
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
|
|
|
|
MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), areaCode, org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.RETURN_MOVE);
|
|
|
|
String sourceValue = configService.getCfgValue(org, "UMLGO");
|
|
|
|
|
|
|
|
if (model.getOptType() == 2) {
|
|
|
|
|
|
|
|
sourceValue = refundSource;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MesMove move = createMove(model, sourceValue, areaCode, org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.RETURN_MOVE);
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
moveRepository.save(move);
|
|
|
|
moveRepository.save(move);
|
|
|
|
|
|
|
|
|
|
|
@ -441,12 +450,21 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(), model.getUserName());
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(), model.getUserName());
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
if (isOrder) {
|
|
|
|
if (isOrder) {
|
|
|
|
MesMove move = createMove(model, source, configService.getCfgValue(org, "SCRAP"), org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.SCRAP_MOVE);
|
|
|
|
String sourceValue = source;
|
|
|
|
|
|
|
|
if (model.getOptType() == 2) {
|
|
|
|
|
|
|
|
sourceValue = refundSource;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MesMove move = createMove(model, sourceValue, configService.getCfgValue(org, "SCRAP"), org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.SCRAP_MOVE);
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
moveRepository.save(move);
|
|
|
|
moveRepository.save(move);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
String sourceValue = configService.getCfgValue(org, "UMLGO");
|
|
|
|
|
|
|
|
if (model.getOptType() == 2) {
|
|
|
|
|
|
|
|
sourceValue = refundSource;
|
|
|
|
|
|
|
|
}
|
|
|
|
//移库 转报废 根据责任方库区对应关系的主数据,选择哪个责任方,就移动到哪个库区(8000移至8002/8003)
|
|
|
|
//移库 转报废 根据责任方库区对应关系的主数据,选择哪个责任方,就移动到哪个库区(8000移至8002/8003)
|
|
|
|
MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), areaCode, org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.SCRAP_MOVE);
|
|
|
|
MesMove move = createMove(model, sourceValue, areaCode, org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.SCRAP_MOVE);
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
moveRepository.save(move);
|
|
|
|
moveRepository.save(move);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -470,9 +488,12 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(), model.getUserName());
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(), model.getUserName());
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String sourceValue = configService.getCfgValue(org, "UMLGO");
|
|
|
|
|
|
|
|
if (model.getOptType() == 2) {
|
|
|
|
|
|
|
|
sourceValue = refundSource;
|
|
|
|
|
|
|
|
}
|
|
|
|
//移库 转正常、放行:8000移至2000
|
|
|
|
//移库 转正常、放行:8000移至2000
|
|
|
|
MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), configService.getCfgValue(org, "LGORT"), org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE);
|
|
|
|
MesMove move = createMove(model, sourceValue, configService.getCfgValue(org, "LGORT"), org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE);
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
moveRepository.save(move);
|
|
|
|
moveRepository.save(move);
|
|
|
|
|
|
|
|
|
|
|
|