|  |  |  | 
|---|
|  |  |  | import com.doumee.core.annotation.excel.ExcelExporter; | 
|---|
|  |  |  | import com.doumee.core.annotation.pr.PreventRepeat; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.dao.business.dto.DispatchUnitQueryDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.dto.SaveDispatchUnitDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.model.DispatchUnit; | 
|---|
|  |  |  | import com.doumee.service.business.DispatchUnitService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.apache.shiro.SecurityUtils; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | 
|---|
|  |  |  | public ApiResponse create(@RequestBody SaveDispatchUnitDTO saveDispatchUnitDTO) { | 
|---|
|  |  |  | return ApiResponse.success(dispatchUnitService.create(saveDispatchUnitDTO)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("派遣单位审核") | 
|---|
|  |  |  | @PostMapping("/check") | 
|---|
|  |  |  | @RequiresPermissions("business:dispatchunit:check") | 
|---|
|  |  |  | public ApiResponse check(@RequestBody DispatchUnit param) { | 
|---|
|  |  |  | return ApiResponse.success(dispatchUnitService.check(param)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("派遣单位工种审核") | 
|---|
|  |  |  | @PostMapping("/checkWorktype") | 
|---|
|  |  |  | @RequiresPermissions("business:dispatchunit:checkWorktype") | 
|---|
|  |  |  | public ApiResponse checkWorktype(@RequestBody DispatchUnit param) { | 
|---|
|  |  |  | return ApiResponse.success(dispatchUnitService.checkWorktype(param)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID删除") | 
|---|
|  |  |  | @GetMapping("/delete/{id}") | 
|---|
|  |  |  | 
|---|
|  |  |  | dispatchUnitService.deleteByIdInBatch(idList); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("数据列表") | 
|---|
|  |  |  | @PostMapping("/findListByDTO") | 
|---|
|  |  |  | @RequiresPermissions("business:dispatchunit:query") | 
|---|
|  |  |  | public ApiResponse<List<DispatchUnit>> findListByDTO (@RequestBody DispatchUnitQueryDTO dispatchUnitQueryDTO) { | 
|---|
|  |  |  | return ApiResponse.success(dispatchUnitService.findByDTO(dispatchUnitQueryDTO)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID修改") | 
|---|
|  |  |  | @PostMapping("/updateById") | 
|---|
|  |  |  | 
|---|
|  |  |  | @GetMapping("/{id}") | 
|---|
|  |  |  | @RequiresPermissions("business:dispatchunit:query") | 
|---|
|  |  |  | public ApiResponse findById(@PathVariable Integer id) { | 
|---|
|  |  |  | return ApiResponse.success(dispatchUnitService.findById(id)); | 
|---|
|  |  |  | return ApiResponse.success(dispatchUnitService.detailById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|