|
@@ -334,24 +334,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectInvLocIdLotattList" resultMap="InvLotLocIdLotattResult">
|
|
|
select
|
|
|
- inv.location_id,sk.sku,sk.desc1 sku_name,skt.item_name sku_type_name,b.location_no,inv.qty,inv.qtyallocated
|
|
|
- ,att.lotnum, att.customer_id,w.box_no,w.is_full,z.zone_name
|
|
|
- ,lotatt01, lotatt02, lotatt03, lotatt04,lot05_dict.dict_label lotatt05, supp.supplier_name lotatt06
|
|
|
+ inv.*,
|
|
|
+ att.lotnum, att.customer_id,z.zone_name
|
|
|
+ ,lotatt01, lotatt02, lotatt03, lotatt04,lotatt05, lotatt06
|
|
|
,lotatt07, lotatt08, lotatt09, lotatt10, lotatt11, lotatt12, lotatt13, lotatt14, lotatt15, lotatt16, lotatt17
|
|
|
,lotatt18
|
|
|
from inv_lot_loc_id inv
|
|
|
left join inv_lot_att att on inv.lotnum = att.lotnum
|
|
|
left join base_location_info b on inv.location_id = b.id
|
|
|
left join base_location_zone z on b.zone_id = z.zone_id
|
|
|
- left join base_sku sk on inv.sku = sk.sku
|
|
|
- left join base_sku_type skt on sk.sku_type = skt.item_code
|
|
|
- left join (select dict_label,dict_value from sys_dict_data where dict_type = 'ams_inv_quality') lot05_dict on att.lotatt05 = lot05_dict.dict_value
|
|
|
- left join (select * from base_supplier) supp on att.lotatt06 = supp.supplier_id
|
|
|
- left join wms_box_info w on inv.location_id = w.location_id
|
|
|
<where>
|
|
|
<if test="zoneId != null and zoneId != ''"> and b.zone_id = #{zoneId}</if>
|
|
|
<if test="sku != null and sku != ''"> and (sk.sku like concat('%', #{sku}, '%') or sk.desc1 like concat('%', #{sku}, '%'))</if>
|
|
|
- <if test="locationNo != null and locationNo != ''"> and b.location_no like concat('%', #{locationNo}, '%')</if>
|
|
|
+ <if test="locationNo != null and locationNo != ''"> and b.id = #{locationNo}</if>
|
|
|
<if test="isFull != null and isFull != ''"> and w.is_full = #{isFull}</if>
|
|
|
<if test="lotattDTO != null">
|
|
|
<if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''"> and att.lotatt01 = #{lotattDTO.lotatt01}</if>
|