feat(shipping): 增加发货数量统计及出库发货日期设置
| | |
| | | if (shippingInfo != null) { |
| | | if (status.equals(2)) { |
| | | shippingInfo.setStatus("审核通过"); |
| | | shippingInfo.setShippingDate(new Date()); |
| | | //更改出库审核状态(待确认改成待审核) |
| | | stockUtils.shipmentStatus(StockOutQualifiedRecordTypeEnum.SALE_SHIP_STOCK_OUT.getCode(), shippingInfo.getId()); |
| | | } else if (status.equals(3)) { |
| | |
| | | import com.ruoyi.sales.pojo.ShippingProductDetail; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | //关联的出库单号 |
| | | private String outboundBatches; |
| | | |
| | | //发货数量 |
| | | private BigDecimal totalQuantity; |
| | | |
| | | |
| | | } |
| | |
| | | pm.unit, |
| | | p.product_name, |
| | | sl.customer_name, |
| | | sor.outbound_batches |
| | | spd.totalQuantity, |
| | | sor.outboundBatches |
| | | FROM shipping_info s |
| | | LEFT JOIN (select shipping_info_id,sum(quantity) totalQuantity from shipping_product_detail GROUP BY shipping_info_id) spd ON spd.shipping_info_id = s.id |
| | | LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id |
| | | LEFT JOIN sales_ledger_product slp ON s.sales_ledger_product_id = slp.id and slp.type = 1 |
| | | left join product_model pm on slp.product_model_id = pm.id |
| | | left join product p on pm.product_id = p.id |
| | | left join stock_out_record sor on sor.record_id= s.id and sor.record_type='13' and sor.approval_status=1 |
| | | left join (select record_id,GROUP_CONCAT(outbound_batches SEPARATOR ',') AS outboundBatches from stock_out_record where record_type='13'and approval_status=1)sor on sor.record_id= s.id |
| | | WHERE 1=1 |
| | | <if test="req.salesContractNo != null and req.salesContractNo != ''"> |
| | | AND sl.sales_contract_no LIKE CONCAT('%',#{req.salesContractNo},'%') |