Commit c2f1eeab by zhangtw

入库功能调整

parent 6f8bfd20
...@@ -12,8 +12,11 @@ ...@@ -12,8 +12,11 @@
<if test="params.params.batch_no != null"> <if test="params.params.batch_no != null">
AND batch_no LIKE CONCAT('%', #{params.params.batch_no}, '%') AND batch_no LIKE CONCAT('%', #{params.params.batch_no}, '%')
</if> </if>
<if test="params.params.startDate != null and params.params.endDate != null"> <if test="params.params.startDate != null">
AND inbound_date &gt;= #{params.params.startDate} and inbound_date &lt;= #{params.params.endDate} AND inbound_date &gt;= #{params.params.startDate}
</if>
<if test="params.params.endDate != null">
AND inbound_date &lt;= #{params.params.endDate}
</if> </if>
<if test="params.params.inbound_type != null"> <if test="params.params.inbound_type != null">
AND inbound_type = #{params.params.inbound_type} AND inbound_type = #{params.params.inbound_type}
...@@ -56,8 +59,11 @@ ...@@ -56,8 +59,11 @@
SELECT * FROM jl_key_dm_inventory SELECT * FROM jl_key_dm_inventory
<where> <where>
AND is_used = 1 AND is_used = 1
<if test="params.params.material_name != null and params.params.material_name != ''"> <if test="params.params.material_name != null">
AND (material_name LIKE CONCAT('%', #{params.params.material_name}, '%') OR material_code LIKE CONCAT('%', #{params.params.material_name}, '%')) AND material_name LIKE CONCAT('%', #{params.params.material_name}, '%')
</if>
<if test="params.params.material_code != null">
AND material_code LIKE CONCAT('%', #{params.params.material_code}, '%')
</if> </if>
</where> </where>
ORDER BY material_name ASC ORDER BY material_name ASC
...@@ -152,7 +158,8 @@ ...@@ -152,7 +158,8 @@
<select id="selectPendingReturnList" parameterType="map" resultType="map"> <select id="selectPendingReturnList" parameterType="map" resultType="map">
select ba.id,ba.applicant_id,ba.application_no,ba.applicant_name,ba.department_id, select ba.id,ba.applicant_id,ba.application_no,ba.applicant_name,ba.department_id,
ba.department_name,ba.issue_status,ba.expected_return_date,ba.issue_time ba.department_name,ba.issue_status,ba.expected_return_date,ba.issue_time,ba.approval_time,
ba.borrow_purpose,ba.submit_time
from jl_key_dm_borrow_application as ba from jl_key_dm_borrow_application as ba
left join jl_key_dm_borrow_application_detail as bad on bad.application_id = ba.id left join jl_key_dm_borrow_application_detail as bad on bad.application_id = ba.id
left join jl_key_dm_material as m on bad.material_id = m.id left join jl_key_dm_material as m on bad.material_id = m.id
...@@ -160,10 +167,10 @@ ...@@ -160,10 +167,10 @@
m.can_borrow = 1 and ba.issue_status = 1 m.can_borrow = 1 and ba.issue_status = 1
and bad.returned_quantity + bad.damaged_quantity != bad.apply_quantity and bad.returned_quantity + bad.damaged_quantity != bad.apply_quantity
<if test="params.params.applicant_name != null and params.params.applicant_name != ''"> <if test="params.params.applicant_name != null and params.params.applicant_name != ''">
and applicant_name = concat('%',#{params.params.applicant_name},'%') and applicant_name like concat('%',#{params.params.applicant_name},'%')
</if> </if>
<if test="params.params.application_no != null and params.params.application_no != ''"> <if test="params.params.department_name != null">
and application_no = concat('%',#{params.params.application_no},'%') and department_name like concat('%',#{params.params.department_name},'%')
</if> </if>
</where> </where>
group by ba.id group by ba.id
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论