package com.huimv.admin.controller;


import com.huimv.admin.common.utils.Result;
import com.huimv.admin.entity.ProdProduction;
import com.huimv.admin.service.IProdProductionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

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

/**
 * <p>
 * 生产情况 前端控制器
 * </p>
 *
 * @author author
 * @since 2023-02-22
 */
@RestController
@RequestMapping("/prod-production")
@CrossOrigin
public class ProdProductionController {

    @Autowired
    private IProdProductionService prodProductionService;

    @RequestMapping("/list")
    public Result list(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap) {
        return prodProductionService.list(httpServletRequest,paramsMap);
    }

    @RequestMapping("/add")
    public Result add(HttpServletRequest httpServletRequest, @RequestBody ProdProduction prodProduction) {
        return prodProductionService.add(httpServletRequest,prodProduction);
    }

    @RequestMapping("/listProd")
    public Result listProd(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap) {
        return prodProductionService.listProd(httpServletRequest,paramsMap);
    }

    @RequestMapping("/addProd")
    public Result addProd(HttpServletRequest httpServletRequest, @RequestBody ProdProduction prodProduction) {
        return prodProductionService.addProd(httpServletRequest,prodProduction);
    }

    @RequestMapping("/listScreenProd")
    public Result listScreenProd(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap) {
        return prodProductionService.listScreenProd(httpServletRequest,paramsMap);
    }

    @RequestMapping("/addScreenProd")
    public Result addScreenProd(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap) {
        return prodProductionService.addScreenProd(httpServletRequest,paramsMap);
    }
}
