|
|
|
|
@ -403,4 +403,52 @@ group by MATERIAL_NAME
|
|
|
|
|
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>
|