Browse Source

fix:增加直发商家签收明查询

fix-sign
pref_mail@163.com 5 months ago
parent
commit
0835486111
  1. 9
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  2. 122
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml

9
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java

@ -215,4 +215,13 @@ public class LoadCarsDTO implements Serializable {
private String createTime;
private String ids;
/**
* 商场联系人
*/
private String mallPerson;
/**
* 商场联系电话
*/
private String mallMobile;
}

122
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml

@ -9,7 +9,7 @@
and ltlso.warehouse_id = #{warehouseId}
</select>
<delete id="deleteListBySignStatusAndLoadIdAndWarehouseId" >
<delete id="deleteListBySignStatusAndLoadIdAndWarehouseId">
delete from logpm_trunkline_load_sign_order
where load_id = #{loadId}
and warehouse_id = #{warehouseId}
@ -39,7 +39,8 @@
left join logpm_trunkline_cars_load ltcl on ltcl.id = ltlso.load_id
LEFT JOIN logpm_trunkline_cars_order ltco on ltco.sign_order_id = ltlso.id
<where>
and (ltlso.warehouse_id = #{param.warehouseId} or ltlso.final_node_id = #{param.warehouseId} or ltlso.driver_user_id = #{param.userId} or ltlso.assistant_user_id = #{param.userId})
and (ltlso.warehouse_id = #{param.warehouseId} or ltlso.final_node_id = #{param.warehouseId} or
ltlso.driver_user_id = #{param.userId} or ltlso.assistant_user_id = #{param.userId})
<if test="param.loadId != null">
and ltlso.load_id = #{param.loadId}
@ -60,57 +61,88 @@
<select id="finaSignOrderDetail" resultType="com.logpm.trunkline.vo.TrunklineLoadSignOrderVO">
select ltlso.id id,
ltlso.load_id loadId,
ltlso.warehouse_id warehouseId,
ltlso.plan_num planNum,
ltlso.load_sign_code loadSignCode,
ltlso.sign_num signNum,
ltcl.driver_name driverName,
ltcl.driver_mobile driverMobile,
ltcl.car_number carNumber,
ltcl.cars_line_name carsLineName,
ltcl.cars_no carsNo,
SUM(ltco.real_num) AS loadingNum
ltlso.load_id loadId,
ltlso.warehouse_id warehouseId,
ltlso.plan_num planNum,
ltlso.load_sign_code loadSignCode,
ltlso.sign_num signNum,
ltcl.driver_name driverName,
ltcl.driver_mobile driverMobile,
ltcl.car_number carNumber,
ltcl.cars_line_name carsLineName,
ltcl.cars_no carsNo,
SUM(ltco.real_num) AS loadingNum
from logpm_trunkline_load_sign_order ltlso
left join logpm_trunkline_cars_load ltcl on ltcl.id = ltlso.load_id
LEFT JOIN logpm_trunkline_cars_order ltco on ltco.sign_order_id = ltlso.id
left join logpm_trunkline_cars_load ltcl on ltcl.id = ltlso.load_id
LEFT JOIN logpm_trunkline_cars_order ltco on ltco.sign_order_id = ltlso.id
where ltlso.id = #{signOrderId}
GROUP BY ltlso.id
</select>
<select id="findSignOrderDetailList" resultType="com.logpm.trunkline.vo.SignOrderDetailVO">
select ltcls.id loadScanId,
ltcls.waybill_no waybillNo,
ltcls.order_code orderCode,
ltcls.warehouse_name warehouseName,
ldsa.mall_name mallName,
ldsa.consignee_person mallPerson,
ldsa.consignee_mobile mallMobile,
ldsa.consignee_address mallAddress,
ltcls.scan_code scanCode,
ltcls.scan_status scanStatus,
ltcls.type type,
ltcls.num num,
ltcls.unload_num unloadNum,
ltcls.unload_num signNum,
ltcls.remark remak,
ltcls.load_code carsNo,
ltcls.sign_user_name signUserName,
ltcls.sign_time signTime,
ltcls.unload_time unloadTime,
ltco.sign_order_id signOrderId
ltcls.waybill_no waybillNo,
ltcls.order_code orderCode,
ltcls.warehouse_name warehouseName,
ldsa.mall_name mallName,
ldsa.consignee_person mallPerson,
ldsa.consignee_mobile mallMobile,
ldsa.consignee_address mallAddress,
ltcls.scan_code scanCode,
ltcls.scan_status scanStatus,
ltcls.type type,
ltcls.num num,
ltcls.unload_num unloadNum,
ltcls.unload_num signNum,
ltcls.remark remak,
ltcls.load_code carsNo,
ltcls.sign_user_name signUserName,
ltcls.sign_time signTime,
ltcls.unload_time unloadTime,
ltco.sign_order_id signOrderId
from logpm_trunkline_cars_order ltco
left join logpm_trunkline_cars_load_scan ltcls on ltco.load_id = ltcls.load_id and ltco.node_id = ltcls.warehouse_id and ltcls.order_code = ltco.order_code and ltcls.waybill_no = ltco.waybill_no
left join logpm_distribution_stock_article ldsa on ldsa.order_code = ltco.order_code and ldsa.warehouse_id = ltco.node_id
left join logpm_trunkline_cars_load_scan ltcls on ltco.load_id = ltcls.load_id and ltco.node_id =
ltcls.warehouse_id and ltcls.order_code = ltco.order_code and ltcls.waybill_no = ltco.waybill_no
left join logpm_distribution_stock_article ldsa on ldsa.order_code = ltco.order_code and ldsa.warehouse_id =
ltco.node_id
where ltco.sign_order_id = #{param.signOrderId}
and ltco.is_customer = '1'
and ltcls.id is not null
<if test="param.mallName != null and param.mallName !='' ">
and ldsa.mall_name like concat('%',#{param.mallName},'%')
</if>
<if test="param.scanCode != null and param.scanCode != '' ">
and ltcls.scan_code = #{param.scanCode}
</if>
<if test="param.waybillNo != null and param.waybillNo != '' ">
and ltcls.waybill_no = #{param.waybillNo}
</if>
<if test="param.orderCode != null and param.orderCode != '' ">
and ltco.order_code = #{param.orderCode}
</if>
<if test="param.carsNo != null and param.carsNo != '' ">
and ltcls.load_code = #{param.carsNo}
</if>
<if test="param.mallPerson != null and param.mallPerson != '' ">
and ldsa.consignee_person = #{param.mallPerson}
</if>
<if test="param.mallMobile != null and param.mallMobile != '' ">
and ldsa.consignee_mobile = #{param.mallMobile}
</if>
<if test="param.scanStatus != null ">
and ltcls.scan_status = #{param.scanStatus}
</if>
<if test="param.type != null ">
and ltcls.type = #{param.type}
</if>
</select>
<update id="updateBelongToWarehouse">
update logpm_trunkline_load_sign_order
set belong_to_warehouse_id = #{warehouseId},
belong_to_warehouse_name = #{warehouseName}
belong_to_warehouse_name = #{warehouseName}
where id = #{signOrderId}
</update>
@ -138,17 +170,17 @@
from logpm_trunkline_load_sign_order ltlso
left join logpm_trunkline_cars_load ltcl on ltcl.id = ltlso.load_id
LEFT JOIN logpm_trunkline_cars_order ltco on ltco.sign_order_id = ltlso.id
left join logpm_warehouse_warehouse lww on lww.id = ltlso.warehouse_id
left join logpm_warehouse_warehouse lww on lww.id = ltlso.warehouse_id
<where>
and (ltlso.warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
or ltlso.final_node_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>)
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>)
<if test="param.loadId != null">
and ltlso.load_id = #{param.loadId}
@ -171,7 +203,7 @@
</select>
<delete id="deleteListBySignOrderIds" >
<delete id="deleteListBySignOrderIds">
delete from logpm_trunkline_load_sign_order
where id in
<foreach collection="delSignOrderList" item="signOrderId" open="(" separator="," close=")">

Loading…
Cancel
Save