Sfoglia il codice sorgente

学生退学规则引擎

dzx 1 anno fa
parent
commit
8d35af770d

+ 47 - 0
src/main/java/com/xjrsoft/module/liteflow/node/StudentDropOutNode.java

@@ -0,0 +1,47 @@
+package com.xjrsoft.module.liteflow.node;
+
+import cn.hutool.core.convert.Convert;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.xjrsoft.common.enums.ArchivesStatusEnum;
+import com.xjrsoft.common.enums.DeleteMark;
+import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
+import com.xjrsoft.module.student.entity.StudentDropOut;
+import com.xjrsoft.module.student.mapper.StudentDropOutMapper;
+import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * 学生退学
+ */
+@Component("student_drop_out_node")
+public class StudentDropOutNode extends NodeComponent {
+    @Autowired
+    private StudentDropOutMapper studentDropOutMapper;
+    @Autowired
+    private IBaseStudentSchoolRollService studentSchoolRollService;
+
+    @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) {
+            //查询出数据
+            StudentDropOut studentDropOut = studentDropOutMapper.selectById(formId);
+            //跟新学籍信息
+            BaseStudentSchoolRoll schoolRoll = studentSchoolRollService.getById(
+                new QueryWrapper<BaseStudentSchoolRoll>().lambda()
+                .eq(BaseStudentSchoolRoll::getClassId, studentDropOut.getClassId())
+                .eq(BaseStudentSchoolRoll::getUserId, studentDropOut.getStudentUserId())
+                .eq(BaseStudentSchoolRoll::getDeleteMark, DeleteMark.NODELETE.getCode())
+            );
+            schoolRoll.setArchivesStatus(ArchivesStatusEnum.FB2904.getCode());
+            studentSchoolRollService.updateById(schoolRoll);
+        }
+    }
+}

+ 109 - 0
src/main/java/com/xjrsoft/module/student/entity/StudentDropOut.java

@@ -0,0 +1,109 @@
+package com.xjrsoft.module.student.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+* @title: 退学申请
+* @Author dzx
+* @Date: 2024年4月17日
+* @Version 1.0
+*/
+@Data
+@TableName("student_drop_out")
+@ApiModel(value = "student_drop_out", description = "退学申请")
+public class StudentDropOut 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;
+
+    @ApiModelProperty("学生id")
+    private Long studentUserId;
+
+    @ApiModelProperty("年级id")
+    private Long gradeId;
+
+    @ApiModelProperty("班级id")
+    private Long classId;
+
+    @ApiModelProperty("身份证号")
+    private String IDNumber;
+
+    @ApiModelProperty("退学日期")
+    private Date dropDate;
+
+    @ApiModelProperty("请假原因")
+    private String reason;
+
+    @ApiModelProperty("班主任")
+    private Long teacherId;
+
+    @ApiModelProperty("附件id")
+    private Long folderId;
+
+    /**
+    * 状态(1:结束 0:未结束)
+    */
+    @ApiModelProperty("状态(1:结束 0:未结束)")
+    private Integer status;
+
+
+}

+ 15 - 0
src/main/java/com/xjrsoft/module/student/mapper/StudentDropOutMapper.java

@@ -0,0 +1,15 @@
+package com.xjrsoft.module.student.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.student.entity.StudentDropOut;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 退学申请
+* @Author dzx
+* @Date: 2024年4月17日
+* @Version 1.0
+*/
+@Mapper
+public interface StudentDropOutMapper extends MPJBaseMapper<StudentDropOut> {
+}