Commit c611340f authored by tianbo's avatar tianbo

隐患app列表bug修改

parent 4917cae2
...@@ -615,12 +615,11 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -615,12 +615,11 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
for (LatentDangerBo bo : dangerList) { for (LatentDangerBo bo : dangerList) {
List<JSONObject> filterTaskList = List<JSONObject> filterTaskList =
taskList.stream().filter(t -> t.getString("businessKey").equals(bo.getBusinessKey())).collect(Collectors.toList()); taskList.stream().filter(t -> t.getString("businessKey").equals(bo.getBusinessKey())).collect(Collectors.toList());
if (ValidationUtil.isEmpty(filterTaskList)) {
continue;
}
JSONObject task = filterTaskList.get(0);
LatentDangerListVo vo = new LatentDangerListVo(); LatentDangerListVo vo = new LatentDangerListVo();
if (!ValidationUtil.isEmpty(filterTaskList)) {
JSONObject task = filterTaskList.get(0);
vo.setTaskId(task.getString("id")); vo.setTaskId(task.getString("id"));
}
vo.setDangerId(bo.getId()); vo.setDangerId(bo.getId());
vo.setOvertimeState(bo.getOvertimeState()); vo.setOvertimeState(bo.getOvertimeState());
vo.setDangerName(bo.getDangerName()); vo.setDangerName(bo.getDangerName());
......
...@@ -873,10 +873,18 @@ ...@@ -873,10 +873,18 @@
p_latent_danger pld p_latent_danger pld
WHERE 1=1 WHERE 1=1
<if test="businessKeys != null and businessKeys.size > 0"> <if test="businessKeys != null and businessKeys.size > 0">
and pld.business_key IN and (
<foreach collection = "businessKeys" item = "businessKey" index="index" open = "(" close = ")" separator = "," > pld.business_key IN
<foreach collection="businessKeys" item="businessKey" index="index" open="(" close=")" separator=",">
#{businessKey} #{businessKey}
</foreach> </foreach>
<if
test="latentDangerListParam.dangerState != null and latentDangerListParam.dangerState == 5 or latentDangerListParam.dangerState == 6">
or pld.danger_state=#{latentDangerListParam.dangerState}
</if>
<if test="latentDangerListParam.dangerState == null">
or pld.danger_state = 5 or pld.danger_state = 6
</if>)
</if> </if>
<if test="latentDangerListParam.dangerLevel != null and latentDangerListParam.dangerLevel != -1"> <if test="latentDangerListParam.dangerLevel != null and latentDangerListParam.dangerLevel != -1">
and pld.danger_level=#{latentDangerListParam.dangerLevel} and pld.danger_level=#{latentDangerListParam.dangerLevel}
...@@ -906,10 +914,19 @@ ...@@ -906,10 +914,19 @@
p_latent_danger pld p_latent_danger pld
WHERE 1=1 WHERE 1=1
<if test="businessKeys != null and businessKeys.size > 0"> <if test="businessKeys != null and businessKeys.size > 0">
and pld.business_key IN and (
<foreach collection = "businessKeys" item = "businessKey" index="index" open = "(" close = ")" separator = "," > pld.business_key IN
<foreach collection="businessKeys" item="businessKey" index="index" open="(" close=")" separator=",">
#{businessKey} #{businessKey}
</foreach> </foreach>
<if
test="latentDangerListParam.dangerState != null and latentDangerListParam.dangerState == 5 or latentDangerListParam.dangerState == 6">
or pld.danger_state=#{latentDangerListParam.dangerState}
</if>
<if test="latentDangerListParam.dangerState == null">
or pld.danger_state = 5 or pld.danger_state = 7
</if>
)
</if> </if>
<if test="latentDangerListParam.dangerLevel != null and latentDangerListParam.dangerLevel != -1"> <if test="latentDangerListParam.dangerLevel != null and latentDangerListParam.dangerLevel != -1">
and pld.danger_level=#{latentDangerListParam.dangerLevel} and pld.danger_level=#{latentDangerListParam.dangerLevel}
......
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