应征入伍保留学籍申请表联表操作
This commit is contained in:
@@ -2,6 +2,7 @@ package com.srs.web.controller.routine;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -40,8 +41,7 @@ public class RtEnlistmentReserveController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('routine:enlistmentReserve:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询应征入伍保留学籍申请列表")
|
||||
public TableDataInfo list(RtEnlistmentReserve rtEnlistmentReserve)
|
||||
{
|
||||
public TableDataInfo list(RtEnlistmentReserve rtEnlistmentReserve) {
|
||||
startPage();
|
||||
List<RtEnlistmentReserve> list = rtEnlistmentReserveService.selectRtEnlistmentReserveList(rtEnlistmentReserve);
|
||||
return getDataTable(list);
|
||||
@@ -54,8 +54,7 @@ public class RtEnlistmentReserveController extends BaseController {
|
||||
@Log(title = "应征入伍保留学籍申请", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ApiOperation("导出应征入伍保留学籍申请列表")
|
||||
public void export(HttpServletResponse response, RtEnlistmentReserve rtEnlistmentReserve)
|
||||
{
|
||||
public void export(HttpServletResponse response, RtEnlistmentReserve rtEnlistmentReserve) {
|
||||
List<RtEnlistmentReserve> list = rtEnlistmentReserveService.selectRtEnlistmentReserveList(rtEnlistmentReserve);
|
||||
ExcelUtil<RtEnlistmentReserve> util = new ExcelUtil<RtEnlistmentReserve>(RtEnlistmentReserve.class);
|
||||
util.exportExcel(response, list, "应征入伍保留学籍申请数据");
|
||||
@@ -67,11 +66,20 @@ public class RtEnlistmentReserveController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('routine:enlistmentReserve:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取应征入伍保留学籍申请详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(rtEnlistmentReserveService.selectRtEnlistmentReserveById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取应征入伍保留学籍申请详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('routine:enlistmentReserve:query')")
|
||||
@GetMapping(value = "/process/{processInstanceId}")
|
||||
@ApiOperation("获取应征入伍保留学籍申请详细信息")
|
||||
public AjaxResult getInfoByProcessInstanceId(@PathVariable("processInstanceId") String processInstanceId) {
|
||||
return success(rtEnlistmentReserveService.selectRtEnlistmentReserveByProcessInstanceId(processInstanceId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增应征入伍保留学籍申请
|
||||
*/
|
||||
@@ -79,8 +87,7 @@ public class RtEnlistmentReserveController extends BaseController {
|
||||
@Log(title = "应征入伍保留学籍申请", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增应征入伍保留学籍申请")
|
||||
public AjaxResult add(@RequestBody RtEnlistmentReserve rtEnlistmentReserve)
|
||||
{
|
||||
public AjaxResult add(@RequestBody RtEnlistmentReserve rtEnlistmentReserve) {
|
||||
return toAjax(rtEnlistmentReserveService.insertRtEnlistmentReserve(rtEnlistmentReserve));
|
||||
}
|
||||
|
||||
@@ -91,8 +98,7 @@ public class RtEnlistmentReserveController extends BaseController {
|
||||
@Log(title = "应征入伍保留学籍申请", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("修改应征入伍保留学籍申请")
|
||||
public AjaxResult edit(@RequestBody RtEnlistmentReserve rtEnlistmentReserve)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody RtEnlistmentReserve rtEnlistmentReserve) {
|
||||
return toAjax(rtEnlistmentReserveService.updateRtEnlistmentReserve(rtEnlistmentReserve));
|
||||
}
|
||||
|
||||
@@ -103,8 +109,7 @@ public class RtEnlistmentReserveController extends BaseController {
|
||||
@Log(title = "应征入伍保留学籍申请", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/{ids}")
|
||||
@ApiOperation("删除应征入伍保留学籍申请")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(rtEnlistmentReserveService.deleteRtEnlistmentReserveByIds(ids));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,10 +64,13 @@ public class ApprovalAssigneeListener implements ExecutionListener {
|
||||
Long enlistmentId = Long.valueOf(execution.getVariable("enlistmentId").toString());
|
||||
|
||||
// 获取审核意见
|
||||
String approvalOpinion = (String) execution.getVariable("comment");
|
||||
String approvalOpinion = (String) execution.getVariable("approvalOpinion");
|
||||
|
||||
// 获取审核状态
|
||||
Long approvalResult = (Long) execution.getVariable("approvalResult");
|
||||
|
||||
// 4. 后续逻辑不变:查询下一个节点负责人并更新变量
|
||||
Long nextAssigneeId = getNextAssignee(currentNodeName, processInstanceId, enlistmentId, currentActivityId, approvalOpinion);
|
||||
Long nextAssigneeId = getNextAssignee(currentNodeName, processInstanceId, enlistmentId, currentActivityId, approvalOpinion, approvalResult);
|
||||
if (nextAssigneeId != null) {
|
||||
execution.setVariable("approval", nextAssigneeId);
|
||||
execution.setVariable("currentNode", currentNodeName);
|
||||
@@ -92,7 +95,7 @@ public class ApprovalAssigneeListener implements ExecutionListener {
|
||||
/**
|
||||
* 根据当前节点查询下一个节点的负责人
|
||||
*/
|
||||
private Long getNextAssignee(String currentNodeName, String processInstanceId, Long enlistmentId, String currentActivityId, String approvalOpinion) {
|
||||
private Long getNextAssignee(String currentNodeName, String processInstanceId, Long enlistmentId, String currentActivityId, String approvalOpinion, Long approvalResult) {
|
||||
EnlistmentReserveMapper rtEnlistmentReserveMapper = (EnlistmentReserveMapper) SpringUtils.getBean(EnlistmentReserveMapper.class);
|
||||
// 根据Id查询入伍申请记录
|
||||
EnlistmentReserve enlistmentReserve = rtEnlistmentReserveMapper.selectRtEnlistmentReserveById(enlistmentId);
|
||||
@@ -112,7 +115,7 @@ public class ApprovalAssigneeListener implements ExecutionListener {
|
||||
queryUser.setRoleId(105L); // 学务角色固定ID
|
||||
List<SysUser> academicAffairsUsers = sysUserService.selectAllocatedList(queryUser);
|
||||
if (academicAffairsUsers.isEmpty()) {
|
||||
throw new RuntimeException("未查询到角色ID=105(学务)的用户");
|
||||
throw new RuntimeException("未查询到角色(学务)的用户");
|
||||
}
|
||||
|
||||
// 从学务用户中筛选出部门ID与当前辅导员部门一致的用户
|
||||
@@ -122,7 +125,7 @@ public class ApprovalAssigneeListener implements ExecutionListener {
|
||||
.orElseThrow(() -> new RuntimeException("未找到部门ID=" + currentDeptId + "的学务负责人"));
|
||||
|
||||
// 添加审批记录
|
||||
saveApprovalRecord(enlistmentReserve.getId(), enlistmentReserve.getProcessInstanceId(),currentActivityId,currentNodeName, enlistmentReserve.getStudentName(), enlistmentReserve.getStudentNo(), approvalOpinion);
|
||||
saveApprovalRecord(enlistmentReserve.getId(), enlistmentReserve.getProcessInstanceId(),currentActivityId,currentNodeName, enlistmentReserve.getStudentName(), enlistmentReserve.getStudentNo(), approvalOpinion, approvalResult);
|
||||
|
||||
// 返回匹配的学务用户ID(作为下一个节点负责人)
|
||||
return targetAcademic.getUserId();
|
||||
@@ -140,7 +143,7 @@ public class ApprovalAssigneeListener implements ExecutionListener {
|
||||
qUser.setRoleId(106L); // 二级学院角色固定ID=106
|
||||
List<SysUser> collegeUsers = sysUserService.selectAllocatedList(qUser);
|
||||
if (collegeUsers.isEmpty()) {
|
||||
throw new RuntimeException("未查询到角色ID=106(二级学院)的用户");
|
||||
throw new RuntimeException("未查询到角色(二级学院)的用户");
|
||||
}
|
||||
|
||||
// 筛选出部门ID(学院ID)与登录用户所属学院一致的二级学院负责人
|
||||
@@ -151,32 +154,48 @@ public class ApprovalAssigneeListener implements ExecutionListener {
|
||||
|
||||
|
||||
// 添加审批记录
|
||||
saveApprovalRecord(enlistmentReserve.getId(), enlistmentReserve.getProcessInstanceId(),currentActivityId,currentNodeName, enlistmentReserve.getStudentName(), enlistmentReserve.getStudentNo(), approvalOpinion);
|
||||
saveApprovalRecord(enlistmentReserve.getId(), enlistmentReserve.getProcessInstanceId(),currentActivityId,currentNodeName, enlistmentReserve.getStudentName(), enlistmentReserve.getStudentNo(), approvalOpinion, approvalResult);
|
||||
|
||||
// 4. 返回匹配的二级学院负责人ID
|
||||
// 返回匹配的二级学院负责人ID
|
||||
return targetCollegeLeader.getUserId();
|
||||
|
||||
case "二级学院审批":
|
||||
// 二级学院通过后 → 下一个节点:学籍管理科(假设部门ID=30)
|
||||
// 二级学院通过后 → 下一个节点:学籍管理科
|
||||
|
||||
// 获取学籍管理科审核人
|
||||
List<TeacherVo> shenDataInfo = rtEnlistmentReserveMapper.getShenDataInfo("学籍管理科");
|
||||
|
||||
if (shenDataInfo.isEmpty()) {
|
||||
throw new RuntimeException("未查询到对应的用户");
|
||||
}
|
||||
|
||||
// 添加审批记录
|
||||
saveApprovalRecord(enlistmentReserve.getId(), enlistmentReserve.getProcessInstanceId(),currentActivityId,currentNodeName, enlistmentReserve.getStudentName(), enlistmentReserve.getStudentNo(), approvalOpinion);
|
||||
return 30L;
|
||||
saveApprovalRecord(enlistmentReserve.getId(), enlistmentReserve.getProcessInstanceId(),currentActivityId,currentNodeName, enlistmentReserve.getStudentName(), enlistmentReserve.getStudentNo(), approvalOpinion, approvalResult);
|
||||
|
||||
// 暂时选择学籍管理科第一个人作为审核人
|
||||
return shenDataInfo.get(0).getUserId();
|
||||
|
||||
case "学籍管理科审批":
|
||||
// 学籍管理科通过后 → 下一个节点:教务处(假设部门ID=40)
|
||||
// 学籍管理科通过后 → 下一个节点:教务处主管领导(假设部门ID=40)
|
||||
|
||||
// 获取学教务处主管领导审核人
|
||||
List<TeacherVo> teacherVos = rtEnlistmentReserveMapper.getShenDataInfo("教务处主管领导");
|
||||
|
||||
if (teacherVos.isEmpty()) {
|
||||
throw new RuntimeException("未查询到对应的用户");
|
||||
}
|
||||
|
||||
// 添加审批记录
|
||||
saveApprovalRecord(enlistmentReserve.getId(), enlistmentReserve.getProcessInstanceId(),currentActivityId,currentNodeName, enlistmentReserve.getStudentName(), enlistmentReserve.getStudentNo(), approvalOpinion);
|
||||
return 40L;
|
||||
saveApprovalRecord(enlistmentReserve.getId(), enlistmentReserve.getProcessInstanceId(),currentActivityId,currentNodeName, enlistmentReserve.getStudentName(), enlistmentReserve.getStudentNo(), approvalOpinion, approvalResult);
|
||||
// 暂时选择教务处主管领导第一个人作为审核人
|
||||
return teacherVos.get(0).getUserId();
|
||||
|
||||
case "教务处主管领导审批":
|
||||
// 最后一个节点通过后 → 流程结束(无需设置负责人)
|
||||
|
||||
|
||||
// 添加审批记录
|
||||
saveApprovalRecord(enlistmentReserve.getId(), enlistmentReserve.getProcessInstanceId(),currentActivityId,currentNodeName, enlistmentReserve.getStudentName(), enlistmentReserve.getStudentNo(), approvalOpinion);
|
||||
saveApprovalRecord(enlistmentReserve.getId(), enlistmentReserve.getProcessInstanceId(),currentActivityId,currentNodeName, enlistmentReserve.getStudentName(), enlistmentReserve.getStudentNo(), approvalOpinion, approvalResult);
|
||||
|
||||
// 改变申请表中的审核状态(审核通过)
|
||||
enlistmentReserve.setApplyStatus(2L);
|
||||
@@ -192,7 +211,7 @@ public class ApprovalAssigneeListener implements ExecutionListener {
|
||||
/**
|
||||
* 通用审批记录保存方法
|
||||
*/
|
||||
private void saveApprovalRecord(Long ApplyId,String processInstanceId, String taskId, String nodeName, String studentName, String studentNo, String approvalOpinion) {
|
||||
private void saveApprovalRecord(Long ApplyId,String processInstanceId, String taskId, String nodeName, String studentName, String studentNo, String approvalOpinion, Long approvalResult) {
|
||||
EnlistmentReserveApproval enlistmentReserveApproval = new EnlistmentReserveApproval();
|
||||
// 赋值
|
||||
enlistmentReserveApproval.setApplyId(ApplyId);
|
||||
@@ -204,10 +223,10 @@ public class ApprovalAssigneeListener implements ExecutionListener {
|
||||
enlistmentReserveApproval.setApproverName(SecurityUtils.getLoginUser().getUser().getNickName());
|
||||
|
||||
// 若变量未传递,直接用默认值“同意”(前端点击同意按钮的默认意见)
|
||||
enlistmentReserveApproval.setApprovalOpinion(approvalOpinion != null ? approvalOpinion : "同意");
|
||||
if (approvalOpinion != null) {
|
||||
enlistmentReserveApproval.setApprovalResult(!approvalOpinion.equals("同意") ? 0L : 1L); // 1-通过,若有驳回场景需根据变量调整
|
||||
}
|
||||
enlistmentReserveApproval.setApprovalOpinion(approvalOpinion);
|
||||
|
||||
// 审核状态
|
||||
enlistmentReserveApproval.setApprovalResult(approvalResult == null ? 0L : approvalResult);
|
||||
|
||||
// 审批时间:当前系统时间
|
||||
enlistmentReserveApproval.setApprovalTime(new Date());
|
||||
|
||||
@@ -34,6 +34,14 @@ public interface EnlistmentReserveMapper extends BaseMapper<EnlistmentReserve> {
|
||||
// <!-- 根据学号查询辅导员信息 -->
|
||||
public TeacherVo getCounselorInfo(String stuNo);
|
||||
|
||||
/**
|
||||
* 获取审批用户信息
|
||||
* @param roleName
|
||||
* @return
|
||||
* 邵政文
|
||||
*/
|
||||
List<TeacherVo> getShenDataInfo(String roleName);
|
||||
|
||||
/**
|
||||
* 查询应征入伍保留学籍申请列表
|
||||
*
|
||||
|
||||
@@ -30,7 +30,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</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
|
||||
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="EnlistmentReserve" resultMap="RtEnlistmentReserveResult">
|
||||
@@ -38,8 +60,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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="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>
|
||||
@@ -50,7 +76,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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="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>
|
||||
@@ -63,7 +91,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
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>
|
||||
@@ -78,6 +107,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE a.stu_no = #{stuNo}
|
||||
</select>
|
||||
|
||||
<!-- 获取审批用户信息 -->
|
||||
<select id="getShenDataInfo" resultType="com.srs.common.doman.vo.TeacherVo">
|
||||
SELECT a.user_id userId, a.dept_id deptId, a.nick_name userNick, a.user_name userName
|
||||
FROM sys_user a
|
||||
LEFT JOIN sys_user_role b ON a.user_id = b.user_id
|
||||
LEFT JOIN sys_role c ON b.role_id = c.role_id
|
||||
WHERE c.role_name = #{roleName}
|
||||
</select>
|
||||
|
||||
<insert id="insertRtEnlistmentReserve" parameterType="RtEnlistmentReserve" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into rt_enlistment_reserve
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -157,7 +195,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">
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -8,12 +8,11 @@ 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)
|
||||
@@ -72,5 +71,29 @@ private static final long serialVersionUID=1L;
|
||||
@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;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
/**
|
||||
* 查询应征入伍保留学籍申请列表
|
||||
*
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<include refid="selectRtEnlistmentReserveApprovalVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 根据学生姓名、学号,申请编号查询-->
|
||||
<select id="selectRtEnlistmentReserveApprovalByStuName" resultMap="RtEnlistmentReserveApprovalResult">
|
||||
select *
|
||||
from rt_enlistment_reserve_approval
|
||||
|
||||
@@ -12,13 +12,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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>
|
||||
@@ -26,6 +40,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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>
|
||||
|
||||
@@ -34,7 +53,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
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,6 +63,9 @@ 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>
|
||||
<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>
|
||||
@@ -51,6 +74,9 @@ 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>
|
||||
<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>
|
||||
|
||||
@@ -63,12 +89,17 @@ 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">
|
||||
|
||||
@@ -27,19 +27,115 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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>
|
||||
|
||||
<!-- 入伍保留申请表-审核记录子表,根据学生姓名、学号查询 -->
|
||||
<select id="selectRtEnlistmentReserveApprovalByStuName" resultMap="RtEnlistmentReserveApprovalResult">
|
||||
select *
|
||||
from rt_enlistment_reserve_approval
|
||||
<where>
|
||||
<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
|
||||
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">
|
||||
<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="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>
|
||||
@@ -50,7 +146,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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="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>
|
||||
@@ -63,7 +161,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
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">
|
||||
|
||||
Reference in New Issue
Block a user