CREATE TABLE IF NOT EXISTS `oa_node_assignee` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `node_assignee_id` char(36) DEFAULT NULL, `model_id` char(36) DEFAULT NULL COMMENT '模型ID', `model_version` int(11) DEFAULT NULL COMMENT '模型版本', `deployment_id` char(36) DEFAULT NULL COMMENT '部署ID', `node_id` char(60) DEFAULT NULL COMMENT '节点ID', `node_index` int(11) DEFAULT NULL COMMENT '节点下标', `node_type` varchar(255) DEFAULT NULL COMMENT '节点类型', `assignee_count` varchar(255) DEFAULT NULL COMMENT '代理人数量', `assignee` varchar(255) DEFAULT NULL COMMENT '代理人', `assignee_name` varchar(255) DEFAULT NULL COMMENT '代理人名称', `candidates` varchar(255) DEFAULT NULL COMMENT '候选人', `candidate_names` varchar(255) DEFAULT NULL COMMENT '候选人名称', `multiple_type` varchar(255) DEFAULT NULL COMMENT '多实例类型', `complete_condition` varchar(255) DEFAULT NULL COMMENT '完成条件', `complete_count` int(11) DEFAULT NULL COMMENT '完成人数量', `multiple_assignees` varchar(255) DEFAULT NULL COMMENT '多实例候选人', `multiple_assignee_names` varchar(255) DEFAULT NULL COMMENT '多实例候选人名称', `assignee_type` varchar(255) DEFAULT NULL COMMENT '代理人类型', `auto_assign_type` varchar(255) DEFAULT NULL COMMENT '自动方式', `department_type` varchar(255) DEFAULT NULL COMMENT '部门类型', `departments` varchar(255) DEFAULT NULL COMMENT '部门', `department_names` varchar(255) DEFAULT NULL COMMENT '部门名称', `roles` varchar(255) DEFAULT NULL COMMENT '角色', `role_names` varchar(255) DEFAULT NULL COMMENT '角色名称', `positions` varchar(255) DEFAULT NULL COMMENT '职位', `position_names` varchar(255) DEFAULT NULL COMMENT '职位名称', `quick_assignee` varchar(255) DEFAULT NULL COMMENT '快速代理人', `previous_n_step` int(11) DEFAULT NULL COMMENT '前N步', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='节点代理人'; INSERT INTO oa_node_assignee( node_assignee_id, model_id, model_version, node_id, node_index, node_type, assignee_count, assignee, assignee_name, candidates, candidate_names, multiple_type, complete_condition, complete_count, multiple_assignees, multiple_assignee_names, assignee_type, auto_assign_type, department_type, departments, department_names, roles, role_names, positions, position_names, quick_assignee, previous_n_step ) VALUES( #{nodeFieldId}, #{modelId}, #{modelVersion}, #{nodeId}, #{nodeIndex}, #{nodeType}, #{assigneeCount}, #{assignee}, #{assigneeName}, #{candidates}, #{candidateNames}, #{multipleType}, #{completeCondition}, #{completeCount}, #{multipleAssignees}, #{multipleAssigneeNames}, #{assigneeType}, #{autoAssignType}, #{departmentType}, #{departments}, #{departmentNames}, #{roles}, #{roleNames}, #{positions}, #{positionNames}, #{quickAssignee}, #{previousNStep} ) DELETE FROM oa_node_assignee WHERE model_id = #{modelId} AND model_version = #{modelVersion} AND node_id = #{nodeId} UPDATE oa_node_assignee SET deployment_id = #{deploymentId} WHERE model_id = #{modelId} AND model_version = #{modelVersion} UPDATE oa_node_assignee SET deployment_id = NULL WHERE deployment_id = #{_parameter}