package com.fjhx.controller.bom;

import com.fjhx.params.bom.BomDetailsEx;
import com.fjhx.service.bom.BomDetailsService;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * bom明细 前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2022-07-01
 */
@RestController
@RequestMapping("/bomDetails")
public class BomDetailsController {

    @Autowired
    private BomDetailsService bomDetailsService;

    @PostMapping("/list")
    public R list(@RequestBody Map<String, Long> condition) {
        List<BomDetailsEx> result = bomDetailsService.getList(condition);
        return R.success(result);
    }

    // @PostMapping("/add")
    // public R add(@RequestBody BomDetailsVo bomDetailsVo) {
    //     bomDetailsService.add(bomDetailsVo);
    //     return R.success();
    // }
    //
    // @PostMapping("/edit")
    // public R edit(@RequestBody BomDetailsVo bomDetailsVo){
    //     bomDetailsService.edit(bomDetailsVo);
    //     return R.success();
    // }
    //
    // @PostMapping("/delete")
    // public R delete(@RequestBody BomDetailsVo bomDetailsVo){
    //     bomDetailsService.delete(bomDetailsVo);
    //     return R.success();
    // }
    //
    // @PostMapping("/detail")
    // public R detail(@RequestBody BomDetailsVo bomDetailsVo){
    //     BomDetails result = bomDetailsService.detail(bomDetailsVo);
    //     return R.success(result);
    // }

}

