package com.foreverwin.mesnac.production.controller;

import com.foreverwin.mesnac.meapi.dto.WorkCenterDto;
import com.foreverwin.mesnac.meapi.dto.SfcDto;
import com.foreverwin.mesnac.production.service.PodTemplateService;
import com.foreverwin.modular.core.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("/sfcDataMains")
public class PodTemplateController {

    @Autowired
    public PodTemplateService podTemplateService;

    /**
     * 资源回车
     * @param workCenterDto
     * @return
     */
    @ResponseBody
    @GetMapping("/resrceEnter")
    public R resrceEnter(@RequestBody WorkCenterDto workCenterDto) {
        return R.ok(podTemplateService.resrceEnter(workCenterDto));
    }

    /**
     * sfc回车
     * @param sfcDto
     * @return
     */
    @ResponseBody
    @GetMapping("/sfcEnter")
    public R sfcEnter(@RequestBody SfcDto sfcDto) {
        return R.ok(podTemplateService.sfcEnter(sfcDto));
    }
}
