|
@@ -1,125 +1,126 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
<!DOCTYPE mapper
|
|
|
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ruoyi.ams.inv.mapper.InvLotLocIdMapper">
|
|
|
|
|
|
<resultMap type="InvLotLocId" id="InvLotLocIdResult">
|
|
|
- <result property="lotnum" column="lotnum" />
|
|
|
- <result property="locationId" column="location_id" />
|
|
|
- <result property="traceid" column="traceid" />
|
|
|
- <result property="customerId" column="customer_id" />
|
|
|
- <result property="sku" column="sku" />
|
|
|
- <result property="qty" column="qty" />
|
|
|
- <result property="qtyEach" column="qty_each" />
|
|
|
- <result property="qtyallocated" column="qtyallocated" />
|
|
|
- <result property="qtyallocatedEach" column="qtyallocated_each" />
|
|
|
- <result property="qtypa" column="qtypa" />
|
|
|
- <result property="qtyrpin" column="qtyrpin" />
|
|
|
- <result property="qtyrpout" column="qtyrpout" />
|
|
|
- <result property="qtymvin" column="qtymvin" />
|
|
|
- <result property="qtymvout" column="qtymvout" />
|
|
|
- <result property="qtyonhold" column="qtyonhold" />
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
- <result property="remark" column="remark" />
|
|
|
+ <result property="lotnum" column="lotnum"/>
|
|
|
+ <result property="locationId" column="location_id"/>
|
|
|
+ <result property="traceid" column="traceid"/>
|
|
|
+ <result property="customerId" column="customer_id"/>
|
|
|
+ <result property="sku" column="sku"/>
|
|
|
+ <result property="qty" column="qty"/>
|
|
|
+ <result property="qtyEach" column="qty_each"/>
|
|
|
+ <result property="qtyallocated" column="qtyallocated"/>
|
|
|
+ <result property="qtyallocatedEach" column="qtyallocated_each"/>
|
|
|
+ <result property="qtypa" column="qtypa"/>
|
|
|
+ <result property="qtyrpin" column="qtyrpin"/>
|
|
|
+ <result property="qtyrpout" column="qtyrpout"/>
|
|
|
+ <result property="qtymvin" column="qtymvin"/>
|
|
|
+ <result property="qtymvout" column="qtymvout"/>
|
|
|
+ <result property="qtyonhold" column="qtyonhold"/>
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap type="invLotLocIdLotattVO" id="InvLotLocIdLotattResult">
|
|
|
- <result property="lotnum" column="lotnum" />
|
|
|
- <result property="locationNo" column="location_no" />
|
|
|
- <result property="locationId" column="location_id" />
|
|
|
- <result property="zoneId" column="zone_id" />
|
|
|
- <result property="isEmpty" column="isEmpty" />
|
|
|
- <result property="stockStatus" column="stockStatus" />
|
|
|
- <result property="zoneName" column="zone_name" />
|
|
|
- <result property="customerId" column="customer_id" />
|
|
|
- <result property="sku" column="sku" />
|
|
|
- <result property="skuName" column="sku_name" />
|
|
|
- <result property="skuTypeName" column="sku_type_name" />
|
|
|
- <result property="skuModel" column="sku_model" />
|
|
|
- <result property="qty" column="qty" />
|
|
|
- <result property="qtyallocated" column="qtyallocated" />
|
|
|
- <result property="palletNo" column="box_no" />
|
|
|
- <result property="isFull" column="is_full" />
|
|
|
- <result property="lotnum" column="lotnum" />
|
|
|
- <result property="lotatt01" column="lotatt01" />
|
|
|
- <result property="lotatt02" column="lotatt02" />
|
|
|
- <result property="lotatt03" column="lotatt03" />
|
|
|
- <result property="lotatt04" column="lotatt04" />
|
|
|
- <result property="lotatt05" column="lotatt05" />
|
|
|
- <result property="lotatt06" column="lotatt06" />
|
|
|
- <result property="lotatt07" column="lotatt07" />
|
|
|
- <result property="lotatt08" column="lotatt08" />
|
|
|
- <result property="lotatt09" column="lotatt09" />
|
|
|
- <result property="lotatt10" column="lotatt10" />
|
|
|
- <result property="lotatt11" column="lotatt11" />
|
|
|
- <result property="lotatt12" column="lotatt12" />
|
|
|
- <result property="lotatt13" column="lotatt13" />
|
|
|
- <result property="lotatt14" column="lotatt14" />
|
|
|
- <result property="lotatt15" column="lotatt15" />
|
|
|
- <result property="lotatt16" column="lotatt16" />
|
|
|
- <result property="lotatt17" column="lotatt17" />
|
|
|
- <result property="lotatt18" column="lotatt18" />
|
|
|
+ <result property="lotnum" column="lotnum"/>
|
|
|
+ <result property="locationNo" column="location_no"/>
|
|
|
+ <result property="locationId" column="location_id"/>
|
|
|
+ <result property="zoneId" column="zone_id"/>
|
|
|
+ <result property="isEmpty" column="isEmpty"/>
|
|
|
+ <result property="stockStatus" column="stockStatus"/>
|
|
|
+ <result property="zoneName" column="zone_name"/>
|
|
|
+ <result property="customerId" column="customer_id"/>
|
|
|
+ <result property="sku" column="sku"/>
|
|
|
+ <result property="skuName" column="sku_name"/>
|
|
|
+ <result property="skuTypeName" column="sku_type_name"/>
|
|
|
+ <result property="skuModel" column="sku_model"/>
|
|
|
+ <result property="qty" column="qty"/>
|
|
|
+ <result property="qtyallocated" column="qtyallocated"/>
|
|
|
+ <result property="palletNo" column="box_no"/>
|
|
|
+ <result property="isFull" column="is_full"/>
|
|
|
+ <result property="specs" column="specs"/>
|
|
|
+ <result property="lotnum" column="lotnum"/>
|
|
|
+ <result property="lotatt01" column="lotatt01"/>
|
|
|
+ <result property="lotatt02" column="lotatt02"/>
|
|
|
+ <result property="lotatt03" column="lotatt03"/>
|
|
|
+ <result property="lotatt04" column="lotatt04"/>
|
|
|
+ <result property="lotatt05" column="lotatt05"/>
|
|
|
+ <result property="lotatt06" column="lotatt06"/>
|
|
|
+ <result property="lotatt07" column="lotatt07"/>
|
|
|
+ <result property="lotatt08" column="lotatt08"/>
|
|
|
+ <result property="lotatt09" column="lotatt09"/>
|
|
|
+ <result property="lotatt10" column="lotatt10"/>
|
|
|
+ <result property="lotatt11" column="lotatt11"/>
|
|
|
+ <result property="lotatt12" column="lotatt12"/>
|
|
|
+ <result property="lotatt13" column="lotatt13"/>
|
|
|
+ <result property="lotatt14" column="lotatt14"/>
|
|
|
+ <result property="lotatt15" column="lotatt15"/>
|
|
|
+ <result property="lotatt16" column="lotatt16"/>
|
|
|
+ <result property="lotatt17" column="lotatt17"/>
|
|
|
+ <result property="lotatt18" column="lotatt18"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap type="BaseLocationLotattVO" id="BaseLocationInfoLotattResult">
|
|
|
- <result property="id" column="id" />
|
|
|
- <result property="warehouseId" column="warehouse_id" />
|
|
|
- <result property="zoneId" column="zone_id" />
|
|
|
- <result property="locationNo" column="location_no" />
|
|
|
- <result property="locationBarcode" column="location_barcode" />
|
|
|
- <result property="rowNo" column="row_no" />
|
|
|
- <result property="rowIndex" column="row_index" />
|
|
|
- <result property="colNo" column="col_no" />
|
|
|
- <result property="colIndex" column="col_index" />
|
|
|
- <result property="shiftNo" column="shift_no" />
|
|
|
- <result property="shiftIndex" column="shift_index" />
|
|
|
- <result property="stockStatus" column="stock_status" />
|
|
|
- <result property="isEmpty" column="is_empty" />
|
|
|
- <result property="bindSku" column="bind_sku" />
|
|
|
- <result property="locationType" column="location_type" />
|
|
|
- <result property="rackId" column="rack_id" />
|
|
|
- <result property="agvStation" column="agv_station" />
|
|
|
- <result property="foldedTag" column="folded_tag" />
|
|
|
- <result property="foldedCount" column="folded_count" />
|
|
|
- <result property="userdefine1" column="userdefine1" />
|
|
|
- <result property="userdefine2" column="userdefine2" />
|
|
|
- <result property="userdefine3" column="userdefine3" />
|
|
|
- <result property="userdefine4" column="userdefine4" />
|
|
|
- <result property="userdefine5" column="userdefine5" />
|
|
|
- <result property="userdefine6" column="userdefine6" />
|
|
|
- <result property="userdefine7" column="userdefine7" />
|
|
|
- <result property="userdefine8" column="userdefine8" />
|
|
|
- <result property="userdefine9" column="userdefine9" />
|
|
|
- <result property="userdefine10" column="userdefine10" />
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
- <result property="remark" column="remark" />
|
|
|
- <result property="sku" column="sku" />
|
|
|
- <result property="qty" column="qty" />
|
|
|
- <result property="lotattVO.lotatt01" column="lotatt01" />
|
|
|
- <result property="lotattVO.lotatt02" column="lotatt02" />
|
|
|
- <result property="lotattVO.lotatt03" column="lotatt03" />
|
|
|
- <result property="lotattVO.lotatt04" column="lotatt04" />
|
|
|
- <result property="lotattVO.lotatt05" column="lotatt05" />
|
|
|
- <result property="lotattVO.lotatt06" column="lotatt06" />
|
|
|
- <result property="lotattVO.lotatt07" column="lotatt07" />
|
|
|
- <result property="lotattVO.lotatt08" column="lotatt08" />
|
|
|
- <result property="lotattVO.lotatt09" column="lotatt09" />
|
|
|
- <result property="lotattVO.lotatt10" column="lotatt10" />
|
|
|
- <result property="lotattVO.lotatt11" column="lotatt11" />
|
|
|
- <result property="lotattVO.lotatt12" column="lotatt12" />
|
|
|
- <result property="lotattVO.lotatt13" column="lotatt13" />
|
|
|
- <result property="lotattVO.lotatt14" column="lotatt14" />
|
|
|
- <result property="lotattVO.lotatt15" column="lotatt15" />
|
|
|
- <result property="lotattVO.lotatt16" column="lotatt16" />
|
|
|
- <result property="lotattVO.lotatt17" column="lotatt17" />
|
|
|
- <result property="lotattVO.lotatt18" column="lotatt18" />
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="warehouseId" column="warehouse_id"/>
|
|
|
+ <result property="zoneId" column="zone_id"/>
|
|
|
+ <result property="locationNo" column="location_no"/>
|
|
|
+ <result property="locationBarcode" column="location_barcode"/>
|
|
|
+ <result property="rowNo" column="row_no"/>
|
|
|
+ <result property="rowIndex" column="row_index"/>
|
|
|
+ <result property="colNo" column="col_no"/>
|
|
|
+ <result property="colIndex" column="col_index"/>
|
|
|
+ <result property="shiftNo" column="shift_no"/>
|
|
|
+ <result property="shiftIndex" column="shift_index"/>
|
|
|
+ <result property="stockStatus" column="stock_status"/>
|
|
|
+ <result property="isEmpty" column="is_empty"/>
|
|
|
+ <result property="bindSku" column="bind_sku"/>
|
|
|
+ <result property="locationType" column="location_type"/>
|
|
|
+ <result property="rackId" column="rack_id"/>
|
|
|
+ <result property="agvStation" column="agv_station"/>
|
|
|
+ <result property="foldedTag" column="folded_tag"/>
|
|
|
+ <result property="foldedCount" column="folded_count"/>
|
|
|
+ <result property="userdefine1" column="userdefine1"/>
|
|
|
+ <result property="userdefine2" column="userdefine2"/>
|
|
|
+ <result property="userdefine3" column="userdefine3"/>
|
|
|
+ <result property="userdefine4" column="userdefine4"/>
|
|
|
+ <result property="userdefine5" column="userdefine5"/>
|
|
|
+ <result property="userdefine6" column="userdefine6"/>
|
|
|
+ <result property="userdefine7" column="userdefine7"/>
|
|
|
+ <result property="userdefine8" column="userdefine8"/>
|
|
|
+ <result property="userdefine9" column="userdefine9"/>
|
|
|
+ <result property="userdefine10" column="userdefine10"/>
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
+ <result property="sku" column="sku"/>
|
|
|
+ <result property="qty" column="qty"/>
|
|
|
+ <result property="lotattVO.lotatt01" column="lotatt01"/>
|
|
|
+ <result property="lotattVO.lotatt02" column="lotatt02"/>
|
|
|
+ <result property="lotattVO.lotatt03" column="lotatt03"/>
|
|
|
+ <result property="lotattVO.lotatt04" column="lotatt04"/>
|
|
|
+ <result property="lotattVO.lotatt05" column="lotatt05"/>
|
|
|
+ <result property="lotattVO.lotatt06" column="lotatt06"/>
|
|
|
+ <result property="lotattVO.lotatt07" column="lotatt07"/>
|
|
|
+ <result property="lotattVO.lotatt08" column="lotatt08"/>
|
|
|
+ <result property="lotattVO.lotatt09" column="lotatt09"/>
|
|
|
+ <result property="lotattVO.lotatt10" column="lotatt10"/>
|
|
|
+ <result property="lotattVO.lotatt11" column="lotatt11"/>
|
|
|
+ <result property="lotattVO.lotatt12" column="lotatt12"/>
|
|
|
+ <result property="lotattVO.lotatt13" column="lotatt13"/>
|
|
|
+ <result property="lotattVO.lotatt14" column="lotatt14"/>
|
|
|
+ <result property="lotattVO.lotatt15" column="lotatt15"/>
|
|
|
+ <result property="lotattVO.lotatt16" column="lotatt16"/>
|
|
|
+ <result property="lotattVO.lotatt17" column="lotatt17"/>
|
|
|
+ <result property="lotattVO.lotatt18" column="lotatt18"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectInvLotLocIdVo">
|
|
@@ -129,11 +130,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectInvLotLocIdList" parameterType="InvLotLocId" resultMap="InvLotLocIdResult">
|
|
|
<include refid="selectInvLotLocIdVo"/>
|
|
|
<where>
|
|
|
- <if test="locationId != null and locationId != ''"> and location_id = #{locationId}</if>
|
|
|
- <if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
|
|
- <if test="sku != null and sku != ''"> and sku = #{sku}</if>
|
|
|
- <if test="lotnum != null and lotnum != ''"> and lotnum = #{lotnum}</if>
|
|
|
- <if test="traceid != null and traceid != ''"> and traceid = #{traceid}</if>
|
|
|
+ <if test="locationId != null and locationId != ''">and location_id = #{locationId}</if>
|
|
|
+ <if test="customerId != null and customerId != ''">and customer_id = #{customerId}</if>
|
|
|
+ <if test="sku != null and sku != ''">and sku = #{sku}</if>
|
|
|
+ <if test="lotnum != null and lotnum != ''">and lotnum = #{lotnum}</if>
|
|
|
+ <if test="traceid != null and traceid != ''">and traceid = #{traceid}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -178,7 +179,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
<if test="remark != null">remark,</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="lotnum != null">#{lotnum},</if>
|
|
|
<if test="locationId != null">#{locationId},</if>
|
|
@@ -200,7 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateInvLotLocId" parameterType="InvLotLocId">
|
|
@@ -261,21 +262,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectInvLocationList" resultMap="BaseLocationInfoLotattResult">
|
|
|
select
|
|
|
- b.id, b.warehouse_id, b.zone_id, b.location_no, b.location_barcode, b.row_no, b.row_index, b.col_no, b.col_index, b.shift_no,
|
|
|
- b.shift_index, b.stock_status, b.is_empty, b.bind_sku, b.location_type, b.rack_id, b.agv_station, b.folded_tag, b.folded_count,
|
|
|
- b.userdefine1, b.userdefine2, b.userdefine3, b.userdefine4, b.userdefine5, b.userdefine6, b.userdefine7, b.userdefine8,
|
|
|
- b.userdefine9, b.userdefine10, b.create_by, b.create_time, b.update_by, b.update_time, b.remark, inv.sku, inv.qty, att.*
|
|
|
+ b.id, b.warehouse_id, b.zone_id, b.location_no, b.location_barcode, b.row_no, b.row_index, b.col_no,
|
|
|
+ b.col_index, b.shift_no,
|
|
|
+ b.shift_index, b.stock_status, b.is_empty, b.bind_sku, b.location_type, b.rack_id, b.agv_station, b.folded_tag,
|
|
|
+ b.folded_count,
|
|
|
+ b.userdefine1, b.userdefine2, b.userdefine3, b.userdefine4, b.userdefine5, b.userdefine6, b.userdefine7,
|
|
|
+ b.userdefine8,
|
|
|
+ b.userdefine9, b.userdefine10, b.create_by, b.create_time, b.update_by, b.update_time, b.remark, inv.sku,
|
|
|
+ inv.qty, att.*
|
|
|
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_sku sk on inv.sku = sk.sku
|
|
|
left join base_sku_type skt on sk.sku_type = skt.item_code
|
|
|
<where>
|
|
|
- <if test="zoneId != null and zoneId != ''"> and b.zone_id = #{zoneId}</if>
|
|
|
- <if test="sku != null and sku != ''"> and sk.sku = #{sku}</if>
|
|
|
- <if test="skuType != null and skuType != ''"> and skt.item_code = #{skuType}</if>
|
|
|
+ <if test="zoneId != null and zoneId != ''">and b.zone_id = #{zoneId}</if>
|
|
|
+ <if test="sku != null and sku != ''">and sk.sku = #{sku}</if>
|
|
|
+ <if test="skuType != null and skuType != ''">and skt.item_code = #{skuType}</if>
|
|
|
</where>
|
|
|
- order by lpad(b.row_no, 11, '0'),b.row_index,lpad(b.shift_no, 11, '0'),b.shift_index,lpad(b.col_no, 11, '0'),b.col_index desc
|
|
|
+ order by lpad(b.row_no, 11, '0'),b.row_index,lpad(b.shift_no, 11, '0'),b.shift_index,lpad(b.col_no, 11,
|
|
|
+ '0'),b.col_index desc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectInvZoneBySkuLotatt" resultMap="BaseLocationInfoLotattResult">
|
|
@@ -288,27 +294,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join base_sku_type skt on sk.sku_type = skt.item_code
|
|
|
left join base_location_zone bz on b.zone_id = bz.zone_id
|
|
|
<where>
|
|
|
- <if test="sku != null and sku != ''"> and sk.sku = #{sku}</if>
|
|
|
- <if test="skuType != null and skuType != ''"> and skt.item_code = #{skuType}</if>
|
|
|
+ <if test="sku != null and sku != ''">and sk.sku = #{sku}</if>
|
|
|
+ <if test="skuType != null and skuType != ''">and skt.item_code = #{skuType}</if>
|
|
|
<if test="lotattDTO != null">
|
|
|
- <if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''"> and att.lotatt01 = #{lotattDTO.lotatt01}</if>
|
|
|
- <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''"> and att.lotatt02 = #{lotattDTO.lotatt02}</if>
|
|
|
- <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''"> and att.lotatt03 = #{lotattDTO.lotatt03}</if>
|
|
|
- <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''"> and att.lotatt04 = #{lotattDTO.lotatt04}</if>
|
|
|
- <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''"> and att.lotatt05 = #{lotattDTO.lotatt05}</if>
|
|
|
- <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''"> and att.lotatt06 = #{lotattDTO.lotatt06}</if>
|
|
|
- <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''"> and att.lotatt07 = #{lotattDTO.lotatt07}</if>
|
|
|
- <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''"> and att.lotatt08 = #{lotattDTO.lotatt08}</if>
|
|
|
- <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''"> and att.lotatt09 = #{lotattDTO.lotatt09}</if>
|
|
|
- <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''"> and att.lotatt10 = #{lotattDTO.lotatt10}</if>
|
|
|
- <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''"> and att.lotatt11 = #{lotattDTO.lotatt11}</if>
|
|
|
- <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''"> and att.lotatt12 = #{lotattDTO.lotatt12}</if>
|
|
|
- <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''"> and att.lotatt13 = #{lotattDTO.lotatt13}</if>
|
|
|
- <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''"> and att.lotatt14 = #{lotattDTO.lotatt14}</if>
|
|
|
- <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''"> and att.lotatt15 = #{lotattDTO.lotatt15}</if>
|
|
|
- <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''"> and att.lotatt16 = #{lotattDTO.lotatt16}</if>
|
|
|
- <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''"> and att.lotatt17 = #{lotattDTO.lotatt17}</if>
|
|
|
- <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''"> and att.lotatt18 = #{lotattDTO.lotatt18}</if>
|
|
|
+ <if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''">and att.lotatt01 =
|
|
|
+ #{lotattDTO.lotatt01}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''">and att.lotatt02 =
|
|
|
+ #{lotattDTO.lotatt02}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''">and att.lotatt03 =
|
|
|
+ #{lotattDTO.lotatt03}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''">and att.lotatt04 =
|
|
|
+ #{lotattDTO.lotatt04}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''">and att.lotatt05 =
|
|
|
+ #{lotattDTO.lotatt05}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''">and att.lotatt06 =
|
|
|
+ #{lotattDTO.lotatt06}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''">and att.lotatt07 =
|
|
|
+ #{lotattDTO.lotatt07}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''">and att.lotatt08 =
|
|
|
+ #{lotattDTO.lotatt08}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''">and att.lotatt09 =
|
|
|
+ #{lotattDTO.lotatt09}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''">and att.lotatt10 =
|
|
|
+ #{lotattDTO.lotatt10}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''">and att.lotatt11 =
|
|
|
+ #{lotattDTO.lotatt11}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''">and att.lotatt12 =
|
|
|
+ #{lotattDTO.lotatt12}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''">and att.lotatt13 =
|
|
|
+ #{lotattDTO.lotatt13}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''">and att.lotatt14 =
|
|
|
+ #{lotattDTO.lotatt14}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''">and att.lotatt15 =
|
|
|
+ #{lotattDTO.lotatt15}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''">and att.lotatt16 =
|
|
|
+ #{lotattDTO.lotatt16}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''">and att.lotatt17 =
|
|
|
+ #{lotattDTO.lotatt17}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''">and att.lotatt18 =
|
|
|
+ #{lotattDTO.lotatt18}
|
|
|
+ </if>
|
|
|
</if>
|
|
|
</where>
|
|
|
and bz.userdefine1 = 'INV'
|
|
@@ -324,7 +366,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join base_sku sk on inv.sku = sk.sku
|
|
|
<where>
|
|
|
1=1
|
|
|
- <if test="zoneId != null and zoneId != ''"> and b.zone_id = #{zoneId}</if>
|
|
|
+ <if test="zoneId != null and zoneId != ''">and b.zone_id = #{zoneId}</if>
|
|
|
</where>
|
|
|
group by att.lotatt01
|
|
|
order by att.lotatt01
|
|
@@ -332,7 +374,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectInvLocIdLotattList" resultMap="InvLotLocIdLotattResult">
|
|
|
select
|
|
|
- inv.location_id,sk.sku,sk.desc1 sku_name,sk.model sku_model,skt.item_name sku_type_name,b.location_no,inv.qty,inv.qtyallocated
|
|
|
+ inv.location_id,sk.sku,sk.desc1 sku_name,sk.model sku_model,skt.item_name
|
|
|
+ sku_type_name,b.location_no,inv.qty,inv.qtyallocated
|
|
|
,att.lotnum, att.customer_id,w.box_no,w.is_full
|
|
|
,b.zone_id,b.stock_status stockStatus,b.is_empty isEmpty,z.zone_name
|
|
|
,lotatt01, lotatt02, lotatt03, lotatt04,lot05_dict.dict_label lotatt05, supp.supplier_name lotatt06
|
|
@@ -344,43 +387,82 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
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 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 att.lotatt07 = w.box_no
|
|
|
+ left join wms_box_info w on att.lotatt07 = w.box_no
|
|
|
<where>
|
|
|
- <if test="zoneId != null and zoneId != ''"> and b.zone_id = #{zoneId}</if>
|
|
|
- <if test="sku != null and sku != ''"> and inv.sku = #{sku}</if>
|
|
|
- <if test="lotnum != null and lotnum != ''"> and inv.lotnum = #{lotnum}</if>
|
|
|
- <if test="locationId != null and locationId != ''"> and inv.location_id = #{locationId}</if>
|
|
|
- <if test="locationNo != null and locationNo != ''"> and b.location_no like concat('%', #{locationNo}, '%')</if>
|
|
|
- <if test="isFull != null and isFull != ''"> and w.is_full = #{isFull}</if>
|
|
|
+ <if test="zoneId != null and zoneId != ''">and b.zone_id = #{zoneId}</if>
|
|
|
+ <if test="sku != null and sku != ''">and inv.sku = #{sku}</if>
|
|
|
+ <if test="lotnum != null and lotnum != ''">and inv.lotnum = #{lotnum}</if>
|
|
|
+ <if test="locationId != null and locationId != ''">and inv.location_id = #{locationId}</if>
|
|
|
+ <if test="locationNo != null and locationNo != ''">and b.location_no like concat('%', #{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>
|
|
|
- <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''"> and att.lotatt02 = #{lotattDTO.lotatt02}</if>
|
|
|
- <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''"> and att.lotatt03 = #{lotattDTO.lotatt03}</if>
|
|
|
- <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''"> and att.lotatt04 = #{lotattDTO.lotatt04}</if>
|
|
|
- <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''"> and att.lotatt05 = #{lotattDTO.lotatt05}</if>
|
|
|
- <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''"> and att.lotatt06 = #{lotattDTO.lotatt06}</if>
|
|
|
- <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''"> and att.lotatt07 = #{lotattDTO.lotatt07}</if>
|
|
|
- <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''"> and att.lotatt08 = #{lotattDTO.lotatt08}</if>
|
|
|
- <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''"> and att.lotatt09 = #{lotattDTO.lotatt09}</if>
|
|
|
- <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''"> and att.lotatt10 = #{lotattDTO.lotatt10}</if>
|
|
|
- <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''"> and att.lotatt11 = #{lotattDTO.lotatt11}</if>
|
|
|
- <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''"> and att.lotatt12 = #{lotattDTO.lotatt12}</if>
|
|
|
- <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''"> and att.lotatt13 = #{lotattDTO.lotatt13}</if>
|
|
|
- <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''"> and att.lotatt14 = #{lotattDTO.lotatt14}</if>
|
|
|
- <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''"> and att.lotatt15 = #{lotattDTO.lotatt15}</if>
|
|
|
- <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''"> and att.lotatt16 = #{lotattDTO.lotatt16}</if>
|
|
|
- <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''"> and att.lotatt17 = #{lotattDTO.lotatt17}</if>
|
|
|
- <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''"> and att.lotatt18 = #{lotattDTO.lotatt18}</if>
|
|
|
+ <if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''">and att.lotatt01 =
|
|
|
+ #{lotattDTO.lotatt01}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''">and att.lotatt02 =
|
|
|
+ #{lotattDTO.lotatt02}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''">and att.lotatt03 =
|
|
|
+ #{lotattDTO.lotatt03}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''">and att.lotatt04 =
|
|
|
+ #{lotattDTO.lotatt04}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''">and att.lotatt05 =
|
|
|
+ #{lotattDTO.lotatt05}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''">and att.lotatt06 =
|
|
|
+ #{lotattDTO.lotatt06}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''">and att.lotatt07 =
|
|
|
+ #{lotattDTO.lotatt07}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''">and att.lotatt08 =
|
|
|
+ #{lotattDTO.lotatt08}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''">and att.lotatt09 =
|
|
|
+ #{lotattDTO.lotatt09}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''">and att.lotatt10 =
|
|
|
+ #{lotattDTO.lotatt10}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''">and att.lotatt11 =
|
|
|
+ #{lotattDTO.lotatt11}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''">and att.lotatt12 =
|
|
|
+ #{lotattDTO.lotatt12}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''">and att.lotatt13 =
|
|
|
+ #{lotattDTO.lotatt13}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''">and att.lotatt14 =
|
|
|
+ #{lotattDTO.lotatt14}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''">and att.lotatt15 =
|
|
|
+ #{lotattDTO.lotatt15}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''">and att.lotatt16 =
|
|
|
+ #{lotattDTO.lotatt16}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''">and att.lotatt17 =
|
|
|
+ #{lotattDTO.lotatt17}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''">and att.lotatt18 =
|
|
|
+ #{lotattDTO.lotatt18}
|
|
|
+ </if>
|
|
|
</if>
|
|
|
</where>
|
|
|
- order by lpad(b.row_no, 11, '0'),b.row_index,lpad(b.shift_no, 11, '0'),b.shift_index,lpad(b.col_no, 11, '0'),b.col_index desc
|
|
|
+ order by lpad(b.row_no, 11, '0'),b.row_index,lpad(b.shift_no, 11, '0'),b.shift_index,lpad(b.col_no, 11,
|
|
|
+ '0'),b.col_index desc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectInvLocIdLotattByLocationId" resultMap="InvLotLocIdLotattResult">
|
|
|
select
|
|
|
- inv.location_id,sk.sku,sk.desc1 sku_name,b.location_no,inv.qty,inv.qtyallocated
|
|
|
+ inv.location_id,sk.sku,sk.specs,sk.desc1 sku_name,b.location_no,inv.qty,inv.qtyallocated
|
|
|
,att.lotnum, att.customer_id
|
|
|
, lotatt01, lotatt02, lotatt03, lotatt04,qua.dict_label lotatt05, lotatt06, lotatt07, lotatt08
|
|
|
, lotatt09, lotatt10, lotatt11, lotatt12, lotatt13, lotatt14, lotatt15, lotatt16, lotatt17, lotatt18
|
|
@@ -410,7 +492,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
where location_id = #{locationFrom}
|
|
|
</update>
|
|
|
|
|
|
- <update id="moveInvByLocationId" parameterType="Object">
|
|
|
+ <update id="moveInvByLocationId" parameterType="Object">
|
|
|
update inv_lot_loc_id
|
|
|
set location_id = #{locationTo},traceid = #{traceid}
|
|
|
where location_id = #{locationFrom}
|
|
@@ -449,29 +531,65 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join base_sku_type skt on sk.sku_type = skt.item_code
|
|
|
left join base_location_zone bz on b.zone_id = bz.zone_id
|
|
|
<where>
|
|
|
- <if test="sku != null and sku != ''"> and sk.sku = #{sku}</if>
|
|
|
+ <if test="sku != null and sku != ''">and sk.sku = #{sku}</if>
|
|
|
<if test="lotattDTO != null">
|
|
|
- <if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''"> and att.lotatt01 = #{lotattDTO.lotatt01}</if>
|
|
|
- <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''"> and att.lotatt02 = #{lotattDTO.lotatt02}</if>
|
|
|
- <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''"> and att.lotatt03 = #{lotattDTO.lotatt03}</if>
|
|
|
- <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''"> and att.lotatt04 = #{lotattDTO.lotatt04}</if>
|
|
|
- <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''"> and att.lotatt05 = #{lotattDTO.lotatt05}</if>
|
|
|
- <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''"> and att.lotatt06 = #{lotattDTO.lotatt06}</if>
|
|
|
- <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''"> and att.lotatt07 = #{lotattDTO.lotatt07}</if>
|
|
|
- <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''"> and att.lotatt08 = #{lotattDTO.lotatt08}</if>
|
|
|
- <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''"> and att.lotatt09 = #{lotattDTO.lotatt09}</if>
|
|
|
- <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''"> and att.lotatt10 = #{lotattDTO.lotatt10}</if>
|
|
|
- <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''"> and att.lotatt11 = #{lotattDTO.lotatt11}</if>
|
|
|
- <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''"> and att.lotatt12 = #{lotattDTO.lotatt12}</if>
|
|
|
- <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''"> and att.lotatt13 = #{lotattDTO.lotatt13}</if>
|
|
|
- <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''"> and att.lotatt14 = #{lotattDTO.lotatt14}</if>
|
|
|
- <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''"> and att.lotatt15 = #{lotattDTO.lotatt15}</if>
|
|
|
- <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''"> and att.lotatt16 = #{lotattDTO.lotatt16}</if>
|
|
|
- <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''"> and att.lotatt17 = #{lotattDTO.lotatt17}</if>
|
|
|
- <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''"> and att.lotatt18 = #{lotattDTO.lotatt18}</if>
|
|
|
+ <if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''">and att.lotatt01 =
|
|
|
+ #{lotattDTO.lotatt01}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''">and att.lotatt02 =
|
|
|
+ #{lotattDTO.lotatt02}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''">and att.lotatt03 =
|
|
|
+ #{lotattDTO.lotatt03}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''">and att.lotatt04 =
|
|
|
+ #{lotattDTO.lotatt04}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''">and att.lotatt05 =
|
|
|
+ #{lotattDTO.lotatt05}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''">and att.lotatt06 =
|
|
|
+ #{lotattDTO.lotatt06}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''">and att.lotatt07 =
|
|
|
+ #{lotattDTO.lotatt07}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''">and att.lotatt08 =
|
|
|
+ #{lotattDTO.lotatt08}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''">and att.lotatt09 =
|
|
|
+ #{lotattDTO.lotatt09}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''">and att.lotatt10 =
|
|
|
+ #{lotattDTO.lotatt10}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''">and att.lotatt11 =
|
|
|
+ #{lotattDTO.lotatt11}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''">and att.lotatt12 =
|
|
|
+ #{lotattDTO.lotatt12}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''">and att.lotatt13 =
|
|
|
+ #{lotattDTO.lotatt13}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''">and att.lotatt14 =
|
|
|
+ #{lotattDTO.lotatt14}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''">and att.lotatt15 =
|
|
|
+ #{lotattDTO.lotatt15}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''">and att.lotatt16 =
|
|
|
+ #{lotattDTO.lotatt16}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''">and att.lotatt17 =
|
|
|
+ #{lotattDTO.lotatt17}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''">and att.lotatt18 =
|
|
|
+ #{lotattDTO.lotatt18}
|
|
|
+ </if>
|
|
|
</if>
|
|
|
- and bz.zone_id in
|
|
|
- <foreach item="item" index="index" collection="zoneIdList" open="(" separator="," close=" )">
|
|
|
+ and bz.zone_id in
|
|
|
+ <foreach item="item" index="index" collection="zoneIdList" open="(" separator="," close=" )">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
group by sk.sku
|
|
@@ -488,26 +606,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join base_sku_type skt on sk.sku_type = skt.item_code
|
|
|
left join base_location_zone bz on b.zone_id = bz.zone_id
|
|
|
<where>
|
|
|
- <if test="sku != null and sku != ''"> and sk.sku = #{sku}</if>
|
|
|
+ <if test="sku != null and sku != ''">and sk.sku = #{sku}</if>
|
|
|
<if test="lotattDTO != null">
|
|
|
- <if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''"> and att.lotatt01 = #{lotattDTO.lotatt01}</if>
|
|
|
- <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''"> and att.lotatt02 = #{lotattDTO.lotatt02}</if>
|
|
|
- <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''"> and att.lotatt03 = #{lotattDTO.lotatt03}</if>
|
|
|
- <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''"> and att.lotatt04 = #{lotattDTO.lotatt04}</if>
|
|
|
- <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''"> and att.lotatt05 = #{lotattDTO.lotatt05}</if>
|
|
|
- <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''"> and att.lotatt06 = #{lotattDTO.lotatt06}</if>
|
|
|
- <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''"> and att.lotatt07 = #{lotattDTO.lotatt07}</if>
|
|
|
- <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''"> and att.lotatt08 = #{lotattDTO.lotatt08}</if>
|
|
|
- <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''"> and att.lotatt09 = #{lotattDTO.lotatt09}</if>
|
|
|
- <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''"> and att.lotatt10 = #{lotattDTO.lotatt10}</if>
|
|
|
- <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''"> and att.lotatt11 = #{lotattDTO.lotatt11}</if>
|
|
|
- <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''"> and att.lotatt12 = #{lotattDTO.lotatt12}</if>
|
|
|
- <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''"> and att.lotatt13 = #{lotattDTO.lotatt13}</if>
|
|
|
- <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''"> and att.lotatt14 = #{lotattDTO.lotatt14}</if>
|
|
|
- <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''"> and att.lotatt15 = #{lotattDTO.lotatt15}</if>
|
|
|
- <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''"> and att.lotatt16 = #{lotattDTO.lotatt16}</if>
|
|
|
- <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''"> and att.lotatt17 = #{lotattDTO.lotatt17}</if>
|
|
|
- <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''"> and att.lotatt18 = #{lotattDTO.lotatt18}</if>
|
|
|
+ <if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''">and att.lotatt01 =
|
|
|
+ #{lotattDTO.lotatt01}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''">and att.lotatt02 =
|
|
|
+ #{lotattDTO.lotatt02}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''">and att.lotatt03 =
|
|
|
+ #{lotattDTO.lotatt03}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''">and att.lotatt04 =
|
|
|
+ #{lotattDTO.lotatt04}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''">and att.lotatt05 =
|
|
|
+ #{lotattDTO.lotatt05}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''">and att.lotatt06 =
|
|
|
+ #{lotattDTO.lotatt06}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''">and att.lotatt07 =
|
|
|
+ #{lotattDTO.lotatt07}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''">and att.lotatt08 =
|
|
|
+ #{lotattDTO.lotatt08}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''">and att.lotatt09 =
|
|
|
+ #{lotattDTO.lotatt09}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''">and att.lotatt10 =
|
|
|
+ #{lotattDTO.lotatt10}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''">and att.lotatt11 =
|
|
|
+ #{lotattDTO.lotatt11}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''">and att.lotatt12 =
|
|
|
+ #{lotattDTO.lotatt12}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''">and att.lotatt13 =
|
|
|
+ #{lotattDTO.lotatt13}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''">and att.lotatt14 =
|
|
|
+ #{lotattDTO.lotatt14}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''">and att.lotatt15 =
|
|
|
+ #{lotattDTO.lotatt15}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''">and att.lotatt16 =
|
|
|
+ #{lotattDTO.lotatt16}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''">and att.lotatt17 =
|
|
|
+ #{lotattDTO.lotatt17}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''">and att.lotatt18 =
|
|
|
+ #{lotattDTO.lotatt18}
|
|
|
+ </if>
|
|
|
</if>
|
|
|
and b.id = #{locationId}
|
|
|
group by sk.sku
|
|
@@ -516,38 +670,75 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="queryInvOrderBy" parameterType="object" resultType="invLotLocIdForm">
|
|
|
select inv.lotnum, inv.location_id locationId, inv.traceid, inv.customer_id customerId
|
|
|
- , inv.sku, inv.qty, inv.qty_each qtyEach, inv.qtyallocated, inv.qtyallocated_each qtyallocatedEach
|
|
|
- ,att.lotatt01,att.lotatt02,att.lotatt03,att.lotatt04,att.lotatt05,att.lotatt06,att.lotatt07,att.lotatt08,att.lotatt09
|
|
|
- ,att.lotatt10,att.lotatt11,att.lotatt12,att.lotatt13,att.lotatt14,att.lotatt15,att.lotatt16,att.lotatt17,att.lotatt18
|
|
|
+ , inv.sku, inv.qty, inv.qty_each qtyEach, inv.qtyallocated, inv.qtyallocated_each qtyallocatedEach
|
|
|
+ ,att.lotatt01,att.lotatt02,att.lotatt03,att.lotatt04,att.lotatt05,att.lotatt06,att.lotatt07,att.lotatt08,att.lotatt09
|
|
|
+ ,att.lotatt10,att.lotatt11,att.lotatt12,att.lotatt13,att.lotatt14,att.lotatt15,att.lotatt16,att.lotatt17,att.lotatt18
|
|
|
,t3.orderByQty
|
|
|
from inv_lot_loc_id inv
|
|
|
left join base_location_info b on inv.location_id = b.id
|
|
|
left join inv_lot_att att on inv.lotnum = att.lotnum
|
|
|
- LEFT JOIN (SELECT t1.location_id,t1.sku,count(qty) orderByQty from inv_lot_loc_id t1 where t1.sku = #{sku} GROUP BY t1.location_id,t1.sku) t3 on t3.location_id = inv.location_id
|
|
|
+ LEFT JOIN (SELECT t1.location_id,t1.sku,count(qty) orderByQty from inv_lot_loc_id t1 where t1.sku = #{sku} GROUP
|
|
|
+ BY t1.location_id,t1.sku) t3 on t3.location_id = inv.location_id
|
|
|
<where>
|
|
|
- <if test="lotnum != null and lotnum != ''"> and inv.lotnum = #{lotnum}</if>
|
|
|
- <if test="sku != null and sku != ''"> and inv.sku = #{sku}</if>
|
|
|
- <if test="location != null and location != ''"> and inv.location_id = #{location}</if>
|
|
|
- <if test="customerId != null and customerId != ''"> and inv.customer_id = #{customerId}</if>
|
|
|
+ <if test="lotnum != null and lotnum != ''">and inv.lotnum = #{lotnum}</if>
|
|
|
+ <if test="sku != null and sku != ''">and inv.sku = #{sku}</if>
|
|
|
+ <if test="location != null and location != ''">and inv.location_id = #{location}</if>
|
|
|
+ <if test="customerId != null and customerId != ''">and inv.customer_id = #{customerId}</if>
|
|
|
<if test="lotattDTO != null">
|
|
|
- <if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''"> and att.lotatt01 = #{lotattDTO.lotatt01}</if>
|
|
|
- <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''"> and att.lotatt02 = #{lotattDTO.lotatt02}</if>
|
|
|
- <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''"> and att.lotatt03 = #{lotattDTO.lotatt03}</if>
|
|
|
- <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''"> and att.lotatt04 = #{lotattDTO.lotatt04}</if>
|
|
|
- <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''"> and att.lotatt05 = #{lotattDTO.lotatt05}</if>
|
|
|
- <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''"> and att.lotatt06 = #{lotattDTO.lotatt06}</if>
|
|
|
- <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''"> and att.lotatt07 = #{lotattDTO.lotatt07}</if>
|
|
|
- <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''"> and att.lotatt08 = #{lotattDTO.lotatt08}</if>
|
|
|
- <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''"> and att.lotatt09 = #{lotattDTO.lotatt09}</if>
|
|
|
- <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''"> and att.lotatt10 = #{lotattDTO.lotatt10}</if>
|
|
|
- <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''"> and att.lotatt11 = #{lotattDTO.lotatt11}</if>
|
|
|
- <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''"> and att.lotatt12 = #{lotattDTO.lotatt12}</if>
|
|
|
- <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''"> and att.lotatt13 = #{lotattDTO.lotatt13}</if>
|
|
|
- <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''"> and (att.lotatt14 = #{lotattDTO.lotatt14} or att.lotatt14 is null)</if>
|
|
|
- <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''"> and att.lotatt15 = #{lotattDTO.lotatt15}</if>
|
|
|
- <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''"> and att.lotatt16 = #{lotattDTO.lotatt16}</if>
|
|
|
- <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''"> and att.lotatt17 = #{lotattDTO.lotatt17}</if>
|
|
|
- <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''"> and att.lotatt18 = #{lotattDTO.lotatt18}</if>
|
|
|
+ <if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''">and att.lotatt01 =
|
|
|
+ #{lotattDTO.lotatt01}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''">and att.lotatt02 =
|
|
|
+ #{lotattDTO.lotatt02}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''">and att.lotatt03 =
|
|
|
+ #{lotattDTO.lotatt03}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''">and att.lotatt04 =
|
|
|
+ #{lotattDTO.lotatt04}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''">and att.lotatt05 =
|
|
|
+ #{lotattDTO.lotatt05}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''">and att.lotatt06 =
|
|
|
+ #{lotattDTO.lotatt06}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''">and att.lotatt07 =
|
|
|
+ #{lotattDTO.lotatt07}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''">and att.lotatt08 =
|
|
|
+ #{lotattDTO.lotatt08}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''">and att.lotatt09 =
|
|
|
+ #{lotattDTO.lotatt09}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''">and att.lotatt10 =
|
|
|
+ #{lotattDTO.lotatt10}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''">and att.lotatt11 =
|
|
|
+ #{lotattDTO.lotatt11}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''">and att.lotatt12 =
|
|
|
+ #{lotattDTO.lotatt12}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''">and att.lotatt13 =
|
|
|
+ #{lotattDTO.lotatt13}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''">and (att.lotatt14 =
|
|
|
+ #{lotattDTO.lotatt14} or att.lotatt14 is null)
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''">and att.lotatt15 =
|
|
|
+ #{lotattDTO.lotatt15}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''">and att.lotatt16 =
|
|
|
+ #{lotattDTO.lotatt16}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''">and att.lotatt17 =
|
|
|
+ #{lotattDTO.lotatt17}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''">and att.lotatt18 =
|
|
|
+ #{lotattDTO.lotatt18}
|
|
|
+ </if>
|
|
|
</if>
|
|
|
and b.stock_status = '00' and b.zone_id = '2'
|
|
|
</where>
|
|
@@ -560,53 +751,90 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join inv_lot_att att on li.lotnum = att.lotnum
|
|
|
<where>
|
|
|
<if test="lotattDTO != null">
|
|
|
- <if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''"> and att.lotatt01 = #{lotattDTO.lotatt01}</if>
|
|
|
- <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''"> and att.lotatt02 = #{lotattDTO.lotatt02}</if>
|
|
|
- <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''"> and att.lotatt03 = #{lotattDTO.lotatt03}</if>
|
|
|
- <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''"> and att.lotatt04 = #{lotattDTO.lotatt04}</if>
|
|
|
- <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''"> and att.lotatt05 = #{lotattDTO.lotatt05}</if>
|
|
|
- <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''"> and att.lotatt06 = #{lotattDTO.lotatt06}</if>
|
|
|
- <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''"> and att.lotatt07 = #{lotattDTO.lotatt07}</if>
|
|
|
- <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''"> and att.lotatt08 = #{lotattDTO.lotatt08}</if>
|
|
|
- <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''"> and att.lotatt09 = #{lotattDTO.lotatt09}</if>
|
|
|
- <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''"> and att.lotatt10 = #{lotattDTO.lotatt10}</if>
|
|
|
- <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''"> and att.lotatt11 = #{lotattDTO.lotatt11}</if>
|
|
|
- <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''"> and att.lotatt12 = #{lotattDTO.lotatt12}</if>
|
|
|
- <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''"> and att.lotatt13 = #{lotattDTO.lotatt13}</if>
|
|
|
- <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''"> and att.lotatt14 = #{lotattDTO.lotatt14}</if>
|
|
|
- <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''"> and att.lotatt15 = #{lotattDTO.lotatt15}</if>
|
|
|
- <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''"> and att.lotatt16 = #{lotattDTO.lotatt16}</if>
|
|
|
- <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''"> and att.lotatt17 = #{lotattDTO.lotatt17}</if>
|
|
|
- <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''"> and att.lotatt18 = #{lotattDTO.lotatt18}</if>
|
|
|
+ <if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''">and att.lotatt01 =
|
|
|
+ #{lotattDTO.lotatt01}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''">and att.lotatt02 =
|
|
|
+ #{lotattDTO.lotatt02}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''">and att.lotatt03 =
|
|
|
+ #{lotattDTO.lotatt03}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''">and att.lotatt04 =
|
|
|
+ #{lotattDTO.lotatt04}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''">and att.lotatt05 =
|
|
|
+ #{lotattDTO.lotatt05}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''">and att.lotatt06 =
|
|
|
+ #{lotattDTO.lotatt06}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''">and att.lotatt07 =
|
|
|
+ #{lotattDTO.lotatt07}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''">and att.lotatt08 =
|
|
|
+ #{lotattDTO.lotatt08}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''">and att.lotatt09 =
|
|
|
+ #{lotattDTO.lotatt09}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''">and att.lotatt10 =
|
|
|
+ #{lotattDTO.lotatt10}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''">and att.lotatt11 =
|
|
|
+ #{lotattDTO.lotatt11}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''">and att.lotatt12 =
|
|
|
+ #{lotattDTO.lotatt12}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''">and att.lotatt13 =
|
|
|
+ #{lotattDTO.lotatt13}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''">and att.lotatt14 =
|
|
|
+ #{lotattDTO.lotatt14}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''">and att.lotatt15 =
|
|
|
+ #{lotattDTO.lotatt15}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''">and att.lotatt16 =
|
|
|
+ #{lotattDTO.lotatt16}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''">and att.lotatt17 =
|
|
|
+ #{lotattDTO.lotatt17}
|
|
|
+ </if>
|
|
|
+ <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''">and att.lotatt18 =
|
|
|
+ #{lotattDTO.lotatt18}
|
|
|
+ </if>
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<select id="queryInvLotattByInvLotatt" resultMap="InvLotLocIdLotattResult">
|
|
|
- select li.*,att.lotatt01,att.lotatt02,att.lotatt03,att.lotatt04,att.lotatt05,att.lotatt06,att.lotatt07,att.lotatt08,att.lotatt09
|
|
|
- ,att.lotatt10,att.lotatt11,att.lotatt12,att.lotatt13,att.lotatt14,att.lotatt15,att.lotatt16,att.lotatt17,att.lotatt18
|
|
|
+ select
|
|
|
+ li.*,att.lotatt01,att.lotatt02,att.lotatt03,att.lotatt04,att.lotatt05,att.lotatt06,att.lotatt07,att.lotatt08,att.lotatt09
|
|
|
+ ,att.lotatt10,att.lotatt11,att.lotatt12,att.lotatt13,att.lotatt14,att.lotatt15,att.lotatt16,att.lotatt17,att.lotatt18
|
|
|
from inv_lot_loc_id li
|
|
|
left join inv_lot_att att on li.lotnum = att.lotnum
|
|
|
<where>
|
|
|
- <if test="sku != null and sku != ''"> and li.sku = #{sku}</if>
|
|
|
- <if test="lotatt01 != null and lotatt01 != ''"> and att.lotatt01 = #{lotatt01}</if>
|
|
|
- <if test="lotatt02 != null and lotatt02 != ''"> and att.lotatt02 = #{lotatt02}</if>
|
|
|
- <if test="lotatt03 != null and lotatt03 != ''"> and att.lotatt03 = #{lotatt03}</if>
|
|
|
- <if test="lotatt04 != null and lotatt04 != ''"> and att.lotatt04 = #{lotatt04}</if>
|
|
|
- <if test="lotatt05 != null and lotatt05 != ''"> and att.lotatt05 = #{lotatt05}</if>
|
|
|
- <if test="lotatt06 != null and lotatt06 != ''"> and att.lotatt06 = #{lotatt06}</if>
|
|
|
- <if test="lotatt07 != null and lotatt07 != ''"> and att.lotatt07 = #{lotatt07}</if>
|
|
|
- <if test="lotatt08 != null and lotatt08 != ''"> and INSTR(#{lotatt08}, att.lotatt08)</if>
|
|
|
- <if test="lotatt09 != null and lotatt09 != ''"> and att.lotatt09 = #{lotatt09}</if>
|
|
|
- <if test="lotatt10 != null and lotatt10 != ''"> and att.lotatt10 = #{lotatt10}</if>
|
|
|
- <if test="lotatt11 != null and lotatt11 != ''"> and att.lotatt11 = #{lotatt11}</if>
|
|
|
- <if test="lotatt12 != null and lotatt12 != ''"> and att.lotatt12 = #{lotatt12}</if>
|
|
|
- <if test="lotatt13 != null and lotatt13 != ''"> and att.lotatt13 = #{lotatt13}</if>
|
|
|
- <if test="lotatt14 != null and lotatt14 != ''"> and att.lotatt14 = #{lotatt14}</if>
|
|
|
- <if test="lotatt15 != null and lotatt15 != ''"> and att.lotatt15 = #{lotatt15}</if>
|
|
|
- <if test="lotatt16 != null and lotatt16 != ''"> and att.lotatt16 = #{lotatt16}</if>
|
|
|
- <if test="lotatt17 != null and lotatt17 != ''"> and att.lotatt17 = #{lotatt17}</if>
|
|
|
- <if test="lotatt18 != null and lotatt18 != ''"> and att.lotatt18 = #{lotatt18}</if>
|
|
|
+ <if test="sku != null and sku != ''">and li.sku = #{sku}</if>
|
|
|
+ <if test="lotatt01 != null and lotatt01 != ''">and att.lotatt01 = #{lotatt01}</if>
|
|
|
+ <if test="lotatt02 != null and lotatt02 != ''">and att.lotatt02 = #{lotatt02}</if>
|
|
|
+ <if test="lotatt03 != null and lotatt03 != ''">and att.lotatt03 = #{lotatt03}</if>
|
|
|
+ <if test="lotatt04 != null and lotatt04 != ''">and att.lotatt04 = #{lotatt04}</if>
|
|
|
+ <if test="lotatt05 != null and lotatt05 != ''">and att.lotatt05 = #{lotatt05}</if>
|
|
|
+ <if test="lotatt06 != null and lotatt06 != ''">and att.lotatt06 = #{lotatt06}</if>
|
|
|
+ <if test="lotatt07 != null and lotatt07 != ''">and att.lotatt07 = #{lotatt07}</if>
|
|
|
+ <if test="lotatt08 != null and lotatt08 != ''">and INSTR(#{lotatt08}, att.lotatt08)</if>
|
|
|
+ <if test="lotatt09 != null and lotatt09 != ''">and att.lotatt09 = #{lotatt09}</if>
|
|
|
+ <if test="lotatt10 != null and lotatt10 != ''">and att.lotatt10 = #{lotatt10}</if>
|
|
|
+ <if test="lotatt11 != null and lotatt11 != ''">and att.lotatt11 = #{lotatt11}</if>
|
|
|
+ <if test="lotatt12 != null and lotatt12 != ''">and att.lotatt12 = #{lotatt12}</if>
|
|
|
+ <if test="lotatt13 != null and lotatt13 != ''">and att.lotatt13 = #{lotatt13}</if>
|
|
|
+ <if test="lotatt14 != null and lotatt14 != ''">and att.lotatt14 = #{lotatt14}</if>
|
|
|
+ <if test="lotatt15 != null and lotatt15 != ''">and att.lotatt15 = #{lotatt15}</if>
|
|
|
+ <if test="lotatt16 != null and lotatt16 != ''">and att.lotatt16 = #{lotatt16}</if>
|
|
|
+ <if test="lotatt17 != null and lotatt17 != ''">and att.lotatt17 = #{lotatt17}</if>
|
|
|
+ <if test="lotatt18 != null and lotatt18 != ''">and att.lotatt18 = #{lotatt18}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -672,9 +900,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectInvLotLocIdBySkuLocationSort" resultMap="InvLotLocIdResult">
|
|
|
select *,(qtyallocated - qty) qty from inv_lot_loc_id
|
|
|
<where>
|
|
|
- <if test="locationId != null and locationId != ''"> and location_id = #{locationId}</if>
|
|
|
- <if test="sku != null and sku != ''"> and sku = #{sku}</if>
|
|
|
+ <if test="locationId != null and locationId != ''">and location_id = #{locationId}</if>
|
|
|
+ <if test="sku != null and sku != ''">and sku = #{sku}</if>
|
|
|
</where>
|
|
|
order by (qtyallocated - qty)
|
|
|
</select>
|
|
|
+
|
|
|
+ <!--分配查询-->
|
|
|
+ <select id="selectAllocationList" resultType="com.ruoyi.ams.order.domain.ActAllocationDTO">
|
|
|
+ select att.lotatt14 orderNo, sk.sku sku, sk.desc1 skuName, wdoh.order_status status, inv.qty pickQty, wdod.order_line_no lineNo,
|
|
|
+ inv.qtyallocated qty, bli.location_no locationNo ,bli.id locationId, att.lotatt02, att.lotatt05, att.lotatt07, att.lotatt08, att.lotatt13,
|
|
|
+ att.lotatt13, att.lotatt14, att.lotatt15, wdoh.so_reference1 erpNo, inv.create_time createTime, att.lotnum lotnum
|
|
|
+ from inv_lot_loc_id inv
|
|
|
+ left join base_location_info bli on bli.id = inv.location_id
|
|
|
+ left join inv_lot_att att on inv.lotnum = att.lotnum
|
|
|
+ left join base_sku sk on inv.sku = sk.sku
|
|
|
+ left join wms_doc_order_header wdoh on att.lotatt14 = wdoh.order_no
|
|
|
+ left join wms_doc_order_details wdod on wdod.order_no = wdod.order_no
|
|
|
+ <where>
|
|
|
+ <if test="orderNo != null and orderNo != ''"> and wdoh.order_no = #{orderNo}</if>
|
|
|
+ <if test="status != null and status != ''"> and t1.status = #{status}</if>
|
|
|
+ <if test="params.beginTime != null and params.beginTime != ''">
|
|
|
+ AND date_format(inv.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
+ <if test="params.endTime != null and params.endTime != ''">
|
|
|
+ AND date_format(inv.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|