diff --git a/src/main/java/com/zcloud/service/eightwork/impl/EightWorkServiceImpl.java b/src/main/java/com/zcloud/service/eightwork/impl/EightWorkServiceImpl.java index 0d1d7fd..f35b5c0 100644 --- a/src/main/java/com/zcloud/service/eightwork/impl/EightWorkServiceImpl.java +++ b/src/main/java/com/zcloud/service/eightwork/impl/EightWorkServiceImpl.java @@ -66,9 +66,10 @@ public class EightWorkServiceImpl implements EightWorkService { if(eightworks != null && eightworks.size() > 0){ eightworks.stream().forEach(e -> { staMap.get("total").add(e); - if(e.getString("NEXT_STEP_ID").equals("99")){ + if("99".equals(e.getString("NEXT_STEP_ID"))){ staMap.get("finished").add(e); - }else if(!e.getString("STATUS").equals("-1") && Integer.parseInt(e.getString("NEXT_STEP_ID")) > 1){ + // 被打回 也统计 被删除与暂存 不计入 申请中 + }else if(Integer.parseInt(e.getString("NEXT_STEP_ID")) > 1){ staMap.get("flowing").add(e); } diff --git a/src/main/resources/mybatis/datasource/eightwork/EightWorkMapper.xml b/src/main/resources/mybatis/datasource/eightwork/EightWorkMapper.xml index 3b94c70..ee850b3 100644 --- a/src/main/resources/mybatis/datasource/eightwork/EightWorkMapper.xml +++ b/src/main/resources/mybatis/datasource/eightwork/EightWorkMapper.xml @@ -8,7 +8,63 @@ DATE_FORMAT(tmp.ACT_TIME,'%Y-%m') WORK_MONTH FROM ( SELECT * FROM vi_eightwork_flow_log log - where log.CORPINFO_ID=#{CORPINFO_ID} HAVING 1 ORDER BY log.ACT_TIME DESC ) tmp + where log.CORPINFO_ID=#{CORPINFO_ID} and log.WORK_ID IN ( + SELECT + f.BLINDBOARD_ID id + FROM + BUS_BLINDBOARD f + WHERE + ISDELETE = 0 + AND CORPINFO_ID = #{CORPINFO_ID} UNION ALL + SELECT + f.BREAKGROUND_ID id + FROM + BUS_BREAKGROUND f + WHERE + ISDELETE = 0 + AND CORPINFO_ID = #{CORPINFO_ID} UNION ALL + SELECT + f.CONFINEDSPACE_ID id + FROM + BUS_CONFINEDSPACE f + WHERE + ISDELETE = 0 + AND CORPINFO_ID = #{CORPINFO_ID} UNION ALL + SELECT + f.ELECTRICITY_ID id + FROM + BUS_ELECTRICITY f + WHERE + ISDELETE = 0 + AND CORPINFO_ID = #{CORPINFO_ID} UNION ALL + SELECT + f.CUTROAD_ID id + FROM + BUS_CUTROAD f + WHERE + ISDELETE = 0 + AND CORPINFO_ID = #{CORPINFO_ID} UNION ALL + SELECT + f.HIGHWORK_ID id + FROM + BUS_HIGHWORK f + WHERE + ISDELETE = 0 + AND CORPINFO_ID = #{CORPINFO_ID} UNION ALL + SELECT + f.HOISTING_ID id + FROM + BUS_HOISTING f + WHERE + ISDELETE = 0 + AND CORPINFO_ID = #{CORPINFO_ID} UNION ALL + SELECT + f.HOTWORK_ID id + FROM + BUS_HOTWORK f + WHERE + ISDELETE = 0 + AND CORPINFO_ID = #{CORPINFO_ID}) HAVING 1 ORDER BY log.ACT_TIME DESC ) tmp GROUP BY tmp.WORK_ID order by tmp.ACT_TIME DESC