干燥机配套车间生产管理系统/云平台服务端
baoshiwei
2024-11-08 c97a9cd2fc453fcf3b7e7bc1f24e45fa318040a1
jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/mqtt/MqttSampleCallback.java
@@ -273,17 +273,18 @@
          String clientId = mqttUtil.getMqttClient().getClientId();
          String tenant = clientId.substring(clientId.lastIndexOf("_")+1);
          if (tenantId!=null && tenantId.equals(tenant)) {
            TenantContext.setTenant(tenantId);
            // 根据设备编码查询设备信息
            String code = messageJson.getString("code");
            DryEquipment equipmentVo = equipmentService.selectByTenantIdEquipmentId(tenantId,code);
            // 根据设备车间id查询车间信息
            DryShop shop = dryShopService.selectByTenantIdShopId(tenantId, equipmentVo.getShopId());
            DryShop shop = dryShopService.getById(equipmentVo.getShopId());
            // 根据设备类型ID查询设备类型信息
            DryEqpType eqpType = eqpTypeService.selectByTenantIdTypeId(tenantId, equipmentVo.getType());
            DryEqpType eqpType = eqpTypeService.getById(equipmentVo.getType());
            JSONObject res = new JSONObject();
            res.put("tenant", clientId);
            res.put("tenant", tenantId);
            res.put("equipment", equipmentVo);
            res.put("shop", shop);
            res.put("eqpType", eqpType);