应征入伍保留学籍工作流

This commit is contained in:
2025-11-11 11:50:07 +08:00
parent 434cbc0c0e
commit 52de1dda74
5 changed files with 186 additions and 9 deletions

View File

@@ -50,6 +50,15 @@ private static final long serialVersionUID=1L;
@Excel(name = "学生ID" , readConverterExp = "关=联sys_user")
private Long studentId;
/**
* 辅导员姓名
*/
@ApiModelProperty("辅导员姓名")
@TableField("teacher_name")
@Excel(name = "辅导员姓名")
private String teacherName;
/**
* 姓名
*/

View File

@@ -22,6 +22,14 @@ public interface RtEnlistmentReserveMapper extends BaseMapper<RtEnlistmentReserv
*/
public RtEnlistmentReserve selectRtEnlistmentReserveById(Long id);
/**
* 查询应征入伍保留学籍申请
*
* @param processInstanceId Flowable流程实例ID
* @return 应征入伍保留学籍申请
*/
public RtEnlistmentReserve selectRtEnlistmentReserveByProcessInstanceId(String processInstanceId);
// <!-- 根据学号查询辅导员信息 -->
public TeacherVo getCounselorInfo(String stuNo);

View File

@@ -99,7 +99,7 @@ public class RtEnlistmentReserveServiceImpl extends ServiceImpl<RtEnlistmentRese
// 启动流程(此时 applyId 已存在,可正常传递)
ProcessResultDto processResultDto = startEnlistmentReserveProcess(rtEnlistmentReserve);
// 3.3 同步更新流程实例 ID + 申请状态为“审批中”2形成业务闭环
// 同步更新流程实例 ID + 申请状态为“审批中”2形成业务闭环
if (processResultDto != null && StringUtils.isNotBlank(processResultDto.getProcessInstanceId())) {
RtEnlistmentReserve updateEntity = new RtEnlistmentReserve();
updateEntity.setId(applyId);
@@ -196,7 +196,7 @@ public class RtEnlistmentReserveServiceImpl extends ServiceImpl<RtEnlistmentRese
variables.put("deptId", counselorInfo.getDeptId());
// 3. 启动流程
AjaxResult ajaxResult = flowDefinitionService.startProcessInstanceById("flow_r064jfpz:4:1032511", variables);
AjaxResult ajaxResult = flowDefinitionService.startProcessInstanceById("flow_r064jfpz:7:1055004", variables);
String code = ajaxResult.get("code").toString();
if (!"200".equals(code)) {
throw new ServiceException("流程启动失败,错误码:" + code, 500);

View File

@@ -3,11 +3,12 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.routine.mapper.RtEnlistmentReserveMapper">
<resultMap type="RtEnlistmentReserve" id="RtEnlistmentReserveResult">
<result property="id" column="id" />
<result property="applyNo" column="apply_no" />
<result property="studentId" column="student_id" />
<result property="teacherName" column="teacher_name" />
<result property="studentName" column="student_name" />
<result property="gender" column="gender" />
<result property="nation" column="nation" />
@@ -29,14 +30,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectRtEnlistmentReserveVo">
select id, apply_no, student_id, student_name, gender, nation, grade, student_no, class_name, major, family_address, parent_phone, apply_reason, apply_status, process_instance_id, reserve_no, reserve_start_date, reserve_end_date, approval_no, create_time, update_time from rt_enlistment_reserve
select id, apply_no, student_id, teacher_name, student_name, gender, nation, grade, student_no, class_name, major, family_address, parent_phone, apply_reason, apply_status, process_instance_id, reserve_no, reserve_start_date, reserve_end_date, approval_no, create_time, update_time from rt_enlistment_reserve
</sql>
<select id="selectRtEnlistmentReserveList" parameterType="RtEnlistmentReserve" resultMap="RtEnlistmentReserveResult">
<include refid="selectRtEnlistmentReserveVo"/>
<where>
<where>
<if test="applyNo != null and applyNo != ''"> and apply_no = #{applyNo}</if>
<if test="studentId != null "> and student_id = #{studentId}</if>
<if test="teacherName != null and teacherName != ''"> and teacher_name like concat('%', #{teacherName}, '%')</if>
<if test="studentName != null and studentName != ''"> and student_name like concat('%', #{studentName}, '%')</if>
<if test="gender != null and gender != ''"> and gender = #{gender}</if>
<if test="nation != null and nation != ''"> and nation = #{nation}</if>
@@ -61,6 +63,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<select id="selectRtEnlistmentReserveByProcessInstanceId" parameterType="String" resultMap="RtEnlistmentReserveResult">
<include refid="selectRtEnlistmentReserveVo"/>
where process_instance_id = #{processInstanceId}
</select>
<!-- 根据学号查询辅导员信息 -->
<select id="getCounselorInfo" resultType="com.srs.common.doman.vo.TeacherVo">
SELECT d.user_id userId, d.dept_id deptId, d.user_name userName, d.nick_name nickName
@@ -70,12 +77,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN sys_user d ON c.employee_id = d.user_name
WHERE a.stu_no = #{stuNo}
</select>
<insert id="insertRtEnlistmentReserve" parameterType="RtEnlistmentReserve" useGeneratedKeys="true" keyProperty="id">
insert into rt_enlistment_reserve
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="applyNo != null and applyNo != ''">apply_no,</if>
<if test="studentId != null">student_id,</if>
<if test="teacherName != null and teacherName != ''">teacher_name,</if>
<if test="studentName != null and studentName != ''">student_name,</if>
<if test="gender != null and gender != ''">gender,</if>
<if test="nation != null and nation != ''">nation,</if>
@@ -94,10 +102,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="approvalNo != null">approval_no,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="applyNo != null and applyNo != ''">#{applyNo},</if>
<if test="studentId != null">#{studentId},</if>
<if test="teacherName != null and teacherName != ''">#{teacherName},</if>
<if test="studentName != null and studentName != ''">#{studentName},</if>
<if test="gender != null and gender != ''">#{gender},</if>
<if test="nation != null and nation != ''">#{nation},</if>
@@ -116,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="approvalNo != null">#{approvalNo},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</trim>
</insert>
<update id="updateRtEnlistmentReserve" parameterType="RtEnlistmentReserve">
@@ -124,6 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="applyNo != null and applyNo != ''">apply_no = #{applyNo},</if>
<if test="studentId != null">student_id = #{studentId},</if>
<if test="teacherName != null and teacherName != ''">teacher_name = #{teacherName},</if>
<if test="studentName != null and studentName != ''">student_name = #{studentName},</if>
<if test="gender != null and gender != ''">gender = #{gender},</if>
<if test="nation != null and nation != ''">nation = #{nation},</if>
@@ -151,7 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteRtEnlistmentReserveByIds" parameterType="String">
delete from rt_enlistment_reserve where id in
delete from rt_enlistment_reserve where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>