退伍复学表单
This commit is contained in:
@@ -369,6 +369,30 @@ private static final long serialVersionUID=1L;
|
||||
@Excel(name = "流程部署编号")
|
||||
private String deployId;
|
||||
|
||||
/**
|
||||
* 学生编号
|
||||
*/
|
||||
@ApiModelProperty("学生编号")
|
||||
@TableField("student_id")
|
||||
@Excel(name = "学生编号")
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 保留字段1
|
||||
*/
|
||||
@ApiModelProperty("保留字段1")
|
||||
@TableField("test_data")
|
||||
@Excel(name = "保留字段1")
|
||||
private String testData;
|
||||
|
||||
/**
|
||||
* 保留字段2
|
||||
*/
|
||||
@ApiModelProperty("保留字段2")
|
||||
@TableField("test_test")
|
||||
@Excel(name = "保留字段2")
|
||||
private String testTest;
|
||||
|
||||
/**
|
||||
* 退伍复学-填报材料
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,361 @@
|
||||
package com.srs.routine.domain.dto;
|
||||
|
||||
|
||||
import com.srs.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.srs.routine.domain.SysDisMate;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import com.srs.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 退伍复学申请对象 sys_dis_basic
|
||||
*
|
||||
* @author srs
|
||||
* @date 2025-11-06
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("退伍复学申请")
|
||||
public class SysDisBasicDao{
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Excel(name = "序号",isSeq = true)
|
||||
private Long seq;
|
||||
|
||||
// /**
|
||||
// * 复学流程ID
|
||||
// */
|
||||
// @ApiModelProperty("复学流程ID")
|
||||
// @Excel(name = "复学流程ID")
|
||||
// private String fxId;
|
||||
//
|
||||
// /**
|
||||
// * 流程申请时间
|
||||
// */
|
||||
// @ApiModelProperty("流程申请时间")
|
||||
// @Excel(name = "流程申请时间")
|
||||
// private String fxTime;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@ApiModelProperty("学号")
|
||||
@Excel(name = "学号")
|
||||
private String stId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@ApiModelProperty("姓名")
|
||||
@Excel(name = "姓名")
|
||||
private String stName;
|
||||
|
||||
|
||||
@ApiModelProperty("学院")
|
||||
@Excel(name = "学院")
|
||||
private String college;
|
||||
|
||||
/**
|
||||
* 辅导员名字
|
||||
*/
|
||||
// @ApiModelProperty("辅导员名字")
|
||||
// @Excel(name = "辅导员名字")
|
||||
// private String fdName;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@ApiModelProperty("性别")
|
||||
@Excel(name = "性别")
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@ApiModelProperty("民族")
|
||||
@Excel(name = "民族")
|
||||
private String nations;
|
||||
|
||||
// /**
|
||||
// * $column.columnComment
|
||||
// */
|
||||
// @ApiModelProperty("${column.columnComment}")
|
||||
// @Excel(name = "辅导员签名" , readConverterExp = "$column.readConverterExp()")
|
||||
// private String fdQm;
|
||||
//
|
||||
// /**
|
||||
// * $column.columnComment
|
||||
// */
|
||||
// @ApiModelProperty("${column.columnComment}")
|
||||
// @Excel(name = "学务签名" , readConverterExp = "$column.readConverterExp()")
|
||||
// private String xwQm;
|
||||
//
|
||||
// /**
|
||||
// * $column.columnComment
|
||||
// */
|
||||
// @ApiModelProperty("${column.columnComment}")
|
||||
// @Excel(name = "二级学院签名" , readConverterExp = "$column.readConverterExp()")
|
||||
// private String erQm;
|
||||
//
|
||||
// /**
|
||||
// * $column.columnComment
|
||||
// */
|
||||
// @ApiModelProperty("${column.columnComment}")
|
||||
// @Excel(name = "学籍管理签名" , readConverterExp = "$column.readConverterExp()")
|
||||
// private String xjQm;
|
||||
//
|
||||
// /**
|
||||
// * $column.columnComment
|
||||
// */
|
||||
// @ApiModelProperty("${column.columnComment}")
|
||||
// @Excel(name = "教务签名" , readConverterExp = "$column.readConverterExp()")
|
||||
// private String jwQm;
|
||||
|
||||
/**
|
||||
* 班级
|
||||
*/
|
||||
@ApiModelProperty("班级")
|
||||
@Excel(name = "班级")
|
||||
private String stClass;
|
||||
|
||||
/**
|
||||
* 专业
|
||||
*/
|
||||
@ApiModelProperty("专业")
|
||||
@Excel(name = "专业")
|
||||
private String majors;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
@ApiModelProperty("年级")
|
||||
@Excel(name = "年级")
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 学院
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 原因
|
||||
*/
|
||||
@ApiModelProperty("原因")
|
||||
@Excel(name = "原因")
|
||||
private String reasons;
|
||||
|
||||
// /**
|
||||
// * 辅导员意见
|
||||
// */
|
||||
// @ApiModelProperty("辅导员意见")
|
||||
// @TableField("fd_idea")
|
||||
// @Excel(name = "辅导员意见")
|
||||
// private String fdIdea;
|
||||
//
|
||||
// /**
|
||||
// * 二级学院意见
|
||||
// */
|
||||
// @ApiModelProperty("二级学院意见")
|
||||
// @TableField("two_idea")
|
||||
// @Excel(name = "二级学院意见")
|
||||
// private String twoIdea;
|
||||
//
|
||||
// /**
|
||||
// * 学务意见
|
||||
// */
|
||||
// @ApiModelProperty("学务意见")
|
||||
// @TableField("xw_idea")
|
||||
// @Excel(name = "学务意见")
|
||||
// private String xwIdea;
|
||||
//
|
||||
// /**
|
||||
// * 学籍管理意见
|
||||
// */
|
||||
// @ApiModelProperty("学籍管理意见")
|
||||
// @TableField("xj_idea")
|
||||
// @Excel(name = "学籍管理意见")
|
||||
// private String xjIdea;
|
||||
//
|
||||
// /**
|
||||
// * 教务处意见
|
||||
// */
|
||||
// @ApiModelProperty("教务处意见")
|
||||
// @TableField("jw_idea")
|
||||
// @Excel(name = "教务处意见")
|
||||
// private String jwIdea;
|
||||
//
|
||||
// /**
|
||||
// * 招生意见
|
||||
// */
|
||||
// @ApiModelProperty("招生意见")
|
||||
// @TableField("zs_idea")
|
||||
// @Excel(name = "招生意见")
|
||||
// private String zsIdea;
|
||||
//
|
||||
// /**
|
||||
// * 招生就业
|
||||
// */
|
||||
// @ApiModelProperty("招生就业")
|
||||
// @TableField("zs_status")
|
||||
// @Excel(name = "招生就业")
|
||||
// private String zsStatus;
|
||||
//
|
||||
// /**
|
||||
// * 时间
|
||||
// */
|
||||
// @ApiModelProperty("时间")
|
||||
// @TableField("times")
|
||||
// @Excel(name = "时间")
|
||||
// private String times;
|
||||
//
|
||||
// /**
|
||||
// * 辅导员审核状态
|
||||
// */
|
||||
// @ApiModelProperty("辅导员审核状态")
|
||||
// @TableField("fd_status")
|
||||
// @Excel(name = "辅导员审核状态")
|
||||
// private String fdStatus;
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// @ApiModelProperty("")
|
||||
// @TableField("xw_status")
|
||||
// @Excel(name = "学务审核状态")
|
||||
// private String xwStatus;
|
||||
//
|
||||
// /**
|
||||
// * 二级学院审核状态
|
||||
// */
|
||||
// @ApiModelProperty("二级学院审核状态")
|
||||
// @TableField("two_status")
|
||||
// @Excel(name = "二级学院审核状态")
|
||||
// private String twoStatus;
|
||||
//
|
||||
// /**
|
||||
// * 学籍管理审核状态
|
||||
// */
|
||||
// @ApiModelProperty("学籍管理审核状态")
|
||||
// @TableField("xjgl_status")
|
||||
// @Excel(name = "学籍管理审核状态")
|
||||
// private String xjglStatus;
|
||||
//
|
||||
// /**
|
||||
// * 教务审核状态
|
||||
// */
|
||||
// @ApiModelProperty("教务审核状态")
|
||||
// @TableField("jw_status")
|
||||
// @Excel(name = "教务审核状态")
|
||||
// private String jwStatus;
|
||||
//
|
||||
// /**
|
||||
// * 退伍审核时间
|
||||
// */
|
||||
// @ApiModelProperty("退伍审核时间")
|
||||
// @TableField("rw_time")
|
||||
// @Excel(name = "退伍审核时间")
|
||||
// private String rwTime;
|
||||
//
|
||||
// /**
|
||||
// * 招生审核时间
|
||||
// */
|
||||
// @ApiModelProperty("招生审核时间")
|
||||
// @TableField("zs_time")
|
||||
// @Excel(name = "招生审核时间")
|
||||
// private String zsTime;
|
||||
//
|
||||
// /**
|
||||
// * 辅导员
|
||||
// */
|
||||
// @ApiModelProperty("辅导员")
|
||||
// @TableField("fd_time")
|
||||
// @Excel(name = "辅导员")
|
||||
// private String fdTime;
|
||||
//
|
||||
// /**
|
||||
// * 学务审核
|
||||
// */
|
||||
// @ApiModelProperty("学务审核")
|
||||
// @TableField("xw_time")
|
||||
// @Excel(name = "学务审核")
|
||||
// private String xwTime;
|
||||
//
|
||||
// /**
|
||||
// * 二时间
|
||||
// */
|
||||
// @ApiModelProperty("二时间")
|
||||
// @TableField("two_time")
|
||||
// @Excel(name = "二时间")
|
||||
// private String twoTime;
|
||||
//
|
||||
// /**
|
||||
// * 学籍时间
|
||||
// */
|
||||
// @ApiModelProperty("学籍时间")
|
||||
// @TableField("xj_time")
|
||||
// @Excel(name = "学籍时间")
|
||||
// private String xjTime;
|
||||
//
|
||||
// /**
|
||||
// * 教务审核时间
|
||||
// */
|
||||
// @ApiModelProperty("教务审核时间")
|
||||
// @TableField("jw_time")
|
||||
// @Excel(name = "教务审核时间")
|
||||
// private String jwTime;
|
||||
//
|
||||
// /**
|
||||
// * 空余字段
|
||||
// */
|
||||
// @ApiModelProperty("空余字段")
|
||||
// @TableField("datab")
|
||||
// @Excel(name = "空余字段")
|
||||
// private String datab;
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// @ApiModelProperty("")
|
||||
// @TableField("dataa")
|
||||
// @Excel(name = "")
|
||||
// private String dataa;
|
||||
|
||||
/**
|
||||
* 专业转换
|
||||
*/
|
||||
@ApiModelProperty("专业转换")
|
||||
@Excel(name = "专业转换")
|
||||
private String conversion;
|
||||
|
||||
// /**
|
||||
// * 流程实例ID
|
||||
// */
|
||||
// @ApiModelProperty("流程实例ID")
|
||||
// @TableField("process_id")
|
||||
// @Excel(name = "流程实例ID")
|
||||
// private String processId;
|
||||
|
||||
// /**
|
||||
// * 流程部署编号
|
||||
// */
|
||||
// @ApiModelProperty("流程部署编号")
|
||||
// @TableField("deploy_id")
|
||||
// @Excel(name = "流程部署编号")
|
||||
// private String deployId;
|
||||
|
||||
// /**
|
||||
// * 退伍复学-填报材料
|
||||
// */
|
||||
// @ApiModelProperty(value = "退伍复学-填报材料", hidden = true)
|
||||
// @Excel(name = "退伍复学-填报材料")
|
||||
// private List<SysDisMate> MaList;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
package com.srs.routine.domain.dto;
|
||||
|
||||
|
||||
import com.srs.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import com.srs.common.core.domain.BaseEntity;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 退伍复学材料对象 sys_dis_mate
|
||||
*
|
||||
* @author srs
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("退伍复学材料")
|
||||
public class SysDisMateDao {
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Excel(name = "序号",isSeq = true)
|
||||
private Long seq;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@ApiModelProperty("学号")
|
||||
@Excel(name = "学号")
|
||||
private String stId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@ApiModelProperty("姓名")
|
||||
@Excel(name = "姓名")
|
||||
private String stName;
|
||||
|
||||
@ApiModelProperty("学院")
|
||||
@Excel(name = "学院")
|
||||
private String college;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
// @ApiModelProperty("时间")
|
||||
// @Excel(name = "时间")
|
||||
// private String times;
|
||||
|
||||
/**
|
||||
* 学院
|
||||
*/
|
||||
|
||||
/**
|
||||
* 原年级
|
||||
*/
|
||||
@ApiModelProperty("原年级")
|
||||
@Excel(name = "原年级")
|
||||
private String oldgrade;
|
||||
|
||||
/**
|
||||
* 原专业
|
||||
*/
|
||||
@ApiModelProperty("原专业")
|
||||
@Excel(name = "原专业")
|
||||
private String oldmajor;
|
||||
|
||||
/**
|
||||
* 新年级
|
||||
*/
|
||||
@ApiModelProperty("新年级")
|
||||
@Excel(name = "新年级")
|
||||
private String newgrade;
|
||||
|
||||
/**
|
||||
* 新专业
|
||||
*/
|
||||
@ApiModelProperty("新专业")
|
||||
@Excel(name = "新专业")
|
||||
private String newmajor;
|
||||
|
||||
/**
|
||||
* 退役证明
|
||||
*/
|
||||
@ApiModelProperty("退役证明")
|
||||
@Excel(name = "退役证明")
|
||||
private String proof;
|
||||
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
@ApiModelProperty("身份证")
|
||||
@Excel(name = "身份证")
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 材料
|
||||
*/
|
||||
@ApiModelProperty("材料")
|
||||
@Excel(name = "材料")
|
||||
private String material;
|
||||
//
|
||||
// /**
|
||||
// * 保留字段1
|
||||
// */
|
||||
// @ApiModelProperty("保留字段1")
|
||||
// @TableField("data1")
|
||||
// @Excel(name = "保留字段1")
|
||||
// private String data1;
|
||||
//
|
||||
// /**
|
||||
// * 保留字段2
|
||||
// */
|
||||
// @ApiModelProperty("保留字段2")
|
||||
// @TableField("data2")
|
||||
// @Excel(name = "保留字段2")
|
||||
// private String data2;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,10 @@ public interface SysDisBasicMapper extends BaseMapper<SysDisBasic> {
|
||||
public SysDisBasic selectSysDisBasicById(Long id);
|
||||
|
||||
public SysDisBasic selectSysDisBasicByStId(@Param("stId") String stId);
|
||||
|
||||
public SysDisBasic selectSysDisBasicByProcessInstanceId(@Param("processId") String processId);
|
||||
|
||||
public SysDisBasic selectSysDisBasicByStName(@Param("stName") String stName);
|
||||
/**
|
||||
* 查询退伍复学申请列表
|
||||
*
|
||||
|
||||
@@ -20,6 +20,10 @@ public interface ISysDisBasicService extends IService<SysDisBasic> {
|
||||
*/
|
||||
public SysDisBasic selectSysDisBasicById(Long id);
|
||||
|
||||
public SysDisBasic selectSysDisBasicByStName(String stName);
|
||||
|
||||
public SysDisBasic selectSysDisBasicByProcessInstanceId(String processId);
|
||||
|
||||
/**
|
||||
* 查询退伍复学申请列表
|
||||
*
|
||||
@@ -28,6 +32,8 @@ public interface ISysDisBasicService extends IService<SysDisBasic> {
|
||||
*/
|
||||
List<SysDisBasic> selectSysDisBasicList(SysDisBasic sysDisBasic);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增退伍复学申请
|
||||
*
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.srs.routine.service.impl;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.io.InputStream;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.srs.common.core.domain.AjaxResult;
|
||||
import com.srs.common.doman.dto.ProcessResultDto;
|
||||
@@ -13,13 +13,15 @@ import com.srs.common.utils.SecurityUtils;
|
||||
import com.srs.flowable.service.IFlowDefinitionService;
|
||||
import com.srs.routine.mapper.RtEnlistmentReserveMapper;
|
||||
import com.srs.routine.mapper.RtStuLeaveApplicationMapper;
|
||||
import com.srs.routine.mapper.RtStuQuitSchoolMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.flowable.engine.IdentityService;
|
||||
import org.flowable.engine.RuntimeService;
|
||||
import org.flowable.engine.TaskService;
|
||||
import org.flowable.engine.runtime.ProcessInstance;
|
||||
import org.flowable.task.api.Task;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.srs.routine.mapper.SysDisBasicMapper;
|
||||
import com.srs.routine.domain.SysDisBasic;
|
||||
@@ -37,6 +39,7 @@ public class SysDisBasicServiceImpl extends ServiceImpl<SysDisBasicMapper,SysDis
|
||||
@Autowired
|
||||
private SysDisBasicMapper sysDisBasicMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询退伍复学申请
|
||||
*
|
||||
@@ -48,6 +51,16 @@ public class SysDisBasicServiceImpl extends ServiceImpl<SysDisBasicMapper,SysDis
|
||||
return sysDisBasicMapper.selectSysDisBasicById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysDisBasic selectSysDisBasicByStName(String stName) {
|
||||
return sysDisBasicMapper.selectSysDisBasicByStName(stName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysDisBasic selectSysDisBasicByProcessInstanceId(String processId) {
|
||||
return sysDisBasicMapper.selectSysDisBasicByProcessInstanceId(processId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询退伍复学申请列表
|
||||
*
|
||||
@@ -103,11 +116,11 @@ public class SysDisBasicServiceImpl extends ServiceImpl<SysDisBasicMapper,SysDis
|
||||
*/
|
||||
@Override
|
||||
public int updateSysDisBasic(SysDisBasic sysDisBasic) {
|
||||
// ProcessResultDto processResultDto = startBasicProcess(sysDisBasic);
|
||||
// if (processResultDto != null){
|
||||
// sysDisBasic.setProcessId(processResultDto.getProcessInstanceId());
|
||||
// sysDisBasic.setDeployId(processResultDto.getDeploymentId());
|
||||
// }
|
||||
ProcessResultDto processResultDto = startBasicProcess(sysDisBasic);
|
||||
if (processResultDto != null){
|
||||
sysDisBasic.setProcessId(processResultDto.getProcessInstanceId());
|
||||
sysDisBasic.setDeployId(processResultDto.getDeploymentId());
|
||||
}
|
||||
return sysDisBasicMapper.updateSysDisBasic(sysDisBasic);
|
||||
}
|
||||
|
||||
@@ -152,69 +165,166 @@ public class SysDisBasicServiceImpl extends ServiceImpl<SysDisBasicMapper,SysDis
|
||||
*
|
||||
* @param
|
||||
*/
|
||||
private ProcessResultDto startBasicProcess(SysDisBasic sysDisBasic) {
|
||||
// private ProcessResultDto startBasicProcess(SysDisBasic sysDisBasic) {
|
||||
//
|
||||
// Map<String, Object> variables = new HashMap<>();
|
||||
// variables.put("basicId", sysDisBasic.getId());
|
||||
// variables.put("conversion", sysDisBasic.getConversion());
|
||||
// variables.put("stuId", sysDisBasic.getStId());
|
||||
//
|
||||
// if ("N".equals(sysDisBasic.getConversion())) { // 修复字符串比较方式
|
||||
// TeacherVo counselorInfo = rtEnlistmentReserveMapper.getCounselorInfo(sysDisBasic.getStId());
|
||||
// if (counselorInfo == null) {
|
||||
// log.error("未查询到辅导员信息,stuId: {}", sysDisBasic.getStId());
|
||||
// return null; // 避免空指针
|
||||
// }
|
||||
// variables.put("approval", counselorInfo.getUserId());
|
||||
// variables.put("deptId", counselorInfo.getDeptId());
|
||||
// // 无需重复设置 conversion = "N",因为已经通过上面的代码设置过了
|
||||
// }else {
|
||||
// List<TeacherVo> zjcData = sysDisBasicMapper.getShenDataInfo("招就处");
|
||||
// if (zjcData == null) {
|
||||
// log.error("未查询到辅导员信息,stuId: {}", sysDisBasic.getStId());
|
||||
// return null; // 避免空指针
|
||||
// }
|
||||
// variables.put("approval", zjcData.get(0).getUserId());
|
||||
// variables.put("deptId", zjcData.get(0).getDeptId());
|
||||
// }
|
||||
////
|
||||
//
|
||||
// //flow_m4npextk:28:257686 flow_m4npextk:31:755004
|
||||
// AjaxResult ajaxResult = flowDefinitionService.startProcessInstanceById("flow_nrblbjev:15:1330041", variables);
|
||||
// String code = ajaxResult.get("code").toString();
|
||||
// if (code.equals("200")) {
|
||||
//
|
||||
// log.info("流程启动成功");
|
||||
//
|
||||
// Object obj = ajaxResult.get("data");
|
||||
// ProcessResultDto dto = (ProcessResultDto) obj;
|
||||
//
|
||||
// // 操作工作流
|
||||
// // 设置当前用户
|
||||
// identityService.setAuthenticatedUserId(SecurityUtils.getUserId().toString());
|
||||
// // 查询待办任务列表
|
||||
// List<Task> tasks = taskService.createTaskQuery()
|
||||
// .processInstanceId(dto.getProcessInstanceId())
|
||||
// .taskAssignee(SecurityUtils.getUserId().toString())
|
||||
// .active()
|
||||
// .list();
|
||||
// // 保存审核结果到任务变量中
|
||||
// variables.put("approved", true);
|
||||
// // 完成待办任务列表
|
||||
// for (Task task : tasks) {
|
||||
// String taskId = task.getId();
|
||||
// String leaveId = taskService.getVariable(taskId, "basicId").toString();
|
||||
// if (leaveId.equals(sysDisBasic.getId().toString())) {
|
||||
// taskService.complete(task.getId(), variables);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // todo 企业微信推送消息
|
||||
//
|
||||
//
|
||||
// return dto;
|
||||
// } else {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
|
||||
@Autowired
|
||||
private RuntimeService runtimeService;
|
||||
|
||||
private ProcessResultDto startBasicProcess(SysDisBasic sysDisBasic) {
|
||||
// 新增:核心唯一标识获取+空指针防护
|
||||
Long applyId = sysDisBasic.getId();
|
||||
String stId = sysDisBasic.getStId();
|
||||
if (applyId == null || stId == null) {
|
||||
log.error("申请ID/学生ID为空,无法启动工作流 - applyId: {}, stId: {}", applyId, stId);
|
||||
return null;
|
||||
}
|
||||
String basicId = applyId.toString();
|
||||
|
||||
// --------------- 新增:启动前暴力清理该学生所有流程实例(核心拦截)---------------
|
||||
List<ProcessInstance> duplicateInstances = runtimeService.createProcessInstanceQuery()
|
||||
.variableValueEquals("stuId", stId) // 按学生ID精准匹配
|
||||
.list();
|
||||
for (ProcessInstance instance : duplicateInstances) {
|
||||
log.warn("清理学生重复流程实例 - stId: {}, 实例ID: {}", stId, instance.getId());
|
||||
runtimeService.deleteProcessInstance(instance.getId(), "同一学生重复提交清理");
|
||||
}
|
||||
|
||||
// --------------- 原有变量构建(仅添加禁用回调标记)---------------
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
variables.put("basicId", sysDisBasic.getId());
|
||||
variables.put("conversion", sysDisBasic.getConversion());
|
||||
variables.put("stuId", sysDisBasic.getStId());
|
||||
// 新增:禁用所有自动回调(切断框架触发重复的链路)
|
||||
variables.put("skipFormCallback", true);
|
||||
variables.put("noAutoCallback", true);
|
||||
|
||||
if ("N".equals(sysDisBasic.getConversion())) { // 修复字符串比较方式
|
||||
// --------------- 原有审核人查询(优化空指针)---------------
|
||||
if ("N".equals(sysDisBasic.getConversion())) {
|
||||
TeacherVo counselorInfo = rtEnlistmentReserveMapper.getCounselorInfo(sysDisBasic.getStId());
|
||||
if (counselorInfo == null) {
|
||||
log.error("未查询到辅导员信息,stuId: {}", sysDisBasic.getStId());
|
||||
return null; // 避免空指针
|
||||
return null;
|
||||
}
|
||||
variables.put("approval", counselorInfo.getUserId());
|
||||
variables.put("deptId", counselorInfo.getDeptId());
|
||||
// 无需重复设置 conversion = "N",因为已经通过上面的代码设置过了
|
||||
}else {
|
||||
} else {
|
||||
List<TeacherVo> zjcData = sysDisBasicMapper.getShenDataInfo("招就处");
|
||||
if (zjcData == null) {
|
||||
log.error("未查询到辅导员信息,stuId: {}", sysDisBasic.getStId());
|
||||
return null; // 避免空指针
|
||||
// 修复:添加集合非空判断,避免IndexOutOfBoundsException
|
||||
if (zjcData == null || zjcData.isEmpty()) {
|
||||
log.error("未查询到招就处审核人信息,stuId: {}", sysDisBasic.getStId());
|
||||
return null;
|
||||
}
|
||||
variables.put("approval", zjcData.get(0).getUserId());
|
||||
variables.put("deptId", zjcData.get(0).getDeptId());
|
||||
}
|
||||
//
|
||||
|
||||
//flow_m4npextk:28:257686 flow_m4npextk:31:755004
|
||||
AjaxResult ajaxResult = flowDefinitionService.startProcessInstanceById("flow_nrblbjev:14:1232527", variables);
|
||||
// --------------- 原有流程启动逻辑(不变)---------------
|
||||
AjaxResult ajaxResult = flowDefinitionService.startProcessInstanceById("flow_nrblbjev:20:1347543", variables);
|
||||
String code = ajaxResult.get("code").toString();
|
||||
if (code.equals("200")) {
|
||||
|
||||
log.info("流程启动成功");
|
||||
log.info("流程启动成功 - stId: {}, applyId: {}", stId, basicId);
|
||||
|
||||
Object obj = ajaxResult.get("data");
|
||||
ProcessResultDto dto = (ProcessResultDto) obj;
|
||||
|
||||
// 操作工作流
|
||||
// 设置当前用户
|
||||
identityService.setAuthenticatedUserId(SecurityUtils.getUserId().toString());
|
||||
// 查询待办任务列表
|
||||
List<Task> tasks = taskService.createTaskQuery()
|
||||
.processInstanceId(dto.getProcessInstanceId())
|
||||
.taskAssignee(SecurityUtils.getUserId().toString())
|
||||
.active()
|
||||
.list();
|
||||
// 保存审核结果到任务变量中
|
||||
variables.put("approved", true);
|
||||
|
||||
// --------------- 核心修改:删除approved变量,任务完成不传递任何参数 ---------------
|
||||
// 注释掉:variables.put("approved", true); // 移除该变量,避免触发回调
|
||||
|
||||
// 完成待办任务列表
|
||||
for (Task task : tasks) {
|
||||
String taskId = task.getId();
|
||||
String leaveId = taskService.getVariable(taskId, "basicId").toString();
|
||||
if (leaveId.equals(sysDisBasic.getId().toString())) {
|
||||
taskService.complete(task.getId(), variables);
|
||||
// 新增:变量非空校验,避免空指针
|
||||
Object taskBasicIdObj = taskService.getVariable(taskId, "basicId");
|
||||
if (taskBasicIdObj == null) {
|
||||
log.warn("任务变量basicId为空,跳过任务 - 任务ID: {}", taskId);
|
||||
continue;
|
||||
}
|
||||
String leaveId = taskBasicIdObj.toString();
|
||||
if (leaveId.equals(basicId)) {
|
||||
// 核心修改:仅完成任务,不传递variables(切断回调触发重复)
|
||||
taskService.complete(task.getId());
|
||||
log.info("自动完成任务 - 任务ID: {}, 实例ID: {}", taskId, dto.getProcessInstanceId());
|
||||
}
|
||||
}
|
||||
|
||||
// todo 企业微信推送消息
|
||||
|
||||
|
||||
return dto;
|
||||
} else {
|
||||
log.error("流程启动失败,响应码: {}", code);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -48,8 +48,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="conversion" column="conversion" />
|
||||
<result property="processId" column="process_id" />
|
||||
<result property="deployId" column="deploy_id" />
|
||||
<result property="studentId" column="student_id" />
|
||||
<result property="testData" column="test_data" />
|
||||
<result property="testTest" column="test_test" />
|
||||
<!--填报退伍材料-->
|
||||
<collection property="MaList" column="{stId = st_id}" javaType="java.util.ArrayList" select="selectMateById"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<!-- 联表 材料上传-->
|
||||
@@ -81,20 +85,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--查询是否插入过记录-->
|
||||
<select id="selectSysDisBasicByStId" parameterType="String" resultMap="SysDisBasicResult">
|
||||
<include refid="selectSysDisBasicVo"/>
|
||||
<where>
|
||||
<if test="stId != null and stId != ''">
|
||||
and st_id = #{stId}
|
||||
</if>
|
||||
|
||||
<sql id="selectSysDisBasicVo">
|
||||
select id, fx_id, fx_time, st_id, st_name, fd_name, sex, nations, fd_qm, xw_qm, er_qm, xj_qm, jw_qm, st_class, majors, grade, college, reasons, fd_idea, two_idea, xw_idea, xj_idea, jw_idea, zs_idea, zs_status, times, fd_status, xw_status, two_status, xjgl_status, jw_status, rw_time, zs_time, fd_time, xw_time, two_time, xj_time, jw_time, datab, dataa, conversion, process_id, deploy_id from sys_dis_basic
|
||||
</sql>
|
||||
|
||||
<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
|
||||
FROM srs_student a
|
||||
LEFT JOIN srs_class b ON a.class_id = b.class_id
|
||||
LEFT JOIN cph_teacher c ON b.teacher_id = c.teacher_id
|
||||
LEFT JOIN sys_user d ON c.employee_id = d.user_name
|
||||
WHERE a.stu_id = #{stId}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 根据姓名查询信息-->
|
||||
<select id="selectSysDisBasicByStName" parameterType="String" resultMap="SysDisBasicResult">
|
||||
<include refid="selectSysDisBasicVo"/>
|
||||
<where>
|
||||
<if test="stName != null and stName != ''">
|
||||
and st_name = #{stName}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 根据流程编号查询申请记录 -->
|
||||
<select id="selectSysDisBasicByProcessInstanceId" parameterType="String"
|
||||
resultMap="SysDisBasicResult">
|
||||
<include refid="selectSysDisBasicVo"/>
|
||||
where process_id = #{processId}
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
<sql id="selectSysDisBasicVo">
|
||||
select id, fx_id, fx_time, st_id, st_name, fd_name, sex, nations, fd_qm, xw_qm, er_qm, xj_qm, jw_qm, st_class, majors, grade, college, reasons, fd_idea, two_idea, xw_idea, xj_idea, jw_idea, zs_idea, zs_status, times, fd_status, xw_status, two_status, xjgl_status, jw_status, rw_time, zs_time, fd_time, xw_time, two_time, xj_time, jw_time, datab, dataa, conversion, process_id, deploy_id, student_id, test_data, test_test from sys_dis_basic
|
||||
</sql>
|
||||
|
||||
<select id="selectSysDisBasicList" parameterType="SysDisBasic" resultMap="SysDisBasicResult">
|
||||
<include refid="selectSysDisBasicVo"/>
|
||||
@@ -141,6 +174,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="conversion != null and conversion != ''"> and conversion = #{conversion}</if>
|
||||
<if test="processId != null and processId != ''"> and process_id = #{processId}</if>
|
||||
<if test="deployId != null and deployId != ''"> and deploy_id = #{deployId}</if>
|
||||
<if test="studentId != null "> and student_id = #{studentId}</if>
|
||||
<if test="testData != null and testData != ''"> and test_data = #{testData}</if>
|
||||
<if test="testTest != null and testTest != ''"> and test_test = #{testTest}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -148,28 +184,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectSysDisBasicVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询是否插入过记录-->
|
||||
<select id="selectSysDisBasicByStId" parameterType="String" resultMap="SysDisBasicResult">
|
||||
<include refid="selectSysDisBasicVo"/>
|
||||
<where>
|
||||
<if test="stId != null and stId != ''">
|
||||
and st_id = #{stId}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</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="insertSysDisBasic" parameterType="SysDisBasic" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_dis_basic
|
||||
@@ -216,6 +230,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="conversion != null">conversion,</if>
|
||||
<if test="processId != null">process_id,</if>
|
||||
<if test="deployId != null">deploy_id,</if>
|
||||
<if test="studentId != null">student_id,</if>
|
||||
<if test="testData != null">test_data,</if>
|
||||
<if test="testTest != null">test_test,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="fxId != null">#{fxId},</if>
|
||||
@@ -260,6 +277,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="conversion != null">#{conversion},</if>
|
||||
<if test="processId != null">#{processId},</if>
|
||||
<if test="deployId != null">#{deployId},</if>
|
||||
<if test="studentId != null">#{studentId},</if>
|
||||
<if test="testData != null">#{testData},</if>
|
||||
<if test="testTest != null">#{testTest},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -308,6 +328,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="conversion != null">conversion = #{conversion},</if>
|
||||
<if test="processId != null">process_id = #{processId},</if>
|
||||
<if test="deployId != null">deploy_id = #{deployId},</if>
|
||||
<if test="studentId != null">student_id = #{studentId},</if>
|
||||
<if test="testData != null">test_data = #{testData},</if>
|
||||
<if test="testTest != null">test_test = #{testTest},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -322,4 +345,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user