package com.huimv.receive.controller;


import com.huimv.receive.common.token.TokenSign;
import com.huimv.receive.common.utils.Result;
import com.huimv.receive.service.IBaseProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * <p>
 * 流程表 前端控制器
 * </p>
 *
 * @author author
 * @since 2023-07-21
 */
@RestController
@RequestMapping("/base-process")
@CrossOrigin
public class BaseProcessController {

    @Autowired
    private IBaseProcessService processService;

    @PostMapping("/getOneById")
    public Result page(@RequestBody Map<String,String> map) {
        return processService.getOne(map);
    }

    @PostMapping("/pageByLocationId")
    public Result pageByLocationId(@RequestBody Map<String,String> map) {
        return processService.pageByLocationId(map);
    }

    @PostMapping("/listAll")
    public Result listAll(HttpServletRequest httpServletRequest,@RequestBody Map<String,String> map) {
        return processService.listAll(httpServletRequest,map);
    }

    @PostMapping("/edit")
    public Result edit(HttpServletRequest httpServletRequest,@RequestBody Map<String,String> map) {
        return processService.edit(httpServletRequest,map);
    }
}
