解决了 Bug 打回并删除的数字没有减少 14193

pull/5/head
dearlin 2024-02-28 11:51:35 +08:00
parent 83ef15519c
commit f90c019094
2 changed files with 60 additions and 3 deletions

View File

@ -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);
}

View File

@ -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