|
|
|
|
@ -67,7 +67,7 @@
|
|
|
|
|
when instr(name, '/', 1, 1) = 0 then instr(name, ',', 1, 1) + 1
|
|
|
|
|
else instr(name, '/', 1, 1) + 1
|
|
|
|
|
end) as name,
|
|
|
|
|
sum(QTY3)
|
|
|
|
|
sum(QTY3) as qty
|
|
|
|
|
from IMOS.BASE_BOX_OUTPUT_RECORD xhq
|
|
|
|
|
left join (select * from (select * from haiwei.BASE_DAY_WBTIME order by CREATE_TIME desc) where ROWNUM = 1) wb
|
|
|
|
|
on 1 = 1
|
|
|
|
|
@ -111,11 +111,121 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectOutputByTime" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
select H_NAME as name ,QTY_C as qty,ZS_C as record_qty from HAIWEI.XK_H_QTY xhq
|
|
|
|
|
left join (select * from (select * from haiwei.BASE_DAY_WBTIME order by CREATE_TIME desc) where ROWNUM = 1) 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 '07:30' as name, nvl(sum(QTY3),0) as qty
|
|
|
|
|
from IMOS.BASE_BOX_OUTPUT_RECORD
|
|
|
|
|
where CREATE_TIME >= to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and CREATE_TIME < to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '08:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and qty3>0
|
|
|
|
|
union
|
|
|
|
|
select '08:30' as name, nvl(sum(QTY3),0) as qty
|
|
|
|
|
from IMOS.BASE_BOX_OUTPUT_RECORD
|
|
|
|
|
where CREATE_TIME >= to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '08:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and CREATE_TIME < to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '09:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and qty3>0
|
|
|
|
|
union
|
|
|
|
|
select '09:30' as name, nvl(sum(QTY3),0) as qty
|
|
|
|
|
from IMOS.BASE_BOX_OUTPUT_RECORD
|
|
|
|
|
where CREATE_TIME >= to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '09:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and CREATE_TIME < to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '10:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and qty3>0
|
|
|
|
|
union
|
|
|
|
|
select '10:30' as name, nvl(sum(QTY3),0) as qty
|
|
|
|
|
from IMOS.BASE_BOX_OUTPUT_RECORD
|
|
|
|
|
where CREATE_TIME >= to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '10:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and CREATE_TIME < to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '11:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and qty3>0
|
|
|
|
|
union
|
|
|
|
|
select '11:30' as name, nvl(sum(QTY3),0) as qty
|
|
|
|
|
from IMOS.BASE_BOX_OUTPUT_RECORD
|
|
|
|
|
where CREATE_TIME >= to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '11:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and CREATE_TIME < to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '12:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and qty3>0
|
|
|
|
|
union
|
|
|
|
|
select '12:30' as name, nvl(sum(QTY3),0) as qty
|
|
|
|
|
from IMOS.BASE_BOX_OUTPUT_RECORD
|
|
|
|
|
where CREATE_TIME >= to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '12:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and CREATE_TIME < to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '13:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and qty3>0
|
|
|
|
|
union
|
|
|
|
|
select '13:30' as name, nvl(sum(QTY3),0) as qty
|
|
|
|
|
from IMOS.BASE_BOX_OUTPUT_RECORD
|
|
|
|
|
where CREATE_TIME >= to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '13:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and CREATE_TIME < to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '14:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and qty3>0
|
|
|
|
|
union
|
|
|
|
|
select '14:30' as name, nvl(sum(QTY3),0) as qty
|
|
|
|
|
from IMOS.BASE_BOX_OUTPUT_RECORD
|
|
|
|
|
where CREATE_TIME >= to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '14:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and CREATE_TIME < to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '15:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and qty3>0
|
|
|
|
|
union
|
|
|
|
|
select '15:30' as name, nvl(sum(QTY3),0) as qty
|
|
|
|
|
from IMOS.BASE_BOX_OUTPUT_RECORD
|
|
|
|
|
where CREATE_TIME >= to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '15:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and CREATE_TIME < to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '16:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and qty3>0
|
|
|
|
|
union
|
|
|
|
|
select '16:30' as name, nvl(sum(QTY3),0) as qty
|
|
|
|
|
from IMOS.BASE_BOX_OUTPUT_RECORD
|
|
|
|
|
where CREATE_TIME >= to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '16:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and CREATE_TIME < to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '17:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and qty3>0
|
|
|
|
|
union
|
|
|
|
|
select '17:30' as name, nvl(sum(QTY3),0) as qty
|
|
|
|
|
from IMOS.BASE_BOX_OUTPUT_RECORD
|
|
|
|
|
where CREATE_TIME >= to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '17:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and CREATE_TIME < to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '18:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and qty3>0
|
|
|
|
|
union
|
|
|
|
|
select '18:30' as name, nvl(sum(QTY3),0) as qty
|
|
|
|
|
from IMOS.BASE_BOX_OUTPUT_RECORD
|
|
|
|
|
where CREATE_TIME >= to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '18:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and CREATE_TIME < to_date(to_char(SYSDATE
|
|
|
|
|
, 'yyyy-MM-dd') || '19:30:00'
|
|
|
|
|
, 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and qty3>0
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|