@ -150,6 +150,7 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
if ( ! StringUtils . isEmpty ( orderManagement . getCheckSeqCode ( ) ) ) {
model . setIsScanLocationCode ( true ) ;
}
model . setVolvoRackNo ( orderManagement . getRackNo ( ) ) ;
//发运单号
model . setShippingCode ( orderManagement . getShippingCode ( ) ) ;
//零件发运组
@ -329,8 +330,6 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
shippingOrderManagementDetailRepository . update ( detail ) ;
break ;
}
final String confirmPartType = getConfirmPartType ( orderManagement ) ;
}
if ( ! scanFlg ) {
@ -617,7 +616,7 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
DdlPreparedPack . getStringEqualPack ( model . getVolvoRackNo ( ) , "barCode" , rackPackBean ) ;
MesVolvoRack volvoRack = mesVolvoRackRDao . getByProperty ( rackPackBean ) ;
if ( volvoRack = = null ) {
throw new ImppBusiException ( String . format ( "无效料架条码【%s】, 请 重新扫描 ! ", model . getVolvoRackNo ( ) ) ) ;
throw new ImppBusiException ( String . format ( "无效料架条码【%s】, 请 检查数据 ! ", model . getVolvoRackNo ( ) ) ) ;
}
}
@ -638,24 +637,28 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
orderManagement . getStatus ( ) = = MesExtEnumUtil . SHIPPING_ORDER_STATUS . PUBLISHED . getValue ( ) ) {
orderManagement . setStartScanTime ( TimeTool . getNowTime ( true ) ) ;
}
//根据发运单查询装车单明细信息
DdlPackBean packBean = DdlPackBean . getDdlPackBean ( orderManagement . getOrganizeCode ( ) ) ;
DdlPreparedPack . getStringEqualPack ( orderManagement . getShippingCode ( ) , "shippingCode" , packBean ) ;
MesLoadingListDetail listDetail = listDetailRepository . getByProperty ( packBean ) ;
MesLoadingList loadingList = null ;
if ( ! Objects . isNull ( listDetail ) ) {
packBean = DdlPackBean . getDdlPackBean ( orderManagement . getOrganizeCode ( ) ) ;
DdlPreparedPack . getNumEqualPack ( listDetail . getPid ( ) , "id" , packBean ) ;
loadingList = listRepository . getByProperty ( packBean ) ;
//反填装车单信息到发运单
if ( ! Objects . isNull ( loadingList ) ) {
orderManagement . setOrderCode ( loadingList . getOrderCode ( ) ) ;
orderManagement . setLoadingListId ( loadingList . getId ( ) ) ;
//零件发运组
MesPartShippingGroup shippingGroup = Objects . isNull ( model . getMesPartShippingGroup ( ) ) ? getMesPartShippingGroup ( orderManagement . getOrganizeCode ( ) , orderManagement . getShippingGroupCode ( ) ) : model . getMesPartShippingGroup ( ) ;
//根据发运单查询装车单明细信息
if ( Objects . equals ( shippingGroup . getIsFirstInstall ( ) , CommonEnumUtil . TRUE_OR_FALSE . TRUE . getValue ( ) ) ) {
DdlPackBean packBean = DdlPackBean . getDdlPackBean ( orderManagement . getOrganizeCode ( ) ) ;
DdlPreparedPack . getStringEqualPack ( orderManagement . getShippingCode ( ) , "shippingCode" , packBean ) ;
MesLoadingListDetail listDetail = listDetailRepository . getByProperty ( packBean ) ;
if ( ! Objects . isNull ( listDetail ) ) {
packBean = DdlPackBean . getDdlPackBean ( orderManagement . getOrganizeCode ( ) ) ;
DdlPreparedPack . getNumEqualPack ( listDetail . getPid ( ) , "id" , packBean ) ;
loadingList = listRepository . getByProperty ( packBean ) ;
//反填装车单信息到发运单
if ( ! Objects . isNull ( loadingList ) ) {
orderManagement . setOrderCode ( loadingList . getOrderCode ( ) ) ;
orderManagement . setLoadingListId ( loadingList . getId ( ) ) ;
}
//更新装车单明细对应的发运单状态=发运
listDetail . setStatus ( MesExtEnumUtil . LOADING_ORDER_DETAIL_SHIPPING_STATUS . SHIPPINGED . getValue ( ) ) ;
ConvertBean . serviceModelUpdate ( listDetail , userInfo ) ;
listDetailRepository . update ( listDetail ) ;
}
//更新装车单明细对应的发运单状态=发运
listDetail . setStatus ( MesExtEnumUtil . LOADING_ORDER_DETAIL_SHIPPING_STATUS . SHIPPINGED . getValue ( ) ) ;
ConvertBean . serviceModelUpdate ( listDetail , userInfo ) ;
listDetailRepository . update ( listDetail ) ;
}
//发运单状态修改为校验完成
orderManagement . setSystemSyncStatus ( CommonEnumUtil . FALSE ) ;