|
|
|
@ -57,13 +57,12 @@
|
|
|
|
|
select DISTINCT lds.id,lds.stockup_date stockupDate, lds.stockup_user stockupUser, lds.stockup_status stockupStatus, lds.stockup_area stockupArea, |
|
|
|
|
lds.assign_status assignStatus, lds.goods_area_id goodsAreaId, lds.forklift_name forkliftName, |
|
|
|
|
lds.loader_name loaderName, lds.forklift_id forkliftId,lds.loader_id loaderId,lds.fix_time fixTime,lds.assign_time assignTime, |
|
|
|
|
btg.group_name groupName,lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode, |
|
|
|
|
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode, |
|
|
|
|
(GROUP_CONCAT(lwug.position_code)) stockipAllocation |
|
|
|
|
from logpm_distribution_stockup lds |
|
|
|
|
LEFT JOIN logpm_distribution_stockup_info ldsi on ldsi.stockup_id =lds.id |
|
|
|
|
LEFT JOIN logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldsi.reservation_id |
|
|
|
|
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldrp.parce_list_id |
|
|
|
|
LEFT JOIN logpm_basicdata_team_group btg ON lds.loader_id = btg.id |
|
|
|
|
<where> |
|
|
|
|
lds.is_deleted = 0 |
|
|
|
|
<!-- lds.tenant_id = #{param.tenantId} --> |
|
|
|
@ -79,7 +78,7 @@
|
|
|
|
|
<if test="param.assignStatus != null and param.assignStatus != '' "> and lds.assign_status = #{param.assignStatus}</if> |
|
|
|
|
<if test="param.forkliftName != null and param.forkliftName != '' "> and lds.forklift_name like concat('%', #{param.forkliftName},'%')</if> |
|
|
|
|
<if test="param.loaderName != null and param.loaderName != '' "> and lds.loader_name like concat('%', #{param.loaderName},'%')</if> |
|
|
|
|
<if test="param.groupName != null and param.groupName != '' "> and btg.group_name like concat('%', #{param.groupName},'%')</if> |
|
|
|
|
<!-- <if test="param.groupName != null and param.groupName != '' "> and btg.group_name like concat('%', #{param.groupName},'%')</if>--> |
|
|
|
|
<if test="param.typeService != null and param.typeService != '' "> and lds.type_service = #{param.typeService}</if> |
|
|
|
|
</where> |
|
|
|
|
GROUP BY lds.id |
|
|
|
@ -88,13 +87,12 @@
|
|
|
|
|
select DISTINCT lds.id,lds.stockup_date stockupDate, lds.stockup_user stockupUser, lds.stockup_status stockupStatus, lds.stockup_area stockupArea, |
|
|
|
|
lds.assign_status assignStatus, lds.goods_area_id goodsAreaId, lds.forklift_name forkliftName, |
|
|
|
|
lds.loader_name loaderName, lds.forklift_id forkliftId,lds.loader_id loaderId,lds.fix_time fixTime,lds.assign_time assignTime, |
|
|
|
|
btg.group_name groupName,lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode,(GROUP_CONCAT(lwtg.tray_code)) stockipAllocation |
|
|
|
|
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode,(GROUP_CONCAT(lwtg.tray_code)) stockipAllocation |
|
|
|
|
from logpm_distribution_stockup lds |
|
|
|
|
LEFT JOIN logpm_distribution_stockup_info ldsi on ldsi.stockup_id = lds.id |
|
|
|
|
LEFT JOIN logpm_distrilbution_bill_stock ldbs on ldbs.bill_lading_id = ldsi.reservation_id |
|
|
|
|
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.stock_article_id = ldbs.stock_article_id |
|
|
|
|
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id |
|
|
|
|
LEFT JOIN logpm_basicdata_team_group btg ON lds.loader_id = btg.id |
|
|
|
|
<where> |
|
|
|
|
lds.is_deleted = 0 |
|
|
|
|
<!-- lds.tenant_id = #{param.tenantId} --> |
|
|
|
@ -111,7 +109,7 @@
|
|
|
|
|
<if test="param.forkliftName != null and param.forkliftName != '' "> and lds.forklift_name like concat('%', #{param.forkliftName},'%')</if> |
|
|
|
|
<if test="param.loaderName != null and param.loaderName != '' "> and lds.loader_name like concat('%', #{param.loaderName},'%')</if> |
|
|
|
|
<if test="param.typeService != null and param.typeService != '' "> and lds.type_service = #{param.typeService}</if> |
|
|
|
|
<if test="param.groupName != null and param.groupName != '' "> and btg.group_name like concat('%', #{param.groupName},'%')</if> |
|
|
|
|
<!--<if test="param.groupName != null and param.groupName != '' "> and btg.group_name like concat('%', #{param.groupName},'%')</if> --> |
|
|
|
|
</where> |
|
|
|
|
GROUP BY lds.id |
|
|
|
|
</select> |
|
|
|
|