退伍复学工作流
This commit is contained in:
382
srs-flowable/src/main/java/com/srs/flowable/domain/DisBasic.java
Normal file
382
srs-flowable/src/main/java/com/srs/flowable/domain/DisBasic.java
Normal file
@@ -0,0 +1,382 @@
|
||||
package com.srs.flowable.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.srs.common.annotation.Excel;
|
||||
import com.srs.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 退伍复学申请对象 sys_dis_basic
|
||||
*
|
||||
* @author srs
|
||||
* @date 2025-11-06
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(value = "SysDisBasic对象" , description = "退伍复学申请")
|
||||
@TableName("sys_dis_basic")
|
||||
public class DisBasic extends BaseEntity{
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 复学流程ID
|
||||
*/
|
||||
@ApiModelProperty("复学流程ID")
|
||||
@TableField("fx_id")
|
||||
@Excel(name = "复学流程ID")
|
||||
private String fxId;
|
||||
|
||||
/**
|
||||
* 流程申请时间
|
||||
*/
|
||||
@ApiModelProperty("流程申请时间")
|
||||
@TableField("fx_time")
|
||||
@Excel(name = "流程申请时间")
|
||||
private String fxTime;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@ApiModelProperty("学号")
|
||||
@TableField("st_id")
|
||||
@Excel(name = "学号")
|
||||
private String stId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@ApiModelProperty("姓名")
|
||||
@TableField("st_name")
|
||||
@Excel(name = "姓名")
|
||||
private String stName;
|
||||
|
||||
/**
|
||||
* 辅导员名字
|
||||
*/
|
||||
@ApiModelProperty("辅导员名字")
|
||||
@TableField("fd_name")
|
||||
@Excel(name = "辅导员名字")
|
||||
private String fdName;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@ApiModelProperty("性别")
|
||||
@TableField("sex")
|
||||
@Excel(name = "性别")
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@ApiModelProperty("民族")
|
||||
@TableField("nations")
|
||||
@Excel(name = "民族")
|
||||
private String nations;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
@ApiModelProperty("${column.columnComment}")
|
||||
@TableField("fd_qm")
|
||||
@Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
|
||||
private String fdQm;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
@ApiModelProperty("${column.columnComment}")
|
||||
@TableField("xw_qm")
|
||||
@Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
|
||||
private String xwQm;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
@ApiModelProperty("${column.columnComment}")
|
||||
@TableField("er_qm")
|
||||
@Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
|
||||
private String erQm;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
@ApiModelProperty("${column.columnComment}")
|
||||
@TableField("xj_qm")
|
||||
@Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
|
||||
private String xjQm;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
@ApiModelProperty("${column.columnComment}")
|
||||
@TableField("jw_qm")
|
||||
@Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
|
||||
private String jwQm;
|
||||
|
||||
/**
|
||||
* 班级
|
||||
*/
|
||||
@ApiModelProperty("班级")
|
||||
@TableField("st_class")
|
||||
@Excel(name = "班级")
|
||||
private String stClass;
|
||||
|
||||
/**
|
||||
* 专业
|
||||
*/
|
||||
@ApiModelProperty("专业")
|
||||
@TableField("majors")
|
||||
@Excel(name = "专业")
|
||||
private String majors;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
@ApiModelProperty("年级")
|
||||
@TableField("grade")
|
||||
@Excel(name = "年级")
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 学院
|
||||
*/
|
||||
@ApiModelProperty("学院")
|
||||
@TableField("college")
|
||||
@Excel(name = "学院")
|
||||
private String college;
|
||||
|
||||
/**
|
||||
* 原因
|
||||
*/
|
||||
@ApiModelProperty("原因")
|
||||
@TableField("reasons")
|
||||
@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("专业转换")
|
||||
@TableField("conversion")
|
||||
@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<DisMate> MaList;
|
||||
|
||||
}
|
||||
143
srs-flowable/src/main/java/com/srs/flowable/domain/DisMate.java
Normal file
143
srs-flowable/src/main/java/com/srs/flowable/domain/DisMate.java
Normal file
@@ -0,0 +1,143 @@
|
||||
package com.srs.flowable.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.srs.common.annotation.Excel;
|
||||
import com.srs.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 退伍复学材料对象 sys_dis_mate
|
||||
*
|
||||
* @author srs
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(value = "SysDisMate对象" , description = "退伍复学材料")
|
||||
@TableName("sys_dis_mate")
|
||||
public class DisMate extends BaseEntity{
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@ApiModelProperty("学号")
|
||||
@TableField("st_id")
|
||||
@Excel(name = "学号")
|
||||
private String stId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@ApiModelProperty("姓名")
|
||||
@TableField("st_name")
|
||||
@Excel(name = "姓名")
|
||||
private String stName;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@ApiModelProperty("时间")
|
||||
@TableField("times")
|
||||
@Excel(name = "时间")
|
||||
private String times;
|
||||
|
||||
/**
|
||||
* 学院
|
||||
*/
|
||||
@ApiModelProperty("学院")
|
||||
@TableField("college")
|
||||
@Excel(name = "学院")
|
||||
private String college;
|
||||
|
||||
/**
|
||||
* 原年级
|
||||
*/
|
||||
@ApiModelProperty("原年级")
|
||||
@TableField("oldgrade")
|
||||
@Excel(name = "原年级")
|
||||
private String oldgrade;
|
||||
|
||||
/**
|
||||
* 原专业
|
||||
*/
|
||||
@ApiModelProperty("原专业")
|
||||
@TableField("oldmajor")
|
||||
@Excel(name = "原专业")
|
||||
private String oldmajor;
|
||||
|
||||
/**
|
||||
* 新年级
|
||||
*/
|
||||
@ApiModelProperty("新年级")
|
||||
@TableField("newgrade")
|
||||
@Excel(name = "新年级")
|
||||
private String newgrade;
|
||||
|
||||
/**
|
||||
* 新专业
|
||||
*/
|
||||
@ApiModelProperty("新专业")
|
||||
@TableField("newmajor")
|
||||
@Excel(name = "新专业")
|
||||
private String newmajor;
|
||||
|
||||
/**
|
||||
* 退役证明
|
||||
*/
|
||||
@ApiModelProperty("退役证明")
|
||||
@TableField("proof")
|
||||
@Excel(name = "退役证明")
|
||||
private String proof;
|
||||
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
@ApiModelProperty("身份证")
|
||||
@TableField("idcard")
|
||||
@Excel(name = "身份证")
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 材料
|
||||
*/
|
||||
@ApiModelProperty("材料")
|
||||
@TableField("material")
|
||||
@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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
package com.srs.flowable.listener.disbasic;
|
||||
|
||||
import com.srs.common.core.domain.entity.SysUser;
|
||||
import com.srs.common.doman.vo.TeacherVo;
|
||||
|
||||
import com.srs.common.utils.spring.SpringUtils;
|
||||
import com.srs.flowable.domain.DisBasic;
|
||||
import com.srs.flowable.mapper.DisBasicMapper;
|
||||
import com.srs.flowable.mapper.EnlistmentReserveMapper;
|
||||
import com.srs.system.service.ISysUserService;
|
||||
import org.flowable.bpmn.model.BpmnModel;
|
||||
import org.flowable.bpmn.model.FlowNode;
|
||||
import org.flowable.engine.RepositoryService;
|
||||
import org.flowable.engine.delegate.DelegateExecution;
|
||||
import org.flowable.engine.delegate.ExecutionListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component("DiscListenerListener")
|
||||
public class DiscListener implements ExecutionListener {
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService; // 用户服务(查询部门/学院负责人)
|
||||
|
||||
|
||||
// 用于查询流程定义中的节点信息
|
||||
@Autowired
|
||||
private RepositoryService repositoryService;
|
||||
|
||||
// 定义日志对象
|
||||
private static final Logger log = LoggerFactory.getLogger(DiscListener.class);
|
||||
|
||||
@Override
|
||||
public void notify(DelegateExecution execution) {
|
||||
log.info("===== 退伍复学审批监听器触发 =====");
|
||||
log.info("当前节点ID:{}", execution.getCurrentActivityId());
|
||||
log.info("流程实例ID:{}", execution.getProcessInstanceId());
|
||||
// 1. 获取当前节点ID和流程定义ID
|
||||
String currentActivityId = execution.getCurrentActivityId(); // 当前节点ID(兼容所有版本)
|
||||
String processDefinitionId = execution.getProcessDefinitionId(); // 流程定义ID
|
||||
|
||||
// 2. 根据节点ID查询节点名称(核心修正:通过流程定义获取名称)
|
||||
String currentNodeName = getNodeNameByActivityId(processDefinitionId, currentActivityId);
|
||||
if (currentNodeName == null) {
|
||||
throw new RuntimeException("未找到节点ID=" + currentActivityId + "的名称");
|
||||
}
|
||||
|
||||
// 3. 获取流程实例ID
|
||||
String processInstanceId = execution.getProcessInstanceId();
|
||||
|
||||
// 获取申请表id 、开启流程ID
|
||||
// Long enlistmentId = Long.valueOf(execution.getVariable("enlistmentId").toString());
|
||||
|
||||
Long stId = (Long) execution.getVariable("basicId");
|
||||
|
||||
// Integer intData = (Integer) execution.getVariable("basicId");
|
||||
// Long stId = null;
|
||||
// if (intData != null) {
|
||||
// // 先转为数字,再获取long值
|
||||
// Number num = (Number) intData;
|
||||
// stId = num.longValue();
|
||||
// }
|
||||
|
||||
// 获取审核意见
|
||||
String approvalOpinion = (String) execution.getVariable("approvalOpinion");
|
||||
|
||||
// // 获取审核状态
|
||||
// Long approvalResult = (Long) execution.getVariable("approvalResult");
|
||||
|
||||
// 4. 后续逻辑不变:查询下一个节点负责人并更新变量
|
||||
// Long nextAssigneeId = getNextAssignee(currentNodeName, processInstanceId, stId, currentActivityId, approvalOpinion, approvalResult);
|
||||
Long nextAssigneeId = getNextAssignee(currentNodeName, processInstanceId, stId, currentActivityId);
|
||||
if (nextAssigneeId != null) {
|
||||
execution.setVariable("approval", nextAssigneeId);
|
||||
execution.setVariable("currentNode", currentNodeName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据节点ID和流程定义ID,查询节点名称(兼容所有版本的核心方法)
|
||||
*/
|
||||
private String getNodeNameByActivityId(String processDefinitionId, String activityId) {
|
||||
// 获取流程模型
|
||||
BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinitionId);
|
||||
if (bpmnModel == null) {
|
||||
throw new RuntimeException("未找到流程定义ID=" + processDefinitionId + "的模型");
|
||||
}
|
||||
|
||||
// 从模型中获取节点信息(FlowNode包含用户任务、网关等节点)
|
||||
FlowNode flowNode = (FlowNode) bpmnModel.getFlowElement(activityId);
|
||||
return flowNode != null ? flowNode.getName() : null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据当前节点查询下一个节点的负责人
|
||||
*/
|
||||
// private Long getNextAssignee(String currentNodeName, String processInstanceId, Long stId, String currentActivityId, String approvalOpinion, Long approvalResult) {
|
||||
private Long getNextAssignee(String currentNodeName, String processInstanceId, Long stId, String currentActivityId) {
|
||||
EnlistmentReserveMapper rtEnlistmentReserveMapper = (EnlistmentReserveMapper) SpringUtils.getBean(EnlistmentReserveMapper.class);
|
||||
DisBasicMapper sysDisBasicMapper = (DisBasicMapper)SpringUtils.getBean(DisBasicMapper.class);
|
||||
// 根据学生学号来获取对应辅导员的信息 sysDisBasic.getStId()
|
||||
DisBasic sysDisId = sysDisBasicMapper.selectSysDisBasicById(stId);
|
||||
|
||||
TeacherVo counselorInfo = rtEnlistmentReserveMapper.getCounselorInfo(sysDisId.getStId());
|
||||
// 获取辅导员的部门id
|
||||
Long currentDeptId = counselorInfo.getDeptId();
|
||||
if (currentDeptId == null) {
|
||||
throw new RuntimeException("未分配部门,无法匹配负责人");
|
||||
}
|
||||
// 注意:节点名称需与BPMN模型中完全一致(区分大小写)
|
||||
switch (currentNodeName) {
|
||||
|
||||
case "招生与就业处":
|
||||
return counselorInfo.getUserId();
|
||||
|
||||
case "辅导员审核":
|
||||
// 辅导员通过后 → 下一个节点:学务(筛选出角色ID=105,且与当前部门一致)
|
||||
// 查询角色ID=105(学务)的所有用户
|
||||
SysUser queryUser = new SysUser();
|
||||
queryUser.setRoleId(105L); // 学务角色固定ID
|
||||
List<SysUser> academicAffairsUsers = sysUserService.selectAllocatedList(queryUser);
|
||||
if (academicAffairsUsers.isEmpty()) {
|
||||
throw new RuntimeException("未查询到角色(学务)的用户");
|
||||
}
|
||||
|
||||
// 从学务用户中筛选出部门ID与当前辅导员部门一致的用户
|
||||
SysUser targetAcademic = academicAffairsUsers.stream()
|
||||
.filter(user -> currentDeptId.equals(user.getDeptId())) // 部门ID匹配
|
||||
.findFirst() // 取第一个匹配的学务(若有多个,可根据排序或优先级调整)
|
||||
.orElseThrow(() -> new RuntimeException("未找到部门ID=" + currentDeptId + "的学务负责人"));
|
||||
|
||||
|
||||
// 返回匹配的辅导员用户ID(作为下一个节点负责人)
|
||||
return targetAcademic.getUserId();
|
||||
|
||||
case "学务审核":
|
||||
// 学务通过后 → 下一个节点:二级学院(角色ID=106,匹配学生所属学院)
|
||||
// 查询当前流程对应的业务数据(获取学生所属学院ID)
|
||||
// RtEnlistmentReserve reserve = enlistmentReserveMapper.selectRtEnlistmentReserveByProcessInstanceId(processInstanceId);
|
||||
// if (reserve == null) {
|
||||
// throw new RuntimeException("未查询到流程对应的业务数据,processInstanceId=" + processInstanceId);
|
||||
// }
|
||||
|
||||
// 查询角色ID=106(二级学院)的所有用户
|
||||
SysUser qUser = new SysUser();
|
||||
qUser.setRoleId(106L); // 二级学院角色固定ID=106
|
||||
List<SysUser> collegeUsers = sysUserService.selectAllocatedList(qUser);
|
||||
if (collegeUsers.isEmpty()) {
|
||||
throw new RuntimeException("未查询到角色(二级学院)的用户");
|
||||
}
|
||||
|
||||
// 筛选出部门ID(学院ID)与登录用户所属学院一致的二级学院负责人
|
||||
SysUser targetCollegeLeader = collegeUsers.stream()
|
||||
.filter(user -> currentDeptId.equals(user.getDeptId())) // 学院ID匹配(部门ID即学院ID)
|
||||
.findFirst()
|
||||
.orElseThrow(() -> new RuntimeException("未找到学院ID=" + currentDeptId + "的二级学院负责人(角色ID=106)"));
|
||||
|
||||
|
||||
|
||||
// 返回匹配的二级学院负责人ID
|
||||
return targetCollegeLeader.getUserId();
|
||||
|
||||
case "二级学院审核":
|
||||
// 二级学院通过后 → 下一个节点:学籍管理科
|
||||
|
||||
// 获取学籍管理科审核人
|
||||
List<TeacherVo> shenDataInfo = sysDisBasicMapper.getShenDataInfo("学籍管理科");
|
||||
|
||||
if (shenDataInfo.isEmpty()) {
|
||||
throw new RuntimeException("未查询到对应的用户");
|
||||
}
|
||||
|
||||
|
||||
// 暂时选择学籍管理科第一个人作为审核人
|
||||
return shenDataInfo.get(0).getUserId();
|
||||
|
||||
case "学籍管理":
|
||||
// 学籍管理科通过后 → 下一个节点:教务处主管领导(假设部门ID=40)
|
||||
|
||||
// 获取学教务处主管领导审核人
|
||||
List<TeacherVo> teacherVos = sysDisBasicMapper.getShenDataInfo("教务处主管领导");
|
||||
|
||||
if (teacherVos.isEmpty()) {
|
||||
throw new RuntimeException("未查询到对应的用户");
|
||||
}
|
||||
|
||||
// 暂时选择教务处主管领导第一个人作为审核人
|
||||
return teacherVos.get(0).getUserId();
|
||||
|
||||
case "教务处主管":
|
||||
// 最后一个节点通过后 → 流程结束(无需设置负责人)
|
||||
return null;
|
||||
|
||||
default:
|
||||
throw new RuntimeException("未配置节点[" + currentNodeName + "]的下一个负责人规则");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.srs.flowable.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.srs.common.doman.vo.TeacherVo;
|
||||
import com.srs.flowable.domain.DisBasic;
|
||||
import org.apache.ibatis.annotations.Options;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 退伍复学申请Mapper接口
|
||||
*
|
||||
* @author srs
|
||||
* @date 2025-11-06
|
||||
*/
|
||||
public interface DisBasicMapper extends BaseMapper<DisBasic> {
|
||||
/**
|
||||
* 查询退伍复学申请
|
||||
*
|
||||
* @param id 退伍复学申请主键
|
||||
* @return 退伍复学申请
|
||||
*/
|
||||
public DisBasic selectSysDisBasicById(Long id);
|
||||
|
||||
public DisBasic selectSysDisBasicByStId(@Param("stId") String stId);
|
||||
/**
|
||||
* 查询退伍复学申请列表
|
||||
*
|
||||
* @param sysDisBasic 退伍复学申请
|
||||
* @return 退伍复学申请集合
|
||||
*/
|
||||
List<DisBasic> selectSysDisBasicList(DisBasic sysDisBasic);
|
||||
|
||||
// 学号查询
|
||||
List<TeacherVo> getShenDataInfo(String roleName);
|
||||
|
||||
/**
|
||||
* 新增退伍复学申请
|
||||
*
|
||||
* @param sysDisBasic 退伍复学申请
|
||||
* @return 结果
|
||||
*/
|
||||
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
|
||||
int insertSysDisBasic(DisBasic sysDisBasic);
|
||||
|
||||
/**
|
||||
* 修改退伍复学申请
|
||||
*
|
||||
* @param sysDisBasic 退伍复学申请
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSysDisBasic(DisBasic sysDisBasic);
|
||||
|
||||
/**
|
||||
* 删除退伍复学申请
|
||||
*
|
||||
* @param id 退伍复学申请主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSysDisBasicById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除退伍复学申请
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSysDisBasicByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据学生学号,获取辅导员在sys_user表信息
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
TeacherVo getCounselorInfo(@Param("stId") String stId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.srs.flowable.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.srs.flowable.domain.DisMate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 退伍复学材料Mapper接口
|
||||
*
|
||||
* @author srs
|
||||
* @date 2025-10-28
|
||||
*/
|
||||
public interface DisMateMapper extends BaseMapper<DisMate> {
|
||||
/**
|
||||
* 查询退伍复学材料
|
||||
*
|
||||
* @param id 退伍复学材料主键
|
||||
* @return 退伍复学材料
|
||||
*/
|
||||
public DisMate selectSysDisMateById(Long id);
|
||||
|
||||
/**
|
||||
* 查询退伍复学材料列表
|
||||
*
|
||||
* @param sysDisMate 退伍复学材料
|
||||
* @return 退伍复学材料集合
|
||||
*/
|
||||
List<DisMate> selectSysDisMateList(DisMate sysDisMate);
|
||||
|
||||
/**
|
||||
* 新增退伍复学材料
|
||||
*
|
||||
* @param sysDisMate 退伍复学材料
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSysDisMate(DisMate sysDisMate);
|
||||
|
||||
/**
|
||||
* 修改退伍复学材料
|
||||
*
|
||||
* @param sysDisMate 退伍复学材料
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSysDisMate(DisMate sysDisMate);
|
||||
|
||||
/**
|
||||
* 删除退伍复学材料
|
||||
*
|
||||
* @param id 退伍复学材料主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSysDisMateById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除退伍复学材料
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSysDisMateByIds(Long[] ids);
|
||||
}
|
||||
325
srs-flowable/src/main/resources/mapper/DisBasicMapper.xml
Normal file
325
srs-flowable/src/main/resources/mapper/DisBasicMapper.xml
Normal file
@@ -0,0 +1,325 @@
|
||||
<?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">
|
||||
<mapper namespace="com.srs.flowable.mapper.DisBasicMapper">
|
||||
|
||||
<resultMap type="DisBasic" id="SysDisBasicResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="fxId" column="fx_id" />
|
||||
<result property="fxTime" column="fx_time" />
|
||||
<result property="stId" column="st_id" />
|
||||
<result property="stName" column="st_name" />
|
||||
<result property="fdName" column="fd_name" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="nations" column="nations" />
|
||||
<result property="fdQm" column="fd_qm" />
|
||||
<result property="xwQm" column="xw_qm" />
|
||||
<result property="erQm" column="er_qm" />
|
||||
<result property="xjQm" column="xj_qm" />
|
||||
<result property="jwQm" column="jw_qm" />
|
||||
<result property="stClass" column="st_class" />
|
||||
<result property="majors" column="majors" />
|
||||
<result property="grade" column="grade" />
|
||||
<result property="college" column="college" />
|
||||
<result property="reasons" column="reasons" />
|
||||
<result property="fdIdea" column="fd_idea" />
|
||||
<result property="twoIdea" column="two_idea" />
|
||||
<result property="xwIdea" column="xw_idea" />
|
||||
<result property="xjIdea" column="xj_idea" />
|
||||
<result property="jwIdea" column="jw_idea" />
|
||||
<result property="zsIdea" column="zs_idea" />
|
||||
<result property="zsStatus" column="zs_status" />
|
||||
<result property="times" column="times" />
|
||||
<result property="fdStatus" column="fd_status" />
|
||||
<result property="xwStatus" column="xw_status" />
|
||||
<result property="twoStatus" column="two_status" />
|
||||
<result property="xjglStatus" column="xjgl_status" />
|
||||
<result property="jwStatus" column="jw_status" />
|
||||
<result property="rwTime" column="rw_time" />
|
||||
<result property="zsTime" column="zs_time" />
|
||||
<result property="fdTime" column="fd_time" />
|
||||
<result property="xwTime" column="xw_time" />
|
||||
<result property="twoTime" column="two_time" />
|
||||
<result property="xjTime" column="xj_time" />
|
||||
<result property="jwTime" column="jw_time" />
|
||||
<result property="datab" column="datab" />
|
||||
<result property="dataa" column="dataa" />
|
||||
<result property="conversion" column="conversion" />
|
||||
<result property="processId" column="process_id" />
|
||||
<result property="deployId" column="deploy_id" />
|
||||
<!--填报退伍材料-->
|
||||
<collection property="MaList" column="{stId = st_id}" javaType="java.util.ArrayList" select="selectMateById"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 联表 材料上传-->
|
||||
<resultMap type="SysDisMate" id="SysDisMateResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="stId" column="st_id" />
|
||||
<result property="stName" column="st_name" />
|
||||
<result property="times" column="times" />
|
||||
<result property="college" column="college" />
|
||||
<result property="oldgrade" column="oldgrade" />
|
||||
<result property="oldmajor" column="oldmajor" />
|
||||
<result property="newgrade" column="newgrade" />
|
||||
<result property="newmajor" column="newmajor" />
|
||||
<result property="proof" column="proof" />
|
||||
<result property="idcard" column="idcard" />
|
||||
<result property="material" column="material" />
|
||||
<result property="data1" column="data1" />
|
||||
<result property="data2" column="data2" />
|
||||
</resultMap>
|
||||
|
||||
<!--材料上传-->
|
||||
<select id="selectMateById" resultMap="SysDisMateResult">
|
||||
select *
|
||||
from sys_dis_mate
|
||||
<where>
|
||||
<if test="stId != null and stId != ''">
|
||||
and st_id = #{stId}
|
||||
</if>
|
||||
</where>
|
||||
</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 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}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectSysDisBasicList" parameterType="SysDisBasic" resultMap="SysDisBasicResult">
|
||||
<include refid="selectSysDisBasicVo"/>
|
||||
<where>
|
||||
<if test="fxId != null and fxId != ''"> and fx_id = #{fxId}</if>
|
||||
<if test="fxTime != null and fxTime != ''"> and fx_time = #{fxTime}</if>
|
||||
<if test="stId != null and stId != ''"> and st_id = #{stId}</if>
|
||||
<if test="stName != null and stName != ''"> and st_name like concat('%', #{stName}, '%')</if>
|
||||
<if test="fdName != null and fdName != ''"> and fd_name like concat('%', #{fdName}, '%')</if>
|
||||
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
|
||||
<if test="nations != null and nations != ''"> and nations = #{nations}</if>
|
||||
<if test="fdQm != null and fdQm != ''"> and fd_qm = #{fdQm}</if>
|
||||
<if test="xwQm != null and xwQm != ''"> and xw_qm = #{xwQm}</if>
|
||||
<if test="erQm != null and erQm != ''"> and er_qm = #{erQm}</if>
|
||||
<if test="xjQm != null and xjQm != ''"> and xj_qm = #{xjQm}</if>
|
||||
<if test="jwQm != null and jwQm != ''"> and jw_qm = #{jwQm}</if>
|
||||
<if test="stClass != null and stClass != ''"> and st_class = #{stClass}</if>
|
||||
<if test="majors != null and majors != ''"> and majors = #{majors}</if>
|
||||
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
|
||||
<if test="college != null and college != ''"> and college = #{college}</if>
|
||||
<if test="reasons != null and reasons != ''"> and reasons = #{reasons}</if>
|
||||
<if test="fdIdea != null and fdIdea != ''"> and fd_idea = #{fdIdea}</if>
|
||||
<if test="twoIdea != null and twoIdea != ''"> and two_idea = #{twoIdea}</if>
|
||||
<if test="xwIdea != null and xwIdea != ''"> and xw_idea = #{xwIdea}</if>
|
||||
<if test="xjIdea != null and xjIdea != ''"> and xj_idea = #{xjIdea}</if>
|
||||
<if test="jwIdea != null and jwIdea != ''"> and jw_idea = #{jwIdea}</if>
|
||||
<if test="zsIdea != null and zsIdea != ''"> and zs_idea = #{zsIdea}</if>
|
||||
<if test="zsStatus != null and zsStatus != ''"> and zs_status = #{zsStatus}</if>
|
||||
<if test="times != null and times != ''"> and times = #{times}</if>
|
||||
<if test="fdStatus != null and fdStatus != ''"> and fd_status = #{fdStatus}</if>
|
||||
<if test="xwStatus != null and xwStatus != ''"> and xw_status = #{xwStatus}</if>
|
||||
<if test="twoStatus != null and twoStatus != ''"> and two_status = #{twoStatus}</if>
|
||||
<if test="xjglStatus != null and xjglStatus != ''"> and xjgl_status = #{xjglStatus}</if>
|
||||
<if test="jwStatus != null and jwStatus != ''"> and jw_status = #{jwStatus}</if>
|
||||
<if test="rwTime != null and rwTime != ''"> and rw_time = #{rwTime}</if>
|
||||
<if test="zsTime != null and zsTime != ''"> and zs_time = #{zsTime}</if>
|
||||
<if test="fdTime != null and fdTime != ''"> and fd_time = #{fdTime}</if>
|
||||
<if test="xwTime != null and xwTime != ''"> and xw_time = #{xwTime}</if>
|
||||
<if test="twoTime != null and twoTime != ''"> and two_time = #{twoTime}</if>
|
||||
<if test="xjTime != null and xjTime != ''"> and xj_time = #{xjTime}</if>
|
||||
<if test="jwTime != null and jwTime != ''"> and jw_time = #{jwTime}</if>
|
||||
<if test="datab != null and datab != ''"> and datab = #{datab}</if>
|
||||
<if test="dataa != null and dataa != ''"> and dataa = #{dataa}</if>
|
||||
<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>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysDisBasicById" parameterType="Long" resultMap="SysDisBasicResult">
|
||||
<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
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="fxId != null">fx_id,</if>
|
||||
<if test="fxTime != null">fx_time,</if>
|
||||
<if test="stId != null">st_id,</if>
|
||||
<if test="stName != null">st_name,</if>
|
||||
<if test="fdName != null">fd_name,</if>
|
||||
<if test="sex != null">sex,</if>
|
||||
<if test="nations != null">nations,</if>
|
||||
<if test="fdQm != null">fd_qm,</if>
|
||||
<if test="xwQm != null">xw_qm,</if>
|
||||
<if test="erQm != null">er_qm,</if>
|
||||
<if test="xjQm != null">xj_qm,</if>
|
||||
<if test="jwQm != null">jw_qm,</if>
|
||||
<if test="stClass != null">st_class,</if>
|
||||
<if test="majors != null">majors,</if>
|
||||
<if test="grade != null">grade,</if>
|
||||
<if test="college != null">college,</if>
|
||||
<if test="reasons != null">reasons,</if>
|
||||
<if test="fdIdea != null">fd_idea,</if>
|
||||
<if test="twoIdea != null">two_idea,</if>
|
||||
<if test="xwIdea != null">xw_idea,</if>
|
||||
<if test="xjIdea != null">xj_idea,</if>
|
||||
<if test="jwIdea != null">jw_idea,</if>
|
||||
<if test="zsIdea != null">zs_idea,</if>
|
||||
<if test="zsStatus != null">zs_status,</if>
|
||||
<if test="times != null">times,</if>
|
||||
<if test="fdStatus != null">fd_status,</if>
|
||||
<if test="xwStatus != null">xw_status,</if>
|
||||
<if test="twoStatus != null">two_status,</if>
|
||||
<if test="xjglStatus != null">xjgl_status,</if>
|
||||
<if test="jwStatus != null">jw_status,</if>
|
||||
<if test="rwTime != null">rw_time,</if>
|
||||
<if test="zsTime != null">zs_time,</if>
|
||||
<if test="fdTime != null">fd_time,</if>
|
||||
<if test="xwTime != null">xw_time,</if>
|
||||
<if test="twoTime != null">two_time,</if>
|
||||
<if test="xjTime != null">xj_time,</if>
|
||||
<if test="jwTime != null">jw_time,</if>
|
||||
<if test="datab != null">datab,</if>
|
||||
<if test="dataa != null">dataa,</if>
|
||||
<if test="conversion != null">conversion,</if>
|
||||
<if test="processId != null">process_id,</if>
|
||||
<if test="deployId != null">deploy_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="fxId != null">#{fxId},</if>
|
||||
<if test="fxTime != null">#{fxTime},</if>
|
||||
<if test="stId != null">#{stId},</if>
|
||||
<if test="stName != null">#{stName},</if>
|
||||
<if test="fdName != null">#{fdName},</if>
|
||||
<if test="sex != null">#{sex},</if>
|
||||
<if test="nations != null">#{nations},</if>
|
||||
<if test="fdQm != null">#{fdQm},</if>
|
||||
<if test="xwQm != null">#{xwQm},</if>
|
||||
<if test="erQm != null">#{erQm},</if>
|
||||
<if test="xjQm != null">#{xjQm},</if>
|
||||
<if test="jwQm != null">#{jwQm},</if>
|
||||
<if test="stClass != null">#{stClass},</if>
|
||||
<if test="majors != null">#{majors},</if>
|
||||
<if test="grade != null">#{grade},</if>
|
||||
<if test="college != null">#{college},</if>
|
||||
<if test="reasons != null">#{reasons},</if>
|
||||
<if test="fdIdea != null">#{fdIdea},</if>
|
||||
<if test="twoIdea != null">#{twoIdea},</if>
|
||||
<if test="xwIdea != null">#{xwIdea},</if>
|
||||
<if test="xjIdea != null">#{xjIdea},</if>
|
||||
<if test="jwIdea != null">#{jwIdea},</if>
|
||||
<if test="zsIdea != null">#{zsIdea},</if>
|
||||
<if test="zsStatus != null">#{zsStatus},</if>
|
||||
<if test="times != null">#{times},</if>
|
||||
<if test="fdStatus != null">#{fdStatus},</if>
|
||||
<if test="xwStatus != null">#{xwStatus},</if>
|
||||
<if test="twoStatus != null">#{twoStatus},</if>
|
||||
<if test="xjglStatus != null">#{xjglStatus},</if>
|
||||
<if test="jwStatus != null">#{jwStatus},</if>
|
||||
<if test="rwTime != null">#{rwTime},</if>
|
||||
<if test="zsTime != null">#{zsTime},</if>
|
||||
<if test="fdTime != null">#{fdTime},</if>
|
||||
<if test="xwTime != null">#{xwTime},</if>
|
||||
<if test="twoTime != null">#{twoTime},</if>
|
||||
<if test="xjTime != null">#{xjTime},</if>
|
||||
<if test="jwTime != null">#{jwTime},</if>
|
||||
<if test="datab != null">#{datab},</if>
|
||||
<if test="dataa != null">#{dataa},</if>
|
||||
<if test="conversion != null">#{conversion},</if>
|
||||
<if test="processId != null">#{processId},</if>
|
||||
<if test="deployId != null">#{deployId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysDisBasic" parameterType="SysDisBasic">
|
||||
update sys_dis_basic
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="fxId != null">fx_id = #{fxId},</if>
|
||||
<if test="fxTime != null">fx_time = #{fxTime},</if>
|
||||
<if test="stId != null">st_id = #{stId},</if>
|
||||
<if test="stName != null">st_name = #{stName},</if>
|
||||
<if test="fdName != null">fd_name = #{fdName},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
<if test="nations != null">nations = #{nations},</if>
|
||||
<if test="fdQm != null">fd_qm = #{fdQm},</if>
|
||||
<if test="xwQm != null">xw_qm = #{xwQm},</if>
|
||||
<if test="erQm != null">er_qm = #{erQm},</if>
|
||||
<if test="xjQm != null">xj_qm = #{xjQm},</if>
|
||||
<if test="jwQm != null">jw_qm = #{jwQm},</if>
|
||||
<if test="stClass != null">st_class = #{stClass},</if>
|
||||
<if test="majors != null">majors = #{majors},</if>
|
||||
<if test="grade != null">grade = #{grade},</if>
|
||||
<if test="college != null">college = #{college},</if>
|
||||
<if test="reasons != null">reasons = #{reasons},</if>
|
||||
<if test="fdIdea != null">fd_idea = #{fdIdea},</if>
|
||||
<if test="twoIdea != null">two_idea = #{twoIdea},</if>
|
||||
<if test="xwIdea != null">xw_idea = #{xwIdea},</if>
|
||||
<if test="xjIdea != null">xj_idea = #{xjIdea},</if>
|
||||
<if test="jwIdea != null">jw_idea = #{jwIdea},</if>
|
||||
<if test="zsIdea != null">zs_idea = #{zsIdea},</if>
|
||||
<if test="zsStatus != null">zs_status = #{zsStatus},</if>
|
||||
<if test="times != null">times = #{times},</if>
|
||||
<if test="fdStatus != null">fd_status = #{fdStatus},</if>
|
||||
<if test="xwStatus != null">xw_status = #{xwStatus},</if>
|
||||
<if test="twoStatus != null">two_status = #{twoStatus},</if>
|
||||
<if test="xjglStatus != null">xjgl_status = #{xjglStatus},</if>
|
||||
<if test="jwStatus != null">jw_status = #{jwStatus},</if>
|
||||
<if test="rwTime != null">rw_time = #{rwTime},</if>
|
||||
<if test="zsTime != null">zs_time = #{zsTime},</if>
|
||||
<if test="fdTime != null">fd_time = #{fdTime},</if>
|
||||
<if test="xwTime != null">xw_time = #{xwTime},</if>
|
||||
<if test="twoTime != null">two_time = #{twoTime},</if>
|
||||
<if test="xjTime != null">xj_time = #{xjTime},</if>
|
||||
<if test="jwTime != null">jw_time = #{jwTime},</if>
|
||||
<if test="datab != null">datab = #{datab},</if>
|
||||
<if test="dataa != null">dataa = #{dataa},</if>
|
||||
<if test="conversion != null">conversion = #{conversion},</if>
|
||||
<if test="processId != null">process_id = #{processId},</if>
|
||||
<if test="deployId != null">deploy_id = #{deployId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysDisBasicById" parameterType="Long">
|
||||
delete from sys_dis_basic where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysDisBasicByIds" parameterType="String">
|
||||
delete from sys_dis_basic where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
116
srs-flowable/src/main/resources/mapper/DisMateMapper.xml
Normal file
116
srs-flowable/src/main/resources/mapper/DisMateMapper.xml
Normal file
@@ -0,0 +1,116 @@
|
||||
<?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">
|
||||
<mapper namespace="com.srs.flowable.mapper.DisMateMapper">
|
||||
|
||||
<resultMap type="DisMate" id="SysDisMateResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="stId" column="st_id" />
|
||||
<result property="stName" column="st_name" />
|
||||
<result property="times" column="times" />
|
||||
<result property="college" column="college" />
|
||||
<result property="oldgrade" column="oldgrade" />
|
||||
<result property="oldmajor" column="oldmajor" />
|
||||
<result property="newgrade" column="newgrade" />
|
||||
<result property="newmajor" column="newmajor" />
|
||||
<result property="proof" column="proof" />
|
||||
<result property="idcard" column="idcard" />
|
||||
<result property="material" column="material" />
|
||||
<result property="data1" column="data1" />
|
||||
<result property="data2" column="data2" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysDisMateVo">
|
||||
select id, st_id, st_name, times, college, oldgrade, oldmajor, newgrade, newmajor, proof, idcard, material, data1, data2 from sys_dis_mate
|
||||
</sql>
|
||||
|
||||
<select id="selectSysDisMateList" parameterType="SysDisMate" resultMap="SysDisMateResult">
|
||||
<include refid="selectSysDisMateVo"/>
|
||||
<where>
|
||||
<if test="stId != null and stId != ''"> and st_id = #{stId}</if>
|
||||
<if test="stName != null and stName != ''"> and st_name like concat('%', #{stName}, '%')</if>
|
||||
<if test="times != null and times != ''"> and times = #{times}</if>
|
||||
<if test="college != null and college != ''"> and college = #{college}</if>
|
||||
<if test="oldgrade != null and oldgrade != ''"> and oldgrade = #{oldgrade}</if>
|
||||
<if test="oldmajor != null and oldmajor != ''"> and oldmajor = #{oldmajor}</if>
|
||||
<if test="newgrade != null and newgrade != ''"> and newgrade = #{newgrade}</if>
|
||||
<if test="newmajor != null and newmajor != ''"> and newmajor = #{newmajor}</if>
|
||||
<if test="proof != null and proof != ''"> and proof = #{proof}</if>
|
||||
<if test="idcard != null and idcard != ''"> and idcard = #{idcard}</if>
|
||||
<if test="material != null and material != ''"> and material = #{material}</if>
|
||||
<if test="data1 != null and data1 != ''"> and data1 = #{data1}</if>
|
||||
<if test="data2 != null and data2 != ''"> and data2 = #{data2}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysDisMateById" parameterType="Long" resultMap="SysDisMateResult">
|
||||
<include refid="selectSysDisMateVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysDisMate" parameterType="SysDisMate" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_dis_mate
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stId != null">st_id,</if>
|
||||
<if test="stName != null">st_name,</if>
|
||||
<if test="times != null">times,</if>
|
||||
<if test="college != null">college,</if>
|
||||
<if test="oldgrade != null">oldgrade,</if>
|
||||
<if test="oldmajor != null">oldmajor,</if>
|
||||
<if test="newgrade != null">newgrade,</if>
|
||||
<if test="newmajor != null">newmajor,</if>
|
||||
<if test="proof != null">proof,</if>
|
||||
<if test="idcard != null">idcard,</if>
|
||||
<if test="material != null">material,</if>
|
||||
<if test="data1 != null">data1,</if>
|
||||
<if test="data2 != null">data2,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stId != null">#{stId},</if>
|
||||
<if test="stName != null">#{stName},</if>
|
||||
<if test="times != null">#{times},</if>
|
||||
<if test="college != null">#{college},</if>
|
||||
<if test="oldgrade != null">#{oldgrade},</if>
|
||||
<if test="oldmajor != null">#{oldmajor},</if>
|
||||
<if test="newgrade != null">#{newgrade},</if>
|
||||
<if test="newmajor != null">#{newmajor},</if>
|
||||
<if test="proof != null">#{proof},</if>
|
||||
<if test="idcard != null">#{idcard},</if>
|
||||
<if test="material != null">#{material},</if>
|
||||
<if test="data1 != null">#{data1},</if>
|
||||
<if test="data2 != null">#{data2},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysDisMate" parameterType="SysDisMate">
|
||||
update sys_dis_mate
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stId != null">st_id = #{stId},</if>
|
||||
<if test="stName != null">st_name = #{stName},</if>
|
||||
<if test="times != null">times = #{times},</if>
|
||||
<if test="college != null">college = #{college},</if>
|
||||
<if test="oldgrade != null">oldgrade = #{oldgrade},</if>
|
||||
<if test="oldmajor != null">oldmajor = #{oldmajor},</if>
|
||||
<if test="newgrade != null">newgrade = #{newgrade},</if>
|
||||
<if test="newmajor != null">newmajor = #{newmajor},</if>
|
||||
<if test="proof != null">proof = #{proof},</if>
|
||||
<if test="idcard != null">idcard = #{idcard},</if>
|
||||
<if test="material != null">material = #{material},</if>
|
||||
<if test="data1 != null">data1 = #{data1},</if>
|
||||
<if test="data2 != null">data2 = #{data2},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysDisMateById" parameterType="Long">
|
||||
delete from sys_dis_mate where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysDisMateByIds" parameterType="String">
|
||||
delete from sys_dis_mate where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -155,7 +155,7 @@ public class SysDisBasicServiceImpl extends ServiceImpl<SysDisBasicMapper,SysDis
|
||||
private ProcessResultDto startBasicProcess(SysDisBasic sysDisBasic) {
|
||||
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
variables.put("basicId", sysDisBasic.getId().toString());
|
||||
variables.put("basicId", sysDisBasic.getId());
|
||||
variables.put("conversion", sysDisBasic.getConversion());
|
||||
variables.put("stuId", sysDisBasic.getStId());
|
||||
|
||||
@@ -180,7 +180,7 @@ public class SysDisBasicServiceImpl extends ServiceImpl<SysDisBasicMapper,SysDis
|
||||
//
|
||||
|
||||
//flow_m4npextk:28:257686 flow_m4npextk:31:755004
|
||||
AjaxResult ajaxResult = flowDefinitionService.startProcessInstanceById("flow_nrblbjev:10:1120028", variables);
|
||||
AjaxResult ajaxResult = flowDefinitionService.startProcessInstanceById("flow_nrblbjev:14:1232527", variables);
|
||||
String code = ajaxResult.get("code").toString();
|
||||
if (code.equals("200")) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user