部分功能重写,增加,去除冗余
This commit is contained in:
-172
@@ -1,172 +0,0 @@
|
||||
package com.roomroot.web.controller.jwgl;
|
||||
|
||||
import com.roomroot.jwgl.entity.XYDNDXQJBXXB;
|
||||
import com.roomroot.jwgl.service.ClassSemesterService;
|
||||
import com.roomroot.jwgl.unit.PageQuery;
|
||||
import com.roomroot.jwgl.unit.PageResult;
|
||||
import com.roomroot.jwgl.unit.Result;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 班次学期控制器
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/classSemester")
|
||||
public class ClassSemesterController {
|
||||
|
||||
@Resource
|
||||
private ClassSemesterService classSemesterService;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody XYDNDXQJBXXB xydndxqjbxxb) {
|
||||
classSemesterService.add(xydndxqjbxxb);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@RequestParam("bh") String bh) {
|
||||
classSemesterService.delete(bh);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
@PostMapping("/batchDelete")
|
||||
public Result<Void> batchDelete(@RequestBody List<String> bhList) {
|
||||
classSemesterService.batchDelete(bhList);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改日期范围
|
||||
* <p>
|
||||
* 更新班次学期的日期范围,并同步更新班次学期日历:
|
||||
* 1. 删除日期范围之外的日历记录
|
||||
* 2. 补充新日期范围内缺少的日历记录
|
||||
* </p>
|
||||
* @return 更新数量
|
||||
*/
|
||||
@PostMapping("/batchUpdateDateRange")
|
||||
public Result<Integer> batchUpdateDateRange(@RequestBody Map<String, Object> params) {
|
||||
List<String> bhList = (List<String>) params.get("bhList");//编号列表
|
||||
String xqkssj = (String) params.get("xqkssj");//学期开始时间
|
||||
String xqjssj = (String) params.get("xqjssj");//学期结束时间
|
||||
int count = classSemesterService.batchUpdateDateRange(bhList, xqkssj, xqjssj);
|
||||
return Result.success(count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改开放教员排课状态
|
||||
*
|
||||
* @param bhList XYDNDXQJBXXB编号列表
|
||||
* @param kfjypk 开放教员排课(0-否,1-是)
|
||||
* @return 更新数量
|
||||
*/
|
||||
@PostMapping("/batchUpdateKfjypk")
|
||||
public Result<Integer> batchUpdateKfjypk(@RequestBody Map<String, Object> params) {
|
||||
List<String> bhList = (List<String>) params.get("bhList");
|
||||
Integer kfjypk = (Integer) params.get("kfjypk");
|
||||
int count = classSemesterService.batchUpdateKfjypk(bhList, kfjypk);
|
||||
return Result.success(count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改学期第次
|
||||
*
|
||||
* @param bhList XYDNDXQJBXXB编号列表
|
||||
* @param xqdc 学期第次
|
||||
* @return 更新数量
|
||||
*/
|
||||
@PostMapping("/batchUpdateXqdc")
|
||||
public Result<Integer> batchUpdateXqdc(@RequestBody Map<String, Object> params) {
|
||||
List<String> bhList = (List<String>) params.get("bhList");
|
||||
Integer xqdc = (Integer) params.get("xqdc");
|
||||
int count = classSemesterService.batchUpdateXqdc(bhList, xqdc);
|
||||
return Result.success(count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改教学任务编号
|
||||
*
|
||||
* @return 更新数量
|
||||
*/
|
||||
@PostMapping("/batchUpdateJxrwbh")
|
||||
public Result<Integer> batchUpdateJxrwbh(@RequestBody Map<String, Object> params) {
|
||||
List<String> bhList = (List<String>) params.get("bhList");
|
||||
String jxrwbh = (String) params.get("jxrwbh");//教学任务编号
|
||||
int count = classSemesterService.batchUpdateJxrwbh(bhList, jxrwbh);
|
||||
return Result.success(count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody XYDNDXQJBXXB xydndxqjbxxb) {
|
||||
classSemesterService.update(xydndxqjbxxb);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据编号查询
|
||||
*/
|
||||
@GetMapping("/get")
|
||||
public Result<XYDNDXQJBXXB> getByBh(@RequestParam("bh") String bh) {
|
||||
return Result.success(classSemesterService.getByBh(bh));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Result<PageResult<XYDNDXQJBXXB>> list(PageQuery query, XYDNDXQJBXXB xydndxqjbxxb) {
|
||||
return Result.success(classSemesterService.pageList(query, xydndxqjbxxb));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有有效数据(DEL_FLAG = 0)
|
||||
*/
|
||||
@GetMapping("/all")
|
||||
public Result<List<XYDNDXQJBXXB>> all() {
|
||||
return Result.success(classSemesterService.listAllValid());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据选修班次列表批量添加班次学期
|
||||
* <p>
|
||||
* 根据时间范围过滤学员队表,批量添加班次学期信息,并生成对应的班次学期日历
|
||||
* 筛选条件:入学日期 <= startTime 且 毕业日期 >= endTime
|
||||
* </p>
|
||||
*
|
||||
* @param startTime 时间范围开始
|
||||
* @param endTime 时间范围结束
|
||||
* @param nd 年度
|
||||
* @param xqdc 学期第次
|
||||
* @return 添加数量
|
||||
*/
|
||||
@PostMapping("/batchAddFromElective")
|
||||
public Result<Integer> batchAddFromElective(
|
||||
@RequestParam("startTime") String startTime,
|
||||
@RequestParam("endTime") String endTime,
|
||||
@RequestParam("nd") String nd,
|
||||
@RequestParam("xqdc") String xqdc) {
|
||||
|
||||
LocalDateTime start = LocalDateTime.parse(startTime + "T00:00:00");
|
||||
LocalDateTime end = LocalDateTime.parse(endTime + "T23:59:59");
|
||||
|
||||
int count = classSemesterService.batchAddFromElective(start, end, nd, xqdc, startTime, endTime);
|
||||
return Result.success(count);
|
||||
}
|
||||
}
|
||||
+109
-14
@@ -1,19 +1,24 @@
|
||||
package com.roomroot.web.controller.jwgl;
|
||||
|
||||
import com.roomroot.jwgl.entity.XKZYXX;
|
||||
import com.roomroot.jwgl.entity.ZYB;
|
||||
import com.roomroot.jwgl.service.DisciplineService;
|
||||
import com.roomroot.jwgl.unit.PageQuery;
|
||||
import com.roomroot.jwgl.unit.PageResult;
|
||||
import com.roomroot.jwgl.unit.Result;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 学科专业管理控制器
|
||||
* <p>
|
||||
* 提供学科、专业的增加、删除(逻辑删除)、更新、查询等功能管理接口。
|
||||
* 对应数据表:学科专业信息
|
||||
* 学科目录对应表:学科专业信息;专业对应表:专业表。
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口规范:仅使用 GET 和 POST 两种方法,参数通过请求体或查询参数传递,不拼接在路径中。
|
||||
@@ -28,6 +33,8 @@ public class DisciplineManagementController {
|
||||
@Resource
|
||||
private DisciplineService disciplineService;
|
||||
|
||||
// ======================== 学科专业信息 ========================
|
||||
|
||||
/**
|
||||
* 新增学科专业
|
||||
*
|
||||
@@ -79,21 +86,17 @@ public class DisciplineManagementController {
|
||||
|
||||
/**
|
||||
* 分页条件查询学科专业列表
|
||||
* <p>
|
||||
* 支持模糊查询参数:
|
||||
* <ul>
|
||||
* <li>zYMC — 专业名称(模糊匹配)</li>
|
||||
* <li>zYFX — 专业方向(模糊匹配)</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @param pageNum 页码(默认1)
|
||||
* @param pageNum 页码(默认1)
|
||||
* @param pageSize 每页条数(默认20)
|
||||
* @param zymc 专业名称(可选)
|
||||
* @param zyfx 专业方向(可选)
|
||||
* @param zymc 专业名称(可选)
|
||||
* @param zyfx 专业方向(可选)
|
||||
* @param zydm 专业代码(可选)
|
||||
* @param ty 停用(可选)
|
||||
* @param pxlx2 培训类型2(可选)
|
||||
* @param xnz 学年制(可选)
|
||||
* @return 分页结果
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public Result<PageResult<XKZYXX>> list(
|
||||
@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@@ -117,4 +120,96 @@ public class DisciplineManagementController {
|
||||
PageResult<XKZYXX> pageResult = disciplineService.pageList(query, cond);
|
||||
return Result.success(pageResult);
|
||||
}
|
||||
|
||||
// ======================== 专业表 ========================
|
||||
|
||||
/**
|
||||
* 新增专业。
|
||||
* <p>对应表:专业表。专业代号为空时由服务端生成 UUID;序号标识由数据库自增。</p>
|
||||
*
|
||||
* @param entity 专业表实体
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/major/add")
|
||||
public Result<Void> addMajor(@RequestBody ZYB entity) {
|
||||
disciplineService.addMajor(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除专业(逻辑删除,将停用置为 true)。
|
||||
*
|
||||
* @param zydh 专业代号
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/major/delete")
|
||||
public Result<Void> deleteMajor(@RequestParam("zydh") String zydh) {
|
||||
disciplineService.deleteMajor(zydh);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新专业。
|
||||
*
|
||||
* @param entity 专业表实体(须含专业代号)
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/major/update")
|
||||
public Result<Void> updateMajor(@RequestBody ZYB entity) {
|
||||
disciplineService.updateMajor(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 按专业代号查询专业。
|
||||
*
|
||||
* @param zydh 专业代号
|
||||
* @return 专业详情
|
||||
*/
|
||||
@GetMapping("/major/get")
|
||||
public Result<ZYB> getMajor(@RequestParam("zydh") String zydh) {
|
||||
return Result.success(disciplineService.getMajorById(zydh));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询专业。
|
||||
*
|
||||
* @param pageNum 页码(默认 1)
|
||||
* @param pageSize 每页条数(默认 20)
|
||||
* @param zymc 专业名称(模糊,可选)
|
||||
* @param zyfx 专业方向(模糊,可选)
|
||||
* @param zydm 专业代码(模糊,可选)
|
||||
* @param pxlx 培训类型(可选)
|
||||
* @param pxcc 培训层次(可选)
|
||||
* @param pxlx2 培训类型2(可选)
|
||||
* @param xnz 学年制(可选)
|
||||
* @param xkzyxxbsh 学科专业信息标识号(可选)
|
||||
* @param ty 停用(可选)
|
||||
* @return 分页结果
|
||||
*/
|
||||
@GetMapping("/major/list")
|
||||
public Result<PageResult<ZYB>> listMajor(
|
||||
@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(defaultValue = "20") Integer pageSize,
|
||||
@RequestParam(required = false) String zymc,
|
||||
@RequestParam(required = false) String zyfx,
|
||||
@RequestParam(required = false) String zydm,
|
||||
@RequestParam(required = false) String pxlx,
|
||||
@RequestParam(required = false) String pxcc,
|
||||
@RequestParam(required = false) String pxlx2,
|
||||
@RequestParam(required = false) String xnz,
|
||||
@RequestParam(required = false) String xkzyxxbsh,
|
||||
@RequestParam(required = false) Boolean ty) {
|
||||
ZYB cond = new ZYB();
|
||||
cond.setZymc(zymc);
|
||||
cond.setZyfx(zyfx);
|
||||
cond.setZydm(zydm);
|
||||
cond.setPxlx(pxlx);
|
||||
cond.setPxcc(pxcc);
|
||||
cond.setPxlx2(pxlx2);
|
||||
cond.setXnz(xnz);
|
||||
cond.setXkzyxxbsh(xkzyxxbsh);
|
||||
cond.setTy(ty);
|
||||
return Result.success(disciplineService.pageMajor(new PageQuery(pageNum, pageSize), cond));
|
||||
}
|
||||
}
|
||||
|
||||
+91
@@ -4,7 +4,9 @@ import com.roomroot.jwgl.dto.faculty.AddTeacherDTO;
|
||||
import com.roomroot.jwgl.entity.JYB;
|
||||
import com.roomroot.jwgl.entity.JYSB;
|
||||
import com.roomroot.jwgl.entity.JYSX;
|
||||
import com.roomroot.jwgl.entity.KB;
|
||||
import com.roomroot.jwgl.service.FacultyService;
|
||||
import com.roomroot.jwgl.service.KBService;
|
||||
import com.roomroot.jwgl.unit.PageQuery;
|
||||
import com.roomroot.jwgl.unit.PageResult;
|
||||
import com.roomroot.jwgl.unit.Result;
|
||||
@@ -27,6 +29,9 @@ public class JYSController {
|
||||
|
||||
@Resource
|
||||
private FacultyService facultyService;
|
||||
|
||||
@Resource
|
||||
private KBService kbService;
|
||||
// ======================== 教研室管理 ========================
|
||||
|
||||
/**
|
||||
@@ -212,4 +217,90 @@ public class JYSController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
// ======================== 课表(课程科目) ========================
|
||||
|
||||
/**
|
||||
* 新增课表科目。
|
||||
* <p>对应表:课表。课编号为空时由服务端生成 UUID。</p>
|
||||
*
|
||||
* @param entity 课表实体
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/kb/add")
|
||||
public Result<Void> addKb(@RequestBody KB entity) {
|
||||
kbService.add(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除课表科目。
|
||||
* <p>已被课程标准、学员队任务或专业教学计划引用时不允许删除。</p>
|
||||
*
|
||||
* @param kbh 课编号
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/kb/delete")
|
||||
public Result<Void> deleteKb(@RequestParam("kbh") String kbh) {
|
||||
kbService.delete(kbh);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新课表科目。
|
||||
*
|
||||
* @param entity 课表实体(须含课编号)
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/kb/update")
|
||||
public Result<Void> updateKb(@RequestBody KB entity) {
|
||||
kbService.update(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 按课编号查询课表科目。
|
||||
*
|
||||
* @param kbh 课编号
|
||||
* @return 课表详情
|
||||
*/
|
||||
@GetMapping("/kb/get")
|
||||
public Result<KB> getKb(@RequestParam("kbh") String kbh) {
|
||||
return Result.success(kbService.getByKbh(kbh));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询课表科目。
|
||||
*
|
||||
* @param pageNum 页码(默认 1)
|
||||
* @param pageSize 每页条数(默认 20)
|
||||
* @param kmc 课名称(模糊,可选)
|
||||
* @param jysdh 教研室代号(可选)
|
||||
* @param kclx 课程类型(可选)
|
||||
* @param pxlx 培训类型(可选)
|
||||
* @param pxcc 培训层次(可选)
|
||||
* @param kmdm 科目代码(模糊,可选)
|
||||
* @param jc 简称(模糊,可选)
|
||||
* @return 分页结果
|
||||
*/
|
||||
@GetMapping("/kb/list")
|
||||
public Result<PageResult<KB>> listKb(
|
||||
@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(defaultValue = "20") Integer pageSize,
|
||||
@RequestParam(required = false) String kmc,
|
||||
@RequestParam(required = false) String jysdh,
|
||||
@RequestParam(required = false) String kclx,
|
||||
@RequestParam(required = false) String pxlx,
|
||||
@RequestParam(required = false) String pxcc,
|
||||
@RequestParam(required = false) String kmdm,
|
||||
@RequestParam(required = false) String jc) {
|
||||
KB cond = new KB();
|
||||
cond.setKmc(kmc);
|
||||
cond.setJysdh(jysdh);
|
||||
cond.setKclx(kclx);
|
||||
cond.setPxlx(pxlx);
|
||||
cond.setPxcc(pxcc);
|
||||
cond.setKmdm(kmdm);
|
||||
cond.setJc(jc);
|
||||
return Result.success(kbService.pageList(new PageQuery(pageNum, pageSize), cond));
|
||||
}
|
||||
}
|
||||
|
||||
+262
@@ -0,0 +1,262 @@
|
||||
package com.roomroot.web.controller.jwgl;
|
||||
|
||||
import com.roomroot.jwgl.dto.ks.HourStatisticsQuery;
|
||||
import com.roomroot.jwgl.entity.KSFBZ;
|
||||
import com.roomroot.jwgl.entity.KSXSFA;
|
||||
import com.roomroot.jwgl.service.KJService;
|
||||
import com.roomroot.jwgl.service.KSService;
|
||||
import com.roomroot.jwgl.service.LogService;
|
||||
import com.roomroot.jwgl.unit.PageQuery;
|
||||
import com.roomroot.jwgl.unit.PageResult;
|
||||
import com.roomroot.jwgl.unit.Result;
|
||||
import com.roomroot.jwgl.vo.ks.HourStatisticsVO;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 课时管理
|
||||
* <p>
|
||||
* 课时标准方案【补助-核算】<br>
|
||||
* 课时补助核算<br>
|
||||
* 联教联训管理
|
||||
* </p>
|
||||
* <p>接口规范:仅使用 GET 和 POST,参数通过请求体或查询参数传递。</p>
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ks")
|
||||
public class KSController {
|
||||
|
||||
@Resource
|
||||
private KJService kjService;
|
||||
@Resource
|
||||
private LogService logService;
|
||||
@Resource
|
||||
private KSService ksService;
|
||||
// ======================== 课时费标准方案 ========================
|
||||
|
||||
/**
|
||||
* 新增课时费标准方案。
|
||||
* <p>
|
||||
* 对应表:课时费标准。定义默认课时量、课时费及各绩效档补助。
|
||||
* 编号为空时由服务端生成 36 位 UUID。
|
||||
* </p>
|
||||
*
|
||||
* @param entity 课时费标准
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/fee-standard/add")
|
||||
public Result<Void> addFeeStandard(@RequestBody KSFBZ entity) {
|
||||
kjService.addFeeStandard(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除课时费标准方案。
|
||||
*
|
||||
* @param bh 编号
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/fee-standard/delete")
|
||||
public Result<Void> deleteFeeStandard(@RequestParam("bh") String bh) {
|
||||
kjService.deleteFeeStandard(bh);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新课时费标准方案。
|
||||
*
|
||||
* @param entity 课时费标准(须含编号)
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/fee-standard/update")
|
||||
public Result<Void> updateFeeStandard(@RequestBody KSFBZ entity) {
|
||||
kjService.updateFeeStandard(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 按编号查询课时费标准方案。
|
||||
*
|
||||
* @param bh 编号
|
||||
* @return 课时费标准
|
||||
*/
|
||||
@GetMapping("/fee-standard/get")
|
||||
public Result<KSFBZ> getFeeStandard(@RequestParam("bh") String bh) {
|
||||
return Result.success(kjService.getFeeStandardById(bh));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询课时费标准方案。
|
||||
*
|
||||
* @param pageNum 页码(默认 1)
|
||||
* @param pageSize 每页条数(默认 20)
|
||||
* @param mc 名称(模糊匹配,可选)
|
||||
* @return 分页结果
|
||||
*/
|
||||
@GetMapping("/fee-standard/list")
|
||||
public Result<PageResult<KSFBZ>> listFeeStandard(
|
||||
@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(defaultValue = "20") Integer pageSize,
|
||||
@RequestParam(required = false) String mc) {
|
||||
KSFBZ cond = new KSFBZ();
|
||||
cond.setMc(mc);
|
||||
return Result.success(kjService.pageFeeStandard(new PageQuery(pageNum, pageSize), cond));
|
||||
}
|
||||
// ======================== 课时系数方案 ========================
|
||||
|
||||
/**
|
||||
* 新增课时系数方案
|
||||
* <p>定义主讲/辅讲课时系数、班级系数、合班系数、各时段课时量等核算参数。</p>
|
||||
*
|
||||
* @param entity 课时系数方案实体
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/coefficient-plan/add")
|
||||
public Result<Void> addCoefficientPlan(@RequestBody KSXSFA entity) {
|
||||
logService.addCoefficientPlan(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新课时系数方案
|
||||
*
|
||||
* @param entity 课时系数方案实体(需含编号)
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/coefficient-plan/update")
|
||||
public Result<Void> updateCoefficientPlan(@RequestBody KSXSFA entity) {
|
||||
logService.updateCoefficientPlan(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据编号查询课时系数方案详情
|
||||
*
|
||||
* @param bh 编号
|
||||
* @return 课时系数方案
|
||||
*/
|
||||
@GetMapping("/coefficient-plan/get")
|
||||
public Result<KSXSFA> getCoefficientPlan(@RequestParam("bh") String bh) {
|
||||
return Result.success(logService.getCoefficientPlanById(bh));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询课时系数方案列表
|
||||
*
|
||||
* @param pageNum 页码(默认1)
|
||||
* @param pageSize 每页条数(默认20)
|
||||
* @param mc 名称(模糊匹配,可选)
|
||||
* @return 分页结果
|
||||
*/
|
||||
@GetMapping("/coefficient-plan/list")
|
||||
public Result<PageResult<KSXSFA>> listCoefficientPlan(
|
||||
@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(defaultValue = "20") Integer pageSize,
|
||||
@RequestParam(required = false) String mc) {
|
||||
KSXSFA cond = new KSXSFA(); cond.setMc(mc);
|
||||
return Result.success(logService.pageCoefficientPlan(new PageQuery(pageNum, pageSize), cond));
|
||||
}
|
||||
|
||||
// ======================== 课时统计 ========================
|
||||
|
||||
/**
|
||||
* 分页查询课时统计。
|
||||
* <p>
|
||||
* 联查教研室表、教员表、课时统计表。标准课时量 180,超课时及按职称计算过程和结果。
|
||||
* 未传 nd 时默认当前学期。管理员看全部教员,教员只看本人。
|
||||
* </p>
|
||||
*
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @param nd 学期年度(可选,默认本学期)
|
||||
* @param xq 学期序号(可选)
|
||||
* @param jyxm 教员姓名(模糊,可选)
|
||||
*/
|
||||
@GetMapping("/hour-stat/list")
|
||||
public Result<PageResult<HourStatisticsVO>> listHourStatistics(
|
||||
@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(defaultValue = "20") Integer pageSize,
|
||||
@RequestParam(required = false) Integer nd,
|
||||
@RequestParam(required = false) Integer xq,
|
||||
@RequestParam(required = false) String jyxm) {
|
||||
HourStatisticsQuery cond = new HourStatisticsQuery();
|
||||
cond.setNd(nd);
|
||||
cond.setXq(xq);
|
||||
cond.setJyxm(jyxm);
|
||||
return Result.success(ksService.pageHourStatistics(new PageQuery(pageNum, pageSize), cond));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出课时统计 Excel。
|
||||
*/
|
||||
@GetMapping("/hour-stat/export")
|
||||
public void exportHourStatistics(
|
||||
@RequestParam(required = false) Integer nd,
|
||||
@RequestParam(required = false) Integer xq,
|
||||
@RequestParam(required = false) String jyxm,
|
||||
HttpServletResponse response) {
|
||||
HourStatisticsQuery cond = new HourStatisticsQuery();
|
||||
cond.setNd(nd);
|
||||
cond.setXq(xq);
|
||||
cond.setJyxm(jyxm);
|
||||
ksService.exportHourStatistics(cond, response);
|
||||
}
|
||||
|
||||
// ======================== 课时费统计 ========================
|
||||
|
||||
/**
|
||||
* 分页查询课时费统计。
|
||||
* <p>
|
||||
* 课时量同源,单价取课时费标准(ksfbzbh 为空则用最新方案的默认标准课时量、默认课时费、默认超量课时费)。
|
||||
* 未传 nd 时默认当前学期。管理员看全部教员,教员只看本人。
|
||||
* </p>
|
||||
*
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @param nd 学期年度(可选,默认本学期)
|
||||
* @param xq 学期序号(可选)
|
||||
* @param jyxm 教员姓名(模糊,可选)
|
||||
* @param ksfbzbh 课时费标准编号(可选)
|
||||
*/
|
||||
@GetMapping("/fee-stat/list")
|
||||
public Result<PageResult<HourStatisticsVO>> listFeeStatistics(
|
||||
@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(defaultValue = "20") Integer pageSize,
|
||||
@RequestParam(required = false) Integer nd,
|
||||
@RequestParam(required = false) Integer xq,
|
||||
@RequestParam(required = false) String jyxm,
|
||||
@RequestParam(required = false) String ksfbzbh) {
|
||||
HourStatisticsQuery cond = new HourStatisticsQuery();
|
||||
cond.setNd(nd);
|
||||
cond.setXq(xq);
|
||||
cond.setJyxm(jyxm);
|
||||
cond.setKsfbzbh(ksfbzbh);
|
||||
return Result.success(ksService.pageFeeStatistics(new PageQuery(pageNum, pageSize), cond));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出课时费统计 Excel。
|
||||
*/
|
||||
@GetMapping("/fee-stat/export")
|
||||
public void exportFeeStatistics(
|
||||
@RequestParam(required = false) Integer nd,
|
||||
@RequestParam(required = false) Integer xq,
|
||||
@RequestParam(required = false) String jyxm,
|
||||
@RequestParam(required = false) String ksfbzbh,
|
||||
HttpServletResponse response) {
|
||||
HourStatisticsQuery cond = new HourStatisticsQuery();
|
||||
cond.setNd(nd);
|
||||
cond.setXq(xq);
|
||||
cond.setJyxm(jyxm);
|
||||
cond.setKsfbzbh(ksfbzbh);
|
||||
ksService.exportFeeStatistics(cond, response);
|
||||
}
|
||||
|
||||
}
|
||||
-54
@@ -336,60 +336,6 @@ public class LogController {
|
||||
return Result.success(logService.pageCalculationStandard(new PageQuery(pageNum, pageSize), cond));
|
||||
}
|
||||
|
||||
// ======================== 课时系数方案 ========================
|
||||
|
||||
/**
|
||||
* 新增课时系数方案
|
||||
* <p>定义主讲/辅讲课时系数、班级系数、合班系数、各时段课时量等核算参数。</p>
|
||||
*
|
||||
* @param entity 课时系数方案实体
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/coefficient-plan/add")
|
||||
public Result<Void> addCoefficientPlan(@RequestBody KSXSFA entity) {
|
||||
logService.addCoefficientPlan(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新课时系数方案
|
||||
*
|
||||
* @param entity 课时系数方案实体(需含编号)
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/coefficient-plan/update")
|
||||
public Result<Void> updateCoefficientPlan(@RequestBody KSXSFA entity) {
|
||||
logService.updateCoefficientPlan(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据编号查询课时系数方案详情
|
||||
*
|
||||
* @param bh 编号
|
||||
* @return 课时系数方案
|
||||
*/
|
||||
@GetMapping("/coefficient-plan/get")
|
||||
public Result<KSXSFA> getCoefficientPlan(@RequestParam("bh") String bh) {
|
||||
return Result.success(logService.getCoefficientPlanById(bh));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询课时系数方案列表
|
||||
*
|
||||
* @param pageNum 页码(默认1)
|
||||
* @param pageSize 每页条数(默认20)
|
||||
* @param mc 名称(模糊匹配,可选)
|
||||
* @return 分页结果
|
||||
*/
|
||||
@GetMapping("/coefficient-plan/list")
|
||||
public Result<PageResult<KSXSFA>> listCoefficientPlan(
|
||||
@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(defaultValue = "20") Integer pageSize,
|
||||
@RequestParam(required = false) String mc) {
|
||||
KSXSFA cond = new KSXSFA(); cond.setMc(mc);
|
||||
return Result.success(logService.pageCoefficientPlan(new PageQuery(pageNum, pageSize), cond));
|
||||
}
|
||||
|
||||
// ======================== 课时费标准 ========================
|
||||
|
||||
|
||||
+329
-16
@@ -1,23 +1,37 @@
|
||||
package com.roomroot.web.controller.jwgl;
|
||||
|
||||
import com.roomroot.jwgl.entity.XYXX;
|
||||
import com.roomroot.jwgl.entity.XYDNDXQJBXXB;
|
||||
import com.roomroot.jwgl.entity.XYDB;
|
||||
import com.roomroot.jwgl.entity.XYXJYDSQB;
|
||||
import com.roomroot.jwgl.entity.XYXJYJJGB;
|
||||
import com.roomroot.jwgl.entity.XYXJYJTJB;
|
||||
import com.roomroot.jwgl.entity.XYKCCJ;
|
||||
import com.roomroot.jwgl.entity.XYKCGCCJ;
|
||||
import com.roomroot.jwgl.service.StudentRecordsService;
|
||||
import com.roomroot.jwgl.service.ClassSemesterService;
|
||||
import com.roomroot.jwgl.unit.PageQuery;
|
||||
import com.roomroot.jwgl.unit.PageResult;
|
||||
import com.roomroot.jwgl.unit.Result;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 学员档案管理控制器
|
||||
* 学员管理
|
||||
* <p>
|
||||
* 提供学员信息的增删改查、学籍异动管理,
|
||||
* 以及学员课程成绩查询、课程过程成绩查询、课程表查询和 Excel 导出功能。
|
||||
* 学员信息维护
|
||||
* 学员学籍异动申请
|
||||
* 学院学籍预警管理
|
||||
* 学员学籍预警结果
|
||||
* 班次管理
|
||||
* 班次学期管理
|
||||
* 学员标签管理。
|
||||
* </p>
|
||||
*/
|
||||
@RestController
|
||||
@@ -27,7 +41,10 @@ public class StudentRecordsController {
|
||||
@Resource
|
||||
private StudentRecordsService studentRecordsService;
|
||||
|
||||
// ======================== 学员 CRUD ========================
|
||||
@Resource
|
||||
private ClassSemesterService classSemesterService;
|
||||
|
||||
// ======================== 学员信息维护 ========================
|
||||
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody XYXX xyxx) {
|
||||
@@ -57,26 +74,313 @@ public class StudentRecordsController {
|
||||
return Result.success(studentRecordsService.pageList(query, xyxx));
|
||||
}
|
||||
|
||||
// ======================== 学籍异动 ========================
|
||||
// ======================== 学员信息批量导入 ========================
|
||||
|
||||
@PostMapping("/retain-grade")
|
||||
public Result<Void> retainGrade(@RequestParam("bh") String bh) {
|
||||
studentRecordsService.retainGrade(bh);
|
||||
/**
|
||||
* 批量导入学员信息(支持 .xls / .xlsx)
|
||||
* <p>模板列:编号, 学号, 姓名, 学员队期编号, 证件号码, 政治面貌, 性别,
|
||||
* 出生日期, 名族, 籍贯, 身份证号, 联系电话, 通信地址, 学员类别, 曾用名</p>
|
||||
*
|
||||
* @param file 上传的学员信息 Excel 文件
|
||||
* @return 导入条数
|
||||
*/
|
||||
@PostMapping("/import-students")
|
||||
public Result<Integer> importStudents(@RequestParam("file") MultipartFile file) throws Exception {
|
||||
int count = studentRecordsService.importStudents(file);
|
||||
return Result.success("导入成功,共" + count + "条", count);
|
||||
}
|
||||
|
||||
// ======================== 班次管理(学员队表) ========================
|
||||
|
||||
/** 新增班次(学员队) */
|
||||
@PostMapping("/team/add")
|
||||
public Result<Void> addTeam(@RequestBody XYDB entity) {
|
||||
studentRecordsService.addTeam(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/downgrade")
|
||||
public Result<Void> downgrade(@RequestParam("bh") String bh) {
|
||||
studentRecordsService.downgrade(bh);
|
||||
/** 删除班次(学员队),按学员队编号 */
|
||||
@PostMapping("/team/delete")
|
||||
public Result<Void> deleteTeam(@RequestParam("xydbh") String xydbh) {
|
||||
studentRecordsService.deleteTeam(xydbh);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/drop-out")
|
||||
public Result<Void> dropOut(@RequestParam("bh") String bh) {
|
||||
studentRecordsService.dropOut(bh);
|
||||
/** 修改班次(学员队) */
|
||||
@PostMapping("/team/update")
|
||||
public Result<Void> updateTeam(@RequestBody XYDB entity) {
|
||||
studentRecordsService.updateTeam(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/** 根据学员队编号查询班次详情 */
|
||||
@GetMapping("/team/get")
|
||||
public Result<XYDB> getTeam(@RequestParam("xydbh") String xydbh) {
|
||||
return Result.success(studentRecordsService.getTeamById(xydbh));
|
||||
}
|
||||
|
||||
/** 分页条件查询班次列表(支持学员队名称、年级、专业代号、任务类别、学员队类型筛选) */
|
||||
@GetMapping("/team/list")
|
||||
public Result<PageResult<XYDB>> listTeam(PageQuery query, XYDB cond) {
|
||||
return Result.success(studentRecordsService.pageTeam(query, cond));
|
||||
}
|
||||
|
||||
/** 从 Excel(.xls/.xlsx) 导入班次数据(模板列与学员队表字段一致,共 21 列) */
|
||||
@PostMapping("/team/import")
|
||||
public Result<Integer> importTeam(@RequestParam("file") MultipartFile file) throws Exception {
|
||||
int count = studentRecordsService.importTeam(file);
|
||||
return Result.success("导入成功,共" + count + "条", count);
|
||||
}
|
||||
|
||||
/** 导出班次数据到 Excel(.xls),可按条件筛选导出 */
|
||||
@GetMapping("/team/export")
|
||||
public void exportTeam(XYDB cond, HttpServletResponse response) throws Exception {
|
||||
studentRecordsService.exportTeam(cond, response);
|
||||
}
|
||||
|
||||
// ======================== 学员学籍异动申请 ========================
|
||||
|
||||
/**
|
||||
* 新增学员学籍异动申请
|
||||
* <p>后台自动写入创建时间和修改时间;状态为空时默认 0(待审核)。</p>
|
||||
*/
|
||||
@PostMapping("/application/add")
|
||||
public Result<Void> addApplication(@RequestBody XYXJYDSQB entity) {
|
||||
studentRecordsService.addApplication(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学员学籍异动申请
|
||||
*
|
||||
* @param bh 异动申请编号
|
||||
*/
|
||||
@PostMapping("/application/delete")
|
||||
public Result<Void> deleteApplication(@RequestParam("bh") String bh) {
|
||||
studentRecordsService.deleteApplication(bh);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学员学籍异动申请
|
||||
* <p>后台自动刷新修改时间,创建时间保持不变。</p>
|
||||
*/
|
||||
@PostMapping("/application/update")
|
||||
public Result<Void> updateApplication(@RequestBody XYXJYDSQB entity) {
|
||||
studentRecordsService.updateApplication(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据编号查询学员学籍异动申请详情
|
||||
*
|
||||
* @param bh 异动申请编号
|
||||
*/
|
||||
@GetMapping("/application/get")
|
||||
public Result<XYXJYDSQB> getApplication(@RequestParam("bh") String bh) {
|
||||
return Result.success(studentRecordsService.getApplicationById(bh));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询学员学籍异动申请列表
|
||||
* <p>支持按编号、学员编号、申请类型、状态等条件筛选。</p>
|
||||
*/
|
||||
@GetMapping("/application/list")
|
||||
public Result<PageResult<XYXJYDSQB>> listApplication(PageQuery query, XYXJYDSQB cond) {
|
||||
return Result.success(studentRecordsService.pageApplication(query, cond));
|
||||
}
|
||||
|
||||
// ======================== 学员学籍预警条件 ========================
|
||||
|
||||
/**
|
||||
* 新增学员学籍预警条件
|
||||
* <p>后台自动写入修改时间。</p>
|
||||
*/
|
||||
@PostMapping("/warning-condition/add")
|
||||
public Result<Void> addWarningCondition(@RequestBody XYXJYJTJB entity) {
|
||||
studentRecordsService.addWarningCondition(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学员学籍预警条件
|
||||
* <p>后台自动刷新修改时间。</p>
|
||||
*/
|
||||
@PostMapping("/warning-condition/update")
|
||||
public Result<Void> updateWarningCondition(@RequestBody XYXJYJTJB entity) {
|
||||
studentRecordsService.updateWarningCondition(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据编号查询学员学籍预警条件
|
||||
*
|
||||
* @param bh 预警条件编号
|
||||
*/
|
||||
@GetMapping("/warning-condition/get")
|
||||
public Result<XYXJYJTJB> getWarningCondition(@RequestParam("bh") String bh) {
|
||||
return Result.success(studentRecordsService.getWarningConditionById(bh));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询学员学籍预警条件列表
|
||||
* <p>支持按编号、名称、培训类型、培训层次、停用等条件筛选。</p>
|
||||
*/
|
||||
@GetMapping("/warning-condition/list")
|
||||
public Result<PageResult<XYXJYJTJB>> listWarningCondition(PageQuery query, XYXJYJTJB cond) {
|
||||
return Result.success(studentRecordsService.pageWarningCondition(query, cond));
|
||||
}
|
||||
|
||||
// ======================== 学员学籍预警结果 ========================
|
||||
|
||||
/**
|
||||
* 根据编号查询学员学籍预警结果
|
||||
*
|
||||
* @param bh 预警结果编号
|
||||
*/
|
||||
@GetMapping("/warning-result/get")
|
||||
public Result<XYXJYJJGB> getWarningResult(@RequestParam("bh") String bh) {
|
||||
return Result.success(studentRecordsService.getWarningResultById(bh));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询学员学籍预警结果列表
|
||||
* <p>用于查看是否有学员触发预警条件,从而展示预警结果。</p>
|
||||
* <p>支持按编号、年度、预警条件编号、学员编号、发布等条件筛选。</p>
|
||||
*/
|
||||
@GetMapping("/warning-result/list")
|
||||
public Result<PageResult<XYXJYJJGB>> listWarningResult(PageQuery query, XYXJYJJGB cond) {
|
||||
return Result.success(studentRecordsService.pageWarningResult(query, cond));
|
||||
}
|
||||
|
||||
// ======================== 班次学期管理 ========================
|
||||
|
||||
/** 新增班次学期(写入班次学期表 XYDNDXQJBXXB) */
|
||||
@PostMapping("/semester/add")
|
||||
public Result<Void> semesterAdd(@RequestBody XYDNDXQJBXXB xydndxqjbxxb) {
|
||||
classSemesterService.add(xydndxqjbxxb);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/** 删除班次学期(逻辑删除,按编号) */
|
||||
@PostMapping("/semester/delete")
|
||||
public Result<Void> semesterDelete(@RequestParam("bh") String bh) {
|
||||
classSemesterService.delete(bh);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/** 批量删除班次学期(按编号列表) */
|
||||
@PostMapping("/semester/batchDelete")
|
||||
public Result<Void> semesterBatchDelete(@RequestBody List<String> bhList) {
|
||||
classSemesterService.batchDelete(bhList);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改班次学期的日期范围,并同步更新班次学期日历:
|
||||
* 删除日期范围之外的日历记录、补充新日期范围内缺少的日历记录。
|
||||
*
|
||||
* @param params 包含 bhList(编号列表)、xqkssj(学期开始时间)、xqjssj(学期结束时间)
|
||||
* @return 更新数量
|
||||
*/
|
||||
@PostMapping("/semester/batchUpdateDateRange")
|
||||
public Result<Integer> semesterBatchUpdateDateRange(@RequestBody Map<String, Object> params) {
|
||||
List<String> bhList = (List<String>) params.get("bhList");
|
||||
String xqkssj = (String) params.get("xqkssj");
|
||||
String xqjssj = (String) params.get("xqjssj");
|
||||
int count = classSemesterService.batchUpdateDateRange(bhList, xqkssj, xqjssj);
|
||||
return Result.success(count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改开放教员排课状态。
|
||||
*
|
||||
* @param params 包含 bhList(编号列表)、kfjypk(0-否,1-是)
|
||||
* @return 更新数量
|
||||
*/
|
||||
@PostMapping("/semester/batchUpdateKfjypk")
|
||||
public Result<Integer> semesterBatchUpdateKfjypk(@RequestBody Map<String, Object> params) {
|
||||
List<String> bhList = (List<String>) params.get("bhList");
|
||||
Integer kfjypk = (Integer) params.get("kfjypk");
|
||||
int count = classSemesterService.batchUpdateKfjypk(bhList, kfjypk);
|
||||
return Result.success(count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改班次学期的学期第次。
|
||||
*
|
||||
* @param params 包含 bhList(编号列表)、xqdc(学期第次)
|
||||
* @return 更新数量
|
||||
*/
|
||||
@PostMapping("/semester/batchUpdateXqdc")
|
||||
public Result<Integer> semesterBatchUpdateXqdc(@RequestBody Map<String, Object> params) {
|
||||
List<String> bhList = (List<String>) params.get("bhList");
|
||||
Integer xqdc = (Integer) params.get("xqdc");
|
||||
int count = classSemesterService.batchUpdateXqdc(bhList, xqdc);
|
||||
return Result.success(count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改班次学期的教学任务编号。
|
||||
*
|
||||
* @param params 包含 bhList(编号列表)、jxrwbh(教学任务编号)
|
||||
* @return 更新数量
|
||||
*/
|
||||
@PostMapping("/semester/batchUpdateJxrwbh")
|
||||
public Result<Integer> semesterBatchUpdateJxrwbh(@RequestBody Map<String, Object> params) {
|
||||
List<String> bhList = (List<String>) params.get("bhList");
|
||||
String jxrwbh = (String) params.get("jxrwbh");
|
||||
int count = classSemesterService.batchUpdateJxrwbh(bhList, jxrwbh);
|
||||
return Result.success(count);
|
||||
}
|
||||
|
||||
/** 更新班次学期 */
|
||||
@PostMapping("/semester/update")
|
||||
public Result<Void> semesterUpdate(@RequestBody XYDNDXQJBXXB xydndxqjbxxb) {
|
||||
classSemesterService.update(xydndxqjbxxb);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/** 根据编号查询班次学期详情 */
|
||||
@GetMapping("/semester/get")
|
||||
public Result<XYDNDXQJBXXB> semesterGet(@RequestParam("bh") String bh) {
|
||||
return Result.success(classSemesterService.getByBh(bh));
|
||||
}
|
||||
|
||||
/** 分页条件查询班次学期列表 */
|
||||
@GetMapping("/semester/list")
|
||||
public Result<PageResult<XYDNDXQJBXXB>> semesterList(PageQuery query, XYDNDXQJBXXB cond) {
|
||||
return Result.success(classSemesterService.pageList(query, cond));
|
||||
}
|
||||
|
||||
/** 查询所有有效的班次学期数据(DEL_FLAG = 0) */
|
||||
@GetMapping("/semester/all")
|
||||
public Result<List<XYDNDXQJBXXB>> semesterAll() {
|
||||
return Result.success(classSemesterService.listAllValid());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据选修班次列表批量添加班次学期,并生成对应的班次学期日历。
|
||||
* <p>筛选条件:学员队入学日期 <= startTime 且 毕业日期 >= endTime。</p>
|
||||
*
|
||||
* @param startTime 时间范围开始(起始日,格式 yyyy-MM-dd)
|
||||
* @param endTime 时间范围结束(截止日,格式 yyyy-MM-dd)
|
||||
* @param nd 年度
|
||||
* @param xqdc 学期第次
|
||||
* @return 添加数量
|
||||
*/
|
||||
@PostMapping("/semester/batchAddFromElective")
|
||||
public Result<Integer> semesterBatchAddFromElective(
|
||||
@RequestParam("startTime") String startTime,
|
||||
@RequestParam("endTime") String endTime,
|
||||
@RequestParam("nd") String nd,
|
||||
@RequestParam("xqdc") String xqdc) {
|
||||
LocalDateTime start = LocalDateTime.parse(startTime + "T00:00:00");
|
||||
LocalDateTime end = LocalDateTime.parse(endTime + "T23:59:59");
|
||||
int count = classSemesterService.batchAddFromElective(start, end, nd, xqdc, startTime, endTime);
|
||||
return Result.success(count);
|
||||
}
|
||||
|
||||
// ======================== 课程成绩查询 ========================
|
||||
|
||||
/**
|
||||
@@ -99,8 +403,6 @@ public class StudentRecordsController {
|
||||
return Result.success(studentRecordsService.getCourseProcessGrades(xybh));
|
||||
}
|
||||
|
||||
// ======================== Excel 导出 ========================
|
||||
|
||||
/**
|
||||
* 导出学员课程成绩 Excel
|
||||
*
|
||||
@@ -111,4 +413,15 @@ public class StudentRecordsController {
|
||||
public void exportGrades(@RequestParam("xybh") String xybh, HttpServletResponse response) {
|
||||
studentRecordsService.exportGradesExcel(xybh, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学员课程过程成绩 Excel(对应 /student-records/process-grades 的导出)
|
||||
*
|
||||
* @param xybh 学员编号
|
||||
* @param response HTTP 响应
|
||||
*/
|
||||
@GetMapping("/export-process-grades")
|
||||
public void exportProcessGrades(@RequestParam("xybh") String xybh, HttpServletResponse response) {
|
||||
studentRecordsService.exportProcessGradesExcel(xybh, response);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user