package com.bonus.material.work.controller;


import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.material.work.domain.SysWorkflowNode;
import com.bonus.material.work.domain.SysWorkflowRecordHistory;
import com.bonus.material.work.service.SysWorkflowRecordHistoryService;
import com.bonus.material.work.service.SysWorkflowRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Api(tags = "工作流详情表")
@RestController
@RequestMapping("/sysWorkflowRecordHistory")
public class SysWorkflowRecordHisController extends BaseController {


    @Resource
    private SysWorkflowRecordHistoryService sysWorkflowRecordHistoryService;

    /**
     * 审批
     */
    @ApiOperation(value = "审批")
    @PostMapping("/update")
    public AjaxResult update(@RequestBody SysWorkflowRecordHistory sysWorkflowRecordHistory)
    {
        try {
            sysWorkflowRecordHistoryService.updateSysWorkflowRecordHistory(sysWorkflowRecordHistory);
            return new AjaxResult(200,"修改成功！");
        }catch (Exception e){
            e.printStackTrace();
            return error();
        }
    }

}
