浏览代码

1、新生字段增加
2、调课顶课调整

dzx 9 月之前
父节点
当前提交
7ecc386c6f

+ 63 - 0
src/main/java/com/xjrsoft/module/job/WfCourseAdjustTask.java

@@ -0,0 +1,63 @@
+package com.xjrsoft.module.job;
+
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import com.xjrsoft.common.enums.DeleteMark;
+import com.xjrsoft.common.enums.EnabledMark;
+import com.xjrsoft.common.mybatis.SqlRunnerAdapter;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.courseTable.service.ICourseTableService;
+import com.xjrsoft.module.schedule.entity.WfCourseAdjust;
+import com.xjrsoft.module.schedule.service.IWfCourseAdjustService;
+import com.xjrsoft.module.workflow.entity.WorkflowFormRelation;
+import lombok.extern.slf4j.Slf4j;
+import org.camunda.bpm.engine.history.HistoricProcessInstance;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * 每过10分钟定时处理没有处理成功的调课或者顶课流程
+ * @author dzx
+ * @date 2025/3/3
+ */
+@Component
+@Slf4j
+public class WfCourseAdjustTask {
+
+    @Autowired
+    private IWfCourseAdjustService wfCourseAdjustService;
+
+    @Autowired
+    private ICourseTableService courseTableService;
+
+
+    @Scheduled(cron = "0 */10 * * * ?")
+    public void execute() {
+        List<WfCourseAdjust> list = wfCourseAdjustService.list(
+                new MPJLambdaWrapper<WfCourseAdjust>()
+                        .select(WfCourseAdjust::getId)
+                        .select(WfCourseAdjust.class, x -> VoToColumnUtil.fieldsToColumns(WfCourseAdjust.class).contains(x.getProperty()))
+                        .innerJoin(WorkflowFormRelation.class, WorkflowFormRelation::getFormKeyValue, WfCourseAdjust::getId)
+                        .eq(WorkflowFormRelation::getCurrentState, HistoricProcessInstance.STATE_COMPLETED)
+                        .eq(WfCourseAdjust::getDeleteMark, DeleteMark.NODELETE.getCode())
+                        .eq(WfCourseAdjust::getEnabledMark, EnabledMark.ENABLED.getCode())
+        );
+
+        for (WfCourseAdjust wfCourseAdjust : list) {
+            String sql = "SELECT * FROM course_table t1" +
+                    " INNER JOIN course_table_bak t2 ON t1.id = t2.id" +
+                    " WHERE t2.wf_course_adjust_id = " + wfCourseAdjust.getId() +
+                    " AND t1.course_id = t2.course_id" +
+                    " AND t1.course_name = t2.course_name" +
+                    " AND t1.site_id = t2.site_id" +
+                    " AND t1.teacher_name = t2.teacher_name";
+            long count = SqlRunnerAdapter.db().selectCount(sql);
+            if(count > 0){
+                continue;
+            }
+            courseTableService.adjustCourse(wfCourseAdjust);
+        }
+    }
+}

+ 32 - 8
src/main/java/com/xjrsoft/module/student/entity/BaseNewStudent.java

@@ -28,50 +28,50 @@ public class BaseNewStudent implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /**
-    * 
+    *
     */
     @ApiModelProperty("")
     @TableId
     private Long id;
     /**
-    * 
+    *
     */
     @ApiModelProperty("")
     @TableField(fill = FieldFill.INSERT)
     private Long createUserId;
     /**
-    * 
+    *
     */
     @ApiModelProperty("")
     @TableField(fill = FieldFill.INSERT)
     private Date createDate;
     /**
-    * 
+    *
     */
     @ApiModelProperty("")
     @TableField(fill = FieldFill.UPDATE)
     private Long modifyUserId;
     /**
-    * 
+    *
     */
     @ApiModelProperty("")
     @TableField(fill = FieldFill.UPDATE)
     private Date modifyDate;
     /**
-    * 
+    *
     */
     @ApiModelProperty("")
     @TableField(fill = FieldFill.INSERT)
     @TableLogic
     private Integer deleteMark;
     /**
-    * 
+    *
     */
     @ApiModelProperty("")
     @TableField(fill = FieldFill.INSERT)
     private Integer enabledMark;
     /**
-    * 
+    *
     */
     @ApiModelProperty("")
     private Integer sortCode;
@@ -169,4 +169,28 @@ public class BaseNewStudent implements Serializable {
 
     @ApiModelProperty("删除原因(用于新生删除功能)")
     private String deleteReason;
+
+    @ApiModelProperty("缴费状态(已缴费、未缴费)")
+    private String paymnystate;
+
+    @ApiModelProperty("招生季(1春招、2秋招)")
+    private Integer userdef6;
+
+    @ApiModelProperty("应届生、往届生")
+    private String previous;
+
+    @ApiModelProperty("户籍所属省")
+    private String province;
+
+    @ApiModelProperty("户籍所属市")
+    private String city;
+
+    @ApiModelProperty("户籍所属区")
+    private String myarea;
+
+    @ApiModelProperty("备注")
+    private String remarks;
+
+    @ApiModelProperty("是否可以分班(0:否,1:是)")
+    private Integer isCanBanding;
 }

+ 1 - 1
src/test/java/com/xjrsoft/module/liteflow/node/WfCourseAdjustNodeTest.java

@@ -24,7 +24,7 @@ class WfCourseAdjustNodeTest {
 
     @Test
     void test() throws Exception {
-        Long formId = 1847200925738921984L;
+        Long formId = 1896396299641098240L;
         if (formId != null) {
             // 数据处理
             WfCourseAdjust courseAdjust = wfCourseAdjustService.getById(formId);