|
@@ -14,6 +14,7 @@ import com.github.zuihou.business.externalApi.entity.AgvHikOrderDetailInfo;
|
|
|
import com.github.zuihou.business.externalApi.entity.AgvHikOrderInfo;
|
|
|
import com.github.zuihou.business.externalApi.service.AgvHikOrderDetailInfoService;
|
|
|
import com.github.zuihou.business.externalApi.service.AgvHikOrderInfoService;
|
|
|
+import com.github.zuihou.business.operationManagementCenter.dao.TTaskMapper;
|
|
|
import com.github.zuihou.business.util.MsgUtil;
|
|
|
import com.github.zuihou.common.constant.BizConstant;
|
|
|
import com.github.zuihou.common.constant.CacheKey;
|
|
@@ -63,6 +64,8 @@ public class AgvHikOrderInfoServiceImpl extends SuperCacheServiceImpl<AgvHikOrde
|
|
|
private AgvHikOrderDetailInfoService agvHikOrderDetailInfoService;
|
|
|
@Autowired
|
|
|
private MsgUtil msgUtil;
|
|
|
+ @Autowired
|
|
|
+ private TTaskMapper taskMapper;
|
|
|
|
|
|
@Override
|
|
|
protected String getRegion() {
|
|
@@ -265,17 +268,28 @@ public class AgvHikOrderInfoServiceImpl extends SuperCacheServiceImpl<AgvHikOrde
|
|
|
for(int i = 0; i < retAgvStatusArray.size(); i++){
|
|
|
JSONObject agvStatus = new JSONObject();
|
|
|
JSONObject retAgvStatus = retAgvStatusArray.getJSONObject(i);
|
|
|
- agvStatus.put("robotCode",retAgvStatus.getString("robotCode"));
|
|
|
+ agvStatus.put("id",retAgvStatus.getString("robotCode"));
|
|
|
String taskStatus = retAgvStatus.getString("status");
|
|
|
+ agvStatus.put("deviceName",retAgvStatus.getString("robotCode"));
|
|
|
+ agvStatus.put("deviceType","agv");
|
|
|
if(agvWorkList.contains(taskStatus)){
|
|
|
- agvStatus.put("status","生产中");
|
|
|
+ agvStatus.put("monitoringStatus","生产中");
|
|
|
}else if(agvNoWorkList.contains(taskStatus)){
|
|
|
- agvStatus.put("status","空闲");
|
|
|
+ agvStatus.put("monitoringStatus","空闲");
|
|
|
}else if(agvchargingList.contains(taskStatus)){
|
|
|
- agvStatus.put("status","充电中");
|
|
|
+ agvStatus.put("monitoringStatus","充电中");
|
|
|
}else{
|
|
|
- agvStatus.put("status","报警");
|
|
|
+ agvStatus.put("monitoringStatus","报警");
|
|
|
}
|
|
|
+ agvStatus.put("orderName","");
|
|
|
+ agvStatus.put("orderNumber","");
|
|
|
+ agvStatus.put("operationName","");
|
|
|
+ agvStatus.put("productName","");
|
|
|
+ agvStatus.put("productNumber","");
|
|
|
+ agvStatus.put("feedRate","");
|
|
|
+ agvStatus.put("spindleMagnification","");
|
|
|
+ agvStatus.put("spindleSpeed","");
|
|
|
+ agvStatus.put("spindleLoad","");
|
|
|
agvStatusArray.add(agvStatus);
|
|
|
}
|
|
|
return R.success(agvStatusArray.toJSONString());
|
|
@@ -283,4 +297,23 @@ public class AgvHikOrderInfoServiceImpl extends SuperCacheServiceImpl<AgvHikOrde
|
|
|
return R.fail("agv查询状态失败");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设备3D展示数据
|
|
|
+ * @param data
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public R query3dResouceDataInfo(Map<String, String> data){
|
|
|
+ BaseContextHandler.setTenant(BizConstant.TENANT);
|
|
|
+ JSONArray retData = new JSONArray();
|
|
|
+ // 查询当前设备任务及订单信息taskMapper
|
|
|
+ List<Map> resouceDataInfo = taskMapper.query3dResourceData(data);
|
|
|
+ retData.addAll(resouceDataInfo);
|
|
|
+ R retAgvStatus = queryAgvStatus(data);
|
|
|
+ if(retAgvStatus.getIsSuccess()){
|
|
|
+ retData.addAll(JSONArray.parseArray(retAgvStatus.getData().toString()));
|
|
|
+ }
|
|
|
+ return R.success(retData);
|
|
|
+ }
|
|
|
}
|