forked from liweijie/education
部分功能重写,增加,去除冗余
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);
|
||||
}
|
||||
}
|
||||
+106
-11
@@ -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 pageSize 每页条数(默认20)
|
||||
* @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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
# 达梦连接串:ip:端口,schema指定默认模式
|
||||
url: jdbc:dm://192.168.1.27:5236?schema=JIAOWU&useUnicode=true&characterEncoding=utf-8
|
||||
url: jdbc:dm://10.1.1.17:5236?schema=JIAOWU&useUnicode=true&characterEncoding=utf-8
|
||||
username: JIAOWU
|
||||
password: Jiaowu123
|
||||
driver-class-name: dm.jdbc.driver.DmDriver
|
||||
|
||||
@@ -1,218 +1,181 @@
|
||||
package com.roomroot.jwgl.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
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.roomroot.jwgl.unit.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 课表
|
||||
* <p>
|
||||
* 课程科目目录,对应数据表:课表。主键为课编号。
|
||||
* </p>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("课表")
|
||||
public class KB extends BaseEntity {
|
||||
public class KB {
|
||||
|
||||
/**
|
||||
* 课编号
|
||||
*/
|
||||
/** 课编号 */
|
||||
@TableId(value = "课编号", type = IdType.INPUT)
|
||||
private String kbh;
|
||||
|
||||
/**
|
||||
* 课名称
|
||||
*/
|
||||
/** 课名称 */
|
||||
@TableField("课名称")
|
||||
private String kmc;
|
||||
|
||||
/**
|
||||
* 教研室代号
|
||||
*/
|
||||
/** 教研室代号 */
|
||||
@TableField("教研室代号")
|
||||
private String jysdh;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
/** 备注 */
|
||||
@TableField("备注")
|
||||
private String bz;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
/** 序号 */
|
||||
@TableField("序号")
|
||||
private String xh;
|
||||
|
||||
/**
|
||||
* 学分
|
||||
*/
|
||||
/** 学分 */
|
||||
@TableField("学分")
|
||||
private Float xf;
|
||||
|
||||
/**
|
||||
* 简称
|
||||
*/
|
||||
/** 简称 */
|
||||
@TableField("简称")
|
||||
private String jc;
|
||||
|
||||
/**
|
||||
* 学时
|
||||
*/
|
||||
/** 学时 */
|
||||
@TableField("学时")
|
||||
private Integer xs;
|
||||
|
||||
/**
|
||||
* 培训层次
|
||||
*/
|
||||
/** 培训层次 */
|
||||
@TableField("培训层次")
|
||||
private String pxcc;
|
||||
|
||||
/**
|
||||
* 培训类型
|
||||
*/
|
||||
/** 培训类型 */
|
||||
@TableField("培训类型")
|
||||
private String pxlx;
|
||||
|
||||
/**
|
||||
* 课程类型
|
||||
*/
|
||||
/** 课程类型 */
|
||||
@TableField("课程类型")
|
||||
private String kclx;
|
||||
|
||||
/**
|
||||
* 考试课时
|
||||
*/
|
||||
/** 考试课时 */
|
||||
@TableField("考试课时")
|
||||
private Integer ksks;
|
||||
|
||||
/**
|
||||
* 拼音
|
||||
*/
|
||||
/** 拼音 */
|
||||
@TableField("拼音")
|
||||
private String py;
|
||||
|
||||
/**
|
||||
* 规范名称
|
||||
*/
|
||||
/** 规范名称 */
|
||||
@TableField("规范名称")
|
||||
private String gfmc;
|
||||
|
||||
/**
|
||||
* 成绩分制
|
||||
*/
|
||||
/** 成绩分制 */
|
||||
@TableField("成绩分制")
|
||||
private String cjfz;
|
||||
|
||||
/**
|
||||
* 不计入学员平均分
|
||||
*/
|
||||
/** 不计入学员平均分 */
|
||||
@TableField("不计入学员平均分")
|
||||
private Integer bjrxypjf;
|
||||
|
||||
/**
|
||||
* 教学管理部门编号
|
||||
*/
|
||||
/** 教学管理部门编号 */
|
||||
@TableField("教学管理部门编号")
|
||||
private String jxglbmbh;
|
||||
|
||||
/**
|
||||
* 理论学时
|
||||
*/
|
||||
/** 理论学时 */
|
||||
@TableField("理论学时")
|
||||
private Integer llxs;
|
||||
|
||||
/**
|
||||
* 实践学时
|
||||
*/
|
||||
/** 实践学时 */
|
||||
@TableField("实践学时")
|
||||
private Integer sjxs;
|
||||
|
||||
/**
|
||||
* 科目代码
|
||||
*/
|
||||
/** 科目代码 */
|
||||
@TableField("科目代码")
|
||||
private String kmdm;
|
||||
|
||||
/**
|
||||
* 周课时
|
||||
*/
|
||||
/** 周课时 */
|
||||
@TableField("周课时")
|
||||
private Integer zks;
|
||||
|
||||
/**
|
||||
* 课类型
|
||||
*/
|
||||
/** 课类型 */
|
||||
@TableField("课类型")
|
||||
private String klx;
|
||||
|
||||
/**
|
||||
* 考试课时不显示
|
||||
*/
|
||||
/** 考试课时不显示 */
|
||||
@TableField("考试课时不显示")
|
||||
private Integer ksksbxs;
|
||||
|
||||
/**
|
||||
* 课程统一编号
|
||||
*/
|
||||
/** 课程统一编号 */
|
||||
@TableField("课程统一编号")
|
||||
private String kctybh;
|
||||
|
||||
/**
|
||||
* 适用对象
|
||||
*/
|
||||
/** 适用对象 */
|
||||
@TableField("适用对象")
|
||||
private String sydx;
|
||||
|
||||
/**
|
||||
* 辅导答疑课时
|
||||
*/
|
||||
/** 辅导答疑课时 */
|
||||
@TableField("辅导答疑课时")
|
||||
private Integer fddyks;
|
||||
|
||||
/**
|
||||
* 自修课时
|
||||
*/
|
||||
/** 自修课时 */
|
||||
@TableField("自修课时")
|
||||
private Integer zxks;
|
||||
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
/** 版本 */
|
||||
@TableField("版本")
|
||||
private String bb;
|
||||
|
||||
/**
|
||||
* 修订日期
|
||||
*/
|
||||
/** 修订日期 */
|
||||
@TableField("修订日期")
|
||||
private LocalDateTime xdrq;
|
||||
|
||||
/**
|
||||
* 序号标识
|
||||
*/
|
||||
/** 序号标识 */
|
||||
@TableField(value = "序号标识", insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
||||
private Integer xhbs;
|
||||
|
||||
/**
|
||||
* 节次优选级
|
||||
*/
|
||||
/** 节次优选级 */
|
||||
@TableField("节次优选级")
|
||||
private Integer jcyxj;
|
||||
|
||||
/**
|
||||
* 课程支持方式
|
||||
*/
|
||||
/** 课程支持方式 */
|
||||
@TableField("课程支持方式")
|
||||
private String kczcfs;
|
||||
|
||||
/**
|
||||
* 课程建设方式
|
||||
*/
|
||||
/** 课程建设方式 */
|
||||
@TableField("课程建设方式")
|
||||
private String kcjsfs;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
*/
|
||||
/** json字典 */
|
||||
@TableField("json字典")
|
||||
private String jsonzd;
|
||||
|
||||
/**
|
||||
* 政治类课程
|
||||
*/
|
||||
/** 政治类课程 */
|
||||
@TableField("政治类课程")
|
||||
private Integer zzlkc;
|
||||
|
||||
/**
|
||||
* 考核方式
|
||||
*/
|
||||
/** 考核方式 */
|
||||
@TableField("考核方式")
|
||||
private String khfs;
|
||||
|
||||
/**
|
||||
* 形成性成绩分值
|
||||
*/
|
||||
/** 形成性成绩分值 */
|
||||
@TableField("形成性成绩分值")
|
||||
private Float xcxcjfz;
|
||||
|
||||
/**
|
||||
* 终结性成绩分值
|
||||
*/
|
||||
/** 终结性成绩分值 */
|
||||
@TableField("终结性成绩分值")
|
||||
private Float zjxcjfz;
|
||||
|
||||
/**
|
||||
* 密级
|
||||
*/
|
||||
/** 密级 */
|
||||
@TableField("密级")
|
||||
private String mj;
|
||||
|
||||
/**
|
||||
* 评选情况
|
||||
*/
|
||||
/** 评选情况 */
|
||||
@TableField("评选情况")
|
||||
private String pxqk;
|
||||
|
||||
}
|
||||
|
||||
@@ -8,69 +8,72 @@ import lombok.EqualsAndHashCode;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 课时费标准(课时核算标准)
|
||||
* 课时费标准(课时核算标准方案)
|
||||
* <p>
|
||||
* 定义课时费核算的基准参数,包括各种绩效等级对应的补助标准。
|
||||
* 对应表:课时费标准。定义课时费核算的基准参数,包括各绩效等级补助。
|
||||
* </p>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("课时费标准")
|
||||
public class KSFBZ extends BaseEntity {
|
||||
public class KSFBZ {
|
||||
|
||||
/** 编号 CHAR(36) */
|
||||
@TableId(value = "编号", type = IdType.INPUT)
|
||||
private String bh;
|
||||
|
||||
/** 名称 VARCHAR(50) */
|
||||
@TableField("名称")
|
||||
private String mc;
|
||||
|
||||
/** 默认标准课时量 */
|
||||
@TableField("默认标准课时量")
|
||||
private Double mrbzksl;
|
||||
|
||||
/** 默认课时费标准 */
|
||||
@TableField("默认课时费标准")
|
||||
private Double mrksfbz;
|
||||
|
||||
/** 默认超量课时费标准 */
|
||||
@TableField("默认超量课时费标准")
|
||||
private Double mrclksfbz;
|
||||
|
||||
/** 相关教学补助课时费标准 */
|
||||
@TableField("相关教学补助课时费标准")
|
||||
private Double xgjxbzksfbz;
|
||||
|
||||
/** 绩效优秀补助 */
|
||||
@TableField("绩效优秀补助")
|
||||
private Double jxyxbz;
|
||||
|
||||
/** 绩效良好补助 */
|
||||
@TableField("绩效良好补助")
|
||||
private Double jxlhbz;
|
||||
|
||||
/** 绩效中等补助 */
|
||||
@TableField("绩效中等补助")
|
||||
private Double jxzdbz;
|
||||
|
||||
/** 绩效及格补助 */
|
||||
@TableField("绩效及格补助")
|
||||
private Double jxjgbz;
|
||||
|
||||
/** 绩效不及格补助 */
|
||||
@TableField("绩效不及格补助")
|
||||
private Double jxbjgbz;
|
||||
|
||||
/** 说明 VARCHAR(500) */
|
||||
@TableField("说明")
|
||||
private String sm;
|
||||
|
||||
/** 备注 VARCHAR(500) */
|
||||
@TableField("备注")
|
||||
private String bz;
|
||||
|
||||
/** 创建时间 */
|
||||
@TableField("创建时间")
|
||||
private LocalDateTime cjsj;
|
||||
|
||||
/** 修改时间 */
|
||||
@TableField("修改时间")
|
||||
private LocalDateTime xgsj;
|
||||
|
||||
@TableField(exist = false)
|
||||
private LocalDateTime createTime;
|
||||
@TableField(exist = false)
|
||||
private LocalDateTime updateTime;
|
||||
@TableField(exist = false)
|
||||
private String createBy;
|
||||
@TableField(exist = false)
|
||||
private String updateBy;
|
||||
@TableField(exist = false)
|
||||
private Integer delFlag;
|
||||
}
|
||||
|
||||
@@ -1,44 +1,35 @@
|
||||
package com.roomroot.jwgl.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.roomroot.jwgl.unit.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 课时统计表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("课时统计表")
|
||||
public class KSTJB extends BaseEntity {
|
||||
public class KSTJB {
|
||||
|
||||
/**
|
||||
* 年份
|
||||
*/
|
||||
private Integer nF;
|
||||
/** 年份 */
|
||||
@TableField("年份")
|
||||
private Integer nf;
|
||||
|
||||
/**
|
||||
* 教员编号
|
||||
*/
|
||||
/** 教员编号 */
|
||||
@TableId(value = "教员编号", type = IdType.INPUT)
|
||||
private String jYBH;
|
||||
private String jybh;
|
||||
|
||||
/**
|
||||
* 上半年
|
||||
*/
|
||||
private Double sBN;
|
||||
/** 上半年 */
|
||||
@TableField("上半年")
|
||||
private Double sbn;
|
||||
|
||||
/**
|
||||
* 下半年
|
||||
*/
|
||||
private Double xBN;
|
||||
|
||||
/**
|
||||
* 职称
|
||||
*/
|
||||
private String zC;
|
||||
/** 下半年 */
|
||||
@TableField("下半年")
|
||||
private Double xbn;
|
||||
|
||||
/** 职称 */
|
||||
@TableField("职称")
|
||||
private String zc;
|
||||
}
|
||||
|
||||
@@ -2,10 +2,9 @@ package com.roomroot.jwgl.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.roomroot.jwgl.unit.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -13,84 +12,67 @@ import java.time.LocalDateTime;
|
||||
* 学员学籍异动申请表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("学员学籍异动申请表")
|
||||
public class XYXJYDSQB extends BaseEntity {
|
||||
public class XYXJYDSQB {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
/** 编号 */
|
||||
@TableId(value = "编号", type = IdType.INPUT)
|
||||
private String bh;
|
||||
|
||||
/**
|
||||
* 学员编号
|
||||
*/
|
||||
/** 学员编号 */
|
||||
@TableField("学员编号")
|
||||
private String xybh;
|
||||
|
||||
/**
|
||||
* 申请类型
|
||||
*/
|
||||
/** 申请类型 */
|
||||
@TableField("申请类型")
|
||||
private String sqlx;
|
||||
|
||||
/**
|
||||
* 事由
|
||||
*/
|
||||
/** 事由 */
|
||||
@TableField("事由")
|
||||
private String sy;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
/** 备注 */
|
||||
@TableField("备注")
|
||||
private String bz;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
/** 状态:0-待审核 1-已审核 2-驳回等 */
|
||||
@TableField("状态")
|
||||
private String zt;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
/** 创建时间 */
|
||||
@TableField("创建时间")
|
||||
private LocalDateTime cjsj;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
/** 修改时间 */
|
||||
@TableField("修改时间")
|
||||
private LocalDateTime xgsj;
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
/** 提交时间 */
|
||||
@TableField("提交时间")
|
||||
private LocalDateTime tjsj;
|
||||
|
||||
/**
|
||||
* 学员队审核意见
|
||||
*/
|
||||
/** 学员队审核意见 */
|
||||
@TableField("学员队审核意见")
|
||||
private String xydshyj;
|
||||
|
||||
/**
|
||||
* 学员队干部编号
|
||||
*/
|
||||
/** 学员队干部编号 */
|
||||
@TableField("学员队干部编号")
|
||||
private String xydgbbh;
|
||||
|
||||
/**
|
||||
* 学员队审核时间
|
||||
*/
|
||||
/** 学员队干部审核时间 */
|
||||
@TableField("学员队干部审核时间")
|
||||
private LocalDateTime xydshsj;
|
||||
|
||||
/**
|
||||
* 管理员审核时间
|
||||
*/
|
||||
/** 管理员审核时间 */
|
||||
@TableField("管理员审核时间")
|
||||
private LocalDateTime glyshsj;
|
||||
|
||||
/**
|
||||
* 管理员审核意见
|
||||
*/
|
||||
/** 管理员审核意见 */
|
||||
@TableField("管理员审核意见")
|
||||
private String glyshyj;
|
||||
|
||||
/**
|
||||
* 管理员账户编号
|
||||
*/
|
||||
/** 管理员账户编号 */
|
||||
@TableField("管理员账户编号")
|
||||
private String glyzhbh;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,55 +2,48 @@ package com.roomroot.jwgl.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.roomroot.jwgl.unit.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学员学籍预警结果表
|
||||
* <p>
|
||||
* 字段与数据库表“学员学籍预警结果表”逐列对应。
|
||||
* </p>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("学员学籍预警结果表")
|
||||
public class XYXJYJJGB extends BaseEntity {
|
||||
public class XYXJYJJGB {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
/** 编号 */
|
||||
@TableId(value = "编号", type = IdType.INPUT)
|
||||
private String bh;
|
||||
|
||||
/**
|
||||
* 年度
|
||||
*/
|
||||
/** 年度 */
|
||||
@TableField("年度")
|
||||
private Integer nd;
|
||||
|
||||
/**
|
||||
* 预警条件编号
|
||||
*/
|
||||
/** 预警条件编号 */
|
||||
@TableField("预警条件编号")
|
||||
private String yjtjbh;
|
||||
|
||||
/**
|
||||
* 学员编号
|
||||
*/
|
||||
/** 学员编号 */
|
||||
@TableField("学员编号")
|
||||
private String xybh;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
/** 创建时间 */
|
||||
@TableField("创建时间")
|
||||
private LocalDateTime cjsj;
|
||||
|
||||
/**
|
||||
* 发布
|
||||
*/
|
||||
/** 发布 */
|
||||
@TableField("发布")
|
||||
private Integer fb;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
/** 发布时间 */
|
||||
@TableField("发布时间")
|
||||
private LocalDateTime fbsj;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,115 +2,96 @@ package com.roomroot.jwgl.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.roomroot.jwgl.unit.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学员学籍预警条件表
|
||||
* <p>
|
||||
* 字段与数据库表“学员学籍预警条件表”逐列对应。
|
||||
* </p>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("学员学籍预警条件表")
|
||||
public class XYXJYJTJB extends BaseEntity {
|
||||
public class XYXJYJTJB {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
/** 编号 */
|
||||
@TableId(value = "编号", type = IdType.INPUT)
|
||||
private String bH;
|
||||
private String bh;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String mC;
|
||||
/** 名称 */
|
||||
@TableField("名称")
|
||||
private String mc;
|
||||
|
||||
/**
|
||||
* 培训类型
|
||||
*/
|
||||
private String pXLX;
|
||||
/** 培训类型 */
|
||||
@TableField("培训类型")
|
||||
private String pxlx;
|
||||
|
||||
/**
|
||||
* 培训层次
|
||||
*/
|
||||
private String pXCC;
|
||||
/** 培训层次 */
|
||||
@TableField("培训层次")
|
||||
private String pxcc;
|
||||
|
||||
/**
|
||||
* 当前学期考试不及格门数上限
|
||||
*/
|
||||
private Integer dQXQKSBJGMSSX;
|
||||
/** 当前学期考试不及格门数上限 */
|
||||
@TableField("当前学期考试不及格门数上限")
|
||||
private Integer dqxqksbjgmssx;
|
||||
|
||||
/**
|
||||
* 当前学期考试不及格门数下限
|
||||
*/
|
||||
private Integer dQXQKSBJGMSXX;
|
||||
/** 当前学期考试不及格门数下限 */
|
||||
@TableField("当前学期考试不及格门数下限")
|
||||
private Integer dqxqksbjgmsxx;
|
||||
|
||||
/**
|
||||
* 当前学期考查不及格门数上限
|
||||
*/
|
||||
private Integer dQXQKCBJGMSSX;
|
||||
/** 当前学期考查不及格门数上限 */
|
||||
@TableField("当前学期考查不及格门数上限")
|
||||
private Integer dqxqkcbjgmssx;
|
||||
|
||||
/**
|
||||
* 当前学期考查不及格门数下限
|
||||
*/
|
||||
private Integer dQXQKCBJGMSXX;
|
||||
/** 当前学期考查不及格门数下限 */
|
||||
@TableField("当前学期考查不及格门数下限")
|
||||
private Integer dqxqkcbjgmsxx;
|
||||
|
||||
/**
|
||||
* 当前学期不及格门数上限
|
||||
*/
|
||||
private Integer dQXQBJGMSSX;
|
||||
/** 当前学期不及格门数上限 */
|
||||
@TableField("当前学期不及格门数上限")
|
||||
private Integer dqxqbjgmssx;
|
||||
|
||||
/**
|
||||
* 当前学期不及格门数下限
|
||||
*/
|
||||
private Integer dQXQBJGMSXX;
|
||||
/** 当前学期不及格门数下限 */
|
||||
@TableField("当前学期不及格门数下限")
|
||||
private Integer dqxqbjgmsxx;
|
||||
|
||||
/**
|
||||
* 全部考试不及格门数上限
|
||||
*/
|
||||
private Integer qBKSBJGMSSX;
|
||||
/** 全部考试不及格门数上限 */
|
||||
@TableField("全部考试不及格门数上限")
|
||||
private Integer qbksbjgmssx;
|
||||
|
||||
/**
|
||||
* 全部考试不及格门数下限
|
||||
*/
|
||||
private Integer qBKSBJGMSXX;
|
||||
/** 全部考试不及格门数下限 */
|
||||
@TableField("全部考试不及格门数下限")
|
||||
private Integer qbksbjgmsxx;
|
||||
|
||||
/**
|
||||
* 全部考查不及格门数上限
|
||||
*/
|
||||
private Integer qBKCBJGMSSX;
|
||||
/** 全部考查不及格门数上限 */
|
||||
@TableField("全部考查不及格门数上限")
|
||||
private Integer qbkcbjgmssx;
|
||||
|
||||
/**
|
||||
* 全部考查不及格门数下限
|
||||
*/
|
||||
private Integer qBKCBJGMSXX;
|
||||
/** 全部考查不及格门数下限 */
|
||||
@TableField("全部考查不及格门数下限")
|
||||
private Integer qbkcbjgmsxx;
|
||||
|
||||
/**
|
||||
* 全部不及格门数上限
|
||||
*/
|
||||
private Integer qBBJGMSSX;
|
||||
/** 全部不及格门数上限 */
|
||||
@TableField("全部不及格门数上限")
|
||||
private Integer qbbjgmssx;
|
||||
|
||||
/**
|
||||
* 全部不及格门数下限
|
||||
*/
|
||||
private Integer qBBJGMSXX;
|
||||
/** 全部不及格门数下限 */
|
||||
@TableField("全部不及格门数下限")
|
||||
private Integer qbbjgmsxx;
|
||||
|
||||
/**
|
||||
* 停用
|
||||
*/
|
||||
private Boolean tY;
|
||||
/** 停用 */
|
||||
@TableField("停用")
|
||||
private Integer ty;
|
||||
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
private String bB;
|
||||
/** 版本 */
|
||||
@TableField("版本")
|
||||
private String bb;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private LocalDateTime xGSJ;
|
||||
/** 修改时间 */
|
||||
@TableField("修改时间")
|
||||
private LocalDateTime xgsj;
|
||||
|
||||
}
|
||||
|
||||
@@ -117,17 +117,17 @@ public class XYXX {
|
||||
@TableField("身份证号")
|
||||
private String sfzh;
|
||||
|
||||
/** 退学状态 */
|
||||
/** 退学状态 0在读 1退学 */
|
||||
@TableField("退学状态")
|
||||
private String txzt;
|
||||
private Integer txzt;
|
||||
|
||||
/** 留级状态 */
|
||||
@TableField("留级状态")
|
||||
private String ljzt;
|
||||
@TableField("留级状态 0 1留级")
|
||||
private Integer ljzt;
|
||||
|
||||
/** 分班状态 */
|
||||
@TableField("分班状态")
|
||||
private String fbzt;
|
||||
private Integer fbzt;
|
||||
|
||||
/** 论文编号 */
|
||||
@TableField("论文编号")
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.roomroot.jwgl.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@@ -20,8 +21,8 @@ import java.time.LocalDateTime;
|
||||
@TableName("专业表")
|
||||
public class ZYB {
|
||||
|
||||
/** 专业代号(主键) */
|
||||
@TableId(value = "专业代号", type = IdType.AUTO)
|
||||
/** 专业代号 VARCHAR(50),主键,非自增 */
|
||||
@TableId(value = "专业代号", type = IdType.INPUT)
|
||||
private String zydh;
|
||||
|
||||
/** 专业名称 */
|
||||
@@ -100,8 +101,8 @@ public class ZYB {
|
||||
@TableField("专业标识号")
|
||||
private String zybsh;
|
||||
|
||||
/** 序号标识 */
|
||||
@TableField("序号标识")
|
||||
/** 序号标识 IDENTITY(1000,1),插入/更新时由数据库生成 */
|
||||
@TableField(value = "序号标识", insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
||||
private Integer xhbs;
|
||||
|
||||
/** 简称 */
|
||||
@@ -116,8 +117,8 @@ public class ZYB {
|
||||
@TableField("系统模式")
|
||||
private String xtms;
|
||||
|
||||
/** json字典 */
|
||||
@TableField("JSONZD")
|
||||
/** json字典 NVARCHAR(4000) */
|
||||
@TableField("json字典")
|
||||
private String jsonzd;
|
||||
|
||||
/** 主干专业 */
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?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.roomroot.mapper.FZQZBZMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.roomroot.jwgl.entity.FZQZBZ">
|
||||
<result column="编号" property="bH" />
|
||||
<result column="序号" property="xH" />
|
||||
<result column="名称" property="mC" />
|
||||
<result column="创建时间" property="cJSJ" />
|
||||
<result column="停用状态" property="tYZT" />
|
||||
<result column="备注" property="bZ" />
|
||||
<result column="停用时间" property="tYSJ" />
|
||||
<result column="说明" property="sM" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
编号, 序号, 名称, 创建时间, 停用状态, 备注, 停用时间, 说明
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -1,90 +0,0 @@
|
||||
<?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.roomroot.mapper.FZQZBZQZGZMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.roomroot.jwgl.entity.FZQZBZQZGZ">
|
||||
<result column="编号" property="bh" />
|
||||
<result column="序号" property="xh" />
|
||||
<result column="分值权重标准编号" property="fzqzbzbh" />
|
||||
<result column="名称" property="mc" />
|
||||
<result column="详细信息" property="xxxx" />
|
||||
<result column="权值" property="qz" />
|
||||
<result column="备注" property="bz" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
编号, 序号, 分值权重标准编号, 名称, 详细信息, 权值, 备注
|
||||
</sql>
|
||||
|
||||
<select id="selectAllScoreWeightRules" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM 分值权重标准_权重规则
|
||||
</select>
|
||||
|
||||
<select id="selectScoreWeightRulesByStandardId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM 分值权重标准_权重规则
|
||||
WHERE 分值权重标准编号 = #{standardId}
|
||||
</select>
|
||||
|
||||
<select id="selectScoreWeightRuleById" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM 分值权重标准_权重规则
|
||||
WHERE 编号 = #{id}
|
||||
</select>
|
||||
|
||||
<select id="countScoreWeightRuleName" resultType="int">
|
||||
SELECT COUNT(*)
|
||||
FROM 分值权重标准_权重规则
|
||||
WHERE 分值权重标准编号 = #{standardId}
|
||||
AND 名称 = #{name}
|
||||
<if test="excludeId != null">AND 编号 != #{excludeId}</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertScoreWeightRuleIfAbsent">
|
||||
INSERT INTO 分值权重标准_权重规则 (编号, 序号, 分值权重标准编号, 名称, 详细信息, 权值, 备注)
|
||||
SELECT #{rule.bh}, #{rule.xh}, #{rule.fzqzbzbh}, #{rule.mc}, #{rule.xxxx}, #{rule.qz}, #{rule.bz}
|
||||
FROM DUAL
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM 分值权重标准_权重规则
|
||||
WHERE 编号 = #{rule.bh}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateScoreWeightRule">
|
||||
UPDATE 分值权重标准_权重规则
|
||||
SET 序号 = #{rule.xh},
|
||||
分值权重标准编号 = #{rule.fzqzbzbh},
|
||||
名称 = #{rule.mc},
|
||||
详细信息 = #{rule.xxxx},
|
||||
权值 = #{rule.qz},
|
||||
备注 = #{rule.bz}
|
||||
WHERE 编号 = #{rule.bh}
|
||||
</update>
|
||||
|
||||
<select id="countScoreWeightRuleReferences" resultType="int">
|
||||
SELECT COUNT(*)
|
||||
FROM 课程板块测评_评分
|
||||
WHERE 权重规则编号 = #{id}
|
||||
</select>
|
||||
|
||||
<select id="countScoreWeightRuleReferencesByStandardId" resultType="int">
|
||||
SELECT COUNT(*)
|
||||
FROM 分值权重标准_权重规则
|
||||
WHERE 分值权重标准编号 = #{standardId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteScoreWeightRulesByStandardId">
|
||||
DELETE FROM 分值权重标准_权重规则
|
||||
WHERE 分值权重标准编号 = #{standardId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteScoreWeightRuleById">
|
||||
DELETE FROM 分值权重标准_权重规则
|
||||
WHERE 编号 = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?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.roomroot.mapper.FZZHGZBZCPJGYSMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.roomroot.jwgl.entity.FZZHGZBZCPJGYS">
|
||||
<result column="编号" property="bH" />
|
||||
<result column="名称" property="mC" />
|
||||
<result column="备注" property="bZ" />
|
||||
<result column="序号" property="xH" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
编号, 名称, 备注, 序号
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -1,21 +0,0 @@
|
||||
<?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.roomroot.mapper.JCSJBMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.roomroot.jwgl.entity.JCSJB">
|
||||
<result column="编号" property="bh" />
|
||||
<result column="双节次" property="sjc" />
|
||||
<result column="节次索引" property="jcsy" />
|
||||
<result column="开始时间" property="kssj" />
|
||||
<result column="结束时间" property="jssj" />
|
||||
<result column="备注" property="bz" />
|
||||
<result column="名称" property="mc" />
|
||||
<result column="简称" property="jc" />
|
||||
<result column="时段" property="sd" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
编号, 双节次, 节次索引, 开始时间, 结束时间, 备注, 名称, 简称, 时段
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?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.roomroot.mapper.JSZWMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.roomroot.jwgl.entity.JSZW">
|
||||
<result column="编号" property="bH" />
|
||||
<result column="代码" property="dM" />
|
||||
<result column="名称" property="mC" />
|
||||
<result column="备注" property="bZ" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
编号, 代码, 名称, 备注
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.roomroot.jwgl.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.roomroot.jwgl.entity.KSB;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 考试表 Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface KSBMapper extends BaseMapper<KSB> {
|
||||
}
|
||||
@@ -1,12 +1,33 @@
|
||||
package com.roomroot.jwgl.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.roomroot.jwgl.dto.ks.HourStatisticsQuery;
|
||||
import com.roomroot.jwgl.entity.KSTJB;
|
||||
import com.roomroot.jwgl.vo.ks.HourStatisticsVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 课时统计表 Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface KSTJBMapper extends BaseMapper<KSTJB> {
|
||||
|
||||
/**
|
||||
* 按教研室、教员、课时统计表联查课时数据。
|
||||
*
|
||||
* @param page 分页
|
||||
* @param cond 年份、教员姓名、教员编号
|
||||
* @return 分页结果
|
||||
*/
|
||||
Page<HourStatisticsVO> selectHourStatistics(Page<HourStatisticsVO> page,
|
||||
@Param("cond") HourStatisticsQuery cond);
|
||||
|
||||
/**
|
||||
* 导出用:不分页查询课时统计联查结果。
|
||||
*/
|
||||
List<HourStatisticsVO> selectHourStatisticsList(@Param("cond") HourStatisticsQuery cond);
|
||||
}
|
||||
|
||||
@@ -3,15 +3,64 @@
|
||||
<mapper namespace="com.roomroot.jwgl.mapper.KSTJBMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.roomroot.jwgl.entity.KSTJB">
|
||||
<result column="年份" property="nF" />
|
||||
<result column="教员编号" property="jYBH" />
|
||||
<result column="上半年" property="sBN" />
|
||||
<result column="下半年" property="xBN" />
|
||||
<result column="职称" property="zC" />
|
||||
<result column="年份" property="nf" />
|
||||
<result column="教员编号" property="jybh" />
|
||||
<result column="上半年" property="sbn" />
|
||||
<result column="下半年" property="xbn" />
|
||||
<result column="职称" property="zc" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
年份, 教员编号, 上半年, 下半年, 职称
|
||||
<resultMap id="HourStatisticsResultMap" type="com.roomroot.jwgl.vo.ks.HourStatisticsVO">
|
||||
<result column="jysdh" property="jysdh" />
|
||||
<result column="jysmc" property="jysmc" />
|
||||
<result column="jybh" property="jybh" />
|
||||
<result column="jyxm" property="jyxm" />
|
||||
<result column="zc" property="zc" />
|
||||
<result column="nf" property="nf" />
|
||||
<result column="sbn" property="sbn" />
|
||||
<result column="xbn" property="xbn" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="HourStatisticsFromWhere">
|
||||
FROM "教研室表" jys
|
||||
INNER JOIN "教员表" j ON jys."教研室代号" = j."教研室代号"
|
||||
INNER JOIN "课时统计表" c ON j."教员编号" = c."教员编号"
|
||||
<where>
|
||||
<if test="cond != null and cond.nd != null">
|
||||
AND c."年份" = #{cond.nd}
|
||||
</if>
|
||||
<if test="cond != null and cond.jyxm != null and cond.jyxm != ''">
|
||||
AND j."教员姓名" LIKE CONCAT('%', #{cond.jyxm}, '%')
|
||||
</if>
|
||||
<if test="cond != null and cond.jybh != null and cond.jybh != ''">
|
||||
AND j."教员编号" = #{cond.jybh}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<sql id="HourStatisticsColumns">
|
||||
jys."教研室代号" AS jysdh,
|
||||
jys."教研室名称" AS jysmc,
|
||||
j."教员编号" AS jybh,
|
||||
j."教员姓名" AS jyxm,
|
||||
COALESCE(c."职称", j."职称") AS zc,
|
||||
c."年份" AS nf,
|
||||
COALESCE(c."上半年", 0) AS sbn,
|
||||
COALESCE(c."下半年", 0) AS xbn
|
||||
</sql>
|
||||
|
||||
<select id="selectHourStatistics" resultMap="HourStatisticsResultMap">
|
||||
SELECT
|
||||
<include refid="HourStatisticsColumns"/>
|
||||
<include refid="HourStatisticsFromWhere"/>
|
||||
ORDER BY jys."教研室代号", j."教员编号"
|
||||
</select>
|
||||
|
||||
<select id="selectHourStatisticsList" resultMap="HourStatisticsResultMap">
|
||||
SELECT
|
||||
<include refid="HourStatisticsColumns"/>
|
||||
<include refid="HourStatisticsFromWhere"/>
|
||||
ORDER BY jys."教研室代号", j."教员编号"
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
<?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.roomroot.mapper.KTJXFFMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.roomroot.jwgl.entity.KTJXFF">
|
||||
<result column="名称" property="mC" />
|
||||
<result column="日课表序号" property="rKBXH" />
|
||||
<result column="显示颜色" property="xSYS" />
|
||||
<result column="背景颜色" property="bJYS" />
|
||||
<result column="考核" property="kH" />
|
||||
<result column="讲授方式" property="jSFS" />
|
||||
<result column="需审批" property="xSP" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
名称, 日课表序号, 显示颜色, 背景颜色, 考核, 讲授方式, 需审批
|
||||
</sql>
|
||||
|
||||
<select id="selectAllTeachingMethods" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM 课堂教学方法
|
||||
ORDER BY 日课表序号 ASC, 名称 ASC
|
||||
</select>
|
||||
|
||||
<select id="selectTeachingMethodByName" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM 课堂教学方法
|
||||
WHERE 名称 = #{name}
|
||||
</select>
|
||||
|
||||
<select id="countTeachingMethodName" resultType="int">
|
||||
SELECT COUNT(1)
|
||||
FROM 课堂教学方法
|
||||
WHERE 名称 = #{name}
|
||||
<if test="excludeName != null and excludeName != ''">
|
||||
AND 名称 != #{excludeName}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertTeachingMethodIfAbsent">
|
||||
INSERT INTO 课堂教学方法 (
|
||||
名称, 日课表序号, 显示颜色, 背景颜色,
|
||||
考核, 讲授方式, 需审批
|
||||
)
|
||||
SELECT
|
||||
#{teachingMethod.mC}, #{teachingMethod.rKBXH},
|
||||
#{teachingMethod.xSYS}, #{teachingMethod.bJYS},
|
||||
#{teachingMethod.kH}, #{teachingMethod.jSFS},
|
||||
#{teachingMethod.xSP}
|
||||
FROM DUAL
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM 课堂教学方法
|
||||
WHERE 名称 = #{teachingMethod.mC}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateTeachingMethod">
|
||||
UPDATE 课堂教学方法
|
||||
SET 名称 = #{teachingMethod.mC},
|
||||
日课表序号 = #{teachingMethod.rKBXH},
|
||||
显示颜色 = #{teachingMethod.xSYS},
|
||||
背景颜色 = #{teachingMethod.bJYS},
|
||||
考核 = #{teachingMethod.kH},
|
||||
讲授方式 = #{teachingMethod.jSFS},
|
||||
需审批 = #{teachingMethod.xSP}
|
||||
WHERE 名称 = #{originalName}
|
||||
</update>
|
||||
|
||||
<select id="countTeachingMethodReferences" resultType="int">
|
||||
SELECT NVL(SUM(T.引用数), 0)
|
||||
FROM (
|
||||
SELECT COUNT(1) AS 引用数
|
||||
FROM 课堂教学方法课时系数
|
||||
WHERE 课堂教学方法名称 = #{name}
|
||||
UNION ALL
|
||||
SELECT COUNT(1) AS 引用数
|
||||
FROM 导入数据表_教学实施计划
|
||||
WHERE 教学方法 = #{name}
|
||||
UNION ALL
|
||||
SELECT COUNT(1) AS 引用数
|
||||
FROM 课堂标准
|
||||
WHERE 教学方法 = #{name}
|
||||
UNION ALL
|
||||
SELECT COUNT(1) AS 引用数
|
||||
FROM 实施_课程表
|
||||
WHERE 教学方法 = #{name}
|
||||
UNION ALL
|
||||
SELECT COUNT(1) AS 引用数
|
||||
FROM 实施_调课申请
|
||||
WHERE 教学方法 = #{name}
|
||||
UNION ALL
|
||||
SELECT COUNT(1) AS 引用数
|
||||
FROM 班次课堂教学日志
|
||||
WHERE 教学方法 = #{name}
|
||||
) T
|
||||
</select>
|
||||
|
||||
<delete id="deleteTeachingMethodByName">
|
||||
DELETE FROM 课堂教学方法
|
||||
WHERE 名称 = #{name}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -67,7 +67,6 @@
|
||||
|
||||
<select id="selectTeachingLogList" resultMap="TeachingLogResultMap">
|
||||
SELECT <include refid="Full_Columns" />
|
||||
|
||||
FROM "实施_课程表_日志" r
|
||||
LEFT JOIN "教员表" j ON j."教员编号" = r."教员编号"
|
||||
LEFT JOIN "课表" k ON k."课编号" = r."课程科目编号"
|
||||
|
||||
@@ -3,25 +3,25 @@
|
||||
<mapper namespace="com.roomroot.jwgl.mapper.XYXJYJTJBMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.roomroot.jwgl.entity.XYXJYJTJB">
|
||||
<result column="编号" property="bH" />
|
||||
<result column="名称" property="mC" />
|
||||
<result column="培训类型" property="pXLX" />
|
||||
<result column="培训层次" property="pXCC" />
|
||||
<result column="当前学期考试不及格门数上限" property="dQXQKSBJGMSSX" />
|
||||
<result column="当前学期考试不及格门数下限" property="dQXQKSBJGMSXX" />
|
||||
<result column="当前学期考查不及格门数上限" property="dQXQKCBJGMSSX" />
|
||||
<result column="当前学期考查不及格门数下限" property="dQXQKCBJGMSXX" />
|
||||
<result column="当前学期不及格门数上限" property="dQXQBJGMSSX" />
|
||||
<result column="当前学期不及格门数下限" property="dQXQBJGMSXX" />
|
||||
<result column="全部考试不及格门数上限" property="qBKSBJGMSSX" />
|
||||
<result column="全部考试不及格门数下限" property="qBKSBJGMSXX" />
|
||||
<result column="全部考查不及格门数上限" property="qBKCBJGMSSX" />
|
||||
<result column="全部考查不及格门数下限" property="qBKCBJGMSXX" />
|
||||
<result column="全部不及格门数上限" property="qBBJGMSSX" />
|
||||
<result column="全部不及格门数下限" property="qBBJGMSXX" />
|
||||
<result column="停用" property="tY" />
|
||||
<result column="版本" property="bB" />
|
||||
<result column="修改时间" property="xGSJ" />
|
||||
<result column="编号" property="bh" />
|
||||
<result column="名称" property="mc" />
|
||||
<result column="培训类型" property="pxlx" />
|
||||
<result column="培训层次" property="pxcc" />
|
||||
<result column="当前学期考试不及格门数上限" property="dqxqksbjgmssx" />
|
||||
<result column="当前学期考试不及格门数下限" property="dqxqksbjgmsxx" />
|
||||
<result column="当前学期考查不及格门数上限" property="dqxqkcbjgmssx" />
|
||||
<result column="当前学期考查不及格门数下限" property="dqxqkcbjgmsxx" />
|
||||
<result column="当前学期不及格门数上限" property="dqxqbjgmssx" />
|
||||
<result column="当前学期不及格门数下限" property="dqxqbjgmsxx" />
|
||||
<result column="全部考试不及格门数上限" property="qbksbjgmssx" />
|
||||
<result column="全部考试不及格门数下限" property="qbksbjgmsxx" />
|
||||
<result column="全部考查不及格门数上限" property="qbkcbjgmssx" />
|
||||
<result column="全部考查不及格门数下限" property="qbkcbjgmsxx" />
|
||||
<result column="全部不及格门数上限" property="qbbjgmssx" />
|
||||
<result column="全部不及格门数下限" property="qbbjgmsxx" />
|
||||
<result column="停用" property="ty" />
|
||||
<result column="版本" property="bb" />
|
||||
<result column="修改时间" property="xgsj" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<result column="简称" property="jc" />
|
||||
<result column="节次类别" property="jclb" />
|
||||
<result column="系统模式" property="xtms" />
|
||||
<result column="JSONZD" property="jsonzd" />
|
||||
<result column="json字典" property="jsonzd" />
|
||||
<result column="主干专业" property="zgzy" />
|
||||
<result column="规范名称" property="gfmc" />
|
||||
<result column="教学大纲编号" property="jxdgbh" />
|
||||
@@ -41,7 +41,7 @@
|
||||
专业代号, 专业名称, 专业方向, 学年制, 学期数, 专业备注, 专业规范, 专业代码, 专业版本,
|
||||
停用, 启用时间, 停用时间, 教学管理机构编号, 培训层次, 培训类型, 学科专业信息标识号,
|
||||
培训类型2, 学员类别, 自定义分类, 专业标识号, 序号标识, 简称, 节次类别, 系统模式,
|
||||
JSONZD, 主干专业, 规范名称, 教学大纲编号, 人培编号, 培养目标
|
||||
json字典, 主干专业, 规范名称, 教学大纲编号, 人培编号, 培养目标
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询专业表列表(支持条件筛选) -->
|
||||
|
||||
+40
-2
@@ -1,6 +1,7 @@
|
||||
package com.roomroot.jwgl.service;
|
||||
|
||||
import com.roomroot.jwgl.entity.XKZYXX;
|
||||
import com.roomroot.jwgl.entity.ZYB;
|
||||
import com.roomroot.jwgl.unit.PageQuery;
|
||||
import com.roomroot.jwgl.unit.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -8,8 +9,7 @@ import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 学科专业管理服务接口
|
||||
* <p>
|
||||
* 提供学科、专业的增加、删除(逻辑删除)、更新、分页查询等功能。
|
||||
* 对应数据表:学科专业信息
|
||||
* 学科目录对应表:学科专业信息;专业对应表:专业表。
|
||||
* </p>
|
||||
*/
|
||||
@Service
|
||||
@@ -51,4 +51,42 @@ public interface DisciplineService {
|
||||
* @return 分页结果
|
||||
*/
|
||||
PageResult<XKZYXX> pageList(PageQuery query, XKZYXX xkzyxx);
|
||||
|
||||
/**
|
||||
* 新增专业
|
||||
*
|
||||
* @param entity 专业表实体
|
||||
*/
|
||||
void addMajor(ZYB entity);
|
||||
|
||||
/**
|
||||
* 停用(逻辑删除)专业
|
||||
*
|
||||
* @param zydh 专业代号
|
||||
*/
|
||||
void deleteMajor(String zydh);
|
||||
|
||||
/**
|
||||
* 更新专业
|
||||
*
|
||||
* @param entity 专业表实体(须含专业代号)
|
||||
*/
|
||||
void updateMajor(ZYB entity);
|
||||
|
||||
/**
|
||||
* 按专业代号查询专业
|
||||
*
|
||||
* @param zydh 专业代号
|
||||
* @return 专业表实体
|
||||
*/
|
||||
ZYB getMajorById(String zydh);
|
||||
|
||||
/**
|
||||
* 分页查询专业
|
||||
*
|
||||
* @param query 分页参数
|
||||
* @param cond 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
PageResult<ZYB> pageMajor(PageQuery query, ZYB cond);
|
||||
}
|
||||
|
||||
+75
-2
@@ -1,10 +1,15 @@
|
||||
package com.roomroot.jwgl.service;
|
||||
|
||||
import com.roomroot.jwgl.entity.XYXX;
|
||||
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.unit.PageQuery;
|
||||
import com.roomroot.jwgl.unit.PageResult;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
@@ -36,8 +41,6 @@ public interface StudentRecordsService {
|
||||
/** 学籍异动——留级 */
|
||||
void retainGrade(String bh);
|
||||
|
||||
/** 学籍异动——降级 */
|
||||
void downgrade(String bh);
|
||||
|
||||
/** 学籍异动——退学 */
|
||||
void dropOut(String bh);
|
||||
@@ -54,4 +57,74 @@ public interface StudentRecordsService {
|
||||
|
||||
/** 导出学员课程成绩 Excel */
|
||||
void exportGradesExcel(String xybh, HttpServletResponse response);
|
||||
|
||||
/** 导出学员课程过程成绩 Excel */
|
||||
void exportProcessGradesExcel(String xybh, HttpServletResponse response);
|
||||
|
||||
// ========== 学员学籍异动申请 ==========
|
||||
|
||||
/** 新增学员学籍异动申请(后台自动写入创建时间、修改时间,状态默认待审核) */
|
||||
void addApplication(XYXJYDSQB entity);
|
||||
|
||||
/** 删除学员学籍异动申请 */
|
||||
void deleteApplication(String bh);
|
||||
|
||||
/** 修改学员学籍异动申请(后台自动更新修改时间) */
|
||||
void updateApplication(XYXJYDSQB entity);
|
||||
|
||||
/** 查询学员学籍异动申请详情 */
|
||||
XYXJYDSQB getApplicationById(String bh);
|
||||
|
||||
/** 分页查询学员学籍异动申请列表 */
|
||||
PageResult<XYXJYDSQB> pageApplication(PageQuery query, XYXJYDSQB cond);
|
||||
|
||||
// ========== 学员学籍预警条件管理 ==========
|
||||
|
||||
/** 新增学员学籍预警条件(后台自动写入修改时间) */
|
||||
void addWarningCondition(XYXJYJTJB entity);
|
||||
|
||||
/** 修改学员学籍预警条件(后台自动更新修改时间) */
|
||||
void updateWarningCondition(XYXJYJTJB entity);
|
||||
|
||||
/** 查询学员学籍预警条件详情 */
|
||||
XYXJYJTJB getWarningConditionById(String bh);
|
||||
|
||||
/** 分页查询学员学籍预警条件列表 */
|
||||
PageResult<XYXJYJTJB> pageWarningCondition(PageQuery query, XYXJYJTJB cond);
|
||||
|
||||
// ========== 学员学籍预警结果管理 ==========
|
||||
|
||||
/** 查询学员学籍预警结果详情 */
|
||||
XYXJYJJGB getWarningResultById(String bh);
|
||||
|
||||
/** 分页查询学员学籍预警结果列表(查看是否有学员触发预警条件) */
|
||||
PageResult<XYXJYJJGB> pageWarningResult(PageQuery query, XYXJYJJGB cond);
|
||||
|
||||
// ========== 班次管理(学员队表 XYDB)==========
|
||||
|
||||
/** 新增班次(学员队) */
|
||||
void addTeam(XYDB entity);
|
||||
|
||||
/** 删除班次(学员队) */
|
||||
void deleteTeam(String xydbh);
|
||||
|
||||
/** 修改班次(学员队) */
|
||||
void updateTeam(XYDB entity);
|
||||
|
||||
/** 根据学员队编号查询班次(学员队) */
|
||||
XYDB getTeamById(String xydbh);
|
||||
|
||||
/** 分页条件查询班次(学员队)列表 */
|
||||
PageResult<XYDB> pageTeam(PageQuery query, XYDB cond);
|
||||
|
||||
/** 从 Excel(.xls/.xlsx) 导入班次(学员队)数据 */
|
||||
int importTeam(MultipartFile file) throws Exception;
|
||||
|
||||
/** 导出班次(学员队)数据到 Excel(.xls) */
|
||||
void exportTeam(XYDB cond, HttpServletResponse response) throws Exception;
|
||||
|
||||
// ========== 学员信息批量导入 ==========
|
||||
|
||||
/** 从 Excel(.xls/.xlsx) 批量导入学员信息 */
|
||||
int importStudents(MultipartFile file) throws Exception;
|
||||
}
|
||||
|
||||
+194
-2
@@ -2,23 +2,33 @@ package com.roomroot.jwgl.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.roomroot.common.exception.ServiceException;
|
||||
import com.roomroot.common.utils.StringUtils;
|
||||
import com.roomroot.jwgl.entity.XKZYXX;
|
||||
import com.roomroot.jwgl.entity.ZYB;
|
||||
import com.roomroot.jwgl.mapper.XKZYXXMapper;
|
||||
import com.roomroot.jwgl.mapper.ZYBMapper;
|
||||
import com.roomroot.jwgl.service.DisciplineService;
|
||||
import com.roomroot.jwgl.unit.PageQuery;
|
||||
import com.roomroot.jwgl.unit.PageResult;
|
||||
import com.roomroot.jwgl.utils.UuidUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import static com.roomroot.jwgl.utils.BasicManagementConstants.BAD_REQUEST;
|
||||
import static com.roomroot.jwgl.utils.BasicManagementConstants.CONFLICT;
|
||||
import static com.roomroot.jwgl.utils.BasicManagementConstants.NOT_FOUND;
|
||||
|
||||
/**
|
||||
* 学科专业管理服务实现类
|
||||
* <p>
|
||||
* 实现学科、专业的增加、删除(逻辑删除)、更新、分页查询等功能。
|
||||
* 逻辑删除将 停用 字段置为 1(停用=0为启用,停用=1为已停用/删除)。
|
||||
* 学科目录对应表:学科专业信息;专业对应表:专业表。
|
||||
* 专业删除为逻辑删除(停用=true)。
|
||||
* </p>
|
||||
*/
|
||||
@Service
|
||||
@@ -27,6 +37,9 @@ public class DisciplineServiceImpl implements DisciplineService {
|
||||
@Resource
|
||||
private XKZYXXMapper xkzyxxMapper;
|
||||
|
||||
@Resource
|
||||
private ZYBMapper zybMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void add(XKZYXX entity) {
|
||||
@@ -66,4 +79,183 @@ public class DisciplineServiceImpl implements DisciplineService {
|
||||
return new PageResult<>(result.getRecords(), result.getTotal(),
|
||||
query.getPageNum(), query.getPageSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void addMajor(ZYB entity) {
|
||||
if (entity == null) {
|
||||
throw new ServiceException("专业信息不能为空", BAD_REQUEST);
|
||||
}
|
||||
validateMajor(entity, true);
|
||||
if (StringUtils.isEmpty(entity.getZydh())) {
|
||||
entity.setZydh(UuidUtil.getOriginalUUID());
|
||||
}
|
||||
assertMajorCodeUnique(entity.getZydh());
|
||||
fillMajorDefaults(entity);
|
||||
zybMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteMajor(String zydh) {
|
||||
if (StringUtils.isEmpty(zydh)) {
|
||||
throw new ServiceException("专业代号不能为空", BAD_REQUEST);
|
||||
}
|
||||
ZYB existing = zybMapper.selectById(zydh);
|
||||
if (existing == null) {
|
||||
throw new ServiceException("专业不存在", NOT_FOUND);
|
||||
}
|
||||
if (Boolean.TRUE.equals(existing.getTy())) {
|
||||
return;
|
||||
}
|
||||
ZYB update = new ZYB();
|
||||
update.setZydh(zydh);
|
||||
update.setTy(true);
|
||||
update.setTysj(LocalDateTime.now());
|
||||
zybMapper.updateById(update);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateMajor(ZYB entity) {
|
||||
if (entity == null || StringUtils.isEmpty(entity.getZydh())) {
|
||||
throw new ServiceException("专业代号不能为空", BAD_REQUEST);
|
||||
}
|
||||
validateMajor(entity, false);
|
||||
ZYB existing = zybMapper.selectById(entity.getZydh());
|
||||
if (existing == null) {
|
||||
throw new ServiceException("专业不存在", NOT_FOUND);
|
||||
}
|
||||
entity.setQysj(existing.getQysj());
|
||||
if (Boolean.TRUE.equals(entity.getTy()) && !Boolean.TRUE.equals(existing.getTy())) {
|
||||
entity.setTysj(LocalDateTime.now());
|
||||
}
|
||||
if (Boolean.FALSE.equals(entity.getTy())) {
|
||||
entity.setTysj(null);
|
||||
}
|
||||
zybMapper.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZYB getMajorById(String zydh) {
|
||||
if (StringUtils.isEmpty(zydh)) {
|
||||
throw new ServiceException("专业代号不能为空", BAD_REQUEST);
|
||||
}
|
||||
return zybMapper.selectById(zydh);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ZYB> pageMajor(PageQuery query, ZYB cond) {
|
||||
int pageNum = query.getPageNum() == null ? 1 : query.getPageNum();
|
||||
int pageSize = query.getPageSize() == null ? 20 : query.getPageSize();
|
||||
Page<ZYB> page = new Page<>(pageNum, pageSize);
|
||||
LambdaQueryWrapper<ZYB> wrapper = new LambdaQueryWrapper<>();
|
||||
if (cond != null) {
|
||||
wrapper.like(StringUtils.isNotEmpty(cond.getZymc()), ZYB::getZymc, cond.getZymc());
|
||||
wrapper.like(StringUtils.isNotEmpty(cond.getZyfx()), ZYB::getZyfx, cond.getZyfx());
|
||||
wrapper.like(StringUtils.isNotEmpty(cond.getZydm()), ZYB::getZydm, cond.getZydm());
|
||||
wrapper.eq(StringUtils.isNotEmpty(cond.getPxlx()), ZYB::getPxlx, cond.getPxlx());
|
||||
wrapper.eq(StringUtils.isNotEmpty(cond.getPxcc()), ZYB::getPxcc, cond.getPxcc());
|
||||
wrapper.eq(StringUtils.isNotEmpty(cond.getPxlx2()), ZYB::getPxlx2, cond.getPxlx2());
|
||||
wrapper.eq(StringUtils.isNotEmpty(cond.getXnz()), ZYB::getXnz, cond.getXnz());
|
||||
wrapper.eq(StringUtils.isNotEmpty(cond.getXkzyxxbsh()), ZYB::getXkzyxxbsh, cond.getXkzyxxbsh());
|
||||
wrapper.eq(cond.getTy() != null, ZYB::getTy, cond.getTy());
|
||||
}
|
||||
wrapper.orderByAsc(ZYB::getXhbs);
|
||||
Page<ZYB> result = zybMapper.selectPage(page, wrapper);
|
||||
return new PageResult<>(result.getRecords(), result.getTotal(), pageNum, pageSize);
|
||||
}
|
||||
|
||||
private void fillMajorDefaults(ZYB entity) {
|
||||
if (entity.getTy() == null) {
|
||||
entity.setTy(false);
|
||||
}
|
||||
if (entity.getQysj() == null && !Boolean.TRUE.equals(entity.getTy())) {
|
||||
entity.setQysj(LocalDateTime.now());
|
||||
}
|
||||
if (Boolean.TRUE.equals(entity.getTy()) && entity.getTysj() == null) {
|
||||
entity.setTysj(LocalDateTime.now());
|
||||
}
|
||||
if (entity.getZgzy() == null) {
|
||||
entity.setZgzy(false);
|
||||
}
|
||||
if (StringUtils.isEmpty(entity.getZybsh())) {
|
||||
entity.setZybsh(entity.getZydh());
|
||||
}
|
||||
if (StringUtils.isEmpty(entity.getGfmc())) {
|
||||
entity.setGfmc(entity.getZymc());
|
||||
}
|
||||
if (entity.getZybb() == null) {
|
||||
entity.setZybb("");
|
||||
}
|
||||
if (entity.getPxlx2() == null) {
|
||||
entity.setPxlx2("");
|
||||
}
|
||||
if (entity.getXylb() == null) {
|
||||
entity.setXylb("");
|
||||
}
|
||||
if (entity.getZdyfl() == null) {
|
||||
entity.setZdyfl("");
|
||||
}
|
||||
if (entity.getJclb() == null) {
|
||||
entity.setJclb("");
|
||||
}
|
||||
if (entity.getXtms() == null) {
|
||||
entity.setXtms("");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateMajor(ZYB entity, boolean creating) {
|
||||
if (creating) {
|
||||
requireText(entity.getZymc(), "专业名称");
|
||||
requireText(entity.getZydm(), "专业代码");
|
||||
requireText(entity.getXnz(), "学年制");
|
||||
if (entity.getXqs() == null) {
|
||||
throw new ServiceException("学期数不能为空", BAD_REQUEST);
|
||||
}
|
||||
requireText(entity.getPxcc(), "培训层次");
|
||||
requireText(entity.getPxlx(), "培训类型");
|
||||
}
|
||||
assertMaxLength(entity.getZydh(), 50, "专业代号");
|
||||
assertMaxLength(entity.getZymc(), 250, "专业名称");
|
||||
assertMaxLength(entity.getZyfx(), 50, "专业方向");
|
||||
assertMaxLength(entity.getXnz(), 50, "学年制");
|
||||
assertMaxLength(entity.getZybz(), 100, "专业备注");
|
||||
assertMaxLength(entity.getZydm(), 50, "专业代码");
|
||||
assertMaxLength(entity.getZybb(), 50, "专业版本");
|
||||
assertMaxLength(entity.getJxgljgbh(), 50, "教学管理机构编号");
|
||||
assertMaxLength(entity.getPxcc(), 50, "培训层次");
|
||||
assertMaxLength(entity.getPxlx(), 50, "培训类型");
|
||||
assertMaxLength(entity.getXkzyxxbsh(), 50, "学科专业信息标识号");
|
||||
assertMaxLength(entity.getPxlx2(), 50, "培训类型2");
|
||||
assertMaxLength(entity.getXylb(), 50, "学员类别");
|
||||
assertMaxLength(entity.getZdyfl(), 50, "自定义分类");
|
||||
assertMaxLength(entity.getZybsh(), 50, "专业标识号");
|
||||
assertMaxLength(entity.getJc(), 50, "简称");
|
||||
assertMaxLength(entity.getJclb(), 50, "节次类别");
|
||||
assertMaxLength(entity.getXtms(), 50, "系统模式");
|
||||
assertMaxLength(entity.getJsonzd(), 4000, "json字典");
|
||||
assertMaxLength(entity.getGfmc(), 250, "规范名称");
|
||||
assertMaxLength(entity.getPymb(), 500, "培养目标");
|
||||
}
|
||||
|
||||
private void requireText(String value, String fieldName) {
|
||||
if (StringUtils.isEmpty(value)) {
|
||||
throw new ServiceException(fieldName + "不能为空", BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
|
||||
private void assertMaxLength(String value, int max, String fieldName) {
|
||||
if (value != null && value.length() > max) {
|
||||
throw new ServiceException(fieldName + "长度不能超过" + max + "个字符", BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
|
||||
private void assertMajorCodeUnique(String zydh) {
|
||||
Long count = zybMapper.selectCount(
|
||||
new LambdaQueryWrapper<ZYB>().eq(ZYB::getZydh, zydh));
|
||||
if (count != null && count > 0) {
|
||||
throw new ServiceException("专业代号已存在", CONFLICT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +110,7 @@ public class LogServiceImpl implements LogService {
|
||||
@Transactional
|
||||
public void addLog(SSKCB_RZ entity) {
|
||||
fillNotNullDefaults(entity);
|
||||
entity.setCjsj(LocalDateTime.now());
|
||||
sskcbRzMapper.insert(entity);
|
||||
}
|
||||
|
||||
|
||||
+438
-12
@@ -1,25 +1,44 @@
|
||||
package com.roomroot.jwgl.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.roomroot.jwgl.entity.XYXX;
|
||||
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.mapper.XYXXMapper;
|
||||
import com.roomroot.jwgl.mapper.XYDBMapper;
|
||||
import com.roomroot.jwgl.mapper.XYXJYDSQBMapper;
|
||||
import com.roomroot.jwgl.mapper.XYXJYJJGBMapper;
|
||||
import com.roomroot.jwgl.mapper.XYXJYJTJBMapper;
|
||||
import com.roomroot.jwgl.mapper.XYKCCJMapper;
|
||||
import com.roomroot.jwgl.mapper.XYKCGCCJMapper;
|
||||
import com.roomroot.jwgl.service.StudentRecordsService;
|
||||
import com.roomroot.jwgl.unit.PageQuery;
|
||||
import com.roomroot.jwgl.unit.PageResult;
|
||||
import com.roomroot.jwgl.utils.ExcelParseUtil;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 学员档案管理服务实现类
|
||||
@@ -30,6 +49,18 @@ public class StudentRecordsServiceImpl implements StudentRecordsService {
|
||||
@Resource
|
||||
private XYXXMapper xyxxMapper;
|
||||
|
||||
@Resource
|
||||
private XYDBMapper xydbMapper;
|
||||
|
||||
@Resource
|
||||
private XYXJYDSQBMapper xyxjydsqbMapper;
|
||||
|
||||
@Resource
|
||||
private XYXJYJJGBMapper xyxjyjjgbMapper;
|
||||
|
||||
@Resource
|
||||
private XYXJYJTJBMapper xyxjyjtjbMapper;
|
||||
|
||||
@Resource
|
||||
private XYKCCJMapper xykccjMapper;
|
||||
|
||||
@@ -39,6 +70,9 @@ public class StudentRecordsServiceImpl implements StudentRecordsService {
|
||||
@Override
|
||||
@Transactional
|
||||
public void add(XYXX xyxx) {
|
||||
xyxx.setTxzt(0);
|
||||
xyxx.setLjzt(0);
|
||||
xyxx.setFbzt(0);
|
||||
xyxxMapper.insert(xyxx);
|
||||
}
|
||||
|
||||
@@ -47,7 +81,7 @@ public class StudentRecordsServiceImpl implements StudentRecordsService {
|
||||
public void delete(String bh) {
|
||||
XYXX xyxx = new XYXX();
|
||||
xyxx.setBh(bh);
|
||||
xyxx.setTxzt("退学");
|
||||
xyxx.setTxzt(1);
|
||||
xyxxMapper.updateById(xyxx);
|
||||
}
|
||||
|
||||
@@ -65,35 +99,77 @@ public class StudentRecordsServiceImpl implements StudentRecordsService {
|
||||
@Override
|
||||
public PageResult<XYXX> pageList(PageQuery query, XYXX xyxx) {
|
||||
Page<XYXX> page = new Page<>(query.getPageNum(), query.getPageSize());
|
||||
Page<XYXX> result = xyxxMapper.selectPageList(page, xyxx);
|
||||
Page<XYXX> result = xyxxMapper.selectPage(page, buildQueryWrapper(xyxx));
|
||||
return new PageResult<>(result.getRecords(), result.getTotal(),
|
||||
query.getPageNum(), query.getPageSize());
|
||||
}
|
||||
|
||||
/**
|
||||
* 全字段动态查询条件。
|
||||
* <p>
|
||||
* 姓名(xm)、联系电话(lxdh)、通信地址(txdz) 使用模糊查询(LIKE),
|
||||
* 其它字段只要传值就作为等值条件(EQ)参与查询。
|
||||
* 空串和 null 均不作为条件。
|
||||
* </p>
|
||||
*/
|
||||
private QueryWrapper<XYXX> buildQueryWrapper(XYXX query) {
|
||||
QueryWrapper<XYXX> wrapper = new QueryWrapper<>();
|
||||
if (query == null) {
|
||||
return wrapper;
|
||||
}
|
||||
// 需要模糊匹配的字段(属性名)
|
||||
Set<String> fuzzyFields = Set.of("xm", "lxdh", "txdz");
|
||||
for (Field field : XYXX.class.getDeclaredFields()) {
|
||||
Object value = getFieldValue(field, query);
|
||||
if (value == null || !(value instanceof String) || ((String) value).isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
String column = resolveColumn(field);
|
||||
if (fuzzyFields.contains(field.getName())) {
|
||||
wrapper.like(column, (String) value);
|
||||
} else {
|
||||
wrapper.eq(column, (String) value);
|
||||
}
|
||||
}
|
||||
wrapper.orderByAsc("学号");
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
private Object getFieldValue(Field field, Object target) {
|
||||
try {
|
||||
field.setAccessible(true);
|
||||
return field.get(target);
|
||||
} catch (IllegalAccessException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private String resolveColumn(Field field) {
|
||||
TableField tableField = field.getAnnotation(TableField.class);
|
||||
if (tableField != null && tableField.value() != null && !tableField.value().isEmpty()) {
|
||||
return tableField.value();
|
||||
}
|
||||
return field.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void retainGrade(String bh) {
|
||||
XYXX xyxx = new XYXX();
|
||||
xyxx.setBh(bh);
|
||||
xyxx.setLjzt("留级");
|
||||
//留级
|
||||
xyxx.setLjzt(1);
|
||||
xyxxMapper.updateById(xyxx);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void downgrade(String bh) {
|
||||
XYXX xyxx = new XYXX();
|
||||
xyxx.setBh(bh);
|
||||
xyxx.setLjzt("降级");
|
||||
xyxxMapper.updateById(xyxx);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void dropOut(String bh) {
|
||||
XYXX xyxx = new XYXX();
|
||||
xyxx.setBh(bh);
|
||||
xyxx.setTxzt("退学");
|
||||
//退学
|
||||
xyxx.setTxzt(1);
|
||||
xyxxMapper.updateById(xyxx);
|
||||
}
|
||||
|
||||
@@ -194,4 +270,354 @@ public class StudentRecordsServiceImpl implements StudentRecordsService {
|
||||
throw new RuntimeException("导出 Excel 失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportProcessGradesExcel(String xybh, HttpServletResponse response) {
|
||||
XYXX student = xyxxMapper.selectById(xybh);
|
||||
if (student == null) {
|
||||
throw new RuntimeException("学员不存在");
|
||||
}
|
||||
|
||||
List<XYKCGCCJ> grades = xykgccjMapper.selectByStudentId(xybh);
|
||||
|
||||
try (Workbook workbook = new XSSFWorkbook()) {
|
||||
Sheet sheet = workbook.createSheet("课程过程成绩");
|
||||
|
||||
Font headerFont = workbook.createFont();
|
||||
headerFont.setBold(true);
|
||||
headerFont.setFontHeightInPoints((short) 12);
|
||||
CellStyle headerStyle = workbook.createCellStyle();
|
||||
headerStyle.setFont(headerFont);
|
||||
headerStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
headerStyle.setBorderBottom(BorderStyle.THIN);
|
||||
headerStyle.setBorderTop(BorderStyle.THIN);
|
||||
headerStyle.setBorderLeft(BorderStyle.THIN);
|
||||
headerStyle.setBorderRight(BorderStyle.THIN);
|
||||
|
||||
CellStyle dataStyle = workbook.createCellStyle();
|
||||
dataStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
dataStyle.setBorderBottom(BorderStyle.THIN);
|
||||
dataStyle.setBorderTop(BorderStyle.THIN);
|
||||
dataStyle.setBorderLeft(BorderStyle.THIN);
|
||||
dataStyle.setBorderRight(BorderStyle.THIN);
|
||||
|
||||
// 学员信息行
|
||||
Row infoRow = sheet.createRow(0);
|
||||
infoRow.createCell(0).setCellValue("学员:" + student.getXm());
|
||||
infoRow.createCell(1).setCellValue("学号:" + student.getXh());
|
||||
|
||||
// 表头
|
||||
String[] headers = {"年度", "科目编号", "原始成绩", "最终成绩", "补考1",
|
||||
"补考2", "补考3", "补考次数", "考试情况", "备注"};
|
||||
Row headerRow = sheet.createRow(2);
|
||||
for (int i = 0; i < headers.length; i++) {
|
||||
Cell cell = headerRow.createCell(i);
|
||||
cell.setCellValue(headers[i]);
|
||||
cell.setCellStyle(headerStyle);
|
||||
}
|
||||
|
||||
// 数据行
|
||||
int rowIdx = 3;
|
||||
for (XYKCGCCJ g : grades) {
|
||||
Row row = sheet.createRow(rowIdx++);
|
||||
row.createCell(0).setCellValue(g.getNd() != null ? g.getNd().toString() : "");
|
||||
row.createCell(1).setCellValue(g.getKmbh() != null ? g.getKmbh() : "");
|
||||
row.createCell(2).setCellValue(g.getYscj() != null ? g.getYscj() : "");
|
||||
row.createCell(3).setCellValue(g.getZzcj() != null ? g.getZzcj().toString() : "");
|
||||
row.createCell(4).setCellValue(g.getBkcj1() != null ? g.getBkcj1().toString() : "");
|
||||
row.createCell(5).setCellValue(g.getBkcj2() != null ? g.getBkcj2().toString() : "");
|
||||
row.createCell(6).setCellValue(g.getBkcj3() != null ? g.getBkcj3().toString() : "");
|
||||
row.createCell(7).setCellValue(g.getBkcs() != null ? g.getBkcs().toString() : "");
|
||||
row.createCell(8).setCellValue(g.getKsqk() != null ? g.getKsqk() : "");
|
||||
row.createCell(9).setCellValue(g.getBz() != null ? g.getBz() : "");
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
row.getCell(i).setCellStyle(dataStyle);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < headers.length; i++) {
|
||||
sheet.autoSizeColumn(i);
|
||||
}
|
||||
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + URLEncoder.encode(
|
||||
student.getXm() + "_课程过程成绩.xlsx", "UTF-8"));
|
||||
workbook.write(response.getOutputStream());
|
||||
response.getOutputStream().flush();
|
||||
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("导出 Excel 失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
// ========== 学员学籍异动申请 ==========
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void addApplication(XYXJYDSQB entity) {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
entity.setCjsj(now);
|
||||
entity.setXgsj(now);
|
||||
// 状态默认待审核(0)
|
||||
if (entity.getZt() == null || entity.getZt().isEmpty()) {
|
||||
entity.setZt("0");
|
||||
}
|
||||
xyxjydsqbMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteApplication(String bh) {
|
||||
xyxjydsqbMapper.deleteById(bh);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateApplication(XYXJYDSQB entity) {
|
||||
if (entity.getBh() == null || entity.getBh().isEmpty()) {
|
||||
throw new RuntimeException("异动申请编号不能为空");
|
||||
}
|
||||
// 后台自动更新修改时间,不修改创建时间
|
||||
entity.setXgsj(LocalDateTime.now());
|
||||
xyxjydsqbMapper.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XYXJYDSQB getApplicationById(String bh) {
|
||||
return xyxjydsqbMapper.selectById(bh);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<XYXJYDSQB> pageApplication(PageQuery query, XYXJYDSQB cond) {
|
||||
Page<XYXJYDSQB> page = new Page<>(query.getPageNum(), query.getPageSize());
|
||||
LambdaQueryWrapper<XYXJYDSQB> wrapper = new LambdaQueryWrapper<>();
|
||||
if (cond != null) {
|
||||
wrapper.eq(isNotBlank(cond.getBh()), XYXJYDSQB::getBh, cond.getBh());
|
||||
wrapper.eq(isNotBlank(cond.getXybh()), XYXJYDSQB::getXybh, cond.getXybh());
|
||||
wrapper.eq(isNotBlank(cond.getSqlx()), XYXJYDSQB::getSqlx, cond.getSqlx());
|
||||
wrapper.eq(isNotBlank(cond.getZt()), XYXJYDSQB::getZt, cond.getZt());
|
||||
}
|
||||
wrapper.orderByDesc(XYXJYDSQB::getCjsj);
|
||||
Page<XYXJYDSQB> result = xyxjydsqbMapper.selectPage(page, wrapper);
|
||||
return new PageResult<>(result.getRecords(), result.getTotal(),
|
||||
query.getPageNum(), query.getPageSize());
|
||||
}
|
||||
|
||||
private boolean isNotBlank(String value) {
|
||||
return value != null && !value.isEmpty();
|
||||
}
|
||||
|
||||
// ========== 学员学籍预警条件管理 ==========
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void addWarningCondition(XYXJYJTJB entity) {
|
||||
if (entity.getBh() == null || entity.getBh().isEmpty()) {
|
||||
throw new RuntimeException("预警条件编号不能为空");
|
||||
}
|
||||
// 后台自动写入修改时间
|
||||
entity.setTy(0);
|
||||
entity.setXgsj(LocalDateTime.now());
|
||||
xyxjyjtjbMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateWarningCondition(XYXJYJTJB entity) {
|
||||
if (entity.getBh() == null || entity.getBh().isEmpty()) {
|
||||
throw new RuntimeException("预警条件编号不能为空");
|
||||
}
|
||||
// 后台自动更新修改时间
|
||||
entity.setXgsj(LocalDateTime.now());
|
||||
xyxjyjtjbMapper.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XYXJYJTJB getWarningConditionById(String bh) {
|
||||
return xyxjyjtjbMapper.selectById(bh);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<XYXJYJTJB> pageWarningCondition(PageQuery query, XYXJYJTJB cond) {
|
||||
Page<XYXJYJTJB> page = new Page<>(query.getPageNum(), query.getPageSize());
|
||||
LambdaQueryWrapper<XYXJYJTJB> wrapper = new LambdaQueryWrapper<>();
|
||||
if (cond != null) {
|
||||
wrapper.eq(isNotBlank(cond.getBh()), XYXJYJTJB::getBh, cond.getBh());
|
||||
wrapper.like(isNotBlank(cond.getMc()), XYXJYJTJB::getMc, cond.getMc());
|
||||
wrapper.eq(isNotBlank(cond.getPxlx()), XYXJYJTJB::getPxlx, cond.getPxlx());
|
||||
wrapper.eq(isNotBlank(cond.getPxcc()), XYXJYJTJB::getPxcc, cond.getPxcc());
|
||||
wrapper.eq(cond.getTy() != null, XYXJYJTJB::getTy, cond.getTy());
|
||||
}
|
||||
wrapper.orderByDesc(XYXJYJTJB::getXgsj);
|
||||
Page<XYXJYJTJB> result = xyxjyjtjbMapper.selectPage(page, wrapper);
|
||||
return new PageResult<>(result.getRecords(), result.getTotal(),
|
||||
query.getPageNum(), query.getPageSize());
|
||||
}
|
||||
|
||||
// ========== 学员学籍预警结果管理 ==========
|
||||
|
||||
@Override
|
||||
public XYXJYJJGB getWarningResultById(String bh) {
|
||||
return xyxjyjjgbMapper.selectById(bh);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<XYXJYJJGB> pageWarningResult(PageQuery query, XYXJYJJGB cond) {
|
||||
Page<XYXJYJJGB> page = new Page<>(query.getPageNum(), query.getPageSize());
|
||||
LambdaQueryWrapper<XYXJYJJGB> wrapper = new LambdaQueryWrapper<>();
|
||||
if (cond != null) {
|
||||
wrapper.eq(isNotBlank(cond.getBh()), XYXJYJJGB::getBh, cond.getBh());
|
||||
wrapper.eq(cond.getNd() != null, XYXJYJJGB::getNd, cond.getNd());
|
||||
wrapper.eq(isNotBlank(cond.getYjtjbh()), XYXJYJJGB::getYjtjbh, cond.getYjtjbh());
|
||||
wrapper.eq(isNotBlank(cond.getXybh()), XYXJYJJGB::getXybh, cond.getXybh());
|
||||
wrapper.eq(cond.getFb() != null, XYXJYJJGB::getFb, cond.getFb());
|
||||
}
|
||||
wrapper.orderByDesc(XYXJYJJGB::getCjsj);
|
||||
Page<XYXJYJJGB> result = xyxjyjjgbMapper.selectPage(page, wrapper);
|
||||
return new PageResult<>(result.getRecords(), result.getTotal(),
|
||||
query.getPageNum(), query.getPageSize());
|
||||
}
|
||||
|
||||
// ========== 班次管理(学员队表 XYDB)==========
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void addTeam(XYDB entity) {
|
||||
if (entity.getXydbh() == null || entity.getXydbh().isEmpty()) {
|
||||
throw new RuntimeException("学员队编号不能为空");
|
||||
}
|
||||
xydbMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteTeam(String xydbh) {
|
||||
xydbMapper.deleteById(xydbh);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateTeam(XYDB entity) {
|
||||
if (entity.getXydbh() == null || entity.getXydbh().isEmpty()) {
|
||||
throw new RuntimeException("学员队编号不能为空");
|
||||
}
|
||||
xydbMapper.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XYDB getTeamById(String xydbh) {
|
||||
return xydbMapper.selectById(xydbh);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<XYDB> pageTeam(PageQuery query, XYDB cond) {
|
||||
Page<XYDB> page = new Page<>(query.getPageNum(), query.getPageSize());
|
||||
Page<XYDB> result = xydbMapper.selectPageList(page, cond);
|
||||
return new PageResult<>(result.getRecords(), result.getTotal(),
|
||||
query.getPageNum(), query.getPageSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int importTeam(MultipartFile file) throws Exception {
|
||||
if (file == null || file.isEmpty()) {
|
||||
throw new RuntimeException("导入文件不能为空");
|
||||
}
|
||||
List<XYDB> list = ExcelParseUtil.parseXYDBExcel(
|
||||
file.getInputStream(), file.getOriginalFilename());
|
||||
if (list.isEmpty()) {
|
||||
throw new RuntimeException("Excel中无有效数据");
|
||||
}
|
||||
for (XYDB entity : list) {
|
||||
xydbMapper.insert(entity);
|
||||
}
|
||||
return list.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportTeam(XYDB cond, HttpServletResponse response) throws Exception {
|
||||
LambdaQueryWrapper<XYDB> wrapper = new LambdaQueryWrapper<>();
|
||||
if (cond != null) {
|
||||
wrapper.like(isNotBlank(cond.getXydmc()), XYDB::getXydmc, cond.getXydmc());
|
||||
wrapper.eq(isNotBlank(cond.getNj()), XYDB::getNj, cond.getNj());
|
||||
wrapper.eq(isNotBlank(cond.getZydh()), XYDB::getZydh, cond.getZydh());
|
||||
wrapper.eq(isNotBlank(cond.getRwlb()), XYDB::getRwlb, cond.getRwlb());
|
||||
wrapper.eq(isNotBlank(cond.getXydlx()), XYDB::getXydlx, cond.getXydlx());
|
||||
}
|
||||
wrapper.orderByAsc(XYDB::getXh);
|
||||
List<XYDB> list = xydbMapper.selectList(wrapper);
|
||||
|
||||
String[] headers = {
|
||||
"学员队编号", "学员队名称", "学员队人数", "年级", "专业代号", "专业教室编号", "备注",
|
||||
"在校状态", "序号", "任务类别", "虚实类型", "入学日期", "毕业日期", "学员队类型",
|
||||
"培训任务标识号", "节次类别", "系统模式", "JSONZD", "简称", "所属单位", "主体培训任务"
|
||||
};
|
||||
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + URLEncoder.encode("班次信息.xls", StandardCharsets.UTF_8));
|
||||
try (HSSFWorkbook workbook = new HSSFWorkbook()) {
|
||||
Sheet sheet = workbook.createSheet("班次信息");
|
||||
Row headerRow = sheet.createRow(0);
|
||||
for (int i = 0; i < headers.length; i++) {
|
||||
headerRow.createCell(i).setCellValue(headers[i]);
|
||||
}
|
||||
int rowIdx = 1;
|
||||
for (XYDB t : list) {
|
||||
Row row = sheet.createRow(rowIdx++);
|
||||
row.createCell(0).setCellValue(nvl(t.getXydbh()));
|
||||
row.createCell(1).setCellValue(nvl(t.getXydmc()));
|
||||
row.createCell(2).setCellValue(t.getXydrs() != null ? t.getXydrs().toString() : "");
|
||||
row.createCell(3).setCellValue(nvl(t.getNj()));
|
||||
row.createCell(4).setCellValue(nvl(t.getZydh()));
|
||||
row.createCell(5).setCellValue(nvl(t.getZyjsbh()));
|
||||
row.createCell(6).setCellValue(nvl(t.getBz()));
|
||||
row.createCell(7).setCellValue(nvl(t.getZxzt()));
|
||||
row.createCell(8).setCellValue(nvl(t.getXh()));
|
||||
row.createCell(9).setCellValue(nvl(t.getRwlb()));
|
||||
row.createCell(10).setCellValue(t.getXslx() != null ? t.getXslx().toString() : "");
|
||||
row.createCell(11).setCellValue(t.getRxrq() != null ? t.getRxrq().toString() : "");
|
||||
row.createCell(12).setCellValue(t.getByrq() != null ? t.getByrq().toString() : "");
|
||||
row.createCell(13).setCellValue(nvl(t.getXydlx()));
|
||||
row.createCell(14).setCellValue(nvl(t.getPxrwbsh()));
|
||||
row.createCell(15).setCellValue(nvl(t.getJclb()));
|
||||
row.createCell(16).setCellValue(nvl(t.getXtms()));
|
||||
row.createCell(17).setCellValue(nvl(t.getJsonzd()));
|
||||
row.createCell(18).setCellValue(nvl(t.getJc()));
|
||||
row.createCell(19).setCellValue(nvl(t.getSsdw()));
|
||||
row.createCell(20).setCellValue(t.getZtpxrw() != null ? t.getZtpxrw().toString() : "");
|
||||
}
|
||||
for (int i = 0; i < headers.length; i++) {
|
||||
sheet.autoSizeColumn(i);
|
||||
}
|
||||
OutputStream os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
}
|
||||
}
|
||||
|
||||
// ========== 学员信息批量导入 ==========
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int importStudents(MultipartFile file) throws Exception {
|
||||
if (file == null || file.isEmpty()) {
|
||||
throw new RuntimeException("导入文件不能为空");
|
||||
}
|
||||
List<XYXX> list = ExcelParseUtil.parseXYXXExcel(
|
||||
file.getInputStream(), file.getOriginalFilename());
|
||||
if (list.isEmpty()) {
|
||||
throw new RuntimeException("Excel中无有效数据");
|
||||
}
|
||||
for (XYXX entity : list) {
|
||||
xyxxMapper.insert(entity);
|
||||
}
|
||||
return list.size();
|
||||
}
|
||||
|
||||
private String nvl(String value) {
|
||||
return value == null ? "" : value;
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -7,6 +7,7 @@ import com.roomroot.jwgl.mapper.ZYBMapper;
|
||||
import com.roomroot.jwgl.service.TrainingProgramService;
|
||||
import com.roomroot.jwgl.unit.PageQuery;
|
||||
import com.roomroot.jwgl.unit.PageResult;
|
||||
import com.roomroot.jwgl.utils.UuidUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -30,6 +31,12 @@ public class TrainingProgramServiceImpl implements TrainingProgramService {
|
||||
@Override
|
||||
@Transactional
|
||||
public void add(ZYB entity) {
|
||||
if (entity.getZydh() == null || entity.getZydh().isEmpty()) {
|
||||
entity.setZydh(UuidUtil.getOriginalUUID());
|
||||
}
|
||||
if (entity.getZybsh() == null || entity.getZybsh().isEmpty()) {
|
||||
entity.setZybsh(entity.getZydh());
|
||||
}
|
||||
entity.setTy(false);
|
||||
entity.setQysj(LocalDateTime.now());
|
||||
zybMapper.insert(entity);
|
||||
|
||||
@@ -6,6 +6,8 @@ import com.roomroot.jwgl.dto.courserunning.SingleCourseImportDTO;
|
||||
import com.roomroot.jwgl.dto.departmentpersonnel.DepartmentPersonnelCreateDTO;
|
||||
import com.roomroot.jwgl.entity.JXSSJH;
|
||||
import com.roomroot.jwgl.entity.JYSB;
|
||||
import com.roomroot.jwgl.entity.XYDB;
|
||||
import com.roomroot.jwgl.entity.XYXX;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.CellType;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
@@ -215,6 +217,111 @@ public class ExcelParseUtil {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析班次(学员队表)导入 Excel 文件(支持 .xls / .xlsx)。
|
||||
* <p>表头顺序与学员队表字段一致:</p>
|
||||
* 学员队编号, 学员队名称, 学员队人数, 年级, 专业代号, 专业教室编号, 备注,
|
||||
* 在校状态, 序号, 任务类别, 虚实类型, 入学日期, 毕业日期, 学员队类型,
|
||||
* 培训任务标识号, 节次类别, 系统模式, JSONZD, 简称, 所属单位, 主体培训任务
|
||||
*
|
||||
* @return 学员队实体列表
|
||||
* @throws Exception 解析异常
|
||||
*/
|
||||
public static List<XYDB> parseXYDBExcel(InputStream inputStream, String fileName) throws Exception {
|
||||
List<XYDB> result = new ArrayList<>();
|
||||
Workbook workbook = createWorkbook(inputStream, fileName);
|
||||
try {
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
int lastRowNum = sheet.getLastRowNum();
|
||||
for (int rowNum = 1; rowNum <= lastRowNum; rowNum++) {
|
||||
Row row = sheet.getRow(rowNum);
|
||||
if (row == null) {
|
||||
continue;
|
||||
}
|
||||
XYDB entity = new XYDB();
|
||||
entity.setXydbh(getCellStringValue(row.getCell(0)));
|
||||
entity.setXydmc(getCellStringValue(row.getCell(1)));
|
||||
entity.setXydrs(parseIntCell(row.getCell(2)));
|
||||
entity.setNj(getCellStringValue(row.getCell(3)));
|
||||
entity.setZydh(getCellStringValue(row.getCell(4)));
|
||||
entity.setZyjsbh(getCellStringValue(row.getCell(5)));
|
||||
entity.setBz(getCellStringValue(row.getCell(6)));
|
||||
entity.setZxzt(getCellStringValue(row.getCell(7)));
|
||||
entity.setXh(getCellStringValue(row.getCell(8)));
|
||||
entity.setRwlb(getCellStringValue(row.getCell(9)));
|
||||
entity.setXslx(parseIntCell(row.getCell(10)));
|
||||
entity.setRxrq(parseDateTimeCell(row.getCell(11)));
|
||||
entity.setByrq(parseDateTimeCell(row.getCell(12)));
|
||||
entity.setXydlx(getCellStringValue(row.getCell(13)));
|
||||
entity.setPxrwbsh(getCellStringValue(row.getCell(14)));
|
||||
entity.setJclb(getCellStringValue(row.getCell(15)));
|
||||
entity.setXtms(getCellStringValue(row.getCell(16)));
|
||||
entity.setJsonzd(getCellStringValue(row.getCell(17)));
|
||||
entity.setJc(getCellStringValue(row.getCell(18)));
|
||||
entity.setSsdw(getCellStringValue(row.getCell(19)));
|
||||
entity.setZtpxrw(parseIntCell(row.getCell(20)));
|
||||
|
||||
// 至少要有学员队编号或名称才视为有效行
|
||||
if (entity.getXydbh() != null && !entity.getXydbh().isEmpty()
|
||||
|| entity.getXydmc() != null && !entity.getXydmc().isEmpty()) {
|
||||
result.add(entity);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
workbook.close();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析学员信息批量导入 Excel 文件(支持 .xls / .xlsx)。
|
||||
* <p>表头顺序:</p>
|
||||
* 编号, 学号, 姓名, 学员队期编号, 证件号码, 政治面貌, 性别,
|
||||
* 出生日期, 名族, 籍贯, 身份证号, 联系电话, 通信地址, 学员类别, 曾用名
|
||||
*
|
||||
* @return 学员信息实体列表
|
||||
* @throws Exception 解析异常
|
||||
*/
|
||||
public static List<XYXX> parseXYXXExcel(InputStream inputStream, String fileName) throws Exception {
|
||||
List<XYXX> result = new ArrayList<>();
|
||||
Workbook workbook = createWorkbook(inputStream, fileName);
|
||||
try {
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
int lastRowNum = sheet.getLastRowNum();
|
||||
for (int rowNum = 1; rowNum <= lastRowNum; rowNum++) {
|
||||
Row row = sheet.getRow(rowNum);
|
||||
if (row == null) {
|
||||
continue;
|
||||
}
|
||||
XYXX entity = new XYXX();
|
||||
entity.setBh(getCellStringValue(row.getCell(0)));
|
||||
entity.setXh(getCellStringValue(row.getCell(1)));
|
||||
entity.setXm(getCellStringValue(row.getCell(2)));
|
||||
entity.setXydqbh(getCellStringValue(row.getCell(3)));
|
||||
entity.setZjhm(getCellStringValue(row.getCell(4)));
|
||||
entity.setZzmm(getCellStringValue(row.getCell(5)));
|
||||
entity.setXb(getCellStringValue(row.getCell(6)));
|
||||
entity.setCsrq(getCellStringValue(row.getCell(7)));
|
||||
entity.setMz(getCellStringValue(row.getCell(8)));
|
||||
entity.setJg(getCellStringValue(row.getCell(9)));
|
||||
entity.setSfzh(getCellStringValue(row.getCell(10)));
|
||||
entity.setLxdh(getCellStringValue(row.getCell(11)));
|
||||
entity.setTxdz(getCellStringValue(row.getCell(12)));
|
||||
entity.setXylb(getCellStringValue(row.getCell(13)));
|
||||
entity.setCym(getCellStringValue(row.getCell(14)));
|
||||
|
||||
// 至少要有编号或姓名才视为有效行
|
||||
if (entity.getBh() != null && !entity.getBh().isEmpty()
|
||||
|| entity.getXm() != null && !entity.getXm().isEmpty()) {
|
||||
result.add(entity);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
workbook.close();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static Workbook createWorkbook(InputStream inputStream, String fileName) throws Exception {
|
||||
String name = fileName == null ? "" : fileName.toLowerCase();
|
||||
if (!name.endsWith(".xlsx") && !name.endsWith(".xls")) {
|
||||
|
||||
Reference in New Issue
Block a user