“班主任考核数据1”
This commit is contained in:
commit
1277f1c6aa
55 files changed
+9272
-26
No files matched your search
@@ -136,11 +136,11 @@
|
||||
</dependency>
|
||||
|
||||
<!-- 学生考核管理模块 -->
|
||||
<!-- <dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-xskh</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency> -->
|
||||
</dependency>
|
||||
<!-- 奖惩补贴管理模块 -->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<module>ruoyi-xljk</module>
|
||||
<module>ruoyi-jcbt</module>
|
||||
<module>ruoyi-bzrkh</module>
|
||||
<module>ruoyi-xskh</module>
|
||||
<!-- <module>ruoyi-stgl</module> -->
|
||||
</modules>
|
||||
|
||||
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
package org.dromara.xskh.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.xskh.domain.vo.XskhDisciplineRecordVo;
|
||||
import org.dromara.xskh.domain.bo.XskhDisciplineRecordBo;
|
||||
import org.dromara.xskh.domain.vo.XskhStudentOptionVo;
|
||||
import org.dromara.xskh.service.IXskhDisciplineRecordService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 学生违纪处分记录
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/disciplineRecord/disciplineRecord")
|
||||
public class XskhDisciplineRecordController extends BaseController {
|
||||
|
||||
private final IXskhDisciplineRecordService xskhDisciplineRecordService;
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分记录列表
|
||||
*/
|
||||
@SaCheckPermission("disciplineRecord:disciplineRecord:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XskhDisciplineRecordVo> list(XskhDisciplineRecordBo bo, PageQuery pageQuery) {
|
||||
return xskhDisciplineRecordService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学生违纪处分记录列表
|
||||
*/
|
||||
@SaCheckPermission("disciplineRecord:disciplineRecord:export")
|
||||
@Log(title = "学生违纪处分记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XskhDisciplineRecordBo bo, HttpServletResponse response) {
|
||||
List<XskhDisciplineRecordVo> list = xskhDisciplineRecordService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "学生违纪处分记录", XskhDisciplineRecordVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生违纪处分记录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("disciplineRecord:disciplineRecord:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XskhDisciplineRecordVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(xskhDisciplineRecordService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生违纪处分记录
|
||||
*/
|
||||
@SaCheckPermission("disciplineRecord:disciplineRecord:add")
|
||||
@Log(title = "学生违纪处分记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XskhDisciplineRecordBo bo) {
|
||||
return toAjax(xskhDisciplineRecordService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生违纪处分记录
|
||||
*/
|
||||
@SaCheckPermission("disciplineRecord:disciplineRecord:edit")
|
||||
@Log(title = "学生违纪处分记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XskhDisciplineRecordBo bo) {
|
||||
return toAjax(xskhDisciplineRecordService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生违纪处分记录
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("disciplineRecord:disciplineRecord:remove")
|
||||
@Log(title = "学生违纪处分记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||
return toAjax(xskhDisciplineRecordService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学生选项列表(用于下拉框)
|
||||
*/
|
||||
@SaCheckPermission("disciplineRecord:disciplineRecord:query")
|
||||
@GetMapping("/studentOptions")
|
||||
public R<List<XskhStudentOptionVo>> getStudentOptions(@RequestParam(required = false) String keyword) {
|
||||
return R.ok(xskhDisciplineRecordService.getStudentOptions(keyword));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前登录学生的违纪处分记录列表
|
||||
*/
|
||||
@SaCheckPermission("disciplineRecord:student:list")
|
||||
@GetMapping("/my")
|
||||
public TableDataInfo<XskhDisciplineRecordVo> getMyDisciplineRecords(XskhDisciplineRecordBo bo,
|
||||
PageQuery pageQuery) {
|
||||
return xskhDisciplineRecordService.queryMyPageList(bo, pageQuery);
|
||||
}
|
||||
}
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
package org.dromara.xskh.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.xskh.domain.vo.XskhDisciplineRevokeVo;
|
||||
import org.dromara.xskh.domain.bo.XskhDisciplineRevokeBo;
|
||||
import org.dromara.xskh.service.IXskhDisciplineRevokeService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 违纪处分撤销申请审批
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/disciplineRevoke/disciplineRevoke")
|
||||
public class XskhDisciplineRevokeController extends BaseController {
|
||||
|
||||
private final IXskhDisciplineRevokeService xskhDisciplineRevokeService;
|
||||
|
||||
/**
|
||||
* 查询违纪处分撤销申请审批列表
|
||||
*/
|
||||
@SaCheckPermission("disciplineRevoke:disciplineRevoke:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XskhDisciplineRevokeVo> list(XskhDisciplineRevokeBo bo, PageQuery pageQuery) {
|
||||
return xskhDisciplineRevokeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出违纪处分撤销申请审批列表
|
||||
*/
|
||||
@SaCheckPermission("disciplineRevoke:disciplineRevoke:export")
|
||||
@Log(title = "违纪处分撤销申请审批", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XskhDisciplineRevokeBo bo, HttpServletResponse response) {
|
||||
List<XskhDisciplineRevokeVo> list = xskhDisciplineRevokeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "违纪处分撤销申请审批", XskhDisciplineRevokeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取违纪处分撤销申请审批详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("disciplineRevoke:disciplineRevoke:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XskhDisciplineRevokeVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(xskhDisciplineRevokeService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增违纪处分撤销申请审批
|
||||
*/
|
||||
@SaCheckPermission("disciplineRevoke:disciplineRevoke:add")
|
||||
@Log(title = "违纪处分撤销申请审批", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XskhDisciplineRevokeBo bo) {
|
||||
return toAjax(xskhDisciplineRevokeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改违纪处分撤销申请审批
|
||||
*/
|
||||
@SaCheckPermission("disciplineRevoke:disciplineRevoke:edit")
|
||||
@Log(title = "违纪处分撤销申请审批", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XskhDisciplineRevokeBo bo) {
|
||||
return toAjax(xskhDisciplineRevokeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除违纪处分撤销申请审批
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("disciplineRevoke:disciplineRevoke:remove")
|
||||
@Log(title = "违纪处分撤销申请审批", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||
return toAjax(xskhDisciplineRevokeService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据违纪记录ID查询撤销申请记录
|
||||
*
|
||||
* @param disciplineRecordId 违纪记录ID
|
||||
*/
|
||||
@SaCheckPermission("disciplineRevoke:student:query")
|
||||
@GetMapping("/byDisciplineRecord/{disciplineRecordId}")
|
||||
public R<XskhDisciplineRevokeVo> getByDisciplineRecordId(
|
||||
@NotNull(message = "违纪记录ID不能为空") @PathVariable Long disciplineRecordId) {
|
||||
return R.ok(xskhDisciplineRevokeService.queryByDisciplineRecordId(disciplineRecordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前登录学生的撤销申请列表
|
||||
*/
|
||||
@SaCheckPermission("disciplineRevoke:student:list")
|
||||
@GetMapping("/my")
|
||||
public TableDataInfo<XskhDisciplineRevokeVo> getMyRevokeApplications(XskhDisciplineRevokeBo bo,
|
||||
PageQuery pageQuery) {
|
||||
return xskhDisciplineRevokeService.queryMyPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生申请撤销违纪记录
|
||||
*/
|
||||
@SaCheckPermission("disciplineRevoke:student:apply")
|
||||
@Log(title = "学生申请撤销违纪记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/apply")
|
||||
public R<Void> applyRevoke(@Validated(AddGroup.class) @RequestBody XskhDisciplineRevokeBo bo) {
|
||||
return toAjax(xskhDisciplineRevokeService.applyRevoke(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核撤销申请
|
||||
*/
|
||||
@SaCheckPermission("disciplineRevoke:disciplineRevoke:approve")
|
||||
@Log(title = "审核撤销申请", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/approve")
|
||||
public R<Void> approveRevoke(@Validated(EditGroup.class) @RequestBody XskhDisciplineRevokeBo bo) {
|
||||
return toAjax(xskhDisciplineRevokeService.approveRevoke(bo));
|
||||
}
|
||||
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
package org.dromara.xskh.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.xskh.domain.vo.XskhDisciplineTypeVo;
|
||||
import org.dromara.xskh.domain.bo.XskhDisciplineTypeBo;
|
||||
import org.dromara.xskh.service.IXskhDisciplineTypeService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 学生违纪处分类型
|
||||
*
|
||||
* @author zlwu
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/disciplineType/disciplineType")
|
||||
public class XskhDisciplineTypeController extends BaseController {
|
||||
|
||||
private final IXskhDisciplineTypeService xskhDisciplineTypeService;
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分类型列表
|
||||
*/
|
||||
@SaCheckPermission("disciplineType:disciplineType:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XskhDisciplineTypeVo> list(XskhDisciplineTypeBo bo, PageQuery pageQuery) {
|
||||
return xskhDisciplineTypeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学生违纪处分类型列表
|
||||
*/
|
||||
@SaCheckPermission("disciplineType:disciplineType:export")
|
||||
@Log(title = "学生违纪处分类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XskhDisciplineTypeBo bo, HttpServletResponse response) {
|
||||
List<XskhDisciplineTypeVo> list = xskhDisciplineTypeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "学生违纪处分类型", XskhDisciplineTypeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生违纪处分类型详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("disciplineType:disciplineType:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XskhDisciplineTypeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xskhDisciplineTypeService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生违纪处分类型
|
||||
*/
|
||||
@SaCheckPermission("disciplineType:disciplineType:add")
|
||||
@Log(title = "学生违纪处分类型", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XskhDisciplineTypeBo bo) {
|
||||
return toAjax(xskhDisciplineTypeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生违纪处分类型
|
||||
*/
|
||||
@SaCheckPermission("disciplineType:disciplineType:edit")
|
||||
@Log(title = "学生违纪处分类型", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XskhDisciplineTypeBo bo) {
|
||||
return toAjax(xskhDisciplineTypeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生违纪处分类型
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("disciplineType:disciplineType:remove")
|
||||
@Log(title = "学生违纪处分类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xskhDisciplineTypeService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
package org.dromara.xskh.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.xskh.domain.vo.XskhRewardTypeVo;
|
||||
import org.dromara.xskh.domain.bo.XskhRewardTypeBo;
|
||||
import org.dromara.xskh.service.IXskhRewardTypeService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 学生奖励类型
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rewardType/rewardType")
|
||||
public class XskhRewardTypeController extends BaseController {
|
||||
|
||||
private final IXskhRewardTypeService xskhRewardTypeService;
|
||||
|
||||
/**
|
||||
* 查询学生奖励类型列表
|
||||
*/
|
||||
@SaCheckPermission("rewardType:rewardType:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XskhRewardTypeVo> list(XskhRewardTypeBo bo, PageQuery pageQuery) {
|
||||
return xskhRewardTypeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学生奖励类型列表
|
||||
*/
|
||||
@SaCheckPermission("rewardType:rewardType:export")
|
||||
@Log(title = "学生奖励类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XskhRewardTypeBo bo, HttpServletResponse response) {
|
||||
List<XskhRewardTypeVo> list = xskhRewardTypeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "学生奖励类型", XskhRewardTypeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生奖励类型详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("rewardType:rewardType:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XskhRewardTypeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xskhRewardTypeService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生奖励类型
|
||||
*/
|
||||
@SaCheckPermission("rewardType:rewardType:add")
|
||||
@Log(title = "学生奖励类型", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XskhRewardTypeBo bo) {
|
||||
return toAjax(xskhRewardTypeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生奖励类型
|
||||
*/
|
||||
@SaCheckPermission("rewardType:rewardType:edit")
|
||||
@Log(title = "学生奖励类型", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XskhRewardTypeBo bo) {
|
||||
return toAjax(xskhRewardTypeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生奖励类型
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("rewardType:rewardType:remove")
|
||||
@Log(title = "学生奖励类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xskhRewardTypeService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
package org.dromara.xskh.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 学生违纪处分记录对象 xskh_discipline_record
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xskh_discipline_record")
|
||||
public class XskhDisciplineRecord extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
private Long collegeId;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
private Long majorId;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 违纪处分类型ID
|
||||
*/
|
||||
private Long disciplineTypeId;
|
||||
|
||||
/**
|
||||
* 违纪处分类型名称
|
||||
*/
|
||||
private String disciplineTypeName;
|
||||
|
||||
/**
|
||||
* 违纪处分日期
|
||||
*/
|
||||
private LocalDate disciplineDate;
|
||||
|
||||
/**
|
||||
* 违纪处分原因
|
||||
*/
|
||||
private String disciplineReason;
|
||||
|
||||
/**
|
||||
* 违纪处分内容
|
||||
*/
|
||||
private String disciplineContent;
|
||||
|
||||
/**
|
||||
* 扣分分值
|
||||
*/
|
||||
private BigDecimal scoreDeduction;
|
||||
|
||||
/**
|
||||
* 状态(1-生效 2-已撤销)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 附件OSS ID列表,逗号分隔
|
||||
*/
|
||||
private String attachmentOssIds;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Long deleted;
|
||||
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
package org.dromara.xskh.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 违纪处分撤销申请审批对象 xskh_discipline_revoke
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xskh_discipline_revoke")
|
||||
public class XskhDisciplineRevoke extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 违纪记录ID
|
||||
*/
|
||||
private Long disciplineRecordId;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 撤销申请原因
|
||||
*/
|
||||
private String revokeReason;
|
||||
|
||||
/**
|
||||
* 撤销证明材料,附件的oss_id,多个用逗号分隔
|
||||
*/
|
||||
private String revokeEvidence;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
private Date applyTime;
|
||||
|
||||
/**
|
||||
* 状态(1-待审核 2-审核通过 3-审核拒绝)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private Long approvalBy;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private Date approvalTime;
|
||||
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
private String approvalRemark;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Long deleted;
|
||||
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package org.dromara.xskh.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 学生违纪处分类型对象 xskh_discipline_type
|
||||
*
|
||||
* @author zlwu
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xskh_discipline_type")
|
||||
public class XskhDisciplineType extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 类型分类(1-违纪类型 2-处分类型)
|
||||
*/
|
||||
private String typeCategory;
|
||||
|
||||
/**
|
||||
* 类型说明
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 状态(0-正常 1-停用)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Long deleted;
|
||||
|
||||
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package org.dromara.xskh.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 学生奖励类型对象 xskh_reward_type
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xskh_reward_type")
|
||||
public class XskhRewardType extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 类型说明
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 状态(0-正常 1-停用)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Long deleted;
|
||||
|
||||
|
||||
}
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
package org.dromara.xskh.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.*;
|
||||
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 org.dromara.xskh.domain.XskhDisciplineRecord;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 学生违纪处分记录业务对象 xskh_discipline_record
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XskhDisciplineRecord.class, reverseConvertGenerate = false)
|
||||
public class XskhDisciplineRecordBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
@NotNull(message = "学生ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@NotBlank(message = "学号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
@NotBlank(message = "学生姓名不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
@NotNull(message = "学院ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long collegeId;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
@NotBlank(message = "学院名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
@NotNull(message = "专业ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long majorId;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
@NotBlank(message = "专业名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
@NotNull(message = "班级ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@NotBlank(message = "班级名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 违纪处分类型ID
|
||||
*/
|
||||
@NotNull(message = "违纪处分类型ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long disciplineTypeId;
|
||||
|
||||
/**
|
||||
* 违纪处分类型名称
|
||||
*/
|
||||
@NotBlank(message = "违纪处分类型名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String disciplineTypeName;
|
||||
|
||||
/**
|
||||
* 违纪处分日期
|
||||
*/
|
||||
@NotNull(message = "违纪处分日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate disciplineDate;
|
||||
|
||||
/**
|
||||
* 违纪处分原因
|
||||
*/
|
||||
@NotBlank(message = "违纪处分原因不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String disciplineReason;
|
||||
|
||||
/**
|
||||
* 违纪处分内容
|
||||
*/
|
||||
private String disciplineContent;
|
||||
|
||||
/**
|
||||
* 扣分分值
|
||||
*/
|
||||
@DecimalMin(value = "0.00", message = "扣分分值不能为负数", groups = { AddGroup.class, EditGroup.class })
|
||||
@Digits(integer = 3, fraction = 2, message = "扣分分值格式不正确,最多支持3位整数和2位小数", groups = { AddGroup.class,
|
||||
EditGroup.class })
|
||||
private BigDecimal scoreDeduction;
|
||||
|
||||
/**
|
||||
* 状态(1-生效 2-已撤销)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 附件OSS ID列表,逗号分隔
|
||||
*/
|
||||
private String attachmentOssIds;
|
||||
|
||||
}
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
package org.dromara.xskh.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.*;
|
||||
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 org.dromara.xskh.domain.XskhDisciplineRevoke;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 违纪处分撤销申请审批业务对象 xskh_discipline_revoke
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XskhDisciplineRevoke.class, reverseConvertGenerate = false)
|
||||
public class XskhDisciplineRevokeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 违纪记录ID
|
||||
*/
|
||||
@NotNull(message = "违纪记录ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long disciplineRecordId;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 撤销申请原因
|
||||
*/
|
||||
@NotBlank(message = "撤销申请原因不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String revokeReason;
|
||||
|
||||
/**
|
||||
* 撤销证明材料,附件的oss_id,多个用逗号分隔
|
||||
*/
|
||||
private String revokeEvidence;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date applyTime;
|
||||
|
||||
/**
|
||||
* 状态(1-待审核 2-审核通过 3-审核拒绝)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private Long approvalBy;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date approvalTime;
|
||||
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
private String approvalRemark;
|
||||
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package org.dromara.xskh.domain.bo;
|
||||
|
||||
import org.dromara.xskh.domain.XskhDisciplineType;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 学生违纪处分类型业务对象 xskh_discipline_type
|
||||
*
|
||||
* @author zlwu
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XskhDisciplineType.class, reverseConvertGenerate = false)
|
||||
public class XskhDisciplineTypeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
@NotBlank(message = "类型编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
@NotBlank(message = "类型名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 类型分类(1-违纪类型 2-处分类型)
|
||||
*/
|
||||
@NotBlank(message = "类型分类(1-违纪类型 2-处分类型)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String typeCategory;
|
||||
|
||||
/**
|
||||
* 类型说明
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 状态(0-正常 1-停用)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
private Long deleted;
|
||||
|
||||
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package org.dromara.xskh.domain.bo;
|
||||
|
||||
import org.dromara.xskh.domain.XskhRewardType;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 学生奖励类型业务对象 xskh_reward_type
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XskhRewardType.class, reverseConvertGenerate = false)
|
||||
public class XskhRewardTypeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
@NotBlank(message = "类型编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
@NotBlank(message = "类型名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 类型说明
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 状态(0-正常 1-停用)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
private Long deleted;
|
||||
|
||||
|
||||
}
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
package org.dromara.xskh.domain.vo;
|
||||
|
||||
import org.dromara.xskh.domain.XskhDisciplineType;
|
||||
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 org.dromara.xskh.domain.XskhDisciplineRecord;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 学生违纪处分记录视图对象 xskh_discipline_record
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XskhDisciplineRecord.class)
|
||||
public class XskhDisciplineRecordVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
@ExcelProperty(value = "学生ID")
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
@ExcelProperty(value = "学号")
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
@ExcelProperty(value = "学生姓名")
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
@ExcelProperty(value = "学院ID")
|
||||
private Long collegeId;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
@ExcelProperty(value = "学院名称")
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
@ExcelProperty(value = "专业ID")
|
||||
private Long majorId;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
@ExcelProperty(value = "专业名称")
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
@ExcelProperty(value = "班级ID")
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@ExcelProperty(value = "班级名称")
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 违纪处分类型ID
|
||||
*/
|
||||
@ExcelProperty(value = "违纪处分类型ID")
|
||||
private Long disciplineTypeId;
|
||||
|
||||
/**
|
||||
* 违纪处分类型名称
|
||||
*/
|
||||
@ExcelProperty(value = "违纪处分类型名称")
|
||||
private String disciplineTypeName;
|
||||
|
||||
/**
|
||||
* 违纪处分日期
|
||||
*/
|
||||
@ExcelProperty(value = "违纪处分日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate disciplineDate;
|
||||
|
||||
/**
|
||||
* 违纪处分原因
|
||||
*/
|
||||
@ExcelProperty(value = "违纪处分原因")
|
||||
private String disciplineReason;
|
||||
|
||||
/**
|
||||
* 违纪处分内容
|
||||
*/
|
||||
@ExcelProperty(value = "违纪处分内容")
|
||||
private String disciplineContent;
|
||||
|
||||
/**
|
||||
* 扣分分值
|
||||
*/
|
||||
@ExcelProperty(value = "扣分分值")
|
||||
private BigDecimal scoreDeduction;
|
||||
|
||||
/**
|
||||
* 状态(1-生效 2-已撤销)
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "student_discipline_status")
|
||||
private String status;
|
||||
/**
|
||||
* 附件OSS ID列表,逗号分隔
|
||||
*/
|
||||
private String attachmentOssIds;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
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;
|
||||
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
package org.dromara.xskh.domain.vo;
|
||||
|
||||
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 org.dromara.xskh.domain.XskhDisciplineRevoke;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 违纪处分撤销申请审批视图对象 xskh_discipline_revoke
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XskhDisciplineRevoke.class)
|
||||
public class XskhDisciplineRevokeVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 违纪记录ID
|
||||
*/
|
||||
@ExcelProperty(value = "违纪记录ID")
|
||||
private Long disciplineRecordId;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
@ExcelProperty(value = "学生ID")
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
@ExcelProperty(value = "学生姓名")
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 撤销申请原因
|
||||
*/
|
||||
@ExcelProperty(value = "撤销申请原因")
|
||||
private String revokeReason;
|
||||
|
||||
/**
|
||||
* 撤销证明材料,附件的oss_id,多个用逗号分隔
|
||||
*/
|
||||
@ExcelProperty(value = "撤销证明材料")
|
||||
private String revokeEvidence;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
@ExcelProperty(value = "申请时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date applyTime;
|
||||
|
||||
/**
|
||||
* 状态(1-待审核 2-审核通过 3-审核拒绝)
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "student_revoke_status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
@ExcelProperty(value = "审核人ID")
|
||||
private Long approvalBy;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@ExcelProperty(value = "审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date approvalTime;
|
||||
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
@ExcelProperty(value = "审核备注")
|
||||
private String approvalRemark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@ExcelProperty(value = "创建者")
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@ExcelProperty(value = "更新者")
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
package org.dromara.xskh.domain.vo;
|
||||
|
||||
import org.dromara.xskh.domain.XskhDisciplineType;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 学生违纪处分类型视图对象 xskh_discipline_type
|
||||
*
|
||||
* @author zlwu
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XskhDisciplineType.class)
|
||||
public class XskhDisciplineTypeVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
@ExcelProperty(value = "类型编码")
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
@ExcelProperty(value = "类型名称")
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 类型分类(1-违纪类型 2-处分类型)
|
||||
*/
|
||||
@ExcelProperty(value = "类型分类(1-违纪类型 2-处分类型)", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "student_discipline_category")
|
||||
private String typeCategory;
|
||||
|
||||
/**
|
||||
* 类型说明
|
||||
*/
|
||||
@ExcelProperty(value = "类型说明")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 状态(0-正常 1-停用)
|
||||
*/
|
||||
@ExcelProperty(value = "状态(0-正常 1-停用)", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_msg_status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@ExcelProperty(value = "排序号")
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
@ExcelProperty(value = "删除标志(0-未删除 1-已删除)")
|
||||
private Long deleted;
|
||||
|
||||
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
package org.dromara.xskh.domain.vo;
|
||||
|
||||
import org.dromara.xskh.domain.XskhRewardType;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 学生奖励类型视图对象 xskh_reward_type
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XskhRewardType.class)
|
||||
public class XskhRewardTypeVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
@ExcelProperty(value = "类型编码")
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
@ExcelProperty(value = "类型名称")
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 类型说明
|
||||
*/
|
||||
@ExcelProperty(value = "类型说明")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 状态(0-正常 1-停用)
|
||||
*/
|
||||
@ExcelProperty(value = "状态(0-正常 1-停用)", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_msg_status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@ExcelProperty(value = "排序号")
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
@ExcelProperty(value = "删除标志(0-未删除 1-已删除)")
|
||||
private Long deleted;
|
||||
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package org.dromara.xskh.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 学生考核-学生选项视图对象,用于下拉框选择
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
@Data
|
||||
public class XskhStudentOptionVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
private String studentNo;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
private Long collegeId;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
private String collegeName;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
private Long majorId;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
private String majorName;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
private String className;
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package org.dromara.xskh.mapper;
|
||||
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.xskh.domain.XskhDisciplineRecord;
|
||||
import org.dromara.xskh.domain.vo.XskhDisciplineRecordVo;
|
||||
import org.dromara.xskh.domain.vo.XskhStudentOptionVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学生违纪处分记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
public interface XskhDisciplineRecordMapper extends BaseMapperPlus<XskhDisciplineRecord, XskhDisciplineRecordVo> {
|
||||
|
||||
/**
|
||||
* 查询学生选项列表(用于下拉框)
|
||||
*
|
||||
* @param keyword 搜索关键词(学号或姓名)
|
||||
* @return 学生选项列表
|
||||
*/
|
||||
List<XskhStudentOptionVo> selectStudentOptions(String keyword);
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package org.dromara.xskh.mapper;
|
||||
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.xskh.domain.XskhDisciplineRevoke;
|
||||
import org.dromara.xskh.domain.vo.XskhDisciplineRevokeVo;
|
||||
|
||||
/**
|
||||
* 违纪处分撤销申请审批Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
public interface XskhDisciplineRevokeMapper extends BaseMapperPlus<XskhDisciplineRevoke, XskhDisciplineRevokeVo> {
|
||||
|
||||
/**
|
||||
* 根据违纪记录ID查询撤销申请记录
|
||||
*
|
||||
* @param disciplineRecordId 违纪记录ID
|
||||
* @return 撤销申请记录
|
||||
*/
|
||||
XskhDisciplineRevokeVo selectByDisciplineRecordId(Long disciplineRecordId);
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.dromara.xskh.mapper;
|
||||
|
||||
import org.dromara.xskh.domain.XskhDisciplineType;
|
||||
import org.dromara.xskh.domain.vo.XskhDisciplineTypeVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 学生违纪处分类型Mapper接口
|
||||
*
|
||||
* @author zlwu
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public interface XskhDisciplineTypeMapper extends BaseMapperPlus<XskhDisciplineType, XskhDisciplineTypeVo> {
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.dromara.xskh.mapper;
|
||||
|
||||
import org.dromara.xskh.domain.XskhRewardType;
|
||||
import org.dromara.xskh.domain.vo.XskhRewardTypeVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 学生奖励类型Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public interface XskhRewardTypeMapper extends BaseMapperPlus<XskhRewardType, XskhRewardTypeVo> {
|
||||
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package org.dromara.xskh.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.xskh.domain.bo.XskhDisciplineRecordBo;
|
||||
import org.dromara.xskh.domain.vo.XskhDisciplineRecordVo;
|
||||
import org.dromara.xskh.domain.vo.XskhStudentOptionVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学生违纪处分记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
public interface IXskhDisciplineRecordService {
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分记录
|
||||
*/
|
||||
XskhDisciplineRecordVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分记录列表
|
||||
*/
|
||||
TableDataInfo<XskhDisciplineRecordVo> queryPageList(XskhDisciplineRecordBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分记录列表
|
||||
*/
|
||||
List<XskhDisciplineRecordVo> queryList(XskhDisciplineRecordBo bo);
|
||||
|
||||
/**
|
||||
* 新增学生违纪处分记录
|
||||
*/
|
||||
Boolean insertByBo(XskhDisciplineRecordBo bo);
|
||||
|
||||
/**
|
||||
* 修改学生违纪处分记录
|
||||
*/
|
||||
Boolean updateByBo(XskhDisciplineRecordBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除学生违纪处分记录信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 查询学生选项列表(用于下拉框)
|
||||
*/
|
||||
List<XskhStudentOptionVo> getStudentOptions(String keyword);
|
||||
|
||||
/**
|
||||
* 查询当前登录学生的违纪处分记录列表
|
||||
*/
|
||||
TableDataInfo<XskhDisciplineRecordVo> queryMyPageList(XskhDisciplineRecordBo bo, PageQuery pageQuery);
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package org.dromara.xskh.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.xskh.domain.bo.XskhDisciplineRevokeBo;
|
||||
import org.dromara.xskh.domain.vo.XskhDisciplineRevokeVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 违纪处分撤销申请审批Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
public interface IXskhDisciplineRevokeService {
|
||||
|
||||
/**
|
||||
* 查询违纪处分撤销申请审批
|
||||
*/
|
||||
XskhDisciplineRevokeVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询违纪处分撤销申请审批列表
|
||||
*/
|
||||
TableDataInfo<XskhDisciplineRevokeVo> queryPageList(XskhDisciplineRevokeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询违纪处分撤销申请审批列表
|
||||
*/
|
||||
List<XskhDisciplineRevokeVo> queryList(XskhDisciplineRevokeBo bo);
|
||||
|
||||
/**
|
||||
* 新增违纪处分撤销申请审批
|
||||
*/
|
||||
Boolean insertByBo(XskhDisciplineRevokeBo bo);
|
||||
|
||||
/**
|
||||
* 修改违纪处分撤销申请审批
|
||||
*/
|
||||
Boolean updateByBo(XskhDisciplineRevokeBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除违纪处分撤销申请审批信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据违纪记录ID查询撤销申请记录
|
||||
*/
|
||||
XskhDisciplineRevokeVo queryByDisciplineRecordId(Long disciplineRecordId);
|
||||
|
||||
/**
|
||||
* 查询当前登录学生的撤销申请列表
|
||||
*/
|
||||
TableDataInfo<XskhDisciplineRevokeVo> queryMyPageList(XskhDisciplineRevokeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 学生申请撤销违纪记录
|
||||
*/
|
||||
Boolean applyRevoke(XskhDisciplineRevokeBo bo);
|
||||
|
||||
/**
|
||||
* 审核撤销申请
|
||||
*/
|
||||
Boolean approveRevoke(XskhDisciplineRevokeBo bo);
|
||||
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package org.dromara.xskh.service;
|
||||
|
||||
import org.dromara.xskh.domain.vo.XskhDisciplineTypeVo;
|
||||
import org.dromara.xskh.domain.bo.XskhDisciplineTypeBo;
|
||||
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-08-18
|
||||
*/
|
||||
public interface IXskhDisciplineTypeService {
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分类型
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 学生违纪处分类型
|
||||
*/
|
||||
XskhDisciplineTypeVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询学生违纪处分类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 学生违纪处分类型分页列表
|
||||
*/
|
||||
TableDataInfo<XskhDisciplineTypeVo> queryPageList(XskhDisciplineTypeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的学生违纪处分类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 学生违纪处分类型列表
|
||||
*/
|
||||
List<XskhDisciplineTypeVo> queryList(XskhDisciplineTypeBo bo);
|
||||
|
||||
/**
|
||||
* 新增学生违纪处分类型
|
||||
*
|
||||
* @param bo 学生违纪处分类型
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XskhDisciplineTypeBo bo);
|
||||
|
||||
/**
|
||||
* 修改学生违纪处分类型
|
||||
*
|
||||
* @param bo 学生违纪处分类型
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XskhDisciplineTypeBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除学生违纪处分类型信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package org.dromara.xskh.service;
|
||||
|
||||
import org.dromara.xskh.domain.vo.XskhRewardTypeVo;
|
||||
import org.dromara.xskh.domain.bo.XskhRewardTypeBo;
|
||||
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 Lion Li
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public interface IXskhRewardTypeService {
|
||||
|
||||
/**
|
||||
* 查询学生奖励类型
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 学生奖励类型
|
||||
*/
|
||||
XskhRewardTypeVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询学生奖励类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 学生奖励类型分页列表
|
||||
*/
|
||||
TableDataInfo<XskhRewardTypeVo> queryPageList(XskhRewardTypeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的学生奖励类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 学生奖励类型列表
|
||||
*/
|
||||
List<XskhRewardTypeVo> queryList(XskhRewardTypeBo bo);
|
||||
|
||||
/**
|
||||
* 新增学生奖励类型
|
||||
*
|
||||
* @param bo 学生奖励类型
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XskhRewardTypeBo bo);
|
||||
|
||||
/**
|
||||
* 修改学生奖励类型
|
||||
*
|
||||
* @param bo 学生奖励类型
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XskhRewardTypeBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除学生奖励类型信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
package org.dromara.xskh.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.xskh.domain.XskhDisciplineRecord;
|
||||
import org.dromara.xskh.domain.bo.XskhDisciplineRecordBo;
|
||||
import org.dromara.xskh.domain.vo.XskhDisciplineRecordVo;
|
||||
import org.dromara.xskh.domain.vo.XskhStudentOptionVo;
|
||||
import org.dromara.xskh.mapper.XskhDisciplineRecordMapper;
|
||||
import org.dromara.xskh.service.IXskhDisciplineRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 学生违纪处分记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XskhDisciplineRecordServiceImpl implements IXskhDisciplineRecordService {
|
||||
|
||||
private final XskhDisciplineRecordMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分记录
|
||||
*/
|
||||
@Override
|
||||
public XskhDisciplineRecordVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分记录列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XskhDisciplineRecordVo> queryPageList(XskhDisciplineRecordBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XskhDisciplineRecord> lqw = buildQueryWrapper(bo);
|
||||
Page<XskhDisciplineRecordVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<XskhDisciplineRecordVo> queryList(XskhDisciplineRecordBo bo) {
|
||||
LambdaQueryWrapper<XskhDisciplineRecord> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XskhDisciplineRecord> buildQueryWrapper(XskhDisciplineRecordBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XskhDisciplineRecord> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getStudentId() != null, XskhDisciplineRecord::getStudentId, bo.getStudentId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getStudentNo()), XskhDisciplineRecord::getStudentNo, bo.getStudentNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getStudentName()), XskhDisciplineRecord::getStudentName,
|
||||
bo.getStudentName());
|
||||
lqw.eq(bo.getCollegeId() != null, XskhDisciplineRecord::getCollegeId, bo.getCollegeId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCollegeName()), XskhDisciplineRecord::getCollegeName,
|
||||
bo.getCollegeName());
|
||||
lqw.eq(bo.getMajorId() != null, XskhDisciplineRecord::getMajorId, bo.getMajorId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getMajorName()), XskhDisciplineRecord::getMajorName, bo.getMajorName());
|
||||
lqw.eq(bo.getClassId() != null, XskhDisciplineRecord::getClassId, bo.getClassId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getClassName()), XskhDisciplineRecord::getClassName, bo.getClassName());
|
||||
lqw.eq(bo.getDisciplineTypeId() != null, XskhDisciplineRecord::getDisciplineTypeId, bo.getDisciplineTypeId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDisciplineTypeName()), XskhDisciplineRecord::getDisciplineTypeName,
|
||||
bo.getDisciplineTypeName());
|
||||
lqw.eq(bo.getDisciplineDate() != null, XskhDisciplineRecord::getDisciplineDate, bo.getDisciplineDate());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDisciplineReason()), XskhDisciplineRecord::getDisciplineReason,
|
||||
bo.getDisciplineReason());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDisciplineContent()), XskhDisciplineRecord::getDisciplineContent,
|
||||
bo.getDisciplineContent());
|
||||
lqw.eq(bo.getScoreDeduction() != null, XskhDisciplineRecord::getScoreDeduction, bo.getScoreDeduction());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), XskhDisciplineRecord::getStatus, bo.getStatus());
|
||||
lqw.orderByDesc(XskhDisciplineRecord::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生违纪处分记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XskhDisciplineRecordBo bo) {
|
||||
XskhDisciplineRecord add = MapstructUtils.convert(bo, XskhDisciplineRecord.class);
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
// 设置默认值
|
||||
if (StringUtils.isBlank(add.getStatus())) {
|
||||
add.setStatus("1"); // 默认生效
|
||||
}
|
||||
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生违纪处分记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XskhDisciplineRecordBo bo) {
|
||||
XskhDisciplineRecord update = MapstructUtils.convert(bo, XskhDisciplineRecord.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XskhDisciplineRecord entity) {
|
||||
// TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除学生违纪处分记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
// TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学生选项列表(用于下拉框)
|
||||
*/
|
||||
@Override
|
||||
public List<XskhStudentOptionVo> getStudentOptions(String keyword) {
|
||||
return baseMapper.selectStudentOptions(keyword);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前登录学生的违纪处分记录列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XskhDisciplineRecordVo> queryMyPageList(XskhDisciplineRecordBo bo, PageQuery pageQuery) {
|
||||
// 获取当前登录用户的学生ID
|
||||
Long currentUserId = LoginHelper.getUserId();
|
||||
|
||||
// 构建查询条件,强制只查询当前学生的记录
|
||||
LambdaQueryWrapper<XskhDisciplineRecord> lqw = Wrappers.lambdaQuery();
|
||||
|
||||
// 通过当前登录用户ID查询对应的学生记录,这里需要根据实际情况调整查询逻辑
|
||||
// 假设用户表中的ID就是学生ID,或者需要通过其他方式获取学生ID
|
||||
lqw.eq(XskhDisciplineRecord::getStudentId, currentUserId);
|
||||
|
||||
// 可选的其他查询条件(保持原有的查询逻辑,但学生ID已固定)
|
||||
lqw.like(StringUtils.isNotBlank(bo.getStudentNo()), XskhDisciplineRecord::getStudentNo, bo.getStudentNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getStudentName()), XskhDisciplineRecord::getStudentName,
|
||||
bo.getStudentName());
|
||||
lqw.eq(bo.getCollegeId() != null, XskhDisciplineRecord::getCollegeId, bo.getCollegeId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCollegeName()), XskhDisciplineRecord::getCollegeName,
|
||||
bo.getCollegeName());
|
||||
lqw.eq(bo.getMajorId() != null, XskhDisciplineRecord::getMajorId, bo.getMajorId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getMajorName()), XskhDisciplineRecord::getMajorName, bo.getMajorName());
|
||||
lqw.eq(bo.getClassId() != null, XskhDisciplineRecord::getClassId, bo.getClassId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getClassName()), XskhDisciplineRecord::getClassName, bo.getClassName());
|
||||
lqw.eq(bo.getDisciplineTypeId() != null, XskhDisciplineRecord::getDisciplineTypeId, bo.getDisciplineTypeId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDisciplineTypeName()), XskhDisciplineRecord::getDisciplineTypeName,
|
||||
bo.getDisciplineTypeName());
|
||||
lqw.eq(bo.getDisciplineDate() != null, XskhDisciplineRecord::getDisciplineDate, bo.getDisciplineDate());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDisciplineReason()), XskhDisciplineRecord::getDisciplineReason,
|
||||
bo.getDisciplineReason());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDisciplineContent()), XskhDisciplineRecord::getDisciplineContent,
|
||||
bo.getDisciplineContent());
|
||||
lqw.eq(bo.getScoreDeduction() != null, XskhDisciplineRecord::getScoreDeduction, bo.getScoreDeduction());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), XskhDisciplineRecord::getStatus, bo.getStatus());
|
||||
|
||||
lqw.orderByDesc(XskhDisciplineRecord::getCreateTime);
|
||||
|
||||
Page<XskhDisciplineRecordVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
}
|
||||
+220
@@ -0,0 +1,220 @@
|
||||
package org.dromara.xskh.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.xskh.domain.XskhDisciplineRevoke;
|
||||
import org.dromara.xskh.domain.bo.XskhDisciplineRevokeBo;
|
||||
import org.dromara.xskh.domain.vo.XskhDisciplineRevokeVo;
|
||||
import org.dromara.xskh.domain.vo.XskhDisciplineRecordVo;
|
||||
import org.dromara.xskh.mapper.XskhDisciplineRevokeMapper;
|
||||
import org.dromara.xskh.service.IXskhDisciplineRevokeService;
|
||||
import org.dromara.xskh.service.IXskhDisciplineRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 违纪处分撤销申请审批Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-03
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XskhDisciplineRevokeServiceImpl implements IXskhDisciplineRevokeService {
|
||||
|
||||
private final XskhDisciplineRevokeMapper baseMapper;
|
||||
private final IXskhDisciplineRecordService disciplineRecordService;
|
||||
|
||||
/**
|
||||
* 查询违纪处分撤销申请审批
|
||||
*/
|
||||
@Override
|
||||
public XskhDisciplineRevokeVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询违纪处分撤销申请审批列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XskhDisciplineRevokeVo> queryPageList(XskhDisciplineRevokeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XskhDisciplineRevoke> lqw = buildQueryWrapper(bo);
|
||||
Page<XskhDisciplineRevokeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询违纪处分撤销申请审批列表
|
||||
*/
|
||||
@Override
|
||||
public List<XskhDisciplineRevokeVo> queryList(XskhDisciplineRevokeBo bo) {
|
||||
LambdaQueryWrapper<XskhDisciplineRevoke> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XskhDisciplineRevoke> buildQueryWrapper(XskhDisciplineRevokeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XskhDisciplineRevoke> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getDisciplineRecordId() != null, XskhDisciplineRevoke::getDisciplineRecordId,
|
||||
bo.getDisciplineRecordId());
|
||||
lqw.eq(bo.getStudentId() != null, XskhDisciplineRevoke::getStudentId, bo.getStudentId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getStudentName()), XskhDisciplineRevoke::getStudentName,
|
||||
bo.getStudentName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getRevokeReason()), XskhDisciplineRevoke::getRevokeReason,
|
||||
bo.getRevokeReason());
|
||||
lqw.eq(bo.getApplyTime() != null, XskhDisciplineRevoke::getApplyTime, bo.getApplyTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), XskhDisciplineRevoke::getStatus, bo.getStatus());
|
||||
lqw.eq(bo.getApprovalBy() != null, XskhDisciplineRevoke::getApprovalBy, bo.getApprovalBy());
|
||||
lqw.eq(bo.getApprovalTime() != null, XskhDisciplineRevoke::getApprovalTime, bo.getApprovalTime());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getApprovalRemark()), XskhDisciplineRevoke::getApprovalRemark,
|
||||
bo.getApprovalRemark());
|
||||
lqw.orderByDesc(XskhDisciplineRevoke::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增违纪处分撤销申请审批
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XskhDisciplineRevokeBo bo) {
|
||||
XskhDisciplineRevoke add = MapstructUtils.convert(bo, XskhDisciplineRevoke.class);
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
// 设置默认值
|
||||
if (StringUtils.isBlank(add.getStatus())) {
|
||||
add.setStatus("1"); // 默认待审核
|
||||
}
|
||||
if (add.getApplyTime() == null) {
|
||||
add.setApplyTime(new Date());
|
||||
}
|
||||
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改违纪处分撤销申请审批
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XskhDisciplineRevokeBo bo) {
|
||||
XskhDisciplineRevoke update = MapstructUtils.convert(bo, XskhDisciplineRevoke.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XskhDisciplineRevoke entity) {
|
||||
// TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除违纪处分撤销申请审批
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
// TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据违纪记录ID查询撤销申请记录
|
||||
*/
|
||||
@Override
|
||||
public XskhDisciplineRevokeVo queryByDisciplineRecordId(Long disciplineRecordId) {
|
||||
return baseMapper.selectByDisciplineRecordId(disciplineRecordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前登录学生的撤销申请列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XskhDisciplineRevokeVo> queryMyPageList(XskhDisciplineRevokeBo bo, PageQuery pageQuery) {
|
||||
// 获取当前登录用户的学生ID
|
||||
Long currentUserId = LoginHelper.getUserId();
|
||||
|
||||
// 构建查询条件,强制只查询当前学生的记录
|
||||
LambdaQueryWrapper<XskhDisciplineRevoke> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(XskhDisciplineRevoke::getStudentId, currentUserId);
|
||||
|
||||
// 可选的其他查询条件
|
||||
lqw.eq(bo.getDisciplineRecordId() != null, XskhDisciplineRevoke::getDisciplineRecordId,
|
||||
bo.getDisciplineRecordId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getRevokeReason()), XskhDisciplineRevoke::getRevokeReason,
|
||||
bo.getRevokeReason());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), XskhDisciplineRevoke::getStatus, bo.getStatus());
|
||||
|
||||
lqw.orderByDesc(XskhDisciplineRevoke::getCreateTime);
|
||||
|
||||
Page<XskhDisciplineRevokeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生申请撤销违纪记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean applyRevoke(XskhDisciplineRevokeBo bo) {
|
||||
// 获取当前登录用户的学生ID
|
||||
Long currentUserId = LoginHelper.getUserId();
|
||||
|
||||
// 检查该违纪记录是否已经有撤销申请
|
||||
XskhDisciplineRevokeVo existingRevoke = queryByDisciplineRecordId(bo.getDisciplineRecordId());
|
||||
if (existingRevoke != null) {
|
||||
throw new RuntimeException("该违纪记录已有撤销申请,不能重复申请");
|
||||
}
|
||||
|
||||
// 查询违纪记录,获取学生信息
|
||||
XskhDisciplineRecordVo disciplineRecord = disciplineRecordService.queryById(bo.getDisciplineRecordId());
|
||||
if (disciplineRecord == null) {
|
||||
throw new RuntimeException("违纪记录不存在");
|
||||
}
|
||||
|
||||
// 验证当前用户是否有权限撤销该记录(检查是否是该记录的学生)
|
||||
if (!currentUserId.equals(disciplineRecord.getStudentId())) {
|
||||
throw new RuntimeException("您只能申请撤销自己的违纪记录");
|
||||
}
|
||||
|
||||
// 设置学生信息
|
||||
bo.setStudentId(currentUserId);
|
||||
bo.setStudentName(disciplineRecord.getStudentName());
|
||||
bo.setDisciplineRecordId(bo.getDisciplineRecordId());
|
||||
bo.setStatus("1"); // 待审核
|
||||
bo.setApplyTime(new Date());
|
||||
|
||||
return insertByBo(bo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核撤销申请
|
||||
*/
|
||||
@Override
|
||||
public Boolean approveRevoke(XskhDisciplineRevokeBo bo) {
|
||||
// 获取当前登录用户ID作为审核人
|
||||
Long currentUserId = LoginHelper.getUserId();
|
||||
|
||||
bo.setApprovalBy(currentUserId);
|
||||
bo.setApprovalTime(new Date());
|
||||
|
||||
return updateByBo(bo);
|
||||
}
|
||||
|
||||
}
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
package org.dromara.xskh.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.xskh.domain.bo.XskhDisciplineTypeBo;
|
||||
import org.dromara.xskh.domain.vo.XskhDisciplineTypeVo;
|
||||
import org.dromara.xskh.domain.XskhDisciplineType;
|
||||
import org.dromara.xskh.mapper.XskhDisciplineTypeMapper;
|
||||
import org.dromara.xskh.service.IXskhDisciplineTypeService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 学生违纪处分类型Service业务层处理
|
||||
*
|
||||
* @author zlwu
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XskhDisciplineTypeServiceImpl implements IXskhDisciplineTypeService {
|
||||
|
||||
private final XskhDisciplineTypeMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分类型
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 学生违纪处分类型
|
||||
*/
|
||||
@Override
|
||||
public XskhDisciplineTypeVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询学生违纪处分类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 学生违纪处分类型分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XskhDisciplineTypeVo> queryPageList(XskhDisciplineTypeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XskhDisciplineType> lqw = buildQueryWrapper(bo);
|
||||
Page<XskhDisciplineTypeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的学生违纪处分类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 学生违纪处分类型列表
|
||||
*/
|
||||
@Override
|
||||
public List<XskhDisciplineTypeVo> queryList(XskhDisciplineTypeBo bo) {
|
||||
LambdaQueryWrapper<XskhDisciplineType> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XskhDisciplineType> buildQueryWrapper(XskhDisciplineTypeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XskhDisciplineType> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(XskhDisciplineType::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTypeCode()), XskhDisciplineType::getTypeCode, bo.getTypeCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getTypeName()), XskhDisciplineType::getTypeName, bo.getTypeName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTypeCategory()), XskhDisciplineType::getTypeCategory, bo.getTypeCategory());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), XskhDisciplineType::getStatus, bo.getStatus());
|
||||
lqw.eq(bo.getSortOrder() != null, XskhDisciplineType::getSortOrder, bo.getSortOrder());
|
||||
lqw.eq(bo.getDeleted() != null, XskhDisciplineType::getDeleted, bo.getDeleted());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生违纪处分类型
|
||||
*
|
||||
* @param bo 学生违纪处分类型
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XskhDisciplineTypeBo bo) {
|
||||
XskhDisciplineType add = MapstructUtils.convert(bo, XskhDisciplineType.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生违纪处分类型
|
||||
*
|
||||
* @param bo 学生违纪处分类型
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XskhDisciplineTypeBo bo) {
|
||||
XskhDisciplineType update = MapstructUtils.convert(bo, XskhDisciplineType.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XskhDisciplineType entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除学生违纪处分类型信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
package org.dromara.xskh.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.xskh.domain.bo.XskhRewardTypeBo;
|
||||
import org.dromara.xskh.domain.vo.XskhRewardTypeVo;
|
||||
import org.dromara.xskh.domain.XskhRewardType;
|
||||
import org.dromara.xskh.mapper.XskhRewardTypeMapper;
|
||||
import org.dromara.xskh.service.IXskhRewardTypeService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 学生奖励类型Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XskhRewardTypeServiceImpl implements IXskhRewardTypeService {
|
||||
|
||||
private final XskhRewardTypeMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询学生奖励类型
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 学生奖励类型
|
||||
*/
|
||||
@Override
|
||||
public XskhRewardTypeVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询学生奖励类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 学生奖励类型分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XskhRewardTypeVo> queryPageList(XskhRewardTypeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XskhRewardType> lqw = buildQueryWrapper(bo);
|
||||
Page<XskhRewardTypeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的学生奖励类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 学生奖励类型列表
|
||||
*/
|
||||
@Override
|
||||
public List<XskhRewardTypeVo> queryList(XskhRewardTypeBo bo) {
|
||||
LambdaQueryWrapper<XskhRewardType> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XskhRewardType> buildQueryWrapper(XskhRewardTypeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XskhRewardType> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(XskhRewardType::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTypeCode()), XskhRewardType::getTypeCode, bo.getTypeCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getTypeName()), XskhRewardType::getTypeName, bo.getTypeName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDescription()), XskhRewardType::getDescription, bo.getDescription());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), XskhRewardType::getStatus, bo.getStatus());
|
||||
lqw.eq(bo.getSortOrder() != null, XskhRewardType::getSortOrder, bo.getSortOrder());
|
||||
lqw.eq(bo.getDeleted() != null, XskhRewardType::getDeleted, bo.getDeleted());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生奖励类型
|
||||
*
|
||||
* @param bo 学生奖励类型
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XskhRewardTypeBo bo) {
|
||||
XskhRewardType add = MapstructUtils.convert(bo, XskhRewardType.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生奖励类型
|
||||
*
|
||||
* @param bo 学生奖励类型
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XskhRewardTypeBo bo) {
|
||||
XskhRewardType update = MapstructUtils.convert(bo, XskhRewardType.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XskhRewardType entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除学生奖励类型信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
<?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.xskh.mapper.XskhDisciplineRecordMapper">
|
||||
|
||||
<resultMap type="XskhDisciplineRecord" id="XskhDisciplineRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="studentId" column="student_id" />
|
||||
<result property="studentNo" column="student_no" />
|
||||
<result property="studentName" column="student_name" />
|
||||
<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="classId" column="class_id" />
|
||||
<result property="className" column="class_name" />
|
||||
<result property="disciplineTypeId" column="discipline_type_id" />
|
||||
<result property="disciplineTypeName" column="discipline_type_name" />
|
||||
<result property="disciplineDate" column="discipline_date" />
|
||||
<result property="disciplineReason" column="discipline_reason" />
|
||||
<result property="disciplineContent" column="discipline_content" />
|
||||
<result property="scoreDeduction" column="score_deduction" />
|
||||
<result property="status" column="status" />
|
||||
<result property="approvalStatus" column="approval_status" />
|
||||
<result property="approvalBy" column="approval_by" />
|
||||
<result property="approvalTime" column="approval_time" />
|
||||
<result property="approvalRemark" column="approval_remark" />
|
||||
<result property="attachmentOssIds" column="attachment_oss_ids" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createDept" column="create_dept" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="deleted" column="deleted" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="XskhStudentOptionVo" id="StudentOptionResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="studentNo" column="student_no" />
|
||||
<result property="name" column="name" />
|
||||
<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="classId" column="class_id" />
|
||||
<result property="className" column="class_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectXskhDisciplineRecordVo">
|
||||
select id, student_id, student_no, student_name, college_id, college_name, major_id, major_name, class_id, class_name, discipline_type_id, discipline_type_name, discipline_date, discipline_reason, discipline_content, score_deduction, status, approval_status, approval_by, approval_time, approval_remark, attachment_oss_ids, create_by, create_time, create_dept, update_by, update_time, deleted, tenant_id from xskh_discipline_record
|
||||
</sql>
|
||||
|
||||
<select id="selectStudentOptions" parameterType="String" resultMap="StudentOptionResult">
|
||||
select
|
||||
id, student_no, name, college_id, college_name,
|
||||
major_id, major_name, class_id, class_name
|
||||
from xg_student_msg
|
||||
where deleted = 0
|
||||
and student_status = 1
|
||||
<if test="keyword != null and keyword != ''">
|
||||
and (student_no like concat('%', #{keyword}, '%')
|
||||
or name like concat('%', #{keyword}, '%'))
|
||||
</if>
|
||||
order by student_no
|
||||
limit 50
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
<?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.xskh.mapper.XskhDisciplineRevokeMapper">
|
||||
|
||||
<resultMap type="XskhDisciplineRevoke" id="XskhDisciplineRevokeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="disciplineRecordId" column="discipline_record_id" />
|
||||
<result property="studentId" column="student_id" />
|
||||
<result property="studentName" column="student_name" />
|
||||
<result property="revokeReason" column="revoke_reason" />
|
||||
<result property="revokeEvidence" column="revoke_evidence" />
|
||||
<result property="applyTime" column="apply_time" />
|
||||
<result property="status" column="status" />
|
||||
<result property="approvalBy" column="approval_by" />
|
||||
<result property="approvalTime" column="approval_time" />
|
||||
<result property="approvalRemark" column="approval_remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createDept" column="create_dept" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="deleted" column="deleted" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectXskhDisciplineRevokeVo">
|
||||
select id, discipline_record_id, student_id, student_name, revoke_reason, revoke_evidence, apply_time, status, approval_by, approval_time, approval_remark, create_by, create_time, create_dept, update_by, update_time, deleted, tenant_id from xskh_discipline_revoke
|
||||
</sql>
|
||||
|
||||
<select id="selectByDisciplineRecordId" parameterType="Long" resultType="XskhDisciplineRevokeVo">
|
||||
<include refid="selectXskhDisciplineRevokeVo"/>
|
||||
where discipline_record_id = #{disciplineRecordId}
|
||||
and deleted = 0
|
||||
limit 1
|
||||
</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.xskh.mapper.XskhDisciplineTypeMapper">
|
||||
|
||||
</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.xskh.mapper.XskhRewardTypeMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -18,8 +18,7 @@ INSERT INTO `sys_dict_type` (`id`, `dict_name`, `dict_type`, `status`, `create_b
|
||||
|
||||
INSERT INTO `sys_dict_data` (`id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(10003, 1, '生效', '1', 'student_discipline_status', '', 'success', 'Y', '0', 1, NOW(), NULL, NULL, '违纪处分记录生效'),
|
||||
(10004, 2, '撤销申请中', '2', 'student_discipline_status', '', 'warning', 'N', '0', 1, NOW(), NULL, NULL, '撤销申请审核中'),
|
||||
(10005, 3, '已撤销', '3', 'student_discipline_status', '', 'info', 'N', '0', 1, NOW(), NULL, NULL, '违纪处分记录已撤销');
|
||||
(10005, 2, '已撤销', '2', 'student_discipline_status', '', 'info', 'N', '0', 1, NOW(), NULL, NULL, '违纪处分记录已撤销');
|
||||
|
||||
-- 3. 撤销申请状态字典
|
||||
INSERT INTO `sys_dict_type` (`id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
@@ -30,17 +29,6 @@ INSERT INTO `sys_dict_data` (`id`, `dict_sort`, `dict_label`, `dict_value`, `dic
|
||||
(10007, 2, '审核通过', '2', 'student_revoke_status', '', 'success', 'N', '0', 1, NOW(), NULL, NULL, '撤销申请审核通过'),
|
||||
(10008, 3, '审核拒绝', '3', 'student_revoke_status', '', 'danger', 'N', '0', 1, NOW(), NULL, NULL, '撤销申请审核拒绝');
|
||||
|
||||
-- 4. 考核指标类型字典
|
||||
INSERT INTO `sys_dict_type` (`id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(1004, '考核指标类型', 'student_indicator_type', '0', 1, NOW(), NULL, NULL, '学生考核指标类型');
|
||||
|
||||
INSERT INTO `sys_dict_data` (`id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(10009, 1, '德育', '1', 'student_indicator_type', '', 'primary', 'Y', '0', 1, NOW(), NULL, NULL, '德育指标'),
|
||||
(10010, 2, '智育', '2', 'student_indicator_type', '', 'success', 'N', '0', 1, NOW(), NULL, NULL, '智育指标'),
|
||||
(10011, 3, '体育', '3', 'student_indicator_type', '', 'warning', 'N', '0', 1, NOW(), NULL, NULL, '体育指标'),
|
||||
(10012, 4, '美育', '4', 'student_indicator_type', '', 'info', 'N', '0', 1, NOW(), NULL, NULL, '美育指标'),
|
||||
(10013, 5, '劳动', '5', 'student_indicator_type', '', 'danger', 'N', '0', 1, NOW(), NULL, NULL, '劳动指标');
|
||||
|
||||
-- 5. 考核计划状态字典
|
||||
INSERT INTO `sys_dict_type` (`id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(1005, '考核计划状态', 'student_schedule_status', '0', 1, NOW(), NULL, NULL, '学生考核计划状态');
|
||||
@@ -58,8 +46,6 @@ INSERT INTO `sys_dict_data` (`id`, `dict_sort`, `dict_label`, `dict_value`, `dic
|
||||
(10017, 1, '草稿', '1', 'student_assessment_status', '', 'info', 'Y', '0', 1, NOW(), NULL, NULL, '考核申请草稿'),
|
||||
(10018, 2, '已提交', '2', 'student_assessment_status', '', 'primary', 'N', '0', 1, NOW(), NULL, NULL, '考核申请已提交'),
|
||||
(10019, 3, '班主任审核', '3', 'student_assessment_status', '', 'warning', 'N', '0', 1, NOW(), NULL, NULL, '班主任审核中'),
|
||||
(10020, 4, '学院审核', '4', 'student_assessment_status', '', 'warning', 'N', '0', 1, NOW(), NULL, NULL, '学院审核中'),
|
||||
(10021, 5, '学校审核', '5', 'student_assessment_status', '', 'warning', 'N', '0', 1, NOW(), NULL, NULL, '学校审核中'),
|
||||
(10022, 6, '已完成', '6', 'student_assessment_status', '', 'success', 'N', '0', 1, NOW(), NULL, NULL, '考核申请已完成');
|
||||
|
||||
-- 7. 附加分审核状态字典
|
||||
@@ -81,8 +67,8 @@ INSERT INTO `sys_dict_data` (`id`, `dict_sort`, `dict_label`, `dict_value`, `dic
|
||||
|
||||
-- 9. 通用状态字典(启用/禁用)
|
||||
INSERT INTO `sys_dict_type` (`id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(1009, '通用状态', 'common_status', '0', 1, NOW(), NULL, NULL, '通用启用禁用状态');
|
||||
(1009, '通用状态', 'sys_msg_status', '0', 1, NOW(), NULL, NULL, '通用启用禁用状态');
|
||||
|
||||
INSERT INTO `sys_dict_data` (`id`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
|
||||
(10028, 1, '启用', '0', 'common_status', '', 'success', 'Y', '0', 1, NOW(), NULL, NULL, '启用状态'),
|
||||
(10029, 2, '禁用', '1', 'common_status', '', 'danger', 'N', '0', 1, NOW(), NULL, NULL, '禁用状态');
|
||||
(10028, 1, '启用', '0', 'sys_msg_status', '', 'success', 'Y', '0', 1, NOW(), NULL, NULL, '启用状态'),
|
||||
(10029, 2, '禁用', '1', 'sys_msg_status', '', 'danger', 'N', '0', 1, NOW(), NULL, NULL, '禁用状态');
|
||||
@@ -42,15 +42,12 @@ CREATE TABLE `xskh_discipline_record` (
|
||||
`class_name` varchar(100) NOT NULL COMMENT '班级名称',
|
||||
`discipline_type_id` bigint(20) NOT NULL COMMENT '违纪处分类型ID',
|
||||
`discipline_type_name` varchar(100) NOT NULL COMMENT '违纪处分类型名称',
|
||||
`discipline_date` date NOT NULL COMMENT '违纪处分日期',
|
||||
`discipline_date` DATETIME NOT NULL COMMENT '违纪处分日期',
|
||||
`discipline_reason` varchar(500) NOT NULL COMMENT '违纪处分原因',
|
||||
`discipline_content` varchar(500) DEFAULT NULL COMMENT '违纪处分内容',
|
||||
`score_deduction` decimal(5,2) DEFAULT 0.00 COMMENT '扣分分值',
|
||||
`status` char(1) DEFAULT '1' COMMENT '状态(1-生效 2-已撤销)',
|
||||
`approval_status` char(1) DEFAULT '1' COMMENT '审批状态(1-已审批 2-审批中)',
|
||||
`approval_by` bigint(20) DEFAULT NULL COMMENT '审批人ID',
|
||||
`approval_time` datetime DEFAULT NULL COMMENT '审批时间',
|
||||
`approval_remark` varchar(500) DEFAULT NULL COMMENT '审批备注',
|
||||
`attachment_oss_ids` varchar(1000) DEFAULT NULL COMMENT '附件OSS文件ID,多个用逗号分隔(申请材料、证明文件等)',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
@@ -74,7 +71,7 @@ CREATE TABLE `xskh_discipline_revoke` (
|
||||
`student_id` bigint(20) NOT NULL COMMENT '学生ID',
|
||||
`student_name` varchar(50) NOT NULL COMMENT '学生姓名',
|
||||
`revoke_reason` varchar(500) NOT NULL COMMENT '撤销申请原因',
|
||||
`revoke_evidence` varchar(500) DEFAULT NULL COMMENT '撤销证明材料',
|
||||
`revoke_evidence` varchar(500) DEFAULT NULL COMMENT '撤销证明材料,附件的oss_id,多个用逗号分隔',
|
||||
`apply_time` datetime NOT NULL COMMENT '申请时间',
|
||||
`status` char(1) DEFAULT '1' COMMENT '状态(1-待审核 2-审核通过 3-审核拒绝)',
|
||||
`approval_by` bigint(20) DEFAULT NULL COMMENT '审核人ID',
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DisciplineRecordVO, DisciplineRecordForm, DisciplineRecordQuery, XskhStudentOptionVO } from './disciplineRecord/types';
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分记录列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listDisciplineRecord = (query?: DisciplineRecordQuery): AxiosPromise<DisciplineRecordVO[]> => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分记录详细
|
||||
* @param id
|
||||
*/
|
||||
export const getDisciplineRecord = (id: string | number): AxiosPromise<DisciplineRecordVO> => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增学生违纪处分记录
|
||||
* @param data
|
||||
*/
|
||||
export const addDisciplineRecord = (data: DisciplineRecordForm) => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改学生违纪处分记录
|
||||
* @param data
|
||||
*/
|
||||
export const updateDisciplineRecord = (data: DisciplineRecordForm) => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除学生违纪处分记录
|
||||
* @param id
|
||||
*/
|
||||
export const delDisciplineRecord = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询学生选项列表(用于下拉框)
|
||||
* @param keyword
|
||||
*/
|
||||
export const getStudentOptions = (keyword?: string): AxiosPromise<XskhStudentOptionVO[]> => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord/studentOptions',
|
||||
method: 'get',
|
||||
params: { keyword }
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询当前登录学生的违纪处分记录列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const listMyDisciplineRecord = (query?: DisciplineRecordQuery): AxiosPromise<DisciplineRecordVO[]> => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord/my',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,403 @@
|
||||
import { PageQuery } from '@/types/base';
|
||||
|
||||
export interface DisciplineRecordVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId: string | number;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo: string;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className: string;
|
||||
|
||||
/**
|
||||
* 违纪处分类型ID
|
||||
*/
|
||||
disciplineTypeId: string | number;
|
||||
|
||||
/**
|
||||
* 违纪处分类型名称
|
||||
*/
|
||||
disciplineTypeName: string;
|
||||
|
||||
/**
|
||||
* 违纪处分日期
|
||||
*/
|
||||
disciplineDate: string;
|
||||
|
||||
/**
|
||||
* 违纪处分原因
|
||||
*/
|
||||
disciplineReason: string;
|
||||
|
||||
/**
|
||||
* 违纪处分内容
|
||||
*/
|
||||
disciplineContent: string;
|
||||
|
||||
/**
|
||||
* 扣分分值
|
||||
*/
|
||||
scoreDeduction: number;
|
||||
|
||||
/**
|
||||
* 状态(1-生效 2-已撤销)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 审批状态(1-已审批 2-审批中)
|
||||
*/
|
||||
approvalStatus: string;
|
||||
|
||||
/**
|
||||
* 审批人ID
|
||||
*/
|
||||
approvalBy: string | number;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
approvalTime: string;
|
||||
|
||||
/**
|
||||
* 审批备注
|
||||
*/
|
||||
approvalRemark: string;
|
||||
|
||||
/**
|
||||
* 附件OSS ID列表,逗号分隔
|
||||
*/
|
||||
attachmentOssIds: string;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
createBy: string | number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
updateBy: string | number;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updateTime: string;
|
||||
}
|
||||
|
||||
export interface DisciplineRecordForm {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId?: string | number;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo?: string;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName?: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId?: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId?: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分类型ID
|
||||
*/
|
||||
disciplineTypeId?: string | number;
|
||||
|
||||
/**
|
||||
* 违纪处分类型名称
|
||||
*/
|
||||
disciplineTypeName?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分日期
|
||||
*/
|
||||
disciplineDate?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分原因
|
||||
*/
|
||||
disciplineReason?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分内容
|
||||
*/
|
||||
disciplineContent?: string;
|
||||
|
||||
/**
|
||||
* 扣分分值
|
||||
*/
|
||||
scoreDeduction?: number;
|
||||
|
||||
/**
|
||||
* 状态(1-生效 2-已撤销)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 审批状态(1-已审批 2-审批中)
|
||||
*/
|
||||
approvalStatus?: string;
|
||||
|
||||
/**
|
||||
* 审批人ID
|
||||
*/
|
||||
approvalBy?: string | number;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
approvalTime?: string;
|
||||
|
||||
/**
|
||||
* 审批备注
|
||||
*/
|
||||
approvalRemark?: string;
|
||||
|
||||
/**
|
||||
* 附件OSS ID列表,逗号分隔
|
||||
*/
|
||||
attachmentOssIds?: string;
|
||||
}
|
||||
|
||||
export interface DisciplineRecordQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId?: string | number;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo?: string;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName?: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId?: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId?: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分类型ID
|
||||
*/
|
||||
disciplineTypeId?: string | number;
|
||||
|
||||
/**
|
||||
* 违纪处分类型名称
|
||||
*/
|
||||
disciplineTypeName?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分日期
|
||||
*/
|
||||
disciplineDate?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分原因
|
||||
*/
|
||||
disciplineReason?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分内容
|
||||
*/
|
||||
disciplineContent?: string;
|
||||
|
||||
/**
|
||||
* 扣分分值
|
||||
*/
|
||||
scoreDeduction?: number;
|
||||
|
||||
/**
|
||||
* 状态(1-生效 2-已撤销)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 审批状态(1-已审批 2-审批中)
|
||||
*/
|
||||
approvalStatus?: string;
|
||||
|
||||
/**
|
||||
* 审批人ID
|
||||
*/
|
||||
approvalBy?: string | number;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
approvalTime?: string;
|
||||
|
||||
/**
|
||||
* 审批备注
|
||||
*/
|
||||
approvalRemark?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生考核-学生选项
|
||||
*/
|
||||
export interface XskhStudentOptionVO {
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo: string;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className: string;
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DisciplineRevokeVO, DisciplineRevokeForm, DisciplineRevokeQuery } from './types';
|
||||
|
||||
/**
|
||||
* 查询违纪处分撤销申请审批列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const listDisciplineRevoke = (query?: DisciplineRevokeQuery): AxiosPromise<DisciplineRevokeVO[]> => {
|
||||
return request({
|
||||
url: '/disciplineRevoke/disciplineRevoke/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询违纪处分撤销申请审批详细
|
||||
* @param id
|
||||
*/
|
||||
export const getDisciplineRevoke = (id: string | number): AxiosPromise<DisciplineRevokeVO> => {
|
||||
return request({
|
||||
url: '/disciplineRevoke/disciplineRevoke/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增违纪处分撤销申请审批
|
||||
* @param data
|
||||
*/
|
||||
export const addDisciplineRevoke = (data: DisciplineRevokeForm) => {
|
||||
return request({
|
||||
url: '/disciplineRevoke/disciplineRevoke',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改违纪处分撤销申请审批
|
||||
* @param data
|
||||
*/
|
||||
export const updateDisciplineRevoke = (data: DisciplineRevokeForm) => {
|
||||
return request({
|
||||
url: '/disciplineRevoke/disciplineRevoke',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除违纪处分撤销申请审批
|
||||
* @param id
|
||||
*/
|
||||
export const delDisciplineRevoke = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/disciplineRevoke/disciplineRevoke/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据违纪记录ID查询撤销申请记录
|
||||
* @param disciplineRecordId 违纪记录ID
|
||||
*/
|
||||
export const getDisciplineRevokeByRecordId = (disciplineRecordId: string | number): AxiosPromise<DisciplineRevokeVO> => {
|
||||
return request({
|
||||
url: '/disciplineRevoke/disciplineRevoke/byDisciplineRecord/' + disciplineRecordId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询当前登录学生的撤销申请列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const listMyDisciplineRevoke = (query?: DisciplineRevokeQuery): AxiosPromise<DisciplineRevokeVO[]> => {
|
||||
return request({
|
||||
url: '/disciplineRevoke/disciplineRevoke/my',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 学生申请撤销违纪记录
|
||||
* @param data
|
||||
*/
|
||||
export const applyDisciplineRevoke = (data: DisciplineRevokeForm) => {
|
||||
return request({
|
||||
url: '/disciplineRevoke/disciplineRevoke/apply',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 审核撤销申请
|
||||
* @param data
|
||||
*/
|
||||
export const approveDisciplineRevoke = (data: DisciplineRevokeForm) => {
|
||||
return request({
|
||||
url: '/disciplineRevoke/disciplineRevoke/approve',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,187 @@
|
||||
import { PageQuery } from '@/types/base';
|
||||
|
||||
export interface DisciplineRevokeVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 违纪记录ID
|
||||
*/
|
||||
disciplineRecordId: string | number;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId: string | number;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName: string;
|
||||
|
||||
/**
|
||||
* 撤销申请原因
|
||||
*/
|
||||
revokeReason: string;
|
||||
|
||||
/**
|
||||
* 撤销证明材料,附件的oss_id,多个用逗号分隔
|
||||
*/
|
||||
revokeEvidence: string;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
applyTime: string;
|
||||
|
||||
/**
|
||||
* 状态(1-待审核 2-审核通过 3-审核拒绝)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
approvalBy: string | number;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
approvalTime: string;
|
||||
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
approvalRemark: string;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
createBy: string | number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
updateBy: string | number;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updateTime: string;
|
||||
}
|
||||
|
||||
export interface DisciplineRevokeForm {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 违纪记录ID
|
||||
*/
|
||||
disciplineRecordId?: string | number;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId?: string | number;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName?: string;
|
||||
|
||||
/**
|
||||
* 撤销申请原因
|
||||
*/
|
||||
revokeReason?: string;
|
||||
|
||||
/**
|
||||
* 撤销证明材料,附件的oss_id,多个用逗号分隔
|
||||
*/
|
||||
revokeEvidence?: string;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
applyTime?: string;
|
||||
|
||||
/**
|
||||
* 状态(1-待审核 2-审核通过 3-审核拒绝)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
approvalBy?: string | number;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
approvalTime?: string;
|
||||
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
approvalRemark?: string;
|
||||
}
|
||||
|
||||
export interface DisciplineRevokeQuery extends PageQuery {
|
||||
/**
|
||||
* 违纪记录ID
|
||||
*/
|
||||
disciplineRecordId?: string | number;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId?: string | number;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName?: string;
|
||||
|
||||
/**
|
||||
* 撤销申请原因
|
||||
*/
|
||||
revokeReason?: string;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
applyTime?: string;
|
||||
|
||||
/**
|
||||
* 状态(1-待审核 2-审核通过 3-审核拒绝)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
approvalBy?: string | number;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
approvalTime?: string;
|
||||
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
approvalRemark?: string;
|
||||
|
||||
/**
|
||||
* 其他参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DisciplineTypeVO, DisciplineTypeForm, DisciplineTypeQuery } from '@/api/xskh/disciplineType/disciplineType/types';
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分类型列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listDisciplineType = (query?: DisciplineTypeQuery): AxiosPromise<DisciplineTypeVO[]> => {
|
||||
return request({
|
||||
url: '/disciplineType/disciplineType/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分类型详细
|
||||
* @param id
|
||||
*/
|
||||
export const getDisciplineType = (id: string | number): AxiosPromise<DisciplineTypeVO> => {
|
||||
return request({
|
||||
url: '/disciplineType/disciplineType/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增学生违纪处分类型
|
||||
* @param data
|
||||
*/
|
||||
export const addDisciplineType = (data: DisciplineTypeForm) => {
|
||||
return request({
|
||||
url: '/disciplineType/disciplineType',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改学生违纪处分类型
|
||||
* @param data
|
||||
*/
|
||||
export const updateDisciplineType = (data: DisciplineTypeForm) => {
|
||||
return request({
|
||||
url: '/disciplineType/disciplineType',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除学生违纪处分类型
|
||||
* @param id
|
||||
*/
|
||||
export const delDisciplineType = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/disciplineType/disciplineType/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,126 @@
|
||||
export interface DisciplineTypeVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
typeCode: string;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
typeName: string;
|
||||
|
||||
/**
|
||||
* 类型分类(1-违纪类型 2-处分类型)
|
||||
*/
|
||||
typeCategory: string;
|
||||
|
||||
/**
|
||||
* 类型说明
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 状态(0-正常 1-停用)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
sortOrder: number;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
deleted: number;
|
||||
|
||||
}
|
||||
|
||||
export interface DisciplineTypeForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
typeCode?: string;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
typeName?: string;
|
||||
|
||||
/**
|
||||
* 类型分类(1-违纪类型 2-处分类型)
|
||||
*/
|
||||
typeCategory?: string;
|
||||
|
||||
/**
|
||||
* 类型说明
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 状态(0-正常 1-停用)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
sortOrder?: number;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
deleted?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface DisciplineTypeQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
typeCode?: string;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
typeName?: string;
|
||||
|
||||
/**
|
||||
* 类型分类(1-违纪类型 2-处分类型)
|
||||
*/
|
||||
typeCategory?: string;
|
||||
|
||||
/**
|
||||
* 状态(0-正常 1-停用)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
sortOrder?: number;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
deleted?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { RewardTypeVO, RewardTypeForm, RewardTypeQuery } from '@/api/xskh/rewardType/rewardType/types';
|
||||
|
||||
/**
|
||||
* 查询学生奖励类型列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listRewardType = (query?: RewardTypeQuery): AxiosPromise<RewardTypeVO[]> => {
|
||||
return request({
|
||||
url: '/rewardType/rewardType/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询学生奖励类型详细
|
||||
* @param id
|
||||
*/
|
||||
export const getRewardType = (id: string | number): AxiosPromise<RewardTypeVO> => {
|
||||
return request({
|
||||
url: '/rewardType/rewardType/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增学生奖励类型
|
||||
* @param data
|
||||
*/
|
||||
export const addRewardType = (data: RewardTypeForm) => {
|
||||
return request({
|
||||
url: '/rewardType/rewardType',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改学生奖励类型
|
||||
* @param data
|
||||
*/
|
||||
export const updateRewardType = (data: RewardTypeForm) => {
|
||||
return request({
|
||||
url: '/rewardType/rewardType',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除学生奖励类型
|
||||
* @param id
|
||||
*/
|
||||
export const delRewardType = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/rewardType/rewardType/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,116 @@
|
||||
export interface RewardTypeVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
typeCode: string;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
typeName: string;
|
||||
|
||||
/**
|
||||
* 类型说明
|
||||
*/
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* 状态(0-正常 1-停用)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
sortOrder: number;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
deleted: number;
|
||||
|
||||
}
|
||||
|
||||
export interface RewardTypeForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
typeCode?: string;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
typeName?: string;
|
||||
|
||||
/**
|
||||
* 类型说明
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* 状态(0-正常 1-停用)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
sortOrder?: number;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
deleted?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface RewardTypeQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
typeCode?: string;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
typeName?: string;
|
||||
|
||||
/**
|
||||
* 类型说明
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* 状态(0-正常 1-停用)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
sortOrder?: number;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
deleted?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DisciplineRecordVO, DisciplineRecordForm, DisciplineRecordQuery, XskhStudentOptionVO } from './xsDisciplineRecord/types';
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分记录列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listDisciplineRecord = (query?: DisciplineRecordQuery): AxiosPromise<DisciplineRecordVO[]> => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分记录详细
|
||||
* @param id
|
||||
*/
|
||||
export const getDisciplineRecord = (id: string | number): AxiosPromise<DisciplineRecordVO> => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增学生违纪处分记录
|
||||
* @param data
|
||||
*/
|
||||
export const addDisciplineRecord = (data: DisciplineRecordForm) => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改学生违纪处分记录
|
||||
* @param data
|
||||
*/
|
||||
export const updateDisciplineRecord = (data: DisciplineRecordForm) => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除学生违纪处分记录
|
||||
* @param id
|
||||
*/
|
||||
export const delDisciplineRecord = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询学生选项列表(用于下拉框)
|
||||
* @param keyword
|
||||
*/
|
||||
export const getStudentOptions = (keyword?: string): AxiosPromise<XskhStudentOptionVO[]> => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord/studentOptions',
|
||||
method: 'get',
|
||||
params: { keyword }
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,403 @@
|
||||
import { PageQuery } from '@/types/base';
|
||||
|
||||
export interface DisciplineRecordVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId: string | number;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo: string;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className: string;
|
||||
|
||||
/**
|
||||
* 违纪处分类型ID
|
||||
*/
|
||||
disciplineTypeId: string | number;
|
||||
|
||||
/**
|
||||
* 违纪处分类型名称
|
||||
*/
|
||||
disciplineTypeName: string;
|
||||
|
||||
/**
|
||||
* 违纪处分日期
|
||||
*/
|
||||
disciplineDate: string;
|
||||
|
||||
/**
|
||||
* 违纪处分原因
|
||||
*/
|
||||
disciplineReason: string;
|
||||
|
||||
/**
|
||||
* 违纪处分内容
|
||||
*/
|
||||
disciplineContent: string;
|
||||
|
||||
/**
|
||||
* 扣分分值
|
||||
*/
|
||||
scoreDeduction: number;
|
||||
|
||||
/**
|
||||
* 状态(1-生效 2-已撤销)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 审批状态(1-已审批 2-审批中)
|
||||
*/
|
||||
approvalStatus: string;
|
||||
|
||||
/**
|
||||
* 审批人ID
|
||||
*/
|
||||
approvalBy: string | number;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
approvalTime: string;
|
||||
|
||||
/**
|
||||
* 审批备注
|
||||
*/
|
||||
approvalRemark: string;
|
||||
|
||||
/**
|
||||
* 附件OSS ID列表,逗号分隔
|
||||
*/
|
||||
attachmentOssIds: string;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
createBy: string | number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
updateBy: string | number;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updateTime: string;
|
||||
}
|
||||
|
||||
export interface DisciplineRecordForm {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId?: string | number;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo?: string;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName?: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId?: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId?: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分类型ID
|
||||
*/
|
||||
disciplineTypeId?: string | number;
|
||||
|
||||
/**
|
||||
* 违纪处分类型名称
|
||||
*/
|
||||
disciplineTypeName?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分日期
|
||||
*/
|
||||
disciplineDate?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分原因
|
||||
*/
|
||||
disciplineReason?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分内容
|
||||
*/
|
||||
disciplineContent?: string;
|
||||
|
||||
/**
|
||||
* 扣分分值
|
||||
*/
|
||||
scoreDeduction?: number;
|
||||
|
||||
/**
|
||||
* 状态(1-生效 2-已撤销)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 审批状态(1-已审批 2-审批中)
|
||||
*/
|
||||
approvalStatus?: string;
|
||||
|
||||
/**
|
||||
* 审批人ID
|
||||
*/
|
||||
approvalBy?: string | number;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
approvalTime?: string;
|
||||
|
||||
/**
|
||||
* 审批备注
|
||||
*/
|
||||
approvalRemark?: string;
|
||||
|
||||
/**
|
||||
* 附件OSS ID列表,逗号分隔
|
||||
*/
|
||||
attachmentOssIds?: string;
|
||||
}
|
||||
|
||||
export interface DisciplineRecordQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId?: string | number;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo?: string;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName?: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId?: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId?: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分类型ID
|
||||
*/
|
||||
disciplineTypeId?: string | number;
|
||||
|
||||
/**
|
||||
* 违纪处分类型名称
|
||||
*/
|
||||
disciplineTypeName?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分日期
|
||||
*/
|
||||
disciplineDate?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分原因
|
||||
*/
|
||||
disciplineReason?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分内容
|
||||
*/
|
||||
disciplineContent?: string;
|
||||
|
||||
/**
|
||||
* 扣分分值
|
||||
*/
|
||||
scoreDeduction?: number;
|
||||
|
||||
/**
|
||||
* 状态(1-生效 2-已撤销)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 审批状态(1-已审批 2-审批中)
|
||||
*/
|
||||
approvalStatus?: string;
|
||||
|
||||
/**
|
||||
* 审批人ID
|
||||
*/
|
||||
approvalBy?: string | number;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
approvalTime?: string;
|
||||
|
||||
/**
|
||||
* 审批备注
|
||||
*/
|
||||
approvalRemark?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生考核-学生选项
|
||||
*/
|
||||
export interface XskhStudentOptionVO {
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo: string;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className: string;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,321 @@
|
||||
<template>
|
||||
<div class="p-2 page-container">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="学号" prop="studentNo">
|
||||
<el-input v-model="queryParams.studentNo" placeholder="请输入学号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="学生姓名" prop="studentName">
|
||||
<el-input v-model="queryParams.studentName" placeholder="请输入学生姓名" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option v-for="dict in student_discipline_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" class="search-btn-container">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['disciplineRecord:disciplineRecord:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate()"
|
||||
v-hasPermi="['disciplineRecord:disciplineRecord:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete()"
|
||||
v-hasPermi="['disciplineRecord:disciplineRecord:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['disciplineRecord:disciplineRecord:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch="showSearch" @update:showSearch="showSearch = $event" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" border :data="disciplineRecordList" @selection-change="handleSelectionChange" class="full-width-table">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="学号" align="center" prop="studentNo" min-width="120" />
|
||||
<el-table-column label="学生姓名" align="center" prop="studentName" min-width="100" />
|
||||
<el-table-column label="学院名称" align="center" prop="collegeName" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="专业名称" align="center" prop="majorName" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="班级名称" align="center" prop="className" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column label="违纪处分类型" align="center" prop="disciplineTypeName" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="违纪处分日期" align="center" prop="disciplineDate" min-width="130" />
|
||||
<el-table-column label="扣分分值" align="center" prop="scoreDeduction" min-width="100">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.scoreDeduction ? parseFloat(scope.row.scoreDeduction).toFixed(2) : '0.00' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status" min-width="80">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="student_discipline_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="查看" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['disciplineRecord:disciplineRecord:query']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['disciplineRecord:disciplineRecord:edit']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['disciplineRecord:disciplineRecord:remove']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
|
||||
<!-- 添加或修改学生违纪处分记录对话框 -->
|
||||
<DisciplineRecordForm ref="disciplineRecordFormRef" @success="handleSuccess" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="DisciplineRecord" lang="ts">
|
||||
import { ref, reactive, toRefs, onMounted, getCurrentInstance, ComponentInternalInstance } from 'vue';
|
||||
import { listDisciplineRecord, delDisciplineRecord } from '@/api/xskh/disciplineRecord/disciplineRecord';
|
||||
import {
|
||||
DisciplineRecordVO,
|
||||
DisciplineRecordQuery,
|
||||
DisciplineRecordForm as DisciplineRecordFormType
|
||||
} from '@/api/xskh/disciplineRecord/disciplineRecord/types';
|
||||
import DisciplineRecordForm from './DisciplineRecordForm.vue';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { student_discipline_status } = toRefs<any>(proxy?.useDict('student_discipline_status'));
|
||||
|
||||
const disciplineRecordList = ref<DisciplineRecordVO[]>([]);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const disciplineRecordFormRef = ref<ComponentRef<typeof DisciplineRecordForm>>();
|
||||
|
||||
const initFormData: DisciplineRecordForm = {
|
||||
id: undefined,
|
||||
studentId: undefined,
|
||||
studentNo: undefined,
|
||||
studentName: undefined,
|
||||
collegeId: undefined,
|
||||
collegeName: undefined,
|
||||
majorId: undefined,
|
||||
majorName: undefined,
|
||||
classId: undefined,
|
||||
className: undefined,
|
||||
disciplineTypeId: undefined,
|
||||
disciplineTypeName: undefined,
|
||||
disciplineDate: undefined,
|
||||
disciplineReason: undefined,
|
||||
disciplineContent: undefined,
|
||||
scoreDeduction: undefined,
|
||||
status: undefined,
|
||||
approvalStatus: undefined,
|
||||
approvalBy: undefined,
|
||||
approvalTime: undefined,
|
||||
approvalRemark: undefined,
|
||||
attachmentOssIds: undefined
|
||||
};
|
||||
|
||||
const data = reactive<PageData<DisciplineRecordForm, DisciplineRecordQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
studentId: undefined,
|
||||
studentNo: undefined,
|
||||
studentName: undefined,
|
||||
collegeId: undefined,
|
||||
collegeName: undefined,
|
||||
majorId: undefined,
|
||||
majorName: undefined,
|
||||
classId: undefined,
|
||||
className: undefined,
|
||||
disciplineTypeId: undefined,
|
||||
disciplineTypeName: undefined,
|
||||
disciplineDate: undefined,
|
||||
disciplineReason: undefined,
|
||||
disciplineContent: undefined,
|
||||
scoreDeduction: undefined,
|
||||
status: undefined,
|
||||
approvalStatus: undefined,
|
||||
approvalBy: undefined,
|
||||
approvalTime: undefined,
|
||||
approvalRemark: undefined,
|
||||
params: {}
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form } = toRefs(data);
|
||||
|
||||
/** 查询学生违纪处分记录列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listDisciplineRecord(queryParams.value);
|
||||
disciplineRecordList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: DisciplineRecordVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
disciplineRecordFormRef.value?.openDialog(undefined, '新增');
|
||||
};
|
||||
|
||||
/** 查看按钮操作 */
|
||||
const handleView = (row: DisciplineRecordVO) => {
|
||||
disciplineRecordFormRef.value?.openDialog(row.id, '查看');
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = (row?: DisciplineRecordVO) => {
|
||||
const id = row?.id || ids.value[0];
|
||||
disciplineRecordFormRef.value?.openDialog(id, '修改');
|
||||
};
|
||||
|
||||
/** 提交成功回调 */
|
||||
const handleSuccess = () => {
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: DisciplineRecordVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除学生违纪处分记录编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delDisciplineRecord(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'disciplineRecord/disciplineRecord/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`disciplineRecord_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 页面容器样式 */
|
||||
.page-container {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
/* 搜索按钮容器样式 */
|
||||
.search-btn-container {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 10px;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* 表格全宽样式 */
|
||||
.full-width-table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 确保表格容器充满宽度 */
|
||||
:deep(.el-table) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 表格内容区域充满宽度 */
|
||||
:deep(.el-table__body-wrapper) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,343 @@
|
||||
<template>
|
||||
<div class="p-2 page-container">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="类型编码" prop="typeCode">
|
||||
<el-input v-model="queryParams.typeCode" placeholder="请输入类型编码" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="类型名称" prop="typeName">
|
||||
<el-input v-model="queryParams.typeName" placeholder="请输入类型名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="类型分类" prop="typeCategory">
|
||||
<el-select v-model="queryParams.typeCategory" placeholder="请选择类型分类" clearable>
|
||||
<el-option v-for="dict in student_discipline_category" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option v-for="dict in sys_msg_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-form-item label="排序号" prop="sortOrder">
|
||||
<el-input v-model="queryParams.sortOrder" placeholder="请输入排序号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志(0-未删除 1-已删除)" prop="deleted">
|
||||
<el-input v-model="queryParams.deleted" placeholder="请输入删除标志(0-未删除 1-已删除)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item> -->
|
||||
<el-row>
|
||||
<el-col :span="24" class="search-btn-container">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['disciplineType:disciplineType:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['disciplineType:disciplineType:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete()"
|
||||
v-hasPermi="['disciplineType:disciplineType:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['disciplineType:disciplineType:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" border :data="disciplineTypeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键ID" align="center" prop="id" v-if="true" />
|
||||
<el-table-column label="类型编码" align="center" prop="typeCode" />
|
||||
<el-table-column label="类型名称" align="center" prop="typeName" />
|
||||
<el-table-column label="类型分类" align="center" prop="typeCategory">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="student_discipline_category" :value="scope.row.typeCategory" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型说明" align="center" prop="remark" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_msg_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排序号" align="center" prop="sortOrder" />
|
||||
<!-- <el-table-column label="删除标志(0-未删除 1-已删除)" align="center" prop="deleted" /> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['disciplineType:disciplineType:edit']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['disciplineType:disciplineType:remove']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改学生违纪处分类型对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="disciplineTypeFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="类型编码" prop="typeCode">
|
||||
<el-input v-model="form.typeCode" placeholder="请输入类型编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型名称" prop="typeName">
|
||||
<el-input v-model="form.typeName" placeholder="请输入类型名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型分类" prop="typeCategory">
|
||||
<el-select v-model="form.typeCategory" placeholder="请选择类型分类">
|
||||
<el-option v-for="dict in student_discipline_category" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型说明" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="dict in sys_msg_status" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序号" prop="sortOrder">
|
||||
<el-input v-model="form.sortOrder" placeholder="请输入排序号" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="删除标志(0-未删除 1-已删除)" prop="deleted">
|
||||
<el-input v-model="form.deleted" placeholder="请输入删除标志(0-未删除 1-已删除)" />
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="DisciplineType" lang="ts">
|
||||
import {
|
||||
listDisciplineType,
|
||||
getDisciplineType,
|
||||
delDisciplineType,
|
||||
addDisciplineType,
|
||||
updateDisciplineType
|
||||
} from '@/api/xskh/disciplineType/disciplineType';
|
||||
import { DisciplineTypeVO, DisciplineTypeQuery, DisciplineTypeForm } from '@/api/xskh/disciplineType/disciplineType/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { student_discipline_category, sys_msg_status } = toRefs<any>(proxy?.useDict('student_discipline_category', 'sys_msg_status'));
|
||||
|
||||
const disciplineTypeList = ref<DisciplineTypeVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const disciplineTypeFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: DisciplineTypeForm = {
|
||||
id: undefined,
|
||||
typeCode: undefined,
|
||||
typeName: undefined,
|
||||
typeCategory: undefined,
|
||||
remark: undefined,
|
||||
status: undefined,
|
||||
sortOrder: undefined,
|
||||
deleted: undefined
|
||||
};
|
||||
const data = reactive<PageData<DisciplineTypeForm, DisciplineTypeQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
typeCode: undefined,
|
||||
typeName: undefined,
|
||||
typeCategory: undefined,
|
||||
status: undefined,
|
||||
sortOrder: undefined,
|
||||
deleted: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
|
||||
typeCode: [{ required: true, message: '类型编码不能为空', trigger: 'blur' }],
|
||||
typeName: [{ required: true, message: '类型名称不能为空', trigger: 'blur' }],
|
||||
typeCategory: [{ required: true, message: '类型分类(1-违纪类型 2-处分类型)不能为空', trigger: 'change' }]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询学生违纪处分类型列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listDisciplineType(queryParams.value);
|
||||
disciplineTypeList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
disciplineTypeFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: DisciplineTypeVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = '添加学生违纪处分类型';
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: DisciplineTypeVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getDisciplineType(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改学生违纪处分类型';
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
disciplineTypeFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateDisciplineType(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addDisciplineType(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: DisciplineTypeVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除学生违纪处分类型编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delDisciplineType(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'disciplineType/disciplineType/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`disciplineType_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
/* 页面容器样式 */
|
||||
.page-container {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
/* 搜索按钮容器样式 */
|
||||
.search-btn-container {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 10px;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,272 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="类型编码" prop="typeCode">
|
||||
<el-input v-model="queryParams.typeCode" placeholder="请输入类型编码" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型名称" prop="typeName">
|
||||
<el-input v-model="queryParams.typeName" placeholder="请输入类型名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型说明" prop="description" v-if="false">
|
||||
<el-input v-model="queryParams.description" placeholder="请输入类型说明" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option v-for="dict in sys_msg_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序号" prop="sortOrder" v-if="false">
|
||||
<el-input v-model="queryParams.sortOrder" placeholder="请输入排序号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志(0-未删除 1-已删除)" prop="deleted" v-if="false">
|
||||
<el-input v-model="queryParams.deleted" placeholder="请输入删除标志(0-未删除 1-已删除)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['rewardType:rewardType:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['rewardType:rewardType:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['rewardType:rewardType:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['rewardType:rewardType:export']">导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" border :data="rewardTypeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键ID" align="center" prop="id" v-if="true" />
|
||||
<el-table-column label="类型编码" align="center" prop="typeCode" />
|
||||
<el-table-column label="类型名称" align="center" prop="typeName" />
|
||||
<el-table-column label="类型说明" align="center" prop="description" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_msg_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排序号" align="center" prop="sortOrder" />
|
||||
<!-- <el-table-column label="删除标志" align="center" prop="deleted" /> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['rewardType:rewardType:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['rewardType:rewardType:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改学生奖励类型对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="rewardTypeFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="类型编码" prop="typeCode">
|
||||
<el-input v-model="form.typeCode" placeholder="请输入类型编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型名称" prop="typeName">
|
||||
<el-input v-model="form.typeName" placeholder="请输入类型名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型说明" prop="description">
|
||||
<el-input v-model="form.description" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="form.status" placeholder="请选择状态">
|
||||
<el-option v-for="dict in sys_msg_status" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序号" prop="sortOrder">
|
||||
<el-input v-model="form.sortOrder" placeholder="请输入排序号" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="删除标志(0-未删除 1-已删除)" prop="deleted">
|
||||
<el-input v-model="form.deleted" placeholder="请输入删除标志(0-未删除 1-已删除)" />
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="RewardType" lang="ts">
|
||||
import { listRewardType, getRewardType, delRewardType, addRewardType, updateRewardType } from '@/api/xskh/rewardType/rewardType';
|
||||
import { RewardTypeVO, RewardTypeQuery, RewardTypeForm } from '@/api/xskh/rewardType/rewardType/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { sys_msg_status } = toRefs<any>(proxy?.useDict('sys_msg_status'));
|
||||
|
||||
const rewardTypeList = ref<RewardTypeVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const rewardTypeFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: RewardTypeForm = {
|
||||
id: undefined,
|
||||
typeCode: undefined,
|
||||
typeName: undefined,
|
||||
description: undefined,
|
||||
status: undefined,
|
||||
sortOrder: undefined,
|
||||
deleted: undefined
|
||||
};
|
||||
const data = reactive<PageData<RewardTypeForm, RewardTypeQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
typeCode: undefined,
|
||||
typeName: undefined,
|
||||
description: undefined,
|
||||
status: undefined,
|
||||
sortOrder: undefined,
|
||||
deleted: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
|
||||
typeCode: [{ required: true, message: '类型编码不能为空', trigger: 'blur' }],
|
||||
typeName: [{ required: true, message: '类型名称不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询学生奖励类型列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listRewardType(queryParams.value);
|
||||
rewardTypeList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
rewardTypeFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: RewardTypeVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = '添加学生奖励类型';
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: RewardTypeVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getRewardType(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改学生奖励类型';
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
rewardTypeFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateRewardType(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addRewardType(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: RewardTypeVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除学生奖励类型编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delRewardType(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'rewardType/rewardType/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`rewardType_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,955 @@
|
||||
<template>
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="1000px" append-to-body destroy-on-close>
|
||||
<!-- 上部分:违纪记录信息(只读) -->
|
||||
<div class="discipline-record-section">
|
||||
<h3 class="section-title">违纪记录信息</h3>
|
||||
<el-form :model="disciplineRecord" label-width="120px" disabled>
|
||||
<el-row :gutter="20">
|
||||
<!-- 左列:学生基本信息 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="学号">
|
||||
<el-input v-model="disciplineRecord.studentNo" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学生姓名">
|
||||
<el-input v-model="disciplineRecord.studentName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学院名称">
|
||||
<el-input v-model="disciplineRecord.collegeName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="专业名称">
|
||||
<el-input v-model="disciplineRecord.majorName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级名称">
|
||||
<el-input v-model="disciplineRecord.className" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- 右列:违纪处分信息 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="违纪处分类型">
|
||||
<el-input v-model="disciplineRecord.disciplineTypeName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="违纪处分日期">
|
||||
<el-input v-model="disciplineRecord.disciplineDate" />
|
||||
</el-form-item>
|
||||
<el-form-item label="扣分分值">
|
||||
<el-input v-model="disciplineRecord.scoreDeduction" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-input v-model="statusLabel" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 完整宽度的字段 -->
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="违纪处分原因">
|
||||
<el-input v-model="disciplineRecord.disciplineReason" type="textarea" :rows="3" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="违纪处分内容">
|
||||
<el-input v-model="disciplineRecord.disciplineContent" type="textarea" :rows="3" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 违纪记录附件展示(只读) -->
|
||||
<el-row v-if="disciplineAttachmentList.length > 0">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="违纪记录附件">
|
||||
<div class="attachment-view-container">
|
||||
<div class="attachment-view-grid">
|
||||
<div v-for="file in disciplineAttachmentList" :key="file.uid" class="upload-file-card">
|
||||
<div class="upload-file-thumb">
|
||||
<image-preview v-if="isImageFile(file) && file.url" :src="getFileOssId(file)" class="upload-thumb-image" :isOssId="true" />
|
||||
<div v-else class="upload-file-placeholder">
|
||||
<el-icon><Document /></el-icon>
|
||||
<span class="file-ext">{{ getFileExt(file.name) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload-file-name" :title="file.name">
|
||||
{{ getShortFileName(file.name) }}
|
||||
</div>
|
||||
<div class="upload-file-card-actions">
|
||||
<el-button type="success" size="small" @click.stop="handleDownloadAttachment(file)" title="下载">
|
||||
<el-icon><Download /></el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<!-- 分隔线 -->
|
||||
<el-divider />
|
||||
|
||||
<!-- 下部分:撤销申请表单 -->
|
||||
<div class="revoke-form-section">
|
||||
<h3 class="section-title">撤销申请信息</h3>
|
||||
<!-- 状态提示信息 -->
|
||||
<div v-if="existingRevokeRecord && !canApply" class="status-alert">
|
||||
<el-alert
|
||||
:title="existingRevokeRecord.status === '2' ? '该违纪记录的撤销申请已审核通过' : '该违纪记录的撤销申请已被拒绝'"
|
||||
:type="existingRevokeRecord.status === '2' ? 'success' : 'error'"
|
||||
:closable="false"
|
||||
show-icon
|
||||
>
|
||||
<template #default>
|
||||
<div>
|
||||
<p><strong>申请时间:</strong>{{ existingRevokeRecord.applyTime }}</p>
|
||||
<p><strong>申请原因:</strong>{{ existingRevokeRecord.revokeReason }}</p>
|
||||
<p v-if="existingRevokeRecord.approvalTime"><strong>审核时间:</strong>{{ existingRevokeRecord.approvalTime }}</p>
|
||||
<p v-if="existingRevokeRecord.approvalRemark"><strong>审核备注:</strong>{{ existingRevokeRecord.approvalRemark }}</p>
|
||||
</div>
|
||||
</template>
|
||||
</el-alert>
|
||||
</div>
|
||||
|
||||
<el-form ref="revokeFormRef" :model="form" :rules="rules" label-width="120px" :disabled="!canApply">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="撤销申请原因" prop="revokeReason">
|
||||
<el-input v-model="form.revokeReason" type="textarea" placeholder="请输入撤销申请原因" :rows="4" :disabled="!canApply" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 撤销证明材料上传区域 -->
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="撤销证明材料">
|
||||
<div class="attachment-upload-container">
|
||||
<el-upload
|
||||
:file-list="attachmentList"
|
||||
class="upload-demo"
|
||||
drag
|
||||
list-type="picture-card"
|
||||
:on-preview="handleFilePreview"
|
||||
:action="uploadAction"
|
||||
:headers="uploadHeaders"
|
||||
:data="uploadData"
|
||||
:auto-upload="true"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:on-success="handleUploadSuccess"
|
||||
:on-error="handleUploadError"
|
||||
:on-remove="handleRemoveAttachmentConfirm"
|
||||
:on-change="handleFileChange"
|
||||
:disabled="!canApply"
|
||||
multiple
|
||||
:limit="15"
|
||||
:show-file-list="true"
|
||||
accept="image/*,video/*,.pdf,.doc,.docx,.txt"
|
||||
>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip">支持图片、视频、PDF、Word文档等格式,单个文件大小不超过10MB,最多上传15个文件。</div>
|
||||
</template>
|
||||
|
||||
<div class="el-upload-dragger1">
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
</div>
|
||||
|
||||
<!-- 自定义文件卡片缩略图 -->
|
||||
<template #file="{ file }">
|
||||
<div class="upload-file-card">
|
||||
<div class="upload-file-thumb">
|
||||
<image-preview v-if="isImageFile(file) && file.url" :src="getFileOssId(file)" class="upload-thumb-image" :isOssId="true" />
|
||||
<div v-else class="upload-file-placeholder">
|
||||
<el-icon><Document /></el-icon>
|
||||
<span class="file-ext">{{ getFileExt(file.name) }}</span>
|
||||
</div>
|
||||
<div v-if="file.status === 'uploading'" class="upload-file-loading">
|
||||
<el-icon class="is-loading"><Loading /></el-icon>
|
||||
<span class="loading-text">上传中...</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload-file-name" :title="file.name">
|
||||
{{ getShortFileName(file.name) }}
|
||||
</div>
|
||||
<div class="upload-file-card-actions" v-if="file.status && file.status !== 'ready'">
|
||||
<el-button-group size="small">
|
||||
<el-button type="success" @click.stop="handleDownloadAttachment(file)" title="下载" :disabled="file.status !== 'success'">
|
||||
<el-icon><Download /></el-icon>
|
||||
</el-button>
|
||||
<el-button type="danger" @click.stop="handleRemoveAttachmentConfirm(file)" title="删除">
|
||||
<el-icon><Delete /></el-icon>
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button v-if="canApply" :loading="buttonLoading" type="primary" @click="submitForm">
|
||||
{{ isEditMode ? '保存修改' : '提交申请' }}
|
||||
</el-button>
|
||||
<!-- 新增删除按钮:只有当存在撤销申请记录且状态为待审核时才显示 -->
|
||||
<el-button
|
||||
v-if="existingRevokeRecord && existingRevokeRecord.status === '1'"
|
||||
:loading="deleteLoading"
|
||||
type="danger"
|
||||
@click="handleDeleteApplication"
|
||||
>
|
||||
删除申请
|
||||
</el-button>
|
||||
<el-button @click="cancel">{{ canApply ? '取消' : '关闭' }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup name="RevokeApplicationForm" lang="ts">
|
||||
import { ref, reactive, computed, toRefs, getCurrentInstance } from 'vue';
|
||||
import { UploadFilled, Document, Loading, Download, Delete } from '@element-plus/icons-vue';
|
||||
import { ElMessage, ElMessageBox, ElLoading, FormInstance } from 'element-plus';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { globalHeaders } from '@/utils/request';
|
||||
import ImagePreview from '@/components/ImagePreview/index.vue';
|
||||
import request from '@/utils/request';
|
||||
import { getDisciplineRecord } from '@/api/xskh/disciplineRecord/disciplineRecord';
|
||||
import {
|
||||
applyDisciplineRevoke,
|
||||
getDisciplineRevokeByRecordId,
|
||||
updateDisciplineRevoke,
|
||||
delDisciplineRevoke
|
||||
} from '@/api/xskh/disciplineRevoke/disciplineRevoke';
|
||||
import { DisciplineRevokeForm, DisciplineRevokeVO } from '@/api/xskh/disciplineRevoke/types';
|
||||
|
||||
interface Props {}
|
||||
|
||||
const emit = defineEmits(['success']);
|
||||
|
||||
// 使用getCurrentInstance获取上下文
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
const { student_discipline_status } = toRefs<any>(proxy?.useDict('student_discipline_status'));
|
||||
|
||||
const revokeFormRef = ref<FormInstance>();
|
||||
const buttonLoading = ref(false);
|
||||
const deleteLoading = ref(false); // 新增删除按钮的加载状态
|
||||
|
||||
// 对话框状态
|
||||
const dialog = reactive({
|
||||
visible: false,
|
||||
title: '撤销申请'
|
||||
});
|
||||
|
||||
// 违纪记录信息(只读)
|
||||
const disciplineRecord = ref<any>({});
|
||||
const disciplineAttachmentList = ref<any[]>([]);
|
||||
|
||||
// 现有撤销申请记录
|
||||
const existingRevokeRecord = ref<DisciplineRevokeVO | null>(null);
|
||||
const isEditMode = ref(false); // 是否为编辑模式
|
||||
const canApply = ref(true); // 是否可以申请/编辑
|
||||
|
||||
// 撤销申请表单
|
||||
const initFormData: DisciplineRevokeForm = {
|
||||
disciplineRecordId: undefined,
|
||||
revokeReason: undefined,
|
||||
revokeEvidence: undefined
|
||||
};
|
||||
|
||||
const form = ref<DisciplineRevokeForm>({ ...initFormData });
|
||||
|
||||
// 表单验证规则
|
||||
const rules = reactive({
|
||||
revokeReason: [{ required: true, message: '撤销申请原因不能为空', trigger: 'blur' }]
|
||||
});
|
||||
|
||||
// 撤销证明材料附件
|
||||
const attachmentList = ref<any[]>([]);
|
||||
|
||||
// 状态标签计算属性
|
||||
const statusLabel = computed(() => {
|
||||
const statusDict = student_discipline_status.value || [];
|
||||
const statusItem = statusDict.find((item: any) => item.value === disciplineRecord.value.status);
|
||||
return statusItem ? statusItem.label : disciplineRecord.value.status;
|
||||
});
|
||||
|
||||
// 上传相关配置
|
||||
const uploadAction = computed(() => {
|
||||
return import.meta.env.VITE_APP_BASE_API + '/resource/oss/upload';
|
||||
});
|
||||
|
||||
const uploadHeaders = computed(() => {
|
||||
return {
|
||||
'Authorization': `Bearer ${getToken() || ''}`,
|
||||
'clientid': import.meta.env.VITE_APP_CLIENT_ID || 'e5cd7e4891bf95d1d19206ce24a7b32e'
|
||||
};
|
||||
});
|
||||
|
||||
const uploadData = computed(() => {
|
||||
return {
|
||||
bizType: 'discipline_revoke_evidence'
|
||||
};
|
||||
});
|
||||
|
||||
/** 打开弹窗 */
|
||||
const openDialog = async (disciplineRecordId: string | number) => {
|
||||
dialog.visible = true;
|
||||
resetForm();
|
||||
|
||||
try {
|
||||
// 加载违纪记录信息
|
||||
const res = await getDisciplineRecord(disciplineRecordId);
|
||||
disciplineRecord.value = res.data;
|
||||
form.value.disciplineRecordId = disciplineRecordId;
|
||||
|
||||
// 处理违纪记录附件数据
|
||||
await handleDisciplineAttachmentData();
|
||||
|
||||
// 查询现有撤销申请记录
|
||||
await checkExistingRevokeRecord(disciplineRecordId);
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error);
|
||||
ElMessage.error('加载数据失败');
|
||||
}
|
||||
};
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
form.value = { ...initFormData };
|
||||
attachmentList.value = [];
|
||||
disciplineAttachmentList.value = [];
|
||||
existingRevokeRecord.value = null;
|
||||
isEditMode.value = false;
|
||||
canApply.value = true;
|
||||
revokeFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
dialog.visible = false;
|
||||
resetForm();
|
||||
};
|
||||
|
||||
/** 提交表单 */
|
||||
const submitForm = () => {
|
||||
if (!canApply.value) {
|
||||
ElMessage.warning('当前状态不允许申请或修改');
|
||||
return;
|
||||
}
|
||||
|
||||
revokeFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
|
||||
// 处理附件数据
|
||||
const attachmentOssIds = attachmentList.value.filter((file: any) => file.status === 'success' && file.ossId).map((file: any) => file.ossId);
|
||||
form.value.revokeEvidence = attachmentOssIds.join(',');
|
||||
|
||||
try {
|
||||
if (isEditMode.value && form.value.id) {
|
||||
// 编辑现有申请
|
||||
await updateDisciplineRevoke(form.value);
|
||||
ElMessage.success('撤销申请修改成功');
|
||||
} else {
|
||||
// 新建申请
|
||||
await applyDisciplineRevoke(form.value);
|
||||
ElMessage.success('撤销申请提交成功');
|
||||
}
|
||||
|
||||
dialog.visible = false;
|
||||
emit('success');
|
||||
} catch (error) {
|
||||
console.error('操作失败:', error);
|
||||
const errorMsg = isEditMode.value ? '修改申请失败' : '提交申请失败';
|
||||
ElMessage.error(errorMsg);
|
||||
} finally {
|
||||
buttonLoading.value = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除撤销申请 */
|
||||
const handleDeleteApplication = () => {
|
||||
if (!existingRevokeRecord.value?.id) {
|
||||
ElMessage.error('未找到撤销申请记录ID');
|
||||
return;
|
||||
}
|
||||
|
||||
ElMessageBox.confirm('确定要删除这个撤销申请吗?删除后将无法恢复。', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
deleteLoading.value = true;
|
||||
try {
|
||||
await delDisciplineRevoke(existingRevokeRecord.value.id);
|
||||
ElMessage.success('撤销申请删除成功');
|
||||
dialog.visible = false;
|
||||
emit('success');
|
||||
} catch (error) {
|
||||
console.error('删除申请失败:', error);
|
||||
ElMessage.error('删除申请失败');
|
||||
} finally {
|
||||
deleteLoading.value = false;
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
// 文件处理方法
|
||||
const isImageFile = (file: any) => {
|
||||
const imageTypes = ['image/jpeg', 'image/png', 'image/gif', 'image/bmp', 'image/webp'];
|
||||
return imageTypes.includes(file.raw?.type) || (file.url && /\.(jpg|jpeg|png|gif|bmp|webp)$/i.test(file.name));
|
||||
};
|
||||
|
||||
const getFileOssId = (file: any) => {
|
||||
return file.ossId || '';
|
||||
};
|
||||
|
||||
const getFileExt = (fileName: string) => {
|
||||
const ext = fileName.split('.').pop()?.toUpperCase();
|
||||
return ext || 'FILE';
|
||||
};
|
||||
|
||||
const getShortFileName = (fileName: string) => {
|
||||
if (!fileName) return '';
|
||||
const lastDotIndex = fileName.lastIndexOf('.');
|
||||
if (lastDotIndex === -1) {
|
||||
return fileName.length > 12 ? fileName.substring(0, 12) + '...' : fileName;
|
||||
}
|
||||
const name = fileName.substring(0, lastDotIndex);
|
||||
const ext = fileName.substring(lastDotIndex);
|
||||
if (name.length <= 8) {
|
||||
return fileName;
|
||||
}
|
||||
return name.substring(0, 8) + '...' + ext;
|
||||
};
|
||||
|
||||
const handleFilePreview = (file: any) => {
|
||||
if (isImageFile(file)) {
|
||||
window.open(file.url);
|
||||
} else {
|
||||
handleDownloadAttachment(file);
|
||||
}
|
||||
};
|
||||
|
||||
const handleBeforeUpload = (file: any) => {
|
||||
const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt|mp4|avi|mov)$/i.test(file.name);
|
||||
const isLt10M = file.size / 1024 / 1024 < 10;
|
||||
|
||||
if (!isValidType) {
|
||||
ElMessage.error('上传文件格式不正确!');
|
||||
return false;
|
||||
}
|
||||
if (!isLt10M) {
|
||||
ElMessage.error('上传文件大小不能超过 10MB!');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const handleUploadSuccess = (response: any, file: any) => {
|
||||
if (response.code === 200) {
|
||||
file.url = response.data.url;
|
||||
file.ossId = response.data.ossId;
|
||||
ElMessage.success('文件上传成功');
|
||||
} else {
|
||||
ElMessage.error(response.msg || '文件上传失败');
|
||||
}
|
||||
};
|
||||
|
||||
const handleUploadError = (error: any, file: any) => {
|
||||
console.error('文件上传失败:', error);
|
||||
ElMessage.error('文件上传失败');
|
||||
};
|
||||
|
||||
const handleFileChange = (file: any, fileList: any) => {
|
||||
attachmentList.value = fileList;
|
||||
};
|
||||
|
||||
const handleRemoveAttachmentConfirm = (file: any) => {
|
||||
ElMessageBox.confirm('确定要删除这个文件吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
handleRemoveAttachment(file);
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
const handleRemoveAttachment = (file: any) => {
|
||||
const index = attachmentList.value.findIndex((item: any) => item.uid === file.uid);
|
||||
if (index > -1) {
|
||||
attachmentList.value.splice(index, 1);
|
||||
ElMessage.success('文件删除成功');
|
||||
}
|
||||
};
|
||||
|
||||
const handleDownloadAttachment = async (file: any) => {
|
||||
let downloadUrl = '';
|
||||
let fileName = file.name || 'attachment';
|
||||
|
||||
if (file.response && file.response.data && file.response.data.filePath) {
|
||||
downloadUrl = file.response.data.filePath;
|
||||
fileName = file.response.data.fileName || fileName;
|
||||
} else if (file.ossId) {
|
||||
downloadUrl = file.ossId;
|
||||
} else if (file.raw) {
|
||||
const link = document.createElement('a');
|
||||
link.href = URL.createObjectURL(file.raw);
|
||||
link.download = fileName;
|
||||
link.style.display = 'none';
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
URL.revokeObjectURL(link.href);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!downloadUrl) {
|
||||
ElMessage.error('无法获取文件下载地址');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const loading = ElLoading.service({
|
||||
text: '正在下载文件...',
|
||||
target: document.body
|
||||
});
|
||||
|
||||
const response = await request({
|
||||
url: '/resource/oss/download/' + downloadUrl,
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
timeout: 300000
|
||||
});
|
||||
|
||||
if (!response) {
|
||||
throw new Error('响应数据为空');
|
||||
}
|
||||
|
||||
let blobData: Blob;
|
||||
if (response instanceof Blob) {
|
||||
blobData = response;
|
||||
} else if (response.data instanceof Blob) {
|
||||
blobData = response.data;
|
||||
} else {
|
||||
throw new Error('无效的响应数据格式');
|
||||
}
|
||||
|
||||
const url = window.URL.createObjectURL(blobData);
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = fileName;
|
||||
link.style.display = 'none';
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
window.URL.revokeObjectURL(url);
|
||||
loading?.close();
|
||||
} catch (error) {
|
||||
console.error('下载文件失败:', error);
|
||||
ElMessage.error('下载文件失败,请稍后重试');
|
||||
}
|
||||
};
|
||||
|
||||
/** 检查现有撤销申请记录 */
|
||||
const checkExistingRevokeRecord = async (disciplineRecordId: string | number) => {
|
||||
try {
|
||||
const res = await getDisciplineRevokeByRecordId(disciplineRecordId);
|
||||
if (res.data) {
|
||||
existingRevokeRecord.value = res.data;
|
||||
|
||||
// 根据状态判断是否可以操作
|
||||
const status = res.data.status;
|
||||
if (status === '1') {
|
||||
// 待审核状态,可以编辑
|
||||
isEditMode.value = true;
|
||||
canApply.value = true;
|
||||
dialog.title = '修改撤销申请';
|
||||
|
||||
// 填充现有数据到表单
|
||||
form.value.id = res.data.id;
|
||||
form.value.revokeReason = res.data.revokeReason;
|
||||
form.value.revokeEvidence = res.data.revokeEvidence;
|
||||
|
||||
// 处理现有证明材料附件
|
||||
await handleRevokeEvidenceData(res.data.revokeEvidence);
|
||||
} else if (status === '2') {
|
||||
// 审核通过,不能再申请
|
||||
canApply.value = false;
|
||||
dialog.title = '撤销申请详情(已通过)';
|
||||
ElMessage.warning('该违纪记录的撤销申请已审核通过,无法再次申请');
|
||||
} else if (status === '3') {
|
||||
// 审核拒绝,不能再申请
|
||||
canApply.value = false;
|
||||
dialog.title = '撤销申请详情(已拒绝)';
|
||||
ElMessage.warning('该违纪记录的撤销申请已被拒绝,无法再次申请');
|
||||
}
|
||||
} else {
|
||||
// 没有现有申请记录,可以新建
|
||||
existingRevokeRecord.value = null;
|
||||
isEditMode.value = false;
|
||||
canApply.value = true;
|
||||
dialog.title = '撤销申请';
|
||||
}
|
||||
} catch (error) {
|
||||
// 如果查询失败(比如404),说明没有现有记录,可以新建
|
||||
existingRevokeRecord.value = null;
|
||||
isEditMode.value = false;
|
||||
canApply.value = true;
|
||||
dialog.title = '撤销申请';
|
||||
}
|
||||
};
|
||||
|
||||
const handleDisciplineAttachmentData = async () => {
|
||||
try {
|
||||
if (!disciplineRecord.value.attachmentOssIds || !disciplineRecord.value.attachmentOssIds.toString().trim()) {
|
||||
disciplineAttachmentList.value = [];
|
||||
return;
|
||||
}
|
||||
|
||||
const ossIdsArray = disciplineRecord.value.attachmentOssIds
|
||||
.toString()
|
||||
.split(',')
|
||||
.map((id: string) => id.trim())
|
||||
.filter((id: string) => id);
|
||||
|
||||
if (ossIdsArray.length === 0) {
|
||||
disciplineAttachmentList.value = [];
|
||||
return;
|
||||
}
|
||||
|
||||
const response = await request({
|
||||
url: `/resource/oss/listByIds/${ossIdsArray.join(',')}`,
|
||||
method: 'get'
|
||||
});
|
||||
|
||||
if (response.code === 200 && response.data) {
|
||||
const attachmentFiles = response.data.map((item: any, index: number) => ({
|
||||
uid: `existing_${index}_${Date.now()}`,
|
||||
name: item.originalName || `附件${index + 1}`,
|
||||
url: item.url,
|
||||
ossId: item.ossId,
|
||||
status: 'success'
|
||||
}));
|
||||
|
||||
disciplineAttachmentList.value = attachmentFiles;
|
||||
} else {
|
||||
disciplineAttachmentList.value = [];
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('处理违纪记录附件数据失败:', error);
|
||||
disciplineAttachmentList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
/** 处理现有撤销证明材料附件数据 */
|
||||
const handleRevokeEvidenceData = async (revokeEvidence: string) => {
|
||||
try {
|
||||
if (!revokeEvidence || !revokeEvidence.trim()) {
|
||||
attachmentList.value = [];
|
||||
return;
|
||||
}
|
||||
|
||||
const ossIdsArray = revokeEvidence
|
||||
.split(',')
|
||||
.map((id: string) => id.trim())
|
||||
.filter((id: string) => id);
|
||||
|
||||
if (ossIdsArray.length === 0) {
|
||||
attachmentList.value = [];
|
||||
return;
|
||||
}
|
||||
|
||||
const response = await request({
|
||||
url: `/resource/oss/listByIds/${ossIdsArray.join(',')}`,
|
||||
method: 'get'
|
||||
});
|
||||
|
||||
if (response.code === 200 && response.data) {
|
||||
const attachmentFiles = response.data.map((item: any, index: number) => ({
|
||||
uid: `revoke_${index}_${Date.now()}`,
|
||||
name: item.originalName || `证明材料${index + 1}`,
|
||||
url: item.url,
|
||||
ossId: item.ossId,
|
||||
status: 'success'
|
||||
}));
|
||||
|
||||
attachmentList.value = attachmentFiles;
|
||||
} else {
|
||||
attachmentList.value = [];
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('处理撤销证明材料数据失败:', error);
|
||||
attachmentList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
// 暴露方法给父组件使用
|
||||
defineExpose({
|
||||
openDialog
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.section-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.discipline-record-section {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.revoke-form-section {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.status-alert {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.status-alert .el-alert__content p {
|
||||
margin: 4px 0;
|
||||
font-size: 14px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.status-alert .el-alert__content p strong {
|
||||
color: #409eff;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
/* 附件上传容器样式 */
|
||||
.attachment-upload-container {
|
||||
width: 100%;
|
||||
max-height: calc(100vh - 650px);
|
||||
min-height: 200px;
|
||||
overflow-y: auto;
|
||||
padding-right: 8px;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 6px;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.attachment-upload-container .upload-demo {
|
||||
padding: 12px;
|
||||
min-height: 180px;
|
||||
}
|
||||
|
||||
.attachment-upload-container .upload-demo .el-upload {
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.attachment-upload-container .upload-demo .el-upload:hover {
|
||||
border-color: #409eff;
|
||||
}
|
||||
|
||||
.attachment-upload-container .upload-demo .el-upload__tip {
|
||||
font-size: 12px;
|
||||
color: #000000;
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.attachment-upload-container .upload-demo .el-upload-dragger1 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 15px;
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
.attachment-upload-container .upload-demo .el-upload-dragger1 .el-icon--upload {
|
||||
margin: 0;
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
/* 文件卡片样式 */
|
||||
.upload-file-card {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.upload-file-card:hover {
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.upload-file-thumb {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 110px;
|
||||
background: #f5f5f5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.upload-thumb-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.upload-file-placeholder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #909399;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.upload-file-placeholder .el-icon {
|
||||
font-size: 28px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.file-ext {
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.upload-file-loading {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.loading-text {
|
||||
margin-top: 8px;
|
||||
font-size: 12px;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.upload-file-name {
|
||||
padding: 6px 8px;
|
||||
font-size: 11px;
|
||||
color: #303133;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
background: #fafafa;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
line-height: 1.2;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
word-break: break-all;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.upload-file-card-actions {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 6px 8px;
|
||||
background: #fafafa;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
transition: all 0.3s;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.upload-file-card-actions .el-button-group {
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.upload-file-card-actions .el-button {
|
||||
padding: 4px 8px;
|
||||
border: 1px solid #e0e0e0;
|
||||
background: #fff;
|
||||
font-size: 12px;
|
||||
margin: 0 2px;
|
||||
border-radius: 3px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.upload-file-card-actions .el-button:hover {
|
||||
background: #f5f5f5;
|
||||
border-color: #409eff;
|
||||
}
|
||||
|
||||
/* 让附件卡片一行展示 5 个 */
|
||||
.attachment-upload-container :deep(.el-upload-list--picture-card) {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
gap: 9px;
|
||||
margin-top: 12px;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.attachment-upload-container :deep(.el-upload-list--picture-card) .el-upload-list__item {
|
||||
margin: 0;
|
||||
height: 180px !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
:deep(.el-upload-dragger) {
|
||||
border: 0px !important;
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
/* 查看模式下的附件网格展示 */
|
||||
.attachment-view-container {
|
||||
width: 100%;
|
||||
max-height: calc(100vh - 650px);
|
||||
min-height: 200px;
|
||||
overflow-y: auto;
|
||||
padding-right: 8px;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 6px;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.attachment-view-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
gap: 9px;
|
||||
margin: 12px;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,600 @@
|
||||
<template>
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="1000px" append-to-body destroy-on-close>
|
||||
<!-- 上部分:违纪记录信息(只读) -->
|
||||
<div class="discipline-record-section">
|
||||
<h3 class="section-title">违纪记录信息</h3>
|
||||
<el-form :model="disciplineRecord" label-width="120px">
|
||||
<el-row :gutter="20">
|
||||
<!-- 左列:学生基本信息 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="学号">
|
||||
<div class="form-field-value">{{ disciplineRecord.studentNo }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="学生姓名">
|
||||
<div class="form-field-value">{{ disciplineRecord.studentName }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="学院名称">
|
||||
<div class="form-field-value">{{ disciplineRecord.collegeName }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="专业名称">
|
||||
<div class="form-field-value">{{ disciplineRecord.majorName }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="班级名称">
|
||||
<div class="form-field-value">{{ disciplineRecord.className }}</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- 右列:违纪处分信息 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="违纪处分类型">
|
||||
<div class="form-field-value">{{ disciplineRecord.disciplineTypeName }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="违纪处分日期">
|
||||
<div class="form-field-value">{{ disciplineRecord.disciplineDate }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="扣分分值">
|
||||
<div class="form-field-value">{{ disciplineRecord.scoreDeduction }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<div class="form-field-value">
|
||||
<dict-tag :options="student_discipline_status" :value="disciplineRecord.status" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 完整宽度的字段 -->
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="违纪处分原因">
|
||||
<div class="form-field-value textarea-value">{{ disciplineRecord.disciplineReason }}</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="违纪处分内容">
|
||||
<div class="form-field-value textarea-value">{{ disciplineRecord.disciplineContent }}</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 违纪记录附件展示(只读) -->
|
||||
<el-row v-if="disciplineAttachmentList.length > 0">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="违纪记录附件">
|
||||
<div class="attachment-view-container">
|
||||
<div class="attachment-view-grid">
|
||||
<div v-for="file in disciplineAttachmentList" :key="file.uid" class="upload-file-card">
|
||||
<div class="upload-file-thumb">
|
||||
<image-preview v-if="isImageFile(file) && file.url" :src="getFileOssId(file)" class="upload-thumb-image" :isOssId="true" />
|
||||
<div v-else class="upload-file-placeholder">
|
||||
<el-icon><Document /></el-icon>
|
||||
<span class="file-ext">{{ getFileExt(file.name) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload-file-name" :title="file.name">
|
||||
{{ getShortFileName(file.name) }}
|
||||
</div>
|
||||
<div class="upload-file-card-actions">
|
||||
<el-button type="success" size="small" @click.stop="handleDownloadAttachment(file)" title="下载">
|
||||
<el-icon><Download /></el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<!-- 分隔线 -->
|
||||
<el-divider />
|
||||
|
||||
<!-- 下部分:撤销申请信息(只读) -->
|
||||
<div class="revoke-info-section">
|
||||
<h3 class="section-title">撤销申请信息</h3>
|
||||
<el-form :model="revokeData" label-width="120px">
|
||||
<el-row :gutter="20">
|
||||
<!-- 左列:申请信息 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请时间">
|
||||
<div class="form-field-value">{{ revokeData.applyTime }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请状态">
|
||||
<div class="form-field-value">
|
||||
<dict-tag :options="student_revoke_status" :value="revokeData.status" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- 右列:审批信息 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" v-if="revokeData.approvalTime">
|
||||
<div class="form-field-value">{{ revokeData.approvalTime }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核人" v-if="revokeData.approvalBy">
|
||||
<div class="form-field-value">{{ revokeData.approvalBy }}</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="撤销申请原因">
|
||||
<div class="form-field-value textarea-value">{{ revokeData.revokeReason }}</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row v-if="revokeData.approvalRemark">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核备注">
|
||||
<div class="form-field-value textarea-value">{{ revokeData.approvalRemark }}</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 撤销证明材料展示(只读) -->
|
||||
<el-row v-if="revokeAttachmentList.length > 0">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="撤销证明材料">
|
||||
<div class="attachment-view-container">
|
||||
<div class="attachment-view-grid">
|
||||
<div v-for="file in revokeAttachmentList" :key="file.uid" class="upload-file-card">
|
||||
<div class="upload-file-thumb">
|
||||
<image-preview v-if="isImageFile(file) && file.url" :src="getFileOssId(file)" class="upload-thumb-image" :isOssId="true" />
|
||||
<div v-else class="upload-file-placeholder">
|
||||
<el-icon><Document /></el-icon>
|
||||
<span class="file-ext">{{ getFileExt(file.name) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload-file-name" :title="file.name">
|
||||
{{ getShortFileName(file.name) }}
|
||||
</div>
|
||||
<div class="upload-file-card-actions">
|
||||
<el-button type="success" size="small" @click.stop="handleDownloadAttachment(file)" title="下载">
|
||||
<el-icon><Download /></el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel">关 闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup name="RevokeApplicationView" lang="ts">
|
||||
import { ref, reactive, toRefs, getCurrentInstance } from 'vue';
|
||||
import { Document, Download } from '@element-plus/icons-vue';
|
||||
import { ElMessage, ElLoading } from 'element-plus';
|
||||
import ImagePreview from '@/components/ImagePreview/index.vue';
|
||||
import request from '@/utils/request';
|
||||
import { getDisciplineRecord } from '@/api/xskh/disciplineRecord/disciplineRecord';
|
||||
import { getDisciplineRevokeByRecordId } from '@/api/xskh/disciplineRevoke/disciplineRevoke';
|
||||
|
||||
interface Props {}
|
||||
|
||||
const emit = defineEmits(['success']);
|
||||
|
||||
// 使用getCurrentInstance获取上下文
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
const { student_discipline_status, student_revoke_status } = toRefs<any>(proxy?.useDict('student_discipline_status', 'student_revoke_status'));
|
||||
|
||||
// 对话框状态
|
||||
const dialog = reactive({
|
||||
visible: false,
|
||||
title: '查看撤销申请'
|
||||
});
|
||||
|
||||
// 违纪记录信息
|
||||
const disciplineRecord = ref<any>({});
|
||||
const disciplineAttachmentList = ref<any[]>([]);
|
||||
|
||||
// 撤销申请信息
|
||||
const revokeData = ref<any>({});
|
||||
const revokeAttachmentList = ref<any[]>([]);
|
||||
|
||||
/** 打开弹窗 */
|
||||
const openDialog = async (disciplineRecordId: string | number) => {
|
||||
dialog.visible = true;
|
||||
resetData();
|
||||
|
||||
try {
|
||||
// 加载违纪记录信息
|
||||
const disciplineRes = await getDisciplineRecord(disciplineRecordId);
|
||||
disciplineRecord.value = disciplineRes.data;
|
||||
|
||||
// 加载撤销申请信息
|
||||
const revokeRes = await getDisciplineRevokeByRecordId(disciplineRecordId);
|
||||
if (revokeRes.data) {
|
||||
revokeData.value = revokeRes.data;
|
||||
await handleRevokeAttachmentData();
|
||||
} else {
|
||||
ElMessage.warning('该违纪记录暂无撤销申请记录');
|
||||
}
|
||||
|
||||
// 处理违纪记录附件数据
|
||||
await handleDisciplineAttachmentData();
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error);
|
||||
ElMessage.error('加载数据失败');
|
||||
}
|
||||
};
|
||||
|
||||
/** 重置数据 */
|
||||
const resetData = () => {
|
||||
disciplineRecord.value = {};
|
||||
revokeData.value = {};
|
||||
disciplineAttachmentList.value = [];
|
||||
revokeAttachmentList.value = [];
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
dialog.visible = false;
|
||||
resetData();
|
||||
};
|
||||
|
||||
// 文件处理方法
|
||||
const isImageFile = (file: any) => {
|
||||
const imageTypes = ['image/jpeg', 'image/png', 'image/gif', 'image/bmp', 'image/webp'];
|
||||
return imageTypes.includes(file.raw?.type) || (file.url && /\.(jpg|jpeg|png|gif|bmp|webp)$/i.test(file.name));
|
||||
};
|
||||
|
||||
const getFileOssId = (file: any) => {
|
||||
return file.ossId || '';
|
||||
};
|
||||
|
||||
const getFileExt = (fileName: string) => {
|
||||
const ext = fileName.split('.').pop()?.toUpperCase();
|
||||
return ext || 'FILE';
|
||||
};
|
||||
|
||||
const getShortFileName = (fileName: string) => {
|
||||
if (!fileName) return '';
|
||||
const lastDotIndex = fileName.lastIndexOf('.');
|
||||
if (lastDotIndex === -1) {
|
||||
return fileName.length > 12 ? fileName.substring(0, 12) + '...' : fileName;
|
||||
}
|
||||
const name = fileName.substring(0, lastDotIndex);
|
||||
const ext = fileName.substring(lastDotIndex);
|
||||
if (name.length <= 8) {
|
||||
return fileName;
|
||||
}
|
||||
return name.substring(0, 8) + '...' + ext;
|
||||
};
|
||||
|
||||
const handleDownloadAttachment = async (file: any) => {
|
||||
let downloadUrl = '';
|
||||
let fileName = file.name || 'attachment';
|
||||
|
||||
if (file.response && file.response.data && file.response.data.filePath) {
|
||||
downloadUrl = file.response.data.filePath;
|
||||
fileName = file.response.data.fileName || fileName;
|
||||
} else if (file.ossId) {
|
||||
downloadUrl = file.ossId;
|
||||
} else if (file.raw) {
|
||||
const link = document.createElement('a');
|
||||
link.href = URL.createObjectURL(file.raw);
|
||||
link.download = fileName;
|
||||
link.style.display = 'none';
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
URL.revokeObjectURL(link.href);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!downloadUrl) {
|
||||
ElMessage.error('无法获取文件下载地址');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const loading = ElLoading.service({
|
||||
text: '正在下载文件...',
|
||||
target: document.body
|
||||
});
|
||||
|
||||
const response = await request({
|
||||
url: '/resource/oss/download/' + downloadUrl,
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
timeout: 300000
|
||||
});
|
||||
|
||||
if (!response) {
|
||||
throw new Error('响应数据为空');
|
||||
}
|
||||
|
||||
let blobData: Blob;
|
||||
if (response instanceof Blob) {
|
||||
blobData = response;
|
||||
} else if (response.data instanceof Blob) {
|
||||
blobData = response.data;
|
||||
} else {
|
||||
throw new Error('无效的响应数据格式');
|
||||
}
|
||||
|
||||
const url = window.URL.createObjectURL(blobData);
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = fileName;
|
||||
link.style.display = 'none';
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
window.URL.revokeObjectURL(url);
|
||||
loading?.close();
|
||||
} catch (error) {
|
||||
console.error('下载文件失败:', error);
|
||||
ElMessage.error('下载文件失败,请稍后重试');
|
||||
}
|
||||
};
|
||||
|
||||
const handleDisciplineAttachmentData = async () => {
|
||||
try {
|
||||
if (!disciplineRecord.value.attachmentOssIds || !disciplineRecord.value.attachmentOssIds.toString().trim()) {
|
||||
disciplineAttachmentList.value = [];
|
||||
return;
|
||||
}
|
||||
|
||||
const ossIdsArray = disciplineRecord.value.attachmentOssIds
|
||||
.toString()
|
||||
.split(',')
|
||||
.map((id: string) => id.trim())
|
||||
.filter((id: string) => id);
|
||||
|
||||
if (ossIdsArray.length === 0) {
|
||||
disciplineAttachmentList.value = [];
|
||||
return;
|
||||
}
|
||||
|
||||
const response = await request({
|
||||
url: `/resource/oss/listByIds/${ossIdsArray.join(',')}`,
|
||||
method: 'get'
|
||||
});
|
||||
|
||||
if (response.code === 200 && response.data) {
|
||||
const attachmentFiles = response.data.map((item: any, index: number) => ({
|
||||
uid: `discipline_${index}_${Date.now()}`,
|
||||
name: item.originalName || `附件${index + 1}`,
|
||||
url: item.url,
|
||||
ossId: item.ossId,
|
||||
status: 'success'
|
||||
}));
|
||||
|
||||
disciplineAttachmentList.value = attachmentFiles;
|
||||
} else {
|
||||
disciplineAttachmentList.value = [];
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('处理违纪记录附件数据失败:', error);
|
||||
disciplineAttachmentList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const handleRevokeAttachmentData = async () => {
|
||||
try {
|
||||
if (!revokeData.value.revokeEvidence || !revokeData.value.revokeEvidence.toString().trim()) {
|
||||
revokeAttachmentList.value = [];
|
||||
return;
|
||||
}
|
||||
|
||||
const ossIdsArray = revokeData.value.revokeEvidence
|
||||
.toString()
|
||||
.split(',')
|
||||
.map((id: string) => id.trim())
|
||||
.filter((id: string) => id);
|
||||
|
||||
if (ossIdsArray.length === 0) {
|
||||
revokeAttachmentList.value = [];
|
||||
return;
|
||||
}
|
||||
|
||||
const response = await request({
|
||||
url: `/resource/oss/listByIds/${ossIdsArray.join(',')}`,
|
||||
method: 'get'
|
||||
});
|
||||
|
||||
if (response.code === 200 && response.data) {
|
||||
const attachmentFiles = response.data.map((item: any, index: number) => ({
|
||||
uid: `revoke_${index}_${Date.now()}`,
|
||||
name: item.originalName || `撤销证明${index + 1}`,
|
||||
url: item.url,
|
||||
ossId: item.ossId,
|
||||
status: 'success'
|
||||
}));
|
||||
|
||||
revokeAttachmentList.value = attachmentFiles;
|
||||
} else {
|
||||
revokeAttachmentList.value = [];
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('处理撤销申请附件数据失败:', error);
|
||||
revokeAttachmentList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
// 暴露方法给父组件使用
|
||||
defineExpose({
|
||||
openDialog
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.section-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.discipline-record-section {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.revoke-info-section {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* 表单字段值样式 */
|
||||
.form-field-value {
|
||||
padding: 0 11px;
|
||||
background: #f8f9fa;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #606266;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.textarea-value {
|
||||
min-height: 80px;
|
||||
height: auto;
|
||||
padding: 8px 11px;
|
||||
align-items: flex-start;
|
||||
line-height: 1.5;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
/* 文件卡片样式 */
|
||||
.upload-file-card {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.upload-file-card:hover {
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.upload-file-thumb {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 110px;
|
||||
background: #f5f5f5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.upload-thumb-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.upload-file-placeholder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #909399;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.upload-file-placeholder .el-icon {
|
||||
font-size: 28px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.file-ext {
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.upload-file-name {
|
||||
padding: 6px 8px;
|
||||
font-size: 11px;
|
||||
color: #303133;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
background: #fafafa;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
line-height: 1.2;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
word-break: break-all;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.upload-file-card-actions {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 6px 8px;
|
||||
background: #fafafa;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
transition: all 0.3s;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.upload-file-card-actions .el-button {
|
||||
padding: 4px 8px;
|
||||
border: 1px solid #e0e0e0;
|
||||
background: #fff;
|
||||
font-size: 12px;
|
||||
border-radius: 3px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.upload-file-card-actions .el-button:hover {
|
||||
background: #f5f5f5;
|
||||
border-color: #409eff;
|
||||
}
|
||||
|
||||
/* 查看模式下的附件网格展示 */
|
||||
.attachment-view-container {
|
||||
width: 100%;
|
||||
max-height: calc(100vh - 650px);
|
||||
min-height: 200px;
|
||||
overflow-y: auto;
|
||||
padding-right: 8px;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 6px;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.attachment-view-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
gap: 9px;
|
||||
margin: 12px;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,292 @@
|
||||
<template>
|
||||
<div class="p-2 page-container">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="学号" prop="studentNo">
|
||||
<el-input v-model="queryParams.studentNo" placeholder="请输入学号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="学生姓名" prop="studentName">
|
||||
<el-input v-model="queryParams.studentName" placeholder="请输入学生姓名" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option v-for="dict in student_discipline_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" class="search-btn-container">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<right-toolbar :showSearch="showSearch" @update:showSearch="showSearch = $event" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" border :data="disciplineRecordList" @selection-change="handleSelectionChange" class="full-width-table">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="学号" align="center" prop="studentNo" min-width="120" />
|
||||
<el-table-column label="学生姓名" align="center" prop="studentName" min-width="100" />
|
||||
<el-table-column label="学院名称" align="center" prop="collegeName" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="专业名称" align="center" prop="majorName" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="班级名称" align="center" prop="className" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column label="违纪处分类型" align="center" prop="disciplineTypeName" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="违纪处分日期" align="center" prop="disciplineDate" min-width="130" />
|
||||
<el-table-column label="扣分分值" align="center" prop="scoreDeduction" min-width="100">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.scoreDeduction ? parseFloat(scope.row.scoreDeduction).toFixed(2) : '0.00' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status" min-width="80">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="student_discipline_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="250">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="查看" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['disciplineRecord:disciplineRecord:query']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="撤销申请" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="warning"
|
||||
icon="EditPen"
|
||||
@click="handleRevokeApply(scope.row)"
|
||||
v-hasPermi="['disciplineRevoke:student:apply']"
|
||||
:disabled="scope.row.status !== '1'"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="查看撤销申请" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="info"
|
||||
icon="Document"
|
||||
@click="handleViewRevoke(scope.row)"
|
||||
v-hasPermi="['disciplineRevoke:student:query']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
|
||||
<!-- 添加或修改学生违纪处分记录对话框 -->
|
||||
<DisciplineRecordForm ref="disciplineRecordFormRef" @success="handleSuccess" />
|
||||
|
||||
<!-- 撤销申请弹窗 -->
|
||||
<RevokeApplicationForm ref="revokeApplicationFormRef" @success="handleSuccess" />
|
||||
|
||||
<!-- 查看撤销申请弹窗 -->
|
||||
<RevokeApplicationView ref="revokeApplicationViewRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="DisciplineRecord" lang="ts">
|
||||
import { ref, reactive, toRefs, onMounted, getCurrentInstance, ComponentInternalInstance } from 'vue';
|
||||
import { listMyDisciplineRecord, getDisciplineRecord } from '@/api/xskh/disciplineRecord/disciplineRecord';
|
||||
import {
|
||||
DisciplineRecordVO,
|
||||
DisciplineRecordQuery,
|
||||
DisciplineRecordForm as DisciplineRecordFormType
|
||||
} from '@/api/xskh/xsDisciplineRecord/xsDisciplineRecord/types';
|
||||
import DisciplineRecordForm from './DisciplineRecordForm.vue';
|
||||
import RevokeApplicationForm from './RevokeApplicationForm.vue';
|
||||
import RevokeApplicationView from './RevokeApplicationView.vue';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { student_discipline_status } = toRefs<any>(proxy?.useDict('student_discipline_status'));
|
||||
|
||||
const disciplineRecordList = ref<DisciplineRecordVO[]>([]);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const disciplineRecordFormRef = ref<ComponentRef<typeof DisciplineRecordForm>>();
|
||||
const revokeApplicationFormRef = ref<ComponentRef<typeof RevokeApplicationForm>>();
|
||||
const revokeApplicationViewRef = ref<ComponentRef<typeof RevokeApplicationView>>();
|
||||
|
||||
const initFormData: DisciplineRecordForm = {
|
||||
id: undefined,
|
||||
studentId: undefined,
|
||||
studentNo: undefined,
|
||||
studentName: undefined,
|
||||
collegeId: undefined,
|
||||
collegeName: undefined,
|
||||
majorId: undefined,
|
||||
majorName: undefined,
|
||||
classId: undefined,
|
||||
className: undefined,
|
||||
disciplineTypeId: undefined,
|
||||
disciplineTypeName: undefined,
|
||||
disciplineDate: undefined,
|
||||
disciplineReason: undefined,
|
||||
disciplineContent: undefined,
|
||||
scoreDeduction: undefined,
|
||||
status: undefined,
|
||||
approvalStatus: undefined,
|
||||
approvalBy: undefined,
|
||||
approvalTime: undefined,
|
||||
approvalRemark: undefined,
|
||||
attachmentOssIds: undefined
|
||||
};
|
||||
|
||||
const data = reactive<PageData<DisciplineRecordForm, DisciplineRecordQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
studentId: undefined,
|
||||
studentNo: undefined,
|
||||
studentName: undefined,
|
||||
collegeId: undefined,
|
||||
collegeName: undefined,
|
||||
majorId: undefined,
|
||||
majorName: undefined,
|
||||
classId: undefined,
|
||||
className: undefined,
|
||||
disciplineTypeId: undefined,
|
||||
disciplineTypeName: undefined,
|
||||
disciplineDate: undefined,
|
||||
disciplineReason: undefined,
|
||||
disciplineContent: undefined,
|
||||
scoreDeduction: undefined,
|
||||
status: undefined,
|
||||
approvalStatus: undefined,
|
||||
approvalBy: undefined,
|
||||
approvalTime: undefined,
|
||||
approvalRemark: undefined,
|
||||
params: {}
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form } = toRefs(data);
|
||||
|
||||
/** 查询学生违纪处分记录列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listMyDisciplineRecord(queryParams.value);
|
||||
disciplineRecordList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: DisciplineRecordVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 查看按钮操作 */
|
||||
const handleView = (row: DisciplineRecordVO) => {
|
||||
disciplineRecordFormRef.value?.openDialog(row.id, '查看');
|
||||
};
|
||||
|
||||
/** 提交成功回调 */
|
||||
const handleSuccess = () => {
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 撤销申请按钮操作 */
|
||||
const handleRevokeApply = (row: DisciplineRecordVO) => {
|
||||
revokeApplicationFormRef.value?.openDialog(row.id);
|
||||
};
|
||||
|
||||
/** 查看撤销申请按钮操作 */
|
||||
const handleViewRevoke = (row: DisciplineRecordVO) => {
|
||||
revokeApplicationViewRef.value?.openDialog(row.id);
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'disciplineRecord/disciplineRecord/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`disciplineRecord_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 页面容器样式 */
|
||||
.page-container {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
/* 搜索按钮容器样式 */
|
||||
.search-btn-container {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 10px;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* 表格全宽样式 */
|
||||
.full-width-table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 确保表格容器充满宽度 */
|
||||
:deep(.el-table) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 表格内容区域充满宽度 */
|
||||
:deep(.el-table__body-wrapper) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user