|
|
|
|
@ -398,10 +398,10 @@ FROM (select PLAN_NUMBER
|
|
|
|
|
|
|
|
|
|
<select id="zz_selectLossInfo" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
select case
|
|
|
|
|
when sysdate > to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '09:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
when sysdate > to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '10:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
then
|
|
|
|
|
case
|
|
|
|
|
when sysdate > to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '14:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
when sysdate > to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '15:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
then qty - 60
|
|
|
|
|
else qty - 30 end
|
|
|
|
|
end as qty ,name
|
|
|
|
|
@ -423,16 +423,16 @@ FROM (select PLAN_NUMBER
|
|
|
|
|
where ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - t1.rhy > 180
|
|
|
|
|
and ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - t1.rhy <= 600
|
|
|
|
|
union
|
|
|
|
|
select case
|
|
|
|
|
select nvl(case
|
|
|
|
|
when sysdate > to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '09:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
then
|
|
|
|
|
case
|
|
|
|
|
when sysdate > to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '14:30:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
then qty - 2
|
|
|
|
|
else qty - 1 end
|
|
|
|
|
end as qty,name
|
|
|
|
|
end,0) as qty,name
|
|
|
|
|
from (
|
|
|
|
|
select nvl(count(1)-2,0) as qty, 4 as name
|
|
|
|
|
select nvl(count(1),0) 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) - t1.rhy > 600)
|
|
|
|
|
@ -461,7 +461,11 @@ from (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectNowXkOutPut" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
select (TO_CHAR(SYSDATE, 'hh24')-1 || ':30') as name,
|
|
|
|
|
select (
|
|
|
|
|
case when
|
|
|
|
|
TO_CHAR(SYSDATE, 'hh24')-1 < 0
|
|
|
|
|
then '23' else TO_CHAR(SYSDATE, 'hh24')-1 end
|
|
|
|
|
|| ':30') as name,
|
|
|
|
|
nvl(sum(actual_qty), 0) as qty
|
|
|
|
|
from IMOS.IMOS_PR_PLAN xhq
|
|
|
|
|
left join (select * from (select * from haiwei.BASE_DAY_WBTIME order by CREATE_TIME desc) where ROWNUM = 1) wb on 1 = 1
|
|
|
|
|
@ -619,16 +623,18 @@ from (
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="mtk_selectOrderInfoBy3dTatle" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
select sum(ORDER_QTY) as qty, '订单数量' as name
|
|
|
|
|
select count(1) as qty, '订单数量' as name
|
|
|
|
|
from IMOS_PR_ORDER
|
|
|
|
|
where FINISH_DATE between to_date(to_char(SYSDATE - 3, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
union
|
|
|
|
|
select sum(ACTUAL_QTY) as qty,
|
|
|
|
|
'完成数量' as name
|
|
|
|
|
select count(1) as qty, '完成数量' as name
|
|
|
|
|
from IMOS_PR_ORDER
|
|
|
|
|
where FINISH_DATE between to_date(to_char(SYSDATE - 3, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
where FINISH_DATE between to_date(
|
|
|
|
|
to_char(SYSDATE - 3, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '00:00:00',
|
|
|
|
|
'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and ORDER_QTY - ACTUAL_QTY < 6
|
|
|
|
|
union
|
|
|
|
|
select round(
|
|
|
|
|
(
|
|
|
|
|
@ -686,5 +692,91 @@ from (
|
|
|
|
|
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<resultMap id="MTKBeen" type="com.ruoyi.system.domain.MTKBeen">
|
|
|
|
|
<result column="code" property="code"/>
|
|
|
|
|
<collection property="list" javaType="java.util.List" resultMap="BoxOutputBeen" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<resultMap id="BoxOutputBeen" type="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
<result column="name" property="name"/>
|
|
|
|
|
<result column="qty" property="qty"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<select id="mtk_sselectQATop3" resultMap="MTKBeen">
|
|
|
|
|
-- 1002,内胆预装检漏
|
|
|
|
|
-- 1003,安全检测
|
|
|
|
|
-- 1001,成品检漏
|
|
|
|
|
-- 1005,测温附加检测
|
|
|
|
|
-- 1006,成品外观检测
|
|
|
|
|
select *
|
|
|
|
|
from (
|
|
|
|
|
select count(1) as qty,
|
|
|
|
|
QUALITY_DEFECTS_DESC as name,
|
|
|
|
|
'成品检漏' as code
|
|
|
|
|
from IMOS_QA_PRODUCT_QUALITY
|
|
|
|
|
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(SYSDATE, 'yyyy-MM-dd')
|
|
|
|
|
and ITEM_CODE = '1001'
|
|
|
|
|
group by QUALITY_DEFECTS_DESC, ITEM_CODE
|
|
|
|
|
order by count(1) desc)
|
|
|
|
|
where ROWNUM < 4
|
|
|
|
|
union
|
|
|
|
|
select *
|
|
|
|
|
from (
|
|
|
|
|
select count(1) as qty,
|
|
|
|
|
QUALITY_DEFECTS_DESC as name,
|
|
|
|
|
'内胆检漏' as code
|
|
|
|
|
from IMOS_QA_PRODUCT_QUALITY
|
|
|
|
|
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(SYSDATE, 'yyyy-MM-dd')
|
|
|
|
|
and ITEM_CODE = '1002'
|
|
|
|
|
group by QUALITY_DEFECTS_DESC, ITEM_CODE
|
|
|
|
|
order by count(1) desc)
|
|
|
|
|
where ROWNUM < 4
|
|
|
|
|
union
|
|
|
|
|
select *
|
|
|
|
|
from (
|
|
|
|
|
select count(1) as qty,
|
|
|
|
|
QUALITY_DEFECTS_DESC as name,
|
|
|
|
|
'安全检测' as code
|
|
|
|
|
from IMOS_QA_PRODUCT_QUALITY
|
|
|
|
|
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(SYSDATE, 'yyyy-MM-dd')
|
|
|
|
|
and ITEM_CODE = '1003'
|
|
|
|
|
group by QUALITY_DEFECTS_DESC, ITEM_CODE
|
|
|
|
|
order by count(1) desc)
|
|
|
|
|
where ROWNUM < 4
|
|
|
|
|
union
|
|
|
|
|
select *
|
|
|
|
|
from (
|
|
|
|
|
select count(1) as qty,
|
|
|
|
|
QUALITY_DEFECTS_DESC as name,
|
|
|
|
|
'测温性能' as code
|
|
|
|
|
from IMOS_QA_PRODUCT_QUALITY
|
|
|
|
|
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(SYSDATE, 'yyyy-MM-dd')
|
|
|
|
|
and ITEM_CODE = '1005'
|
|
|
|
|
group by QUALITY_DEFECTS_DESC, ITEM_CODE
|
|
|
|
|
order by count(1) desc)
|
|
|
|
|
where ROWNUM < 4
|
|
|
|
|
union
|
|
|
|
|
select *
|
|
|
|
|
from (
|
|
|
|
|
select count(1) as qty,
|
|
|
|
|
QUALITY_DEFECTS_DESC as name,
|
|
|
|
|
'成品外观' as code
|
|
|
|
|
from IMOS_QA_PRODUCT_QUALITY
|
|
|
|
|
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(SYSDATE, 'yyyy-MM-dd')
|
|
|
|
|
and ITEM_CODE = '1006'
|
|
|
|
|
group by QUALITY_DEFECTS_DESC, ITEM_CODE
|
|
|
|
|
order by count(1) desc)
|
|
|
|
|
where ROWNUM < 4
|
|
|
|
|
union
|
|
|
|
|
select *
|
|
|
|
|
from (
|
|
|
|
|
select count(1) as qty,
|
|
|
|
|
QUALITY_DEFECTS_DESC as name,
|
|
|
|
|
'柱状图' as code
|
|
|
|
|
from IMOS_QA_PRODUCT_QUALITY
|
|
|
|
|
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(SYSDATE, 'yyyy-MM-dd')
|
|
|
|
|
group by QUALITY_DEFECTS_DESC, ITEM_CODE
|
|
|
|
|
order by count(1) desc)
|
|
|
|
|
where ROWNUM < 11
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|