|
|
|
|
@ -435,30 +435,38 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectNowXkOutPut1" resultType="int">
|
|
|
|
|
select nvl(sum(actual_qty), 0)
|
|
|
|
|
from IMOS.IMOS_PR_PLAN
|
|
|
|
|
select nvl(sum(actual_qty), 0)
|
|
|
|
|
from IMOS.IMOS_PR_PLAN ipp
|
|
|
|
|
left join (select * from haiwei.BASE_DAY_WBTIME where ROWNUM = 1 order by CREATE_TIME desc) wb on 1=1
|
|
|
|
|
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
|
|
|
|
|
and process_code = 1002
|
|
|
|
|
and delete_flag = '0'
|
|
|
|
|
and ipp.CREATION_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
|
|
|
|
|
-- 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">
|
|
|
|
|
@ -470,6 +478,6 @@
|
|
|
|
|
values (#{name},#{nowOut},#{cha},#{zs})
|
|
|
|
|
</insert>
|
|
|
|
|
<select id="selectTeamGroups" resultType="integer">
|
|
|
|
|
select case when sysdate < W_END then 0 else 1 end from BASE_DAY_WBTIME where ROWNUM=1 order by CREATE_TIME desc
|
|
|
|
|
select case when sysdate < = W_END then 0 else 1 end from BASE_DAY_WBTIME where ROWNUM=1 order by CREATE_TIME desc
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|