From 8f72f6f8588ff6e9b5dcecc8a27a575767f5e5ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Wed, 24 Dec 2025 15:59:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- soong_workflow/models/soong_workflow_mixin.py | 31 +++++++++++++------ .../models/issue_approval_decision.py | 2 ++ .../views/issue_approval_decision_views.xml | 4 +++ 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py index 28068a7f3..1962fa8e9 100644 --- a/soong_workflow/models/soong_workflow_mixin.py +++ b/soong_workflow/models/soong_workflow_mixin.py @@ -332,7 +332,7 @@ class SoongWorkflowMixin(models.AbstractModel): index = 20 # 防止死循环 break current_department = self.department_id - if btn_rec.link_id and btn_rec.link_id in current_node.out_link_ids: + if btn_rec.link_id in current_node.out_link_ids and len(current_node.out_link_ids) == 1: matched_link = btn_rec.link_id next_node = matched_link.node_to matched_key = next_node.name @@ -341,14 +341,27 @@ class SoongWorkflowMixin(models.AbstractModel): # 筛选与当前节点部门匹配的后续节点 valid_nodes = [] for link in current_node.out_link_ids: - target_node = link.node_to - # 如果目标节点有部门限制,且与当前节点部门匹配 - if target_node.department_id and any( - dept in current_department or - current_department in self.get_all_sub_departments(dept) - for dept in target_node.department_id - ): - valid_nodes.append((target_node, link)) + if self.name_title == '业务审批': + category_names = self.information_categories_ids.mapped('name') + target_name = link.name.split('->')[-1].strip() + if '工会活动' in category_names: + if target_name == '工会主席': + target_node = link.node_to + valid_nodes.append((target_node, link)) + else: + if target_name == '复核': + target_node = link.node_to + valid_nodes.append((target_node, link)) + + else: + target_node = link.node_to + # 如果目标节点有部门限制,且与当前节点部门匹配 + if target_node.department_id and any( + dept in current_department or + current_department in self.get_all_sub_departments(dept) + for dept in target_node.department_id + ): + valid_nodes.append((target_node, link)) # 尝试父部门匹配 if not valid_nodes and current_department and current_department.parent_id: diff --git a/yuthon_issue/models/issue_approval_decision.py b/yuthon_issue/models/issue_approval_decision.py index 24e0085af..40e941104 100644 --- a/yuthon_issue/models/issue_approval_decision.py +++ b/yuthon_issue/models/issue_approval_decision.py @@ -11,6 +11,8 @@ class IssueApprovalDecision(models.Model): decision_type_on_id = fields.Many2one('issue.approval.decision.type', string='事项类别上级') sequence = fields.Char(string='序号', store=True) specifics = fields.Text(string='具体事项') + by_law = fields.Selection([('yes', '是'), ('no', '否')], string='是否经过法律审核') + is_filing = fields.Selection([('yes', '备'), ('no', '否')], string='是否备案') council_id = fields.Many2one('issue.library.type', string='党总委员会') team_meet_id = fields.Many2one('issue.library.type', string='经营班子会') board_meet_id = fields.Many2one('issue.library.type', string='董事会') diff --git a/yuthon_issue/views/issue_approval_decision_views.xml b/yuthon_issue/views/issue_approval_decision_views.xml index 639c2199f..11f01459e 100644 --- a/yuthon_issue/views/issue_approval_decision_views.xml +++ b/yuthon_issue/views/issue_approval_decision_views.xml @@ -10,12 +10,14 @@ + + @@ -45,6 +47,8 @@ + +