@ -80,8 +80,8 @@ public class AsBusrepairInventorybillService extends MybatisBaseService<AsBusrep
asBusrepairInventorybillDetailService . saveOrUpdateDetail ( detailList , sid ) ;
}
String orgPath = dto . getOrgPath ( ) ;
if ( StringUtils . isNotBlank ( orgPath ) ) {
String useOrgSid = sysStaffOrgFeign . getOrgSidByPath ( orgPath ) . getData ( ) ;
if ( StringUtils . isNotBlank ( orgPath ) ) {
String useOrgSid = sysStaffOrgFeign . getOrgSidByPath ( orgPath ) . getData ( ) ;
asBusrepairInventorybill . setCreateOrgSid ( useOrgSid ) ;
asBusrepairInventorybill . setUseOrgSid ( useOrgSid ) ;
}
@ -107,15 +107,32 @@ public class AsBusrepairInventorybillService extends MybatisBaseService<AsBusrep
String sid = saveOrUdateBill ( dto ) . getData ( ) ;
AsBusrepairInventorybill asBusrepairInventorybill = fetchBySid ( sid ) ;
WmsInventoryBillDto wmsInventoryBillDto = new WmsInventoryBillDto ( ) ;
BeanUtil . copyProperties ( asBusrepairInventorybill , wmsInventoryBillDto , "sid" , "id" ) ;
BeanUtil . copyProperties ( asBusrepairInventorybill , wmsInventoryBillDto , "sid" , "id" ) ;
List < WmsInventoryBillDetailDto > wmsInventoryBillDetailDtos = new ArrayList < > ( ) ;
List < AsBusrepairInventorybillDetail > list = asBusrepairInventorybillDetailService . selectByMainSid ( sid ) ;
list . removeAll ( Collections . singleton ( null ) ) ;
if ( ! list . isEmpty ( ) ) {
if ( ! list . isEmpty ( ) ) {
wmsInventoryBillDetailDtos = Optional . ofNullable ( list ) . orElse ( new ArrayList < > ( ) ) . stream ( ) . map ( m - > JSON . parseObject ( JSON . toJSONString ( m ) , WmsInventoryBillDetailDto . class ) ) . collect ( Collectors . toList ( ) ) ;
wmsInventoryBillDto . setWmsInventoryBillDetailDtos ( wmsInventoryBillDetailDtos ) ;
}
wmsInventoryBillFeign . outStorage ( wmsInventoryBillDto ) ;
return rb . success ( ) ;
}
public ResultBean quitBill ( AsBusrepairInventorybillDto dto ) {
ResultBean rb = ResultBean . fireFail ( ) ;
String sid = saveOrUdateBill ( dto ) . getData ( ) ;
AsBusrepairInventorybill asBusrepairInventorybill = fetchBySid ( sid ) ;
WmsInventoryBillDto wmsInventoryBillDto = new WmsInventoryBillDto ( ) ;
BeanUtil . copyProperties ( asBusrepairInventorybill , wmsInventoryBillDto , "sid" , "id" ) ;
List < WmsInventoryBillDetailDto > wmsInventoryBillDetailDtos = new ArrayList < > ( ) ;
List < AsBusrepairInventorybillDetail > list = asBusrepairInventorybillDetailService . selectByMainSid ( sid ) ;
list . removeAll ( Collections . singleton ( null ) ) ;
if ( ! list . isEmpty ( ) ) {
wmsInventoryBillDetailDtos = Optional . ofNullable ( list ) . orElse ( new ArrayList < > ( ) ) . stream ( ) . map ( m - > JSON . parseObject ( JSON . toJSONString ( m ) , WmsInventoryBillDetailDto . class ) ) . collect ( Collectors . toList ( ) ) ;
wmsInventoryBillDto . setWmsInventoryBillDetailDtos ( wmsInventoryBillDetailDtos ) ;
}
wmsInventoryBillFeign . inStorage ( wmsInventoryBillDto ) ;
return rb . success ( ) ;
}
}