添加一个复职的功能,页面操作列按钮分成两行展示,添加根据离职过滤

This commit is contained in:
2026-09-22 10:17:37 +08:00
parent 2c5823df09
commit c9a2098f3f
7 changed files with 118 additions and 12 deletions
@@ -213,6 +213,18 @@ public class JYSController {
return Result.success();
}
/**
* 复职(还原离职状态)教员
*
* @param jybh 教员编号
*/
@PreAuthorize("@ss.hasPermi('teach:teacher:list')")
@PostMapping("/teacher/enable")
public Result<Void> enableTeacher(@RequestParam("jybh") String jybh) {
facultyService.enableJYB(jybh);
return Result.success();
}
/**
* 单个教员补建/对齐系统账号(幂等:已有账号直接返回用户编号)。
*/
@@ -303,7 +315,8 @@ public class JYSController {
@RequestParam(required = false) String jyxm,
@RequestParam(required = false) String jysdh,
@RequestParam(required = false) String zc,
@RequestParam(required = false) String jylb) {
@RequestParam(required = false) String jylb,
@RequestParam(required = false) Integer lzzt) {
PageQuery query = new PageQuery();
query.setPageNum(pageNum);
query.setPageSize(pageSize);
@@ -312,6 +325,7 @@ public class JYSController {
cond.setJysdh(jysdh);
cond.setZc(zc);
cond.setJylb(jylb);
cond.setLzzt(lzzt);
PageResult<TeacherListVO> pageResult = facultyService.pageJYBDetail(query, cond);
return Result.success(pageResult);
}
@@ -75,11 +75,20 @@
t."虚实类型" AS xslx,
t."教研室代号" AS jysdh,
t."用户编号" AS yhbh,
t."部门编号" AS bmbh
t."部门编号" AS bmbh,
t."离职状态" AS lzzt
FROM "教员表" t
LEFT JOIN "教员属性" s ON s."教员编号" = t."教员编号"
LEFT JOIN "教研室表" j ON j."教研室代号" = t."教研室代号"
WHERE t."离职状态" = 0
WHERE 1=1
<choose>
<when test="jyb.lzzt != null">
AND t."离职状态" = #{jyb.lzzt}
</when>
<otherwise>
AND t."离职状态" = 0
</otherwise>
</choose>
<if test="jyb.jyxm != null and jyb.jyxm != ''">
AND t."教员姓名" LIKE CONCAT('%', #{jyb.jyxm}, '%')
</if>
@@ -79,6 +79,11 @@ public interface FacultyService {
*/
void disableJYB(String jYBH);
/**
* 复职(还原离职状态)教员
*/
void enableJYB(String jYBH);
/**
* 更新教员基本信息
*/
@@ -299,6 +299,23 @@ public class FacultyServiceImpl implements FacultyService {
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void enableJYB(String jybh) {
JYB before = jybMapper.selectById(jybh);
JYB entity = new JYB();
entity.setJybh(jybh);
entity.setLzzt(0);
jybMapper.updateById(entity);
// 复职同步启用关联账号
if (before != null) {
JYB after = new JYB();
after.setJybh(jybh);
after.setLzzt(0);
orgSyncService.syncTeacherAccount(before, after);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void updateJYB(JYB entity) {
@@ -55,4 +55,7 @@ public class TeacherListVO {
/** 部门编号(SYS_DEPT.DEPT_ID) */
private Long bmbh;
/** 离职状态(0-在职 1-离职) */
private Integer lzzt;
}