Merge remote-tracking branch 'origin/master'

master
赵嘉伟 3 years ago
commit 609511900b

@ -8,6 +8,8 @@ package com.foreverwin.mesnac.common.constant;
*/
public interface Constants {
String OP_6106GX = "6106GX";
String STATUS_NEW = "NEW";
String STATE_CONFIRM ="CONF";
String STATE_REJECT="REJ";
@ -175,6 +177,4 @@ public interface Constants {
*/
String UNTREATED = "UN"; //未处理
String PROCESSED = "PR"; //已处理
}

@ -370,7 +370,7 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl<ProdReadyTaskMapper, P
LabelPrintDto labelPrintDto = new LabelPrintDto();
labelPrintDto.setPrinter(printName);
labelPrintDto.setPrintTemplate(Constants.PRINT_TYPE_SFC);
labelPrintDto.setItem(sfcDispatchDto.getItem());
labelPrintDto.setItem(selectCurrent.getItem());
labelPrintDto.setItemDescription(selectCurrent.getDescription());
labelPrintDto.setSfc(prodReadyTask.getSfc());
Sfc sfcServiceById = sfcService.getById(HandleEnum.SFC.getHandle(site, prodReadyTask.getSfc()));

@ -94,13 +94,6 @@ public class ShopOrderReleaseServiceImpl implements ShopOrderReleaseService {
}
for (ShopOrderRelease shopOrderReleaseModel : shopOrderList) {
String workCenter = shopOrderReleaseModel.getWorkCenter();
String workCenterBo = HandleEnum.WORK_CENTER.getHandle(site, workCenter);
WorkCenter workCenterModel = workCenterService.getById(workCenterBo);
if (workCenterModel == null) {
throw new BaseException("工作中心[" + workCenter + "]不存在");
}
//查询工单信息
String shopOrder = shopOrderReleaseModel.getShopOrder();
String shopOrderBo = shopOrderReleaseModel.getShopOrderBo();
@ -133,6 +126,23 @@ public class ShopOrderReleaseServiceImpl implements ShopOrderReleaseService {
throw new BaseException("工艺路线[" +StringUtils.trimHandle(routerBo)+ "]主数据不完整,请确认");
}
//获取车间
String workCenter = null;
String workCenterBo = null;
for (RouterDTO routerDTO: routerList) {
String operation = routerDTO.getOperation();
if (!Constants.OP_6106GX.equals(operation) && operation.contains("_")) {
workCenter = operation.split("_")[0];
workCenterBo = HandleEnum.WORK_CENTER.getHandle(site, workCenter);
WorkCenter workCenterModel = workCenterService.getById(workCenterBo);
if (workCenterModel == null) {
throw BusinessException.build("生产车间【" +workCenter+ "】不存在");
}
break;
}
}
//工单下达
ReleaseShopOrderResponse response = null;
try {

@ -546,7 +546,7 @@ public class InterfaceServiceImpl implements InterfaceService {
String operation = null;
String operationBo = null;
if (StringUtil.isBlank(erpWorkCenter)) {
operation = "6106GX";
operation = Constants.OP_6106GX;
Operation operationModel = operationService.getCurrentRevisionRef(site, operation);
if (operationModel == null) {
throw BusinessException.build("工序编号【" +operation+ "】不存在");

@ -247,7 +247,7 @@ public class SplitSfcServiceImpl extends ServiceImpl<SplitSfcMapper, SplitSfc> i
splitSfc.setCreatedDateTime(LocalDateTime.now());
save(splitSfc);
String workCenterBo = shopOrderService.getById(HandleEnum.SHOP_ORDER.getHandle(site, sfcData.getShopOrder())).getPlannedWorkCenterBo();
sfcDispatchCommonService.saveSfcDispatch(site,CommonMethods.getUser(),StringUtil.trimHandle(workCenterBo),newSfc, sfcData.getShopOrder(),routerBo);
sfcDispatchCommonService.saveSfcDispatch(site,CommonMethods.getUser(),StringUtil.trimHandle(workCenterBo),newSfc, sfcData.getShopOrder(),maxRevisionRouter.getHandle());
return splitSfc;
} catch (Exception e) {
ExceptionUtil.throwException(e);

Loading…
Cancel
Save