فهرست منبع

会计,资质中添加个人执业章签章功能

徐滕 3 روز پیش
والد
کامیت
e6e65330f0

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 21 - 10
docs/features/finance/报告执业签章.md


+ 159 - 0
docs/features/finance/财务-报告执业签章.bpmn20.xml

@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions
+    xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
+    xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
+    xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
+    xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:flowable="http://flowable.org/bpmn"
+    id="Definitions_1"
+    targetNamespace="http://flowable.org/bpmn">
+  <bpmn:process id="Process_1794972287036" name="财务-报告执业签章" isExecutable="true">
+    <bpmn:startEvent id="StartEvent_apply" name="开始" flowable:initiator="applyUserId" flowable:formKey="/cw/practiceSignature/PracticeSignatureForm">
+      <bpmn:outgoing>Flow_start_to_annotator1</bpmn:outgoing>
+    </bpmn:startEvent>
+    <bpmn:userTask id="Activity_annotator1" name="签字注师1签章" flowable:formKey="/cw/practiceSignature/PracticeSignatureAuditForm" flowable:formType="2">
+      <bpmn:extensionElements>
+        <flowable:Button id="btn_a1_agree" name="同意" code="_flow_agree" isHide="0" next="0" sort="2" />
+        <flowable:Button id="btn_a1_reject" name="驳回" code="_flow_reject" isHide="0" next="0" sort="3" />
+      </bpmn:extensionElements>
+      <bpmn:incoming>Flow_start_to_annotator1</bpmn:incoming>
+      <bpmn:incoming>Flow_reapply_back_to_annotator1</bpmn:incoming>
+      <bpmn:outgoing>Flow_a1_to_gateway1</bpmn:outgoing>
+    </bpmn:userTask>
+    <bpmn:sequenceFlow id="Flow_start_to_annotator1" sourceRef="StartEvent_apply" targetRef="Activity_annotator1" />
+    <bpmn:sequenceFlow id="Flow_a1_to_gateway1" sourceRef="Activity_annotator1" targetRef="Gateway_agree1" />
+    <bpmn:exclusiveGateway id="Gateway_agree1" name="注师1是否同意">
+      <bpmn:incoming>Flow_a1_to_gateway1</bpmn:incoming>
+      <bpmn:outgoing>Flow_gw1_agree_to_annotator2</bpmn:outgoing>
+      <bpmn:outgoing>Flow_gw1_reject_to_reapply</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:sequenceFlow id="Flow_gw1_agree_to_annotator2" name="同意" sourceRef="Gateway_agree1" targetRef="Activity_annotator2">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${agree}]]></bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:sequenceFlow id="Flow_gw1_reject_to_reapply" name="驳回" sourceRef="Gateway_agree1" targetRef="Activity_reapply">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${!agree}]]></bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:userTask id="Activity_annotator2" name="签字注师2签章" flowable:formKey="/cw/practiceSignature/PracticeSignatureAuditForm" flowable:formType="2">
+      <bpmn:extensionElements>
+        <flowable:Button id="btn_a2_agree" name="同意" code="_flow_agree" isHide="0" next="0" sort="2" />
+        <flowable:Button id="btn_a2_reject" name="驳回" code="_flow_reject" isHide="0" next="0" sort="3" />
+      </bpmn:extensionElements>
+      <bpmn:incoming>Flow_gw1_agree_to_annotator2</bpmn:incoming>
+      <bpmn:outgoing>Flow_a2_to_gateway2</bpmn:outgoing>
+    </bpmn:userTask>
+    <bpmn:sequenceFlow id="Flow_a2_to_gateway2" sourceRef="Activity_annotator2" targetRef="Gateway_agree2" />
+    <bpmn:exclusiveGateway id="Gateway_agree2" name="注师2是否同意">
+      <bpmn:incoming>Flow_a2_to_gateway2</bpmn:incoming>
+      <bpmn:outgoing>Flow_gw2_agree_to_end</bpmn:outgoing>
+      <bpmn:outgoing>Flow_gw2_reject_to_reapply</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:sequenceFlow id="Flow_gw2_agree_to_end" name="同意" sourceRef="Gateway_agree2" targetRef="EndEvent_finished">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${agree}]]></bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:sequenceFlow id="Flow_gw2_reject_to_reapply" name="驳回" sourceRef="Gateway_agree2" targetRef="Activity_reapply">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${!agree}]]></bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:userTask id="Activity_reapply" name="发起人重新申请" flowable:formKey="/cw/practiceSignature/PracticeSignatureReapplyForm" flowable:formType="2">
+      <bpmn:extensionElements>
+        <flowable:Assignee id="asg_reapply" type="applyUserId" value="" condition="0" operationType="0" sort="0" />
+        <flowable:Button id="btn_rp_reapply" name="重新申请" code="_flow_reapply" isHide="0" next="0" sort="9" />
+        <flowable:Button id="btn_rp_stop" name="流程终止" code="_flow_stop" isHide="0" next="0" sort="11" />
+        <flowable:Button id="btn_rp_close" name="关闭" code="_flow_close" isHide="0" next="0" sort="99" />
+      </bpmn:extensionElements>
+      <bpmn:incoming>Flow_gw1_reject_to_reapply</bpmn:incoming>
+      <bpmn:incoming>Flow_gw2_reject_to_reapply</bpmn:incoming>
+      <bpmn:outgoing>Flow_reapply_back_to_annotator1</bpmn:outgoing>
+    </bpmn:userTask>
+    <bpmn:sequenceFlow id="Flow_reapply_back_to_annotator1" sourceRef="Activity_reapply" targetRef="Activity_annotator1" />
+    <bpmn:endEvent id="EndEvent_finished" name="结束">
+      <bpmn:extensionElements>
+        <flowable:executionListener event="end" class="com.jeeplus.modules.flowable.listener.MyExecutionListener" />
+      </bpmn:extensionElements>
+      <bpmn:incoming>Flow_gw2_agree_to_end</bpmn:incoming>
+    </bpmn:endEvent>
+  </bpmn:process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1794972287036">
+      <bpmndi:BPMNShape id="StartEvent_apply_di" bpmnElement="StartEvent_apply">
+        <dc:Bounds x="152" y="202" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="158" y="245" width="25" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_annotator1_di" bpmnElement="Activity_annotator1">
+        <dc:Bounds x="260" y="180" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_agree1_di" bpmnElement="Gateway_agree1" isMarkerVisible="true">
+        <dc:Bounds x="425" y="195" width="50" height="50" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="410" y="252" width="80" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_annotator2_di" bpmnElement="Activity_annotator2">
+        <dc:Bounds x="550" y="180" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_agree2_di" bpmnElement="Gateway_agree2" isMarkerVisible="true">
+        <dc:Bounds x="715" y="195" width="50" height="50" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="700" y="252" width="80" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="EndEvent_finished_di" bpmnElement="EndEvent_finished">
+        <dc:Bounds x="842" y="202" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="848" y="245" width="25" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_reapply_di" bpmnElement="Activity_reapply">
+        <dc:Bounds x="400" y="340" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="Flow_start_to_annotator1_di" bpmnElement="Flow_start_to_annotator1">
+        <di:waypoint x="188" y="220" />
+        <di:waypoint x="260" y="220" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_a1_to_gateway1_di" bpmnElement="Flow_a1_to_gateway1">
+        <di:waypoint x="360" y="220" />
+        <di:waypoint x="425" y="220" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_gw1_agree_to_annotator2_di" bpmnElement="Flow_gw1_agree_to_annotator2">
+        <di:waypoint x="475" y="220" />
+        <di:waypoint x="550" y="220" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="500" y="202" width="25" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_gw1_reject_to_reapply_di" bpmnElement="Flow_gw1_reject_to_reapply">
+        <di:waypoint x="450" y="245" />
+        <di:waypoint x="450" y="340" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="455" y="288" width="25" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_a2_to_gateway2_di" bpmnElement="Flow_a2_to_gateway2">
+        <di:waypoint x="650" y="220" />
+        <di:waypoint x="715" y="220" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_gw2_agree_to_end_di" bpmnElement="Flow_gw2_agree_to_end">
+        <di:waypoint x="765" y="220" />
+        <di:waypoint x="842" y="220" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="790" y="202" width="25" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_gw2_reject_to_reapply_di" bpmnElement="Flow_gw2_reject_to_reapply">
+        <di:waypoint x="740" y="245" />
+        <di:waypoint x="740" y="380" />
+        <di:waypoint x="500" y="380" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="745" y="300" width="25" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_reapply_back_to_annotator1_di" bpmnElement="Flow_reapply_back_to_annotator1">
+        <di:waypoint x="400" y="380" />
+        <di:waypoint x="310" y="380" />
+        <di:waypoint x="310" y="260" />
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</bpmn:definitions>

+ 1 - 1
docs/sql/addsql/20261119__menu_cw_practice_signature.sql

@@ -83,7 +83,7 @@ SELECT t.id, @menu_id, CONCAT(@parent_ids, @menu_id, ','), t.name, t.sort, NULL,
   FROM (
                       SELECT 'cwps0000000000000000000000000001' AS id, '新增'         AS name, 10 AS sort, 'cw:practiceSignature:add'     AS permission, '新建签章申请(阶段 D 已可用)' AS remarks
         UNION ALL SELECT 'cwps0000000000000000000000000002'      AS id, '修改'         AS name, 20 AS sort, 'cw:practiceSignature:edit'    AS permission, '编辑暂存/驳回/签章失败单据(阶段 D 已可用,仅发起人本人)'
-        UNION ALL SELECT 'cwps0000000000000000000000000003'      AS id, '删除'         AS name, 30 AS sort, 'cw:practiceSignature:delete'  AS permission, '逻辑删除(阶段 D 已可用,仅暂存态)'
+        UNION ALL SELECT 'cwps0000000000000000000000000003'      AS id, '删除'         AS name, 30 AS sort, 'cw:practiceSignature:delete'  AS permission, '逻辑删除(阶段 D 已可用,仅暂存/撤回态,且只有发起人本人)'
         UNION ALL SELECT 'cwps0000000000000000000000000004'      AS id, '送审'         AS name, 40 AS sort, 'cw:practiceSignature:submit'  AS permission, '起流程 + 契约锁建合同(阶段 E)'
         UNION ALL SELECT 'cwps0000000000000000000000000005'      AS id, '撤回'         AS name, 50 AS sort, 'cw:practiceSignature:withdraw' AS permission, '流程撤回 + 契约锁作废/召回(阶段 E)'
         UNION ALL SELECT 'cwps0000000000000000000000000006'      AS id, '查看已盖章文件' AS name, 60 AS sort, 'cw:practiceSignature:signed' AS permission, '已盖章件下载(阶段 G 回调落库后可用)'

+ 1 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/practiceSignature/controller/CwPracticeSignatureController.java

@@ -119,7 +119,7 @@ public class CwPracticeSignatureController {
     }
 
     /**
-     * 删除报告执业签章申请(仅暂存且从未发起过流程)
+     * 删除报告执业签章申请(仅暂存(1)与撤回(3)态,且只有发起人本人)
      * @param ids
      * @return
      */

+ 21 - 6
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/practiceSignature/service/CwPracticeSignatureService.java

@@ -121,6 +121,15 @@ public class CwPracticeSignatureService extends ServiceImpl<CwPracticeSignatureM
     private static final List<String> FORM_SUBMIT_STATUS = Arrays.asList("1", "2");
 
     /**
+     * 可删除的状态:1 暂存(含【流程终止】退回的)、3 撤回
+     *
+     * 2026-11-23 用户口径:这两类单据的流程实例都已结束(撤回走 revokeProcIns、终止走
+     * processService.stop),业务上等价于草稿,允许直接删除,不再要求"从未发起过流程"。
+     * 其余状态一律拒绝:2 在途、4 停在重新申请节点、5/6/7 已进或已过签章链路。
+     */
+    private static final List<String> DELETABLE_STATUS = Arrays.asList("1", "3");
+
+    /**
      * 外置表单节点回调(updateStatusById)允许的状态迁移:目标状态 -> 唯一合法的前置状态
      *
      * 3 撤回、4 驳回只能从 2 待审核过来;1 是【流程终止】把驳回单退回暂存(设计文档 5.2、6.1 按钮表)。
@@ -392,9 +401,17 @@ public class CwPracticeSignatureService extends ServiceImpl<CwPracticeSignatureM
             cwPracticeSignature.setCreateTime(old.getCreateTime());
         } else {
             // 新建:没带状态就是暂存;送审时通用页先落这条再起流程,所以这里也接受 2
-            // 发起时间/发起人由阶段 E 的 /submit 写入(设计文档 6.3 第 4 步)
             cwPracticeSignature.setStatus(StringUtils.defaultIfBlank(formStatus, "1"));
         }
+        // 送审这一步落发起人快照与发起时间(8.2 的 apply_user_id / apply_user_name / apply_time)。
+        // 原先注释说这三个字段由阶段 E 的 /submit 写,但 P9 改判 A2 后没有 /submit,于是谁都没写,
+        // 列表【发起时间】一直是 "-"、【发起人】靠 createByName 兜底才看着正常。
+        // 撤回(3)/签章失败(7) 重新送审算新一次发起,这里覆盖成本次的人与时间。
+        if ("2".equals(cwPracticeSignature.getStatus())) {
+            cwPracticeSignature.setApplyUserId(currentUser.getId());
+            cwPracticeSignature.setApplyUserName(currentUser.getName());
+            cwPracticeSignature.setApplyTime(new Date());
+        }
         this.saveOrUpdate(cwPracticeSignature);
         String signatureId = cwPracticeSignature.getId();
 
@@ -531,7 +548,7 @@ public class CwPracticeSignatureService extends ServiceImpl<CwPracticeSignatureM
     }
 
     /**
-     * 根据id删除签章申请(仅"暂存且从未发起过流程",逻辑删除)
+     * 根据id删除签章申请(仅暂存(1)与撤回(3),逻辑删除)
      *
      * @param ids
      * @return
@@ -550,10 +567,8 @@ public class CwPracticeSignatureService extends ServiceImpl<CwPracticeSignatureM
                 continue;
             }
             String reason = null;
-            if (!"1".equals(old.getStatus())) {
-                reason = "状态不是暂存";
-            } else if (StringUtils.isNotBlank(old.getProcInsId())) {
-                reason = "已发起过流程,只能撤回不能删除";
+            if (!DELETABLE_STATUS.contains(old.getStatus())) {
+                reason = "状态不是暂存或撤回";
             } else if (!StringUtils.equals(old.getCreateById(), currentUser.getId())) {
                 reason = "只有发起人本人可以删除";
             }

+ 13 - 0
jeeplus-modules/jeeplus-finance/src/main/resources/application-finance-production.yml

@@ -58,3 +58,16 @@ signature_daily_office_work: 3206161566436528851
 #会计-报告签章流程id
 signature_report_caregory_id: 3206161611193946856
 
+#报告执业签章-发起主体名(须与生产契约锁实例登记名逐字一致,从生产控制台复制)
+practice_signature_tenant_name: 江苏兴光会计师事务所有限责任公司
+#报告执业签章-业务分类id(生产实例"会计-报告个人执业章签署"用印流程,2026-11-23 在生产控制台创建,用户给定)
+practice_signature_category_id: 3562319209921131110
+#报告执业签章-事务所应用凭据(执业章建文档/建单/取签署URL 专用,与 signature_http_top 必须同一套实例)
+#必须用建在生产控制台的那套(AppToken 以 KtjC 开头);138 测试实例那套(nttiOI4oOb)填到这里会报 401,不可混填。
+#signature 口径与存量一致:md5(apptoken + appsecret + timestamp),本项目 timestamp 头固定 "0"
+#2026-11-23 三项已填齐(生产事务所那套,AppToken 以 KtjC 开头);signature 由上式算出,
+#口径先用 dev 三元组自校验(复现 f134d94b…)后再算生产值。
+practice_signature_apptoken: KtjC5uKnuC
+practice_signature_appsecret: C3S18vtTAiWHSuEbKHBvubbQIAOqGO
+practice_signature_signature: 1fcb11e02adb61bb615cc0eb0de1af25
+