|
|
|
|
@ -369,33 +369,41 @@
|
|
|
|
|
on ta.name = ipr.MATERIAL_NAME
|
|
|
|
|
order by to_number(STATION_NO)
|
|
|
|
|
</select>
|
|
|
|
|
<insert id="deleteTimp1">
|
|
|
|
|
delete from haiwei.temp1
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertTimp1">
|
|
|
|
|
insert into haiwei.temp1 (
|
|
|
|
|
select row_number() over (order by PRODUCTION_DATE) as row_number,
|
|
|
|
|
PRODUCTION_DATE as day,
|
|
|
|
|
(select * from (select RHYTHM from haiwei.BASE_RHYTHM where ROWNUM=1 order by ID desc )) as rhy
|
|
|
|
|
from IMOS.IMOS_PR_PRODUCT_BARCODE ippb
|
|
|
|
|
left join (select * from haiwei.BASE_DAY_WBTIME where ROWNUM = 1 order by CREATE_TIME desc) 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'
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="QQ" 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
|
|
|
|
|
<select id="zz_selectLossInfo" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
|