package com.huimv.getdata.controller;


import com.huimv.getdata.entity.*;
import com.huimv.getdata.service.IErpBdOrgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

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

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2025-01-03
 */
@RestController
@RequestMapping("/erp-bd-org")
public class ErpBdOrgController {
    @Autowired
    private IErpBdOrgService erpBdService;


    @RequestMapping(value = "/getOrg",method = RequestMethod.GET)
    public List<ErpBdOrg> getOrg(){
        return erpBdService.getOrg();
    }

    @RequestMapping(value = "/getDep",method = RequestMethod.GET)
    public List<ErpBdDepartment> getDep(){
        return erpBdService.getDep();
    }

    @RequestMapping(value = "/getMaterial",method = RequestMethod.GET)
    public List<ErpBdMaterial> getMaterial(){
        return erpBdService.getMaterial();
    }


    @RequestMapping(value = "/getMaterialDetail",method = RequestMethod.GET)
    public List<ErpMaterial> getMaterialDetail(@RequestParam(value = "fnumber" ,required = false) String fnumber){
        return erpBdService.getMaterialDetail(fnumber);
    }

    @RequestMapping(value = "/getReagent",method = RequestMethod.GET)
    public List<ErpMaterial> getReagent(@RequestParam(value = "fnumber" ,required = false) String fnumber){
        return erpBdService.getReagent(fnumber);
    }

    @RequestMapping(value = "/getQuail",method = RequestMethod.GET)
    public List<ErpQuali> getQuail(){
        return erpBdService.getQuail();
    }

    @RequestMapping(value = "/getQuailIbit",method = RequestMethod.GET)
    public List<ErpQualiQm> getQuailIbit(){
        return erpBdService.getQuailIbit();
    }

    //原材料
    @RequestMapping(value = "/getMaterialRaw",method = RequestMethod.GET)
    public List<ErpBdMaterial> getMaterialRaw (){
        return erpBdService.getMaterialRaw();
    }
}


