|
@@ -5,19 +5,22 @@
|
|
<!-- 呆滞品查询 -->
|
|
<!-- 呆滞品查询 -->
|
|
<select id="dullGoods" resultType="java.util.Map">
|
|
<select id="dullGoods" resultType="java.util.Map">
|
|
SELECT
|
|
SELECT
|
|
|
|
+ a.id as id,
|
|
a.material_id as materialId,
|
|
a.material_id as materialId,
|
|
a.amount as amount,
|
|
a.amount as amount,
|
|
a.scrq as scrq,
|
|
a.scrq as scrq,
|
|
a.storage_location_code as storageLocationCode,
|
|
a.storage_location_code as storageLocationCode,
|
|
- b.name as materialName
|
|
|
|
|
|
+ b.name as materialName,
|
|
|
|
+ c.storage_location_name as storageLocationName
|
|
FROM tld_inventory a
|
|
FROM tld_inventory a
|
|
- JOIN tld_material b on a.material_id = b.tld_id
|
|
|
|
- WHERE datediff(a.scrq, now()) <![CDATA[>]]> 90
|
|
|
|
|
|
+ JOIN tld_material b ON a.material_id = b.tld_id
|
|
|
|
+ LEFT JOIN tld_storage_location c ON a.storage_location_code = c.storage_location_code
|
|
|
|
+ WHERE datediff(now(), a.scrq) <![CDATA[>]]> 90
|
|
<if test="storageLocationCode != null and storageLocationCode != ''">
|
|
<if test="storageLocationCode != null and storageLocationCode != ''">
|
|
and a.storage_location_code = #{storageLocationCode}
|
|
and a.storage_location_code = #{storageLocationCode}
|
|
</if>
|
|
</if>
|
|
<if test="wllbCode != null and wllbCode != ''">
|
|
<if test="wllbCode != null and wllbCode != ''">
|
|
- and b.coed = #{wllbCode}
|
|
|
|
|
|
+ and b.code = #{wllbCode}
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
<!-- 查询所有物料 -->
|
|
<!-- 查询所有物料 -->
|