|
|
@ -2294,6 +2294,23 @@ |
|
|
<if test="code != null and code != ''"> |
|
|
<if test="code != null and code != ''"> |
|
|
AND SUBSTRING_INDEX(i.category_full_code,'-',1) = #{code} |
|
|
AND SUBSTRING_INDEX(i.category_full_code,'-',1) = #{code} |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<choose> |
|
|
|
|
|
<when test='lamp != null and lamp == "red"'> |
|
|
|
|
|
and i.item_state='0' and getworkminute(i.created_time, now()) > 480 |
|
|
|
|
|
</when> |
|
|
|
|
|
<when test='lamp != null and lamp == "yellow"'> |
|
|
|
|
|
and i.item_state='0' |
|
|
|
|
|
and getworkminute(i.created_time, now()) > 360 |
|
|
|
|
|
and getworkminute(i.created_time, now()) <![CDATA[ <= ]]> 480 |
|
|
|
|
|
</when> |
|
|
|
|
|
<when test='lamp != null and lamp == "green"'> |
|
|
|
|
|
and i.item_state='0' and getworkminute(i.created_time, now()) <![CDATA[ <= ]]> 360 |
|
|
|
|
|
</when> |
|
|
|
|
|
<otherwise></otherwise> |
|
|
|
|
|
</choose> |
|
|
|
|
|
<if test="evaluationScore != null and evaluationScore != ''"> |
|
|
|
|
|
AND i.evaluation_score = #{evaluationScore} |
|
|
|
|
|
</if> |
|
|
order by i.created_time DESC |
|
|
order by i.created_time DESC |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|