¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.modules.dnc.entity.ProcessSpecVersion; |
| | | import org.jeecg.modules.dnc.response.CommonCode; |
| | | import org.jeecg.modules.dnc.response.ResponseResult; |
| | | import org.jeecg.modules.dnc.service.IProcessSpecVersionService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Slf4j |
| | | @Api(tags = "å·¥èºè§ç¨çæ¬") |
| | | @RestController |
| | | @RequestMapping("/nc/processSpecVersion") |
| | | public class ProcessSpecVersionController extends JeecgController<ProcessSpecVersion, IProcessSpecVersionService> { |
| | | |
| | | @Autowired |
| | | private IProcessSpecVersionService processSpecVersionService; |
| | | |
| | | /** |
| | | * æ ¹æ®å·¥èºè§ç¨idæ¥è¯¢,ä¸çº§å·¥åºå·¥æ¥æ°é |
| | | * @param processSpecId |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å·¥èºè§ç¨çæ¬è¡¨-æ ¹æ®å·¥èºè§ç¨idæ¥è¯¢,ä¸çº§å·¥åºå·¥æ¥æ°é") |
| | | @ApiOperation(value = "å·¥èºè§ç¨çæ¬è¡¨-æ ¹æ®å·¥èºè§ç¨idæ¥è¯¢,ä¸çº§å·¥åºå·¥æ¥æ°é", notes = "å·¥èºè§ç¨çæ¬è¡¨-æ ¹æ®å·¥èºè§ç¨idæ¥è¯¢,ä¸çº§å·¥åºå·¥æ¥æ°é") |
| | | @GetMapping("/getWorkStepCountByProcessSpecId/{processSpecId}") |
| | | public Result<?> getWorkStepCountByProcessSpecId(@PathVariable("processSpecId") String processSpecId) { |
| | | return processSpecVersionService.getProcessSpecVersionCount(processSpecId); |
| | | } |
| | | |
| | | @AutoLog(value = "å·¥èºè§ç¨çæ¬è¡¨-æ°å¢å·¥èºè§ç¨çæ¬ä¿¡æ¯") |
| | | @ApiOperation(value = "å·¥èºè§ç¨çæ¬è¡¨-æ°å¢å·¥èºè§ç¨çæ¬ä¿¡æ¯", notes = "å·¥èºè§ç¨çæ¬è¡¨-æ°å¢å·¥èºè§ç¨çæ¬ä¿¡æ¯") |
| | | @PostMapping("/add") |
| | | public ResponseResult addWorkStep(@RequestBody ProcessSpecVersion processSpecVersion) { |
| | | boolean b = processSpecVersionService.addProcessSpecVersion(processSpecVersion); |
| | | 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 ProcessSpecVersion processSpecVersion) { |
| | | boolean b = processSpecVersionService.editProcessSpecVersion(id, processSpecVersion); |
| | | if(b) { |
| | | return new ResponseResult(CommonCode.SUCCESS); |
| | | } |
| | | return new ResponseResult(CommonCode.FAIL); |
| | | } |
| | | |
| | | @AutoLog(value = "å·¥èºè§ç¨çæ¬è¡¨-å é¤å·¥èºè§ç¨çæ¬ä¿¡æ¯") |
| | | @ApiOperation(value = "å·¥èºè§ç¨çæ¬è¡¨-å é¤å·¥èºè§ç¨çæ¬ä¿¡æ¯", notes = "å·¥èºè§ç¨çæ¬è¡¨-å é¤å·¥èºè§ç¨çæ¬ä¿¡æ¯") |
| | | @DeleteMapping("/delete/{id}") |
| | | public ResponseResult deleteWorkStep(@PathVariable("id") String id) { |
| | | boolean b = processSpecVersionService.deleteProcessSpecVersion(id); |
| | | if(b) { |
| | | return new ResponseResult(CommonCode.SUCCESS); |
| | | } |
| | | return new ResponseResult(CommonCode.FAIL); |
| | | } |
| | | } |