Browse Source

fix:日常维护任务设备赋值脚本修改

zhongwei
haungxing 7 months ago
parent
commit
841fe37206
  1. 2
      hzims-service/operational/src/main/resources/db/2.0.3.sql

2
hzims-service/operational/src/main/resources/db/2.0.3.sql

@ -22,7 +22,7 @@ update hzims_oper_maintenance_plan t1,(
) t2 set t1.`EM_NAME` = t2.`EM_NAME` WHERE t1.`ID` = t2.`ID` and t1.`EM_NAME` is null; ) t2 set t1.`EM_NAME` = t2.`EM_NAME` WHERE t1.`ID` = t2.`ID` and t1.`EM_NAME` is null;
-- 更新日常维护任务设备名称 -- 更新日常维护任务设备名称
update hzims_oper_maintenance_task t1,( update hzims_oper_maintenance_task t1,(
select ml.`id`,ml.`EM_CODE`,GROUP_CONCAT(ei.`NAME`) EM_NAME from hzims_oper_maintenance_task ml,prod_hzims_equipment.hzims_em_info ei where ml.`IS_DELETED` = 0 and ei.`IS_DELETED` = 0 and FIND_IN_SET(ei.`NUMBER`,ml.`EM_CODE`) group by ml.`id`,ml.`EM_CODE` select ml.`id`,ml.`EM_CODE`,GROUP_CONCAT(ei.`NAME`) EM_NAME from hzims_oper_maintenance_task ml,equipment.hzims_em_info ei where ml.`IS_DELETED` = 0 and ei.`IS_DELETED` = 0 and FIND_IN_SET(ei.`NUMBER`,ml.`EM_CODE`) group by ml.`id`,ml.`EM_CODE`
) t2 set t1.`EM_NAME` = t2.`EM_NAME` WHERE t1.`ID` = t2.`ID` and t1.`EM_NAME` is null; ) t2 set t1.`EM_NAME` = t2.`EM_NAME` WHERE t1.`ID` = t2.`ID` and t1.`EM_NAME` is null;
-- 更新日常维护计划周期字段值 -- 更新日常维护计划周期字段值
update `hzims_oper_maintenance_plan` mp,`hzims_oper_maintenance_library` ml update `hzims_oper_maintenance_plan` mp,`hzims_oper_maintenance_library` ml

Loading…
Cancel
Save