|
|
|
@ -230,5 +230,33 @@ public class WmsPurchaseOrderServiceImpl implements IWmsPurchaseOrderService {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ERP同步采购订单状态
|
|
|
|
|
* @param bos
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
@Override
|
|
|
|
|
public Boolean erpSyncUpdatePurchaseOrder(List<WmsPurchaseOrderBo> bos) {
|
|
|
|
|
for (WmsPurchaseOrderBo bo : bos) {
|
|
|
|
|
if (StringUtils.isNull(bo.getErpId())) {
|
|
|
|
|
throw new ServiceException("erpId为空");
|
|
|
|
|
}
|
|
|
|
|
WmsPurchaseOrderBo selectBo = new WmsPurchaseOrderBo();
|
|
|
|
|
selectBo.setErpId(bo.getErpId());
|
|
|
|
|
List<WmsPurchaseOrderVo> orderVoList = this.queryList(selectBo);
|
|
|
|
|
if (orderVoList.isEmpty()){
|
|
|
|
|
throw new ServiceException("无此采购订单号");
|
|
|
|
|
}
|
|
|
|
|
for (WmsPurchaseOrderVo orderVo : orderVoList) {
|
|
|
|
|
WmsPurchaseOrder update = new WmsPurchaseOrder();
|
|
|
|
|
update.setPoId(orderVo.getPoId());
|
|
|
|
|
update.setPoStatus(bo.getPoStatus());
|
|
|
|
|
baseMapper.updateById(update);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|