| | |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.other.service.impl.TempFileServiceImpl; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.sales.dto.SalesLedgerProductDto; |
| | | import com.ruoyi.sales.dto.ShippingInfoDto; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.mapper.ShippingInfoMapper; |
| | |
| | | //扣减库存 |
| | | if(!"已发货".equals(byId.getStatus())){ |
| | | SalesLedgerProduct salesLedgerProduct = salesLedgerProductMapper.selectById(byId.getSalesLedgerProductId()); |
| | | stockUtils.substractStock(salesLedgerProduct.getProductModelId(), salesLedgerProduct.getQuantity(), StockOutQualifiedRecordTypeEnum.SALE_SHIP_STOCK_OUT.getCode(), req.getId()); |
| | | stockUtils.substractStock(salesLedgerProduct.getProductModelId(), salesLedgerProduct.getQuantity(), |
| | | StockOutQualifiedRecordTypeEnum.SALE_SHIP_STOCK_OUT.getCode(), req.getId(),salesLedgerProduct.getBatchNo(),salesLedgerProduct.getCustomer() |
| | | ); |
| | | } |
| | | byId.setExpressNumber(req.getExpressNumber()); |
| | | byId.setExpressCompany(req.getExpressCompany()); |
| | |
| | | |
| | | return this.removeBatchByIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<SalesLedgerProductDto> getReturnManagementDtoById(Long shippingId) { |
| | | return shippingInfoMapper.getReturnManagementDtoById(shippingId ); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<ShippingInfo> getShippingInfoByCustomerName(String customerName) { |
| | | return shippingInfoMapper.getShippingInfoByCustomerName(customerName); |
| | | } |
| | | } |