huminmin
5 天以前 7a8827c634b53bb1cb861ebc1fd4ac6d1ae6cb5a
src/main/java/com/ruoyi/approve/controller/ApproveNodeController.java
@@ -2,10 +2,18 @@
import com.ruoyi.approve.pojo.ApproveNode;
import com.ruoyi.approve.service.IApproveNodeService;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.domain.AjaxResult;
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;
@Api(tags = "审批记录")
@RestController
@RequestMapping("/approveNode")
public class ApproveNodeController {
@@ -18,6 +26,8 @@
     * @return
     */
    @GetMapping("/details/{id}")
    @ApiOperation(value = "流程状态详情")
    @Log(title = "流程状态详情", businessType = BusinessType.OTHER)
    public AjaxResult details(@PathVariable String id) {
        return AjaxResult.success(approveNodeService.details(id));
    }
@@ -28,7 +38,10 @@
     * @return
     */
    @PostMapping("/updateApproveNode")
    public AjaxResult updateApproveNode(@RequestBody ApproveNode approveNode) {
    @Transactional(rollbackFor = Exception.class)
    @ApiOperation(value = "审批节点")
    @Log(title = "审批节点", businessType = BusinessType.OTHER)
    public AjaxResult updateApproveNode(@RequestBody ApproveNode approveNode) throws IOException {
        approveNodeService.updateApproveNode(approveNode);
        return AjaxResult.success();
    }
@@ -39,6 +52,7 @@
     * @return
     */
    @PostMapping("/init")
    @Log(title = "初始化审批节点", businessType = BusinessType.OTHER)
    public AjaxResult init(String id) {
        approveNodeService.initApproveNodes("",id,1L);
        return AjaxResult.success();