Commit 5e600f2c by lijingjing

修改备样管理数据不显示;

parent 819af138
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<sql id="where"> <sql id="where">
<where> <where>
AND b.deleted = 0 AND s.deleted = 0 AND b.deleted = 0
<if test="null!=vo.sampleCode"> <if test="null!=vo.sampleCode">
AND s.code LIKE CONCAT('%',#{vo.sampleCode},'%') AND s.code LIKE CONCAT('%',#{vo.sampleCode},'%')
</if> </if>
...@@ -53,10 +53,9 @@ ...@@ -53,10 +53,9 @@
date_part('day', CAST(b.storage_period AS TIMESTAMP) - CAST( now() AS TIMESTAMP)) "remain_days" date_part('day', CAST(b.storage_period AS TIMESTAMP) - CAST( now() AS TIMESTAMP)) "remain_days"
FROM FROM
entrust_sample_backup b entrust_sample_backup b
JOIN entrust_sample s ON b.sample_id = s.ID JOIN entrust_sample s ON b.sample_id = s.ID and s.deleted = 0
JOIN entrust e ON s.entrust_id = e.ID JOIN entrust e ON s.entrust_id = e.ID AND e.deleted = 0
<include refid="where"/> <include refid="where"/>
AND e.deleted = 0
order by date_part('day', CAST(b.storage_period AS TIMESTAMP) - CAST( now() AS TIMESTAMP)) asc,b.ctime desc order by date_part('day', CAST(b.storage_period AS TIMESTAMP) - CAST( now() AS TIMESTAMP)) asc,b.ctime desc
</select> </select>
...@@ -102,10 +101,9 @@ ...@@ -102,10 +101,9 @@
(case when e.sample_handle_advise = '检测完毕退还' and s.status &gt; 20 then 1 else 0 end) "weights" (case when e.sample_handle_advise = '检测完毕退还' and s.status &gt; 20 then 1 else 0 end) "weights"
FROM FROM
entrust_sample_backup b entrust_sample_backup b
JOIN entrust_sample s ON b.sample_id = s.ID JOIN entrust_sample s ON b.sample_id = s.ID and s.deleted = 0
JOIN entrust e ON s.entrust_id = e.ID JOIN entrust e ON s.entrust_id = e.ID AND e.deleted = 0
<include refid="where"/> <include refid="where"/>
AND e.deleted = 0
order by (case when e.sample_handle_advise = '检测完毕退还' and s.status &gt;20 then 1 else 0 end) desc, b.ctime desc order by (case when e.sample_handle_advise = '检测完毕退还' and s.status &gt;20 then 1 else 0 end) desc, b.ctime desc
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment