应征入伍保留学籍申请表联表操作

This commit is contained in:
2025-11-14 16:48:37 +08:00
parent ce41e10c4a
commit 013eaa5d6d
11 changed files with 426 additions and 169 deletions

View File

@@ -1,6 +1,8 @@
package com.srs.routine.domain;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.srs.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;
@@ -197,4 +199,18 @@ private static final long serialVersionUID=1L;
@TableField("update_time")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date updateTime;
/**
* 入伍保留学籍申请表-审核记录
*/
@ApiModelProperty(value = "入伍保留学籍申请表-审核记录", hidden = true)
@Excel(name = "入伍保留学籍申请表-审核记录")
private List<RtEnlistmentReserveApproval> enlistmentReserveApprovalList;
/**
* 入伍保留学籍申请表-附件记录
*/
@ApiModelProperty(value = "入伍保留学籍申请表-附件记录", hidden = true)
@Excel(name = "入伍保留学籍申请表-附件记录")
private List<RtEnlistmentReserveAttach> enlistmentReserveAttachList;
}

View File

@@ -8,22 +8,21 @@ import lombok.*;
import com.srs.common.core.domain.BaseEntity;
/**
* 保留学籍申请附件(入伍通知书等)对象 rt_enlistment_reserve_attach
*
* @author srs
* @date 2025-10-31
* @date 2025-11-14
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(value = "RtEnlistmentReserveAttach对象" , description = "保留学籍申请附件(入伍通知书等)")
@ApiModel(value = "RtEnlistmentReserveAttach对象", description = "保留学籍申请附件(入伍通知书等)")
@TableName("rt_enlistment_reserve_attach")
public class RtEnlistmentReserveAttach extends BaseEntity{
private static final long serialVersionUID=1L;
public class RtEnlistmentReserveAttach extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
@@ -53,7 +52,7 @@ private static final long serialVersionUID=1L;
*/
@ApiModelProperty("文件路径关联sys_file表")
@TableField("file_path")
@Excel(name = "文件路径" , readConverterExp = "关=联sys_file表")
@Excel(name = "文件路径", readConverterExp = "关=联sys_file表")
private String filePath;
/**
@@ -61,7 +60,7 @@ private static final long serialVersionUID=1L;
*/
@ApiModelProperty("文件大小(字节)")
@TableField("file_size")
@Excel(name = "文件大小" , readConverterExp = "字=节")
@Excel(name = "文件大小", readConverterExp = "字=节")
private Long fileSize;
/**
@@ -69,8 +68,32 @@ private static final long serialVersionUID=1L;
*/
@ApiModelProperty("文件类型如pdf、jpg")
@TableField("file_type")
@Excel(name = "文件类型" , readConverterExp = "如=pdf、jpg")
@Excel(name = "文件类型", readConverterExp = "如=pdf、jpg")
private String fileType;
/**
* 申请编号规则RY+年份+6位序号如RY2024000001
*/
@ApiModelProperty("申请编号规则RY+年份+6位序号如RY2024000001")
@TableField("apply_no")
@Excel(name = "申请编号", readConverterExp = "规=则RY+年份+6位序号如RY2024000001")
private String applyNo;
/**
* 姓名
*/
@ApiModelProperty("姓名")
@TableField("student_name")
@Excel(name = "姓名")
private String studentName;
/**
* 学号
*/
@ApiModelProperty("学号")
@TableField("student_no")
@Excel(name = "学号")
private String studentNo;
}

View File

@@ -20,6 +20,14 @@ public interface IRtEnlistmentReserveService extends IService<RtEnlistmentReserv
*/
public RtEnlistmentReserve selectRtEnlistmentReserveById(Long id);
/**
* 查询应征入伍保留学籍申请
*
* @param processInstanceId Flowable流程实例ID
* @return 应征入伍保留学籍申请
*/
public RtEnlistmentReserve selectRtEnlistmentReserveByProcessInstanceId(String processInstanceId);
/**
* 查询应征入伍保留学籍申请列表
*

View File

@@ -58,6 +58,11 @@ public class RtEnlistmentReserveServiceImpl extends ServiceImpl<RtEnlistmentRese
return rtEnlistmentReserveMapper.selectRtEnlistmentReserveById(id);
}
@Override
public RtEnlistmentReserve selectRtEnlistmentReserveByProcessInstanceId(String processInstanceId) {
return rtEnlistmentReserveMapper.selectRtEnlistmentReserveByProcessInstanceId(processInstanceId);
}
/**
* 查询应征入伍保留学籍申请列表
*
@@ -196,7 +201,7 @@ public class RtEnlistmentReserveServiceImpl extends ServiceImpl<RtEnlistmentRese
variables.put("deptId", counselorInfo.getDeptId());
// 3. 启动流程
AjaxResult ajaxResult = flowDefinitionService.startProcessInstanceById("flow_r064jfpz:8:1080009", variables);
AjaxResult ajaxResult = flowDefinitionService.startProcessInstanceById("flow_r064jfpz:9:1090020", variables);
String code = ajaxResult.get("code").toString();
if (!"200".equals(code)) {
throw new ServiceException("流程启动失败,错误码:" + code, 500);

View File

@@ -44,7 +44,7 @@
<include refid="selectRtEnlistmentReserveApprovalVo"/>
where id = #{id}
</select>
<!-- 根据学生姓名、学号,申请编号查询-->
<select id="selectRtEnlistmentReserveApprovalByStuName" resultMap="RtEnlistmentReserveApprovalResult">
select *
from rt_enlistment_reserve_approval

View File

@@ -1,40 +1,60 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.routine.mapper.RtEnlistmentReserveAttachMapper">
<resultMap type="RtEnlistmentReserveAttach" id="RtEnlistmentReserveAttachResult">
<result property="id" column="id" />
<result property="applyId" column="apply_id" />
<result property="fileName" column="file_name" />
<result property="filePath" column="file_path" />
<result property="fileSize" column="file_size" />
<result property="fileType" column="file_type" />
<result property="createTime" column="create_time" />
<result property="id" column="id"/>
<result property="applyId" column="apply_id"/>
<result property="fileName" column="file_name"/>
<result property="filePath" column="file_path"/>
<result property="fileSize" column="file_size"/>
<result property="fileType" column="file_type"/>
<result property="createTime" column="create_time"/>
<result property="applyNo" column="apply_no"/>
<result property="studentName" column="student_name"/>
<result property="studentNo" column="student_no"/>
</resultMap>
<sql id="selectRtEnlistmentReserveAttachVo">
select id, apply_id, file_name, file_path, file_size, file_type, create_time from rt_enlistment_reserve_attach
select id,
apply_id,
file_name,
file_path,
file_size,
file_type,
create_time,
apply_no,
student_name,
student_no
from rt_enlistment_reserve_attach
</sql>
<select id="selectRtEnlistmentReserveAttachList" parameterType="RtEnlistmentReserveAttach" resultMap="RtEnlistmentReserveAttachResult">
<select id="selectRtEnlistmentReserveAttachList" parameterType="RtEnlistmentReserveAttach"
resultMap="RtEnlistmentReserveAttachResult">
<include refid="selectRtEnlistmentReserveAttachVo"/>
<where>
<if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
<if test="filePath != null and filePath != ''"> and file_path = #{filePath}</if>
<if test="fileSize != null "> and file_size = #{fileSize}</if>
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if>
<where>
<if test="applyId != null ">and apply_id = #{applyId}</if>
<if test="fileName != null and fileName != ''">and file_name like concat('%', #{fileName}, '%')</if>
<if test="filePath != null and filePath != ''">and file_path = #{filePath}</if>
<if test="fileSize != null ">and file_size = #{fileSize}</if>
<if test="fileType != null and fileType != ''">and file_type = #{fileType}</if>
<if test="applyNo != null and applyNo != ''">and apply_no = #{applyNo}</if>
<if test="studentName != null and studentName != ''">and student_name like concat('%', #{studentName},
'%')
</if>
<if test="studentNo != null and studentNo != ''">and student_no = #{studentNo}</if>
</where>
</select>
<select id="selectRtEnlistmentReserveAttachById" parameterType="Long" resultMap="RtEnlistmentReserveAttachResult">
<include refid="selectRtEnlistmentReserveAttachVo"/>
where id = #{id}
</select>
<insert id="insertRtEnlistmentReserveAttach" parameterType="RtEnlistmentReserveAttach" useGeneratedKeys="true" keyProperty="id">
<insert id="insertRtEnlistmentReserveAttach" parameterType="RtEnlistmentReserveAttach" useGeneratedKeys="true"
keyProperty="id">
insert into rt_enlistment_reserve_attach
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="applyId != null">apply_id,</if>
@@ -43,7 +63,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fileSize != null">file_size,</if>
<if test="fileType != null and fileType != ''">file_type,</if>
<if test="createTime != null">create_time,</if>
</trim>
<if test="applyNo != null and applyNo != ''">apply_no,</if>
<if test="studentName != null and studentName != ''">student_name,</if>
<if test="studentNo != null and studentNo != ''">student_no,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="applyId != null">#{applyId},</if>
<if test="fileName != null and fileName != ''">#{fileName},</if>
@@ -51,7 +74,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fileSize != null">#{fileSize},</if>
<if test="fileType != null and fileType != ''">#{fileType},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
<if test="applyNo != null and applyNo != ''">#{applyNo},</if>
<if test="studentName != null and studentName != ''">#{studentName},</if>
<if test="studentNo != null and studentNo != ''">#{studentNo},</if>
</trim>
</insert>
<update id="updateRtEnlistmentReserveAttach" parameterType="RtEnlistmentReserveAttach">
@@ -63,16 +89,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fileSize != null">file_size = #{fileSize},</if>
<if test="fileType != null and fileType != ''">file_type = #{fileType},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="applyNo != null and applyNo != ''">apply_no = #{applyNo},</if>
<if test="studentName != null and studentName != ''">student_name = #{studentName},</if>
<if test="studentNo != null and studentNo != ''">student_no = #{studentNo},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteRtEnlistmentReserveAttachById" parameterType="Long">
delete from rt_enlistment_reserve_attach where id = #{id}
delete
from rt_enlistment_reserve_attach
where id = #{id}
</delete>
<delete id="deleteRtEnlistmentReserveAttachByIds" parameterType="String">
delete from rt_enlistment_reserve_attach where id in
delete from rt_enlistment_reserve_attach where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

View File

@@ -1,69 +1,169 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
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" />
<result property="grade" column="grade" />
<result property="studentNo" column="student_no" />
<result property="className" column="class_name" />
<result property="major" column="major" />
<result property="familyAddress" column="family_address" />
<result property="parentPhone" column="parent_phone" />
<result property="applyReason" column="apply_reason" />
<result property="applyStatus" column="apply_status" />
<result property="processInstanceId" column="process_instance_id" />
<result property="reserveNo" column="reserve_no" />
<result property="reserveStartDate" column="reserve_start_date" />
<result property="reserveEndDate" column="reserve_end_date" />
<result property="approvalNo" column="approval_no" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<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"/>
<result property="grade" column="grade"/>
<result property="studentNo" column="student_no"/>
<result property="className" column="class_name"/>
<result property="major" column="major"/>
<result property="familyAddress" column="family_address"/>
<result property="parentPhone" column="parent_phone"/>
<result property="applyReason" column="apply_reason"/>
<result property="applyStatus" column="apply_status"/>
<result property="processInstanceId" column="process_instance_id"/>
<result property="reserveNo" column="reserve_no"/>
<result property="reserveStartDate" column="reserve_start_date"/>
<result property="reserveEndDate" column="reserve_end_date"/>
<result property="approvalNo" column="approval_no"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<!--入伍保留学籍申请表-审核记录 多条件查询column里传入了多条件【{studentName = student_name, studentNo = student_no}】javaType里面写了list表明你有多条件 studentName student_name字段-->
<collection property="enlistmentReserveApprovalList"
column="{studentName = student_name, studentNo = student_no}"
javaType="java.util.ArrayList" select="selectRtEnlistmentReserveApprovalByStuName"/>
<!--入伍保留学籍申请表-附件记录 多条件查询column里传入了多条件【{studentName = student_name, studentNo = student_no}】javaType里面写了list表明你有多条件 studentName student_name字段-->
<collection property="enlistmentReserveAttachList"
column="{studentName = student_name, studentNo = student_no, applyNo = apply_no}"
javaType="java.util.ArrayList" select="selectRtEnlistmentReserveAttachByStuName"/>
</resultMap>
<!--入伍保留学籍申请表-审核记录子表的映射 -->
<resultMap type="EnlistmentReserveApproval" id="RtEnlistmentReserveApprovalResult">
<result property="id" column="id"/>
<result property="applyId" column="apply_id"/>
<result property="processInstanceId" column="process_instance_id"/>
<result property="taskId" column="task_id"/>
<result property="nodeName" column="node_name"/>
<result property="approverId" column="approver_id"/>
<result property="approverName" column="approver_name"/>
<result property="approvalOpinion" column="approval_opinion"/>
<result property="approvalResult" column="approval_result"/>
<result property="approvalTime" column="approval_time"/>
<result property="studentName" column="student_name"/>
<result property="studentNo" column="student_no"/>
</resultMap>
<sql id="selectRtEnlistmentReserveVo">
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"/>
<!-- 入伍保留申请表-审核记录子表,根据学生姓名、学号查询 -->
<select id="selectRtEnlistmentReserveApprovalByStuName" resultMap="RtEnlistmentReserveApprovalResult">
select *
from rt_enlistment_reserve_approval
<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>
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
<if test="studentNo != null and studentNo != ''"> and student_no = #{studentNo}</if>
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
<if test="major != null and major != ''"> and major = #{major}</if>
<if test="familyAddress != null and familyAddress != ''"> and family_address = #{familyAddress}</if>
<if test="parentPhone != null and parentPhone != ''"> and parent_phone = #{parentPhone}</if>
<if test="applyReason != null and applyReason != ''"> and apply_reason = #{applyReason}</if>
<if test="applyStatus != null "> and apply_status = #{applyStatus}</if>
<if test="processInstanceId != null and processInstanceId != ''"> and process_instance_id = #{processInstanceId}</if>
<if test="reserveNo != null and reserveNo != ''"> and reserve_no = #{reserveNo}</if>
<if test="reserveStartDate != null "> and reserve_start_date = #{reserveStartDate}</if>
<if test="reserveEndDate != null "> and reserve_end_date = #{reserveEndDate}</if>
<if test="approvalNo != null and approvalNo != ''"> and approval_no = #{approvalNo}</if>
<if test="studentName != null and studentName != ''">
and student_name = #{studentName}
</if>
<if test="studentNo != null and studentNo != ''">
and student_no = #{studentNo}
</if>
</where>
</select>
<!--入伍保留学籍申请表-申请附件子表的映射 -->
<resultMap type="RtEnlistmentReserveAttach" id="RtEnlistmentReserveAttachResult">
<result property="id" column="id"/>
<result property="applyId" column="apply_id"/>
<result property="fileName" column="file_name"/>
<result property="filePath" column="file_path"/>
<result property="fileSize" column="file_size"/>
<result property="fileType" column="file_type"/>
<result property="createTime" column="create_time"/>
<result property="applyNo" column="apply_no"/>
<result property="studentName" column="student_name"/>
<result property="studentNo" column="student_no"/>
</resultMap>
<!-- 入伍保留申请表-申请附件记录子表,根据学生姓名、学号,申请编号查询 -->
<select id="selectRtEnlistmentReserveAttachByStuName" resultMap="RtEnlistmentReserveAttachResult">
select *
from rt_enlistment_reserve_attach
<where>
<if test="studentName != null and studentName != ''">
and student_name = #{studentName}
</if>
<if test="studentNo != null and studentNo != ''">
and student_no = #{studentNo}
</if>
<if test="applyNo != null and applyNo != ''">
and apply_no = #{applyNo}
</if>
</where>
</select>
<sql id="selectRtEnlistmentReserveVo">
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>
<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>
<if test="grade != null and grade != ''">and grade = #{grade}</if>
<if test="studentNo != null and studentNo != ''">and student_no = #{studentNo}</if>
<if test="className != null and className != ''">and class_name like concat('%', #{className}, '%')</if>
<if test="major != null and major != ''">and major = #{major}</if>
<if test="familyAddress != null and familyAddress != ''">and family_address = #{familyAddress}</if>
<if test="parentPhone != null and parentPhone != ''">and parent_phone = #{parentPhone}</if>
<if test="applyReason != null and applyReason != ''">and apply_reason = #{applyReason}</if>
<if test="applyStatus != null ">and apply_status = #{applyStatus}</if>
<if test="processInstanceId != null and processInstanceId != ''">and process_instance_id =
#{processInstanceId}
</if>
<if test="reserveNo != null and reserveNo != ''">and reserve_no = #{reserveNo}</if>
<if test="reserveStartDate != null ">and reserve_start_date = #{reserveStartDate}</if>
<if test="reserveEndDate != null ">and reserve_end_date = #{reserveEndDate}</if>
<if test="approvalNo != null and approvalNo != ''">and approval_no = #{approvalNo}</if>
</where>
</select>
<select id="selectRtEnlistmentReserveById" parameterType="Long" resultMap="RtEnlistmentReserveResult">
<include refid="selectRtEnlistmentReserveVo"/>
where id = #{id}
</select>
<select id="selectRtEnlistmentReserveByProcessInstanceId" parameterType="String" resultMap="RtEnlistmentReserveResult">
<!-- 根据流程编号查询申请记录 -->
<select id="selectRtEnlistmentReserveByProcessInstanceId" parameterType="String"
resultMap="RtEnlistmentReserveResult">
<include refid="selectRtEnlistmentReserveVo"/>
where process_instance_id = #{processInstanceId}
</select>
@@ -157,7 +257,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteRtEnlistmentReserveById" parameterType="Long">
delete from rt_enlistment_reserve where id = #{id}
delete
from rt_enlistment_reserve
where id = #{id}
</delete>
<delete id="deleteRtEnlistmentReserveByIds" parameterType="String">