| | |
| | | import com.ruoyi.approve.vo.ApproveProcessVO; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/getDept") |
| | | @Log(title = "获取部门列表", businessType = BusinessType.OTHER) |
| | | public AjaxResult getDept() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | LoginUser user = SecurityUtils.getLoginUser(); |
| | |
| | | @PostMapping("/add") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @ApiOperation(value = "添加审批") |
| | | @Log(title = "添加审批", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody ApproveProcessVO approveProcessVO) throws Exception { |
| | | if (approveProcessVO == null) { |
| | | return AjaxResult.warn("参数不能为空"); |
| | |
| | | */ |
| | | @GetMapping("/get") |
| | | @ApiOperation(value = "审批详情") |
| | | @Log(title = "审批详情", businessType = BusinessType.OTHER) |
| | | public AjaxResult get(ApproveGetAndUpdateVo approveGetAndUpdateVo){ |
| | | if (approveGetAndUpdateVo.getId() == null || approveGetAndUpdateVo.getId().isEmpty()) { |
| | | return AjaxResult.warn("参数不能为空"); |
| | |
| | | @PostMapping("/update") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @ApiOperation(value = "更新审批") |
| | | @Log(title = "更新审批", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody ApproveGetAndUpdateVo approveGetAndUpdateVo) throws IOException { |
| | | if (approveGetAndUpdateVo == null) { |
| | | return AjaxResult.warn("参数不能为空"); |
| | |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "获取审批列表") |
| | | @Log(title = "获取审批列表", businessType = BusinessType.OTHER) |
| | | public AjaxResult list(Page page, ApproveProcess approveProcess) { |
| | | return AjaxResult.success(approveProcessService.listAll(page, approveProcess)); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/deleteIds") |
| | | @ApiOperation(value = "删除审批") |
| | | @Log(title = "删除审批", businessType = BusinessType.DELETE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult deleteIds(@RequestBody List<Long> ids) { |
| | | if (ids == null || ids.size() == 0) { |
| | |
| | | |
| | | @ApiOperation(value = "公出管理导出") |
| | | @PostMapping("/exportOne") |
| | | @Log(title = "公出管理导出", businessType = BusinessType.EXPORT) |
| | | public void exportOne(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | |
| | | |
| | | @ApiOperation(value = "请假管理导出") |
| | | @PostMapping("/exportTwo") |
| | | @Log(title = "请假管理导出", businessType = BusinessType.EXPORT) |
| | | public void exportTwo(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | |
| | | |
| | | @ApiOperation(value = "出差管理导出") |
| | | @PostMapping("/exportThree") |
| | | @Log(title = "出差管理导出", businessType = BusinessType.EXPORT) |
| | | public void exportThree(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | |
| | | |
| | | @ApiOperation(value = "报销管理导出") |
| | | @PostMapping("/exportFour") |
| | | @Log(title = "报销管理导出", businessType = BusinessType.EXPORT) |
| | | public void exportFour(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | |
| | | |
| | | @ApiOperation(value = "采购申请导出") |
| | | @PostMapping("/exportFive") |
| | | @Log(title = "采购申请导出", businessType = BusinessType.EXPORT) |
| | | public void exportFive(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | |
| | | |
| | | @ApiOperation(value = "协同审批导出") |
| | | @PostMapping("/exportZero") |
| | | @Log(title = "协同审批导出", businessType = BusinessType.EXPORT) |
| | | public void exportZero(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | |
| | | ExcelUtil<ApproveProcess> util = new ExcelUtil<ApproveProcess>(ApproveProcess.class); |
| | | util.exportExcel(response, accountExpenses, "协同审批导出"); |
| | | } |
| | | |
| | | @ApiOperation(value = "危险作业审批导出") |
| | | @PostMapping("/exportEight") |
| | | @Log(title = "危险作业审批导出", businessType = BusinessType.EXPORT) |
| | | public void exportEight(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | | .eq(ApproveProcess::getApproveType, 8)); |
| | | ExcelUtil<ApproveProcess> util = new ExcelUtil<ApproveProcess>(ApproveProcess.class); |
| | | util.exportExcel(response, accountExpenses, "危险作业审批导出"); |
| | | } |
| | | } |