| | |
| | | import com.ycl.api.BasePageVO; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.dto.UmsDepartDto; |
| | | import com.ycl.entity.depart.UmsDepart; |
| | | import com.ycl.service.depart.UmsDepartService; |
| | | import com.ycl.service.user.UmsDepartManageService; |
| | | import com.ycl.utils.EasyExcelUtils; |
| | | import com.ycl.utils.auth.UserAuthUtil; |
| | | import com.ycl.vo.depart.DepartVO; |
| | | import com.ycl.vo.depart.UmsDepartVO; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | return CommonResult.success(page); |
| | | } |
| | | |
| | | @ApiOperation("部门导出") |
| | | @PostMapping("/export") |
| | | public void exportDpt(HttpServletResponse response) { |
| | | List<UmsDepartDto> umsDepartDtos = departService.departExp(); |
| | | String sheetName = "部门导出"; |
| | | EasyExcelUtils.export(response, sheetName, UmsDepartDto.class, umsDepartDtos); |
| | | } |
| | | |
| | | @ApiOperation("部门导入") |
| | | @PostMapping("/import") |
| | | public CommonResult importDpt(MultipartFile file) throws IOException { |
| | | EasyExcelUtils.importDepartFile(file); |
| | | return CommonResult.success(true, "导入成功"); |
| | | } |
| | | |
| | | @ApiOperation("查询我的部门") |
| | | @GetMapping(value = "/belongDepart") |
| | | public CommonResult<BasePageDTO> belongDepart(BasePageVO params) { |