Merge branch 'master' of http://47.99.164.66:3000/hzdyjs-xg/all-project
This commit is contained in:
commit
75201841cd
243 files changed
+89463
-2524
No files matched your search
-233
@@ -1,233 +0,0 @@
|
|||||||
package org.dromara.zsjy.controller;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import jakarta.validation.constraints.*;
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
|
||||||
import org.dromara.common.log.annotation.Log;
|
|
||||||
import org.dromara.common.web.core.BaseController;
|
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
||||||
import org.dromara.common.core.domain.R;
|
|
||||||
import org.dromara.common.core.validate.AddGroup;
|
|
||||||
import org.dromara.common.core.validate.EditGroup;
|
|
||||||
import org.dromara.common.log.enums.BusinessType;
|
|
||||||
import org.dromara.common.excel.utils.ExcelUtil;
|
|
||||||
import org.dromara.zsjy.domain.vo.ZsjyEnrollmentProcessVo;
|
|
||||||
import org.dromara.zsjy.domain.bo.ZsjyEnrollmentProcessBo;
|
|
||||||
import org.dromara.zsjy.service.IZsjyEnrollmentProcessService;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 招生录取流程状态
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2025-01-20
|
|
||||||
*/
|
|
||||||
@Validated
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/zsjy/enrollmentProcess")
|
|
||||||
public class ZsjyEnrollmentProcessController extends BaseController {
|
|
||||||
|
|
||||||
private final IZsjyEnrollmentProcessService zsjyEnrollmentProcessService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询招生录取流程状态列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:list")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo<ZsjyEnrollmentProcessVo> list(ZsjyEnrollmentProcessBo bo, PageQuery pageQuery) {
|
|
||||||
return zsjyEnrollmentProcessService.queryPageList(bo, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出招生录取流程状态列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:export")
|
|
||||||
@Log(title = "招生录取流程状态", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(ZsjyEnrollmentProcessBo bo, HttpServletResponse response) {
|
|
||||||
List<ZsjyEnrollmentProcessVo> list = zsjyEnrollmentProcessService.queryList(bo);
|
|
||||||
ExcelUtil.exportExcel(list, "招生录取流程状态", ZsjyEnrollmentProcessVo.class, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取招生录取流程状态详细信息
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:query")
|
|
||||||
@GetMapping("/{id}")
|
|
||||||
public R<ZsjyEnrollmentProcessVo> getInfo(@NotNull(message = "主键不能为空")
|
|
||||||
@PathVariable Long id) {
|
|
||||||
return R.ok(zsjyEnrollmentProcessService.queryById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增招生录取流程状态
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:add")
|
|
||||||
@Log(title = "招生录取流程状态", businessType = BusinessType.INSERT)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping()
|
|
||||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ZsjyEnrollmentProcessBo bo) {
|
|
||||||
return toAjax(zsjyEnrollmentProcessService.insertByBo(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改招生录取流程状态
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:edit")
|
|
||||||
@Log(title = "招生录取流程状态", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PutMapping()
|
|
||||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ZsjyEnrollmentProcessBo bo) {
|
|
||||||
return toAjax(zsjyEnrollmentProcessService.updateByBo(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除招生录取流程状态
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:remove")
|
|
||||||
@Log(title = "招生录取流程状态", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
||||||
@PathVariable Long[] ids) {
|
|
||||||
return toAjax(zsjyEnrollmentProcessService.deleteWithValidByIds(List.of(ids), true));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据报名信息ID查询流程状态
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:query")
|
|
||||||
@GetMapping("/enrollment/{enrollmentId}")
|
|
||||||
public R<ZsjyEnrollmentProcessVo> getByEnrollmentId(@PathVariable Long enrollmentId) {
|
|
||||||
return R.ok(zsjyEnrollmentProcessService.queryByEnrollmentId(enrollmentId));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询我的待处理流程
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:list")
|
|
||||||
@GetMapping("/pending")
|
|
||||||
public R<List<ZsjyEnrollmentProcessVo>> getPendingList() {
|
|
||||||
Long currentUserId = getUserId();
|
|
||||||
return R.ok(zsjyEnrollmentProcessService.queryPendingByHandler(currentUserId));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据流程状态查询流程列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:list")
|
|
||||||
@GetMapping("/status/{status}")
|
|
||||||
public R<List<ZsjyEnrollmentProcessVo>> getByStatus(@PathVariable String status) {
|
|
||||||
return R.ok(zsjyEnrollmentProcessService.queryByStatus(status));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计各状态的流程数量
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:list")
|
|
||||||
@GetMapping("/statistics")
|
|
||||||
public R<List<Map<String, Object>>> getStatistics() {
|
|
||||||
return R.ok(zsjyEnrollmentProcessService.queryStatusStatistics());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据关键词搜索流程
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:list")
|
|
||||||
@GetMapping("/search")
|
|
||||||
public R<List<ZsjyEnrollmentProcessVo>> search(@RequestParam String keyword) {
|
|
||||||
return R.ok(zsjyEnrollmentProcessService.queryByKeyword(keyword));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 信息审核
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:audit")
|
|
||||||
@Log(title = "招生录取流程状态", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping("/infoAudit")
|
|
||||||
public R<Void> infoAudit(@RequestParam Long id,
|
|
||||||
@RequestParam String auditResult,
|
|
||||||
@RequestParam(required = false) String auditOpinion) {
|
|
||||||
return toAjax(zsjyEnrollmentProcessService.infoAudit(id, auditResult, auditOpinion));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 录取处理
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:process")
|
|
||||||
@Log(title = "招生录取流程状态", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping("/admissionProcess")
|
|
||||||
public R<Void> admissionProcess(@RequestParam Long id,
|
|
||||||
@RequestParam String processResult,
|
|
||||||
@RequestParam(required = false) String processOpinion,
|
|
||||||
@RequestParam(required = false) String noticeNumber) {
|
|
||||||
return toAjax(zsjyEnrollmentProcessService.admissionProcess(id, processResult, processOpinion, noticeNumber));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缴费确认
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:process")
|
|
||||||
@Log(title = "招生录取流程状态", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping("/confirmPayment")
|
|
||||||
public R<Void> confirmPayment(@RequestParam Long id) {
|
|
||||||
return toAjax(zsjyEnrollmentProcessService.confirmPayment(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最终审核
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:finalAudit")
|
|
||||||
@Log(title = "招生录取流程状态", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping("/finalAudit")
|
|
||||||
public R<Void> finalAudit(@RequestParam Long id,
|
|
||||||
@RequestParam String auditResult,
|
|
||||||
@RequestParam(required = false) String auditOpinion) {
|
|
||||||
return toAjax(zsjyEnrollmentProcessService.finalAudit(id, auditResult, auditOpinion));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 完成录取
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:complete")
|
|
||||||
@Log(title = "招生录取流程状态", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping("/complete")
|
|
||||||
public R<Void> complete(@RequestParam Long id) {
|
|
||||||
return toAjax(zsjyEnrollmentProcessService.completeEnrollment(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 驳回流程
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:reject")
|
|
||||||
@Log(title = "招生录取流程状态", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping("/reject")
|
|
||||||
public R<Void> reject(@RequestParam Long id, @RequestParam String rejectReason) {
|
|
||||||
return toAjax(zsjyEnrollmentProcessService.rejectProcess(id, rejectReason));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 重置流程状态
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("zsjy:enrollmentProcess:reset")
|
|
||||||
@Log(title = "招生录取流程状态", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping("/reset")
|
|
||||||
public R<Void> reset(@RequestParam Long id) {
|
|
||||||
return toAjax(zsjyEnrollmentProcessService.resetProcess(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
-165
@@ -1,165 +0,0 @@
|
|||||||
package org.dromara.zsjy.domain;
|
|
||||||
|
|
||||||
import org.dromara.common.tenant.core.TenantEntity;
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 招生录取流程状态对象 zsjy_enrollment_process
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2025-01-20
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("zsjy_enrollment_process")
|
|
||||||
public class ZsjyEnrollmentProcess extends TenantEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@TableId(value = "id")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 报名信息ID,关联zsjy_enrollment_info.id
|
|
||||||
*/
|
|
||||||
private Long enrollmentId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 学生姓名
|
|
||||||
*/
|
|
||||||
private String studentName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 身份证号
|
|
||||||
*/
|
|
||||||
private String idCard;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前状态(0-待审核 1-信息审核中 2-录取处理中 3-待最终确认 4-录取完成 9-已驳回)
|
|
||||||
*/
|
|
||||||
private String currentStatus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前处理人ID
|
|
||||||
*/
|
|
||||||
private Long currentHandler;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前处理人姓名
|
|
||||||
*/
|
|
||||||
private String currentHandlerName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 信息审核状态(0-待审核 1-审核通过 9-审核驳回)
|
|
||||||
*/
|
|
||||||
private String infoAuditStatus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 信息审核人ID
|
|
||||||
*/
|
|
||||||
private Long infoAuditUser;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 信息审核人姓名
|
|
||||||
*/
|
|
||||||
private String infoAuditUserName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 信息审核时间
|
|
||||||
*/
|
|
||||||
private Date infoAuditTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 信息审核意见
|
|
||||||
*/
|
|
||||||
private String infoAuditOpinion;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 录取处理状态(0-待处理 1-处理完成 9-处理驳回)
|
|
||||||
*/
|
|
||||||
private String admissionStatus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 录取处理人ID
|
|
||||||
*/
|
|
||||||
private Long admissionUser;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 录取处理人姓名
|
|
||||||
*/
|
|
||||||
private String admissionUserName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 录取处理时间
|
|
||||||
*/
|
|
||||||
private Date admissionTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缴费状态(0-未缴费 1-已缴费)
|
|
||||||
*/
|
|
||||||
private String paymentStatus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缴费确认时间
|
|
||||||
*/
|
|
||||||
private Date paymentConfirmTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 录取通知书号码
|
|
||||||
*/
|
|
||||||
private String noticeNumber;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 录取处理意见
|
|
||||||
*/
|
|
||||||
private String admissionOpinion;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最终审核状态(0-待确认 1-确认通过 9-确认驳回)
|
|
||||||
*/
|
|
||||||
private String finalAuditStatus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最终审核人ID
|
|
||||||
*/
|
|
||||||
private Long finalAuditUser;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最终审核人姓名
|
|
||||||
*/
|
|
||||||
private String finalAuditUserName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最终审核时间
|
|
||||||
*/
|
|
||||||
private Date finalAuditTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最终审核意见
|
|
||||||
*/
|
|
||||||
private String finalAuditOpinion;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否完成录取(0-未完成 1-已完成)
|
|
||||||
*/
|
|
||||||
private Integer isCompleted;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 录取完成时间
|
|
||||||
*/
|
|
||||||
private Date completionTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
private String remark;
|
|
||||||
}
|
|
||||||
-57
@@ -1,57 +0,0 @@
|
|||||||
package org.dromara.zsjy.mapper;
|
|
||||||
|
|
||||||
import org.dromara.zsjy.domain.ZsjyEnrollmentProcess;
|
|
||||||
import org.dromara.zsjy.domain.vo.ZsjyEnrollmentProcessVo;
|
|
||||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 招生录取流程状态Mapper接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2025-01-20
|
|
||||||
*/
|
|
||||||
public interface ZsjyEnrollmentProcessMapper extends BaseMapperPlus<ZsjyEnrollmentProcess, ZsjyEnrollmentProcessVo> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据报名信息ID查询流程状态
|
|
||||||
*
|
|
||||||
* @param enrollmentId 报名信息ID
|
|
||||||
* @return 流程状态信息
|
|
||||||
*/
|
|
||||||
ZsjyEnrollmentProcessVo selectByEnrollmentId(@Param("enrollmentId") Long enrollmentId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据当前处理人查询待处理流程列表
|
|
||||||
*
|
|
||||||
* @param currentHandler 当前处理人ID
|
|
||||||
* @return 待处理流程列表
|
|
||||||
*/
|
|
||||||
List<ZsjyEnrollmentProcessVo> selectPendingByHandler(@Param("currentHandler") Long currentHandler);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据流程状态查询流程列表
|
|
||||||
*
|
|
||||||
* @param currentStatus 当前状态
|
|
||||||
* @return 流程列表
|
|
||||||
*/
|
|
||||||
List<ZsjyEnrollmentProcessVo> selectByStatus(@Param("currentStatus") String currentStatus);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计各状态的流程数量
|
|
||||||
*
|
|
||||||
* @return 状态统计结果
|
|
||||||
*/
|
|
||||||
List<java.util.Map<String, Object>> selectStatusStatistics();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据学生姓名或身份证号模糊查询
|
|
||||||
*
|
|
||||||
* @param keyword 关键词
|
|
||||||
* @return 流程列表
|
|
||||||
*/
|
|
||||||
List<ZsjyEnrollmentProcessVo> selectByKeyword(@Param("keyword") String keyword);
|
|
||||||
|
|
||||||
}
|
|
||||||
-110
@@ -1,110 +0,0 @@
|
|||||||
package org.dromara.zsjy.service;
|
|
||||||
|
|
||||||
import org.dromara.zsjy.domain.vo.ZsjyEnrollmentProcessVo;
|
|
||||||
import org.dromara.zsjy.domain.bo.ZsjyEnrollmentProcessBo;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 招生录取流程状态Service接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2025-01-20
|
|
||||||
*/
|
|
||||||
public interface IZsjyEnrollmentProcessService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询招生录取流程状态
|
|
||||||
*/
|
|
||||||
ZsjyEnrollmentProcessVo queryById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询招生录取流程状态列表
|
|
||||||
*/
|
|
||||||
TableDataInfo<ZsjyEnrollmentProcessVo> queryPageList(ZsjyEnrollmentProcessBo bo, PageQuery pageQuery);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询招生录取流程状态列表
|
|
||||||
*/
|
|
||||||
List<ZsjyEnrollmentProcessVo> queryList(ZsjyEnrollmentProcessBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增招生录取流程状态
|
|
||||||
*/
|
|
||||||
Boolean insertByBo(ZsjyEnrollmentProcessBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改招生录取流程状态
|
|
||||||
*/
|
|
||||||
Boolean updateByBo(ZsjyEnrollmentProcessBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验并批量删除招生录取流程状态信息
|
|
||||||
*/
|
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据报名信息ID查询流程状态
|
|
||||||
*/
|
|
||||||
ZsjyEnrollmentProcessVo queryByEnrollmentId(Long enrollmentId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据当前处理人查询待处理流程列表
|
|
||||||
*/
|
|
||||||
List<ZsjyEnrollmentProcessVo> queryPendingByHandler(Long currentHandler);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据流程状态查询流程列表
|
|
||||||
*/
|
|
||||||
List<ZsjyEnrollmentProcessVo> queryByStatus(String currentStatus);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计各状态的流程数量
|
|
||||||
*/
|
|
||||||
List<Map<String, Object>> queryStatusStatistics();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据学生姓名或身份证号模糊查询
|
|
||||||
*/
|
|
||||||
List<ZsjyEnrollmentProcessVo> queryByKeyword(String keyword);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 信息审核
|
|
||||||
*/
|
|
||||||
Boolean infoAudit(Long id, String auditResult, String auditOpinion);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 录取处理
|
|
||||||
*/
|
|
||||||
Boolean admissionProcess(Long id, String processResult, String processOpinion, String noticeNumber);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缴费确认
|
|
||||||
*/
|
|
||||||
Boolean confirmPayment(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最终审核
|
|
||||||
*/
|
|
||||||
Boolean finalAudit(Long id, String auditResult, String auditOpinion);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 完成录取
|
|
||||||
*/
|
|
||||||
Boolean completeEnrollment(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 驳回流程
|
|
||||||
*/
|
|
||||||
Boolean rejectProcess(Long id, String rejectReason);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 重置流程状态
|
|
||||||
*/
|
|
||||||
Boolean resetProcess(Long id);
|
|
||||||
|
|
||||||
}
|
|
||||||
-347
@@ -1,347 +0,0 @@
|
|||||||
package org.dromara.zsjy.service.impl;
|
|
||||||
|
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import org.dromara.zsjy.domain.bo.ZsjyEnrollmentProcessBo;
|
|
||||||
import org.dromara.zsjy.domain.vo.ZsjyEnrollmentProcessVo;
|
|
||||||
import org.dromara.zsjy.domain.ZsjyEnrollmentProcess;
|
|
||||||
import org.dromara.zsjy.mapper.ZsjyEnrollmentProcessMapper;
|
|
||||||
import org.dromara.zsjy.service.IZsjyEnrollmentProcessService;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 招生录取流程状态Service业务层处理
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2025-01-20
|
|
||||||
*/
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Service
|
|
||||||
public class ZsjyEnrollmentProcessServiceImpl implements IZsjyEnrollmentProcessService {
|
|
||||||
|
|
||||||
private final ZsjyEnrollmentProcessMapper baseMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询招生录取流程状态
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ZsjyEnrollmentProcessVo queryById(Long id){
|
|
||||||
return baseMapper.selectVoById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询招生录取流程状态列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public TableDataInfo<ZsjyEnrollmentProcessVo> queryPageList(ZsjyEnrollmentProcessBo bo, PageQuery pageQuery) {
|
|
||||||
LambdaQueryWrapper<ZsjyEnrollmentProcess> lqw = buildQueryWrapper(bo);
|
|
||||||
Page<ZsjyEnrollmentProcessVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
||||||
return TableDataInfo.build(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询招生录取流程状态列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<ZsjyEnrollmentProcessVo> queryList(ZsjyEnrollmentProcessBo bo) {
|
|
||||||
LambdaQueryWrapper<ZsjyEnrollmentProcess> lqw = buildQueryWrapper(bo);
|
|
||||||
return baseMapper.selectVoList(lqw);
|
|
||||||
}
|
|
||||||
|
|
||||||
private LambdaQueryWrapper<ZsjyEnrollmentProcess> buildQueryWrapper(ZsjyEnrollmentProcessBo bo) {
|
|
||||||
Map<String, Object> params = bo.getParams();
|
|
||||||
LambdaQueryWrapper<ZsjyEnrollmentProcess> lqw = Wrappers.lambdaQuery();
|
|
||||||
lqw.eq(bo.getEnrollmentId() != null, ZsjyEnrollmentProcess::getEnrollmentId, bo.getEnrollmentId());
|
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getStudentName()), ZsjyEnrollmentProcess::getStudentName, bo.getStudentName());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getIdCard()), ZsjyEnrollmentProcess::getIdCard, bo.getIdCard());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getCurrentStatus()), ZsjyEnrollmentProcess::getCurrentStatus, bo.getCurrentStatus());
|
|
||||||
lqw.eq(bo.getCurrentHandler() != null, ZsjyEnrollmentProcess::getCurrentHandler, bo.getCurrentHandler());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getInfoAuditStatus()), ZsjyEnrollmentProcess::getInfoAuditStatus, bo.getInfoAuditStatus());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getAdmissionStatus()), ZsjyEnrollmentProcess::getAdmissionStatus, bo.getAdmissionStatus());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getFinalAuditStatus()), ZsjyEnrollmentProcess::getFinalAuditStatus, bo.getFinalAuditStatus());
|
|
||||||
lqw.eq(bo.getIsCompleted() != null, ZsjyEnrollmentProcess::getIsCompleted, bo.getIsCompleted());
|
|
||||||
return lqw;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增招生录取流程状态
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean insertByBo(ZsjyEnrollmentProcessBo bo) {
|
|
||||||
ZsjyEnrollmentProcess add = MapstructUtils.convert(bo, ZsjyEnrollmentProcess.class);
|
|
||||||
validEntityBeforeSave(add);
|
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
|
||||||
if (flag) {
|
|
||||||
bo.setId(add.getId());
|
|
||||||
}
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改招生录取流程状态
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean updateByBo(ZsjyEnrollmentProcessBo bo) {
|
|
||||||
ZsjyEnrollmentProcess update = MapstructUtils.convert(bo, ZsjyEnrollmentProcess.class);
|
|
||||||
validEntityBeforeSave(update);
|
|
||||||
return baseMapper.updateById(update) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存前的数据校验
|
|
||||||
*/
|
|
||||||
private void validEntityBeforeSave(ZsjyEnrollmentProcess entity){
|
|
||||||
// TODO 做一些数据校验,如唯一约束
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除招生录取流程状态
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
|
||||||
if(isValid){
|
|
||||||
// TODO 做一些业务上的校验,判断是否需要校验
|
|
||||||
}
|
|
||||||
return baseMapper.deleteBatchIds(ids) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据报名信息ID查询流程状态
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public ZsjyEnrollmentProcessVo queryByEnrollmentId(Long enrollmentId) {
|
|
||||||
return baseMapper.selectByEnrollmentId(enrollmentId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据当前处理人查询待处理流程列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<ZsjyEnrollmentProcessVo> queryPendingByHandler(Long currentHandler) {
|
|
||||||
return baseMapper.selectPendingByHandler(currentHandler);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据流程状态查询流程列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<ZsjyEnrollmentProcessVo> queryByStatus(String currentStatus) {
|
|
||||||
return baseMapper.selectByStatus(currentStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计各状态的流程数量
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<Map<String, Object>> queryStatusStatistics() {
|
|
||||||
return baseMapper.selectStatusStatistics();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据学生姓名或身份证号模糊查询
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<ZsjyEnrollmentProcessVo> queryByKeyword(String keyword) {
|
|
||||||
return baseMapper.selectByKeyword(keyword);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 信息审核
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Transactional
|
|
||||||
public Boolean infoAudit(Long id, String auditResult, String auditOpinion) {
|
|
||||||
ZsjyEnrollmentProcess process = baseMapper.selectById(id);
|
|
||||||
if (process == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新信息审核状态
|
|
||||||
process.setInfoAuditStatus(auditResult);
|
|
||||||
process.setInfoAuditUser(LoginHelper.getUserId());
|
|
||||||
process.setInfoAuditUserName(LoginHelper.getUsername());
|
|
||||||
process.setInfoAuditTime(new Date());
|
|
||||||
process.setInfoAuditOpinion(auditOpinion);
|
|
||||||
|
|
||||||
// 根据审核结果更新当前状态
|
|
||||||
if ("1".equals(auditResult)) {
|
|
||||||
// 审核通过,进入录取处理阶段
|
|
||||||
process.setCurrentStatus("2");
|
|
||||||
// TODO: 设置下一个处理人(录取处理人员)
|
|
||||||
} else if ("9".equals(auditResult)) {
|
|
||||||
// 审核驳回
|
|
||||||
process.setCurrentStatus("9");
|
|
||||||
}
|
|
||||||
|
|
||||||
return baseMapper.updateById(process) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 录取处理
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Transactional
|
|
||||||
public Boolean admissionProcess(Long id, String processResult, String processOpinion, String noticeNumber) {
|
|
||||||
ZsjyEnrollmentProcess process = baseMapper.selectById(id);
|
|
||||||
if (process == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新录取处理状态
|
|
||||||
process.setAdmissionStatus(processResult);
|
|
||||||
process.setAdmissionUser(LoginHelper.getUserId());
|
|
||||||
process.setAdmissionUserName(LoginHelper.getUsername());
|
|
||||||
process.setAdmissionTime(new Date());
|
|
||||||
process.setAdmissionOpinion(processOpinion);
|
|
||||||
process.setNoticeNumber(noticeNumber);
|
|
||||||
|
|
||||||
// 根据处理结果更新当前状态
|
|
||||||
if ("1".equals(processResult)) {
|
|
||||||
// 处理完成,进入最终确认阶段
|
|
||||||
process.setCurrentStatus("3");
|
|
||||||
// TODO: 设置下一个处理人(部门领导)
|
|
||||||
} else if ("9".equals(processResult)) {
|
|
||||||
// 处理驳回
|
|
||||||
process.setCurrentStatus("9");
|
|
||||||
}
|
|
||||||
|
|
||||||
return baseMapper.updateById(process) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缴费确认
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Transactional
|
|
||||||
public Boolean confirmPayment(Long id) {
|
|
||||||
ZsjyEnrollmentProcess process = baseMapper.selectById(id);
|
|
||||||
if (process == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
process.setPaymentStatus("1");
|
|
||||||
process.setPaymentConfirmTime(new Date());
|
|
||||||
|
|
||||||
return baseMapper.updateById(process) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最终审核
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Transactional
|
|
||||||
public Boolean finalAudit(Long id, String auditResult, String auditOpinion) {
|
|
||||||
ZsjyEnrollmentProcess process = baseMapper.selectById(id);
|
|
||||||
if (process == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新最终审核状态
|
|
||||||
process.setFinalAuditStatus(auditResult);
|
|
||||||
process.setFinalAuditUser(LoginHelper.getUserId());
|
|
||||||
process.setFinalAuditUserName(LoginHelper.getUsername());
|
|
||||||
process.setFinalAuditTime(new Date());
|
|
||||||
process.setFinalAuditOpinion(auditOpinion);
|
|
||||||
|
|
||||||
// 根据审核结果更新当前状态
|
|
||||||
if ("1".equals(auditResult)) {
|
|
||||||
// 确认通过,录取完成
|
|
||||||
process.setCurrentStatus("4");
|
|
||||||
process.setIsCompleted(1);
|
|
||||||
process.setCompletionTime(new Date());
|
|
||||||
} else if ("9".equals(auditResult)) {
|
|
||||||
// 确认驳回
|
|
||||||
process.setCurrentStatus("9");
|
|
||||||
}
|
|
||||||
|
|
||||||
return baseMapper.updateById(process) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 完成录取
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Transactional
|
|
||||||
public Boolean completeEnrollment(Long id) {
|
|
||||||
ZsjyEnrollmentProcess process = baseMapper.selectById(id);
|
|
||||||
if (process == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
process.setCurrentStatus("4");
|
|
||||||
process.setIsCompleted(1);
|
|
||||||
process.setCompletionTime(new Date());
|
|
||||||
|
|
||||||
return baseMapper.updateById(process) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 驳回流程
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Transactional
|
|
||||||
public Boolean rejectProcess(Long id, String rejectReason) {
|
|
||||||
ZsjyEnrollmentProcess process = baseMapper.selectById(id);
|
|
||||||
if (process == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
process.setCurrentStatus("9");
|
|
||||||
process.setRemark(rejectReason);
|
|
||||||
|
|
||||||
return baseMapper.updateById(process) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 重置流程状态
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Transactional
|
|
||||||
public Boolean resetProcess(Long id) {
|
|
||||||
ZsjyEnrollmentProcess process = baseMapper.selectById(id);
|
|
||||||
if (process == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 重置所有状态为初始状态
|
|
||||||
process.setCurrentStatus("0");
|
|
||||||
process.setInfoAuditStatus("0");
|
|
||||||
process.setAdmissionStatus("0");
|
|
||||||
process.setFinalAuditStatus("0");
|
|
||||||
process.setPaymentStatus("0");
|
|
||||||
process.setIsCompleted(0);
|
|
||||||
|
|
||||||
// 清空审核信息
|
|
||||||
process.setInfoAuditUser(null);
|
|
||||||
process.setInfoAuditUserName(null);
|
|
||||||
process.setInfoAuditTime(null);
|
|
||||||
process.setInfoAuditOpinion(null);
|
|
||||||
process.setAdmissionUser(null);
|
|
||||||
process.setAdmissionUserName(null);
|
|
||||||
process.setAdmissionTime(null);
|
|
||||||
process.setAdmissionOpinion(null);
|
|
||||||
process.setFinalAuditUser(null);
|
|
||||||
process.setFinalAuditUserName(null);
|
|
||||||
process.setFinalAuditTime(null);
|
|
||||||
process.setFinalAuditOpinion(null);
|
|
||||||
process.setPaymentConfirmTime(null);
|
|
||||||
process.setCompletionTime(null);
|
|
||||||
process.setNoticeNumber(null);
|
|
||||||
|
|
||||||
return baseMapper.updateById(process) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
-92
@@ -1,92 +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="org.dromara.zsjy.mapper.ZsjyEnrollmentProcessMapper">
|
|
||||||
|
|
||||||
<resultMap type="org.dromara.zsjy.domain.vo.ZsjyEnrollmentProcessVo" id="ZsjyEnrollmentProcessResult">
|
|
||||||
<result property="id" column="id" />
|
|
||||||
<result property="enrollmentId" column="enrollment_id" />
|
|
||||||
<result property="studentName" column="student_name" />
|
|
||||||
<result property="idCard" column="id_card" />
|
|
||||||
<result property="currentStatus" column="current_status" />
|
|
||||||
<result property="currentHandler" column="current_handler" />
|
|
||||||
<result property="currentHandlerName" column="current_handler_name" />
|
|
||||||
<result property="infoAuditStatus" column="info_audit_status" />
|
|
||||||
<result property="infoAuditUser" column="info_audit_user" />
|
|
||||||
<result property="infoAuditUserName" column="info_audit_user_name" />
|
|
||||||
<result property="infoAuditTime" column="info_audit_time" />
|
|
||||||
<result property="infoAuditOpinion" column="info_audit_opinion" />
|
|
||||||
<result property="admissionStatus" column="admission_status" />
|
|
||||||
<result property="admissionUser" column="admission_user" />
|
|
||||||
<result property="admissionUserName" column="admission_user_name" />
|
|
||||||
<result property="admissionTime" column="admission_time" />
|
|
||||||
<result property="paymentStatus" column="payment_status" />
|
|
||||||
<result property="paymentConfirmTime" column="payment_confirm_time" />
|
|
||||||
<result property="noticeNumber" column="notice_number" />
|
|
||||||
<result property="admissionOpinion" column="admission_opinion" />
|
|
||||||
<result property="finalAuditStatus" column="final_audit_status" />
|
|
||||||
<result property="finalAuditUser" column="final_audit_user" />
|
|
||||||
<result property="finalAuditUserName" column="final_audit_user_name" />
|
|
||||||
<result property="finalAuditTime" column="final_audit_time" />
|
|
||||||
<result property="finalAuditOpinion" column="final_audit_opinion" />
|
|
||||||
<result property="isCompleted" column="is_completed" />
|
|
||||||
<result property="completionTime" column="completion_time" />
|
|
||||||
<result property="remark" column="remark" />
|
|
||||||
<result property="createTime" column="create_time" />
|
|
||||||
<result property="updateTime" column="update_time" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectZsjyEnrollmentProcessVo">
|
|
||||||
select id, enrollment_id, student_name, id_card, current_status, current_handler, current_handler_name,
|
|
||||||
info_audit_status, info_audit_user, info_audit_user_name, info_audit_time, info_audit_opinion,
|
|
||||||
admission_status, admission_user, admission_user_name, admission_time, payment_status,
|
|
||||||
payment_confirm_time, notice_number, admission_opinion, final_audit_status, final_audit_user,
|
|
||||||
final_audit_user_name, final_audit_time, final_audit_opinion, is_completed, completion_time,
|
|
||||||
remark, create_time, update_time
|
|
||||||
from zsjy_enrollment_process
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 根据报名信息ID查询流程状态 -->
|
|
||||||
<select id="selectByEnrollmentId" parameterType="Long" resultMap="ZsjyEnrollmentProcessResult">
|
|
||||||
<include refid="selectZsjyEnrollmentProcessVo"/>
|
|
||||||
where enrollment_id = #{enrollmentId} and deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 根据当前处理人查询待处理流程列表 -->
|
|
||||||
<select id="selectPendingByHandler" parameterType="Long" resultMap="ZsjyEnrollmentProcessResult">
|
|
||||||
<include refid="selectZsjyEnrollmentProcessVo"/>
|
|
||||||
where current_handler = #{currentHandler}
|
|
||||||
and current_status in ('0', '1', '2', '3')
|
|
||||||
and deleted = 0
|
|
||||||
order by create_time desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 根据流程状态查询流程列表 -->
|
|
||||||
<select id="selectByStatus" parameterType="String" resultMap="ZsjyEnrollmentProcessResult">
|
|
||||||
<include refid="selectZsjyEnrollmentProcessVo"/>
|
|
||||||
where current_status = #{currentStatus} and deleted = 0
|
|
||||||
order by create_time desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 统计各状态的流程数量 -->
|
|
||||||
<select id="selectStatusStatistics" resultType="map">
|
|
||||||
select current_status as status, count(*) as count
|
|
||||||
from zsjy_enrollment_process
|
|
||||||
where deleted = 0
|
|
||||||
group by current_status
|
|
||||||
order by current_status
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 根据学生姓名或身份证号模糊查询 -->
|
|
||||||
<select id="selectByKeyword" parameterType="String" resultMap="ZsjyEnrollmentProcessResult">
|
|
||||||
<include refid="selectZsjyEnrollmentProcessVo"/>
|
|
||||||
where deleted = 0
|
|
||||||
<if test="keyword != null and keyword != ''">
|
|
||||||
and (student_name like concat('%', #{keyword}, '%')
|
|
||||||
or id_card like concat('%', #{keyword}, '%'))
|
|
||||||
</if>
|
|
||||||
order by create_time desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
-- ========================================
|
|
||||||
-- 招生录取流程状态字典数据初始化脚本
|
|
||||||
-- 文件:zsjy-enrollment-process-dict-data.sql
|
|
||||||
-- 创建时间:2025-01-20
|
|
||||||
-- 说明:添加录取流程状态管理所需的字典数据
|
|
||||||
-- ========================================
|
|
||||||
|
|
||||||
-- ----------------------------
|
|
||||||
-- 1、添加字典类型
|
|
||||||
-- ----------------------------
|
|
||||||
|
|
||||||
-- 审核状态字典
|
|
||||||
INSERT INTO sys_dict_type VALUES (303, '000000', '审核状态', 'zsjy_audit_status', 103, 1, sysdate(), NULL, NULL, '审核状态列表');
|
|
||||||
|
|
||||||
-- 录取处理状态字典
|
|
||||||
INSERT INTO sys_dict_type VALUES (304, '000000', '录取处理状态', 'zsjy_process_status', 103, 1, sysdate(), NULL, NULL, '录取处理状态列表');
|
|
||||||
|
|
||||||
-- 缴费状态字典
|
|
||||||
INSERT INTO sys_dict_type VALUES (305, '000000', '缴费状态', 'zsjy_payment_status', 103, 1, sysdate(), NULL, NULL, '缴费状态列表');
|
|
||||||
|
|
||||||
-- ----------------------------
|
|
||||||
-- 2、添加字典数据
|
|
||||||
-- ----------------------------
|
|
||||||
|
|
||||||
-- 审核状态字典数据
|
|
||||||
INSERT INTO sys_dict_data VALUES (500, '000000', 1, '待审核', '0', 'zsjy_audit_status', '', 'info', 'Y', 103, 1, sysdate(), NULL, NULL, '等待审核');
|
|
||||||
INSERT INTO sys_dict_data VALUES (501, '000000', 2, '审核通过', '1', 'zsjy_audit_status', '', 'success', 'N', 103, 1, sysdate(), NULL, NULL, '审核通过');
|
|
||||||
INSERT INTO sys_dict_data VALUES (502, '000000', 3, '审核驳回', '9', 'zsjy_audit_status', '', 'danger', 'N', 103, 1, sysdate(), NULL, NULL, '审核驳回');
|
|
||||||
|
|
||||||
-- 录取处理状态字典数据
|
|
||||||
INSERT INTO sys_dict_data VALUES (510, '000000', 1, '待处理', '0', 'zsjy_process_status', '', 'info', 'Y', 103, 1, sysdate(), NULL, NULL, '等待处理');
|
|
||||||
INSERT INTO sys_dict_data VALUES (511, '000000', 2, '处理完成', '1', 'zsjy_process_status', '', 'success', 'N', 103, 1, sysdate(), NULL, NULL, '处理完成');
|
|
||||||
INSERT INTO sys_dict_data VALUES (512, '000000', 3, '处理驳回', '9', 'zsjy_process_status', '', 'danger', 'N', 103, 1, sysdate(), NULL, NULL, '处理驳回');
|
|
||||||
|
|
||||||
-- 缴费状态字典数据
|
|
||||||
INSERT INTO sys_dict_data VALUES (520, '000000', 1, '未缴费', '0', 'zsjy_payment_status', '', 'warning', 'Y', 103, 1, sysdate(), NULL, NULL, '未缴费');
|
|
||||||
INSERT INTO sys_dict_data VALUES (521, '000000', 2, '已缴费', '1', 'zsjy_payment_status', '', 'success', 'N', 103, 1, sysdate(), NULL, NULL, '已缴费');
|
|
||||||
|
|
||||||
-- 更新报名状态字典数据(补充完整)
|
|
||||||
INSERT INTO sys_dict_data VALUES (455, '000000', 6, '信息审核中', '1', 'zsjy_enrollment_status', '', 'primary', 'N', 103, 1, sysdate(), NULL, NULL, '信息审核中');
|
|
||||||
INSERT INTO sys_dict_data VALUES (456, '000000', 7, '录取处理中', '2', 'zsjy_enrollment_status', '', 'warning', 'N', 103, 1, sysdate(), NULL, NULL, '录取处理中');
|
|
||||||
INSERT INTO sys_dict_data VALUES (457, '000000', 8, '待最终确认', '3', 'zsjy_enrollment_status', '', 'primary', 'N', 103, 1, sysdate(), NULL, NULL, '待最终确认');
|
|
||||||
+60565
File diff suppressed because it is too large.
Load diff
@@ -13,7 +13,7 @@
|
|||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
<!-- 控制台日志文件输出 -->
|
||||||
<appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/sys-console.log</file>
|
<file>${log.path}/sys-console.log</file>
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
@@ -55,6 +55,21 @@
|
|||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
<!-- SQL日志输出 -->
|
||||||
|
<appender name="file_sql" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/sys-sql.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/sys-sql.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 7天 -->
|
||||||
|
<maxHistory>7</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/sys-error.log</file>
|
<file>${log.path}/sys-error.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
@@ -126,4 +141,29 @@
|
|||||||
<!-- <appender-ref ref="sky_log"/>-->
|
<!-- <appender-ref ref="sky_log"/>-->
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
|
<!-- 设置MyBatis的日志级别为DEBUG,以便打印SQL语句 -->
|
||||||
|
<logger name="org.dromara.xg.mapper" level="DEBUG">
|
||||||
|
<appender-ref ref="file_sql" />
|
||||||
|
</logger>
|
||||||
|
<logger name="org.dromara.xg.mapper.XgSysUserMapper" level="DEBUG">
|
||||||
|
<appender-ref ref="file_sql" />
|
||||||
|
<appender-ref ref="console" />
|
||||||
|
</logger>
|
||||||
|
<!-- 打印SQL参数 -->
|
||||||
|
<logger name="org.apache.ibatis" level="DEBUG">
|
||||||
|
<appender-ref ref="file_sql" />
|
||||||
|
</logger>
|
||||||
|
<logger name="java.sql" level="DEBUG">
|
||||||
|
<appender-ref ref="file_sql" />
|
||||||
|
</logger>
|
||||||
|
<logger name="java.sql.Connection" level="DEBUG">
|
||||||
|
<appender-ref ref="file_sql" />
|
||||||
|
</logger>
|
||||||
|
<logger name="java.sql.Statement" level="DEBUG">
|
||||||
|
<appender-ref ref="file_sql" />
|
||||||
|
</logger>
|
||||||
|
<logger name="java.sql.PreparedStatement" level="DEBUG">
|
||||||
|
<appender-ref ref="file_sql" />
|
||||||
|
</logger>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
+23
-20
@@ -2,6 +2,8 @@ package org.dromara.xg.controller;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
@@ -22,6 +24,7 @@ import org.dromara.xg.domain.vo.XgClassInfoVo;
|
|||||||
import org.dromara.xg.domain.bo.XgClassInfoBo;
|
import org.dromara.xg.domain.bo.XgClassInfoBo;
|
||||||
import org.dromara.xg.service.IXgClassInfoService;
|
import org.dromara.xg.service.IXgClassInfoService;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.system.domain.vo.SysUserVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 班级信息管理
|
* 班级信息管理
|
||||||
@@ -163,32 +166,32 @@ public class XgClassInfoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取班级可用选项列表(用于下拉框)
|
* 获取班级可用选项列表(用于下拉框)
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("xg:classInfo:query")
|
@SaCheckPermission("xg:class:list")
|
||||||
@GetMapping("/getClassOptions")
|
@GetMapping("/options")
|
||||||
public R<List<XgClassInfoVo>> getClassOptions() {
|
public R<List<XgClassInfoVo>> getOptions() {
|
||||||
return R.ok(xgClassInfoService.getClassOptions());
|
return R.ok(xgClassInfoService.getClassOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新班级学生统计数据
|
* 获取班主任用户列表(用于下拉框)
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("xg:classInfo:edit")
|
@SaCheckPermission("xg:class:list")
|
||||||
@Log(title = "班级信息", businessType = BusinessType.UPDATE)
|
@GetMapping("/teacherOptions")
|
||||||
@PostMapping("/updateStudentCount/{id}")
|
public R<List<Map<String, Object>>> getTeacherOptions() {
|
||||||
public R<Void> updateStudentCount(@NotNull(message = "班级ID不能为空")
|
List<SysUserVo> userList = xgClassInfoService.getClassTeacherOptions();
|
||||||
@PathVariable Long id) {
|
|
||||||
return toAjax(xgClassInfoService.updateStudentCount(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
// 将SysUserVo对象转换为前端需要的格式:{value: userId, label: nickName}
|
||||||
* 批量更新班级学生统计数据
|
List<Map<String, Object>> options = new ArrayList<>();
|
||||||
*/
|
if (userList != null && !userList.isEmpty()) {
|
||||||
@SaCheckPermission("xg:classInfo:edit")
|
for (SysUserVo user : userList) {
|
||||||
@Log(title = "班级信息", businessType = BusinessType.UPDATE)
|
Map<String, Object> option = new HashMap<>();
|
||||||
@PostMapping("/batchUpdateStudentCount")
|
option.put("value", user.getUserId());
|
||||||
public R<Void> batchUpdateStudentCount(@NotEmpty(message = "班级ID列表不能为空")
|
option.put("label", user.getNickName());
|
||||||
@RequestBody List<Long> ids) {
|
options.add(option);
|
||||||
return toAjax(xgClassInfoService.batchUpdateStudentCount(ids));
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return R.ok(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+103
@@ -0,0 +1,103 @@
|
|||||||
|
package org.dromara.xg.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.xg.domain.vo.XgClassTeacherRelationVo;
|
||||||
|
import org.dromara.xg.domain.bo.XgClassTeacherRelationBo;
|
||||||
|
import org.dromara.xg.service.IXgClassTeacherRelationService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任关系Controller
|
||||||
|
*
|
||||||
|
* @author Cursor AI
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/xg/classTeacherRelation")
|
||||||
|
public class XgClassTeacherRelationController extends BaseController {
|
||||||
|
|
||||||
|
private final IXgClassTeacherRelationService classTeacherRelationService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级班主任关系列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xg:classTeacherRelation:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<XgClassTeacherRelationVo> list(XgClassTeacherRelationBo bo, PageQuery pageQuery) {
|
||||||
|
return classTeacherRelationService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出班级班主任关系列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xg:classTeacherRelation:export")
|
||||||
|
@Log(title = "班级班主任关系", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(XgClassTeacherRelationBo bo, HttpServletResponse response) {
|
||||||
|
List<XgClassTeacherRelationVo> list = classTeacherRelationService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "班级班主任关系", XgClassTeacherRelationVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取班级班主任关系详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xg:classTeacherRelation:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<XgClassTeacherRelationVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||||
|
return R.ok(classTeacherRelationService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增班级班主任关系
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xg:classTeacherRelation:add")
|
||||||
|
@Log(title = "班级班主任关系", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody XgClassTeacherRelationBo bo) {
|
||||||
|
return toAjax(classTeacherRelationService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改班级班主任关系
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xg:classTeacherRelation:edit")
|
||||||
|
@Log(title = "班级班主任关系", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XgClassTeacherRelationBo bo) {
|
||||||
|
return toAjax(classTeacherRelationService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除班级班主任关系
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xg:classTeacherRelation:remove")
|
||||||
|
@Log(title = "班级班主任关系", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||||
|
return toAjax(classTeacherRelationService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
+81
@@ -0,0 +1,81 @@
|
|||||||
|
package org.dromara.xg.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任关系对象 xg_class_teacher_relation
|
||||||
|
*
|
||||||
|
* @author Cursor AI
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("xg_class_teacher_relation")
|
||||||
|
public class XgClassTeacherRelation extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级ID
|
||||||
|
*/
|
||||||
|
@TableField("class_id")
|
||||||
|
private Long classId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班主任用户ID
|
||||||
|
*/
|
||||||
|
@TableField("teacher_id")
|
||||||
|
private Long teacherId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0正常 1停用)
|
||||||
|
*/
|
||||||
|
@TableField("status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生效开始日期
|
||||||
|
*/
|
||||||
|
@TableField("start_date")
|
||||||
|
private LocalDateTime startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生效结束日期
|
||||||
|
*/
|
||||||
|
@TableField("end_date")
|
||||||
|
private LocalDateTime endDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户ID
|
||||||
|
*/
|
||||||
|
@TableField("tenant_id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
@TableField("deleted")
|
||||||
|
@TableLogic
|
||||||
|
private String deleted;
|
||||||
|
|
||||||
|
}
|
||||||
+112
@@ -0,0 +1,112 @@
|
|||||||
|
package org.dromara.xg.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgClassTeacherRelation;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任关系业务对象 xg_class_teacher_relation
|
||||||
|
*
|
||||||
|
* @author Cursor AI
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = XgClassTeacherRelation.class, reverseConvertGenerate = false)
|
||||||
|
public class XgClassTeacherRelationBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "班级ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long classId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班主任用户ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "班主任用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long teacherId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0正常 1停用)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生效开始日期
|
||||||
|
*/
|
||||||
|
private LocalDateTime startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生效结束日期
|
||||||
|
*/
|
||||||
|
private LocalDateTime endDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
// ========== 查询条件字段 ==========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级ID列表(用于批量查询)
|
||||||
|
*/
|
||||||
|
private List<Long> classIdList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班主任ID列表(用于批量查询)
|
||||||
|
*/
|
||||||
|
private List<Long> teacherIdList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态列表(用于批量查询)
|
||||||
|
*/
|
||||||
|
private List<String> statusList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间开始
|
||||||
|
*/
|
||||||
|
private String createTimeStart;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间结束
|
||||||
|
*/
|
||||||
|
private String createTimeEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生效开始日期开始
|
||||||
|
*/
|
||||||
|
private String startDateStart;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生效开始日期结束
|
||||||
|
*/
|
||||||
|
private String startDateEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生效结束日期开始
|
||||||
|
*/
|
||||||
|
private String endDateStart;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生效结束日期结束
|
||||||
|
*/
|
||||||
|
private String endDateEnd;
|
||||||
|
|
||||||
|
}
|
||||||
+117
@@ -0,0 +1,117 @@
|
|||||||
|
package org.dromara.xg.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgClassTeacherRelation;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任关系视图对象 xg_class_teacher_relation
|
||||||
|
*
|
||||||
|
* @author Cursor AI
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = XgClassTeacherRelation.class)
|
||||||
|
public class XgClassTeacherRelationVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级ID")
|
||||||
|
private Long classId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级名称(非数据库字段)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级名称")
|
||||||
|
private String className;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级代码(非数据库字段)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级代码")
|
||||||
|
private String classCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班主任用户ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班主任用户ID")
|
||||||
|
private Long teacherId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班主任姓名(非数据库字段)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班主任姓名")
|
||||||
|
private String teacherName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0正常 1停用)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "0=正常,1=停用")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生效开始日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "生效开始日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生效结束日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "生效结束日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime endDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
private Long updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "更新时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
package org.dromara.xg.mapper;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgClassTeacherRelation;
|
||||||
|
import org.dromara.xg.domain.vo.XgClassTeacherRelationVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任关系Mapper接口
|
||||||
|
*
|
||||||
|
* @author Cursor AI
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
public interface XgClassTeacherRelationMapper extends BaseMapperPlus<XgClassTeacherRelation, XgClassTeacherRelationVo> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级当前有效的班主任关系
|
||||||
|
*
|
||||||
|
* @param classId 班级ID
|
||||||
|
* @return 班级班主任关系
|
||||||
|
*/
|
||||||
|
XgClassTeacherRelation selectActiveRelationByClassId(@Param("classId") Long classId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将班级的所有班主任关系设置为失效
|
||||||
|
*
|
||||||
|
* @param classId 班级ID
|
||||||
|
* @param updateBy 更新者
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int invalidateRelationsByClassId(@Param("classId") Long classId, @Param("updateBy") Long updateBy);
|
||||||
|
|
||||||
|
}
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
package org.dromara.xg.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
import org.dromara.system.domain.SysUser;
|
||||||
|
import org.dromara.system.domain.vo.SysUserVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统用户Mapper接口扩展
|
||||||
|
*
|
||||||
|
* @author Cursor AI
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
public interface XgSysUserMapper extends BaseMapperPlus<SysUser, SysUserVo> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班主任角色的用户列表
|
||||||
|
*
|
||||||
|
* @param roleKey 角色标识
|
||||||
|
* @return 用户列表
|
||||||
|
*/
|
||||||
|
List<SysUserVo> selectUsersByRoleKey(@Param("roleKey") String roleKey);
|
||||||
|
|
||||||
|
}
|
||||||
+9
@@ -4,6 +4,8 @@ import org.dromara.xg.domain.vo.XgClassInfoVo;
|
|||||||
import org.dromara.xg.domain.bo.XgClassInfoBo;
|
import org.dromara.xg.domain.bo.XgClassInfoBo;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.system.domain.SysUser;
|
||||||
|
import org.dromara.system.domain.vo.SysUserVo;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -153,6 +155,13 @@ public interface IXgClassInfoService {
|
|||||||
*/
|
*/
|
||||||
Boolean disableClass(Long id);
|
Boolean disableClass(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取班主任用户列表
|
||||||
|
*
|
||||||
|
* @return 班主任用户列表
|
||||||
|
*/
|
||||||
|
List<SysUserVo> getClassTeacherOptions();
|
||||||
|
|
||||||
// ================================
|
// ================================
|
||||||
// 统计数据接口 - 新增
|
// 统计数据接口 - 新增
|
||||||
// ================================
|
// ================================
|
||||||
|
|||||||
+95
@@ -0,0 +1,95 @@
|
|||||||
|
package org.dromara.xg.service;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgClassTeacherRelation;
|
||||||
|
import org.dromara.xg.domain.bo.XgClassTeacherRelationBo;
|
||||||
|
import org.dromara.xg.domain.vo.XgClassTeacherRelationVo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任关系Service接口
|
||||||
|
*
|
||||||
|
* @author Cursor AI
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
public interface IXgClassTeacherRelationService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级班主任关系
|
||||||
|
*
|
||||||
|
* @param id 班级班主任关系主键
|
||||||
|
* @return 班级班主任关系
|
||||||
|
*/
|
||||||
|
XgClassTeacherRelationVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级班主任关系列表
|
||||||
|
*
|
||||||
|
* @param bo 班级班主任关系
|
||||||
|
* @return 班级班主任关系集合
|
||||||
|
*/
|
||||||
|
TableDataInfo<XgClassTeacherRelationVo> queryPageList(XgClassTeacherRelationBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级班主任关系列表
|
||||||
|
*
|
||||||
|
* @param bo 班级班主任关系
|
||||||
|
* @return 班级班主任关系集合
|
||||||
|
*/
|
||||||
|
List<XgClassTeacherRelationVo> queryList(XgClassTeacherRelationBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增班级班主任关系
|
||||||
|
*
|
||||||
|
* @param bo 班级班主任关系
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(XgClassTeacherRelationBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改班级班主任关系
|
||||||
|
*
|
||||||
|
* @param bo 班级班主任关系
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(XgClassTeacherRelationBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除班级班主任关系信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的班级班主任关系主键集合
|
||||||
|
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建班级班主任关系
|
||||||
|
*
|
||||||
|
* @param classId 班级ID
|
||||||
|
* @param teacherId 班主任ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
boolean createClassTeacherRelation(Long classId, Long teacherId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新班级班主任关系
|
||||||
|
*
|
||||||
|
* @param classId 班级ID
|
||||||
|
* @param teacherId 班主任ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
boolean updateClassTeacherRelation(Long classId, Long teacherId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取班级当前班主任
|
||||||
|
*
|
||||||
|
* @param classId 班级ID
|
||||||
|
* @return 班级班主任关系
|
||||||
|
*/
|
||||||
|
XgClassTeacherRelation getActiveTeacherByClassId(Long classId);
|
||||||
|
|
||||||
|
}
|
||||||
+221
-128
@@ -11,17 +11,21 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.dromara.xg.domain.bo.XgClassInfoBo;
|
import org.dromara.xg.domain.bo.XgClassInfoBo;
|
||||||
import org.dromara.xg.domain.vo.XgClassInfoVo;
|
import org.dromara.xg.domain.vo.XgClassInfoVo;
|
||||||
import org.dromara.xg.domain.XgClassInfo;
|
import org.dromara.xg.domain.XgClassInfo;
|
||||||
import org.dromara.xg.mapper.XgClassInfoMapper;
|
import org.dromara.xg.mapper.XgClassInfoMapper;
|
||||||
|
import org.dromara.xg.mapper.XgSysUserMapper;
|
||||||
import org.dromara.xg.service.IXgClassInfoService;
|
import org.dromara.xg.service.IXgClassInfoService;
|
||||||
|
import org.dromara.xg.service.IXgClassTeacherRelationService;
|
||||||
|
import org.dromara.system.domain.vo.SysUserVo;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,6 +41,8 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
private static final Logger log = LoggerFactory.getLogger(XgClassInfoServiceImpl.class);
|
private static final Logger log = LoggerFactory.getLogger(XgClassInfoServiceImpl.class);
|
||||||
|
|
||||||
private final XgClassInfoMapper baseMapper;
|
private final XgClassInfoMapper baseMapper;
|
||||||
|
private final XgSysUserMapper sysUserMapper;
|
||||||
|
private final IXgClassTeacherRelationService classTeacherRelationService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询班级信息
|
* 查询班级信息
|
||||||
@@ -98,30 +104,34 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
lqw.eq(bo.getGraduationYear() != null, XgClassInfo::getGraduationYear, bo.getGraduationYear());
|
lqw.eq(bo.getGraduationYear() != null, XgClassInfo::getGraduationYear, bo.getGraduationYear());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getMajorCode()), XgClassInfo::getMajorCode, bo.getMajorCode());
|
lqw.eq(StringUtils.isNotBlank(bo.getMajorCode()), XgClassInfo::getMajorCode, bo.getMajorCode());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getMajorName()), XgClassInfo::getMajorName, bo.getMajorName());
|
lqw.like(StringUtils.isNotBlank(bo.getMajorName()), XgClassInfo::getMajorName, bo.getMajorName());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getTrainingType()), XgClassInfo::getTrainingType, bo.getTrainingType());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getDegreeType()), XgClassInfo::getDegreeType, bo.getDegreeType());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getCollegeCode()), XgClassInfo::getCollegeCode, bo.getCollegeCode());
|
lqw.eq(StringUtils.isNotBlank(bo.getCollegeCode()), XgClassInfo::getCollegeCode, bo.getCollegeCode());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getCollegeName()), XgClassInfo::getCollegeName, bo.getCollegeName());
|
lqw.like(StringUtils.isNotBlank(bo.getCollegeName()), XgClassInfo::getCollegeName, bo.getCollegeName());
|
||||||
lqw.eq(bo.getCounselorId() != null, XgClassInfo::getCounselorId, bo.getCounselorId());
|
lqw.eq(bo.getCounselorId() != null, XgClassInfo::getCounselorId, bo.getCounselorId());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getCounselorName()), XgClassInfo::getCounselorName, bo.getCounselorName());
|
|
||||||
lqw.eq(bo.getClassTeacherId() != null, XgClassInfo::getClassTeacherId, bo.getClassTeacherId());
|
lqw.eq(bo.getClassTeacherId() != null, XgClassInfo::getClassTeacherId, bo.getClassTeacherId());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getClassTeacherName()), XgClassInfo::getClassTeacherName, bo.getClassTeacherName());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getClassStatus()), XgClassInfo::getClassStatus, bo.getClassStatus());
|
lqw.eq(StringUtils.isNotBlank(bo.getClassStatus()), XgClassInfo::getClassStatus, bo.getClassStatus());
|
||||||
lqw.eq(bo.getIsGraduation() != null, XgClassInfo::getIsGraduation, bo.getIsGraduation());
|
lqw.eq(bo.getIsGraduation() != null, XgClassInfo::getIsGraduation, bo.getIsGraduation());
|
||||||
|
|
||||||
// 批量查询条件
|
if (bo.getClassCodeList() != null && !bo.getClassCodeList().isEmpty()) {
|
||||||
lqw.in(bo.getClassCodeList() != null && !bo.getClassCodeList().isEmpty(), XgClassInfo::getClassCode, bo.getClassCodeList());
|
lqw.in(XgClassInfo::getClassCode, bo.getClassCodeList());
|
||||||
lqw.in(bo.getClassStatusList() != null && !bo.getClassStatusList().isEmpty(), XgClassInfo::getClassStatus, bo.getClassStatusList());
|
}
|
||||||
lqw.in(bo.getCollegeCodeList() != null && !bo.getCollegeCodeList().isEmpty(), XgClassInfo::getCollegeCode, bo.getCollegeCodeList());
|
if (bo.getClassStatusList() != null && !bo.getClassStatusList().isEmpty()) {
|
||||||
lqw.in(bo.getMajorCodeList() != null && !bo.getMajorCodeList().isEmpty(), XgClassInfo::getMajorCode, bo.getMajorCodeList());
|
lqw.in(XgClassInfo::getClassStatus, bo.getClassStatusList());
|
||||||
lqw.in(bo.getGradeList() != null && !bo.getGradeList().isEmpty(), XgClassInfo::getGrade, bo.getGradeList());
|
}
|
||||||
lqw.in(bo.getCounselorIdList() != null && !bo.getCounselorIdList().isEmpty(), XgClassInfo::getCounselorId, bo.getCounselorIdList());
|
if (bo.getCollegeCodeList() != null && !bo.getCollegeCodeList().isEmpty()) {
|
||||||
lqw.in(bo.getClassTeacherIdList() != null && !bo.getClassTeacherIdList().isEmpty(), XgClassInfo::getClassTeacherId, bo.getClassTeacherIdList());
|
lqw.in(XgClassInfo::getCollegeCode, bo.getCollegeCodeList());
|
||||||
|
}
|
||||||
// 时间范围查询
|
if (bo.getMajorCodeList() != null && !bo.getMajorCodeList().isEmpty()) {
|
||||||
lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
|
lqw.in(XgClassInfo::getMajorCode, bo.getMajorCodeList());
|
||||||
XgClassInfo::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime"));
|
}
|
||||||
|
if (bo.getGradeList() != null && !bo.getGradeList().isEmpty()) {
|
||||||
|
lqw.in(XgClassInfo::getGrade, bo.getGradeList());
|
||||||
|
}
|
||||||
|
if (bo.getCounselorIdList() != null && !bo.getCounselorIdList().isEmpty()) {
|
||||||
|
lqw.in(XgClassInfo::getCounselorId, bo.getCounselorIdList());
|
||||||
|
}
|
||||||
|
if (bo.getClassTeacherIdList() != null && !bo.getClassTeacherIdList().isEmpty()) {
|
||||||
|
lqw.in(XgClassInfo::getClassTeacherId, bo.getClassTeacherIdList());
|
||||||
|
}
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,12 +139,18 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
* 新增班级信息
|
* 新增班级信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean insertByBo(XgClassInfoBo bo) {
|
public Boolean insertByBo(XgClassInfoBo bo) {
|
||||||
XgClassInfo add = MapstructUtils.convert(bo, XgClassInfo.class);
|
XgClassInfo add = MapstructUtils.convert(bo, XgClassInfo.class);
|
||||||
validEntityBeforeSave(add);
|
validEntityBeforeSave(add);
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
if (flag) {
|
if (flag) {
|
||||||
bo.setId(add.getId());
|
bo.setId(add.getId());
|
||||||
|
|
||||||
|
// 如果指定了班主任,创建班级班主任关系
|
||||||
|
if (add.getClassTeacherId() != null) {
|
||||||
|
classTeacherRelationService.createClassTeacherRelation(add.getId(), add.getClassTeacherId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
@@ -143,10 +159,25 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
* 修改班级信息
|
* 修改班级信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean updateByBo(XgClassInfoBo bo) {
|
public Boolean updateByBo(XgClassInfoBo bo) {
|
||||||
|
// 获取原班级信息
|
||||||
|
XgClassInfo oldClass = baseMapper.selectById(bo.getId());
|
||||||
|
|
||||||
|
// 转换更新数据
|
||||||
XgClassInfo update = MapstructUtils.convert(bo, XgClassInfo.class);
|
XgClassInfo update = MapstructUtils.convert(bo, XgClassInfo.class);
|
||||||
validEntityBeforeSave(update);
|
validEntityBeforeSave(update);
|
||||||
return baseMapper.updateById(update) > 0;
|
boolean flag = baseMapper.updateById(update) > 0;
|
||||||
|
|
||||||
|
// 处理班主任关系变更
|
||||||
|
if (flag && update.getClassTeacherId() != null) {
|
||||||
|
// 如果班主任发生变化,更新班级班主任关系
|
||||||
|
if (oldClass == null || !update.getClassTeacherId().equals(oldClass.getClassTeacherId())) {
|
||||||
|
classTeacherRelationService.updateClassTeacherRelation(update.getId(), update.getClassTeacherId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -235,8 +266,6 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
public List<XgClassInfoVo> queryByGrade(String grade) {
|
public List<XgClassInfoVo> queryByGrade(String grade) {
|
||||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(XgClassInfo::getGrade, grade);
|
lqw.eq(XgClassInfo::getGrade, grade);
|
||||||
lqw.eq(XgClassInfo::getClassStatus, "1");
|
|
||||||
lqw.orderByAsc(XgClassInfo::getClassCode);
|
|
||||||
return baseMapper.selectVoList(lqw);
|
return baseMapper.selectVoList(lqw);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,8 +276,6 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
public List<XgClassInfoVo> queryByCollegeCode(String collegeCode) {
|
public List<XgClassInfoVo> queryByCollegeCode(String collegeCode) {
|
||||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(XgClassInfo::getCollegeCode, collegeCode);
|
lqw.eq(XgClassInfo::getCollegeCode, collegeCode);
|
||||||
lqw.eq(XgClassInfo::getClassStatus, "1");
|
|
||||||
lqw.orderByAsc(XgClassInfo::getGrade, XgClassInfo::getClassCode);
|
|
||||||
return baseMapper.selectVoList(lqw);
|
return baseMapper.selectVoList(lqw);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,8 +286,6 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
public List<XgClassInfoVo> queryByMajorCode(String majorCode) {
|
public List<XgClassInfoVo> queryByMajorCode(String majorCode) {
|
||||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(XgClassInfo::getMajorCode, majorCode);
|
lqw.eq(XgClassInfo::getMajorCode, majorCode);
|
||||||
lqw.eq(XgClassInfo::getClassStatus, "1");
|
|
||||||
lqw.orderByAsc(XgClassInfo::getGrade, XgClassInfo::getClassCode);
|
|
||||||
return baseMapper.selectVoList(lqw);
|
return baseMapper.selectVoList(lqw);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,8 +296,6 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
public List<XgClassInfoVo> queryByCounselorId(Long counselorId) {
|
public List<XgClassInfoVo> queryByCounselorId(Long counselorId) {
|
||||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(XgClassInfo::getCounselorId, counselorId);
|
lqw.eq(XgClassInfo::getCounselorId, counselorId);
|
||||||
lqw.eq(XgClassInfo::getClassStatus, "1");
|
|
||||||
lqw.orderByAsc(XgClassInfo::getGrade, XgClassInfo::getClassCode);
|
|
||||||
return baseMapper.selectVoList(lqw);
|
return baseMapper.selectVoList(lqw);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,8 +306,6 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
public List<XgClassInfoVo> queryByClassTeacherId(Long classTeacherId) {
|
public List<XgClassInfoVo> queryByClassTeacherId(Long classTeacherId) {
|
||||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(XgClassInfo::getClassTeacherId, classTeacherId);
|
lqw.eq(XgClassInfo::getClassTeacherId, classTeacherId);
|
||||||
lqw.eq(XgClassInfo::getClassStatus, "1");
|
|
||||||
lqw.orderByAsc(XgClassInfo::getGrade, XgClassInfo::getClassCode);
|
|
||||||
return baseMapper.selectVoList(lqw);
|
return baseMapper.selectVoList(lqw);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,30 +315,60 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
@Override
|
@Override
|
||||||
public List<XgClassInfoVo> getClassOptions() {
|
public List<XgClassInfoVo> getClassOptions() {
|
||||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.select(XgClassInfo::getId, XgClassInfo::getClassCode, XgClassInfo::getClassName);
|
||||||
lqw.eq(XgClassInfo::getClassStatus, "1");
|
lqw.eq(XgClassInfo::getClassStatus, "1");
|
||||||
lqw.select(XgClassInfo::getId, XgClassInfo::getClassCode, XgClassInfo::getClassName,
|
lqw.orderByAsc(XgClassInfo::getGrade);
|
||||||
XgClassInfo::getGrade, XgClassInfo::getMajorName, XgClassInfo::getCollegeName);
|
|
||||||
lqw.orderByAsc(XgClassInfo::getGrade, XgClassInfo::getClassCode);
|
|
||||||
return baseMapper.selectVoList(lqw);
|
return baseMapper.selectVoList(lqw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取班主任用户列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysUserVo> getClassTeacherOptions() {
|
||||||
|
log.info("开始查询班主任角色用户列表,roleKey=head_teacher");
|
||||||
|
try {
|
||||||
|
// 查询班主任角色的用户列表
|
||||||
|
List<SysUserVo> userList = sysUserMapper.selectUsersByRoleKey("head_teacher"); // head_teacher是班主任角色的role_key
|
||||||
|
|
||||||
|
// 打印详细的结果信息
|
||||||
|
if (userList != null && !userList.isEmpty()) {
|
||||||
|
log.info("查询班主任角色用户成功,找到 {} 个班主任用户", userList.size());
|
||||||
|
for (int i = 0; i < userList.size(); i++) {
|
||||||
|
SysUserVo user = userList.get(i);
|
||||||
|
log.info("班主任用户[{}]: userId={}, userName={}, nickName={}",
|
||||||
|
i+1, user.getUserId(), user.getUserName(), user.getNickName());
|
||||||
|
|
||||||
|
// 确保userId和nickName字段不为空,这些字段将用作前端的value和label
|
||||||
|
if (user.getUserId() == null) {
|
||||||
|
log.warn("班主任用户[{}]的userId为空", i+1);
|
||||||
|
}
|
||||||
|
if (user.getNickName() == null || user.getNickName().isEmpty()) {
|
||||||
|
log.warn("班主任用户[{}]的nickName为空", i+1);
|
||||||
|
// 如果昵称为空,使用用户名代替
|
||||||
|
if (user.getUserName() != null && !user.getUserName().isEmpty()) {
|
||||||
|
user.setNickName(user.getUserName());
|
||||||
|
log.info("班主任用户[{}]的nickName为空,使用userName代替: {}", i+1, user.getUserName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
log.warn("没有找到班主任角色(head_teacher)的用户,请检查角色配置和用户分配");
|
||||||
|
}
|
||||||
|
return userList;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("查询班主任角色用户异常", e);
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新班级学生统计数据
|
* 更新班级学生统计数据
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateStudentCount(Long classId) {
|
public Boolean updateStudentCount(Long classId) {
|
||||||
// TODO: 实现学生统计数据更新逻辑
|
// TODO: 实现班级学生统计数据更新逻辑
|
||||||
// 1. 查询班级下的学生数量
|
return true;
|
||||||
// 2. 统计男女学生数量
|
|
||||||
// 3. 统计在籍学生数量
|
|
||||||
// 4. 更新班级统计字段
|
|
||||||
|
|
||||||
XgClassInfo classInfo = baseMapper.selectById(classId);
|
|
||||||
if (classInfo != null) {
|
|
||||||
classInfo.setLastCountUpdate(LocalDateTime.now());
|
|
||||||
return baseMapper.updateById(classInfo) > 0;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -325,11 +376,13 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean batchUpdateStudentCount(Collection<Long> classIds) {
|
public Boolean batchUpdateStudentCount(Collection<Long> classIds) {
|
||||||
boolean result = true;
|
if (classIds == null || classIds.isEmpty()) {
|
||||||
for (Long classId : classIds) {
|
return false;
|
||||||
result = result && updateStudentCount(classId);
|
|
||||||
}
|
}
|
||||||
return result;
|
for (Long classId : classIds) {
|
||||||
|
updateStudentCount(classId);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -337,12 +390,10 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean enableClass(Long id) {
|
public Boolean enableClass(Long id) {
|
||||||
XgClassInfo classInfo = baseMapper.selectById(id);
|
XgClassInfo update = new XgClassInfo();
|
||||||
if (classInfo != null) {
|
update.setId(id);
|
||||||
classInfo.setClassStatus("1");
|
update.setClassStatus("1");
|
||||||
return baseMapper.updateById(classInfo) > 0;
|
return baseMapper.updateById(update) > 0;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -350,18 +401,12 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean disableClass(Long id) {
|
public Boolean disableClass(Long id) {
|
||||||
XgClassInfo classInfo = baseMapper.selectById(id);
|
XgClassInfo update = new XgClassInfo();
|
||||||
if (classInfo != null) {
|
update.setId(id);
|
||||||
classInfo.setClassStatus("0");
|
update.setClassStatus("2");
|
||||||
return baseMapper.updateById(classInfo) > 0;
|
return baseMapper.updateById(update) > 0;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ================================
|
|
||||||
// 统计数据接口实现 - 新增
|
|
||||||
// ================================
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取班级信息统计概览
|
* 获取班级信息统计概览
|
||||||
*/
|
*/
|
||||||
@@ -369,38 +414,49 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
public Map<String, Object> getStatistics() {
|
public Map<String, Object> getStatistics() {
|
||||||
Map<String, Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
|
||||||
// 总班级数
|
// 班级总数
|
||||||
LambdaQueryWrapper<XgClassInfo> totalLqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> totalLqw = Wrappers.lambdaQuery();
|
||||||
long totalCount = baseMapper.selectCount(totalLqw);
|
long totalCount = baseMapper.selectCount(totalLqw);
|
||||||
result.put("totalCount", totalCount);
|
result.put("totalCount", totalCount);
|
||||||
|
|
||||||
// 正常班级数
|
// 正常班级数量
|
||||||
LambdaQueryWrapper<XgClassInfo> activeLqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> normalLqw = Wrappers.lambdaQuery();
|
||||||
activeLqw.eq(XgClassInfo::getClassStatus, "1");
|
normalLqw.eq(XgClassInfo::getClassStatus, "1");
|
||||||
long activeCount = baseMapper.selectCount(activeLqw);
|
long normalCount = baseMapper.selectCount(normalLqw);
|
||||||
result.put("activeCount", activeCount);
|
result.put("normalCount", normalCount);
|
||||||
|
|
||||||
// 暂停班级数
|
// 暂停班级数量
|
||||||
LambdaQueryWrapper<XgClassInfo> pausedLqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> pausedLqw = Wrappers.lambdaQuery();
|
||||||
pausedLqw.eq(XgClassInfo::getClassStatus, "2");
|
pausedLqw.eq(XgClassInfo::getClassStatus, "2");
|
||||||
long pausedCount = baseMapper.selectCount(pausedLqw);
|
long pausedCount = baseMapper.selectCount(pausedLqw);
|
||||||
result.put("pausedCount", pausedCount);
|
result.put("pausedCount", pausedCount);
|
||||||
|
|
||||||
// 已毕业班级数
|
// 毕业班级数量
|
||||||
LambdaQueryWrapper<XgClassInfo> graduatedLqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> graduatedLqw = Wrappers.lambdaQuery();
|
||||||
graduatedLqw.eq(XgClassInfo::getClassStatus, "3");
|
graduatedLqw.eq(XgClassInfo::getClassStatus, "3");
|
||||||
long graduatedCount = baseMapper.selectCount(graduatedLqw);
|
long graduatedCount = baseMapper.selectCount(graduatedLqw);
|
||||||
result.put("graduatedCount", graduatedCount);
|
result.put("graduatedCount", graduatedCount);
|
||||||
|
|
||||||
// 总学生数(统计当前学生数量字段的总和)
|
// 解散班级数量
|
||||||
|
LambdaQueryWrapper<XgClassInfo> disbandedLqw = Wrappers.lambdaQuery();
|
||||||
|
disbandedLqw.eq(XgClassInfo::getClassStatus, "4");
|
||||||
|
long disbandedCount = baseMapper.selectCount(disbandedLqw);
|
||||||
|
result.put("disbandedCount", disbandedCount);
|
||||||
|
|
||||||
|
// 学生总数
|
||||||
LambdaQueryWrapper<XgClassInfo> studentLqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> studentLqw = Wrappers.lambdaQuery();
|
||||||
studentLqw.select(XgClassInfo::getCurrentStudentCount);
|
|
||||||
List<XgClassInfo> classList = baseMapper.selectList(studentLqw);
|
List<XgClassInfo> classList = baseMapper.selectList(studentLqw);
|
||||||
long totalStudents = classList.stream()
|
int totalStudents = classList.stream().mapToInt(XgClassInfo::getCurrentStudentCount).sum();
|
||||||
.mapToLong(c -> c.getCurrentStudentCount() != null ? c.getCurrentStudentCount() : 0)
|
|
||||||
.sum();
|
|
||||||
result.put("totalStudents", totalStudents);
|
result.put("totalStudents", totalStudents);
|
||||||
|
|
||||||
|
// 男生总数
|
||||||
|
int totalMale = classList.stream().mapToInt(XgClassInfo::getMaleCount).sum();
|
||||||
|
result.put("totalMale", totalMale);
|
||||||
|
|
||||||
|
// 女生总数
|
||||||
|
int totalFemale = classList.stream().mapToInt(XgClassInfo::getFemaleCount).sum();
|
||||||
|
result.put("totalFemale", totalFemale);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -409,23 +465,29 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> countByCollege() {
|
public List<Map<String, Object>> countByCollege() {
|
||||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
|
||||||
lqw.select(XgClassInfo::getCollegeCode, XgClassInfo::getCollegeName)
|
|
||||||
.groupBy(XgClassInfo::getCollegeCode, XgClassInfo::getCollegeName);
|
|
||||||
|
|
||||||
List<XgClassInfo> list = baseMapper.selectList(lqw);
|
|
||||||
List<Map<String, Object>> result = new ArrayList<>();
|
List<Map<String, Object>> result = new ArrayList<>();
|
||||||
|
|
||||||
for (XgClassInfo item : list) {
|
// 查询所有学院
|
||||||
|
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.select(XgClassInfo::getCollegeCode, XgClassInfo::getCollegeName);
|
||||||
|
lqw.groupBy(XgClassInfo::getCollegeCode, XgClassInfo::getCollegeName);
|
||||||
|
List<XgClassInfo> collegeList = baseMapper.selectList(lqw);
|
||||||
|
|
||||||
|
// 统计各学院班级数量
|
||||||
|
for (XgClassInfo college : collegeList) {
|
||||||
|
if (StringUtils.isBlank(college.getCollegeCode())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
LambdaQueryWrapper<XgClassInfo> countLqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> countLqw = Wrappers.lambdaQuery();
|
||||||
countLqw.eq(XgClassInfo::getCollegeCode, item.getCollegeCode());
|
countLqw.eq(XgClassInfo::getCollegeCode, college.getCollegeCode());
|
||||||
long count = baseMapper.selectCount(countLqw);
|
long count = baseMapper.selectCount(countLqw);
|
||||||
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> item = new HashMap<>();
|
||||||
map.put("collegeCode", item.getCollegeCode());
|
item.put("collegeCode", college.getCollegeCode());
|
||||||
map.put("collegeName", item.getCollegeName());
|
item.put("collegeName", college.getCollegeName());
|
||||||
map.put("count", count);
|
item.put("count", count);
|
||||||
result.add(map);
|
result.add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -436,22 +498,28 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> countByGrade() {
|
public List<Map<String, Object>> countByGrade() {
|
||||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
|
||||||
lqw.select(XgClassInfo::getGrade)
|
|
||||||
.groupBy(XgClassInfo::getGrade);
|
|
||||||
|
|
||||||
List<XgClassInfo> list = baseMapper.selectList(lqw);
|
|
||||||
List<Map<String, Object>> result = new ArrayList<>();
|
List<Map<String, Object>> result = new ArrayList<>();
|
||||||
|
|
||||||
for (XgClassInfo item : list) {
|
// 查询所有年级
|
||||||
|
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.select(XgClassInfo::getGrade);
|
||||||
|
lqw.groupBy(XgClassInfo::getGrade);
|
||||||
|
List<XgClassInfo> gradeList = baseMapper.selectList(lqw);
|
||||||
|
|
||||||
|
// 统计各年级班级数量
|
||||||
|
for (XgClassInfo grade : gradeList) {
|
||||||
|
if (StringUtils.isBlank(grade.getGrade())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
LambdaQueryWrapper<XgClassInfo> countLqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> countLqw = Wrappers.lambdaQuery();
|
||||||
countLqw.eq(XgClassInfo::getGrade, item.getGrade());
|
countLqw.eq(XgClassInfo::getGrade, grade.getGrade());
|
||||||
long count = baseMapper.selectCount(countLqw);
|
long count = baseMapper.selectCount(countLqw);
|
||||||
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> item = new HashMap<>();
|
||||||
map.put("grade", item.getGrade());
|
item.put("grade", grade.getGrade());
|
||||||
map.put("count", count);
|
item.put("count", count);
|
||||||
result.add(map);
|
result.add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -462,23 +530,29 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> countByMajor() {
|
public List<Map<String, Object>> countByMajor() {
|
||||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
|
||||||
lqw.select(XgClassInfo::getMajorCode, XgClassInfo::getMajorName)
|
|
||||||
.groupBy(XgClassInfo::getMajorCode, XgClassInfo::getMajorName);
|
|
||||||
|
|
||||||
List<XgClassInfo> list = baseMapper.selectList(lqw);
|
|
||||||
List<Map<String, Object>> result = new ArrayList<>();
|
List<Map<String, Object>> result = new ArrayList<>();
|
||||||
|
|
||||||
for (XgClassInfo item : list) {
|
// 查询所有专业
|
||||||
|
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.select(XgClassInfo::getMajorCode, XgClassInfo::getMajorName);
|
||||||
|
lqw.groupBy(XgClassInfo::getMajorCode, XgClassInfo::getMajorName);
|
||||||
|
List<XgClassInfo> majorList = baseMapper.selectList(lqw);
|
||||||
|
|
||||||
|
// 统计各专业班级数量
|
||||||
|
for (XgClassInfo major : majorList) {
|
||||||
|
if (StringUtils.isBlank(major.getMajorCode())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
LambdaQueryWrapper<XgClassInfo> countLqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XgClassInfo> countLqw = Wrappers.lambdaQuery();
|
||||||
countLqw.eq(XgClassInfo::getMajorCode, item.getMajorCode());
|
countLqw.eq(XgClassInfo::getMajorCode, major.getMajorCode());
|
||||||
long count = baseMapper.selectCount(countLqw);
|
long count = baseMapper.selectCount(countLqw);
|
||||||
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> item = new HashMap<>();
|
||||||
map.put("majorCode", item.getMajorCode());
|
item.put("majorCode", major.getMajorCode());
|
||||||
map.put("majorName", item.getMajorName());
|
item.put("majorName", major.getMajorName());
|
||||||
map.put("count", count);
|
item.put("count", count);
|
||||||
result.add(map);
|
result.add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -491,23 +565,42 @@ public class XgClassInfoServiceImpl implements IXgClassInfoService {
|
|||||||
public List<Map<String, Object>> countByStatus() {
|
public List<Map<String, Object>> countByStatus() {
|
||||||
List<Map<String, Object>> result = new ArrayList<>();
|
List<Map<String, Object>> result = new ArrayList<>();
|
||||||
|
|
||||||
// 状态码对应的名称
|
// 正常班级数量
|
||||||
String[] statusCodes = {"1", "2", "3", "4"};
|
Map<String, Object> normal = new HashMap<>();
|
||||||
String[] statusNames = {"正常", "暂停", "毕业", "解散"};
|
normal.put("status", "1");
|
||||||
|
normal.put("name", "正常");
|
||||||
|
LambdaQueryWrapper<XgClassInfo> normalLqw = Wrappers.lambdaQuery();
|
||||||
|
normalLqw.eq(XgClassInfo::getClassStatus, "1");
|
||||||
|
normal.put("value", baseMapper.selectCount(normalLqw));
|
||||||
|
result.add(normal);
|
||||||
|
|
||||||
for (int i = 0; i < statusCodes.length; i++) {
|
// 暂停班级数量
|
||||||
LambdaQueryWrapper<XgClassInfo> lqw = Wrappers.lambdaQuery();
|
Map<String, Object> paused = new HashMap<>();
|
||||||
lqw.eq(XgClassInfo::getClassStatus, statusCodes[i]);
|
paused.put("status", "2");
|
||||||
long count = baseMapper.selectCount(lqw);
|
paused.put("name", "暂停");
|
||||||
|
LambdaQueryWrapper<XgClassInfo> pausedLqw = Wrappers.lambdaQuery();
|
||||||
|
pausedLqw.eq(XgClassInfo::getClassStatus, "2");
|
||||||
|
paused.put("value", baseMapper.selectCount(pausedLqw));
|
||||||
|
result.add(paused);
|
||||||
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
// 毕业班级数量
|
||||||
map.put("statusCode", statusCodes[i]);
|
Map<String, Object> graduated = new HashMap<>();
|
||||||
map.put("statusName", statusNames[i]);
|
graduated.put("status", "3");
|
||||||
map.put("count", count);
|
graduated.put("name", "毕业");
|
||||||
result.add(map);
|
LambdaQueryWrapper<XgClassInfo> graduatedLqw = Wrappers.lambdaQuery();
|
||||||
}
|
graduatedLqw.eq(XgClassInfo::getClassStatus, "3");
|
||||||
|
graduated.put("value", baseMapper.selectCount(graduatedLqw));
|
||||||
|
result.add(graduated);
|
||||||
|
|
||||||
|
// 解散班级数量
|
||||||
|
Map<String, Object> disbanded = new HashMap<>();
|
||||||
|
disbanded.put("status", "4");
|
||||||
|
disbanded.put("name", "解散");
|
||||||
|
LambdaQueryWrapper<XgClassInfo> disbandedLqw = Wrappers.lambdaQuery();
|
||||||
|
disbandedLqw.eq(XgClassInfo::getClassStatus, "4");
|
||||||
|
disbanded.put("value", baseMapper.selectCount(disbandedLqw));
|
||||||
|
result.add(disbanded);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+186
@@ -0,0 +1,186 @@
|
|||||||
|
package org.dromara.xg.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.xg.domain.XgClassTeacherRelation;
|
||||||
|
import org.dromara.xg.domain.bo.XgClassTeacherRelationBo;
|
||||||
|
import org.dromara.xg.domain.vo.XgClassTeacherRelationVo;
|
||||||
|
import org.dromara.xg.mapper.XgClassTeacherRelationMapper;
|
||||||
|
import org.dromara.xg.service.IXgClassTeacherRelationService;
|
||||||
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任关系Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Cursor AI
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class XgClassTeacherRelationServiceImpl implements IXgClassTeacherRelationService {
|
||||||
|
|
||||||
|
private final XgClassTeacherRelationMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级班主任关系
|
||||||
|
*
|
||||||
|
* @param id 班级班主任关系主键
|
||||||
|
* @return 班级班主任关系
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public XgClassTeacherRelationVo queryById(Long id) {
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级班主任关系列表
|
||||||
|
*
|
||||||
|
* @param bo 班级班主任关系
|
||||||
|
* @return 班级班主任关系
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<XgClassTeacherRelationVo> queryPageList(XgClassTeacherRelationBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<XgClassTeacherRelation> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<XgClassTeacherRelationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级班主任关系列表
|
||||||
|
*
|
||||||
|
* @param bo 班级班主任关系
|
||||||
|
* @return 班级班主任关系
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<XgClassTeacherRelationVo> queryList(XgClassTeacherRelationBo bo) {
|
||||||
|
LambdaQueryWrapper<XgClassTeacherRelation> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<XgClassTeacherRelation> buildQueryWrapper(XgClassTeacherRelationBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<XgClassTeacherRelation> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(bo.getClassId() != null, XgClassTeacherRelation::getClassId, bo.getClassId());
|
||||||
|
lqw.eq(bo.getTeacherId() != null, XgClassTeacherRelation::getTeacherId, bo.getTeacherId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), XgClassTeacherRelation::getStatus, bo.getStatus());
|
||||||
|
lqw.eq(bo.getStartDate() != null, XgClassTeacherRelation::getStartDate, bo.getStartDate());
|
||||||
|
lqw.eq(bo.getEndDate() != null, XgClassTeacherRelation::getEndDate, bo.getEndDate());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增班级班主任关系
|
||||||
|
*
|
||||||
|
* @param bo 班级班主任关系
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(XgClassTeacherRelationBo bo) {
|
||||||
|
XgClassTeacherRelation add = MapstructUtils.convert(bo, XgClassTeacherRelation.class);
|
||||||
|
// 设置默认值
|
||||||
|
if (StringUtils.isBlank(add.getStatus())) {
|
||||||
|
add.setStatus("0"); // 默认状态为正常
|
||||||
|
}
|
||||||
|
if (add.getStartDate() == null) {
|
||||||
|
add.setStartDate(LocalDateTime.now()); // 默认开始时间为当前时间
|
||||||
|
}
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改班级班主任关系
|
||||||
|
*
|
||||||
|
* @param bo 班级班主任关系
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(XgClassTeacherRelationBo bo) {
|
||||||
|
XgClassTeacherRelation update = MapstructUtils.convert(bo, XgClassTeacherRelation.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*
|
||||||
|
* @param entity 实体类数据
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(XgClassTeacherRelation entity) {
|
||||||
|
// 校验逻辑
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除班级班主任关系
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的班级班主任关系主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
// 校验是否允许删除
|
||||||
|
}
|
||||||
|
return baseMapper.deleteBatchIds(ids) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建班级班主任关系
|
||||||
|
*
|
||||||
|
* @param classId 班级ID
|
||||||
|
* @param teacherId 班主任ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean createClassTeacherRelation(Long classId, Long teacherId) {
|
||||||
|
XgClassTeacherRelationBo bo = new XgClassTeacherRelationBo();
|
||||||
|
bo.setClassId(classId);
|
||||||
|
bo.setTeacherId(teacherId);
|
||||||
|
bo.setStatus("0"); // 正常状态
|
||||||
|
bo.setStartDate(LocalDateTime.now());
|
||||||
|
return insertByBo(bo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新班级班主任关系
|
||||||
|
*
|
||||||
|
* @param classId 班级ID
|
||||||
|
* @param teacherId 班主任ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean updateClassTeacherRelation(Long classId, Long teacherId) {
|
||||||
|
// 将当前班级的所有班主任关系设置为失效
|
||||||
|
baseMapper.invalidateRelationsByClassId(classId, LoginHelper.getUserId());
|
||||||
|
|
||||||
|
// 创建新的班主任关系
|
||||||
|
return createClassTeacherRelation(classId, teacherId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取班级当前班主任
|
||||||
|
*
|
||||||
|
* @param classId 班级ID
|
||||||
|
* @return 班级班主任关系
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public XgClassTeacherRelation getActiveTeacherByClassId(Long classId) {
|
||||||
|
return baseMapper.selectActiveRelationByClassId(classId);
|
||||||
|
}
|
||||||
|
}
|
||||||
+121
@@ -0,0 +1,121 @@
|
|||||||
|
<?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="org.dromara.xg.mapper.XgClassTeacherRelationMapper">
|
||||||
|
|
||||||
|
<resultMap type="org.dromara.xg.domain.XgClassTeacherRelation" id="XgClassTeacherRelationResult">
|
||||||
|
<id property="id" column="id"/>
|
||||||
|
<result property="classId" column="class_id"/>
|
||||||
|
<result property="teacherId" column="teacher_id"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
<result property="startDate" column="start_date"/>
|
||||||
|
<result property="endDate" column="end_date"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="tenantId" column="tenant_id"/>
|
||||||
|
<result property="deleted" column="deleted"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap type="org.dromara.xg.domain.vo.XgClassTeacherRelationVo" id="XgClassTeacherRelationVoResult">
|
||||||
|
<id property="id" column="id"/>
|
||||||
|
<result property="classId" column="class_id"/>
|
||||||
|
<result property="className" column="class_name"/>
|
||||||
|
<result property="classCode" column="class_code"/>
|
||||||
|
<result property="teacherId" column="teacher_id"/>
|
||||||
|
<result property="teacherName" column="teacher_name"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
<result property="startDate" column="start_date"/>
|
||||||
|
<result property="endDate" column="end_date"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectXgClassTeacherRelationVo">
|
||||||
|
select r.id, r.class_id, c.class_name, c.class_code, r.teacher_id,
|
||||||
|
u.nick_name as teacher_name, r.status, r.start_date, r.end_date,
|
||||||
|
r.remark, r.create_by, r.create_time, r.update_by, r.update_time
|
||||||
|
from xg_class_teacher_relation r
|
||||||
|
left join xg_class_info c on c.id = r.class_id
|
||||||
|
left join sys_user u on u.user_id = r.teacher_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectXgClassTeacherRelationList" parameterType="org.dromara.xg.domain.bo.XgClassTeacherRelationBo" resultMap="XgClassTeacherRelationVoResult">
|
||||||
|
<include refid="selectXgClassTeacherRelationVo"/>
|
||||||
|
<where>
|
||||||
|
r.deleted = '0'
|
||||||
|
<if test="classId != null">and r.class_id = #{classId}</if>
|
||||||
|
<if test="teacherId != null">and r.teacher_id = #{teacherId}</if>
|
||||||
|
<if test="status != null and status != ''">and r.status = #{status}</if>
|
||||||
|
<if test="startDate != null">and r.start_date = #{startDate}</if>
|
||||||
|
<if test="endDate != null">and r.end_date = #{endDate}</if>
|
||||||
|
<if test="classIdList != null and classIdList.size() > 0">
|
||||||
|
and r.class_id in
|
||||||
|
<foreach item="classId" collection="classIdList" open="(" separator="," close=")">
|
||||||
|
#{classId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="teacherIdList != null and teacherIdList.size() > 0">
|
||||||
|
and r.teacher_id in
|
||||||
|
<foreach item="teacherId" collection="teacherIdList" open="(" separator="," close=")">
|
||||||
|
#{teacherId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="statusList != null and statusList.size() > 0">
|
||||||
|
and r.status in
|
||||||
|
<foreach item="status" collection="statusList" open="(" separator="," close=")">
|
||||||
|
#{status}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="createTimeStart != null and createTimeStart != ''">
|
||||||
|
and r.create_time >= #{createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="createTimeEnd != null and createTimeEnd != ''">
|
||||||
|
and r.create_time <= #{createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="startDateStart != null and startDateStart != ''">
|
||||||
|
and r.start_date >= #{startDateStart}
|
||||||
|
</if>
|
||||||
|
<if test="startDateEnd != null and startDateEnd != ''">
|
||||||
|
and r.start_date <= #{startDateEnd}
|
||||||
|
</if>
|
||||||
|
<if test="endDateStart != null and endDateStart != ''">
|
||||||
|
and r.end_date >= #{endDateStart}
|
||||||
|
</if>
|
||||||
|
<if test="endDateEnd != null and endDateEnd != ''">
|
||||||
|
and r.end_date <= #{endDateEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by r.create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectActiveRelationByClassId" parameterType="Long" resultMap="XgClassTeacherRelationResult">
|
||||||
|
select id, class_id, teacher_id, status, start_date, end_date, remark,
|
||||||
|
create_by, create_time, update_by, update_time, tenant_id, deleted
|
||||||
|
from xg_class_teacher_relation
|
||||||
|
where class_id = #{classId}
|
||||||
|
and status = '0'
|
||||||
|
and deleted = '0'
|
||||||
|
and (end_date is null or end_date > now())
|
||||||
|
order by create_time desc
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="invalidateRelationsByClassId">
|
||||||
|
update xg_class_teacher_relation
|
||||||
|
set status = '1',
|
||||||
|
end_date = now(),
|
||||||
|
update_by = #{updateBy},
|
||||||
|
update_time = now()
|
||||||
|
where class_id = #{classId}
|
||||||
|
and status = '0'
|
||||||
|
and deleted = '0'
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
+15
-8
@@ -448,14 +448,21 @@
|
|||||||
<!-- 查询班主任选项 -->
|
<!-- 查询班主任选项 -->
|
||||||
<select id="selectClassTeacherOptions" resultType="java.util.Map">
|
<select id="selectClassTeacherOptions" resultType="java.util.Map">
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
class_teacher_id as value,
|
u.user_id as value,
|
||||||
class_teacher_name as label
|
u.nick_name as label,
|
||||||
FROM xg_student_info
|
u.user_name,
|
||||||
WHERE deleted = 0
|
u.email,
|
||||||
AND class_teacher_id IS NOT NULL
|
u.phonenumber,
|
||||||
AND class_teacher_name IS NOT NULL
|
r.role_name as role_name
|
||||||
AND class_teacher_name != ''
|
FROM sys_user u
|
||||||
ORDER BY class_teacher_name
|
INNER JOIN sys_user_role ur ON u.user_id = ur.user_id
|
||||||
|
INNER JOIN sys_role r ON ur.role_id = r.role_id
|
||||||
|
WHERE u.del_flag = '0'
|
||||||
|
AND u.status = '0'
|
||||||
|
AND r.del_flag = '0'
|
||||||
|
AND r.status = '0'
|
||||||
|
AND r.role_key = '19' -- 班主任角色key
|
||||||
|
ORDER BY u.user_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?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="org.dromara.xg.mapper.XgSysUserMapper">
|
||||||
|
|
||||||
|
<resultMap type="org.dromara.system.domain.vo.SysUserVo" id="SysUserResult">
|
||||||
|
<id property="userId" column="user_id"/>
|
||||||
|
<result property="deptId" column="dept_id"/>
|
||||||
|
<result property="userName" column="user_name"/>
|
||||||
|
<result property="nickName" column="nick_name"/>
|
||||||
|
<result property="email" column="email"/>
|
||||||
|
<result property="phonenumber" column="phonenumber"/>
|
||||||
|
<result property="sex" column="sex"/>
|
||||||
|
<result property="avatar" column="avatar"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 查询班主任用户SQL -->
|
||||||
|
<select id="selectUsersByRoleKey" resultMap="SysUserResult">
|
||||||
|
SELECT DISTINCT
|
||||||
|
u.user_id, u.dept_id, u.user_name, u.nick_name,
|
||||||
|
u.email, u.phonenumber, u.sex, u.avatar, u.status,
|
||||||
|
u.create_time, u.remark
|
||||||
|
FROM
|
||||||
|
sys_user u
|
||||||
|
INNER JOIN sys_user_role ur ON u.user_id = ur.user_id AND u.tenant_id = '000000'
|
||||||
|
INNER JOIN sys_role r ON ur.role_id = r.role_id AND r.tenant_id = '000000'
|
||||||
|
WHERE
|
||||||
|
u.del_flag = '0'
|
||||||
|
AND u.status = '0'
|
||||||
|
AND r.del_flag = '0'
|
||||||
|
AND r.status = '0'
|
||||||
|
AND r.role_key = #{roleKey}
|
||||||
|
ORDER BY
|
||||||
|
u.user_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
+105
@@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.xg.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.xg.domain.vo.XgClassMsgVo;
|
||||||
|
import org.dromara.xg.domain.bo.XgClassMsgBo;
|
||||||
|
import org.dromara.xg.service.IXgClassMsgService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级信息-新版
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/classMsg/classMsg")
|
||||||
|
public class XgClassMsgController extends BaseController {
|
||||||
|
|
||||||
|
private final IXgClassMsgService xgClassMsgService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级信息-新版列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("classMsg:classMsg:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<XgClassMsgVo> list(XgClassMsgBo bo, PageQuery pageQuery) {
|
||||||
|
return xgClassMsgService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出班级信息-新版列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("classMsg:classMsg:export")
|
||||||
|
@Log(title = "班级信息-新版", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(XgClassMsgBo bo, HttpServletResponse response) {
|
||||||
|
List<XgClassMsgVo> list = xgClassMsgService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "班级信息-新版", XgClassMsgVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取班级信息-新版详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("classMsg:classMsg:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<XgClassMsgVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(xgClassMsgService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增班级信息-新版
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("classMsg:classMsg:add")
|
||||||
|
@Log(title = "班级信息-新版", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody XgClassMsgBo bo) {
|
||||||
|
return toAjax(xgClassMsgService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改班级信息-新版
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("classMsg:classMsg:edit")
|
||||||
|
@Log(title = "班级信息-新版", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XgClassMsgBo bo) {
|
||||||
|
return toAjax(xgClassMsgService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除班级信息-新版
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("classMsg:classMsg:remove")
|
||||||
|
@Log(title = "班级信息-新版", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(xgClassMsgService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
+105
@@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.xg.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.xg.domain.vo.XgClassTeacherCounselorRelVo;
|
||||||
|
import org.dromara.xg.domain.bo.XgClassTeacherCounselorRelBo;
|
||||||
|
import org.dromara.xg.service.IXgClassTeacherCounselorRelService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任辅导员关联
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/teacherCounselorRel/classTeacherCounselorRel")
|
||||||
|
public class XgClassTeacherCounselorRelController extends BaseController {
|
||||||
|
|
||||||
|
private final IXgClassTeacherCounselorRelService xgClassTeacherCounselorRelService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级班主任辅导员关联列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("teacherCounselorRel:classTeacherCounselorRel:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<XgClassTeacherCounselorRelVo> list(XgClassTeacherCounselorRelBo bo, PageQuery pageQuery) {
|
||||||
|
return xgClassTeacherCounselorRelService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出班级班主任辅导员关联列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("teacherCounselorRel:classTeacherCounselorRel:export")
|
||||||
|
@Log(title = "班级班主任辅导员关联", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(XgClassTeacherCounselorRelBo bo, HttpServletResponse response) {
|
||||||
|
List<XgClassTeacherCounselorRelVo> list = xgClassTeacherCounselorRelService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "班级班主任辅导员关联", XgClassTeacherCounselorRelVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取班级班主任辅导员关联详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("teacherCounselorRel:classTeacherCounselorRel:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<XgClassTeacherCounselorRelVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(xgClassTeacherCounselorRelService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增班级班主任辅导员关联
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("teacherCounselorRel:classTeacherCounselorRel:add")
|
||||||
|
@Log(title = "班级班主任辅导员关联", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody XgClassTeacherCounselorRelBo bo) {
|
||||||
|
return toAjax(xgClassTeacherCounselorRelService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改班级班主任辅导员关联
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("teacherCounselorRel:classTeacherCounselorRel:edit")
|
||||||
|
@Log(title = "班级班主任辅导员关联", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XgClassTeacherCounselorRelBo bo) {
|
||||||
|
return toAjax(xgClassTeacherCounselorRelService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除班级班主任辅导员关联
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("teacherCounselorRel:classTeacherCounselorRel:remove")
|
||||||
|
@Log(title = "班级班主任辅导员关联", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(xgClassTeacherCounselorRelService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
-4
@@ -19,6 +19,7 @@ import org.dromara.common.log.enums.BusinessType;
|
|||||||
import org.dromara.common.excel.utils.ExcelUtil;
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
import org.dromara.xg.domain.vo.XgDormAreaVo;
|
import org.dromara.xg.domain.vo.XgDormAreaVo;
|
||||||
import org.dromara.xg.domain.bo.XgDormAreaBo;
|
import org.dromara.xg.domain.bo.XgDormAreaBo;
|
||||||
|
import org.dromara.xg.domain.vo.TreeSelectVo;
|
||||||
import org.dromara.xg.service.IXgDormAreaService;
|
import org.dromara.xg.service.IXgDormAreaService;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
@@ -63,8 +64,7 @@ public class XgDormAreaController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@SaCheckPermission("ssqxx:dormArea:query")
|
@SaCheckPermission("ssqxx:dormArea:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<XgDormAreaVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<XgDormAreaVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||||
@PathVariable Long id) {
|
|
||||||
return R.ok(xgDormAreaService.queryById(id));
|
return R.ok(xgDormAreaService.queryById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,8 +98,17 @@ public class XgDormAreaController extends BaseController {
|
|||||||
@SaCheckPermission("ssqxx:dormArea:remove")
|
@SaCheckPermission("ssqxx:dormArea:remove")
|
||||||
@Log(title = "宿舍区信息", businessType = BusinessType.DELETE)
|
@Log(title = "宿舍区信息", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||||
@PathVariable Long[] ids) {
|
|
||||||
return toAjax(xgDormAreaService.deleteWithValidByIds(List.of(ids), true));
|
return toAjax(xgDormAreaService.deleteWithValidByIds(List.of(ids), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取宿舍区树形结构数据
|
||||||
|
* 以校区为根节点,宿舍区为子节点
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ssqxx:dormArea:query")
|
||||||
|
@GetMapping("/tree")
|
||||||
|
public R<List<TreeSelectVo>> getAreaTree() {
|
||||||
|
return R.ok(xgDormAreaService.getAreaTree());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+105
@@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.xg.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.xg.domain.vo.XgDormBedVo;
|
||||||
|
import org.dromara.xg.domain.bo.XgDormBedBo;
|
||||||
|
import org.dromara.xg.service.IXgDormBedService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍床位信息
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/dormbed/dormBed")
|
||||||
|
public class XgDormBedController extends BaseController {
|
||||||
|
|
||||||
|
private final IXgDormBedService xgDormBedService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询宿舍床位信息列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("dormbed:dormBed:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<XgDormBedVo> list(XgDormBedBo bo, PageQuery pageQuery) {
|
||||||
|
return xgDormBedService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出宿舍床位信息列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("dormbed:dormBed:export")
|
||||||
|
@Log(title = "宿舍床位信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(XgDormBedBo bo, HttpServletResponse response) {
|
||||||
|
List<XgDormBedVo> list = xgDormBedService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "宿舍床位信息", XgDormBedVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取宿舍床位信息详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("dormbed:dormBed:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<XgDormBedVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(xgDormBedService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增宿舍床位信息
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("dormbed:dormBed:add")
|
||||||
|
@Log(title = "宿舍床位信息", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody XgDormBedBo bo) {
|
||||||
|
return toAjax(xgDormBedService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改宿舍床位信息
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("dormbed:dormBed:edit")
|
||||||
|
@Log(title = "宿舍床位信息", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XgDormBedBo bo) {
|
||||||
|
return toAjax(xgDormBedService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除宿舍床位信息
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("dormbed:dormBed:remove")
|
||||||
|
@Log(title = "宿舍床位信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(xgDormBedService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
+14
-4
@@ -19,6 +19,7 @@ import org.dromara.common.log.enums.BusinessType;
|
|||||||
import org.dromara.common.excel.utils.ExcelUtil;
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
import org.dromara.xg.domain.vo.XgDormBuildingVo;
|
import org.dromara.xg.domain.vo.XgDormBuildingVo;
|
||||||
import org.dromara.xg.domain.bo.XgDormBuildingBo;
|
import org.dromara.xg.domain.bo.XgDormBuildingBo;
|
||||||
|
import org.dromara.xg.domain.vo.BuildingTreeSelectVo;
|
||||||
import org.dromara.xg.service.IXgDormBuildingService;
|
import org.dromara.xg.service.IXgDormBuildingService;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
@@ -63,8 +64,7 @@ public class XgDormBuildingController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@SaCheckPermission("sslxx:dormBuilding:query")
|
@SaCheckPermission("sslxx:dormBuilding:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<XgDormBuildingVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<XgDormBuildingVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||||
@PathVariable Long id) {
|
|
||||||
return R.ok(xgDormBuildingService.queryById(id));
|
return R.ok(xgDormBuildingService.queryById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,8 +98,18 @@ public class XgDormBuildingController extends BaseController {
|
|||||||
@SaCheckPermission("sslxx:dormBuilding:remove")
|
@SaCheckPermission("sslxx:dormBuilding:remove")
|
||||||
@Log(title = "宿舍楼信息", businessType = BusinessType.DELETE)
|
@Log(title = "宿舍楼信息", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||||
@PathVariable Long[] ids) {
|
|
||||||
return toAjax(xgDormBuildingService.deleteWithValidByIds(List.of(ids), true));
|
return toAjax(xgDormBuildingService.deleteWithValidByIds(List.of(ids), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取宿舍楼树形结构数据
|
||||||
|
* 校区-宿舍区-宿舍楼三级结构,校区和宿舍区不可选,只有宿舍楼可以选择
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("sslxx:dormBuilding:list")
|
||||||
|
@GetMapping("/buildingTree")
|
||||||
|
public R<List<BuildingTreeSelectVo>> getBuildingTree() {
|
||||||
|
List<BuildingTreeSelectVo> treeData = xgDormBuildingService.getBuildingTreeData();
|
||||||
|
return R.ok(treeData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+39
@@ -0,0 +1,39 @@
|
|||||||
|
package org.dromara.xg.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.xg.domain.vo.DormBuildingTreeVo;
|
||||||
|
import org.dromara.xg.domain.bo.DormBuildingTreeBo;
|
||||||
|
import org.dromara.xg.service.IXgDormBuildingTreeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼树形结构控制器
|
||||||
|
*
|
||||||
|
* @author wuzilong
|
||||||
|
* @date 2025-07-03
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/xgss/dormBuildingTree")
|
||||||
|
public class XgDormBuildingTreeController extends BaseController {
|
||||||
|
|
||||||
|
private final IXgDormBuildingTreeService xgDormBuildingTreeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取宿舍楼树形结构数据
|
||||||
|
* 校区-宿舍区-宿舍楼三级结构,校区和宿舍区不可选,只有宿舍楼可以选择
|
||||||
|
*/
|
||||||
|
// @SaCheckPermission("xgss:dormBuildingTree:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R<List<DormBuildingTreeVo>> getDormBuildingTree(DormBuildingTreeBo bo) {
|
||||||
|
List<DormBuildingTreeVo> treeData = xgDormBuildingTreeService.getDormBuildingTree(bo);
|
||||||
|
return R.ok(treeData);
|
||||||
|
}
|
||||||
|
}
|
||||||
+15
-1
@@ -114,7 +114,21 @@ public class XgDormManagerSourceController extends BaseController {
|
|||||||
@PostMapping("/assignScope")
|
@PostMapping("/assignScope")
|
||||||
public R<Void> assignScope(@RequestParam @NotNull(message = "管理员ID不能为空") Long managerId,
|
public R<Void> assignScope(@RequestParam @NotNull(message = "管理员ID不能为空") Long managerId,
|
||||||
@RequestParam @NotNull(message = "授权类型不能为空") Character authType,
|
@RequestParam @NotNull(message = "授权类型不能为空") Character authType,
|
||||||
@RequestBody @NotEmpty(message = "授权来源ID不能为空") List<Long> authSourceIds) {
|
@RequestBody List<Long> authSourceIds) {
|
||||||
return toAjax(xgDormManagerSourceService.assignScope(managerId, authType, authSourceIds));
|
return toAjax(xgDormManagerSourceService.assignScope(managerId, authType, authSourceIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取管理员授权范围名称
|
||||||
|
*
|
||||||
|
* @param managerId 管理员ID
|
||||||
|
* @param managerType 管理员类型(1全校级 2校区级 3宿舍区级 4楼栋级)
|
||||||
|
* @return 授权范围名称(逗号分隔字符串)
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("glysqgx:dormManagerSource:query")
|
||||||
|
@GetMapping("/getScopeNames")
|
||||||
|
public R<String> getScopeNames(@RequestParam @NotNull(message = "管理员ID不能为空") Long managerId,
|
||||||
|
@RequestParam @NotNull(message = "管理员类型不能为空") Integer managerType) {
|
||||||
|
return R.ok(xgDormManagerSourceService.getScopeNames(managerId, managerType));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+105
@@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.xg.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.xg.domain.vo.XgDormRoomVo;
|
||||||
|
import org.dromara.xg.domain.bo.XgDormRoomBo;
|
||||||
|
import org.dromara.xg.service.IXgDormRoomService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍房间信息
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/xgss/dormRoom")
|
||||||
|
public class XgDormRoomController extends BaseController {
|
||||||
|
|
||||||
|
private final IXgDormRoomService xgDormRoomService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询宿舍房间信息列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xgss:dormRoom:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<XgDormRoomVo> list(XgDormRoomBo bo, PageQuery pageQuery) {
|
||||||
|
return xgDormRoomService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出宿舍房间信息列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xgss:dormRoom:export")
|
||||||
|
@Log(title = "宿舍房间信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(XgDormRoomBo bo, HttpServletResponse response) {
|
||||||
|
List<XgDormRoomVo> list = xgDormRoomService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "宿舍房间信息", XgDormRoomVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取宿舍房间信息详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xgss:dormRoom:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<XgDormRoomVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(xgDormRoomService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增宿舍房间信息
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xgss:dormRoom:add")
|
||||||
|
@Log(title = "宿舍房间信息", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody XgDormRoomBo bo) {
|
||||||
|
return toAjax(xgDormRoomService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改宿舍房间信息
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xgss:dormRoom:edit")
|
||||||
|
@Log(title = "宿舍房间信息", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XgDormRoomBo bo) {
|
||||||
|
return toAjax(xgDormRoomService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除宿舍房间信息
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xgss:dormRoom:remove")
|
||||||
|
@Log(title = "宿舍房间信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(xgDormRoomService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
+62
@@ -0,0 +1,62 @@
|
|||||||
|
package org.dromara.xg.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.xg.domain.vo.XgSysDeptVo;
|
||||||
|
import org.dromara.xg.service.IXgSysDeptService;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学院专业信息管理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@Tag(name = "学院专业信息管理")
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/xg/college")
|
||||||
|
public class XgSysDeptController {
|
||||||
|
|
||||||
|
private final IXgSysDeptService deptService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取学院列表
|
||||||
|
*/
|
||||||
|
@Operation(summary = "获取学院列表")
|
||||||
|
@SaCheckPermission("xg:college:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R<List<XgSysDeptVo>> list() {
|
||||||
|
List<XgSysDeptVo> depts = deptService.selectCollegeList();
|
||||||
|
return R.ok(depts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取学院和专业的树结构
|
||||||
|
*/
|
||||||
|
@Operation(summary = "获取学院和专业的树结构")
|
||||||
|
@SaCheckPermission("xg:college:list")
|
||||||
|
@GetMapping("/tree")
|
||||||
|
public R<List<XgSysDeptVo>> tree() {
|
||||||
|
List<XgSysDeptVo> depts = deptService.selectCollegeAndMajorTree();
|
||||||
|
return R.ok(depts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据学院ID获取专业列表
|
||||||
|
*/
|
||||||
|
@Operation(summary = "根据学院ID获取专业列表")
|
||||||
|
@SaCheckPermission("xg:college:list")
|
||||||
|
@GetMapping("/majors/{collegeId}")
|
||||||
|
public R<List<XgSysDeptVo>> majors(@PathVariable Long collegeId) {
|
||||||
|
List<XgSysDeptVo> depts = deptService.selectMajorListByCollegeId(collegeId);
|
||||||
|
return R.ok(depts);
|
||||||
|
}
|
||||||
|
}
|
||||||
+39
@@ -0,0 +1,39 @@
|
|||||||
|
package org.dromara.xg.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.xg.domain.XgSysUser;
|
||||||
|
import org.dromara.xg.service.IXgSysUserService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统用户信息
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-24
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/xg/sysUser")
|
||||||
|
public class XgSysUserController extends BaseController {
|
||||||
|
|
||||||
|
private final IXgSysUserService xgSysUserService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询有效用户列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xg:sysUser:list")
|
||||||
|
@GetMapping("/activeList")
|
||||||
|
public R<List<XgSysUser>> activeList() {
|
||||||
|
List<XgSysUser> list = xgSysUserService.selectActiveUserList();
|
||||||
|
return R.ok(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,288 @@
|
|||||||
|
package org.dromara.xg.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.tenant.core.TenantEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级信息-新版对象 xg_class_msg
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("xg_class_msg")
|
||||||
|
public class XgClassMsg extends TenantEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID(雪花ID)
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
@TableLogic(value = "0", delval = "1")
|
||||||
|
private Long deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学院代码
|
||||||
|
*/
|
||||||
|
private Long collegeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学院名称
|
||||||
|
*/
|
||||||
|
private String collegeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业代码
|
||||||
|
*/
|
||||||
|
private Long majorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业名称
|
||||||
|
*/
|
||||||
|
private String majorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级代码
|
||||||
|
*/
|
||||||
|
private String classCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级名称
|
||||||
|
*/
|
||||||
|
private String className;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级类型:1-中级工 2-高级工 3-预备技师 4-技师 5-中高职一体
|
||||||
|
*/
|
||||||
|
private String classType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年级
|
||||||
|
*/
|
||||||
|
private String grade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入学年份
|
||||||
|
*/
|
||||||
|
private Long enrollmentYear;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 毕业年份
|
||||||
|
*/
|
||||||
|
private Long graduationYear;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 培养方式:全日制,在职,函授,夜大等
|
||||||
|
*/
|
||||||
|
private String trainingType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学位类型:学士,硕士,博士,专科
|
||||||
|
*/
|
||||||
|
private String degreeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 辅导员ID
|
||||||
|
*/
|
||||||
|
private Long counselorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 辅导员姓名
|
||||||
|
*/
|
||||||
|
private String counselorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班主任ID
|
||||||
|
*/
|
||||||
|
private Long classTeacherId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班主任姓名
|
||||||
|
*/
|
||||||
|
private String classTeacherName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级导师ID
|
||||||
|
*/
|
||||||
|
private Long classAdvisorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级导师姓名
|
||||||
|
*/
|
||||||
|
private String classAdvisorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班长ID
|
||||||
|
*/
|
||||||
|
private Long classMonitorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班长姓名
|
||||||
|
*/
|
||||||
|
private String classMonitorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 副班长ID
|
||||||
|
*/
|
||||||
|
private Long deputyMonitorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 副班长姓名
|
||||||
|
*/
|
||||||
|
private String deputyMonitorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级状态:1-正常,2-暂停,3-毕业,4-解散
|
||||||
|
*/
|
||||||
|
private String classStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否已毕业:0-未毕业,1-已毕业
|
||||||
|
*/
|
||||||
|
private Long isGraduation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 毕业日期
|
||||||
|
*/
|
||||||
|
private Date graduationDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划容量
|
||||||
|
*/
|
||||||
|
private Long plannedCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前学生人数
|
||||||
|
*/
|
||||||
|
private Long currentStudentCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最大学生人数
|
||||||
|
*/
|
||||||
|
private Long maxStudentCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 男生人数
|
||||||
|
*/
|
||||||
|
private Long maleCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 女生人数
|
||||||
|
*/
|
||||||
|
private Long femaleCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在籍人数
|
||||||
|
*/
|
||||||
|
private Long activeCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转入人数
|
||||||
|
*/
|
||||||
|
private Long transferInCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转出人数
|
||||||
|
*/
|
||||||
|
private Long transferOutCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退学人数
|
||||||
|
*/
|
||||||
|
private Long dropoutCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 毕业人数
|
||||||
|
*/
|
||||||
|
private Long graduateCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级办公室位置
|
||||||
|
*/
|
||||||
|
private String officeLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级教室位置
|
||||||
|
*/
|
||||||
|
private String classLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String contactPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* QQ群号
|
||||||
|
*/
|
||||||
|
private String qqGroup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 微信群
|
||||||
|
*/
|
||||||
|
private String wechatGroup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程安排(JSON格式)
|
||||||
|
*/
|
||||||
|
private String classSchedule;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级文化建设
|
||||||
|
*/
|
||||||
|
private String classCulture;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级规章制度
|
||||||
|
*/
|
||||||
|
private String classRules;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级描述
|
||||||
|
*/
|
||||||
|
private String classDescription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最后统计更新时间
|
||||||
|
*/
|
||||||
|
private Date lastCountUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展字段1
|
||||||
|
*/
|
||||||
|
private String extField1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展字段2
|
||||||
|
*/
|
||||||
|
private String extField2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展字段3
|
||||||
|
*/
|
||||||
|
private String extField3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注信息
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
+78
@@ -0,0 +1,78 @@
|
|||||||
|
package org.dromara.xg.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.tenant.core.TenantEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任辅导员关联对象 xg_class_teacher_counselor_rel
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("xg_class_teacher_counselor_rel")
|
||||||
|
public class XgClassTeacherCounselorRel extends TenantEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID(雪花ID)
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
@TableLogic(value = "0", delval = "1")
|
||||||
|
private Long deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级ID,关联xg_class_msg.id
|
||||||
|
*/
|
||||||
|
private Long classId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级名称
|
||||||
|
*/
|
||||||
|
private String className;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教师ID,关联sys_user.user_id
|
||||||
|
*/
|
||||||
|
private Long teacherId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教师姓名
|
||||||
|
*/
|
||||||
|
private String teacherName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教师类型:class_teacher-班主任,counselor-辅导员,advisor-导师
|
||||||
|
*/
|
||||||
|
private String teacherType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始日期
|
||||||
|
*/
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注信息
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package org.dromara.xg.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.tenant.core.TenantEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍床位信息对象 xg_dorm_bed
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("xg_dorm_bed")
|
||||||
|
public class XgDormBed extends TenantEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位编号
|
||||||
|
*/
|
||||||
|
private String bedCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位名称
|
||||||
|
*/
|
||||||
|
private String bedName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属房间ID
|
||||||
|
*/
|
||||||
|
private Long roomId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位类型(1下铺 2上铺 3中铺 4独立床)
|
||||||
|
*/
|
||||||
|
private String bedType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位状态(0空闲 1已分配 2维修中)
|
||||||
|
*/
|
||||||
|
private String bedStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
@TableLogic(value = "0", delval = "1")
|
||||||
|
private String deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -73,4 +73,9 @@ public class XgDormBuilding extends TenantEntity {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总楼层数
|
||||||
|
*/
|
||||||
|
private Integer floors;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package org.dromara.xg.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.tenant.core.TenantEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍房间信息对象 xg_dorm_room
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("xg_dorm_room")
|
||||||
|
public class XgDormRoom extends TenantEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间编号
|
||||||
|
*/
|
||||||
|
private String roomCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间名称
|
||||||
|
*/
|
||||||
|
private String roomName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属宿舍楼ID
|
||||||
|
*/
|
||||||
|
private Long buildingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼层
|
||||||
|
*/
|
||||||
|
private Long floorNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间类型(1标准间 2 单人间 3 套间)
|
||||||
|
*/
|
||||||
|
private String roomType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际床位数
|
||||||
|
*/
|
||||||
|
private Long actualBeds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间面积(平方米)
|
||||||
|
*/
|
||||||
|
private Double roomArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间状态(0可用 1维修中 2停用)
|
||||||
|
*/
|
||||||
|
private String roomStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
@TableLogic(value = "0", delval = "1")
|
||||||
|
private String deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package org.dromara.xg.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门表 sys_dept
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName("sys_dept")
|
||||||
|
public class XgSysDept extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父部门ID
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 祖级列表
|
||||||
|
*/
|
||||||
|
private String ancestors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门名称
|
||||||
|
*/
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人
|
||||||
|
*/
|
||||||
|
private Long leader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门状态:0正常,1停用
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 2代表删除)
|
||||||
|
*/
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父部门名称
|
||||||
|
*/
|
||||||
|
private String parentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门类别编码
|
||||||
|
*/
|
||||||
|
private String deptCategory;
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package org.dromara.xg.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.tenant.core.TenantEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统用户信息对象
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("sys_user")
|
||||||
|
public class XgSysUser extends TenantEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "user_id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户昵称
|
||||||
|
*/
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户手机号码
|
||||||
|
*/
|
||||||
|
private String phonenumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 帐号状态(0正常 1停用)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
@TableLogic
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
}
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
package org.dromara.xg.domain.bo;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼树查询业务对象
|
||||||
|
*
|
||||||
|
* @author wuzilong
|
||||||
|
* @date 2025-07-03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DormBuildingTreeBo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校区ID
|
||||||
|
*/
|
||||||
|
private Long campusId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍区ID
|
||||||
|
*/
|
||||||
|
private Long areaId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼名称(模糊查询)
|
||||||
|
*/
|
||||||
|
private String buildingName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
}
|
||||||
+271
@@ -0,0 +1,271 @@
|
|||||||
|
package org.dromara.xg.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgClassMsg;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级信息-新版业务对象 xg_class_msg
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = XgClassMsg.class, reverseConvertGenerate = false)
|
||||||
|
public class XgClassMsgBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID(雪花ID)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID(雪花ID)不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学院代码
|
||||||
|
*/
|
||||||
|
private Long collegeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学院名称
|
||||||
|
*/
|
||||||
|
private String collegeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业代码
|
||||||
|
*/
|
||||||
|
private Long majorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业名称
|
||||||
|
*/
|
||||||
|
private String majorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级代码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "班级代码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String classCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "班级名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String className;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级类型:1-中级工 2-高级工 3-预备技师 4-技师 5-中高职一体
|
||||||
|
*/
|
||||||
|
private String classType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年级
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "年级不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String grade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入学年份
|
||||||
|
*/
|
||||||
|
@NotNull(message = "入学年份不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long enrollmentYear;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 毕业年份
|
||||||
|
*/
|
||||||
|
private Long graduationYear;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 培养方式:全日制,在职,函授,夜大等
|
||||||
|
*/
|
||||||
|
private String trainingType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学位类型:学士,硕士,博士,专科
|
||||||
|
*/
|
||||||
|
private String degreeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 辅导员ID
|
||||||
|
*/
|
||||||
|
private Long counselorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 辅导员姓名
|
||||||
|
*/
|
||||||
|
private String counselorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班主任ID
|
||||||
|
*/
|
||||||
|
private Long classTeacherId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班主任姓名
|
||||||
|
*/
|
||||||
|
private String classTeacherName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级导师ID
|
||||||
|
*/
|
||||||
|
private Long classAdvisorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级导师姓名
|
||||||
|
*/
|
||||||
|
private String classAdvisorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班长ID
|
||||||
|
*/
|
||||||
|
private Long classMonitorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班长姓名
|
||||||
|
*/
|
||||||
|
private String classMonitorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 副班长ID
|
||||||
|
*/
|
||||||
|
private Long deputyMonitorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 副班长姓名
|
||||||
|
*/
|
||||||
|
private String deputyMonitorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级状态:1-正常,2-暂停,3-毕业,4-解散
|
||||||
|
*/
|
||||||
|
private String classStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否已毕业:0-未毕业,1-已毕业
|
||||||
|
*/
|
||||||
|
private Long isGraduation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 毕业日期
|
||||||
|
*/
|
||||||
|
private Date graduationDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划容量
|
||||||
|
*/
|
||||||
|
private Long plannedCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前学生人数
|
||||||
|
*/
|
||||||
|
private Long currentStudentCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最大学生人数
|
||||||
|
*/
|
||||||
|
private Long maxStudentCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 男生人数
|
||||||
|
*/
|
||||||
|
private Long maleCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 女生人数
|
||||||
|
*/
|
||||||
|
private Long femaleCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在籍人数
|
||||||
|
*/
|
||||||
|
private Long activeCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转入人数
|
||||||
|
*/
|
||||||
|
private Long transferInCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转出人数
|
||||||
|
*/
|
||||||
|
private Long transferOutCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退学人数
|
||||||
|
*/
|
||||||
|
private Long dropoutCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 毕业人数
|
||||||
|
*/
|
||||||
|
private Long graduateCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级办公室位置
|
||||||
|
*/
|
||||||
|
private String officeLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级教室位置
|
||||||
|
*/
|
||||||
|
private String classLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String contactPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* QQ群号
|
||||||
|
*/
|
||||||
|
private String qqGroup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 微信群
|
||||||
|
*/
|
||||||
|
private String wechatGroup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程安排(JSON格式)
|
||||||
|
*/
|
||||||
|
private String classSchedule;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级文化建设
|
||||||
|
*/
|
||||||
|
private String classCulture;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级规章制度
|
||||||
|
*/
|
||||||
|
private String classRules;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级描述
|
||||||
|
*/
|
||||||
|
private String classDescription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最后统计更新时间
|
||||||
|
*/
|
||||||
|
private Date lastCountUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注信息
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+81
@@ -0,0 +1,81 @@
|
|||||||
|
package org.dromara.xg.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgClassTeacherCounselorRel;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任辅导员关联业务对象 xg_class_teacher_counselor_rel
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = XgClassTeacherCounselorRel.class, reverseConvertGenerate = false)
|
||||||
|
public class XgClassTeacherCounselorRelBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID(雪花ID)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID(雪花ID)不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
private Long deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级ID,关联xg_class_msg.id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "班级ID,关联xg_class_msg.id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long classId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级名称
|
||||||
|
*/
|
||||||
|
private String className;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教师ID,关联sys_user.user_id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "教师ID,关联sys_user.user_id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long teacherId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教师姓名
|
||||||
|
*/
|
||||||
|
private String teacherName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教师类型:class_teacher-班主任,counselor-辅导员,advisor-导师
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "教师类型:class_teacher-班主任,counselor-辅导员,advisor-导师不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String teacherType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始日期
|
||||||
|
*/
|
||||||
|
@NotNull(message = "开始日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注信息
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+68
@@ -0,0 +1,68 @@
|
|||||||
|
package org.dromara.xg.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgDormBed;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍床位信息业务对象 xg_dorm_bed
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = XgDormBed.class, reverseConvertGenerate = false)
|
||||||
|
public class XgDormBedBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位编号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "床位编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String bedCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "床位名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String bedName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属房间ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "所属房间ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long roomId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位类型(1下铺 2上铺 3中铺 4独立床)
|
||||||
|
*/
|
||||||
|
private String bedType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位状态(0空闲 1已分配 2维修中)
|
||||||
|
*/
|
||||||
|
private String bedStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
private String deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+4
@@ -65,5 +65,9 @@ public class XgDormBuildingBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private Long sortOrder;
|
private Long sortOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总楼层数
|
||||||
|
*/
|
||||||
|
private Integer floors;
|
||||||
|
|
||||||
}
|
}
|
||||||
-1
@@ -63,5 +63,4 @@ public class XgDormManagerSourceBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
package org.dromara.xg.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgDormRoom;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍房间信息业务对象 xg_dorm_room
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = XgDormRoom.class, reverseConvertGenerate = false)
|
||||||
|
public class XgDormRoomBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间编号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "房间编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String roomCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "房间名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String roomName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属宿舍楼ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "所属宿舍楼ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long buildingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼层
|
||||||
|
*/
|
||||||
|
@NotNull(message = "楼层不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long floorNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间类型(1标准间 2 单人间 3 套间)
|
||||||
|
*/
|
||||||
|
private String roomType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际床位数
|
||||||
|
*/
|
||||||
|
private Long actualBeds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间面积(平方米)
|
||||||
|
*/
|
||||||
|
private Double roomArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间状态(0可用 1维修中 2停用)
|
||||||
|
*/
|
||||||
|
private String roomStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
private String deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+74
@@ -0,0 +1,74 @@
|
|||||||
|
package org.dromara.xg.domain.bo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门查询对象
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Schema(description = "部门查询对象")
|
||||||
|
public class XgSysDeptBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "部门id")
|
||||||
|
@NotNull(message = "部门id不能为空", groups = { EditGroup.class })
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父部门ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "父部门id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "部门名称")
|
||||||
|
@NotBlank(message = "部门名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
@Schema(description = "显示顺序")
|
||||||
|
@NotNull(message = "显示顺序不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人
|
||||||
|
*/
|
||||||
|
@Schema(description = "负责人")
|
||||||
|
private String leader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
@Schema(description = "联系电话")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
@Schema(description = "邮箱")
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门状态:0正常,1停用
|
||||||
|
*/
|
||||||
|
@Schema(description = "部门状态:0正常,1停用")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
}
|
||||||
+65
@@ -0,0 +1,65 @@
|
|||||||
|
package org.dromara.xg.domain.vo;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼树形结构视图对象
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class BuildingTreeSelectVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点类型(campus:校区 area:宿舍区 building:宿舍楼)
|
||||||
|
*/
|
||||||
|
private String nodeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否禁用
|
||||||
|
*/
|
||||||
|
private Boolean disabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子节点
|
||||||
|
*/
|
||||||
|
private List<BuildingTreeSelectVo> children;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private java.util.Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
private Long updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private java.util.Date updateTime;
|
||||||
|
}
|
||||||
+110
@@ -0,0 +1,110 @@
|
|||||||
|
package org.dromara.xg.domain.vo;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼信息VO
|
||||||
|
*
|
||||||
|
* @author wuzilong
|
||||||
|
* @date 2025-07-03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DormBuildingInfoVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼名称
|
||||||
|
*/
|
||||||
|
private String buildingName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼编号
|
||||||
|
*/
|
||||||
|
private String buildingCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属校区ID
|
||||||
|
*/
|
||||||
|
private Long campusId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校区名称
|
||||||
|
*/
|
||||||
|
private String campusName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属宿舍区ID
|
||||||
|
*/
|
||||||
|
private Long areaId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍区名称
|
||||||
|
*/
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼层数
|
||||||
|
*/
|
||||||
|
private Integer floors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间数
|
||||||
|
*/
|
||||||
|
private Integer roomCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位数
|
||||||
|
*/
|
||||||
|
private Integer bedCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已使用床位数
|
||||||
|
*/
|
||||||
|
private Integer usedBedCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0正常 1维修中 2停用)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
private Long updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼类型(1男生楼 2女生楼 3混合楼)(仅宿舍楼节点有此字段)
|
||||||
|
*/
|
||||||
|
private String buildingType;
|
||||||
|
}
|
||||||
+54
@@ -0,0 +1,54 @@
|
|||||||
|
package org.dromara.xg.domain.vo;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼树形结构VO
|
||||||
|
*
|
||||||
|
* @author wuzilong
|
||||||
|
* @date 2025-07-03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DormBuildingTreeVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点类型 (campus:校区, area:宿舍区, building:宿舍楼)
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否禁用节点(校区和宿舍区节点禁用点击)
|
||||||
|
*/
|
||||||
|
private Boolean disabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼层数(仅宿舍楼节点有此字段)
|
||||||
|
*/
|
||||||
|
private Integer buildingFloors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼类型(1男生楼 2女生楼 3混合楼)(仅宿舍楼节点有此字段)
|
||||||
|
*/
|
||||||
|
private String buildingType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子节点
|
||||||
|
*/
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
|
private List<DormBuildingTreeVo> children;
|
||||||
|
}
|
||||||
+63
@@ -0,0 +1,63 @@
|
|||||||
|
package org.dromara.xg.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 树形选择视图对象
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TreeSelectVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 节点ID */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 节点名称 */
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
/** 节点类型(campus:校区, area:宿舍区) */
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/** 是否可选择 */
|
||||||
|
private Boolean disabled;
|
||||||
|
|
||||||
|
/** 子节点 */
|
||||||
|
private List<TreeSelectVo> children = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造树节点
|
||||||
|
*
|
||||||
|
* @param id 节点ID
|
||||||
|
* @param label 节点标签
|
||||||
|
* @param type 节点类型
|
||||||
|
* @param disabled 是否禁用
|
||||||
|
*/
|
||||||
|
public TreeSelectVo(Long id, String label, String type, Boolean disabled) {
|
||||||
|
this.id = id;
|
||||||
|
this.label = label;
|
||||||
|
this.type = type;
|
||||||
|
this.disabled = disabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加子节点
|
||||||
|
*
|
||||||
|
* @param child 子节点
|
||||||
|
*/
|
||||||
|
public void addChild(TreeSelectVo child) {
|
||||||
|
if (children == null) {
|
||||||
|
children = new ArrayList<>();
|
||||||
|
}
|
||||||
|
children.add(child);
|
||||||
|
}
|
||||||
|
}
|
||||||
+358
@@ -0,0 +1,358 @@
|
|||||||
|
package org.dromara.xg.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.xg.domain.XgClassMsg;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级信息-新版视图对象 xg_class_msg
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = XgClassMsg.class)
|
||||||
|
public class XgClassMsgVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID(雪花ID)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键ID", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "雪=花ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学院代码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "学院代码")
|
||||||
|
private Long collegeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学院名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "学院名称")
|
||||||
|
private String collegeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业代码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "专业代码")
|
||||||
|
private Long majorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "专业名称")
|
||||||
|
private String majorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级代码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级代码")
|
||||||
|
private String classCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级名称")
|
||||||
|
private String className;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级类型:1-中级工 2-高级工 3-预备技师 4-技师 5-中高职一体
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级类型")
|
||||||
|
private String classType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年级
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "年级")
|
||||||
|
private String grade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入学年份
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "入学年份")
|
||||||
|
private Long enrollmentYear;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 毕业年份
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "毕业年份")
|
||||||
|
private Long graduationYear;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 培养方式
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "培养方式")
|
||||||
|
private String trainingType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学位类型
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "学位类型")
|
||||||
|
private String degreeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 辅导员ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "辅导员ID")
|
||||||
|
private Long counselorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 辅导员姓名
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "辅导员姓名")
|
||||||
|
private String counselorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班主任ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班主任ID")
|
||||||
|
private Long classTeacherId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班主任姓名
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班主任姓名")
|
||||||
|
private String classTeacherName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级导师ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级导师ID")
|
||||||
|
private Long classAdvisorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级导师姓名
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级导师姓名")
|
||||||
|
private String classAdvisorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班长ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班长ID")
|
||||||
|
private Long classMonitorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班长姓名
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班长姓名")
|
||||||
|
private String classMonitorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 副班长ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "副班长ID")
|
||||||
|
private Long deputyMonitorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 副班长姓名
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "副班长姓名")
|
||||||
|
private String deputyMonitorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级状态:1-正常,2-暂停,3-毕业,4-解散
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级状态")
|
||||||
|
private String classStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否已毕业:0-未毕业,1-已毕业
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否已毕业")
|
||||||
|
private Long isGraduation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 毕业日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "毕业日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date graduationDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划容量
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计划容量")
|
||||||
|
private Long plannedCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前学生人数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "当前学生人数")
|
||||||
|
private Long currentStudentCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最大学生人数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "最大学生人数")
|
||||||
|
private Long maxStudentCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 男生人数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "男生人数")
|
||||||
|
private Long maleCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 女生人数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "女生人数")
|
||||||
|
private Long femaleCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在籍人数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "在籍人数")
|
||||||
|
private Long activeCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转入人数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "转入人数")
|
||||||
|
private Long transferInCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转出人数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "转出人数")
|
||||||
|
private Long transferOutCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退学人数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "退学人数")
|
||||||
|
private Long dropoutCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 毕业人数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "毕业人数")
|
||||||
|
private Long graduateCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级办公室位置
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级办公室位置")
|
||||||
|
private String officeLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级教室位置
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级教室位置")
|
||||||
|
private String classLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "联系电话")
|
||||||
|
private String contactPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* QQ群号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "QQ群号")
|
||||||
|
private String qqGroup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 微信群
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "微信群")
|
||||||
|
private String wechatGroup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级邮箱
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级邮箱")
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程安排(JSON格式)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "课程安排")
|
||||||
|
private String classSchedule;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级文化建设
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级文化建设")
|
||||||
|
private String classCulture;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级规章制度
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级规章制度")
|
||||||
|
private String classRules;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级描述
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级描述")
|
||||||
|
private String classDescription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最后统计更新时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "最后统计更新时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date lastCountUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展字段1
|
||||||
|
*/
|
||||||
|
private String extField1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展字段2
|
||||||
|
*/
|
||||||
|
private String extField2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展字段3
|
||||||
|
*/
|
||||||
|
private String extField3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注信息
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注信息")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
private Long updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
||||||
+96
@@ -0,0 +1,96 @@
|
|||||||
|
package org.dromara.xg.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.xg.domain.XgClassTeacherCounselorRel;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任辅导员关联视图对象 xg_class_teacher_counselor_rel
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = XgClassTeacherCounselorRel.class)
|
||||||
|
public class XgClassTeacherCounselorRelVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID(雪花ID)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键ID", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "雪=花ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "删除标志", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "0=代表存在,1=代表删除")
|
||||||
|
private Long deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级ID,关联xg_class_msg.id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级ID,关联xg_class_msg.id")
|
||||||
|
private Long classId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "班级名称")
|
||||||
|
private String className;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教师ID,关联sys_user.user_id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "教师ID,关联sys_user.user_id")
|
||||||
|
private Long teacherId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教师姓名
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "教师姓名")
|
||||||
|
private String teacherName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教师类型:class_teacher-班主任,counselor-辅导员,advisor-导师
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "教师类型:class_teacher-班主任,counselor-辅导员,advisor-导师")
|
||||||
|
private String teacherType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "开始日期")
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "结束日期")
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注信息
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注信息")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+80
@@ -0,0 +1,80 @@
|
|||||||
|
package org.dromara.xg.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgDormBed;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍床位信息视图对象 xg_dorm_bed
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = XgDormBed.class)
|
||||||
|
public class XgDormBedVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位编号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "床位编号")
|
||||||
|
private String bedCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "床位名称")
|
||||||
|
private String bedName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属房间ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所属房间ID")
|
||||||
|
private Long roomId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位类型(1下铺 2上铺 3中铺 4独立床)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "床位类型(1下铺 2上铺 3中铺 4独立床)")
|
||||||
|
private String bedType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位状态(0空闲 1已分配 2维修中)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "床位状态(0空闲 1已分配 2维修中)")
|
||||||
|
private String bedStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "删除标志(0代表存在 1代表删除)")
|
||||||
|
private String deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+6
@@ -87,6 +87,12 @@ public class XgDormBuildingVo implements Serializable {
|
|||||||
@ExcelProperty(value = "排序号")
|
@ExcelProperty(value = "排序号")
|
||||||
private Long sortOrder;
|
private Long sortOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总楼层数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "总楼层数")
|
||||||
|
private Integer floors;
|
||||||
|
|
||||||
// 基础字段
|
// 基础字段
|
||||||
private Long createBy; // 创建者
|
private Long createBy; // 创建者
|
||||||
private Date createTime; // 创建时间
|
private Date createTime; // 创建时间
|
||||||
|
|||||||
-3
@@ -12,8 +12,6 @@ import java.io.Serial;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 管理员授权关系视图对象 xg_dorm_manager_source
|
* 管理员授权关系视图对象 xg_dorm_manager_source
|
||||||
*
|
*
|
||||||
@@ -76,5 +74,4 @@ public class XgDormManagerSourceVo implements Serializable {
|
|||||||
@ExcelProperty(value = "备注")
|
@ExcelProperty(value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+98
@@ -0,0 +1,98 @@
|
|||||||
|
package org.dromara.xg.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgDormRoom;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍房间信息视图对象 xg_dorm_room
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = XgDormRoom.class)
|
||||||
|
public class XgDormRoomVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间编号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "房间编号")
|
||||||
|
private String roomCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "房间名称")
|
||||||
|
private String roomName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属宿舍楼ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所属宿舍楼ID")
|
||||||
|
private Long buildingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼层
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "楼层")
|
||||||
|
private Long floorNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间类型(1标准间 2 单人间 3 套间)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "房间类型(1标准间 2 单人间 3 套间)")
|
||||||
|
private String roomType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际床位数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "实际床位数")
|
||||||
|
private Long actualBeds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间面积(平方米)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "房间面积(平方米)")
|
||||||
|
private Double roomArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间状态(0可用 1维修中 2停用)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "房间状态(0可用 1维修中 2停用)")
|
||||||
|
private String roomStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "删除标志(0代表存在 1代表删除)")
|
||||||
|
private String deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+116
@@ -0,0 +1,116 @@
|
|||||||
|
package org.dromara.xg.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门视图对象
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "部门视图对象")
|
||||||
|
public class XgSysDeptVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "部门id")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父部门ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "父部门id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 祖级列表
|
||||||
|
*/
|
||||||
|
@Schema(description = "祖级列表")
|
||||||
|
private String ancestors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "部门名称")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
@Schema(description = "显示顺序")
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人
|
||||||
|
*/
|
||||||
|
@Schema(description = "负责人")
|
||||||
|
private String leader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
@Schema(description = "联系电话")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
@Schema(description = "邮箱")
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门状态:0正常,1停用
|
||||||
|
*/
|
||||||
|
@Schema(description = "部门状态:0正常,1停用")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志
|
||||||
|
*/
|
||||||
|
@Schema(description = "删除标志")
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
@Schema(description = "创建者")
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
@Schema(description = "更新者")
|
||||||
|
private Long updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子部门
|
||||||
|
*/
|
||||||
|
@Schema(description = "子部门")
|
||||||
|
private List<XgSysDeptVo> children = new ArrayList<>();
|
||||||
|
}
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.xg.mapper;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgClassMsg;
|
||||||
|
import org.dromara.xg.domain.vo.XgClassMsgVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级信息-新版Mapper接口
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
public interface XgClassMsgMapper extends BaseMapperPlus<XgClassMsg, XgClassMsgVo> {
|
||||||
|
|
||||||
|
}
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.xg.mapper;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgClassTeacherCounselorRel;
|
||||||
|
import org.dromara.xg.domain.vo.XgClassTeacherCounselorRelVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任辅导员关联Mapper接口
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
public interface XgClassTeacherCounselorRelMapper extends BaseMapperPlus<XgClassTeacherCounselorRel, XgClassTeacherCounselorRelVo> {
|
||||||
|
|
||||||
|
}
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.xg.mapper;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgDormBed;
|
||||||
|
import org.dromara.xg.domain.vo.XgDormBedVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍床位信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
public interface XgDormBedMapper extends BaseMapperPlus<XgDormBed, XgDormBedVo> {
|
||||||
|
|
||||||
|
}
|
||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
package org.dromara.xg.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.dromara.xg.domain.vo.DormBuildingInfoVo;
|
||||||
|
import org.dromara.xg.domain.bo.DormBuildingTreeBo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼树形结构Mapper接口
|
||||||
|
*
|
||||||
|
* @author wuzilong
|
||||||
|
* @date 2025-07-03
|
||||||
|
*/
|
||||||
|
public interface XgDormBuildingTreeMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有校区信息
|
||||||
|
*
|
||||||
|
* @return 校区列表
|
||||||
|
*/
|
||||||
|
List<DormBuildingInfoVo> selectCampusList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有宿舍区信息
|
||||||
|
*
|
||||||
|
* @return 宿舍区列表
|
||||||
|
*/
|
||||||
|
List<DormBuildingInfoVo> selectAreaList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有宿舍楼信息
|
||||||
|
*
|
||||||
|
* @return 宿舍楼列表
|
||||||
|
*/
|
||||||
|
List<DormBuildingInfoVo> selectBuildingList(DormBuildingTreeBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取全校管理员权限的宿舍楼信息
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param bo 查询参数
|
||||||
|
* @return 宿舍楼列表
|
||||||
|
*/
|
||||||
|
List<DormBuildingInfoVo> selectBuildingsBySchoolAdmin(@Param("userId") Long userId,
|
||||||
|
@Param("bo") DormBuildingTreeBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取校区管理员权限的宿舍楼信息
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param bo 查询参数
|
||||||
|
* @return 宿舍楼列表
|
||||||
|
*/
|
||||||
|
List<DormBuildingInfoVo> selectBuildingsByCampusAdmin(@Param("userId") Long userId,
|
||||||
|
@Param("bo") DormBuildingTreeBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取宿舍区管理员权限的宿舍楼信息
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param bo 查询参数
|
||||||
|
* @return 宿舍楼列表
|
||||||
|
*/
|
||||||
|
List<DormBuildingInfoVo> selectBuildingsByAreaAdmin(@Param("userId") Long userId,
|
||||||
|
@Param("bo") DormBuildingTreeBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取宿舍楼管理员权限的宿舍楼信息
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param bo 查询参数
|
||||||
|
* @return 宿舍楼列表
|
||||||
|
*/
|
||||||
|
List<DormBuildingInfoVo> selectBuildingsByBuildingAdmin(@Param("userId") Long userId,
|
||||||
|
@Param("bo") DormBuildingTreeBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查用户是否有宿舍管理权限
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 管理员类型列表 (1全校管理员 2校区管理员 3宿舍区管理员 4宿舍楼管理员)
|
||||||
|
*/
|
||||||
|
List<String> checkUserDormManagerType(@Param("userId") Long userId);
|
||||||
|
}
|
||||||
+26
@@ -1,9 +1,12 @@
|
|||||||
package org.dromara.xg.mapper;
|
package org.dromara.xg.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.dromara.xg.domain.XgDormManagerSource;
|
import org.dromara.xg.domain.XgDormManagerSource;
|
||||||
import org.dromara.xg.domain.vo.XgDormManagerSourceVo;
|
import org.dromara.xg.domain.vo.XgDormManagerSourceVo;
|
||||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 管理员授权关系Mapper接口
|
* 管理员授权关系Mapper接口
|
||||||
*
|
*
|
||||||
@@ -12,4 +15,27 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|||||||
*/
|
*/
|
||||||
public interface XgDormManagerSourceMapper extends BaseMapperPlus<XgDormManagerSource, XgDormManagerSourceVo> {
|
public interface XgDormManagerSourceMapper extends BaseMapperPlus<XgDormManagerSource, XgDormManagerSourceVo> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID列表获取校区名称(逗号分隔)
|
||||||
|
*
|
||||||
|
* @param sourceIds 校区ID列表
|
||||||
|
* @return 校区名称,多个以逗号分隔
|
||||||
|
*/
|
||||||
|
String getCampusNamesByIds(@Param("sourceIds") List<Long> sourceIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID列表获取宿舍区名称(逗号分隔)
|
||||||
|
*
|
||||||
|
* @param sourceIds 宿舍区ID列表
|
||||||
|
* @return 宿舍区名称,多个以逗号分隔
|
||||||
|
*/
|
||||||
|
String getAreaNamesByIds(@Param("sourceIds") List<Long> sourceIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID列表获取宿舍楼名称(逗号分隔)
|
||||||
|
*
|
||||||
|
* @param sourceIds 宿舍楼ID列表
|
||||||
|
* @return 宿舍楼名称,多个以逗号分隔
|
||||||
|
*/
|
||||||
|
String getBuildingNamesByIds(@Param("sourceIds") List<Long> sourceIds);
|
||||||
}
|
}
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.xg.mapper;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgDormRoom;
|
||||||
|
import org.dromara.xg.domain.vo.XgDormRoomVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍房间信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
public interface XgDormRoomMapper extends BaseMapperPlus<XgDormRoom, XgDormRoomVo> {
|
||||||
|
|
||||||
|
}
|
||||||
+39
@@ -0,0 +1,39 @@
|
|||||||
|
package org.dromara.xg.mapper;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
import org.dromara.xg.domain.XgSysDept;
|
||||||
|
import org.dromara.xg.domain.vo.XgSysDeptVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门管理 数据层
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
public interface XgSysDeptMapper extends BaseMapperPlus<XgSysDept, XgSysDeptVo> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询二级学院列表
|
||||||
|
*
|
||||||
|
* @param sysDept 部门信息
|
||||||
|
* @return 二级学院集合
|
||||||
|
*/
|
||||||
|
List<XgSysDeptVo> selectCollegeList(XgSysDept sysDept);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据学院ID查询专业列表
|
||||||
|
*
|
||||||
|
* @param collegeId 学院ID
|
||||||
|
* @return 专业集合
|
||||||
|
*/
|
||||||
|
List<XgSysDeptVo> selectMajorListByCollegeId(Long collegeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询部门树结构信息
|
||||||
|
*
|
||||||
|
* @param dept 部门信息
|
||||||
|
* @return 部门树信息集合
|
||||||
|
*/
|
||||||
|
List<XgSysDeptVo> selectDeptTreeList(XgSysDept dept);
|
||||||
|
}
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
package org.dromara.xg.mapper;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
import org.dromara.xg.domain.XgSysUser;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统用户信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-24
|
||||||
|
*/
|
||||||
|
public interface XgSysUserMapper extends BaseMapperPlus<XgSysUser, XgSysUser> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询有效用户列表
|
||||||
|
*
|
||||||
|
* @return 用户列表
|
||||||
|
*/
|
||||||
|
List<XgSysUser> selectActiveUserList();
|
||||||
|
|
||||||
|
}
|
||||||
+68
@@ -0,0 +1,68 @@
|
|||||||
|
package org.dromara.xg.service;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.vo.XgClassMsgVo;
|
||||||
|
import org.dromara.xg.domain.bo.XgClassMsgBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级信息-新版Service接口
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
public interface IXgClassMsgService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级信息-新版
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 班级信息-新版
|
||||||
|
*/
|
||||||
|
XgClassMsgVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询班级信息-新版列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 班级信息-新版分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<XgClassMsgVo> queryPageList(XgClassMsgBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的班级信息-新版列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 班级信息-新版列表
|
||||||
|
*/
|
||||||
|
List<XgClassMsgVo> queryList(XgClassMsgBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增班级信息-新版
|
||||||
|
*
|
||||||
|
* @param bo 班级信息-新版
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(XgClassMsgBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改班级信息-新版
|
||||||
|
*
|
||||||
|
* @param bo 班级信息-新版
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(XgClassMsgBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除班级信息-新版信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
+68
@@ -0,0 +1,68 @@
|
|||||||
|
package org.dromara.xg.service;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.vo.XgClassTeacherCounselorRelVo;
|
||||||
|
import org.dromara.xg.domain.bo.XgClassTeacherCounselorRelBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任辅导员关联Service接口
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
public interface IXgClassTeacherCounselorRelService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级班主任辅导员关联
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 班级班主任辅导员关联
|
||||||
|
*/
|
||||||
|
XgClassTeacherCounselorRelVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询班级班主任辅导员关联列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 班级班主任辅导员关联分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<XgClassTeacherCounselorRelVo> queryPageList(XgClassTeacherCounselorRelBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的班级班主任辅导员关联列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 班级班主任辅导员关联列表
|
||||||
|
*/
|
||||||
|
List<XgClassTeacherCounselorRelVo> queryList(XgClassTeacherCounselorRelBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增班级班主任辅导员关联
|
||||||
|
*
|
||||||
|
* @param bo 班级班主任辅导员关联
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(XgClassTeacherCounselorRelBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改班级班主任辅导员关联
|
||||||
|
*
|
||||||
|
* @param bo 班级班主任辅导员关联
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(XgClassTeacherCounselorRelBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除班级班主任辅导员关联信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
+9
@@ -4,6 +4,7 @@ import org.dromara.xg.domain.vo.XgDormAreaVo;
|
|||||||
import org.dromara.xg.domain.bo.XgDormAreaBo;
|
import org.dromara.xg.domain.bo.XgDormAreaBo;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.xg.domain.vo.TreeSelectVo;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -65,4 +66,12 @@ public interface IXgDormAreaService {
|
|||||||
* @return 是否删除成功
|
* @return 是否删除成功
|
||||||
*/
|
*/
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取宿舍区树形结构数据
|
||||||
|
* 以校区为根节点,宿舍区为子节点
|
||||||
|
*
|
||||||
|
* @return 宿舍区树形结构列表
|
||||||
|
*/
|
||||||
|
List<TreeSelectVo> getAreaTree();
|
||||||
}
|
}
|
||||||
+68
@@ -0,0 +1,68 @@
|
|||||||
|
package org.dromara.xg.service;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.vo.XgDormBedVo;
|
||||||
|
import org.dromara.xg.domain.bo.XgDormBedBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍床位信息Service接口
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
public interface IXgDormBedService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询宿舍床位信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 宿舍床位信息
|
||||||
|
*/
|
||||||
|
XgDormBedVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询宿舍床位信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 宿舍床位信息分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<XgDormBedVo> queryPageList(XgDormBedBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的宿舍床位信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 宿舍床位信息列表
|
||||||
|
*/
|
||||||
|
List<XgDormBedVo> queryList(XgDormBedBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增宿舍床位信息
|
||||||
|
*
|
||||||
|
* @param bo 宿舍床位信息
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(XgDormBedBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改宿舍床位信息
|
||||||
|
*
|
||||||
|
* @param bo 宿舍床位信息
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(XgDormBedBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除宿舍床位信息信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
+9
@@ -2,6 +2,7 @@ package org.dromara.xg.service;
|
|||||||
|
|
||||||
import org.dromara.xg.domain.vo.XgDormBuildingVo;
|
import org.dromara.xg.domain.vo.XgDormBuildingVo;
|
||||||
import org.dromara.xg.domain.bo.XgDormBuildingBo;
|
import org.dromara.xg.domain.bo.XgDormBuildingBo;
|
||||||
|
import org.dromara.xg.domain.vo.BuildingTreeSelectVo;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
@@ -65,4 +66,12 @@ public interface IXgDormBuildingService {
|
|||||||
* @return 是否删除成功
|
* @return 是否删除成功
|
||||||
*/
|
*/
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取宿舍楼树形结构数据
|
||||||
|
* 校区-宿舍区-宿舍楼三级结构,校区和宿舍区不可选,只有宿舍楼可以选择
|
||||||
|
*
|
||||||
|
* @return 树形结构数据
|
||||||
|
*/
|
||||||
|
List<BuildingTreeSelectVo> getBuildingTreeData();
|
||||||
}
|
}
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
package org.dromara.xg.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.dromara.xg.domain.vo.DormBuildingTreeVo;
|
||||||
|
import org.dromara.xg.domain.bo.DormBuildingTreeBo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼树形结构服务接口
|
||||||
|
*
|
||||||
|
* @author wuzilong
|
||||||
|
* @date 2025-07-03
|
||||||
|
*/
|
||||||
|
public interface IXgDormBuildingTreeService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取宿舍楼树形结构数据
|
||||||
|
*
|
||||||
|
* @param bo 查询参数
|
||||||
|
* @return 树形结构数据
|
||||||
|
*/
|
||||||
|
List<DormBuildingTreeVo> getDormBuildingTree(DormBuildingTreeBo bo);
|
||||||
|
|
||||||
|
}
|
||||||
+12
-23
@@ -18,51 +18,31 @@ public interface IXgDormManagerSourceService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询管理员授权关系
|
* 查询管理员授权关系
|
||||||
*
|
|
||||||
* @param id 主键
|
|
||||||
* @return 管理员授权关系
|
|
||||||
*/
|
*/
|
||||||
XgDormManagerSourceVo queryById(Long id);
|
XgDormManagerSourceVo queryById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询管理员授权关系列表
|
* 查询管理员授权关系列表
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @param pageQuery 分页参数
|
|
||||||
* @return 管理员授权关系分页列表
|
|
||||||
*/
|
*/
|
||||||
TableDataInfo<XgDormManagerSourceVo> queryPageList(XgDormManagerSourceBo bo, PageQuery pageQuery);
|
TableDataInfo<XgDormManagerSourceVo> queryPageList(XgDormManagerSourceBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询符合条件的管理员授权关系列表
|
* 查询管理员授权关系列表
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @return 管理员授权关系列表
|
|
||||||
*/
|
*/
|
||||||
List<XgDormManagerSourceVo> queryList(XgDormManagerSourceBo bo);
|
List<XgDormManagerSourceVo> queryList(XgDormManagerSourceBo bo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增管理员授权关系
|
* 新增管理员授权关系
|
||||||
*
|
|
||||||
* @param bo 管理员授权关系
|
|
||||||
* @return 是否新增成功
|
|
||||||
*/
|
*/
|
||||||
Boolean insertByBo(XgDormManagerSourceBo bo);
|
Boolean insertByBo(XgDormManagerSourceBo bo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改管理员授权关系
|
* 修改管理员授权关系
|
||||||
*
|
|
||||||
* @param bo 管理员授权关系
|
|
||||||
* @return 是否修改成功
|
|
||||||
*/
|
*/
|
||||||
Boolean updateByBo(XgDormManagerSourceBo bo);
|
Boolean updateByBo(XgDormManagerSourceBo bo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验并批量删除管理员授权关系信息
|
* 校验并批量删除管理员授权关系信息
|
||||||
*
|
|
||||||
* @param ids 待删除的主键集合
|
|
||||||
* @param isValid 是否进行有效性校验
|
|
||||||
* @return 是否删除成功
|
|
||||||
*/
|
*/
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
@@ -72,7 +52,16 @@ public interface IXgDormManagerSourceService {
|
|||||||
* @param managerId 管理员ID
|
* @param managerId 管理员ID
|
||||||
* @param authType 授权类型(1全校级 2校区级 3宿舍区级 4楼栋级)
|
* @param authType 授权类型(1全校级 2校区级 3宿舍区级 4楼栋级)
|
||||||
* @param authSourceIds 授权来源ID列表
|
* @param authSourceIds 授权来源ID列表
|
||||||
* @return 是否分配成功
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
Boolean assignScope(Long managerId, Character authType, List<Long> authSourceIds);
|
Boolean assignScope(Long managerId, Character authType, List<Long> authSourceIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取管理员授权范围名称
|
||||||
|
*
|
||||||
|
* @param managerId 管理员ID
|
||||||
|
* @param managerType 管理员类型(1全校级 2校区级 3宿舍区级 4楼栋级)
|
||||||
|
* @return 授权范围名称(逗号分隔字符串)
|
||||||
|
*/
|
||||||
|
String getScopeNames(Long managerId, Integer managerType);
|
||||||
}
|
}
|
||||||
+68
@@ -0,0 +1,68 @@
|
|||||||
|
package org.dromara.xg.service;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.vo.XgDormRoomVo;
|
||||||
|
import org.dromara.xg.domain.bo.XgDormRoomBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍房间信息Service接口
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
public interface IXgDormRoomService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询宿舍房间信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 宿舍房间信息
|
||||||
|
*/
|
||||||
|
XgDormRoomVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询宿舍房间信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 宿舍房间信息分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<XgDormRoomVo> queryPageList(XgDormRoomBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的宿舍房间信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 宿舍房间信息列表
|
||||||
|
*/
|
||||||
|
List<XgDormRoomVo> queryList(XgDormRoomBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增宿舍房间信息
|
||||||
|
*
|
||||||
|
* @param bo 宿舍房间信息
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(XgDormRoomBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改宿舍房间信息
|
||||||
|
*
|
||||||
|
* @param bo 宿舍房间信息
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(XgDormRoomBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除宿舍房间信息信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
package org.dromara.xg.service;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgSysDept;
|
||||||
|
import org.dromara.xg.domain.vo.XgSysDeptVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门管理 服务层
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
public interface IXgSysDeptService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询二级学院列表
|
||||||
|
*
|
||||||
|
* @return 学院列表
|
||||||
|
*/
|
||||||
|
List<XgSysDeptVo> selectCollegeList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询学院和专业的树结构
|
||||||
|
*
|
||||||
|
* @return 树结构列表
|
||||||
|
*/
|
||||||
|
List<XgSysDeptVo> selectCollegeAndMajorTree();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据学院ID查询专业列表
|
||||||
|
*
|
||||||
|
* @param collegeId 学院ID
|
||||||
|
* @return 专业列表
|
||||||
|
*/
|
||||||
|
List<XgSysDeptVo> selectMajorListByCollegeId(Long collegeId);
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package org.dromara.xg.service;
|
||||||
|
|
||||||
|
import org.dromara.xg.domain.XgSysUser;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统用户信息Service接口
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-24
|
||||||
|
*/
|
||||||
|
public interface IXgSysUserService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有有效用户列表
|
||||||
|
*
|
||||||
|
* @return 有效用户列表
|
||||||
|
*/
|
||||||
|
List<XgSysUser> selectActiveUserList();
|
||||||
|
|
||||||
|
}
|
||||||
+272
@@ -0,0 +1,272 @@
|
|||||||
|
package org.dromara.xg.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.system.domain.SysDept;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.dromara.xg.domain.bo.XgClassMsgBo;
|
||||||
|
import org.dromara.xg.domain.vo.XgClassMsgVo;
|
||||||
|
import org.dromara.xg.domain.XgClassMsg;
|
||||||
|
import org.dromara.xg.domain.XgSysDept;
|
||||||
|
import org.dromara.xg.mapper.XgClassMsgMapper;
|
||||||
|
import org.dromara.xg.mapper.XgSysDeptMapper;
|
||||||
|
import org.dromara.xg.service.IXgClassMsgService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级信息-新版Service业务层处理
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class XgClassMsgServiceImpl implements IXgClassMsgService {
|
||||||
|
|
||||||
|
private final XgClassMsgMapper baseMapper;
|
||||||
|
private final XgSysDeptMapper deptMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级信息-新版
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 班级信息-新版
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public XgClassMsgVo queryById(Long id) {
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询班级信息-新版列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 班级信息-新版分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<XgClassMsgVo> queryPageList(XgClassMsgBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<XgClassMsg> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<XgClassMsgVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的班级信息-新版列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 班级信息-新版列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<XgClassMsgVo> queryList(XgClassMsgBo bo) {
|
||||||
|
LambdaQueryWrapper<XgClassMsg> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<XgClassMsg> buildQueryWrapper(XgClassMsgBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<XgClassMsg> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(XgClassMsg::getId);
|
||||||
|
lqw.eq(bo.getCollegeId() != null, XgClassMsg::getCollegeId, bo.getCollegeId());
|
||||||
|
lqw.eq(bo.getMajorId() != null, XgClassMsg::getMajorId, bo.getMajorId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getClassName()), XgClassMsg::getClassName, bo.getClassName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getClassType()), XgClassMsg::getClassType, bo.getClassType());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getGrade()), XgClassMsg::getGrade, bo.getGrade());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getClassStatus()), XgClassMsg::getClassStatus, bo.getClassStatus());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增班级信息-新版
|
||||||
|
*
|
||||||
|
* @param bo 班级信息-新版
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean insertByBo(XgClassMsgBo bo) {
|
||||||
|
XgClassMsg add = MapstructUtils.convert(bo, XgClassMsg.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
|
||||||
|
// 在班级创建成功后,同时创建对应的部门信息
|
||||||
|
XgSysDept dept = new XgSysDept();
|
||||||
|
dept.setDeptName(bo.getClassName()); // 使用班级名称作为部门名称
|
||||||
|
dept.setParentId(bo.getMajorId()); // 以专业作为父部门
|
||||||
|
|
||||||
|
// 查询父部门信息,构建祖级列表
|
||||||
|
XgSysDept parentDept = deptMapper.selectById(bo.getMajorId());
|
||||||
|
if (parentDept != null) {
|
||||||
|
dept.setAncestors(parentDept.getAncestors() + "," + parentDept.getDeptId());
|
||||||
|
} else {
|
||||||
|
// 如果父部门不存在,则设置为顶级部门
|
||||||
|
dept.setAncestors("0");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置部门基本信息
|
||||||
|
dept.setOrderNum(10); // 默认排序号
|
||||||
|
dept.setStatus("0"); // 状态:0正常
|
||||||
|
dept.setDelFlag("0"); // 删除标志:0代表存在
|
||||||
|
dept.setDeptCategory("bj-" + bo.getClassName()); // 部门类别编码:1班级
|
||||||
|
// 设置联系信息
|
||||||
|
dept.setPhone(bo.getContactPhone());
|
||||||
|
dept.setEmail(bo.getEmail());
|
||||||
|
|
||||||
|
// 设置负责人(班主任)
|
||||||
|
if (bo.getClassTeacherId() != null && StringUtils.isNotEmpty(bo.getClassTeacherName())) {
|
||||||
|
dept.setLeader(bo.getClassTeacherId());
|
||||||
|
}
|
||||||
|
|
||||||
|
dept.setDeptId(add.getId());
|
||||||
|
|
||||||
|
// 插入部门记录
|
||||||
|
deptMapper.insert(dept);
|
||||||
|
log.info("成功创建班级对应的部门信息,班级ID:{},部门ID:{}", bo.getId(), dept.getDeptId());
|
||||||
|
}
|
||||||
|
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改班级信息-新版
|
||||||
|
*
|
||||||
|
* @param bo 班级信息-新版
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean updateByBo(XgClassMsgBo bo) {
|
||||||
|
XgClassMsg update = MapstructUtils.convert(bo, XgClassMsg.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
|
||||||
|
// 使用LambdaQueryWrapper替代直接调用updateById
|
||||||
|
LambdaQueryWrapper<XgClassMsg> updateWrapper = Wrappers.lambdaQuery();
|
||||||
|
updateWrapper.eq(XgClassMsg::getId, update.getId());
|
||||||
|
boolean result = baseMapper.update(update, updateWrapper) > 0;
|
||||||
|
|
||||||
|
// 更新成功后,同步更新部门表信息
|
||||||
|
if (result) {
|
||||||
|
// 查询部门信息
|
||||||
|
XgSysDept dept = deptMapper.selectById(update.getId());
|
||||||
|
if (dept != null) {
|
||||||
|
// 更新部门基本信息
|
||||||
|
dept.setDeptName(update.getClassName()); // 使用班级名称作为部门名称
|
||||||
|
|
||||||
|
// 如果班级的父部门(专业)发生变化,需要更新祖级列表
|
||||||
|
if (!dept.getParentId().equals(update.getMajorId())) {
|
||||||
|
dept.setParentId(update.getMajorId()); // 设置新的父部门ID
|
||||||
|
|
||||||
|
// 查询父部门信息,构建新的祖级列表
|
||||||
|
XgSysDept parentDept = deptMapper.selectById(update.getMajorId());
|
||||||
|
if (parentDept != null) {
|
||||||
|
dept.setAncestors(parentDept.getAncestors() + "," + parentDept.getDeptId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dept.setDeptCategory("bj-" + bo.getClassName()); // 部门类别编码:1班级
|
||||||
|
// 更新联系信息
|
||||||
|
dept.setPhone(update.getContactPhone());
|
||||||
|
dept.setEmail(update.getEmail());
|
||||||
|
|
||||||
|
// 更新负责人(班主任)
|
||||||
|
if (update.getClassTeacherId() != null && StringUtils.isNotEmpty(update.getClassTeacherName())) {
|
||||||
|
dept.setLeader(update.getClassTeacherId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新部门表
|
||||||
|
LambdaQueryWrapper<XgSysDept> deptUpdateWrapper = Wrappers.lambdaQuery();
|
||||||
|
deptUpdateWrapper.eq(XgSysDept::getDeptId, dept.getDeptId());
|
||||||
|
deptMapper.update(dept, deptUpdateWrapper);
|
||||||
|
log.info("成功更新班级对应的部门信息,班级ID:{},部门ID:{}", update.getId(), dept.getDeptId());
|
||||||
|
} else {
|
||||||
|
// 如果部门不存在,则创建新的部门记录
|
||||||
|
dept = new XgSysDept();
|
||||||
|
dept.setDeptId(update.getId());
|
||||||
|
dept.setDeptName(update.getClassName()); // 使用班级名称作为部门名称
|
||||||
|
dept.setParentId(update.getMajorId()); // 以专业作为父部门
|
||||||
|
|
||||||
|
// 查询父部门信息,构建祖级列表
|
||||||
|
XgSysDept parentDept = deptMapper.selectById(update.getMajorId());
|
||||||
|
if (parentDept != null) {
|
||||||
|
dept.setAncestors(parentDept.getAncestors() + "," + parentDept.getDeptId());
|
||||||
|
} else {
|
||||||
|
// 如果父部门不存在,则设置为顶级部门
|
||||||
|
dept.setAncestors("0");
|
||||||
|
}
|
||||||
|
// dept.setDeptCategory("bj-" + bo.getClassName()); // 部门类别编码:1班级
|
||||||
|
// 设置部门基本信息
|
||||||
|
dept.setOrderNum(10); // 默认排序号
|
||||||
|
dept.setStatus("0"); // 状态:0正常
|
||||||
|
dept.setDelFlag("0"); // 删除标志:0代表存在
|
||||||
|
dept.setDeptCategory("bj-" + update.getClassName()); // 部门类别编码:bj-班级
|
||||||
|
|
||||||
|
// 设置联系信息
|
||||||
|
dept.setPhone(update.getContactPhone());
|
||||||
|
dept.setEmail(update.getEmail());
|
||||||
|
|
||||||
|
// 设置负责人(班主任)
|
||||||
|
if (update.getClassTeacherId() != null && StringUtils.isNotEmpty(update.getClassTeacherName())) {
|
||||||
|
dept.setLeader(update.getClassTeacherId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 插入部门记录
|
||||||
|
deptMapper.insert(dept);
|
||||||
|
log.info("班级对应的部门信息不存在,已创建部门信息,班级ID:{},部门ID:{}", update.getId(), dept.getDeptId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(XgClassMsg entity) {
|
||||||
|
// TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除班级信息-新版信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
// TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除班级的同时,标记对应的部门为删除状态
|
||||||
|
for (Long id : ids) {
|
||||||
|
XgSysDept dept = deptMapper.selectById(id);
|
||||||
|
if (dept != null) {
|
||||||
|
dept.setDelFlag("1"); // 设置删除标志(1代表删除)
|
||||||
|
// 使用LambdaUpdateWrapper替代直接调用updateById
|
||||||
|
LambdaQueryWrapper<XgSysDept> deleteUpdateWrapper = Wrappers.lambdaQuery();
|
||||||
|
deleteUpdateWrapper.eq(XgSysDept::getDeptId, dept.getDeptId());
|
||||||
|
deptMapper.update(dept, deleteUpdateWrapper);
|
||||||
|
log.info("成功标记班级对应的部门为删除状态,班级ID:{},部门ID:{}", id, dept.getDeptId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
+433
@@ -0,0 +1,433 @@
|
|||||||
|
package org.dromara.xg.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.dromara.xg.domain.bo.XgClassTeacherCounselorRelBo;
|
||||||
|
import org.dromara.xg.domain.vo.XgClassTeacherCounselorRelVo;
|
||||||
|
import org.dromara.xg.domain.XgClassTeacherCounselorRel;
|
||||||
|
import org.dromara.xg.domain.XgClassMsg;
|
||||||
|
import org.dromara.xg.mapper.XgClassTeacherCounselorRelMapper;
|
||||||
|
import org.dromara.xg.mapper.XgClassMsgMapper;
|
||||||
|
import org.dromara.xg.service.IXgClassTeacherCounselorRelService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级班主任辅导员关联Service业务层处理
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-23
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class XgClassTeacherCounselorRelServiceImpl implements IXgClassTeacherCounselorRelService {
|
||||||
|
|
||||||
|
private final XgClassTeacherCounselorRelMapper baseMapper;
|
||||||
|
private final XgClassMsgMapper classMsgMapper;
|
||||||
|
|
||||||
|
// 班主任类型常量
|
||||||
|
private static final String HEAD_TEACHER_TYPE = "class_teacher";
|
||||||
|
// 辅导员类型常量
|
||||||
|
private static final String COUNSELOR_TYPE = "counselor";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询班级班主任辅导员关联
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 班级班主任辅导员关联
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public XgClassTeacherCounselorRelVo queryById(Long id) {
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询班级班主任辅导员关联列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 班级班主任辅导员关联分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<XgClassTeacherCounselorRelVo> queryPageList(XgClassTeacherCounselorRelBo bo,
|
||||||
|
PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<XgClassTeacherCounselorRel> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<XgClassTeacherCounselorRelVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的班级班主任辅导员关联列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 班级班主任辅导员关联列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<XgClassTeacherCounselorRelVo> queryList(XgClassTeacherCounselorRelBo bo) {
|
||||||
|
LambdaQueryWrapper<XgClassTeacherCounselorRel> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<XgClassTeacherCounselorRel> buildQueryWrapper(XgClassTeacherCounselorRelBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<XgClassTeacherCounselorRel> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(XgClassTeacherCounselorRel::getId);
|
||||||
|
lqw.eq(bo.getDeleted() != null, XgClassTeacherCounselorRel::getDeleted, bo.getDeleted());
|
||||||
|
lqw.eq(bo.getClassId() != null, XgClassTeacherCounselorRel::getClassId, bo.getClassId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getClassName()), XgClassTeacherCounselorRel::getClassName,
|
||||||
|
bo.getClassName());
|
||||||
|
lqw.eq(bo.getTeacherId() != null, XgClassTeacherCounselorRel::getTeacherId, bo.getTeacherId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getTeacherName()), XgClassTeacherCounselorRel::getTeacherName,
|
||||||
|
bo.getTeacherName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTeacherType()), XgClassTeacherCounselorRel::getTeacherType,
|
||||||
|
bo.getTeacherType());
|
||||||
|
lqw.eq(bo.getStartDate() != null, XgClassTeacherCounselorRel::getStartDate, bo.getStartDate());
|
||||||
|
lqw.eq(bo.getEndDate() != null, XgClassTeacherCounselorRel::getEndDate, bo.getEndDate());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增班级班主任辅导员关联
|
||||||
|
*
|
||||||
|
* @param bo 班级班主任辅导员关联
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean insertByBo(XgClassTeacherCounselorRelBo bo) {
|
||||||
|
// 当处理班主任更换时的特殊流程
|
||||||
|
if (HEAD_TEACHER_TYPE.equals(bo.getTeacherType())) {
|
||||||
|
log.info("开始处理班主任更换流程: classId=[{}], teacherId=[{}], teacherName=[{}]",
|
||||||
|
bo.getClassId(), bo.getTeacherId(), bo.getTeacherName());
|
||||||
|
// 1. 查询当前班级的班主任记录
|
||||||
|
LambdaQueryWrapper<XgClassTeacherCounselorRel> queryWrapper = Wrappers.lambdaQuery();
|
||||||
|
queryWrapper.eq(XgClassTeacherCounselorRel::getClassId, bo.getClassId())
|
||||||
|
.eq(XgClassTeacherCounselorRel::getTeacherType, HEAD_TEACHER_TYPE)
|
||||||
|
.eq(XgClassTeacherCounselorRel::getDeleted, 0);
|
||||||
|
|
||||||
|
log.info("准备查询班级ID[{}]的现有班主任记录,查询条件: teacherType={}, deleted={}",
|
||||||
|
bo.getClassId(), HEAD_TEACHER_TYPE, 0);
|
||||||
|
List<XgClassTeacherCounselorRel> currentRecords = baseMapper.selectList(queryWrapper);
|
||||||
|
log.info("班级ID[{}]的班主任查询结果: 找到{}条记录", bo.getClassId(), currentRecords.size());
|
||||||
|
|
||||||
|
// 2. 将当前班级的班主任记录标记为删除并设置结束日期
|
||||||
|
if (!currentRecords.isEmpty()) {
|
||||||
|
for (XgClassTeacherCounselorRel record : currentRecords) {
|
||||||
|
record.setDeleted(1L);
|
||||||
|
record.setEndDate(new Date());
|
||||||
|
baseMapper.updateById(record);
|
||||||
|
// 再执行逻辑删除
|
||||||
|
baseMapper.deleteById(record.getId());
|
||||||
|
log.info("已将班级ID[{}]的原班主任记录ID[{}]标记为删除并设置结束日期: {}",
|
||||||
|
record.getClassId(), record.getId(), record.getEndDate());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 当bo.getTeacherId(),
|
||||||
|
// bo.getTeacherName()为空时,就不要插入新数据了,但是还是需要更新xg_class_msg表中的班主任信息
|
||||||
|
// log.info("bo.getTeacherName()=[{}]", bo.getTeacherName());
|
||||||
|
log.info("班主任名称值检查 - 原始值:[{}], 是否为null:{}, 长度:{}, 去空格后:[{}]",
|
||||||
|
bo.getTeacherName(),
|
||||||
|
bo.getTeacherName() == null,
|
||||||
|
bo.getTeacherName() == null ? -1 : bo.getTeacherName().length(),
|
||||||
|
bo.getTeacherName() == null ? "null" : bo.getTeacherName().trim());
|
||||||
|
|
||||||
|
if (bo.getTeacherName() == null || "none123".equals(bo.getTeacherName())
|
||||||
|
|| (bo.getTeacherName() != null
|
||||||
|
&& ("none123".equals(bo.getTeacherName().trim())
|
||||||
|
|| "none123".equalsIgnoreCase(bo.getTeacherName().trim())
|
||||||
|
|| bo.getTeacherName().trim().isEmpty()
|
||||||
|
|| "null".equals(bo.getTeacherName().trim())))) {
|
||||||
|
log.info("班主任信息为空,不插入新数据");
|
||||||
|
// 4. 更新班级表中的班主任信息
|
||||||
|
LambdaUpdateWrapper<XgClassMsg> classUpdateWrapper = Wrappers.lambdaUpdate(XgClassMsg.class)
|
||||||
|
.eq(XgClassMsg::getId, bo.getClassId())
|
||||||
|
.set(XgClassMsg::getClassTeacherId, null)
|
||||||
|
.set(XgClassMsg::getClassTeacherName, null);
|
||||||
|
|
||||||
|
int updateResult = classMsgMapper.update(null, classUpdateWrapper);
|
||||||
|
log.info("更新班级表中的班主任信息: classId=[{}], teacherId=[{}], teacherName=[{}], 结果=[{}]",
|
||||||
|
bo.getClassId(), bo.getTeacherId(), bo.getTeacherName(), updateResult > 0 ? "成功" : "失败");
|
||||||
|
|
||||||
|
log.info("已完成班级ID[{}]的班主任信息更换: teacherId={}, teacherName={}",
|
||||||
|
bo.getClassId(), bo.getTeacherId(), bo.getTeacherName());
|
||||||
|
|
||||||
|
// 班主任信息为空,不插入新数据,直接返回
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
// 4. 更新班级表中的班主任信息
|
||||||
|
LambdaUpdateWrapper<XgClassMsg> classUpdateWrapper = Wrappers.lambdaUpdate(XgClassMsg.class)
|
||||||
|
.eq(XgClassMsg::getId, bo.getClassId())
|
||||||
|
.set(XgClassMsg::getClassTeacherId, bo.getTeacherId())
|
||||||
|
.set(XgClassMsg::getClassTeacherName, bo.getTeacherName());
|
||||||
|
|
||||||
|
int updateResult = classMsgMapper.update(null, classUpdateWrapper);
|
||||||
|
log.info("更新班级表中的班主任信息: classId=[{}], teacherId=[{}], teacherName=[{}], 结果=[{}]",
|
||||||
|
bo.getClassId(), bo.getTeacherId(), bo.getTeacherName(), updateResult > 0 ? "成功" : "失败");
|
||||||
|
|
||||||
|
log.info("已完成班级ID[{}]的班主任信息更换: teacherId={}, teacherName={}",
|
||||||
|
bo.getClassId(), bo.getTeacherId(), bo.getTeacherName());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 插入新的班主任关联记录
|
||||||
|
XgClassTeacherCounselorRel newRel = MapstructUtils.convert(bo, XgClassTeacherCounselorRel.class);
|
||||||
|
newRel.setId(null); // 确保插入新记录
|
||||||
|
newRel.setDeleted(0L);
|
||||||
|
newRel.setStartDate(new Date());
|
||||||
|
validEntityBeforeSave(newRel);
|
||||||
|
int insertResult = baseMapper.insert(newRel);
|
||||||
|
log.info("插入新的班主任关联记录: classId=[{}], teacherId=[{}], 结果=[{}], 新记录ID=[{}]",
|
||||||
|
newRel.getClassId(), newRel.getTeacherId(), insertResult > 0 ? "成功" : "失败", newRel.getId());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else if (COUNSELOR_TYPE.equals(bo.getTeacherType())) {
|
||||||
|
log.info("开始处理辅导员更换流程: classId=[{}], teacherId=[{}], teacherName=[{}]",
|
||||||
|
bo.getClassId(), bo.getTeacherId(), bo.getTeacherName());
|
||||||
|
// 1. 查询当前班级的辅导员记录
|
||||||
|
LambdaQueryWrapper<XgClassTeacherCounselorRel> queryWrapper = Wrappers.lambdaQuery();
|
||||||
|
queryWrapper.eq(XgClassTeacherCounselorRel::getClassId, bo.getClassId())
|
||||||
|
.eq(XgClassTeacherCounselorRel::getTeacherType, COUNSELOR_TYPE)
|
||||||
|
.eq(XgClassTeacherCounselorRel::getDeleted, 0);
|
||||||
|
|
||||||
|
log.info("准备查询班级ID[{}]的现有辅导员记录,查询条件: teacherType={}, deleted={}",
|
||||||
|
bo.getClassId(), COUNSELOR_TYPE, 0);
|
||||||
|
List<XgClassTeacherCounselorRel> currentRecords = baseMapper.selectList(queryWrapper);
|
||||||
|
log.info("班级ID[{}]的辅导员查询结果: 找到{}条记录", bo.getClassId(), currentRecords.size());
|
||||||
|
|
||||||
|
// 2. 将当前班级的辅导员记录标记为删除并设置结束日期
|
||||||
|
if (!currentRecords.isEmpty()) {
|
||||||
|
for (XgClassTeacherCounselorRel record : currentRecords) {
|
||||||
|
record.setDeleted(1L);
|
||||||
|
record.setEndDate(new Date());
|
||||||
|
baseMapper.updateById(record);
|
||||||
|
// 再执行逻辑删除
|
||||||
|
baseMapper.deleteById(record.getId());
|
||||||
|
log.info("已将班级ID[{}]的原辅导员记录ID[{}]标记为删除并设置结束日期: {}",
|
||||||
|
record.getClassId(), record.getId(), record.getEndDate());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 当bo.getTeacherId(),
|
||||||
|
// bo.getTeacherName()为空时,就不要插入新数据了,但是还是需要更新xg_class_msg表中的班主任信息
|
||||||
|
// log.info("bo.getTeacherName()=[{}]", bo.getTeacherName());
|
||||||
|
log.info("辅导员名称值检查 - 原始值:[{}], 是否为null:{}, 长度:{}, 去空格后:[{}]",
|
||||||
|
bo.getTeacherName(),
|
||||||
|
bo.getTeacherName() == null,
|
||||||
|
bo.getTeacherName() == null ? -1 : bo.getTeacherName().length(),
|
||||||
|
bo.getTeacherName() == null ? "null" : bo.getTeacherName().trim());
|
||||||
|
|
||||||
|
if (bo.getTeacherName() == null || "none123".equals(bo.getTeacherName())
|
||||||
|
|| (bo.getTeacherName() != null
|
||||||
|
&& ("none123".equals(bo.getTeacherName().trim())
|
||||||
|
|| "none123".equalsIgnoreCase(bo.getTeacherName().trim())
|
||||||
|
|| bo.getTeacherName().trim().isEmpty()
|
||||||
|
|| "null".equals(bo.getTeacherName().trim())))) {
|
||||||
|
log.info("辅导员信息为空,不插入新数据");
|
||||||
|
// 4. 更新班级表中的班主任信息
|
||||||
|
LambdaUpdateWrapper<XgClassMsg> classUpdateWrapper = Wrappers.lambdaUpdate(XgClassMsg.class)
|
||||||
|
.eq(XgClassMsg::getId, bo.getClassId())
|
||||||
|
.set(XgClassMsg::getCounselorId, null)
|
||||||
|
.set(XgClassMsg::getCounselorName, null);
|
||||||
|
|
||||||
|
int updateResult = classMsgMapper.update(null, classUpdateWrapper);
|
||||||
|
log.info("更新班级表中的辅导员信息: classId=[{}], teacherId=[{}], teacherName=[{}], 结果=[{}]",
|
||||||
|
bo.getClassId(), bo.getTeacherId(), bo.getTeacherName(), updateResult > 0 ? "成功" : "失败");
|
||||||
|
|
||||||
|
log.info("已完成班级ID[{}]的辅导员信息更换: teacherId={}, teacherName={}",
|
||||||
|
bo.getClassId(), bo.getTeacherId(), bo.getTeacherName());
|
||||||
|
|
||||||
|
// 辅导员信息为空,不插入新数据,直接返回
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
LambdaUpdateWrapper<XgClassMsg> classUpdateWrapper = Wrappers.lambdaUpdate(XgClassMsg.class)
|
||||||
|
.eq(XgClassMsg::getId, bo.getClassId())
|
||||||
|
.set(XgClassMsg::getCounselorId, bo.getTeacherId())
|
||||||
|
.set(XgClassMsg::getCounselorName, bo.getTeacherName());
|
||||||
|
|
||||||
|
int updateResult = classMsgMapper.update(null, classUpdateWrapper);
|
||||||
|
log.info("更新班级表中的辅导员信息: classId=[{}], teacherId=[{}], teacherName=[{}], 结果=[{}]",
|
||||||
|
bo.getClassId(), bo.getTeacherId(), bo.getTeacherName(), updateResult > 0 ? "成功" : "失败");
|
||||||
|
|
||||||
|
log.info("已完成班级ID[{}]的辅导员信息更换: teacherId={}, teacherName={}",
|
||||||
|
bo.getClassId(), bo.getTeacherId(), bo.getTeacherName());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 插入新的辅导员关联记录
|
||||||
|
XgClassTeacherCounselorRel newRel = MapstructUtils.convert(bo, XgClassTeacherCounselorRel.class);
|
||||||
|
newRel.setId(null); // 确保插入新记录
|
||||||
|
newRel.setDeleted(0L);
|
||||||
|
newRel.setStartDate(new Date());
|
||||||
|
validEntityBeforeSave(newRel);
|
||||||
|
int insertResult = baseMapper.insert(newRel);
|
||||||
|
log.info("插入新的辅导员关联记录: classId=[{}], teacherId=[{}], 结果=[{}], 新记录ID=[{}]",
|
||||||
|
newRel.getClassId(), newRel.getTeacherId(), insertResult > 0 ? "成功" : "失败", newRel.getId());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
// 非班主任类型的普通更新
|
||||||
|
XgClassTeacherCounselorRel update = MapstructUtils.convert(bo, XgClassTeacherCounselorRel.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
boolean result = baseMapper.updateById(update) > 0;
|
||||||
|
log.info("更新非班主任类型关联记录: id=[{}], teacherType=[{}], 结果=[{}]",
|
||||||
|
update.getId(), update.getTeacherType(), result ? "成功" : "失败");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改班级班主任辅导员关联
|
||||||
|
*
|
||||||
|
* @param bo 班级班主任辅导员关联
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean updateByBo(XgClassTeacherCounselorRelBo bo) {
|
||||||
|
// 当处理班主任更换时的特殊流程
|
||||||
|
if (HEAD_TEACHER_TYPE.equals(bo.getTeacherType())) {
|
||||||
|
log.info("开始处理班主任更换流程: classId=[{}], teacherId=[{}], teacherName=[{}]",
|
||||||
|
bo.getClassId(), bo.getTeacherId(), bo.getTeacherName());
|
||||||
|
// 1. 查询当前班级的班主任记录
|
||||||
|
LambdaQueryWrapper<XgClassTeacherCounselorRel> queryWrapper = Wrappers.lambdaQuery();
|
||||||
|
queryWrapper.eq(XgClassTeacherCounselorRel::getClassId, bo.getClassId())
|
||||||
|
.eq(XgClassTeacherCounselorRel::getTeacherType, HEAD_TEACHER_TYPE)
|
||||||
|
.eq(XgClassTeacherCounselorRel::getDeleted, 0);
|
||||||
|
|
||||||
|
log.info("准备查询班级ID[{}]的现有班主任记录,查询条件: teacherType={}, deleted={}",
|
||||||
|
bo.getClassId(), HEAD_TEACHER_TYPE, 0);
|
||||||
|
List<XgClassTeacherCounselorRel> currentRecords = baseMapper.selectList(queryWrapper);
|
||||||
|
log.info("班级ID[{}]的班主任查询结果: 找到{}条记录", bo.getClassId(), currentRecords.size());
|
||||||
|
|
||||||
|
// 2. 将当前班级的班主任记录标记为删除并设置结束日期
|
||||||
|
if (!currentRecords.isEmpty()) {
|
||||||
|
for (XgClassTeacherCounselorRel record : currentRecords) {
|
||||||
|
record.setDeleted(1L);
|
||||||
|
record.setEndDate(new Date());
|
||||||
|
baseMapper.updateById(record);
|
||||||
|
// 再执行逻辑删除
|
||||||
|
baseMapper.deleteById(record.getId());
|
||||||
|
log.info("已将班级ID[{}]的原班主任记录ID[{}]标记为删除并设置结束日期: {}",
|
||||||
|
record.getClassId(), record.getId(), record.getEndDate());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 当bo.getTeacherId(),
|
||||||
|
// bo.getTeacherName()为空时,就不要插入新数据了,但是还是需要更新xg_class_msg表中的班主任信息
|
||||||
|
// log.info("bo.getTeacherName()=[{}]", bo.getTeacherName());
|
||||||
|
log.info("班主任名称值检查 - 原始值:[{}], 是否为null:{}, 长度:{}, 去空格后:[{}]",
|
||||||
|
bo.getTeacherName(),
|
||||||
|
bo.getTeacherName() == null,
|
||||||
|
bo.getTeacherName() == null ? -1 : bo.getTeacherName().length(),
|
||||||
|
bo.getTeacherName() == null ? "null" : bo.getTeacherName().trim());
|
||||||
|
|
||||||
|
if (bo.getTeacherName() == null || "none123".equals(bo.getTeacherName())
|
||||||
|
|| (bo.getTeacherName() != null
|
||||||
|
&& ("none123".equals(bo.getTeacherName().trim())
|
||||||
|
|| "none123".equalsIgnoreCase(bo.getTeacherName().trim())
|
||||||
|
|| bo.getTeacherName().trim().isEmpty()
|
||||||
|
|| "null".equals(bo.getTeacherName().trim())))) {
|
||||||
|
log.info("班主任信息为空,不插入新数据");
|
||||||
|
// 4. 更新班级表中的班主任信息
|
||||||
|
LambdaUpdateWrapper<XgClassMsg> classUpdateWrapper = Wrappers.lambdaUpdate(XgClassMsg.class)
|
||||||
|
.eq(XgClassMsg::getId, bo.getClassId())
|
||||||
|
.set(XgClassMsg::getClassTeacherId, null)
|
||||||
|
.set(XgClassMsg::getClassTeacherName, null);
|
||||||
|
|
||||||
|
int updateResult = classMsgMapper.update(null, classUpdateWrapper);
|
||||||
|
log.info("更新班级表中的班主任信息: classId=[{}], teacherId=[{}], teacherName=[{}], 结果=[{}]",
|
||||||
|
bo.getClassId(), bo.getTeacherId(), bo.getTeacherName(), updateResult > 0 ? "成功" : "失败");
|
||||||
|
|
||||||
|
log.info("已完成班级ID[{}]的班主任信息更换: teacherId={}, teacherName={}",
|
||||||
|
bo.getClassId(), bo.getTeacherId(), bo.getTeacherName());
|
||||||
|
|
||||||
|
// 班主任信息为空,不插入新数据,直接返回
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 插入新的班主任关联记录
|
||||||
|
XgClassTeacherCounselorRel newRel = MapstructUtils.convert(bo, XgClassTeacherCounselorRel.class);
|
||||||
|
newRel.setId(null); // 确保插入新记录
|
||||||
|
newRel.setDeleted(0L);
|
||||||
|
newRel.setStartDate(new Date());
|
||||||
|
validEntityBeforeSave(newRel);
|
||||||
|
int insertResult = baseMapper.insert(newRel);
|
||||||
|
log.info("插入新的班主任关联记录: classId=[{}], teacherId=[{}], 结果=[{}], 新记录ID=[{}]",
|
||||||
|
newRel.getClassId(), newRel.getTeacherId(), insertResult > 0 ? "成功" : "失败", newRel.getId());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
// 非班主任类型的普通更新
|
||||||
|
XgClassTeacherCounselorRel update = MapstructUtils.convert(bo, XgClassTeacherCounselorRel.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
boolean result = baseMapper.updateById(update) > 0;
|
||||||
|
log.info("更新非班主任类型关联记录: id=[{}], teacherType=[{}], 结果=[{}]",
|
||||||
|
update.getId(), update.getTeacherType(), result ? "成功" : "失败");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(XgClassTeacherCounselorRel entity) {
|
||||||
|
// TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除班级班主任辅导员关联信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
// TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询要删除的记录,获取班主任类型的记录对应的班级ID
|
||||||
|
List<XgClassTeacherCounselorRel> entityList = baseMapper.selectBatchIds(ids);
|
||||||
|
List<XgClassTeacherCounselorRelVo> relList = MapstructUtils.convert(entityList,
|
||||||
|
XgClassTeacherCounselorRelVo.class);
|
||||||
|
|
||||||
|
// 收集需要清空班主任信息的班级ID列表
|
||||||
|
List<Long> classIdsToUpdate = relList.stream()
|
||||||
|
.filter(rel -> HEAD_TEACHER_TYPE.equals(rel.getTeacherType()))
|
||||||
|
.map(XgClassTeacherCounselorRelVo::getClassId)
|
||||||
|
.distinct()
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
// 先执行删除操作
|
||||||
|
boolean deleteResult = baseMapper.deleteByIds(ids) > 0;
|
||||||
|
|
||||||
|
// 如果删除成功且有班主任类型的记录,则清空对应班级的班主任信息
|
||||||
|
if (deleteResult && !classIdsToUpdate.isEmpty()) {
|
||||||
|
LambdaUpdateWrapper<XgClassMsg> updateWrapper = Wrappers.lambdaUpdate(XgClassMsg.class)
|
||||||
|
.in(XgClassMsg::getId, classIdsToUpdate)
|
||||||
|
.set(XgClassMsg::getClassTeacherId, null)
|
||||||
|
.set(XgClassMsg::getClassTeacherName, null);
|
||||||
|
|
||||||
|
classMsgMapper.update(null, updateWrapper);
|
||||||
|
log.info("已清空{}个班级的班主任信息: classIds={}", classIdsToUpdate.size(), classIdsToUpdate);
|
||||||
|
}
|
||||||
|
|
||||||
|
return deleteResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
+59
@@ -11,14 +11,20 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.xg.domain.bo.XgDormAreaBo;
|
import org.dromara.xg.domain.bo.XgDormAreaBo;
|
||||||
|
import org.dromara.xg.domain.bo.XgDormCampusBo;
|
||||||
import org.dromara.xg.domain.vo.XgDormAreaVo;
|
import org.dromara.xg.domain.vo.XgDormAreaVo;
|
||||||
|
import org.dromara.xg.domain.vo.XgDormCampusVo;
|
||||||
import org.dromara.xg.domain.XgDormArea;
|
import org.dromara.xg.domain.XgDormArea;
|
||||||
|
import org.dromara.xg.domain.vo.TreeSelectVo;
|
||||||
import org.dromara.xg.mapper.XgDormAreaMapper;
|
import org.dromara.xg.mapper.XgDormAreaMapper;
|
||||||
import org.dromara.xg.service.IXgDormAreaService;
|
import org.dromara.xg.service.IXgDormAreaService;
|
||||||
|
import org.dromara.xg.service.IXgDormCampusService;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 宿舍区信息Service业务层处理
|
* 宿舍区信息Service业务层处理
|
||||||
@@ -32,6 +38,7 @@ import java.util.Collection;
|
|||||||
public class XgDormAreaServiceImpl implements IXgDormAreaService {
|
public class XgDormAreaServiceImpl implements IXgDormAreaService {
|
||||||
|
|
||||||
private final XgDormAreaMapper baseMapper;
|
private final XgDormAreaMapper baseMapper;
|
||||||
|
private final IXgDormCampusService dormCampusService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询宿舍区信息
|
* 查询宿舍区信息
|
||||||
@@ -131,4 +138,56 @@ public class XgDormAreaServiceImpl implements IXgDormAreaService {
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取宿舍区树形结构数据
|
||||||
|
* 以校区为根节点,宿舍区为子节点
|
||||||
|
*
|
||||||
|
* @return 宿舍区树形结构列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TreeSelectVo> getAreaTree() {
|
||||||
|
// 1. 获取所有校区数据
|
||||||
|
List<XgDormCampusVo> campusList = dormCampusService.queryList(new XgDormCampusBo());
|
||||||
|
|
||||||
|
// 2. 获取所有宿舍区数据
|
||||||
|
List<XgDormAreaVo> areaList = queryList(new XgDormAreaBo());
|
||||||
|
|
||||||
|
// 3. 构建树形结构
|
||||||
|
List<TreeSelectVo> treeList = new ArrayList<>();
|
||||||
|
|
||||||
|
// 4. 创建校区节点(校区节点不可选择)
|
||||||
|
for (XgDormCampusVo campus : campusList) {
|
||||||
|
// 校区节点不可选择
|
||||||
|
TreeSelectVo campusNode = new TreeSelectVo(
|
||||||
|
campus.getId(),
|
||||||
|
campus.getCampusName(),
|
||||||
|
"campus",
|
||||||
|
true // 禁用校区节点,不可选择
|
||||||
|
);
|
||||||
|
|
||||||
|
// 5. 添加对应校区的宿舍区节点
|
||||||
|
List<XgDormAreaVo> campusAreas = areaList.stream()
|
||||||
|
.filter(area -> campus.getId().equals(area.getCampusId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
for (XgDormAreaVo area : campusAreas) {
|
||||||
|
// 宿舍区节点可选择
|
||||||
|
TreeSelectVo areaNode = new TreeSelectVo(
|
||||||
|
area.getId(),
|
||||||
|
area.getAreaName(),
|
||||||
|
"area",
|
||||||
|
false // 不禁用宿舍区节点,可以选择
|
||||||
|
);
|
||||||
|
campusNode.addChild(areaNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 只有包含子节点的校区才添加到树中
|
||||||
|
if (!campusNode.getChildren().isEmpty()) {
|
||||||
|
treeList.add(campusNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return treeList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+137
@@ -0,0 +1,137 @@
|
|||||||
|
package org.dromara.xg.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.xg.domain.bo.XgDormBedBo;
|
||||||
|
import org.dromara.xg.domain.vo.XgDormBedVo;
|
||||||
|
import org.dromara.xg.domain.XgDormBed;
|
||||||
|
import org.dromara.xg.mapper.XgDormBedMapper;
|
||||||
|
import org.dromara.xg.service.IXgDormBedService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍床位信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class XgDormBedServiceImpl implements IXgDormBedService {
|
||||||
|
|
||||||
|
private final XgDormBedMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询宿舍床位信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 宿舍床位信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public XgDormBedVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询宿舍床位信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 宿舍床位信息分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<XgDormBedVo> queryPageList(XgDormBedBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<XgDormBed> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<XgDormBedVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的宿舍床位信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 宿舍床位信息列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<XgDormBedVo> queryList(XgDormBedBo bo) {
|
||||||
|
LambdaQueryWrapper<XgDormBed> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<XgDormBed> buildQueryWrapper(XgDormBedBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<XgDormBed> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(XgDormBed::getId);
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getBedCode()), XgDormBed::getBedCode, bo.getBedCode());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getBedName()), XgDormBed::getBedName, bo.getBedName());
|
||||||
|
lqw.eq(bo.getRoomId() != null, XgDormBed::getRoomId, bo.getRoomId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getBedType()), XgDormBed::getBedType, bo.getBedType());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getBedStatus()), XgDormBed::getBedStatus, bo.getBedStatus());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDeleted()), XgDormBed::getDeleted, bo.getDeleted());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增宿舍床位信息
|
||||||
|
*
|
||||||
|
* @param bo 宿舍床位信息
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(XgDormBedBo bo) {
|
||||||
|
XgDormBed add = MapstructUtils.convert(bo, XgDormBed.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改宿舍床位信息
|
||||||
|
*
|
||||||
|
* @param bo 宿舍床位信息
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(XgDormBedBo bo) {
|
||||||
|
XgDormBed update = MapstructUtils.convert(bo, XgDormBed.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(XgDormBed entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除宿舍床位信息信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
+100
@@ -13,12 +13,19 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.dromara.xg.domain.bo.XgDormBuildingBo;
|
import org.dromara.xg.domain.bo.XgDormBuildingBo;
|
||||||
import org.dromara.xg.domain.vo.XgDormBuildingVo;
|
import org.dromara.xg.domain.vo.XgDormBuildingVo;
|
||||||
import org.dromara.xg.domain.XgDormBuilding;
|
import org.dromara.xg.domain.XgDormBuilding;
|
||||||
|
import org.dromara.xg.domain.XgDormArea;
|
||||||
|
import org.dromara.xg.domain.XgDormCampus;
|
||||||
|
import org.dromara.xg.domain.vo.BuildingTreeSelectVo;
|
||||||
import org.dromara.xg.mapper.XgDormBuildingMapper;
|
import org.dromara.xg.mapper.XgDormBuildingMapper;
|
||||||
|
import org.dromara.xg.mapper.XgDormAreaMapper;
|
||||||
|
import org.dromara.xg.mapper.XgDormCampusMapper;
|
||||||
import org.dromara.xg.service.IXgDormBuildingService;
|
import org.dromara.xg.service.IXgDormBuildingService;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 宿舍楼信息Service业务层处理
|
* 宿舍楼信息Service业务层处理
|
||||||
@@ -32,6 +39,8 @@ import java.util.Collection;
|
|||||||
public class XgDormBuildingServiceImpl implements IXgDormBuildingService {
|
public class XgDormBuildingServiceImpl implements IXgDormBuildingService {
|
||||||
|
|
||||||
private final XgDormBuildingMapper baseMapper;
|
private final XgDormBuildingMapper baseMapper;
|
||||||
|
private final XgDormAreaMapper areaMapper;
|
||||||
|
private final XgDormCampusMapper campusMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询宿舍楼信息
|
* 查询宿舍楼信息
|
||||||
@@ -133,4 +142,95 @@ public class XgDormBuildingServiceImpl implements IXgDormBuildingService {
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取宿舍楼树形结构数据
|
||||||
|
* 校区-宿舍区-宿舍楼三级结构,校区和宿舍区不可选,只有宿舍楼可以选择
|
||||||
|
*
|
||||||
|
* @return 宿舍楼树形结构数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BuildingTreeSelectVo> getBuildingTreeData() {
|
||||||
|
// 1. 获取所有校区数据
|
||||||
|
List<XgDormCampus> campusList = campusMapper.selectList(
|
||||||
|
Wrappers.<XgDormCampus>lambdaQuery()
|
||||||
|
.orderByAsc(XgDormCampus::getSortOrder, XgDormCampus::getId));
|
||||||
|
|
||||||
|
// 2. 获取所有宿舍区数据
|
||||||
|
List<XgDormArea> areaList = areaMapper.selectList(
|
||||||
|
Wrappers.<XgDormArea>lambdaQuery()
|
||||||
|
.orderByAsc(XgDormArea::getSortOrder, XgDormArea::getId));
|
||||||
|
|
||||||
|
// 3. 获取所有宿舍楼数据
|
||||||
|
List<XgDormBuilding> buildingList = baseMapper.selectList(
|
||||||
|
Wrappers.<XgDormBuilding>lambdaQuery()
|
||||||
|
.orderByAsc(XgDormBuilding::getSortOrder, XgDormBuilding::getId));
|
||||||
|
|
||||||
|
// 4. 构建树形结构
|
||||||
|
List<BuildingTreeSelectVo> treeList = new ArrayList<>();
|
||||||
|
|
||||||
|
// 5. 先构建校区节点
|
||||||
|
for (XgDormCampus campus : campusList) {
|
||||||
|
BuildingTreeSelectVo campusNode = new BuildingTreeSelectVo();
|
||||||
|
campusNode.setId(campus.getId());
|
||||||
|
campusNode.setLabel(campus.getCampusName());
|
||||||
|
campusNode.setNodeType("campus");
|
||||||
|
campusNode.setDisabled(true); // 校区不可选
|
||||||
|
campusNode.setChildren(new ArrayList<>());
|
||||||
|
|
||||||
|
// 设置创建者和更新者字段
|
||||||
|
campusNode.setCreateBy(campus.getCreateBy());
|
||||||
|
campusNode.setCreateTime(campus.getCreateTime());
|
||||||
|
campusNode.setUpdateBy(campus.getUpdateBy());
|
||||||
|
campusNode.setUpdateTime(campus.getUpdateTime());
|
||||||
|
|
||||||
|
// 添加该校区下的宿舍区
|
||||||
|
List<XgDormArea> campusAreas = areaList.stream()
|
||||||
|
.filter(area -> area.getCampusId().equals(campus.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
for (XgDormArea area : campusAreas) {
|
||||||
|
BuildingTreeSelectVo areaNode = new BuildingTreeSelectVo();
|
||||||
|
areaNode.setId(area.getId());
|
||||||
|
areaNode.setLabel(area.getAreaName());
|
||||||
|
areaNode.setNodeType("area");
|
||||||
|
areaNode.setDisabled(true); // 宿舍区不可选
|
||||||
|
areaNode.setChildren(new ArrayList<>());
|
||||||
|
|
||||||
|
// 设置创建者和更新者字段
|
||||||
|
areaNode.setCreateBy(area.getCreateBy());
|
||||||
|
areaNode.setCreateTime(area.getCreateTime());
|
||||||
|
areaNode.setUpdateBy(area.getUpdateBy());
|
||||||
|
areaNode.setUpdateTime(area.getUpdateTime());
|
||||||
|
|
||||||
|
// 添加该宿舍区下的宿舍楼
|
||||||
|
List<XgDormBuilding> areaBuildings = buildingList.stream()
|
||||||
|
.filter(building -> building.getAreaId().equals(area.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
for (XgDormBuilding building : areaBuildings) {
|
||||||
|
BuildingTreeSelectVo buildingNode = new BuildingTreeSelectVo();
|
||||||
|
buildingNode.setId(building.getId());
|
||||||
|
buildingNode.setLabel(building.getBuildingName());
|
||||||
|
buildingNode.setNodeType("building");
|
||||||
|
buildingNode.setDisabled(false); // 宿舍楼可选
|
||||||
|
buildingNode.setChildren(null); // 宿舍楼没有子节点
|
||||||
|
|
||||||
|
// 设置创建者和更新者字段
|
||||||
|
buildingNode.setCreateBy(building.getCreateBy());
|
||||||
|
buildingNode.setCreateTime(building.getCreateTime());
|
||||||
|
buildingNode.setUpdateBy(building.getUpdateBy());
|
||||||
|
buildingNode.setUpdateTime(building.getUpdateTime());
|
||||||
|
|
||||||
|
areaNode.getChildren().add(buildingNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
campusNode.getChildren().add(areaNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
treeList.add(campusNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
return treeList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+156
@@ -0,0 +1,156 @@
|
|||||||
|
package org.dromara.xg.service.impl;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.xg.service.IXgDormBuildingTreeService;
|
||||||
|
import org.dromara.xg.mapper.XgDormBuildingTreeMapper;
|
||||||
|
import org.dromara.xg.domain.vo.DormBuildingTreeVo;
|
||||||
|
import org.dromara.xg.domain.vo.DormBuildingInfoVo;
|
||||||
|
import org.dromara.xg.domain.bo.DormBuildingTreeBo;
|
||||||
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍楼树形结构服务实现
|
||||||
|
*
|
||||||
|
* @author wuzilong
|
||||||
|
* @date 2025-07-03
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class XgDormBuildingTreeServiceImpl implements IXgDormBuildingTreeService {
|
||||||
|
|
||||||
|
private final XgDormBuildingTreeMapper dormBuildingTreeMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取宿舍楼树形结构数据
|
||||||
|
*
|
||||||
|
* @param bo 查询参数
|
||||||
|
* @return 树形结构数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<DormBuildingTreeVo> getDormBuildingTree(DormBuildingTreeBo bo) {
|
||||||
|
// 获取当前登录用户ID
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
|
||||||
|
// 查询用户管理权限类型
|
||||||
|
List<String> managerTypes = dormBuildingTreeMapper.checkUserDormManagerType(userId);
|
||||||
|
|
||||||
|
if (managerTypes == null || managerTypes.isEmpty()) {
|
||||||
|
// 没有宿舍管理权限,返回空列表
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取所有宿舍楼数据(根据权限过滤)
|
||||||
|
List<DormBuildingInfoVo> buildingList = new ArrayList<>();
|
||||||
|
|
||||||
|
// 按照权限分别查询并合并结果(支持用户拥有多种角色的情况)
|
||||||
|
if (managerTypes.contains("1")) {
|
||||||
|
// 全校管理员,获取所有宿舍楼
|
||||||
|
buildingList = dormBuildingTreeMapper.selectBuildingsBySchoolAdmin(userId, bo);
|
||||||
|
// 全校管理员可以查看所有宿舍楼,无需继续查询其他权限
|
||||||
|
} else {
|
||||||
|
// 对于非全校管理员,合并多种权限的结果
|
||||||
|
Set<Long> addedBuildingIds = new HashSet<>(); // 用于去重
|
||||||
|
|
||||||
|
if (managerTypes.contains("2")) {
|
||||||
|
// 校区管理员,获取管理的校区下的宿舍楼
|
||||||
|
List<DormBuildingInfoVo> campusBuildings = dormBuildingTreeMapper.selectBuildingsByCampusAdmin(userId,
|
||||||
|
bo);
|
||||||
|
for (DormBuildingInfoVo building : campusBuildings) {
|
||||||
|
if (addedBuildingIds.add(building.getId())) {
|
||||||
|
buildingList.add(building);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (managerTypes.contains("3")) {
|
||||||
|
// 宿舍区管理员,获取管理的宿舍区下的宿舍楼
|
||||||
|
List<DormBuildingInfoVo> areaBuildings = dormBuildingTreeMapper.selectBuildingsByAreaAdmin(userId, bo);
|
||||||
|
for (DormBuildingInfoVo building : areaBuildings) {
|
||||||
|
if (addedBuildingIds.add(building.getId())) {
|
||||||
|
buildingList.add(building);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (managerTypes.contains("4")) {
|
||||||
|
// 宿舍楼管理员,获取管理的宿舍楼
|
||||||
|
List<DormBuildingInfoVo> directBuildings = dormBuildingTreeMapper.selectBuildingsByBuildingAdmin(userId,
|
||||||
|
bo);
|
||||||
|
for (DormBuildingInfoVo building : directBuildings) {
|
||||||
|
if (addedBuildingIds.add(building.getId())) {
|
||||||
|
buildingList.add(building);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果没有获取到宿舍楼数据,返回空列表
|
||||||
|
if (buildingList.isEmpty()) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取相关校区和宿舍区数据
|
||||||
|
List<DormBuildingInfoVo> campusList = dormBuildingTreeMapper.selectCampusList();
|
||||||
|
List<DormBuildingInfoVo> areaList = dormBuildingTreeMapper.selectAreaList();
|
||||||
|
|
||||||
|
// 构建校区节点集合(第一层)
|
||||||
|
Map<Long, DormBuildingTreeVo> campusMap = new LinkedHashMap<>();
|
||||||
|
for (DormBuildingInfoVo campus : campusList) {
|
||||||
|
// 校区只保留有权限的宿舍楼所在的校区
|
||||||
|
if (buildingList.stream().anyMatch(b -> Objects.equals(b.getCampusId(), campus.getId()))) {
|
||||||
|
DormBuildingTreeVo campusNode = new DormBuildingTreeVo();
|
||||||
|
campusNode.setId(campus.getId());
|
||||||
|
campusNode.setLabel(campus.getBuildingName());
|
||||||
|
campusNode.setType("campus");
|
||||||
|
campusNode.setDisabled(true); // 校区节点禁止点击
|
||||||
|
campusNode.setChildren(new ArrayList<>());
|
||||||
|
campusMap.put(campus.getId(), campusNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 构建宿舍区节点(第二层)
|
||||||
|
Map<Long, DormBuildingTreeVo> areaMap = new HashMap<>();
|
||||||
|
for (DormBuildingInfoVo area : areaList) {
|
||||||
|
// 宿舍区只保留有权限的宿舍楼所在的宿舍区
|
||||||
|
if (buildingList.stream().anyMatch(b -> Objects.equals(b.getAreaId(), area.getId()))) {
|
||||||
|
DormBuildingTreeVo areaNode = new DormBuildingTreeVo();
|
||||||
|
areaNode.setId(area.getId());
|
||||||
|
areaNode.setLabel(area.getBuildingName());
|
||||||
|
areaNode.setType("area");
|
||||||
|
areaNode.setDisabled(true); // 宿舍区节点禁止点击
|
||||||
|
areaNode.setChildren(new ArrayList<>());
|
||||||
|
areaMap.put(area.getId(), areaNode);
|
||||||
|
|
||||||
|
// 将宿舍区节点添加到对应的校区节点下
|
||||||
|
DormBuildingTreeVo campusNode = campusMap.get(area.getCampusId());
|
||||||
|
if (campusNode != null) {
|
||||||
|
campusNode.getChildren().add(areaNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 构建宿舍楼节点(第三层)
|
||||||
|
for (DormBuildingInfoVo building : buildingList) {
|
||||||
|
DormBuildingTreeVo buildingNode = new DormBuildingTreeVo();
|
||||||
|
buildingNode.setId(building.getId());
|
||||||
|
buildingNode.setLabel(building.getBuildingName());
|
||||||
|
buildingNode.setType("building");
|
||||||
|
buildingNode.setDisabled(false); // 宿舍楼节点可点击
|
||||||
|
buildingNode.setBuildingFloors(building.getFloors());
|
||||||
|
buildingNode.setBuildingType(building.getBuildingType());
|
||||||
|
|
||||||
|
// 将宿舍楼节点添加到对应的宿舍区节点下
|
||||||
|
DormBuildingTreeVo areaNode = areaMap.get(building.getAreaId());
|
||||||
|
if (areaNode != null) {
|
||||||
|
areaNode.getChildren().add(buildingNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回树形结构的根节点列表(校区节点列表)
|
||||||
|
return new ArrayList<>(campusMap.values());
|
||||||
|
}
|
||||||
|
}
|
||||||
+84
-22
@@ -22,6 +22,8 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 管理员授权关系Service业务层处理
|
* 管理员授权关系Service业务层处理
|
||||||
@@ -136,7 +138,7 @@ public class XgDormManagerSourceServiceImpl implements IXgDormManagerSourceServi
|
|||||||
if (isValid) {
|
if (isValid) {
|
||||||
// TODO 做一些业务上的校验,判断是否需要校验
|
// TODO 做一些业务上的校验,判断是否需要校验
|
||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteBatchIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -150,42 +152,102 @@ public class XgDormManagerSourceServiceImpl implements IXgDormManagerSourceServi
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean assignScope(Long managerId, Character authType, List<Long> authSourceIds) {
|
public Boolean assignScope(Long managerId, Character authType, List<Long> authSourceIds) {
|
||||||
if (managerId == null || authType == null || authSourceIds == null || authSourceIds.isEmpty()) {
|
if (managerId == null || authType == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 1. 先逻辑删除该管理员现有的对应类型的授权数据
|
// 1. 逻辑删除该管理员指定授权类型的现有数据
|
||||||
LambdaUpdateWrapper<XgDormManagerSource> updateWrapper = Wrappers.lambdaUpdate(XgDormManagerSource.class)
|
LambdaUpdateWrapper<XgDormManagerSource> updateWrapper = Wrappers.lambdaUpdate(XgDormManagerSource.class)
|
||||||
.set(XgDormManagerSource::getDeleted, "1")
|
.set(XgDormManagerSource::getDeleted, "1") // 标记为已删除
|
||||||
.eq(XgDormManagerSource::getManagerId, managerId)
|
.eq(XgDormManagerSource::getManagerId, managerId)
|
||||||
.eq(XgDormManagerSource::getAuthType, authType.toString())
|
.eq(XgDormManagerSource::getAuthType, authType.toString())
|
||||||
.eq(XgDormManagerSource::getDeleted, "0");
|
.eq(XgDormManagerSource::getDeleted, "0"); // 只更新未删除的记录
|
||||||
|
|
||||||
baseMapper.update(null, updateWrapper);
|
baseMapper.update(null, updateWrapper);
|
||||||
|
|
||||||
// 2. 批量插入新的授权数据
|
// 2. 批量插入新的授权关系
|
||||||
List<XgDormManagerSource> insertList = new ArrayList<>();
|
if (authSourceIds != null && !authSourceIds.isEmpty()) {
|
||||||
for (Long authSourceId : authSourceIds) {
|
for (Long authSourceId : authSourceIds) {
|
||||||
XgDormManagerSource entity = new XgDormManagerSource();
|
XgDormManagerSource entity = new XgDormManagerSource();
|
||||||
entity.setManagerId(managerId);
|
entity.setManagerId(managerId);
|
||||||
entity.setAuthType(authType.toString());
|
entity.setAuthType(authType.toString());
|
||||||
entity.setAuthSource(authSourceId);
|
entity.setAuthSource(authSourceId);
|
||||||
entity.setPermissionType("3"); // 默认为完全管理权限
|
entity.setPermissionType("3"); // 默认完全管理权限
|
||||||
entity.setStatus("0"); // 默认有效
|
entity.setStatus("0"); // 有效状态
|
||||||
entity.setDeleted("0"); // 默认未删除
|
baseMapper.insert(entity); // MyBatis-Plus会自动填充BaseEntity中定义的字段
|
||||||
insertList.add(entity);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 循环插入,确保每条数据都有唯一ID
|
|
||||||
for (XgDormManagerSource entity : insertList) {
|
|
||||||
baseMapper.insert(entity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("分配管理员数据范围失败", e);
|
log.error("批量分配管理员数据范围失败", e);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取管理员授权范围名称
|
||||||
|
*
|
||||||
|
* @param managerId 管理员ID
|
||||||
|
* @param managerType 管理员类型(1全校级 2校区级 3宿舍区级 4楼栋级)
|
||||||
|
* @return 授权范围名称(逗号分隔字符串)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getScopeNames(Long managerId, Integer managerType) {
|
||||||
|
if (managerId == null || managerType == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 全校级管理员无需关联其他表,直接返回"全校"
|
||||||
|
if (managerType == 1) {
|
||||||
|
return "全校";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 转换managerType为Character类型,与数据库authType匹配
|
||||||
|
String authType = String.valueOf(managerType);
|
||||||
|
|
||||||
|
// 查询该管理员的授权范围ID列表
|
||||||
|
LambdaQueryWrapper<XgDormManagerSource> queryWrapper = Wrappers.lambdaQuery(XgDormManagerSource.class)
|
||||||
|
.eq(XgDormManagerSource::getManagerId, managerId)
|
||||||
|
.eq(XgDormManagerSource::getAuthType, authType)
|
||||||
|
.eq(XgDormManagerSource::getDeleted, "0") // 未删除的记录
|
||||||
|
.eq(XgDormManagerSource::getStatus, "0"); // 状态为有效
|
||||||
|
|
||||||
|
List<XgDormManagerSource> sources = baseMapper.selectList(queryWrapper);
|
||||||
|
if (sources.isEmpty()) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提取授权来源ID列表
|
||||||
|
List<Long> sourceIds = sources.stream()
|
||||||
|
.map(XgDormManagerSource::getAuthSource)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 根据不同管理员类型,关联不同表获取名称
|
||||||
|
String scopeNames = "";
|
||||||
|
switch (managerType) {
|
||||||
|
case 2:
|
||||||
|
// 校区级管理员,关联xg_dorm_campus表
|
||||||
|
scopeNames = baseMapper.getCampusNamesByIds(sourceIds);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
// 宿舍区管理员,关联xg_dorm_area表
|
||||||
|
scopeNames = baseMapper.getAreaNamesByIds(sourceIds);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
// 宿舍楼管理员,关联xg_dorm_building表
|
||||||
|
scopeNames = baseMapper.getBuildingNamesByIds(sourceIds);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
return scopeNames;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("获取管理员授权范围名称失败", e);
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+141
@@ -0,0 +1,141 @@
|
|||||||
|
package org.dromara.xg.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.xg.domain.bo.XgDormRoomBo;
|
||||||
|
import org.dromara.xg.domain.vo.XgDormRoomVo;
|
||||||
|
import org.dromara.xg.domain.XgDormRoom;
|
||||||
|
import org.dromara.xg.mapper.XgDormRoomMapper;
|
||||||
|
import org.dromara.xg.service.IXgDormRoomService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宿舍房间信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class XgDormRoomServiceImpl implements IXgDormRoomService {
|
||||||
|
|
||||||
|
private final XgDormRoomMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询宿舍房间信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 宿舍房间信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public XgDormRoomVo queryById(Long id) {
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询宿舍房间信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 宿舍房间信息分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<XgDormRoomVo> queryPageList(XgDormRoomBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<XgDormRoom> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<XgDormRoomVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的宿舍房间信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 宿舍房间信息列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<XgDormRoomVo> queryList(XgDormRoomBo bo) {
|
||||||
|
LambdaQueryWrapper<XgDormRoom> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<XgDormRoom> buildQueryWrapper(XgDormRoomBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<XgDormRoom> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(XgDormRoom::getFloorNum); // 优先按楼层排序
|
||||||
|
lqw.orderByAsc(XgDormRoom::getRoomName); // 其次按房间名称排序
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getRoomCode()), XgDormRoom::getRoomCode, bo.getRoomCode());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getRoomName()), XgDormRoom::getRoomName, bo.getRoomName());
|
||||||
|
lqw.eq(bo.getBuildingId() != null, XgDormRoom::getBuildingId, bo.getBuildingId());
|
||||||
|
lqw.eq(bo.getFloorNum() != null, XgDormRoom::getFloorNum, bo.getFloorNum());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getRoomType()), XgDormRoom::getRoomType, bo.getRoomType());
|
||||||
|
lqw.eq(bo.getActualBeds() != null, XgDormRoom::getActualBeds, bo.getActualBeds());
|
||||||
|
lqw.eq(bo.getRoomArea() != null, XgDormRoom::getRoomArea, bo.getRoomArea());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getRoomStatus()), XgDormRoom::getRoomStatus, bo.getRoomStatus());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDeleted()), XgDormRoom::getDeleted, bo.getDeleted());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增宿舍房间信息
|
||||||
|
*
|
||||||
|
* @param bo 宿舍房间信息
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(XgDormRoomBo bo) {
|
||||||
|
XgDormRoom add = MapstructUtils.convert(bo, XgDormRoom.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改宿舍房间信息
|
||||||
|
*
|
||||||
|
* @param bo 宿舍房间信息
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(XgDormRoomBo bo) {
|
||||||
|
XgDormRoom update = MapstructUtils.convert(bo, XgDormRoom.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(XgDormRoom entity) {
|
||||||
|
// TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除宿舍房间信息信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
// TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
+127
@@ -0,0 +1,127 @@
|
|||||||
|
package org.dromara.xg.service.impl;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.xg.domain.XgSysDept;
|
||||||
|
import org.dromara.xg.domain.vo.XgSysDeptVo;
|
||||||
|
import org.dromara.xg.mapper.XgSysDeptMapper;
|
||||||
|
import org.dromara.xg.service.IXgSysDeptService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门管理 服务实现
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class XgSysDeptServiceImpl implements IXgSysDeptService {
|
||||||
|
|
||||||
|
private final XgSysDeptMapper deptMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询二级学院列表
|
||||||
|
*
|
||||||
|
* @return 学院列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<XgSysDeptVo> selectCollegeList() {
|
||||||
|
XgSysDept dept = new XgSysDept();
|
||||||
|
return deptMapper.selectCollegeList(dept);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询学院和专业的树结构
|
||||||
|
*
|
||||||
|
* @return 树结构列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<XgSysDeptVo> selectCollegeAndMajorTree() {
|
||||||
|
XgSysDept dept = new XgSysDept();
|
||||||
|
List<XgSysDeptVo> depts = deptMapper.selectDeptTreeList(dept);
|
||||||
|
return buildDeptTree(depts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据学院ID查询专业列表
|
||||||
|
*
|
||||||
|
* @param collegeId 学院ID
|
||||||
|
* @return 专业列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<XgSysDeptVo> selectMajorListByCollegeId(Long collegeId) {
|
||||||
|
return deptMapper.selectMajorListByCollegeId(collegeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建部门树结构
|
||||||
|
*
|
||||||
|
* @param depts 部门列表
|
||||||
|
* @return 树结构列表
|
||||||
|
*/
|
||||||
|
private List<XgSysDeptVo> buildDeptTree(List<XgSysDeptVo> depts) {
|
||||||
|
List<XgSysDeptVo> returnList = new ArrayList<>();
|
||||||
|
List<Long> tempList = depts.stream().map(XgSysDeptVo::getDeptId).collect(Collectors.toList());
|
||||||
|
for (XgSysDeptVo dept : depts) {
|
||||||
|
// 如果是顶级节点或父节点不在当前列表中,则直接添加
|
||||||
|
if (!tempList.contains(dept.getParentId()) || dept.getParentId().equals(101L)) {
|
||||||
|
recursionFn(depts, dept);
|
||||||
|
returnList.add(dept);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 如果是空数组则返回一个空数组,否则可能导致前端JS出错
|
||||||
|
if (returnList.isEmpty()) {
|
||||||
|
returnList = new ArrayList<>();
|
||||||
|
}
|
||||||
|
return returnList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归构建部门树
|
||||||
|
*
|
||||||
|
* @param list 部门列表
|
||||||
|
* @param t 当前部门
|
||||||
|
*/
|
||||||
|
private void recursionFn(List<XgSysDeptVo> list, XgSysDeptVo t) {
|
||||||
|
// 得到子节点列表
|
||||||
|
List<XgSysDeptVo> childList = getChildList(list, t);
|
||||||
|
t.setChildren(childList);
|
||||||
|
for (XgSysDeptVo tChild : childList) {
|
||||||
|
if (hasChild(list, tChild)) {
|
||||||
|
recursionFn(list, tChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 得到子节点列表
|
||||||
|
*
|
||||||
|
* @param list 部门列表
|
||||||
|
* @param t 当前部门
|
||||||
|
* @return 子部门列表
|
||||||
|
*/
|
||||||
|
private List<XgSysDeptVo> getChildList(List<XgSysDeptVo> list, XgSysDeptVo t) {
|
||||||
|
List<XgSysDeptVo> tList = new ArrayList<>();
|
||||||
|
for (XgSysDeptVo n : list) {
|
||||||
|
if (n.getParentId().longValue() == t.getDeptId().longValue()) {
|
||||||
|
tList.add(n);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否有子节点
|
||||||
|
*
|
||||||
|
* @param list 部门列表
|
||||||
|
* @param t 当前部门
|
||||||
|
* @return 是否有子节点
|
||||||
|
*/
|
||||||
|
private boolean hasChild(List<XgSysDeptVo> list, XgSysDeptVo t) {
|
||||||
|
return getChildList(list, t).size() > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
package org.dromara.xg.service.impl;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.xg.domain.XgSysUser;
|
||||||
|
import org.dromara.xg.mapper.XgSysUserMapper;
|
||||||
|
import org.dromara.xg.service.IXgSysUserService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统用户信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author zlwu
|
||||||
|
* @date 2025-07-24
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class XgSysUserServiceImpl implements IXgSysUserService {
|
||||||
|
|
||||||
|
private final XgSysUserMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有有效用户列表
|
||||||
|
*
|
||||||
|
* @return 有效用户列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<XgSysUser> selectActiveUserList() {
|
||||||
|
return baseMapper.selectActiveUserList();
|
||||||
|
}
|
||||||
|
}
|
||||||
+99
@@ -0,0 +1,99 @@
|
|||||||
|
<?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="org.dromara.xg.mapper.XgClassMsgMapper">
|
||||||
|
|
||||||
|
<resultMap id="XgClassMsgResult" type="org.dromara.xg.domain.vo.XgClassMsgVo">
|
||||||
|
<id property="id" column="id"/>
|
||||||
|
<result property="collegeId" column="college_id"/>
|
||||||
|
<result property="collegeName" column="college_name"/>
|
||||||
|
<result property="majorId" column="major_id"/>
|
||||||
|
<result property="majorName" column="major_name"/>
|
||||||
|
<result property="classCode" column="class_code"/>
|
||||||
|
<result property="className" column="class_name"/>
|
||||||
|
<result property="classType" column="class_type"/>
|
||||||
|
<result property="grade" column="grade"/>
|
||||||
|
<result property="enrollmentYear" column="enrollment_year"/>
|
||||||
|
<result property="graduationYear" column="graduation_year"/>
|
||||||
|
<result property="trainingType" column="training_type"/>
|
||||||
|
<result property="degreeType" column="degree_type"/>
|
||||||
|
<result property="counselorId" column="counselor_id"/>
|
||||||
|
<result property="counselorName" column="counselor_name"/>
|
||||||
|
<result property="classTeacherId" column="class_teacher_id"/>
|
||||||
|
<result property="classTeacherName" column="class_teacher_name"/>
|
||||||
|
<result property="classAdvisorId" column="class_advisor_id"/>
|
||||||
|
<result property="classAdvisorName" column="class_advisor_name"/>
|
||||||
|
<result property="classMonitorId" column="class_monitor_id"/>
|
||||||
|
<result property="classMonitorName" column="class_monitor_name"/>
|
||||||
|
<result property="deputyMonitorId" column="deputy_monitor_id"/>
|
||||||
|
<result property="deputyMonitorName" column="deputy_monitor_name"/>
|
||||||
|
<result property="classStatus" column="class_status"/>
|
||||||
|
<result property="isGraduation" column="is_graduation"/>
|
||||||
|
<result property="graduationDate" column="graduation_date"/>
|
||||||
|
<result property="plannedCapacity" column="planned_capacity"/>
|
||||||
|
<result property="currentStudentCount" column="current_student_count"/>
|
||||||
|
<result property="maxStudentCount" column="max_student_count"/>
|
||||||
|
<result property="maleCount" column="male_count"/>
|
||||||
|
<result property="femaleCount" column="female_count"/>
|
||||||
|
<result property="activeCount" column="active_count"/>
|
||||||
|
<result property="transferInCount" column="transfer_in_count"/>
|
||||||
|
<result property="transferOutCount" column="transfer_out_count"/>
|
||||||
|
<result property="dropoutCount" column="dropout_count"/>
|
||||||
|
<result property="graduateCount" column="graduate_count"/>
|
||||||
|
<result property="officeLocation" column="office_location"/>
|
||||||
|
<result property="classLocation" column="class_location"/>
|
||||||
|
<result property="contactPhone" column="contact_phone"/>
|
||||||
|
<result property="qqGroup" column="qq_group"/>
|
||||||
|
<result property="wechatGroup" column="wechat_group"/>
|
||||||
|
<result property="email" column="email"/>
|
||||||
|
<result property="classSchedule" column="class_schedule"/>
|
||||||
|
<result property="classCulture" column="class_culture"/>
|
||||||
|
<result property="classRules" column="class_rules"/>
|
||||||
|
<result property="classDescription" column="class_description"/>
|
||||||
|
<result property="lastCountUpdate" column="last_count_update"/>
|
||||||
|
<result property="extField1" column="ext_field1"/>
|
||||||
|
<result property="extField2" column="ext_field2"/>
|
||||||
|
<result property="extField3" column="ext_field3"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectXgClassMsgVo">
|
||||||
|
select c.id, c.college_id, dc.dept_name as college_name, c.major_id, dm.dept_name as major_name,
|
||||||
|
c.class_code, c.class_name, c.class_type, c.grade, c.enrollment_year, c.graduation_year,
|
||||||
|
c.training_type, c.degree_type, c.counselor_id, c.counselor_name, c.class_teacher_id,
|
||||||
|
c.class_teacher_name, c.class_advisor_id, c.class_advisor_name, c.class_monitor_id,
|
||||||
|
c.class_monitor_name, c.deputy_monitor_id, c.deputy_monitor_name, c.class_status,
|
||||||
|
c.is_graduation, c.graduation_date, c.planned_capacity, c.current_student_count,
|
||||||
|
c.max_student_count, c.male_count, c.female_count, c.active_count, c.transfer_in_count,
|
||||||
|
c.transfer_out_count, c.dropout_count, c.graduate_count, c.office_location,
|
||||||
|
c.class_location, c.contact_phone, c.qq_group, c.wechat_group, c.email,
|
||||||
|
c.class_schedule, c.class_culture, c.class_rules, c.class_description,
|
||||||
|
c.last_count_update, c.ext_field1, c.ext_field2, c.ext_field3, c.remark,
|
||||||
|
c.create_by, c.create_time, c.update_by, c.update_time
|
||||||
|
from xg_class_msg c
|
||||||
|
left join sys_dept dc on c.college_id = dc.dept_id
|
||||||
|
left join sys_dept dm on c.major_id = dm.dept_id
|
||||||
|
where c.deleted = 0
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectVoList" resultMap="XgClassMsgResult">
|
||||||
|
<include refid="selectXgClassMsgVo"/>
|
||||||
|
${ew.getCustomSqlSegment}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectVoById" parameterType="Long" resultMap="XgClassMsgResult">
|
||||||
|
<include refid="selectXgClassMsgVo"/>
|
||||||
|
and c.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectVoPage" resultMap="XgClassMsgResult">
|
||||||
|
<include refid="selectXgClassMsgVo"/>
|
||||||
|
${ew.getCustomSqlSegment}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?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="org.dromara.xg.mapper.XgDormBedMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
+41
@@ -4,4 +4,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.dromara.xg.mapper.XgDormManagerSourceMapper">
|
<mapper namespace="org.dromara.xg.mapper.XgDormManagerSourceMapper">
|
||||||
|
|
||||||
|
<!-- 根据ID列表获取校区名称(逗号分隔) -->
|
||||||
|
<select id="getCampusNamesByIds" resultType="String">
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT(campus_name SEPARATOR ',')
|
||||||
|
FROM
|
||||||
|
xg_dorm_campus
|
||||||
|
WHERE
|
||||||
|
id IN
|
||||||
|
<foreach collection="sourceIds" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
AND deleted = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据ID列表获取宿舍区名称(逗号分隔) -->
|
||||||
|
<select id="getAreaNamesByIds" resultType="String">
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT(area_name SEPARATOR ',')
|
||||||
|
FROM
|
||||||
|
xg_dorm_area
|
||||||
|
WHERE
|
||||||
|
id IN
|
||||||
|
<foreach collection="sourceIds" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
AND deleted = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据ID列表获取宿舍楼名称(逗号分隔) -->
|
||||||
|
<select id="getBuildingNamesByIds" resultType="String">
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT(building_name SEPARATOR ',')
|
||||||
|
FROM
|
||||||
|
xg_dorm_building
|
||||||
|
WHERE
|
||||||
|
id IN
|
||||||
|
<foreach collection="sourceIds" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
AND deleted = '0'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
+1
@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
c.campus_name,
|
c.campus_name,
|
||||||
b.building_type,
|
b.building_type,
|
||||||
b.building_description,
|
b.building_description,
|
||||||
|
b.floors,
|
||||||
b.sort_order,
|
b.sort_order,
|
||||||
b.deleted,
|
b.deleted,
|
||||||
b.remark,
|
b.remark,
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<?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="org.dromara.xg.mapper.XgSysDeptMapper">
|
||||||
|
|
||||||
|
<resultMap id="SysDeptResult" type="org.dromara.xg.domain.XgSysDept">
|
||||||
|
<id property="deptId" column="dept_id"/>
|
||||||
|
<result property="parentId" column="parent_id"/>
|
||||||
|
<result property="ancestors" column="ancestors"/>
|
||||||
|
<result property="deptName" column="dept_name"/>
|
||||||
|
<result property="orderNum" column="order_num"/>
|
||||||
|
<result property="leader" column="leader"/>
|
||||||
|
<result property="phone" column="phone"/>
|
||||||
|
<result property="email" column="email"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
<result property="delFlag" column="del_flag"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础查询方法 -->
|
||||||
|
<select id="selectById" parameterType="java.lang.Long" resultMap="SysDeptResult">
|
||||||
|
select dept_id, parent_id, ancestors, dept_name, order_num, leader, phone, email,
|
||||||
|
status, del_flag, create_by, create_time, update_by, update_time
|
||||||
|
from sys_dept
|
||||||
|
where dept_id = #{deptId} and del_flag = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectCollegeList" parameterType="org.dromara.xg.domain.XgSysDept" resultType="org.dromara.xg.domain.vo.XgSysDeptVo">
|
||||||
|
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email,
|
||||||
|
d.status, d.del_flag, d.create_by, d.create_time, d.update_by, d.update_time
|
||||||
|
from sys_dept d
|
||||||
|
where d.del_flag = '0' and d.status = '0' and d.parent_id = 101
|
||||||
|
<if test="deptName != null and deptName != ''">
|
||||||
|
AND d.dept_name like concat('%', #{deptName}, '%')
|
||||||
|
</if>
|
||||||
|
order by d.parent_id, d.order_num
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMajorListByCollegeId" parameterType="java.lang.Long" resultType="org.dromara.xg.domain.vo.XgSysDeptVo">
|
||||||
|
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email,
|
||||||
|
d.status, d.del_flag, d.create_by, d.create_time, d.update_by, d.update_time
|
||||||
|
from sys_dept d
|
||||||
|
where d.del_flag = '0' and d.status = '0' and d.parent_id = #{collegeId}
|
||||||
|
order by d.order_num
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDeptTreeList" parameterType="org.dromara.xg.domain.XgSysDept" resultType="org.dromara.xg.domain.vo.XgSysDeptVo">
|
||||||
|
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email,
|
||||||
|
d.status, d.del_flag, d.create_by, d.create_time, d.update_by, d.update_time
|
||||||
|
from sys_dept d
|
||||||
|
where d.del_flag = '0'
|
||||||
|
and (d.parent_id = 101 or exists (select 1 from sys_dept where del_flag = '0' and parent_id = 101 and dept_id = d.parent_id))
|
||||||
|
<if test="deptName != null and deptName != ''">
|
||||||
|
AND d.dept_name like concat('%', #{deptName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
AND d.status = #{status}
|
||||||
|
</if>
|
||||||
|
order by d.parent_id, d.order_num
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
<?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="org.dromara.xg.mapper.XgClassTeacherCounselorRelMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
+303
@@ -0,0 +1,303 @@
|
|||||||
|
<?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="org.dromara.xg.mapper.XgDormBuildingTreeMapper">
|
||||||
|
|
||||||
|
<resultMap id="BuildingInfoMap" type="org.dromara.xg.domain.vo.DormBuildingInfoVo">
|
||||||
|
<id property="id" column="id"/>
|
||||||
|
<result property="buildingName" column="building_name"/>
|
||||||
|
<result property="buildingCode" column="building_code"/>
|
||||||
|
<result property="buildingType" column="building_type"/>
|
||||||
|
<result property="campusId" column="campus_id"/>
|
||||||
|
<result property="campusName" column="campus_name"/>
|
||||||
|
<result property="areaId" column="area_id"/>
|
||||||
|
<result property="areaName" column="area_name"/>
|
||||||
|
<result property="floors" column="floors"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 获取所有校区信息 -->
|
||||||
|
<select id="selectCampusList" resultMap="BuildingInfoMap">
|
||||||
|
SELECT
|
||||||
|
id,
|
||||||
|
campus_name as building_name,
|
||||||
|
'0' as status
|
||||||
|
FROM
|
||||||
|
xg_dorm_campus
|
||||||
|
WHERE
|
||||||
|
deleted = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 获取所有宿舍区信息 -->
|
||||||
|
<select id="selectAreaList" resultMap="BuildingInfoMap">
|
||||||
|
SELECT
|
||||||
|
a.id,
|
||||||
|
a.area_name as building_name,
|
||||||
|
a.campus_id,
|
||||||
|
c.campus_name,
|
||||||
|
'0' as status
|
||||||
|
FROM
|
||||||
|
xg_dorm_area a
|
||||||
|
LEFT JOIN
|
||||||
|
xg_dorm_campus c ON a.campus_id = c.id
|
||||||
|
WHERE
|
||||||
|
a.deleted = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 获取所有宿舍楼信息 -->
|
||||||
|
<select id="selectBuildingList" parameterType="org.dromara.xg.domain.bo.DormBuildingTreeBo" resultMap="BuildingInfoMap">
|
||||||
|
SELECT
|
||||||
|
b.id,
|
||||||
|
b.building_name,
|
||||||
|
b.building_code,
|
||||||
|
b.campus_id,
|
||||||
|
b.building_type,
|
||||||
|
c.campus_name,
|
||||||
|
b.area_id,
|
||||||
|
a.area_name,
|
||||||
|
b.floors,
|
||||||
|
b.remark,
|
||||||
|
b.create_by,
|
||||||
|
b.create_time,
|
||||||
|
b.update_by,
|
||||||
|
b.update_time
|
||||||
|
FROM
|
||||||
|
xg_dorm_building b
|
||||||
|
LEFT JOIN
|
||||||
|
xg_dorm_campus c ON b.campus_id = c.id
|
||||||
|
LEFT JOIN
|
||||||
|
xg_dorm_area a ON b.area_id = a.id
|
||||||
|
WHERE
|
||||||
|
b.deleted = '0'
|
||||||
|
<if test="campusId != null">
|
||||||
|
AND b.campus_id = #{campusId}
|
||||||
|
</if>
|
||||||
|
<if test="areaId != null">
|
||||||
|
AND b.area_id = #{areaId}
|
||||||
|
</if>
|
||||||
|
<if test="buildingName != null and buildingName != ''">
|
||||||
|
AND b.building_name like concat('%', #{buildingName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
AND b.status = #{status}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 检查用户是否有宿舍管理权限 -->
|
||||||
|
<select id="checkUserDormManagerType" resultType="String">
|
||||||
|
SELECT
|
||||||
|
DISTINCT manager_type
|
||||||
|
FROM
|
||||||
|
xg_dorm_manager
|
||||||
|
WHERE
|
||||||
|
user_id = #{userId}
|
||||||
|
AND deleted = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 获取全校管理员权限的宿舍楼信息 -->
|
||||||
|
<select id="selectBuildingsBySchoolAdmin" resultMap="BuildingInfoMap">
|
||||||
|
SELECT
|
||||||
|
b.id,
|
||||||
|
b.building_name,
|
||||||
|
b.building_code,
|
||||||
|
b.building_type,
|
||||||
|
b.campus_id,
|
||||||
|
c.campus_name,
|
||||||
|
b.area_id,
|
||||||
|
a.area_name,
|
||||||
|
b.floors,
|
||||||
|
b.remark,
|
||||||
|
b.create_by,
|
||||||
|
b.create_time,
|
||||||
|
b.update_by,
|
||||||
|
b.update_time
|
||||||
|
FROM
|
||||||
|
xg_dorm_building b
|
||||||
|
LEFT JOIN
|
||||||
|
xg_dorm_campus c ON b.campus_id = c.id
|
||||||
|
LEFT JOIN
|
||||||
|
xg_dorm_area a ON b.area_id = a.id
|
||||||
|
WHERE
|
||||||
|
b.deleted = '0'
|
||||||
|
AND EXISTS (
|
||||||
|
SELECT 1 FROM xg_dorm_manager m
|
||||||
|
WHERE m.user_id = #{userId}
|
||||||
|
AND m.manager_type = '1'
|
||||||
|
AND m.deleted = '0'
|
||||||
|
)
|
||||||
|
<if test="bo.campusId != null">
|
||||||
|
AND b.campus_id = #{bo.campusId}
|
||||||
|
</if>
|
||||||
|
<if test="bo.areaId != null">
|
||||||
|
AND b.area_id = #{bo.areaId}
|
||||||
|
</if>
|
||||||
|
<if test="bo.buildingName != null and bo.buildingName != ''">
|
||||||
|
AND b.building_name like concat('%', #{bo.buildingName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="bo.status != null and bo.status != ''">
|
||||||
|
AND b.status = #{bo.status}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 获取校区管理员权限的宿舍楼信息 -->
|
||||||
|
<select id="selectBuildingsByCampusAdmin" resultMap="BuildingInfoMap">
|
||||||
|
SELECT
|
||||||
|
b.id,
|
||||||
|
b.building_name,
|
||||||
|
b.building_code,
|
||||||
|
b.campus_id,
|
||||||
|
b.building_type,
|
||||||
|
c.campus_name,
|
||||||
|
b.area_id,
|
||||||
|
a.area_name,
|
||||||
|
b.floors,
|
||||||
|
b.remark,
|
||||||
|
b.create_by,
|
||||||
|
b.create_time,
|
||||||
|
b.update_by,
|
||||||
|
b.update_time
|
||||||
|
FROM
|
||||||
|
xg_dorm_building b
|
||||||
|
LEFT JOIN
|
||||||
|
xg_dorm_campus c ON b.campus_id = c.id
|
||||||
|
LEFT JOIN
|
||||||
|
xg_dorm_area a ON b.area_id = a.id
|
||||||
|
WHERE
|
||||||
|
b.deleted = '0'
|
||||||
|
AND b.campus_id IN (
|
||||||
|
SELECT
|
||||||
|
auth_source
|
||||||
|
FROM
|
||||||
|
xg_dorm_manager m
|
||||||
|
JOIN
|
||||||
|
xg_dorm_manager_source s ON m.id = s.manager_id
|
||||||
|
WHERE
|
||||||
|
m.user_id = #{userId}
|
||||||
|
AND m.manager_type = '2'
|
||||||
|
AND m.deleted = '0'
|
||||||
|
AND s.deleted = '0'
|
||||||
|
)
|
||||||
|
<if test="bo.campusId != null">
|
||||||
|
AND b.campus_id = #{bo.campusId}
|
||||||
|
</if>
|
||||||
|
<if test="bo.areaId != null">
|
||||||
|
AND b.area_id = #{bo.areaId}
|
||||||
|
</if>
|
||||||
|
<if test="bo.buildingName != null and bo.buildingName != ''">
|
||||||
|
AND b.building_name like concat('%', #{bo.buildingName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="bo.status != null and bo.status != ''">
|
||||||
|
AND b.status = #{bo.status}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 获取宿舍区管理员权限的宿舍楼信息 -->
|
||||||
|
<select id="selectBuildingsByAreaAdmin" resultMap="BuildingInfoMap">
|
||||||
|
SELECT
|
||||||
|
b.id,
|
||||||
|
b.building_name,
|
||||||
|
b.building_code,
|
||||||
|
b.campus_id,
|
||||||
|
c.campus_name,
|
||||||
|
b.area_id,
|
||||||
|
b.building_type,
|
||||||
|
a.area_name,
|
||||||
|
b.floors,
|
||||||
|
b.remark,
|
||||||
|
b.create_by,
|
||||||
|
b.create_time,
|
||||||
|
b.update_by,
|
||||||
|
b.update_time
|
||||||
|
FROM
|
||||||
|
xg_dorm_building b
|
||||||
|
LEFT JOIN
|
||||||
|
xg_dorm_campus c ON b.campus_id = c.id
|
||||||
|
LEFT JOIN
|
||||||
|
xg_dorm_area a ON b.area_id = a.id
|
||||||
|
WHERE
|
||||||
|
b.deleted = '0'
|
||||||
|
AND b.area_id IN (
|
||||||
|
SELECT
|
||||||
|
auth_source
|
||||||
|
FROM
|
||||||
|
xg_dorm_manager m
|
||||||
|
JOIN
|
||||||
|
xg_dorm_manager_source s ON m.id = s.manager_id
|
||||||
|
WHERE
|
||||||
|
m.user_id = #{userId}
|
||||||
|
AND m.manager_type = '3'
|
||||||
|
AND m.deleted = '0'
|
||||||
|
AND s.deleted = '0'
|
||||||
|
)
|
||||||
|
<if test="bo.campusId != null">
|
||||||
|
AND b.campus_id = #{bo.campusId}
|
||||||
|
</if>
|
||||||
|
<if test="bo.areaId != null">
|
||||||
|
AND b.area_id = #{bo.areaId}
|
||||||
|
</if>
|
||||||
|
<if test="bo.buildingName != null and bo.buildingName != ''">
|
||||||
|
AND b.building_name like concat('%', #{bo.buildingName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="bo.status != null and bo.status != ''">
|
||||||
|
AND b.status = #{bo.status}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 获取宿舍楼管理员权限的宿舍楼信息 -->
|
||||||
|
<select id="selectBuildingsByBuildingAdmin" resultMap="BuildingInfoMap">
|
||||||
|
SELECT
|
||||||
|
b.id,
|
||||||
|
b.building_name,
|
||||||
|
b.building_code,
|
||||||
|
b.building_type,
|
||||||
|
b.campus_id,
|
||||||
|
c.campus_name,
|
||||||
|
b.area_id,
|
||||||
|
a.area_name,
|
||||||
|
b.floors,
|
||||||
|
b.remark,
|
||||||
|
b.create_by,
|
||||||
|
b.create_time,
|
||||||
|
b.update_by,
|
||||||
|
b.update_time
|
||||||
|
FROM
|
||||||
|
xg_dorm_building b
|
||||||
|
LEFT JOIN
|
||||||
|
xg_dorm_campus c ON b.campus_id = c.id
|
||||||
|
LEFT JOIN
|
||||||
|
xg_dorm_area a ON b.area_id = a.id
|
||||||
|
WHERE
|
||||||
|
b.deleted = '0'
|
||||||
|
AND b.id IN (
|
||||||
|
SELECT
|
||||||
|
auth_source
|
||||||
|
FROM
|
||||||
|
xg_dorm_manager m
|
||||||
|
JOIN
|
||||||
|
xg_dorm_manager_source s ON m.id = s.manager_id
|
||||||
|
WHERE
|
||||||
|
m.user_id = #{userId}
|
||||||
|
AND m.manager_type = '4'
|
||||||
|
AND m.deleted = '0'
|
||||||
|
AND s.deleted = '0'
|
||||||
|
)
|
||||||
|
<if test="bo.campusId != null">
|
||||||
|
AND b.campus_id = #{bo.campusId}
|
||||||
|
</if>
|
||||||
|
<if test="bo.areaId != null">
|
||||||
|
AND b.area_id = #{bo.areaId}
|
||||||
|
</if>
|
||||||
|
<if test="bo.buildingName != null and bo.buildingName != ''">
|
||||||
|
AND b.building_name like concat('%', #{bo.buildingName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="bo.status != null and bo.status != ''">
|
||||||
|
AND b.status = #{bo.status}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?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="org.dromara.xg.mapper.XgSysUserMapper">
|
||||||
|
|
||||||
|
<resultMap type="org.dromara.xg.domain.XgSysUser" id="XgSysUserResult">
|
||||||
|
<id property="userId" column="user_id"/>
|
||||||
|
<result property="nickName" column="nick_name"/>
|
||||||
|
<result property="phonenumber" column="phonenumber"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
<result property="delFlag" column="del_flag"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 查询有效用户列表 -->
|
||||||
|
<select id="selectActiveUserList" resultMap="XgSysUserResult">
|
||||||
|
select user_id, nick_name, phonenumber
|
||||||
|
from sys_user
|
||||||
|
where status = '0' and del_flag = '0'
|
||||||
|
order by create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?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="org.dromara.xg.mapper.XgDormRoomMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
+42
-1
@@ -2,6 +2,7 @@ package org.dromara.zsjy.controller;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
@@ -133,4 +134,44 @@ public class ZsjyEnrollmentInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
return R.ok(vo);
|
return R.ok(vo);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/**
|
||||||
|
* 更新报名信息状态
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:info:edit")
|
||||||
|
@Log(title = "更新报名状态", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping("/updateStatus")
|
||||||
|
public R<Void> updateStatus(@RequestBody UpdateStatusRequest request) {
|
||||||
|
if (request.getId() != null) {
|
||||||
|
// 单个更新
|
||||||
|
return toAjax(enrollmentInfoService.updateStatus(request.getId(), request.getStatus()));
|
||||||
|
} else if (request.getIds() != null && !request.getIds().isEmpty()) {
|
||||||
|
// 批量更新
|
||||||
|
return toAjax(enrollmentInfoService.batchUpdateStatus(request.getIds(), request.getStatus()));
|
||||||
|
} else {
|
||||||
|
return R.fail("请提供要更新的报名信息ID");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新状态请求对象
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
class UpdateStatusRequest {
|
||||||
|
/**
|
||||||
|
* 单个ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量ID
|
||||||
|
*/
|
||||||
|
private List<Long> ids;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
}
|
||||||
+292
@@ -0,0 +1,292 @@
|
|||||||
|
package org.dromara.zsjy.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.zsjy.domain.vo.ZsjyEnrollmentProcessVo;
|
||||||
|
import org.dromara.zsjy.domain.bo.ZsjyEnrollmentProcessBo;
|
||||||
|
import org.dromara.zsjy.service.IZsjyEnrollmentProcessService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 招生录取流程状态Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-01-20
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zsjy/enrollment/process")
|
||||||
|
public class ZsjyEnrollmentProcessController extends BaseController {
|
||||||
|
|
||||||
|
private final IZsjyEnrollmentProcessService enrollmentProcessService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询招生录取流程状态列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<ZsjyEnrollmentProcessVo> list(ZsjyEnrollmentProcessBo bo, PageQuery pageQuery) {
|
||||||
|
return enrollmentProcessService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出招生录取流程状态列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:export")
|
||||||
|
@Log(title = "招生录取流程状态", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(ZsjyEnrollmentProcessBo bo, HttpServletResponse response) {
|
||||||
|
List<ZsjyEnrollmentProcessVo> list = enrollmentProcessService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "招生录取流程状态", ZsjyEnrollmentProcessVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取招生录取流程状态详细信息
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<ZsjyEnrollmentProcessVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||||
|
return R.ok(enrollmentProcessService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据报名信息ID查询流程状态
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:query")
|
||||||
|
@GetMapping("/enrollment/{enrollmentId}")
|
||||||
|
public R<ZsjyEnrollmentProcessVo> getByEnrollmentId(@NotNull(message = "报名信息ID不能为空") @PathVariable Long enrollmentId) {
|
||||||
|
return R.ok(enrollmentProcessService.queryByEnrollmentId(enrollmentId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增招生录取流程状态
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:add")
|
||||||
|
@Log(title = "招生录取流程状态", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody ZsjyEnrollmentProcessBo bo) {
|
||||||
|
return toAjax(enrollmentProcessService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改招生录取流程状态
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:edit")
|
||||||
|
@Log(title = "招生录取流程状态", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ZsjyEnrollmentProcessBo bo) {
|
||||||
|
return toAjax(enrollmentProcessService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除招生录取流程状态
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:remove")
|
||||||
|
@Log(title = "招生录取流程状态", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||||
|
return toAjax(enrollmentProcessService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化流程状态
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:init")
|
||||||
|
@Log(title = "初始化招生录取流程", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/init")
|
||||||
|
public R<Void> initProcess(@RequestParam Long enrollmentId, @RequestParam String studentName, @RequestParam String idCard) {
|
||||||
|
return toAjax(enrollmentProcessService.initProcess(enrollmentId, studentName, idCard));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信息审核
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:audit")
|
||||||
|
@Log(title = "招生信息审核", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/infoAudit")
|
||||||
|
public R<Void> infoAudit(@RequestParam Long processId, @RequestParam String auditResult, @RequestParam(required = false) String auditOpinion) {
|
||||||
|
return toAjax(enrollmentProcessService.infoAudit(processId, auditResult, auditOpinion));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 录取处理
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:admission")
|
||||||
|
@Log(title = "招生录取处理", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/admissionProcess")
|
||||||
|
public R<Void> admissionProcess(@RequestParam Long processId, @RequestParam String admissionResult,
|
||||||
|
@RequestParam(required = false) String admissionOpinion,
|
||||||
|
@RequestParam(required = false) String noticeNumber) {
|
||||||
|
return toAjax(enrollmentProcessService.admissionProcess(processId, admissionResult, admissionOpinion, noticeNumber));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流程统计数据
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:query")
|
||||||
|
@GetMapping("/statistics")
|
||||||
|
public R<Map<String, Object>> getStatistics() {
|
||||||
|
List<ZsjyEnrollmentProcessVo> allProcesses = enrollmentProcessService.queryList(new ZsjyEnrollmentProcessBo());
|
||||||
|
|
||||||
|
Map<String, Object> statistics = new HashMap<>();
|
||||||
|
statistics.put("total", allProcesses.size());
|
||||||
|
statistics.put("pending", allProcesses.stream().mapToLong(p -> "0".equals(p.getCurrentStatus()) ? 1 : 0).sum());
|
||||||
|
statistics.put("processing", allProcesses.stream().mapToLong(p -> "1".equals(p.getCurrentStatus()) || "2".equals(p.getCurrentStatus()) || "3".equals(p.getCurrentStatus()) ? 1 : 0).sum());
|
||||||
|
statistics.put("completed", allProcesses.stream().mapToLong(p -> "4".equals(p.getCurrentStatus()) ? 1 : 0).sum());
|
||||||
|
statistics.put("rejected", allProcesses.stream().mapToLong(p -> "9".equals(p.getCurrentStatus()) ? 1 : 0).sum());
|
||||||
|
|
||||||
|
return R.ok(statistics);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最终确认
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:final")
|
||||||
|
@Log(title = "招生最终确认", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/finalConfirm")
|
||||||
|
public R<Void> finalConfirm(@RequestParam Long processId, @RequestParam String finalResult, @RequestParam(required = false) String finalOpinion) {
|
||||||
|
return toAjax(enrollmentProcessService.finalConfirm(processId, finalResult, finalOpinion));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从报名信息创建流程
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:add")
|
||||||
|
@Log(title = "创建录取流程", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/createFromEnrollment")
|
||||||
|
public R<Void> createFromEnrollment(@RequestParam Long enrollmentId) {
|
||||||
|
return toAjax(enrollmentProcessService.initProcess(enrollmentId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步流程状态
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:edit")
|
||||||
|
@Log(title = "同步流程状态", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/syncStatus")
|
||||||
|
public R<Void> syncStatus(@RequestParam Long id) {
|
||||||
|
// 这里可以实现状态同步逻辑,暂时返回成功
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询待处理的流程列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:query")
|
||||||
|
@GetMapping("/pending")
|
||||||
|
public TableDataInfo<ZsjyEnrollmentProcessVo> getPendingList(ZsjyEnrollmentProcessBo bo, PageQuery pageQuery) {
|
||||||
|
// 查询当前用户的待处理流程
|
||||||
|
return enrollmentProcessService.queryPendingList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据状态查询流程列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:query")
|
||||||
|
@GetMapping("/status/{status}")
|
||||||
|
public TableDataInfo<ZsjyEnrollmentProcessVo> getListByStatus(@PathVariable String status, ZsjyEnrollmentProcessBo bo, PageQuery pageQuery) {
|
||||||
|
bo.setCurrentStatus(status);
|
||||||
|
return enrollmentProcessService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索流程
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:query")
|
||||||
|
@GetMapping("/search")
|
||||||
|
public TableDataInfo<ZsjyEnrollmentProcessVo> searchProcess(@RequestParam String keyword, ZsjyEnrollmentProcessBo bo, PageQuery pageQuery) {
|
||||||
|
bo.setStudentName(keyword); // 按学生姓名搜索
|
||||||
|
return enrollmentProcessService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确认缴费
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:edit")
|
||||||
|
@Log(title = "确认缴费", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/confirmPayment")
|
||||||
|
public R<Void> confirmPayment(@RequestParam Long processId) {
|
||||||
|
// 实现缴费确认逻辑
|
||||||
|
ZsjyEnrollmentProcessBo bo = new ZsjyEnrollmentProcessBo();
|
||||||
|
bo.setId(processId);
|
||||||
|
bo.setPaymentStatus("1"); // 已缴费
|
||||||
|
bo.setPaymentConfirmTime(new Date());
|
||||||
|
return toAjax(enrollmentProcessService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成流程
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:edit")
|
||||||
|
@Log(title = "完成录取流程", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/complete")
|
||||||
|
public R<Void> completeProcess(@RequestParam Long processId) {
|
||||||
|
ZsjyEnrollmentProcessBo bo = new ZsjyEnrollmentProcessBo();
|
||||||
|
bo.setId(processId);
|
||||||
|
bo.setCurrentStatus("4"); // 录取完成
|
||||||
|
bo.setIsCompleted(1);
|
||||||
|
return toAjax(enrollmentProcessService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 驳回流程
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:edit")
|
||||||
|
@Log(title = "驳回录取流程", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/reject")
|
||||||
|
public R<Void> rejectProcess(@RequestParam Long processId, @RequestParam String rejectReason) {
|
||||||
|
ZsjyEnrollmentProcessBo bo = new ZsjyEnrollmentProcessBo();
|
||||||
|
bo.setId(processId);
|
||||||
|
bo.setCurrentStatus("9"); // 已驳回
|
||||||
|
// 这里可以添加驳回原因的处理逻辑
|
||||||
|
return toAjax(enrollmentProcessService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置流程
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:edit")
|
||||||
|
@Log(title = "重置录取流程", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/reset")
|
||||||
|
public R<Void> resetProcess(@RequestParam Long processId) {
|
||||||
|
ZsjyEnrollmentProcessBo bo = new ZsjyEnrollmentProcessBo();
|
||||||
|
bo.setId(processId);
|
||||||
|
bo.setCurrentStatus("0"); // 重置为待审核
|
||||||
|
bo.setIsCompleted(0);
|
||||||
|
// 重置各种审核状态
|
||||||
|
bo.setInfoAuditStatus("0");
|
||||||
|
bo.setAdmissionStatus("0");
|
||||||
|
bo.setFinalAuditStatus("0");
|
||||||
|
return toAjax(enrollmentProcessService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当前用户角色需要审核的数据列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:enrollment:process:audit")
|
||||||
|
@GetMapping("/myAudit")
|
||||||
|
public TableDataInfo<ZsjyEnrollmentProcessVo> getMyAuditList(PageQuery pageQuery) {
|
||||||
|
return enrollmentProcessService.queryMyAuditList(pageQuery);
|
||||||
|
}
|
||||||
|
}
|
||||||
+103
@@ -0,0 +1,103 @@
|
|||||||
|
package org.dromara.zsjy.controller;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.zsjy.domain.vo.ZsjyStatisticsOverviewVo;
|
||||||
|
import org.dromara.zsjy.service.IZsjyStatisticsService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 招生统计Controller
|
||||||
|
*
|
||||||
|
* @author Cursor AI
|
||||||
|
* @date 2025-07-05
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zsjy/statistics")
|
||||||
|
public class ZsjyStatisticsController extends BaseController {
|
||||||
|
|
||||||
|
private final IZsjyStatisticsService statisticsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取统计概览数据
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:statistics:view")
|
||||||
|
@GetMapping("/overview")
|
||||||
|
public R<ZsjyStatisticsOverviewVo> getOverview() {
|
||||||
|
log.info("接收到获取统计概览数据请求");
|
||||||
|
ZsjyStatisticsOverviewVo result = statisticsService.getStatisticsOverview();
|
||||||
|
log.info("统计概览数据响应: {}", result != null ? "数据获取成功" : "数据为空");
|
||||||
|
return R.ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取专业分布统计
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:statistics:major:view")
|
||||||
|
@GetMapping("/major")
|
||||||
|
public R<Map<String, Object>> getMajorDistribution() {
|
||||||
|
log.info("接收到获取专业分布统计请求");
|
||||||
|
Map<String, Object> result = statisticsService.getMajorDistribution();
|
||||||
|
log.info("专业分布统计响应: {}", result != null ? "数据获取成功" : "数据为空");
|
||||||
|
return R.ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取地区分布统计
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:statistics:region:view")
|
||||||
|
@GetMapping("/region")
|
||||||
|
public R<Map<String, Object>> getRegionDistribution() {
|
||||||
|
log.info("接收到获取地区分布统计请求");
|
||||||
|
Map<String, Object> result = statisticsService.getRegionDistribution();
|
||||||
|
log.info("地区分布统计响应: {}", result != null ? "数据获取成功" : "数据为空");
|
||||||
|
return R.ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取性别比例统计
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:statistics:view")
|
||||||
|
@GetMapping("/gender")
|
||||||
|
public R<Map<String, Object>> getGenderRatio() {
|
||||||
|
log.info("接收到获取性别比例统计请求");
|
||||||
|
Map<String, Object> result = statisticsService.getGenderRatio();
|
||||||
|
log.info("性别比例统计响应: {}", result != null ? "数据获取成功" : "数据为空");
|
||||||
|
return R.ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取报名趋势统计
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:statistics:view")
|
||||||
|
@GetMapping("/trend")
|
||||||
|
public R<Map<String, Object>> getEnrollmentTrend(@RequestParam(required = false) Integer days) {
|
||||||
|
log.info("接收到获取报名趋势统计请求, days={}", days);
|
||||||
|
Map<String, Object> result = statisticsService.getEnrollmentTrend(days);
|
||||||
|
log.info("报名趋势统计响应: {}", result != null ? "数据获取成功" : "数据为空");
|
||||||
|
return R.ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取状态分布统计
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("zsjy:statistics:view")
|
||||||
|
@GetMapping("/status")
|
||||||
|
public R<Map<String, Object>> getStatusDistribution() {
|
||||||
|
log.info("接收到获取状态分布统计请求");
|
||||||
|
Map<String, Object> result = statisticsService.getStatusDistribution();
|
||||||
|
log.info("状态分布统计响应: {}", result != null ? "数据获取成功" : "数据为空");
|
||||||
|
return R.ok(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
+90
-1
@@ -173,4 +173,93 @@ public class ZsjyEnrollmentInfo extends TenantEntity {
|
|||||||
* 二维码来源标识
|
* 二维码来源标识
|
||||||
*/
|
*/
|
||||||
private String qrCodeSource;
|
private String qrCodeSource;
|
||||||
}
|
|
||||||
|
// 添加明确的getter和setter方法以解决编译问题
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdCard() {
|
||||||
|
return idCard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdCard(String idCard) {
|
||||||
|
this.idCard = idCard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGender() {
|
||||||
|
return gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGender(String gender) {
|
||||||
|
this.gender = gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnrollmentStatus() {
|
||||||
|
return enrollmentStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnrollmentStatus(String enrollmentStatus) {
|
||||||
|
this.enrollmentStatus = enrollmentStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getApplicationTime() {
|
||||||
|
return applicationTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApplicationTime(Date applicationTime) {
|
||||||
|
this.applicationTime = applicationTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExamNumber() {
|
||||||
|
return examNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExamNumber(String examNumber) {
|
||||||
|
this.examNumber = examNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppliedMajor() {
|
||||||
|
return appliedMajor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppliedMajor(String appliedMajor) {
|
||||||
|
this.appliedMajor = appliedMajor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMajorCode() {
|
||||||
|
return majorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMajorCode(String majorCode) {
|
||||||
|
this.majorCode = majorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhone1() {
|
||||||
|
return phone1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhone1(String phone1) {
|
||||||
|
this.phone1 = phone1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExamRegion() {
|
||||||
|
return examRegion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExamRegion(String examRegion) {
|
||||||
|
this.examRegion = examRegion;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loaded 100 of 243 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user