@ -442,13 +442,13 @@ public class InterfaceServiceImpl implements InterfaceService {
* 2. MES 资 源 类 型 = 生 产 车 间 _ERP 工 作 中 心
* 2. MES 资 源 类 型 = 生 产 车 间 _ERP 工 作 中 心
* 3. MES 资 源 类 型 = MES 工 序
* 3. MES 资 源 类 型 = MES 工 序
* /
* /
String erpWorkCenter = componentDto . getOPERATION ( ) ;
String stepId = componentDto . getSTEP_ID ( ) ;
if ( StringUtil . isBlank ( erpWorkCenter ) ) {
if ( StringUtil . isBlank ( stepId ) ) {
throw BusinessException . build ( " BOM节点下字段【OPERATION】 不能为空!") ;
throw BusinessException . build ( " 步骤标示 不能为空!") ;
}
}
Operation operationModel = operationService . queryOperationByErpWorkCenter ( site , erpWorkCenter ) ;
Operation operationModel = operationService . getOperationByRouterStepId ( site , bom , stepId ) ;
if ( operationModel = = null ) {
if ( operationModel = = null ) {
throw BusinessException . build ( " ERP工作中心【" + erpWorkCenter + "】对应的MES工序未维护 ") ;
throw BusinessException . build ( " 步骤标识【"+ stepId + "】在工艺路线【" + bom + "】未到对应的工序 ") ;
}
}
String operationBo = operationModel . getHandle ( ) ;
String operationBo = operationModel . getHandle ( ) ;
@ -532,10 +532,21 @@ public class InterfaceServiceImpl implements InterfaceService {
String stepId = routerStepDto . getSTEP_ID ( ) ;
String stepId = routerStepDto . getSTEP_ID ( ) ;
String erpWorkCenter = routerStepDto . getOPERATION ( ) . trim ( ) ;
String erpWorkCenter = routerStepDto . getOPERATION ( ) . trim ( ) ;
if ( StringUtil . isBlank ( entryRouterStep ) ) {
entryRouterStep = stepId ;
}
//上一步骤添加当前步骤为下一步骤
if ( i > 0 ) {
RouterNextStep routerNextStep = new RouterNextStep ( ) ;
routerNextStep . setNextStepId ( stepId ) ;
routerStepList . get ( i - 1 ) . getRouterNextStepList ( ) . add ( routerNextStep ) ;
}
String operation = null ;
String operation = null ;
String operationBo = null ;
String operationBo = null ;
if ( StringUtil . isBlank ( erpWorkCenter ) ) {
if ( StringUtil . isBlank ( erpWorkCenter ) ) {
operation = ( i = = 0 ) ? "HJ01_6106GX" : "6106GX" ;
operation = "6106GX" ;
Operation operationModel = operationService . getCurrentRevisionRef ( site , operation ) ;
Operation operationModel = operationService . getCurrentRevisionRef ( site , operation ) ;
if ( operationModel = = null ) {
if ( operationModel = = null ) {
throw BusinessException . build ( "工序编号【" + operation + "】不存在" ) ;
throw BusinessException . build ( "工序编号【" + operation + "】不存在" ) ;
@ -543,19 +554,6 @@ public class InterfaceServiceImpl implements InterfaceService {
operation = operationModel . getOperation ( ) ;
operation = operationModel . getOperation ( ) ;
operationBo = operationModel . getHandle ( ) ;
operationBo = operationModel . getHandle ( ) ;
} else {
} else {
if ( StringUtil . isBlank ( entryRouterStep ) ) {
entryRouterStep = stepId ;
}
//上一步骤添加当前步骤为下一步骤
if ( i > 0 ) {
RouterNextStep routerNextStep = new RouterNextStep ( ) ;
routerNextStep . setNextStepId ( stepId ) ;
routerStepList . get ( i - 1 ) . getRouterNextStepList ( ) . add ( routerNextStep ) ;
}
/ * *
/ * *
* 工 序 参 数 说 明 :
* 工 序 参 数 说 明 :
* 1. 接 口 传 过 来 的 参 数 是 ERP 工 作 中 心
* 1. 接 口 传 过 来 的 参 数 是 ERP 工 作 中 心
@ -680,6 +678,18 @@ public class InterfaceServiceImpl implements InterfaceService {
if ( StringUtil . isBlank ( plannedItem ) ) {
if ( StringUtil . isBlank ( plannedItem ) ) {
throw BusinessException . build ( "工单的计划物料不能拿为空" ) ;
throw BusinessException . build ( "工单的计划物料不能拿为空" ) ;
}
}
//查询物料清单和工艺路线
Bom bomModel = bomService . getMaxRevisionBom ( site , plannedBom ) ;
if ( bomModel = = null ) {
throw BusinessException . build ( "工单【" + shopOrder + "】的物料清单未同步!" ) ;
}
Router routerModel = routerService . getMaxRevisionRouter ( site , plannedRouter ) ;
if ( routerModel = = null ) {
throw BusinessException . build ( "工单【" + shopOrder + "】的工艺路线未同步!" ) ;
}
String plannedItemBo = HandleEnum . ITEM . getHandle ( site , plannedItem , "A" ) ;
String plannedItemBo = HandleEnum . ITEM . getHandle ( site , plannedItem , "A" ) ;
String plannedBomBo = HandleEnum . BOM . getHandle ( site , plannedBom , bomType , "#" ) ;
String plannedBomBo = HandleEnum . BOM . getHandle ( site , plannedBom , bomType , "#" ) ;
String plannedRouterBo = HandleEnum . ROUTER . getHandle ( site , plannedRouter , routerType , "#" ) ;
String plannedRouterBo = HandleEnum . ROUTER . getHandle ( site , plannedRouter , routerType , "#" ) ;