evoToK3Cloud/script/sql/work_alert_push_config_recipient_rules.sql
2026-08-11 14:29:31 +08:00

18 lines
1.1 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 预警推送:按工段/角色分对象接收人
ALTER TABLE `work_alert_push_config`
ADD COLUMN `recipient_rules` text DEFAULT NULL COMMENT '分对象接收人JSON如{"机一工段":"staffId1"}' AFTER `ding_user_ids`;
-- 拆分工序汇报为两项(保留 getProductionOrder 兼容旧配置)
INSERT INTO `work_alert_push_config` (`push_code`, `push_name`, `push_time`, `enabled`, `sort_order`, `remark`, `create_time`) VALUES
('getProcessReportNotInspected', '汇报未质检', '08:35', '0', 61, '私发:填写质检人员 StaffId', NOW()),
('getProcessReportNotStockedIn', '质检未入库', '08:36', '0', 62, '私发:填写库房人员 StaffId', NOW())
ON DUPLICATE KEY UPDATE push_name = VALUES(push_name), remark = VALUES(remark);
UPDATE `work_alert_push_config`
SET `push_name` = '工序汇报预警(合并)', `remark` = '未质检+未入库双Sheet建议改用拆分项'
WHERE `push_code` = 'getProductionOrder';
UPDATE `work_alert_push_config`
SET `remark` = '配置 recipient_rules 按工段长分人私发留空则多Sheet群发'
WHERE `push_code` IN ('getMassageTransInPendingOut', 'getMassageStartedNotTransIn');