package com.fjhx.controller.quality;

import com.fjhx.base.Condition;
import com.fjhx.entity.quality.QualityTestingDetails;
import com.fjhx.params.quality.QualityTestingDetailsVo;
import com.fjhx.service.quality.QualityTestingDetailsService;
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;

/**
 * <p>
 * 质检明细 前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2022-09-26
 */
@RestController
@RequestMapping("/qualityTestingDetails")
public class QualityTestingDetailsController {

    @Autowired
    private QualityTestingDetailsService qualityTestingDetailsService;

    @PostMapping("/add")
    public R add(@RequestBody QualityTestingDetailsVo qualityTestingDetailsVo) {
        qualityTestingDetailsService.add(qualityTestingDetailsVo);
        return R.success();
    }

    @PostMapping("/edit")
    public R edit(@RequestBody QualityTestingDetailsVo qualityTestingDetailsVo) {
        qualityTestingDetailsService.edit(qualityTestingDetailsVo);
        return R.success();
    }

    @PostMapping("/delete")
    public R delete(@RequestBody QualityTestingDetailsVo qualityTestingDetailsVo) {
        qualityTestingDetailsService.delete(qualityTestingDetailsVo);
        return R.success();
    }

}
