From e5a85d904ce028a35229ab6245ab894afbca6531 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期六, 26 七月 2025 17:07:30 +0800 Subject: [PATCH] 维修工单 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcVacationManagementController.java | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcVacationManagementController.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcVacationManagementController.java index 77413c3..46f902d 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcVacationManagementController.java +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcVacationManagementController.java @@ -1,6 +1,7 @@ package org.jeecg.modules.mdc.controller; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -27,7 +28,7 @@ @Slf4j @RestController @Api(tags = "鍋囨湡绠$悊") -@RequestMapping("/mdc/MdcVacationManagement") +@RequestMapping("/mdc/mdcVacationManagement") public class MdcVacationManagementController extends JeecgController<MdcVacationManagement, IMdcVacationManagementService> { @Resource @@ -58,6 +59,9 @@ @ApiOperation(value = "鍋囨湡绠$悊-鏂板", notes = "鍋囨湡绠$悊-鏂板") @PostMapping("/addVacation") public Result<?> addVacation(@RequestBody MdcVacationManagement mdcVacationManagement) { + if (StringUtils.isBlank(mdcVacationManagement.getEquipmentIds())) { + return Result.error("鏈�夋嫨璁惧锛岃鎺掓煡"); + } boolean flag = mdcVacationManagementService.addVacation(mdcVacationManagement); return flag ? Result.ok("鏂板鎴愬姛") : Result.error("鏂板澶辫触"); } @@ -111,9 +115,13 @@ * @param mdcVacationManagement * @return */ + @AutoLog(value = "鍋囨湡绠$悊-瀵煎嚭excel") + @ApiOperation(value = "鍋囨湡绠$悊-瀵煎嚭excel",notes = "鍋囨湡绠$悊-瀵煎嚭excel") @RequestMapping("/exportXls") public ModelAndView exportXls(HttpServletRequest request, MdcVacationManagement mdcVacationManagement) { - return super.exportXls(request, mdcVacationManagement, MdcVacationManagement.class, "鍋囨湡绠$悊瀵煎嚭"); + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + String userId = user.getId(); + return mdcVacationManagementService.exportXls(userId, mdcVacationManagement); } /** -- Gitblit v1.9.3