| | |
| | | |
| | | 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.bean.vo.ApproveGetAndUpdateVo; |
| | | import com.ruoyi.approve.bean.vo.ApproveProcessVO; |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.approve.service.IApproveProcessService; |
| | | import com.ruoyi.approve.vo.ApproveGetAndUpdateVo; |
| | | import com.ruoyi.approve.vo.ApproveProcessVO; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.service.ISysDeptService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.text.ParseException; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | |
| | | @Api(tags = "审批") |
| | | public class ApproveProcessController { |
| | | |
| | | @GetMapping("/test") |
| | | public AjaxResult test() { |
| | | System.out.println(1111); |
| | | return AjaxResult.success("测试"); |
| | | } |
| | | @Autowired |
| | | private ISysDeptService sysDeptService; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | */ |
| | | @GetMapping("/getDept") |
| | | public AjaxResult getDept() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | LoginUser user = SecurityUtils.getLoginUser(); |
| | | Long[] deptIds = SecurityUtils.getDeptId(); |
| | | |
| | | List<SysDept> sysDeptList = approveProcessService.selectDeptListByDeptIds(deptIds); |
| | | List<SysDept> sysDeptList =sysDeptService.selectDeptList(new SysDept()); |
| | | return AjaxResult.success(sysDeptList); |
| | | } |
| | | |
| | |
| | | @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, "危险作业审批导出"); |
| | | } |
| | | } |