|
|
|
|
@ -658,14 +658,77 @@ where 600 < ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - t3.RHYTHM
|
|
|
|
|
order by to_char(PRODUCTION_DATE, 'hh24')
|
|
|
|
|
</select>
|
|
|
|
|
<select id="zz_selectProductInByTeam" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
select to_char(PRODUCTION_DATE, 'hh24') || ':30' as name, count(1) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
left join (select * from (select * from haiwei.BASE_DAY_WBTIME order by CREATE_TIME desc) where ROWNUM = 1) wb on 1 = 1
|
|
|
|
|
where ippb.PRODUCTION_DATE 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
|
|
|
|
|
and DETIAL_TYPE_CODE = '1004'
|
|
|
|
|
group by to_char(PRODUCTION_DATE, 'hh24')
|
|
|
|
|
order by to_char(PRODUCTION_DATE, 'hh24')
|
|
|
|
|
select '07:30' as name, nvl(count(1),0) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
where DETIAL_TYPE_CODE = '1004'
|
|
|
|
|
and SCAN_TIME 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') || '08:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
union
|
|
|
|
|
select '08:30' as name, nvl(count(1),0) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
where DETIAL_TYPE_CODE = '1004'
|
|
|
|
|
and SCAN_TIME between to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '08:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '09:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
union
|
|
|
|
|
select '09:30' as name, nvl(count(1),0) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
where DETIAL_TYPE_CODE = '1004'
|
|
|
|
|
and SCAN_TIME between to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '09:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '10:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
union
|
|
|
|
|
select '10:30' as name, nvl(count(1),0) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
where DETIAL_TYPE_CODE = '1004'
|
|
|
|
|
and SCAN_TIME between to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '10:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '11:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
union
|
|
|
|
|
select '11:30' as name, nvl(count(1),0) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
where DETIAL_TYPE_CODE = '1004'
|
|
|
|
|
and SCAN_TIME between to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '11:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '12:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
union
|
|
|
|
|
select '12:30' as name, nvl(count(1),0) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
where DETIAL_TYPE_CODE = '1004'
|
|
|
|
|
and SCAN_TIME between to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '12:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '13:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
union
|
|
|
|
|
select '13:30' as name, nvl(count(1),0) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
where DETIAL_TYPE_CODE = '1004'
|
|
|
|
|
and SCAN_TIME between to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '13:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '14:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
union
|
|
|
|
|
select '14:30' as name, nvl(count(1),0) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
where DETIAL_TYPE_CODE = '1004'
|
|
|
|
|
and SCAN_TIME between to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '14:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '15:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
union
|
|
|
|
|
select '15:30' as name, nvl(count(1),0) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
where DETIAL_TYPE_CODE = '1004'
|
|
|
|
|
and SCAN_TIME between to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '15:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '16:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
union
|
|
|
|
|
select '16:30' as name, nvl(count(1),0) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
where DETIAL_TYPE_CODE = '1004'
|
|
|
|
|
and SCAN_TIME between to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '16:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '17:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
union
|
|
|
|
|
select '17:30' as name, nvl(count(1),0) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
where DETIAL_TYPE_CODE = '1004'
|
|
|
|
|
and SCAN_TIME between to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '17:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '18:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
union
|
|
|
|
|
select '18:30' as name, nvl(count(1),0) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
where DETIAL_TYPE_CODE = '1004'
|
|
|
|
|
and SCAN_TIME between to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '18: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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|