|
@@ -7,6 +7,7 @@ import com.yunfeiyun.agmp.iot.common.constant.IotErrorCode;
|
|
|
import com.yunfeiyun.agmp.iot.common.constant.devicetype.IotDeviceDictConst;
|
|
import com.yunfeiyun.agmp.iot.common.constant.devicetype.IotDeviceDictConst;
|
|
|
import com.yunfeiyun.agmp.iot.common.domain.IotDevice;
|
|
import com.yunfeiyun.agmp.iot.common.domain.IotDevice;
|
|
|
import com.yunfeiyun.agmp.iot.common.domain.IotRunHaoSfdata;
|
|
import com.yunfeiyun.agmp.iot.common.domain.IotRunHaoSfdata;
|
|
|
|
|
+import com.yunfeiyun.agmp.iot.common.enums.EnumSfElementType;
|
|
|
import com.yunfeiyun.agmp.iot.common.exception.IotBizException;
|
|
import com.yunfeiyun.agmp.iot.common.exception.IotBizException;
|
|
|
import com.yunfeiyun.agmp.iotm.device.common.service.IotDeviceBaseService;
|
|
import com.yunfeiyun.agmp.iotm.device.common.service.IotDeviceBaseService;
|
|
|
import com.yunfeiyun.agmp.iotm.device.common.service.impl.IotDeviceBaseServiceImpl;
|
|
import com.yunfeiyun.agmp.iotm.device.common.service.impl.IotDeviceBaseServiceImpl;
|
|
@@ -40,13 +41,13 @@ public class IIotSfCommService extends IotDeviceBaseServiceImpl implements IotDe
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 获取已存在的元素列表
|
|
|
|
|
|
|
+ * 获取泵类设备已存在的元素列表
|
|
|
*
|
|
*
|
|
|
* @param reqVo 请求对象,包含设备标识等信息
|
|
* @param reqVo 请求对象,包含设备标识等信息
|
|
|
* @return TableDataInfo 包含响应码、消息、数据和总数
|
|
* @return TableDataInfo 包含响应码、消息、数据和总数
|
|
|
* @throws IotBizException 抛出业务异常,包含错误码和错误信息
|
|
* @throws IotBizException 抛出业务异常,包含错误码和错误信息
|
|
|
*/
|
|
*/
|
|
|
- public TableDataInfo getAlreadyElementList(IotSfElementfactorListReqVo reqVo) {
|
|
|
|
|
|
|
+ public TableDataInfo getPumpAlreadyElementList(IotSfElementfactorListReqVo reqVo) {
|
|
|
TableDataInfo rspData = new TableDataInfo();
|
|
TableDataInfo rspData = new TableDataInfo();
|
|
|
rspData.setCode(ErrorCode.SUCCESS.getCode());
|
|
rspData.setCode(ErrorCode.SUCCESS.getCode());
|
|
|
rspData.setMsg(ErrorCode.SUCCESS.getMessage());
|
|
rspData.setMsg(ErrorCode.SUCCESS.getMessage());
|
|
@@ -62,9 +63,15 @@ public class IIotSfCommService extends IotDeviceBaseServiceImpl implements IotDe
|
|
|
if (findDevice == null) {
|
|
if (findDevice == null) {
|
|
|
throw new IotBizException(IotErrorCode.INVALID_DEVICE_ID.getCode(), "设备不存在");
|
|
throw new IotBizException(IotErrorCode.INVALID_DEVICE_ID.getCode(), "设备不存在");
|
|
|
}
|
|
}
|
|
|
|
|
+ List<String> sfTypeList = new ArrayList<>();
|
|
|
|
|
+ sfTypeList.add(EnumSfElementType.WATER_SOURCE.getCode());
|
|
|
|
|
+ sfTypeList.add(EnumSfElementType.FERILIZER.getCode());
|
|
|
|
|
+ sfTypeList.add(EnumSfElementType.SUCTION.getCode());
|
|
|
|
|
+ sfTypeList.add(EnumSfElementType.MIXING.getCode());
|
|
|
|
|
+ reqVo.setSfTypeList(sfTypeList);
|
|
|
|
|
|
|
|
List<IotSfElementfactorAlreadyListResVo> resVoList = iotSfElementfactorService.getAlreadyElementList(reqVo);
|
|
List<IotSfElementfactorAlreadyListResVo> resVoList = iotSfElementfactorService.getAlreadyElementList(reqVo);
|
|
|
- if (resVoList != null && resVoList.size() > 0){
|
|
|
|
|
|
|
+ if (resVoList != null && !resVoList.isEmpty()){
|
|
|
rspData.setData(resVoList);
|
|
rspData.setData(resVoList);
|
|
|
rspData.setTotal(resVoList.size());
|
|
rspData.setTotal(resVoList.size());
|
|
|
}
|
|
}
|
|
@@ -72,14 +79,14 @@ public class IIotSfCommService extends IotDeviceBaseServiceImpl implements IotDe
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 获取未处理的元素列表
|
|
|
|
|
|
|
+ * 获取泵类未处理的元素列表
|
|
|
* 该接口用于根据请求参数获取未处理的元素列表,并返回相关数据。
|
|
* 该接口用于根据请求参数获取未处理的元素列表,并返回相关数据。
|
|
|
*
|
|
*
|
|
|
* @param reqVo 请求参数,包含设备标识(devBid)等信息
|
|
* @param reqVo 请求参数,包含设备标识(devBid)等信息
|
|
|
* @return TableDataInfo 包含未处理的元素列表的数据封装对象
|
|
* @return TableDataInfo 包含未处理的元素列表的数据封装对象
|
|
|
* @throws IllegalArgumentException 如果devBid为空,则抛出非法参数异常
|
|
* @throws IllegalArgumentException 如果devBid为空,则抛出非法参数异常
|
|
|
*/
|
|
*/
|
|
|
- public TableDataInfo getUnAlreadyElementList(IotSfElementfactorListReqVo reqVo) {
|
|
|
|
|
|
|
+ public TableDataInfo getPumpUnAlreadyElementList(IotSfElementfactorListReqVo reqVo) {
|
|
|
// 由具体子类实现
|
|
// 由具体子类实现
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|