|
|
|
|
@ -280,7 +280,7 @@ group by MATERIAL_NAME
|
|
|
|
|
select count(1) as qty,
|
|
|
|
|
QUALITY_DEFECTS_DESC as name
|
|
|
|
|
from IMOS_QA_PRODUCT_QUALITY
|
|
|
|
|
where ITEM_CODE in (1006, 1001)
|
|
|
|
|
where ITEM_CODE in (1006, 1001) and ROWNUM <6
|
|
|
|
|
and to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')
|
|
|
|
|
-- and to_char(CREATION_DATE, 'yyyy-MM-dd') between to_char(sysdate - 1, 'yyyy-mm-dd') and to_char(sysdate + 1, 'yyyy-mm-dd')
|
|
|
|
|
group by QUALITY_DEFECTS_DESC
|
|
|
|
|
@ -383,4 +383,72 @@ group by MATERIAL_NAME
|
|
|
|
|
where ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - 20 > 600
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="mtk_selectInStore3d" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
select
|
|
|
|
|
substr(MATERIAL_NAME,
|
|
|
|
|
case
|
|
|
|
|
when instr(MATERIAL_NAME, '-', 1, 1) = 0 then 1
|
|
|
|
|
else instr(MATERIAL_NAME, '-', 1, 1) + 1
|
|
|
|
|
end,
|
|
|
|
|
instr(MATERIAL_NAME, ',', 1, 1)
|
|
|
|
|
-
|
|
|
|
|
case
|
|
|
|
|
when instr(MATERIAL_NAME, '-', 1, 1) = 0 then 1
|
|
|
|
|
else instr(MATERIAL_NAME, '-', 1, 1) + 1
|
|
|
|
|
end) as name,
|
|
|
|
|
sum(IN_QTY ) as qty
|
|
|
|
|
from IMOS_PR_PRODUCT_IN
|
|
|
|
|
where CREATION_DATE
|
|
|
|
|
between to_date(to_char(SYSDATE-2, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
and to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
|
|
|
|
|
group by MATERIAL_NAME
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectNowXkOutPut" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
select (TO_CHAR(SYSDATE, 'hh24') || ':30') as name,
|
|
|
|
|
nvl(sum(actual_qty), 0) as qty
|
|
|
|
|
from IMOS.IMOS_PR_PLAN
|
|
|
|
|
where plan_date is not null
|
|
|
|
|
and process_code = 1002
|
|
|
|
|
and delete_flag = '0'
|
|
|
|
|
and (to_char(plan_date, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd') or
|
|
|
|
|
to_char(plan_date, 'yyyy-MM-dd') = to_char(sysdate-1, 'yyyy-MM-dd'))
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectNowXkOutPut1" resultType="int">
|
|
|
|
|
select nvl(sum(actual_qty), 0)
|
|
|
|
|
from IMOS.IMOS_PR_PLAN
|
|
|
|
|
where plan_date is not null
|
|
|
|
|
and process_code = 1002
|
|
|
|
|
and delete_flag = '0'
|
|
|
|
|
-- and to_char(plan_date, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')
|
|
|
|
|
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
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectXK_H_QTY" resultType="int">
|
|
|
|
|
select * from ( select nvl(QTY, 0) from XK_H_QTY order by CREATE_TIME desc) where ROWNUM=1
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertXK_H_QTY">
|
|
|
|
|
insert into XK_H_QTY(H_NAME, QTY, QTY_C,ZS_C)
|
|
|
|
|
values (#{name},#{nowOut},#{cha},#{zs})
|
|
|
|
|
</insert>
|
|
|
|
|
</mapper>
|