| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.pojo.AccountExpense; |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.approve.service.IApproveProcessService; |
| | | import com.ruoyi.approve.vo.ApproveGetAndUpdateVo; |
| | |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.text.ParseException; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/approveProcess") |
| | | @AllArgsConstructor |
| | | @Api(tags = "审批") |
| | | public class ApproveProcessController { |
| | | |
| | | @GetMapping("/test") |
| | | public AjaxResult test() { |
| | | System.out.println(1111); |
| | | return AjaxResult.success("测试"); |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private IApproveProcessService approveProcessService; |
| | | /**、 |
| | | * 获取部门列表 |
| | |
| | | @DeleteMapping("/deleteIds") |
| | | @ApiOperation(value = "删除审批") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult deleteIds(@RequestBody Long[] ids) { |
| | | if (ids == null || ids.length == 0) { |
| | | public AjaxResult deleteIds(@RequestBody List<Long> ids) { |
| | | if (ids == null || ids.size() == 0) { |
| | | return AjaxResult.warn("参数不能为空"); |
| | | } |
| | | approveProcessService.delApprove(ids); |
| | |
| | | ExcelUtil<ApproveProcess> util = new ExcelUtil<ApproveProcess>(ApproveProcess.class); |
| | | util.exportExcel(response, accountExpenses, "协同审批导出"); |
| | | } |
| | | |
| | | @ApiOperation(value = "危险作业审批导出") |
| | | @PostMapping("/exportEight") |
| | | 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, "危险作业审批导出"); |
| | | } |
| | | } |