Merge remote-tracking branch 'origin/main'

This commit is contained in:
xiaochou164 2023-08-16 17:07:42 +08:00
commit 244d32949f
2 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,42 @@
select
order_no ,
resistivity ,
min ,
case
when min >= 1.9 then '高阻'
else '低阻'
end
from
(
select
order_no ,
resistivity,
case
when resistivity like '>%' then SUBSTRING(resistivity, 5, 7)
when resistivity like '%~%' then SUBSTRING_INDEX(resistivity, '~', 1)
when resistivity like '%-%' then SUBSTRING_INDEX(resistivity, '-', 1)
when resistivity like '<%' then SUBSTRING(resistivity, 5, 7)
when resistivity like '>%' then SUBSTRING(resistivity, 2, 7)
when resistivity like '<%' then SUBSTRING(resistivity, 2, 7)
when resistivity = '未分档'
or resistivity is null then '未分档'
end min
from
mes_sync.mes_recycle_material_storage mrms
union
select
order_no ,
resistivity,
case
when resistivity like '&gt;%' then SUBSTRING(resistivity, 5, 7)
when resistivity like '%~%' then SUBSTRING_INDEX(resistivity, '~', 1)
when resistivity like '%-%' then SUBSTRING_INDEX(resistivity, '-', 1)
when resistivity like '&lt;%' then SUBSTRING(resistivity, 5, 7)
when resistivity like '>%' then SUBSTRING(resistivity, 2, 7)
when resistivity like '<%' then SUBSTRING(resistivity, 2, 7)
when resistivity = '未分档'
or resistivity is null then '未分档'
end
from
mes_sync.mes_disposable_qc_task
)a

View File

@ -0,0 +1,24 @@
select
mfgdate ,
crystalbarno ,
eqpid ,
subprod ,
area ,
area1 ,
qclength QC长度,
qcweight ,
qctime QC检验时间,
adjustcrucible ,
adjustcruciblecode ,
crusize ,
timeinterval ,
erpmoname ERP工单号,
moprodname ,
moproddesc
from
reportdata.siteonlinecrucibleyield s
where 1=1
and qctime >= concat(date_format(now()-8.5/24,'%Y-%m-') ,'01 08:30:00')
##and qctime >= concat(date_format(date_sub(now(),interval 1 month)-8.5/24,'%Y-%m-') ,'01 08:30:00') /*上月第一天 */
and qctime < concat(date_format(now()-8.5/24,'%Y-%m-%d') ,' 08:30:00')
order by qctime