|
@@ -993,13 +993,21 @@
|
|
|
join tld_material c on a.material_id = c.tld_id
|
|
|
join tld_company k on b.company_number = k.code
|
|
|
<trim prefix="WHERE" prefixOverrides="and |or">
|
|
|
- IFNULL(a.warehousing_num, 0) <![CDATA[<]]> (a.num + 0)
|
|
|
+ <if test="type == '0'.toString() ">
|
|
|
+ IFNULL(a.warehousing_num, 0) <![CDATA[<]]> (a.num + 0)
|
|
|
+ </if>
|
|
|
+ <if test="type == '1'.toString() ">
|
|
|
+ IFNULL(a.warehousing_num, 0) <![CDATA[=]]> (a.num + 0)
|
|
|
+ </if>
|
|
|
<if test="materialCode != null and materialCode != ''">
|
|
|
and c.code like CONCAT(CONCAT('%', #{materialCode}), '%')
|
|
|
</if>
|
|
|
<if test="materialName != null and materialName != ''">
|
|
|
and c.name like CONCAT(CONCAT('%', #{materialName}), '%')
|
|
|
</if>
|
|
|
+ <if test="noticeCode != null and noticeCode != ''">
|
|
|
+ and b.notice_code like CONCAT(CONCAT('%', #{noticeCode}), '%')
|
|
|
+ </if>
|
|
|
<if test="materialId != null and materialId != ''">
|
|
|
and c.tld_id like CONCAT(CONCAT('%', #{materialId}), '%')
|
|
|
</if>
|
|
@@ -1061,7 +1069,7 @@
|
|
|
b.ask_goods_code,
|
|
|
b.company_number,
|
|
|
b.sqrq,
|
|
|
- b.department,
|
|
|
+ p.name as department,
|
|
|
b.source_type,
|
|
|
b.move_type,
|
|
|
b.request_type_number,
|
|
@@ -1075,14 +1083,26 @@
|
|
|
join tld_enquiry_f b on a.ask_goods_id = b.ask_goods_id
|
|
|
join tld_material c on a.material_id = c.tld_id
|
|
|
join tld_company k on b.company_number = k.code
|
|
|
+ join tld_department p on b.department = p.code
|
|
|
<trim prefix="WHERE" prefixOverrides="and |or">
|
|
|
- IFNULL(a.out_num, 0) <![CDATA[<]]> (a.num + 0)
|
|
|
+ <if test="type == '0'.toString() ">
|
|
|
+ IFNULL(a.out_num, 0) <![CDATA[<]]> (a.num + 0)
|
|
|
+ </if>
|
|
|
+ <if test="type == '1'.toString() ">
|
|
|
+ IFNULL(a.out_num, 0) <![CDATA[=]]> (a.num + 0)
|
|
|
+ </if>
|
|
|
<if test="materialCode != null and materialCode != ''">
|
|
|
and c.code like CONCAT(CONCAT('%', #{materialCode}), '%')
|
|
|
</if>
|
|
|
<if test="materialName != null and materialName != ''">
|
|
|
and c.name like CONCAT(CONCAT('%', #{materialName}), '%')
|
|
|
</if>
|
|
|
+ <if test="askGoodsCode != null and askGoodsCode != ''">
|
|
|
+ and b.ask_goods_code like CONCAT(CONCAT('%', #{askGoodsCode}), '%')
|
|
|
+ </if>
|
|
|
+ <if test="departmentCode != null and departmentCode != ''">
|
|
|
+ and b.department = #{departmentCode}
|
|
|
+ </if>
|
|
|
<if test="materialId != null and materialId != ''">
|
|
|
and c.tld_id like CONCAT(CONCAT('%', #{materialId}), '%')
|
|
|
</if>
|