|
|
|
@ -150,15 +150,13 @@ |
|
|
|
LEFT JOIN WareHouse W ON a.site = W.Site AND a.warehouse_id = W.WareHouseID |
|
|
|
LEFT JOIN Location L ON a.site = L.Site AND a.location_id = L.LocationName |
|
|
|
<where> |
|
|
|
a.site in (select site from AccessSite where userID = #{query.userName}) |
|
|
|
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 test="query.warehouseIdList != null and query.warehouseIdList.size() > 0"> |
|
|
|
and A.warehouse_id in |
|
|
|
<foreach collection="query.warehouseIdList" item="warehouseId" open="(" separator="," close=")"> |
|
|
|
#{warehouseId} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
<if test="query.locationId != null and query.locationId != ''"> |
|
|
|
and A.location_id like '%'+ #{query.locationId}+'%' |
|
|
|
@ -173,10 +171,13 @@ |
|
|
|
and A.part_no like '%'+ #{query.partNo}+'%' |
|
|
|
</if> |
|
|
|
<if test="query.partDescription != null and query.partDescription != ''"> |
|
|
|
and b.part_desc_en like '%'+ #{query.partDescEn}+'%' |
|
|
|
and b.PartDescription like '%'+ #{query.partDescription}+'%' |
|
|
|
</if> |
|
|
|
<if test="query.status != null and query.status != ''"> |
|
|
|
and a.status = #{query.status} |
|
|
|
<if test="query.statusList != null and query.statusList.size() > 0"> |
|
|
|
and A.status in |
|
|
|
<foreach collection="query.statusList" item="status" open="(" separator="," close=")"> |
|
|
|
#{status} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
<if test="query.labelType != null and query.labelType != ''"> |
|
|
|
and a.label_type = #{query.labelType} |
|
|
|
@ -199,4 +200,14 @@ |
|
|
|
AND roll_no = #{rollNo,jdbcType=VARCHAR} |
|
|
|
</update> |
|
|
|
|
|
|
|
<!-- 获取仓库列表 --> |
|
|
|
<select id="getWarehouseList" resultType="InventoryStockOutData"> |
|
|
|
SELECT DISTINCT |
|
|
|
WareHouseID as warehouseId, |
|
|
|
WareHouseName as warehouseName |
|
|
|
FROM WareHouse |
|
|
|
WHERE site in (select site from AccessSite where userID = #{userName}) |
|
|
|
ORDER BY WareHouseID |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |