| | |
| | | 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; |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @Api(tags = "假期管理") |
| | | @RequestMapping("/mdc/MdcVacationManagement") |
| | | @RequestMapping("/mdc/mdcVacationManagement") |
| | | public class MdcVacationManagementController extends JeecgController<MdcVacationManagement, IMdcVacationManagementService> { |
| | | |
| | | @Resource |
| | |
| | | @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("新增失败"); |
| | | } |