Merge branch 'main' of http://47.112.118.149:10082/xgxt_sd/zhxg_java
This commit is contained in:
@@ -23,7 +23,7 @@ import com.srs.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 消息Controller
|
||||
*
|
||||
*
|
||||
* @author srs
|
||||
* @date 2023-07-12
|
||||
*/
|
||||
@@ -103,4 +103,13 @@ public class CphMsgController extends BaseController
|
||||
{
|
||||
return toAjax(cphMsgService.deleteCphMsgByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据学号查询用户ID
|
||||
*/
|
||||
@GetMapping("/getUserIdByStuNo/{stuNo}")
|
||||
public AjaxResult getUserIdByStuNo(@PathVariable("stuNo") String stuNo)
|
||||
{
|
||||
return success(cphMsgService.getUserIdByStuNo(stuNo));
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,6 @@
|
||||
package com.srs.web.controller.routine;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.srs.routine.domain.NotificationManagement;
|
||||
import com.srs.routine.domain.dto.SendNotificationDto;
|
||||
import com.srs.routine.service.INotificationManagementService;
|
||||
@@ -31,17 +29,6 @@ public class NotificationManagementController extends BaseController {
|
||||
@Autowired
|
||||
private INotificationManagementService notificationManagementService;
|
||||
|
||||
/**
|
||||
* 查询通知管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('routine:NotificationManagement:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询通知管理列表")
|
||||
public TableDataInfo list(NotificationManagement notificationManagement) {
|
||||
startPage();
|
||||
List<NotificationManagement> list = notificationManagementService.selectNotificationManagementList(notificationManagement);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出通知管理列表
|
||||
@@ -50,7 +37,8 @@ public class NotificationManagementController extends BaseController {
|
||||
@Log(title = "通知管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ApiOperation("导出通知管理列表")
|
||||
public void export(HttpServletResponse response, NotificationManagement notificationManagement) {
|
||||
public void export(HttpServletResponse response, NotificationManagement notificationManagement)
|
||||
{
|
||||
List<NotificationManagement> list = notificationManagementService.selectNotificationManagementList(notificationManagement);
|
||||
ExcelUtil<NotificationManagement> util = new ExcelUtil<NotificationManagement>(NotificationManagement.class);
|
||||
util.exportExcel(response, list, "通知管理数据");
|
||||
@@ -62,7 +50,8 @@ public class NotificationManagementController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('routine:NotificationManagement:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取通知管理详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(notificationManagementService.selectNotificationManagementById(id));
|
||||
}
|
||||
|
||||
@@ -73,7 +62,8 @@ public class NotificationManagementController extends BaseController {
|
||||
@Log(title = "通知管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增通知管理")
|
||||
public AjaxResult add(@RequestBody NotificationManagement notificationManagement) {
|
||||
public AjaxResult add(@RequestBody NotificationManagement notificationManagement)
|
||||
{
|
||||
return toAjax(notificationManagementService.insertNotificationManagement(notificationManagement));
|
||||
}
|
||||
|
||||
@@ -84,7 +74,8 @@ public class NotificationManagementController extends BaseController {
|
||||
@Log(title = "通知管理", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("修改通知管理")
|
||||
public AjaxResult edit(@RequestBody NotificationManagement notificationManagement) {
|
||||
public AjaxResult edit(@RequestBody NotificationManagement notificationManagement)
|
||||
{
|
||||
return toAjax(notificationManagementService.updateNotificationManagement(notificationManagement));
|
||||
}
|
||||
|
||||
@@ -95,8 +86,20 @@ public class NotificationManagementController extends BaseController {
|
||||
@Log(title = "通知管理", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/{ids}")
|
||||
@ApiOperation("删除通知管理")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(notificationManagementService.deleteNotificationManagementByIds(ids));
|
||||
public AjaxResult remove(@PathVariable String ids)
|
||||
{
|
||||
// 处理逗号分隔的ID字符串
|
||||
String[] idArray = ids.split(",");
|
||||
Long[] idLongArray = new Long[idArray.length];
|
||||
for (int i = 0; i < idArray.length; i++) {
|
||||
idLongArray[i] = Long.parseLong(idArray[i]);
|
||||
}
|
||||
|
||||
if (idLongArray.length == 1) {
|
||||
return toAjax(notificationManagementService.deleteNotificationManagementById(idLongArray[0]));
|
||||
} else {
|
||||
return toAjax(notificationManagementService.deleteNotificationManagementByIds(idLongArray));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -105,7 +108,8 @@ public class NotificationManagementController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('routine:NotificationManagement:list')")
|
||||
@GetMapping("/gradeList")
|
||||
@ApiOperation("获取年级列表")
|
||||
public AjaxResult getGradeList() {
|
||||
public AjaxResult getGradeList()
|
||||
{
|
||||
List<SrsGrade> gradeList = notificationManagementService.getGradeList();
|
||||
return success(gradeList);
|
||||
}
|
||||
@@ -117,7 +121,8 @@ public class NotificationManagementController extends BaseController {
|
||||
@Log(title = "按年级发送通知", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/sendByGrades")
|
||||
@ApiOperation("按年级发送通知")
|
||||
public AjaxResult sendNotificationByGrades(@RequestBody SendNotificationDto sendNotificationDto) {
|
||||
public AjaxResult sendNotificationByGrades(@RequestBody SendNotificationDto sendNotificationDto)
|
||||
{
|
||||
int result = notificationManagementService.sendNotificationByGrades(sendNotificationDto);
|
||||
return toAjax(result);
|
||||
}
|
||||
@@ -128,7 +133,8 @@ public class NotificationManagementController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('routine:NotificationManagement:list')")
|
||||
@GetMapping("/my-sent")
|
||||
@ApiOperation("查询当前用户发送的通知列表")
|
||||
public TableDataInfo mySentList(NotificationManagement notificationManagement) {
|
||||
public TableDataInfo mySentList(NotificationManagement notificationManagement)
|
||||
{
|
||||
startPage();
|
||||
List<NotificationManagement> list = notificationManagementService.selectNotificationManagementListBySender(notificationManagement);
|
||||
return getDataTable(list);
|
||||
|
@@ -145,8 +145,16 @@ public class RtStuIdReissueController extends BaseController {
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增学生证补办")
|
||||
public AjaxResult add(@RequestBody RtStuIdReissue rtStuIdReissue) {
|
||||
// rtStuIdReissue.setCounsellorId(SecurityUtils.getUserId());
|
||||
rtStuIdReissue.setCreateBy(SecurityUtils.getUsername());
|
||||
// 检查该学号是否已有申请记录
|
||||
RtStuIdReissue existingApplication = rtStuIdReissueService.selectRtStuIdReissueByStuNo(rtStuIdReissue.getStuNo());
|
||||
if (existingApplication != null) {
|
||||
// 如果已有申请记录且未完成制作,则不允许重复提交
|
||||
if (existingApplication.getInspectionProgress() < 3) {
|
||||
return AjaxResult.error("您已有正在处理的申请,请勿重复提交");
|
||||
}
|
||||
// 如果已完成制作,允许提交新申请,但需要先删除旧记录
|
||||
rtStuIdReissueService.deleteRtStuIdReissueById(existingApplication.getId());
|
||||
}
|
||||
return toAjax(rtStuIdReissueService.insertRtStuIdReissue(rtStuIdReissue));
|
||||
}
|
||||
|
||||
@@ -169,9 +177,30 @@ public class RtStuIdReissueController extends BaseController {
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("修改学生证补办")
|
||||
public AjaxResult edit(@RequestBody RtStuIdReissue rtStuIdReissue) {
|
||||
// 检查当前申请状态,如果已完成制作则不允许修改
|
||||
RtStuIdReissue currentApplication = rtStuIdReissueService.selectRtStuIdReissueById(rtStuIdReissue.getId());
|
||||
if (currentApplication != null && currentApplication.getInspectionProgress() >= 3) {
|
||||
return AjaxResult.error("申请已完成制作,不可修改");
|
||||
}
|
||||
return toAjax(rtStuIdReissueService.updateRtStuIdReissue(rtStuIdReissue));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单个学生证补办申请(学生取消申请)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('routine:stuIdReissue:remove')")
|
||||
@Log(title = "取消学生证补办申请", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/cancel/{id}")
|
||||
@ApiOperation("取消学生证补办申请")
|
||||
public AjaxResult cancelApplication(@PathVariable Long id) {
|
||||
// 先检查审核状态,如果已完成制作则不允许取消
|
||||
RtStuIdReissue rtStuIdReissue = rtStuIdReissueService.selectRtStuIdReissueById(id);
|
||||
if (rtStuIdReissue != null && rtStuIdReissue.getInspectionProgress() >= 3) {
|
||||
return AjaxResult.error("当前审核已完成,不可取消");
|
||||
}
|
||||
return toAjax(rtStuIdReissueService.deleteRtStuIdReissueById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生证补办
|
||||
*/
|
||||
@@ -182,4 +211,6 @@ public class RtStuIdReissueController extends BaseController {
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(rtStuIdReissueService.deleteRtStuIdReissueByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -114,4 +114,15 @@ public class RtStuMultiLevelReviewController extends BaseController {
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(rtStuMultiLevelReviewService.deleteRtStuMultiLevelReviewByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新审核信息并同时更新学生证补办状态
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('routine:stuMultiLevelReview:edit')")
|
||||
@Log(title = "更新审核信息并同时更新学生证补办状态", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/updateWithStuIdReissue")
|
||||
@ApiOperation("更新审核信息并同时更新学生证补办状态")
|
||||
public AjaxResult updateWithStuIdReissue(@RequestBody RtStuMultiLevelReview rtStuMultiLevelReview) {
|
||||
return toAjax(rtStuMultiLevelReviewService.updateRtStuMultiLevelReviewWithStuIdReissue(rtStuMultiLevelReview));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user