| | |
| | | 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; |
| | |
| | | @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("新增失败"); |
| | | } |
| | |
| | | * @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); |
| | | } |
| | | |
| | | /** |