package com.rongwei.bsserver.controller;


import com.rongwei.bscommon.sys.service.ApsProductDetailService;
import com.rongwei.bscommon.sys.service.ApsReportOutputService;
import com.rongwei.bsentity.vo.InsertMyReportOutputReq;
import com.rongwei.rwcommon.base.R;
import lombok.extern.slf4j.Slf4j;
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.Map;

/**
 * <p>
 * 生产订单-产品明细 前端控制器
 * </p>
 *
 * @author sc
 * @since 2024-03-28
 */
@Slf4j
@RestController
@RequestMapping("/apsReportOutput")
public class ApsReportOutputController {
    @Autowired
    private ApsReportOutputService apsReportOutputService;

    /**
     *  插入记录的物料子表
     * @param req
     * @return
     */
    @PostMapping("/insertMyReportOutput")
    public R insertMyReportOutput(@RequestBody InsertMyReportOutputReq req) {
        try {
            log.info("插入记录的物料子表;参数为：{}", req);
            return apsReportOutputService.insertMyReportOutput(req);
        } catch (Exception e) {
            e.printStackTrace();
            return R.error("插入记录的物料子表错误");
        }
    }


}

