| | |
| | | package com.ruoyi.approve.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.approve.pojo.ApproveNode; |
| | | import com.ruoyi.approve.service.IApproveNodeService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | @Api(tags = "审批记录") |
| | | @RestController |
| | | @RequestMapping("/approveNode") |
| | | public class ApproveNodeController { |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/details/{id}") |
| | | @ApiOperation(value = "流程状态详情") |
| | | public AjaxResult details(@PathVariable String id) { |
| | | return AjaxResult.success(approveNodeService.details(id)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/updateApproveNode") |
| | | public AjaxResult updateApproveNode(@RequestBody ApproveNode approveNode) { |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @ApiOperation(value = "审批节点") |
| | | public AjaxResult updateApproveNode(@RequestBody ApproveNode approveNode) throws IOException { |
| | | approveNodeService.updateApproveNode(approveNode); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "采购审核填写库位入库") |
| | | @PostMapping("/purchaseApprove") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult purchaseApprove(@RequestBody List<SalesLedgerProduct> salesLedgerProducts) { |
| | | approveNodeService.purchaseApprove(salesLedgerProducts); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 初始化审批节点 |
| | | * @param id |