| | |
| | | package com.mes.engineering.controller; |
| | | |
| | | |
| | | |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.entity.request.DamageRequest; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.engineering.entity.Engineering; |
| | | import com.mes.engineering.service.EngineeringService; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | @Autowired |
| | | DamageService damageService; |
| | | |
| | | |
| | | @ApiOperation("开始/暂停任务/传递工程号和状态,开始是1 暂停是0") |
| | | @PostMapping("/pauseTask") //暂停上片任务 |
| | | @ResponseBody |
| | |
| | | if(work){ |
| | | return Result.build(200, "成功", null); |
| | | }else { |
| | | return Result.build(100, "成功", null); |
| | | return Result.build(100, "失敗", null); |
| | | } |
| | | } |
| | | |
| | |
| | | boolean work = engineeringService.changeTasks(engineering); |
| | | List<UpPattenUsage> glass = upPattenUsageService.prioritylist(); |
| | | optimizeProjectService.changeTask(engineering.getEngineerId(), 200); |
| | | return Result.build(200, "已保存过", work); |
| | | return Result.build(200, "开始上片", work); |
| | | } else { |
| | | List<UpPattenUsage> upPattenUsages = upPattenUsageService.selectSaveUpPattenUsage(engineering.getEngineerId()); |
| | | log.info("将查询出的UpPattenUsage数据保存到数据库表里"); |
| | |
| | | return Result.build(200, "操作成功", null); |
| | | } |
| | | |
| | | @ApiOperation("识别操作: 破损/拿走 参数(ID,功能[9:拿走,8:破损])") |
| | | @PostMapping("/identControls") |
| | | public Result<String> identControls(@RequestBody @Validated DamageRequest request) { |
| | | return Result.build(200, "成功", upPattenUsageService.identControls(request)); |
| | | } |
| | | |
| | | } |
| | | |