|
|
|
|
@ -89,14 +89,28 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectOutputByTime" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
select TO_CHAR(CREATION_DATE, 'hh24')||':30' as name ,Count(TASK_ID) as qty
|
|
|
|
|
from IMOS_LO_TASK_HISTORY
|
|
|
|
|
where detial_type_code = '1002'
|
|
|
|
|
and TASK_TYPE != 'O'
|
|
|
|
|
and TO_CHAR(CREATION_DATE, 'YYYY-MM-DD') = TO_CHAR(SYSDATE, 'YYYY-MM-DD')
|
|
|
|
|
and TO_CHAR(CREATION_DATE, 'hh24') > 7
|
|
|
|
|
group by TO_CHAR(CREATION_DATE, 'hh24')
|
|
|
|
|
order by name
|
|
|
|
|
-- select TO_CHAR(CREATION_DATE, 'hh24')||':30' as name ,Count(TASK_ID) as qty
|
|
|
|
|
-- from IMOS_LO_TASK_HISTORY
|
|
|
|
|
-- where detial_type_code = '1002'
|
|
|
|
|
-- and TASK_TYPE != 'O'
|
|
|
|
|
-- and TO_CHAR(CREATION_DATE, 'YYYY-MM-DD') = TO_CHAR(SYSDATE, 'YYYY-MM-DD')
|
|
|
|
|
-- and TO_CHAR(CREATION_DATE, 'hh24') > 7
|
|
|
|
|
-- group by TO_CHAR(CREATION_DATE, 'hh24')
|
|
|
|
|
-- order by name
|
|
|
|
|
select TO_CHAR(CREATION_DATE, 'hh24') || ':30' as name, Count(TASK_ID) as qty
|
|
|
|
|
from (
|
|
|
|
|
select CREATION_DATE, TASK_ID
|
|
|
|
|
from IMOS_LO_TASK_HISTORY
|
|
|
|
|
where detial_type_code = '1002'
|
|
|
|
|
and TASK_TYPE != 'O'
|
|
|
|
|
|
|
|
|
|
and CREATION_DATE between
|
|
|
|
|
to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and
|
|
|
|
|
to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '19:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
)
|
|
|
|
|
group by TO_CHAR(CREATION_DATE, 'hh24')
|
|
|
|
|
order by name
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -247,4 +261,36 @@
|
|
|
|
|
from IMOS_PR_FOAMING_MONITOR
|
|
|
|
|
order by to_number(STATION_NO)
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
insert into temp1 (
|
|
|
|
|
select row_number() over (order by CREATION_DATE) as row_number,
|
|
|
|
|
CREATION_DATE as day
|
|
|
|
|
from IMOS.IMOS_LO_TASK_HISTORY
|
|
|
|
|
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')
|
|
|
|
|
and TASK_TYPE = 'I')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select ROUND(sum(ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - 20) / 60,2) as qty, 1 as name
|
|
|
|
|
from temp1 t1
|
|
|
|
|
left join TEMP1 t2 on t1.row_numbre = t2.row_numbre + 1
|
|
|
|
|
where ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - 20 > 0
|
|
|
|
|
union
|
|
|
|
|
select count(1) as qty, 2 as name
|
|
|
|
|
from temp1 t1
|
|
|
|
|
left join TEMP1 t2 on t1.row_numbre = t2.row_numbre + 2
|
|
|
|
|
where ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - 20 > 0 and ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - 20 <=180
|
|
|
|
|
union
|
|
|
|
|
select count(1) as qty, 3 as name
|
|
|
|
|
from temp1 t1
|
|
|
|
|
left join TEMP1 t2 on t1.row_numbre = t2.row_numbre + 2
|
|
|
|
|
where ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - 20 > 180 and ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - 20 <=600
|
|
|
|
|
union
|
|
|
|
|
select count(1) as qty, 4 as name
|
|
|
|
|
from temp1 t1
|
|
|
|
|
left join TEMP1 t2 on t1.row_numbre = t2.row_numbre + 2
|
|
|
|
|
where ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - 20 > 600
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|