|
|
|
|
@ -137,46 +137,50 @@
|
|
|
|
|
order by START_TIME desc
|
|
|
|
|
</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 (
|
|
|
|
|
select CREATION_DATE, TASK_ID
|
|
|
|
|
from IMOS_LO_TASK_HISTORY
|
|
|
|
|
where detial_type_code = '1002'
|
|
|
|
|
and TASK_TYPE != 'O'
|
|
|
|
|
and CREATION_DATE >
|
|
|
|
|
case
|
|
|
|
|
when to_char(sysdate, 'hh24') > 7 and to_char(sysdate, 'hh24') < 20 then to_date(
|
|
|
|
|
to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00',
|
|
|
|
|
'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
when to_char(sysdate, 'hh24') < 7 then to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '19:30:00',
|
|
|
|
|
'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
else to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '19:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
end
|
|
|
|
|
and CREATION_DATE <
|
|
|
|
|
case
|
|
|
|
|
when to_char(sysdate, 'hh24') > 7 and to_char(sysdate, 'hh24') < 20 then to_date(
|
|
|
|
|
to_char(SYSDATE, 'yyyy-MM-dd') || '19:30:00',
|
|
|
|
|
'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
when to_char(sysdate, 'hh24') < 7 then to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00',
|
|
|
|
|
'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
else to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '24:00:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
end
|
|
|
|
|
-- 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')
|
|
|
|
|
)
|
|
|
|
|
<select id="selectOutputByTimeDY" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
select TO_CHAR(CREATION_DATE, 'hh24') || ':30' as name,
|
|
|
|
|
sum(ACTUAL_QTY) as qty
|
|
|
|
|
from IMOS_PR_PLAN t
|
|
|
|
|
where process_code = 1002
|
|
|
|
|
and delete_flag = '0'
|
|
|
|
|
and CREATION_DATE > (select *
|
|
|
|
|
from (select CREATE_TIME from HAIWEI.XK_H_QTY order by CREATE_TIME desc)
|
|
|
|
|
where ROWNUM = 1)
|
|
|
|
|
group by TO_CHAR(CREATION_DATE, 'hh24')
|
|
|
|
|
order by name
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectOutputByTime" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
select H_NAME as name ,QTY_C as qty from HAIWEI.XK_H_QTY xhq
|
|
|
|
|
left join (select * from haiwei.BASE_DAY_WBTIME where ROWNUM = 1 order by CREATE_TIME desc) wb on 1 = 1
|
|
|
|
|
where xhq.CREATE_TIME between case when sysdate <= wb.W_END then W_START else W_END end
|
|
|
|
|
and case when sysdate <= wb.W_END then W_END else B_END end
|
|
|
|
|
order by xhq.CREATE_TIME
|
|
|
|
|
-- 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 >
|
|
|
|
|
-- case
|
|
|
|
|
-- when to_char(sysdate, 'hh24') > 7 and to_char(sysdate, 'hh24') < 20 then to_date(
|
|
|
|
|
-- to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00',
|
|
|
|
|
-- 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
-- when to_char(sysdate, 'hh24') < 7 then to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '19:30:00',
|
|
|
|
|
-- 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
-- else to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '19:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
-- end
|
|
|
|
|
-- and CREATION_DATE <
|
|
|
|
|
-- case
|
|
|
|
|
-- when to_char(sysdate, 'hh24') > 7 and to_char(sysdate, 'hh24') < 20 then to_date(
|
|
|
|
|
-- to_char(SYSDATE, 'yyyy-MM-dd') || '19:30:00',
|
|
|
|
|
-- 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
-- when to_char(sysdate, 'hh24') < 7 then to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00',
|
|
|
|
|
-- 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
-- else to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '24:00:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
-- end
|
|
|
|
|
-- )
|
|
|
|
|
-- group by TO_CHAR(CREATION_DATE, 'hh24')
|
|
|
|
|
-- order by name
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|