Browse Source

学生转班规则引擎

dzx 11 months ago
parent
commit
5c0ffdea06

+ 36 - 0
src/main/java/com/xjrsoft/module/liteflow/node/StudentChangeClassNode.java

@@ -0,0 +1,36 @@
+package com.xjrsoft.module.liteflow.node;
+
+import cn.hutool.core.convert.Convert;
+import com.xjrsoft.module.oa.service.IFileReceiveService;
+import com.xjrsoft.module.student.entity.StudentChangeClass;
+import com.xjrsoft.module.student.mapper.StudentChangeClassMapper;
+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_change_class_node")
+public class StudentChangeClassNode extends NodeComponent {
+    @Autowired
+    private StudentChangeClassMapper studentChangeClassMapper;
+    @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) {
+            //查询出数据
+            StudentChangeClass changeClass = studentChangeClassMapper.selectById(formId);
+            //修改学生班级
+            studentSchoolRollService.updateStudentClass(changeClass.getAfterClassId(), changeClass.getStudentUserId());
+        }
+    }
+}

+ 124 - 0
src/main/java/com/xjrsoft/module/student/entity/StudentChangeClass.java

@@ -0,0 +1,124 @@
+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 szs
+* @Date: 2023-12-20
+* @Version 1.0
+*/
+@Data
+@TableName("student_change_class")
+@ApiModel(value = "student_change_class", description = "学生转班")
+public class StudentChangeClass 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;
+    /**
+    * 转出班级id
+    */
+    @ApiModelProperty("转出班级id")
+    private Long beforeClassId;
+    /**
+    * 学生用户id
+    */
+    @ApiModelProperty("学生用户id")
+    private Long studentUserId;
+    /**
+    * 性别
+    */
+    @ApiModelProperty("性别")
+    private String gender;
+    /**
+    * 身份证号
+    */
+    @ApiModelProperty("身份证号")
+    private String IDNumber;
+    /**
+    * 教材费缴费情况
+    */
+    @ApiModelProperty("教材费缴费情况")
+    private String textbookFees;
+    /**
+    * 住宿费缴费情况
+    */
+    @ApiModelProperty("住宿费缴费情况")
+    private String homestay;
+    /**
+    * 转入班级id
+    */
+    @ApiModelProperty("转入班级id")
+    private Long afterClassId;
+    /**
+     * 班主任id
+     */
+    @ApiModelProperty("班主任id")
+    private Long teacherId;
+    /**
+    * 状态(1:结束 0:未结束)
+    */
+    @ApiModelProperty("状态(1:结束 0:未结束)")
+    private Integer status;
+
+
+}

+ 5 - 0
src/main/java/com/xjrsoft/module/student/mapper/BaseStudentSchoolRollMapper.java

@@ -11,6 +11,7 @@ import com.xjrsoft.module.student.vo.BaseStudentInfoDetailVo;
 import com.xjrsoft.module.student.vo.BaseStudentInfoPageVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Update;
 
 import java.util.List;
 
@@ -43,5 +44,9 @@ public interface BaseStudentSchoolRollMapper extends MPJBaseMapper<BaseStudentSc
      */
     List<BaseStudentInfoCategoryVo> getStudyStatusCount(@Param("dto") BaseStudentInfoPageDto dto);
 
+
+    @Update("UPDATE base_student_school_roll SET class_id = #{classId} where user_id = #{userId}")
+    Boolean updateStudentClass(Long classId, Long userId);
+
 }
 

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

@@ -0,0 +1,15 @@
+package com.xjrsoft.module.student.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.student.entity.StudentChangeClass;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 干部候选人
+* @Author szs
+* @Date: 2023-12-20
+* @Version 1.0
+*/
+@Mapper
+public interface StudentChangeClassMapper extends MPJBaseMapper<StudentChangeClass> {
+}

+ 2 - 0
src/main/java/com/xjrsoft/module/student/service/IBaseStudentSchoolRollService.java

@@ -43,4 +43,6 @@ public interface IBaseStudentSchoolRollService extends MPJBaseService<BaseStuden
     BaseStudentInfoPageDataVo getMobilePageStatistics(BaseStudentInfoPageDto dto);
 
     MobileClassStatisticsVo getMobileClassStatistics(BaseStudentInfoPageDto dto);
+
+    Boolean updateStudentClass(Long classId, Long userId);
 }

+ 11 - 2
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentSchoolRollServiceImpl.java

@@ -16,12 +16,16 @@ import com.xjrsoft.module.student.dto.BaseStudentInfoPageDto;
 import com.xjrsoft.module.student.dto.PbVXsxxsfytbDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentInfoDto;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
-import com.xjrsoft.module.student.entity.PbVXsxxsfytb;
 import com.xjrsoft.module.student.mapper.BaseStudentSchoolRollMapper;
 import com.xjrsoft.module.student.mapper.PbSemesterConfigMapper;
 import com.xjrsoft.module.student.mapper.PbVXsxxsfytbMapper;
 import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
-import com.xjrsoft.module.student.vo.*;
+import com.xjrsoft.module.student.vo.BaseStudentInfoCategoryVo;
+import com.xjrsoft.module.student.vo.BaseStudentInfoDetailVo;
+import com.xjrsoft.module.student.vo.BaseStudentInfoPageDataVo;
+import com.xjrsoft.module.student.vo.BaseStudentInfoPageVo;
+import com.xjrsoft.module.student.vo.MobileClassStatisticsVo;
+import com.xjrsoft.module.student.vo.PbVXsxxsfytbVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 
@@ -186,4 +190,9 @@ public class BaseStudentSchoolRollServiceImpl extends MPJBaseServiceImpl<BaseStu
         }
         return null;
     }
+
+    @Override
+    public Boolean updateStudentClass(Long classId, Long userId) {
+        return null;
+    }
 }