|
|
|
@ -411,8 +411,7 @@
|
|
|
|
|
HAVING count(ldpl.id) > 0 |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="pageListOwe" parameterType="com.logpm.distribution.dto.DistributionStockArticleOweDTO" |
|
|
|
|
resultType="com.logpm.distribution.entity.DistributionStockArticleEntity"> |
|
|
|
|
<select id="pageListOwe" resultType="com.logpm.distribution.entity.DistributionStockArticleEntity"> |
|
|
|
|
select ldsa.id, ldsa.tenant_id, |
|
|
|
|
ldsa.create_user, |
|
|
|
|
ldsa.create_time, |
|
|
|
@ -440,12 +439,10 @@
|
|
|
|
|
dealerName, ldsa.dealer_code, |
|
|
|
|
ldsa.train_number, ldsa.factory_train, ldsa.sending, ldsa.send_warehouse_id, ldsa.send_warehouse_name, |
|
|
|
|
ldsa.is_zero, ldsa.accept_warehouse_id, ldsa.accept_warehouse_name, ldsa.order_delivery_status, |
|
|
|
|
GROUP_CONCAT( DISTINCT lwtg.tray_code ) trays, |
|
|
|
|
GROUP_CONCAT( DISTINCT lwug.position_code ) allocation |
|
|
|
|
ldsa.trays trays, |
|
|
|
|
ldsa.allocation allocation |
|
|
|
|
from logpm_distribution_stock_article ldsa |
|
|
|
|
LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id |
|
|
|
|
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id |
|
|
|
|
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id |
|
|
|
|
<where> |
|
|
|
|
ldsa.is_deleted = 0 and ldsa.order_status in ('10','20','30','40','50','60','70') |
|
|
|
|
and ldsa.hand_quantity > 0 |
|
|
|
@ -455,6 +452,12 @@
|
|
|
|
|
#{a} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="warehouseIds != null"> |
|
|
|
|
and ldsa.warehouse_id in |
|
|
|
|
<foreach collection="warehouseIds" item="s" open="(" close=")" separator=","> |
|
|
|
|
#{s} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.orderCodeNumLike != '' and param.orderCodeNumLike != null ">and ldsa.order_code like |
|
|
|
|
concat('%',#{param.orderCodeNumLike},'%') |
|
|
|
|
</if> |
|
|
|
@ -477,16 +480,9 @@
|
|
|
|
|
concat('%',#{param.waybillNumLike},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.typeService != '' and param.typeService != null "> |
|
|
|
|
and ldsa.type_service = #{param.typeService} |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.warehouseIdList != null ">and ldsa.warehouse_id in |
|
|
|
|
<foreach collection="param.warehouseIdList" open="(" item="a" close=")" separator=","> |
|
|
|
|
#{a} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.warehouseId != '' and param.warehouseId != null ">and ldsa.warehouse_id = |
|
|
|
|
#{param.warehouseId} |
|
|
|
|
and ldsa.type_service =#{param.typeService} |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
<if test=" param.idsList != null ">and ldsa.id in |
|
|
|
|
<foreach collection="param.idsList" open="(" item="a" close=")" separator=","> |
|
|
|
|
#{a} |
|
|
|
@ -533,27 +529,27 @@
|
|
|
|
|
<if test=" param.groundingStatus != null and param.groundingStatus != '' ">and ldsa.grounding_status = |
|
|
|
|
#{param.groundingStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.genre != null and param.groundingStatus != '' ">and ldsa.genre = #{param.genre}</if> |
|
|
|
|
<if test=" param.freezeStatus != null and param.groundingStatus != '' ">and ldsa.freeze_status = |
|
|
|
|
<if test=" param.genre != null and param.genre != '' ">and ldsa.genre=#{param.genre}</if> |
|
|
|
|
<if test=" param.freezeStatus != null and param.freezeStatus != '' ">and ldsa.freeze_status = |
|
|
|
|
#{param.freezeStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.orderStatus != null and param.groundingStatus != '' ">and ldsa.order_status = |
|
|
|
|
<if test=" param.orderStatus != null and param.orderStatus != '' ">and ldsa.order_status = |
|
|
|
|
#{param.orderStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.reservationStatus != null and param.groundingStatus != '' ">and ldsa.reservation_status = |
|
|
|
|
<if test=" param.reservationStatus != null and param.reservationStatus != '' ">and ldsa.reservation_status = |
|
|
|
|
#{param.reservationStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.stockupStatus != null and param.groundingStatus != '' ">and ldsa.stockup_status = |
|
|
|
|
<if test=" param.stockupStatus != null and param.stockupStatus != '' ">and ldsa.stockup_status = |
|
|
|
|
#{param.stockupStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.notification != null and param.notification != '' ">and ldsa.notification = |
|
|
|
|
#{param.notification} |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.orderReceiveStatus != null and param.groundingStatus != '' ">and ldsa.order_receive_status |
|
|
|
|
<if test=" param.orderReceiveStatus != null and param.orderReceiveStatus != '' ">and ldsa.order_receive_status |
|
|
|
|
= |
|
|
|
|
#{param.orderReceiveStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.completeSet != null ">and ldsa.complete_set like concat('%',#{param.completeSet},'%') |
|
|
|
|
<if test=" param.completeSet != null ">and ldsa.complete_set =#{param.completeSet} |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.customerName != null and param.customerName != '' ">and ldsa.customer_name like |
|
|
|
|
concat('%',#{param.customerName},'%') |
|
|
|
@ -567,11 +563,11 @@
|
|
|
|
|
<if test=" param.customerAddress != null and param.customerAddress != '' ">and ldsa.customer_address like |
|
|
|
|
concat('%',#{param.customerAddress},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.trays != null and param.trays != '' ">and lwtg.tray_code like |
|
|
|
|
concat('%',#{param.trays},'%') |
|
|
|
|
<if test=" param.trays != null and param.trays != '' "> |
|
|
|
|
and ldsa.trays like concat('%',#{param.trays},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.allocation != null and param.allocation != '' ">and lwug.position_code like |
|
|
|
|
concat('%',#{param.allocation},'%') |
|
|
|
|
<if test=" param.allocation != null and param.allocation != '' "> |
|
|
|
|
and ldsa.allocation like concat('%',#{param.allocation},'%') |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
group by ldsa.id order by ldsa.warehouse_entry_time desc |
|
|
|
|