//package com.srs.web.controller.dormitory;
//
//
//import com.srs.common.core.controller.BaseController;
//import com.srs.common.core.domain.AjaxResult;
//import com.srs.common.core.page.TableDataInfo;
//import com.srs.dormitory.domain.Dto.AddDmsOffcampusApplicationDto;
//import com.srs.dormitory.domain.Dto.ApplicationListDto;
//import com.srs.dormitory.service.IDmsOffcampusApplicationService;
//import com.srs.dormitory.utils.DmsOperationLog;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiParam;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.security.access.prepost.PreAuthorize;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.ArrayList;
//import java.util.List;
//import java.util.Map;
//
///**
// * <p>
// * 外宿申请表 前端控制器
// * </p>
// *
// * @author szz
// * @since 2023年08月03日
// */
//@Api(tags = "外宿申请表管理")
//@RestController
//@RequestMapping("/dormitory/dms-offcampus-application")
//public class DmsOffcampusApplicationController extends BaseController {
//    @Autowired
//    private IDmsOffcampusApplicationService dmsOffcampusApplicationService;
//
////    @PreAuthorize("@ss.hasPermi('dormitory:dms-offcampus-application:add')")
//    @ApiOperation("提交外宿申请")
//    @PostMapping("/add")
//    public AjaxResult addDmsOffcampusApplication(@RequestBody @Validated AddDmsOffcampusApplicationDto applicationDto){
//        return dmsOffcampusApplicationService.addDmsOffcampusApplication(applicationDto);
//    }
//
////    @PreAuthorize("@ss.hasPermi('dormitory:dms-offcampus-application:query')")
//    @ApiOperation("查看外宿申请详情")
//    @GetMapping("/{id}")
//    public AjaxResult getDmsOffcampusApplication(@ApiParam(value = "外宿申请表ID") @PathVariable Long id){
//        return dmsOffcampusApplicationService.getDmsOffcampusApplication(id);
//    }
//
////    @PreAuthorize("@ss.hasPermi('dormitory:dms-offcampus-application:list')")
//    @ApiOperation("查看外宿申请表列表")
//    @PostMapping("/list")
//    public TableDataInfo getDmsOffcampusApplicationList(@RequestBody ApplicationListDto applicationListDto){
//        List<Map<String, Object>> list = dmsOffcampusApplicationService.getDmsOffcampusApplicationList(applicationListDto);
//        return getDataTable(list);
//    }
//
////    @PreAuthorize("@ss.hasPermi('dormitory:dms-offcampus-application:remove')")
//    @ApiOperation("删除外宿申请表")
//    @PostMapping("/delete/{id}")
//    public AjaxResult deleteDmsOffcampusApplication(@PathVariable Long id){
//        List<Long> ids = new ArrayList<>();
//        ids.add(id);
//        return dmsOffcampusApplicationService.batchDeleteDmsOffcampusApplication(ids);
//    }
////    @PreAuthorize("@ss.hasPermi('dormitory:dms-offcampus-application:remove')")
//    @ApiOperation("批量删除外宿申请表")
//    @PostMapping("/batch/delete")
//    public AjaxResult batchDeleteDmsOffcampusApplication(@RequestBody List<Long> ids){
//        return dmsOffcampusApplicationService.batchDeleteDmsOffcampusApplication(ids);
//    }
//}
//
