Browse Source

修改查询

training
caoyizhong 1 year ago
parent
commit
bb14076da6
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  2. 32
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml

@ -294,7 +294,7 @@
ldr.id id,
ldr.consignee consignee,
ldr.reservation_num reservationNum,
lds.loaded_number loadingNub,
COALESCE(lds.loaded_number + lds.loadedin_number, 0) loadingNub,
(SELECT COALESCE(COUNT(*), 0) from logpm_distribution_reservation_stockarticle ldrs WHERE ldrs.reservation_id =ldr.id ) ordNub,
COALESCE(lds.loaded_number + lds.loadedin_number, 0) signNub
FROM

32
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -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,

Loading…
Cancel
Save