| | |
| | | package com.mes.edgstoragecage.service; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import com.mes.damage.entity.request.DamageRequest; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | |
| | | * @param stationCell |
| | | * @return |
| | | */ |
| | | List<CutDrawingVO> queryCurrentCutDrawing(int deviceId, int stationCell); |
| | | JSONObject queryCurrentCutDrawing(int deviceId, int stationCell); |
| | | |
| | | /** |
| | | * 按照工程id及版序获取切割版图 默认版序为1 |
| | |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.lang.Assert; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | |
| | | EdgGlassTaskInfoService edgGlassTaskInfoService; |
| | | |
| | | @Override |
| | | public List<CutDrawingVO> queryCurrentCutDrawing(int deviceId, int stationCell) { |
| | | public JSONObject queryCurrentCutDrawing(int deviceId, int stationCell) { |
| | | // 获取本条线当前正在执行的工程 |
| | | Engineering engineering = engineeringMapper.selectOne(new LambdaQueryWrapper<Engineering>() |
| | | .eq(Engineering::getState, 1).eq(Engineering::getStationCell, stationCell)); |
| | |
| | | patternSequence = lastGlass.getPatternSequence(); |
| | | } |
| | | } |
| | | return baseMapper.queryCutDrawingByEngineerId(engineering.getEngineerId(), patternSequence, 0); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | List<CutDrawingVO> currentCutDrawings = baseMapper.queryCutDrawingByEngineerId(engineering.getEngineerId(), patternSequence, 0); |
| | | jsonObject.append("currentCutTerritory", currentCutDrawings); |
| | | jsonObject.append("engineer", engineering.getEngineerId()); |
| | | jsonObject.append("sequence", patternSequence); |
| | | return jsonObject; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | public void currentCutDrawingTaskChild(String webSocketName, int deviceId, int stationCell) { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | List<CutDrawingVO> currentCutDrawings = edgStorageCageDetailsService.queryCurrentCutDrawing(deviceId, stationCell); |
| | | jsonObject.append("currentCutTerritory", currentCutDrawings); |
| | | |
| | | JSONObject jsonObject = edgStorageCageDetailsService.queryCurrentCutDrawing(deviceId, stationCell); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get(webSocketName); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | |
| | | package com.mes.taskcache.controller; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import com.mes.damage.entity.request.DamageRequest; |
| | | import com.mes.edgstoragecage.entity.vo.CutDrawingVO; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageDetailsService; |
| | |
| | | |
| | | @ApiOperation("识别显示:当前版图,需要当前卧式理片设备id、上片线路") |
| | | @PostMapping("/queryCurrentCutDrawing") |
| | | public Result queryCurrentCutDrawing(int deviceId, int stationCell) { |
| | | List<CutDrawingVO> cutDrawingVOS = edgStorageCageDetailsService.queryCurrentCutDrawing(deviceId, stationCell); |
| | | return Result.build(200, "成功", cutDrawingVOS); |
| | | public Result<JSONObject> queryCurrentCutDrawing(int deviceId, int stationCell) { |
| | | JSONObject jsonObject = edgStorageCageDetailsService.queryCurrentCutDrawing(deviceId, stationCell); |
| | | return Result.build(200, "成功", jsonObject); |
| | | } |
| | | |
| | | @ApiOperation("识别操作: 破损/拿走 参数(ID,功能[9:拿走,8:破损])") |