¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.dnc.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.modules.dnc.entity.WorkStep; |
| | | import org.jeecg.modules.dnc.response.CommonCode; |
| | | import org.jeecg.modules.dnc.response.ResponseResult; |
| | | import org.jeecg.modules.dnc.service.IProductMixService; |
| | | import org.jeecg.modules.dnc.service.IWorkStepService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Api(tags = "å·¥æ¥è¡¨") |
| | | @RestController |
| | | @RequestMapping("/nc/workStep") |
| | | public class WorkStepController extends JeecgController<WorkStep, IWorkStepService> { |
| | | @Autowired |
| | | private IWorkStepService iWorkStepService; |
| | | @Autowired |
| | | private IProductMixService iProductMixService; |
| | | |
| | | @AutoLog(value = "å·¥æ¥è¡¨-æ°å¢å·¥æ¥ä¿¡æ¯") |
| | | @ApiOperation(value = "å·¥æ¥è¡¨-æ°å¢å·¥æ¥ä¿¡æ¯", notes = "å·¥æ¥è¡¨-æ°å¢å·¥æ¥ä¿¡æ¯") |
| | | @PostMapping("/add") |
| | | public ResponseResult addWorkStep(@RequestBody WorkStep workStep) { |
| | | boolean b = iWorkStepService.addWorkStep(workStep); |
| | | if(b) { |
| | | return new ResponseResult(CommonCode.SUCCESS); |
| | | } |
| | | return new ResponseResult(CommonCode.FAIL); |
| | | } |
| | | |
| | | @AutoLog(value = "å·¥æ¥è¡¨-ç¼è¾å·¥æ¥ä¿¡æ¯") |
| | | @ApiOperation(value = "å·¥æ¥è¡¨-ç¼è¾å·¥æ¥ä¿¡æ¯", notes = "å·¥æ¥è¡¨-ç¼è¾å·¥æ¥ä¿¡æ¯") |
| | | @PutMapping("/edit/{id}") |
| | | public ResponseResult editWorkStep(@PathVariable("id") String id,@RequestBody WorkStep workStep) { |
| | | boolean b = iWorkStepService.editWorkStep(id, workStep); |
| | | if(b) { |
| | | return new ResponseResult(CommonCode.SUCCESS); |
| | | } |
| | | return new ResponseResult(CommonCode.FAIL); |
| | | } |
| | | |
| | | } |