| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.MessageSource; |
| | | import org.springframework.context.i18n.LocaleContextHolder; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | DamageService damageService; |
| | | |
| | | // 国际语言库 |
| | | @Resource |
| | | private MessageSource messageSource; |
| | | |
| | | @ApiOperation("开始/暂停任务/传递工程号和状态,开始是1 暂停是0") |
| | | @PostMapping("/pauseTask") //暂停上片任务 |
| | |
| | | @PostMapping("/pause") //暂停上片任务 |
| | | @ResponseBody |
| | | public Result <List<UpPattenUsage>> pause(@RequestBody Engineering engineering) { |
| | | boolean work=engineeringService.pauseTask(engineering.getEngineerId(),engineering.getState()); |
| | | boolean work = engineeringService.pauseTask(engineering.getEngineerId(),engineering.getState()); |
| | | // List<UpPattenUsage> glass = upPattenUsageService.prioritylist();String message; |
| | | if(work){ |
| | | return Result.build(200, "成功", null); |
| | | return Result.build(200, "success", null); |
| | | }else { |
| | | return Result.build(100, "失敗", null); |
| | | return Result.build(500, "fail", null); |
| | | } |
| | | } |
| | | |