修改存储过程用户root为admin
This commit is contained in:
parent
27852ec479
commit
c48c3f4152
|
@ -23,5 +23,7 @@ REPLACE into mes_sync.erp_job_mtl_send SELECT * from mes_origin.erp_job_mtl_send
|
||||||
REPLACE into mes_sync.mes_draw_line_task SELECT * from mes_origin.mes_draw_line_task;
|
REPLACE into mes_sync.mes_draw_line_task SELECT * from mes_origin.mes_draw_line_task;
|
||||||
REPLACE into mes_sync.mes_disposable_qc_task SELECT * from mes_origin.mes_disposable_qc_task;
|
REPLACE into mes_sync.mes_disposable_qc_task SELECT * from mes_origin.mes_disposable_qc_task;
|
||||||
|
|
||||||
|
set global sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
|
||||||
|
|
||||||
END;
|
END;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
create
|
create
|
||||||
definer = root@`%` procedure UpdateAllfeedingdetail()
|
definer = admin@`%` procedure UpdateAllfeedingdetail()
|
||||||
BEGIN
|
BEGIN
|
||||||
DELETE from reportdata.allfeedingdetail;
|
DELETE from reportdata.allfeedingdetail;
|
||||||
replace into reportdata.allfeedingdetail(`month`,mfgdate,mesmoname,eqpid,moprodname,moproddesc,
|
replace into reportdata.allfeedingdetail(`month`,mfgdate,mesmoname,eqpid,moprodname,moproddesc,
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
##############################
|
##############################
|
||||||
##@author:gong.chengbo ##
|
##@author:gong.chengbo ##
|
||||||
##@createdate:2023-08-10 ##
|
##@createdate:2023-08-10 ##
|
||||||
##############################
|
##############################
|
||||||
#用于归档完结工单的产量时间等信息
|
#用于归档完结工单的产量时间等信息
|
||||||
###建立临时表处理数据
|
###建立临时表处理数据
|
||||||
DROP TEMPORARY TABLE IF EXISTS mesmodailyyieldtemp;
|
DROP TABLE IF EXISTS mesmodailyyieldtemp;
|
||||||
CREATE TEMPORARY TABLE mesmodailyyieldtemp
|
CREATE TABLE mesmodailyyieldtemp
|
||||||
(
|
(
|
||||||
mesmoname varchar(255) not null comment 'MES工单/炉次号',
|
mesmoname varchar(255) not null comment 'MES工单/炉次号',
|
||||||
erpmoname varchar(255) null comment 'ERP工单号',
|
erpmoname varchar(255) null comment 'ERP工单号',
|
||||||
|
@ -50,7 +50,8 @@ set mmd.stovetime = mo.stovetime,
|
||||||
mmd.moprod = mo.subprod,
|
mmd.moprod = mo.subprod,
|
||||||
mmd.area = eq.area,
|
mmd.area = eq.area,
|
||||||
mmd.area1 = eq.area1,
|
mmd.area1 = eq.area1,
|
||||||
mmd.finishdate = mo.finish_time;
|
mmd.finishdate = mo.finish_time
|
||||||
|
where 1=1;
|
||||||
|
|
||||||
### 从投炉表中更新坩埚等信息
|
### 从投炉表中更新坩埚等信息
|
||||||
update mesmodailyyieldtemp mmd
|
update mesmodailyyieldtemp mmd
|
||||||
|
@ -64,7 +65,8 @@ update mesmodailyyieldtemp mmd
|
||||||
on (ft.feeding_task_id = fd.feeding_task_id and fd.material_type = '1')) cru on (mmd.mesmoname = cru.mesmoname)
|
on (ft.feeding_task_id = fd.feeding_task_id and fd.material_type = '1')) cru on (mmd.mesmoname = cru.mesmoname)
|
||||||
set mmd.cruciblesn = cru.cruciblesn,
|
set mmd.cruciblesn = cru.cruciblesn,
|
||||||
mmd.crucible = cru.crucible,
|
mmd.crucible = cru.crucible,
|
||||||
mmd.crusize = cru.crusize;
|
mmd.crusize = cru.crusize
|
||||||
|
where 1=1;
|
||||||
|
|
||||||
|
|
||||||
###更新工单运行时间
|
###更新工单运行时间
|
||||||
|
@ -87,11 +89,13 @@ where mmd.adjustcrucible is null;
|
||||||
##根据坩埚
|
##根据坩埚
|
||||||
update mesmodailyyieldtemp mmd
|
update mesmodailyyieldtemp mmd
|
||||||
INNER JOIN reportdata.dict d on (mmd.adjustcrucible = d.dictkey and d.cate = 'cruccode')
|
INNER JOIN reportdata.dict d on (mmd.adjustcrucible = d.dictkey and d.cate = 'cruccode')
|
||||||
set mmd.adjustcruciblecode = d.value;
|
set mmd.adjustcruciblecode = d.value
|
||||||
|
where 1=1;
|
||||||
update mesmodailyyieldtemp mmd
|
update mesmodailyyieldtemp mmd
|
||||||
INNER JOIN reportdata.dict d on (mmd.crucible = d.dictkey and d.cate = 'crucname')
|
INNER JOIN reportdata.dict d on (mmd.crucible = d.dictkey and d.cate = 'crucname')
|
||||||
set mmd.adjustcruciblecode = d.value,
|
set mmd.adjustcruciblecode = d.value,
|
||||||
mmd.adjustcrucible = d.value1;
|
mmd.adjustcrucible = d.value1
|
||||||
|
where 1=1;
|
||||||
|
|
||||||
####修正部分佑鑫坩埚
|
####修正部分佑鑫坩埚
|
||||||
update mesmodailyyieldtemp mmd
|
update mesmodailyyieldtemp mmd
|
||||||
|
@ -117,16 +121,17 @@ update mesmodailyyieldtemp mmd
|
||||||
right join mes_sync.mes_feeding_detail fd
|
right join mes_sync.mes_feeding_detail fd
|
||||||
on (ft.feeding_task_id = fd.feeding_task_id and fd.material_type = '2')
|
on (ft.feeding_task_id = fd.feeding_task_id and fd.material_type = '2')
|
||||||
group by ft.order_no) d on (mmd.mesmoname = d.mesmoname)
|
group by ft.order_no) d on (mmd.mesmoname = d.mesmoname)
|
||||||
set mmd.totalstoveweight = d.stoveweight;
|
set mmd.totalstoveweight = d.stoveweight
|
||||||
|
where 1=1;
|
||||||
|
|
||||||
update mesmodailyyieldtemp mmd
|
update mesmodailyyieldtemp mmd
|
||||||
left join
|
left join
|
||||||
(select order_no mesmoname, sum(weight) outweight, sum(length) length
|
(select order_no mesmoname, sum(weight) outweight, sum(length) 'length'
|
||||||
from mes_sync.mes_production
|
from mes_sync.mes_production
|
||||||
group by order_no) t on (mmd.mesmoname = t.mesmoname)
|
group by order_no) t on (mmd.mesmoname = t.mesmoname)
|
||||||
set mmd.totallength = t.length,
|
set mmd.totallength = t.length,
|
||||||
mmd.totaloutweight = t.outweight;
|
mmd.totaloutweight = t.outweight
|
||||||
|
where 1=1;
|
||||||
|
|
||||||
|
|
||||||
###更新圆棒有效长度
|
###更新圆棒有效长度
|
||||||
|
@ -151,14 +156,25 @@ update mesmodailyyieldtemp mmd
|
||||||
set mmd.rod = p.round
|
set mmd.rod = p.round
|
||||||
where mmd.rod is null;
|
where mmd.rod is null;
|
||||||
|
|
||||||
|
###WFSY技术实验规格
|
||||||
|
update mesmodailyyieldtemp mmd
|
||||||
|
INNER JOIN
|
||||||
|
(
|
||||||
|
select distinct substring(moprodname, 1, 5) subprod, rod
|
||||||
|
from mesmodailyyieldtemp
|
||||||
|
where rod is not null
|
||||||
|
) p on (substring(mmd.moprodname,1,5) = p.subprod)
|
||||||
|
set mmd.rod = p.rod
|
||||||
|
where mmd.moprod = 'WFSY' and mmd.rod is null;
|
||||||
|
|
||||||
###折算圆棒有效重量
|
###折算圆棒有效重量
|
||||||
update mesmodailyyieldtemp mmd
|
update mesmodailyyieldtemp mmd
|
||||||
set mmd.totalqcweight = mmd.totalqclength / mmd.rod
|
set mmd.totalqcweight = mmd.totalqclength / mmd.rod
|
||||||
where totalqcweight is null;
|
where totalqcweight is null;
|
||||||
|
|
||||||
|
replace into reportdata.mesmodailyyield
|
||||||
select *
|
select *
|
||||||
from mesmodailyyieldtemp
|
from mesmodailyyieldtemp
|
||||||
order by mfgdate desc;
|
order by mfgdate desc;
|
||||||
|
|
||||||
#DROP TEMPORARY TABLE mesmodailyyieldtemp;
|
DROP TABLE mesmodailyyieldtemp;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
create
|
create
|
||||||
definer = root@`%` procedure UpdateMostatus()
|
definer = admin@`%` procedure UpdateMostatus()
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
REPLACE into reportdata.Mostatus(area1,MESmoname,ERPmoname,eqpid,prodname,proddesc,crusize,stovetime,feeding_task_id,crucible,subprod,mostatus,mostatusdesc,finish_time,runtime)
|
REPLACE into reportdata.Mostatus(area1,MESmoname,ERPmoname,eqpid,prodname,proddesc,crusize,stovetime,feeding_task_id,crucible,subprod,mostatus,mostatusdesc,finish_time,runtime)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
create
|
create
|
||||||
definer = root@`%` procedure UpdateRecyclematerialouput()
|
definer = admin@`%` procedure UpdateRecyclematerialouput()
|
||||||
BEGIN
|
BEGIN
|
||||||
replace into reportdata.recyclematerialouput(lotsn,prodname,proddesc,prodtype,level,
|
replace into reportdata.recyclematerialouput(lotsn,prodname,proddesc,prodtype,level,
|
||||||
resistivity,weight,cate1,type,cate2,cate3,update_time,mfgdate,month)
|
resistivity,weight,cate1,type,cate2,cate3,update_time,mfgdate,month)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
create
|
create
|
||||||
definer = root@`%` procedure UpdateSiteOnlineYield() comment '更新产量表存储过称'
|
definer = admin@`%` procedure UpdateSiteOnlineYield() comment '更新产量表存储过称'
|
||||||
BEGIN
|
BEGIN
|
||||||
replace into reportdata.siteonlinecrucibleyield(crystalbarno,MESmoname,eqpid,actualprodname,actualproddesc,outweight,outlength,outtime)
|
replace into reportdata.siteonlinecrucibleyield(crystalbarno,MESmoname,eqpid,actualprodname,actualproddesc,outweight,outlength,outtime)
|
||||||
SELECT code,order_no,stove_no,product_no,product_name,weight,length,update_time
|
SELECT code,order_no,stove_no,product_no,product_name,weight,length,update_time
|
||||||
|
|
Loading…
Reference in New Issue