|
|
|
@ -112,4 +112,49 @@ |
|
|
|
</foreach> |
|
|
|
order by created_date |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getKuCunLabelData" resultType="InventoryStockOutData"> |
|
|
|
select a.site,a.bu_no,a.warehouse_id,location_id,roll_no,parent_roll_no,part_no,b.PartDescription,B.part_desc_en,a.status,a.qty_on_hand,label_type,a.orderref1,a.orderref2,a.orderref3,a.manufacture_date,a.expired_date,a.batch_no |
|
|
|
from inventory_stock a |
|
|
|
left join part b on a.site = b.site and a.bu_no = b.bu_no and a.part_no = b.PartNo |
|
|
|
<where> |
|
|
|
|
|
|
|
and a.status != '出库' |
|
|
|
|
|
|
|
<if test="query.site != null and query.site != ''"> |
|
|
|
and A.site=#{query.site,jdbcType=VARCHAR} |
|
|
|
</if> |
|
|
|
<if test="query.buNo != null and query.buNo != ''"> |
|
|
|
and A.bu_no=#{query.buNo} |
|
|
|
</if> |
|
|
|
<if test="query.warehouseId != null and query.warehouseId != ''"> |
|
|
|
and A.warehouse_id like '%'+ #{query.warehouseId}+'%' |
|
|
|
</if> |
|
|
|
<if test="query.locationId != null and query.locationId != ''"> |
|
|
|
and A.location_id like '%'+ #{query.locationId}+'%' |
|
|
|
</if> |
|
|
|
<if test="query.rollNo != null and query.rollNo != ''"> |
|
|
|
and A.roll_no like '%'+ #{query.rollNo}+'%' |
|
|
|
</if> |
|
|
|
<if test="query.parentRollNo != null and query.parentRollNo != ''"> |
|
|
|
and A.parent_roll_no like '%'+ #{query.parentRollNo}+'%' |
|
|
|
</if> |
|
|
|
<if test="query.partNo != null and query.partNo != ''"> |
|
|
|
and A.part_no like '%'+ #{query.partNo}+'%' |
|
|
|
</if> |
|
|
|
<if test="query.partDescription != null and query.partDescription != ''"> |
|
|
|
and b.part_desc_en like '%'+ #{query.partDescEn}+'%' |
|
|
|
</if> |
|
|
|
<if test="query.status != null and query.status != ''"> |
|
|
|
and a.status = #{query.status} |
|
|
|
</if> |
|
|
|
<if test="query.labelType != null and query.labelType != ''"> |
|
|
|
and a.label_type = #{query.labelType} |
|
|
|
</if> |
|
|
|
<if test="query.batchNo != null and query.batchNo != ''"> |
|
|
|
and a.batch_no like '%'+ #{query.batchNo}+'%' |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
|
|
|
|
</select> |
|
|
|
</mapper> |