Ver código fonte

操行流程结束后的数据处理规则

dzx 1 ano atrás
pai
commit
8618ec97fc

+ 32 - 0
src/main/java/com/xjrsoft/module/liteflow/node/WfBehaviorNode.java

@@ -0,0 +1,32 @@
+package com.xjrsoft.module.liteflow.node;
+
+import cn.hutool.core.convert.Convert;
+import com.xjrsoft.module.student.service.IBaseStudentAssessmentClassRelationService;
+import com.xjrsoft.module.student.service.IBaseStudentBehaviorClassRelationService;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * 学生操行考核流程结束处理
+ */
+@Component("wf_behavior_node")
+public class WfBehaviorNode extends NodeComponent {
+
+    @Autowired
+    private IBaseStudentBehaviorClassRelationService behaviorClassRelationService;
+
+    @Override
+    public void process() throws Exception {
+        // 获取表单中数据编号
+        Map<String, Object> params = this.getFirstContextBean();
+        Object value = util.getFormDatKey(params,"id");
+        Long formId = Convert.toLong(value);
+        if (formId != null) {
+            // 数据处理
+            behaviorClassRelationService.dataCache(formId);
+        }
+    }
+}

+ 1 - 1
src/main/java/com/xjrsoft/module/student/service/IBaseStudentBehaviorClassRelationService.java

@@ -5,7 +5,7 @@ import com.xjrsoft.module.student.entity.BaseStudentAssessmentClassRelation;
 import com.xjrsoft.module.student.entity.BaseStudentBehaviorClassRelation;
 
 /**
-* @title: 学生班级巡查考核-关联班级
+* @title: 学生操行-关联班级
 * @Author fanxp
 * @Date: 2023-11-16
 * @Version 1.0