bug修复

This commit is contained in:
liumengyu
2026-08-28 17:34:56 +08:00
parent a43561af8d
commit 770d32a625
23 changed files with 464 additions and 42 deletions
@@ -1,5 +1,6 @@
package com.roomroot.web.controller.jwgl;
import com.roomroot.common.utils.StringUtils;
import com.roomroot.jwgl.dto.faculty.AddTeacherDTO;
import com.roomroot.jwgl.dto.jys.ElectiveCourseBatchDTO;
import com.roomroot.jwgl.dto.jys.ElectiveCourseQuery;
@@ -119,7 +120,8 @@ public class JYSController {
@RequestParam(defaultValue = "20") Integer pageSize,
@RequestParam(required = false) String jysdh,
@RequestParam(required = false) String jysmc,
@RequestParam(required = false) String bx) {
@RequestParam(required = false) String bx,
@RequestParam(required = false) String ty) {
PageQuery query = new PageQuery();
query.setPageNum(pageNum);
query.setPageSize(pageSize);
@@ -127,6 +129,7 @@ public class JYSController {
cond.setJysdh(jysdh);
cond.setJysmc(jysmc);
cond.setBx(bx);
cond.setTy(StringUtils.hasText(ty) ? Integer.valueOf(ty) : null);
PageResult<JYSB> pageResult = facultyService.pageJYSB(query, cond);
return Result.success(pageResult);
}
@@ -42,6 +42,11 @@ public class SemesterCalendarController {
*/
@PostMapping("/update")
public Result<Void> update(@RequestBody XQXLB xqxlb) {
if(xqxlb.getBh() == null || xqxlb.getBh().trim().isEmpty()){
return Result.error(200,"编号不得为空");
}
semesterCalendarService.update(xqxlb);
return Result.success();
}
@@ -3,6 +3,7 @@ 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.PXRW;
import com.roomroot.jwgl.entity.XYXJYDSQB;
import com.roomroot.jwgl.entity.XYXJYJJGB;
import com.roomroot.jwgl.entity.XYXJYJTJB;
@@ -44,8 +45,22 @@ public class StudentRecordsController {
@Resource
private ClassSemesterService classSemesterService;
/**
* 校验培训:按主体培训任务 0/1 查询培训任务。
*
* @param ztpxrw 主体培训任务,0-否,1-是
*/
@GetMapping("/training-tasks")
public Result<List<PXRW>> listTrainingTasks(@RequestParam("ztpxrw") Integer ztpxrw) {
return Result.success(studentRecordsService.listTrainingTasks(ztpxrw));
}
// ======================== 学员信息维护 ========================
/**
* 新增学员。
* <p>编号由后台生成 UUID;学号按当前班次编号查学员队期表的学号前缀、学号位数顺序生成,保证不重复。</p>
*/
@PostMapping("/add")
public Result<Void> add(@RequestBody XYXX xyxx) {
studentRecordsService.add(xyxx);
@@ -69,6 +84,11 @@ public class StudentRecordsController {
return Result.success(studentRecordsService.getById(bh));
}
/**
* 分页查询学员信息。
* <p>回显年级、专业、班次、考试情况、不及格门数、管理机构。
* 当前班次编号关联学员队表、专业表、学员课程成绩。</p>
*/
@GetMapping("/list")
public Result<PageResult<XYXX>> list(PageQuery query, XYXX xyxx) {
return Result.success(studentRecordsService.pageList(query, xyxx));
@@ -385,21 +405,27 @@ public class StudentRecordsController {
/**
* 分页查询学员的课程成绩列表。
* <p>默认不传参数则全部分页展示;可按学员编号、年度筛选;年度不传时默认展示最新年度(最大年度)的数据。</p>
* <p>
* 按课程编号、学员队编号、学号、年度筛选。学号通过学员编号关联学员信息表匹配。
* </p>
*
* @param pageNum 页码(默认1)
* @param pageSize 每页条数(默认20)
* @param xybh 学员编号(可选)
* @param kcbh 课程编号(对应成绩表科目编号,可选)
* @param xydbh 学员队编号(可选)
* @param xh 学号(可选,关联学员信息表)
* @param nd 年度(可选)
*/
@GetMapping("/grades")
public Result<PageResult<XYKCCJ>> getGrades(
@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "20") Integer pageSize,
@RequestParam(required = false) String xybh,
@RequestParam(required = false) String kcbh,
@RequestParam(required = false) String xydbh,
@RequestParam(required = false) String xh,
@RequestParam(required = false) Integer nd) {
return Result.success(studentRecordsService.pageCourseGrades(
new PageQuery(pageNum, pageSize), xybh, nd));
new PageQuery(pageNum, pageSize), kcbh, xydbh, xh, nd));
}
/**
@@ -87,6 +87,7 @@ public class TrainingProgramController {
* <li>zydm — 专业代码(模糊匹配)</li>
* <li>pxlx — 培训类型(精确匹配,用于版本筛选)</li>
* <li>pxcc — 培训层次(精确匹配)</li>
* <li>ty — 停用(精确匹配)</li>
* </ul>
* </p>
*
@@ -2,6 +2,8 @@ package com.roomroot.web.controller.jwgl;
import com.roomroot.jwgl.entity.ZYJXJHB;
import com.roomroot.jwgl.service.ZYJXJHBService;
import com.roomroot.jwgl.unit.PageQuery;
import com.roomroot.jwgl.unit.PageResult;
import com.roomroot.jwgl.unit.Result;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.*;
@@ -79,9 +81,13 @@ public class ZYJXJHBController {
* @param ty 停用标识(0-正常,1-停用)
*/
@GetMapping("/listByZydhAndTy")
public Result<List<ZYJXJHB>> listByZydhAndTy(@RequestParam("zydh") String zydh,
@RequestParam("ty") Integer ty) {
return Result.success(zyjxjhbService.listByZydhAndTy(zydh, ty));
public Result<PageResult<ZYJXJHB>> listByZydhAndTy(
@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "20") Integer pageSize,
@RequestParam(required = false) String zydh,
@RequestParam(required = false) Integer ty) {
return Result.success(zyjxjhbService.pageByZydhAndTy(
new PageQuery(pageNum, pageSize), zydh, ty));
}
/**