From 1986242cab6c0a9b657b1bce7268a66f9ea49f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A6=E4=B8=9C=E6=81=92?= <1747763533@qq.com> Date: Thu, 20 Nov 2025 17:33:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E4=BC=8D=E5=A4=8D=E5=AD=A6=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/srs/flowable/domain/DisBasic.java | 382 ++++++++++++++++++ .../java/com/srs/flowable/domain/DisMate.java | 143 +++++++ .../listener/disbasic/DiscListener.java | 205 ++++++++++ .../srs/flowable/mapper/DisBasicMapper.java | 78 ++++ .../srs/flowable/mapper/DisMateMapper.java | 62 +++ .../main/resources/mapper/DisBasicMapper.xml | 325 +++++++++++++++ .../main/resources/mapper/DisMateMapper.xml | 116 ++++++ .../service/impl/SysDisBasicServiceImpl.java | 4 +- 8 files changed, 1313 insertions(+), 2 deletions(-) create mode 100644 srs-flowable/src/main/java/com/srs/flowable/domain/DisBasic.java create mode 100644 srs-flowable/src/main/java/com/srs/flowable/domain/DisMate.java create mode 100644 srs-flowable/src/main/java/com/srs/flowable/listener/disbasic/DiscListener.java create mode 100644 srs-flowable/src/main/java/com/srs/flowable/mapper/DisBasicMapper.java create mode 100644 srs-flowable/src/main/java/com/srs/flowable/mapper/DisMateMapper.java create mode 100644 srs-flowable/src/main/resources/mapper/DisBasicMapper.xml create mode 100644 srs-flowable/src/main/resources/mapper/DisMateMapper.xml diff --git a/srs-flowable/src/main/java/com/srs/flowable/domain/DisBasic.java b/srs-flowable/src/main/java/com/srs/flowable/domain/DisBasic.java new file mode 100644 index 0000000..e72fe0e --- /dev/null +++ b/srs-flowable/src/main/java/com/srs/flowable/domain/DisBasic.java @@ -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 MaList; + +} diff --git a/srs-flowable/src/main/java/com/srs/flowable/domain/DisMate.java b/srs-flowable/src/main/java/com/srs/flowable/domain/DisMate.java new file mode 100644 index 0000000..1819285 --- /dev/null +++ b/srs-flowable/src/main/java/com/srs/flowable/domain/DisMate.java @@ -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; + + +} diff --git a/srs-flowable/src/main/java/com/srs/flowable/listener/disbasic/DiscListener.java b/srs-flowable/src/main/java/com/srs/flowable/listener/disbasic/DiscListener.java new file mode 100644 index 0000000..4d4bb98 --- /dev/null +++ b/srs-flowable/src/main/java/com/srs/flowable/listener/disbasic/DiscListener.java @@ -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 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 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 shenDataInfo = sysDisBasicMapper.getShenDataInfo("学籍管理科"); + + if (shenDataInfo.isEmpty()) { + throw new RuntimeException("未查询到对应的用户"); + } + + + // 暂时选择学籍管理科第一个人作为审核人 + return shenDataInfo.get(0).getUserId(); + + case "学籍管理": + // 学籍管理科通过后 → 下一个节点:教务处主管领导(假设部门ID=40) + + // 获取学教务处主管领导审核人 + List teacherVos = sysDisBasicMapper.getShenDataInfo("教务处主管领导"); + + if (teacherVos.isEmpty()) { + throw new RuntimeException("未查询到对应的用户"); + } + + // 暂时选择教务处主管领导第一个人作为审核人 + return teacherVos.get(0).getUserId(); + + case "教务处主管": + // 最后一个节点通过后 → 流程结束(无需设置负责人) + return null; + + default: + throw new RuntimeException("未配置节点[" + currentNodeName + "]的下一个负责人规则"); + } + } + +} diff --git a/srs-flowable/src/main/java/com/srs/flowable/mapper/DisBasicMapper.java b/srs-flowable/src/main/java/com/srs/flowable/mapper/DisBasicMapper.java new file mode 100644 index 0000000..aec17df --- /dev/null +++ b/srs-flowable/src/main/java/com/srs/flowable/mapper/DisBasicMapper.java @@ -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 { + /** + * 查询退伍复学申请 + * + * @param id 退伍复学申请主键 + * @return 退伍复学申请 + */ + public DisBasic selectSysDisBasicById(Long id); + + public DisBasic selectSysDisBasicByStId(@Param("stId") String stId); + /** + * 查询退伍复学申请列表 + * + * @param sysDisBasic 退伍复学申请 + * @return 退伍复学申请集合 + */ + List selectSysDisBasicList(DisBasic sysDisBasic); + + // 学号查询 + List 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); + +} diff --git a/srs-flowable/src/main/java/com/srs/flowable/mapper/DisMateMapper.java b/srs-flowable/src/main/java/com/srs/flowable/mapper/DisMateMapper.java new file mode 100644 index 0000000..3a25775 --- /dev/null +++ b/srs-flowable/src/main/java/com/srs/flowable/mapper/DisMateMapper.java @@ -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 { + /** + * 查询退伍复学材料 + * + * @param id 退伍复学材料主键 + * @return 退伍复学材料 + */ + public DisMate selectSysDisMateById(Long id); + + /** + * 查询退伍复学材料列表 + * + * @param sysDisMate 退伍复学材料 + * @return 退伍复学材料集合 + */ + List 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); +} diff --git a/srs-flowable/src/main/resources/mapper/DisBasicMapper.xml b/srs-flowable/src/main/resources/mapper/DisBasicMapper.xml new file mode 100644 index 0000000..7c57bc4 --- /dev/null +++ b/srs-flowable/src/main/resources/mapper/DisBasicMapper.xml @@ -0,0 +1,325 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + + + insert into sys_dis_basic + + 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, + + + #{fxId}, + #{fxTime}, + #{stId}, + #{stName}, + #{fdName}, + #{sex}, + #{nations}, + #{fdQm}, + #{xwQm}, + #{erQm}, + #{xjQm}, + #{jwQm}, + #{stClass}, + #{majors}, + #{grade}, + #{college}, + #{reasons}, + #{fdIdea}, + #{twoIdea}, + #{xwIdea}, + #{xjIdea}, + #{jwIdea}, + #{zsIdea}, + #{zsStatus}, + #{times}, + #{fdStatus}, + #{xwStatus}, + #{twoStatus}, + #{xjglStatus}, + #{jwStatus}, + #{rwTime}, + #{zsTime}, + #{fdTime}, + #{xwTime}, + #{twoTime}, + #{xjTime}, + #{jwTime}, + #{datab}, + #{dataa}, + #{conversion}, + #{processId}, + #{deployId}, + + + + + update sys_dis_basic + + fx_id = #{fxId}, + fx_time = #{fxTime}, + st_id = #{stId}, + st_name = #{stName}, + fd_name = #{fdName}, + sex = #{sex}, + nations = #{nations}, + fd_qm = #{fdQm}, + xw_qm = #{xwQm}, + er_qm = #{erQm}, + xj_qm = #{xjQm}, + jw_qm = #{jwQm}, + st_class = #{stClass}, + majors = #{majors}, + grade = #{grade}, + college = #{college}, + reasons = #{reasons}, + fd_idea = #{fdIdea}, + two_idea = #{twoIdea}, + xw_idea = #{xwIdea}, + xj_idea = #{xjIdea}, + jw_idea = #{jwIdea}, + zs_idea = #{zsIdea}, + zs_status = #{zsStatus}, + times = #{times}, + fd_status = #{fdStatus}, + xw_status = #{xwStatus}, + two_status = #{twoStatus}, + xjgl_status = #{xjglStatus}, + jw_status = #{jwStatus}, + rw_time = #{rwTime}, + zs_time = #{zsTime}, + fd_time = #{fdTime}, + xw_time = #{xwTime}, + two_time = #{twoTime}, + xj_time = #{xjTime}, + jw_time = #{jwTime}, + datab = #{datab}, + dataa = #{dataa}, + conversion = #{conversion}, + process_id = #{processId}, + deploy_id = #{deployId}, + + where id = #{id} + + + + delete from sys_dis_basic where id = #{id} + + + + delete from sys_dis_basic where id in + + #{id} + + + diff --git a/srs-flowable/src/main/resources/mapper/DisMateMapper.xml b/srs-flowable/src/main/resources/mapper/DisMateMapper.xml new file mode 100644 index 0000000..fd3e1cb --- /dev/null +++ b/srs-flowable/src/main/resources/mapper/DisMateMapper.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + select id, st_id, st_name, times, college, oldgrade, oldmajor, newgrade, newmajor, proof, idcard, material, data1, data2 from sys_dis_mate + + + + + + + + insert into sys_dis_mate + + st_id, + st_name, + times, + college, + oldgrade, + oldmajor, + newgrade, + newmajor, + proof, + idcard, + material, + data1, + data2, + + + #{stId}, + #{stName}, + #{times}, + #{college}, + #{oldgrade}, + #{oldmajor}, + #{newgrade}, + #{newmajor}, + #{proof}, + #{idcard}, + #{material}, + #{data1}, + #{data2}, + + + + + update sys_dis_mate + + st_id = #{stId}, + st_name = #{stName}, + times = #{times}, + college = #{college}, + oldgrade = #{oldgrade}, + oldmajor = #{oldmajor}, + newgrade = #{newgrade}, + newmajor = #{newmajor}, + proof = #{proof}, + idcard = #{idcard}, + material = #{material}, + data1 = #{data1}, + data2 = #{data2}, + + where id = #{id} + + + + delete from sys_dis_mate where id = #{id} + + + + delete from sys_dis_mate where id in + + #{id} + + + \ No newline at end of file diff --git a/srs-routine/src/main/java/com/srs/routine/service/impl/SysDisBasicServiceImpl.java b/srs-routine/src/main/java/com/srs/routine/service/impl/SysDisBasicServiceImpl.java index 12af507..f862a0a 100644 --- a/srs-routine/src/main/java/com/srs/routine/service/impl/SysDisBasicServiceImpl.java +++ b/srs-routine/src/main/java/com/srs/routine/service/impl/SysDisBasicServiceImpl.java @@ -155,7 +155,7 @@ public class SysDisBasicServiceImpl extends ServiceImpl 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