|
|
|
@ -567,13 +567,12 @@
|
|
|
|
|
logpm_distribution_stock lds on lds.reservation_id = ldsf.reservation_id |
|
|
|
|
where lddl.reservation_id = #{reservationId} and lds.coding =#{barcode} |
|
|
|
|
</select> |
|
|
|
|
<select id="selectDistributionAppDeliveryListPage" |
|
|
|
|
resultType="com.logpm.distribution.vo.app.DistributionAppDeliveryListVO"> |
|
|
|
|
<select id="selectDistributionAppDeliveryListPage" resultType="com.logpm.distribution.vo.app.DistributionAppDeliveryListVO"> |
|
|
|
|
SELECT |
|
|
|
|
DISTINCT lddl.id id, |
|
|
|
|
lddl.train_number trainNumber, |
|
|
|
|
-- lddl.warehouse_name warehouseName, |
|
|
|
|
-- lddl.warehouse_id warehouseId, |
|
|
|
|
<!--lddl.warehouse_name warehouseName, |
|
|
|
|
lddl.warehouse_id warehouseId, --> |
|
|
|
|
lddl.type type, |
|
|
|
|
lddl.kind kind, |
|
|
|
|
lddl.vehicle_name vehicleName, |
|
|
|
@ -582,15 +581,15 @@
|
|
|
|
|
lddl.driver_id driverId, |
|
|
|
|
lddl.delivery_status deliveryStatus, |
|
|
|
|
lddl.preparation_time preparationTime, |
|
|
|
|
-- lddl.distribution_company distributionCompany, |
|
|
|
|
-- lddl.state state, |
|
|
|
|
-- (SELECT GROUP_CONCAT(DISTINCT ldsu.forklift_name SEPARATOR ',') FROM |
|
|
|
|
-- logpm_distribution_signfor lds |
|
|
|
|
-- join logpm_distribution_reservation ldr on lds.reservation_id =ldr.id |
|
|
|
|
-- join logpm_distribution_stockup_info ldsi on ldr.id = ldsi.reservation_id |
|
|
|
|
-- join logpm_distribution_stockup ldsu on ldsu.id = ldsi.stockup_id |
|
|
|
|
-- WHERE lds.delivery_id = lddl.id |
|
|
|
|
-- ) forkliftName, |
|
|
|
|
<!-- lddl.distribution_company distributionCompany, |
|
|
|
|
lddl.state state, |
|
|
|
|
(SELECT GROUP_CONCAT(DISTINCT ldsu.forklift_name SEPARATOR ',') FROM |
|
|
|
|
logpm_distribution_signfor lds |
|
|
|
|
join logpm_distribution_reservation ldr on lds.reservation_id =ldr.id |
|
|
|
|
join logpm_distribution_stockup_info ldsi on ldr.id = ldsi.reservation_id |
|
|
|
|
join logpm_distribution_stockup ldsu on ldsu.id = ldsi.stockup_id |
|
|
|
|
WHERE lds.delivery_id = lddl.id |
|
|
|
|
) forkliftName, --> |
|
|
|
|
lddl.create_time createTime, |
|
|
|
|
(SELECT COALESCE(COUNT(*), 0) FROM logpm_distribution_signfor lds WHERE lds.delivery_id =lddl.id) |
|
|
|
|
customersNumber, |
|
|
|
@ -603,11 +602,11 @@
|
|
|
|
|
join logpm_distribution_reservation_stockarticle ldrs on ldrs.reservation_id =ldr.id |
|
|
|
|
WHERE lds.delivery_id = lddl.id |
|
|
|
|
) orderNumber, |
|
|
|
|
(SELECT COALESCE (sum(ldr.reservation_num) ,0) |
|
|
|
|
(SELECT COALESCE (sum(ldr.reservation_num + ldr.reservation_stock_list_num) ,0) |
|
|
|
|
FROM |
|
|
|
|
logpm_distribution_signfor lds |
|
|
|
|
join logpm_distribution_reservation ldr on lds.reservation_id =ldr.id |
|
|
|
|
WHERE lds.delivery_id = lddl.id |
|
|
|
|
WHERE lds.delivery_id = lddl.id and ldr.reservation_status != '40' |
|
|
|
|
) deliveryNumber, |
|
|
|
|
lddl.loading_team_id loadingTeamId, |
|
|
|
|
(SELECT GROUP_CONCAT(DISTINCT ldsu.loader_name SEPARATOR ',') from logpm_distribution_signfor lds INNER JOIN |
|
|
|
@ -798,8 +797,7 @@
|
|
|
|
|
</where> |
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
<select id="selectDistributionAppDeliveryOrderO" |
|
|
|
|
resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO"> |
|
|
|
|
<select id="selectDistributionAppDeliveryOrderO" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO"> |
|
|
|
|
SELECT |
|
|
|
|
ldsa.order_code orderCode, |
|
|
|
|
ldsa.complete_set completeSet, |
|
|
|
|