forked from integrated_whb/integrated_whb
解决了 Bug 打回并删除的数字没有减少 14193
parent
83ef15519c
commit
f90c019094
|
@ -66,9 +66,10 @@ public class EightWorkServiceImpl implements EightWorkService {
|
||||||
if(eightworks != null && eightworks.size() > 0){
|
if(eightworks != null && eightworks.size() > 0){
|
||||||
eightworks.stream().forEach(e -> {
|
eightworks.stream().forEach(e -> {
|
||||||
staMap.get("total").add(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);
|
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);
|
staMap.get("flowing").add(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,63 @@
|
||||||
DATE_FORMAT(tmp.ACT_TIME,'%Y-%m') WORK_MONTH
|
DATE_FORMAT(tmp.ACT_TIME,'%Y-%m') WORK_MONTH
|
||||||
FROM
|
FROM
|
||||||
( SELECT * FROM vi_eightwork_flow_log log
|
( 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
|
GROUP BY
|
||||||
tmp.WORK_ID
|
tmp.WORK_ID
|
||||||
order by tmp.ACT_TIME DESC
|
order by tmp.ACT_TIME DESC
|
||||||
|
|
Loading…
Reference in New Issue