diff --git a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/api/devlink/service/DevLinkMoistureService.java b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/api/devlink/service/DevLinkMoistureService.java index 71df015..748f1c8 100644 --- a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/api/devlink/service/DevLinkMoistureService.java +++ b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/api/devlink/service/DevLinkMoistureService.java @@ -1,13 +1,9 @@ package com.fastbee.deviceData.api.devlink.service; -import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpUtil; -import cn.hutool.json.JSON; import cn.hutool.json.JSONArray; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; -import com.fastbee.deviceData.api.renke.service.RenkeMetDeviceService; -import com.fastbee.deviceData.mapper.DeviceRealtimedataMeteorologyMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -22,7 +18,7 @@ public class DevLinkMoistureService { private DevLinkAuthorizationService authorizationService; @Autowired - private DeviceRealtimedataMeteorologyMapper deviceRealtimedataMeteorologyMapper; + private DeviceRealtimedataPhotovoltaicMapper deviceRealtimedataPhotovoltaicMapper; /** * 获取设备列表 @@ -62,7 +58,7 @@ public class DevLinkMoistureService { //TODO 属性值历史数据,是否需要 Object list = JSONUtil.parseObj(p).get("list"); //TODO 封装所需数据 - deviceRealtimedataMeteorologyMapper.insertDeviceRealtimedataMeteorology(null); + deviceRealtimedataPhotovoltaicMapper.insertDeviceRealtimedataMeteorology(null); }); diff --git a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/domain/DeviceRealtimedataMeteorology.java b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/domain/DeviceRealtimedataMeteorology.java deleted file mode 100644 index a6a87fa..0000000 --- a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/domain/DeviceRealtimedataMeteorology.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.fastbee.deviceData.domain; - -import java.math.BigDecimal; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.fastbee.common.annotation.Excel; -import com.fastbee.common.core.domain.BaseEntity; - -/** - * 气象设备实时数据对象 iot_device_realtimedata_meteorology - * - * @author kerwincui - * @date 2024-11-13 - */ -@ApiModel(value = "DeviceRealtimedataMeteorology",description = "气象设备实时数据 iot_device_realtimedata_meteorology") -@Data -@EqualsAndHashCode(callSuper = true) -public class DeviceRealtimedataMeteorology extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 主键 */ - private Long id; - - /** 设备id */ - @Excel(name = "设备id") - @ApiModelProperty("设备id") - private Long deviceId; - - /** 空气温度 */ - @Excel(name = "空气温度") - @ApiModelProperty("空气温度") - private BigDecimal airTemp; - - /** 空气湿度 */ - @Excel(name = "空气湿度") - @ApiModelProperty("空气湿度") - private BigDecimal airHumi; - - /** 风速 */ - @Excel(name = "风速") - @ApiModelProperty("风速") - private BigDecimal windSpeed; - - /** 风向 */ - @Excel(name = "风向") - @ApiModelProperty("风向") - private Long windDir; - - /** 大气压力 */ - @Excel(name = "大气压力") - @ApiModelProperty("大气压力") - private BigDecimal airPre; - - /** 光照度 */ - @Excel(name = "光照度") - @ApiModelProperty("光照度") - private Long guangzhao; - - /** 光合有效辐射 */ - @Excel(name = "光合有效辐射") - @ApiModelProperty("光合有效辐射") - private BigDecimal fushe; - - /** 累积雨量 */ - @Excel(name = "累积雨量") - @ApiModelProperty("累积雨量") - private BigDecimal sumRain; - - /** 瞬时雨量 */ - @Excel(name = "瞬时雨量") - @ApiModelProperty("瞬时雨量") - private BigDecimal insRain; - - /** 日雨量 */ - @Excel(name = "日雨量") - @ApiModelProperty("日雨量") - private BigDecimal dayRain; - - /** 蒸发量 */ - @Excel(name = "蒸发量") - @ApiModelProperty("蒸发量") - private BigDecimal zhengfa; - - /** 土壤温度 */ - @Excel(name = "土壤温度") - @ApiModelProperty("土壤温度") - private BigDecimal soilTemp; - - /** 土壤湿度 */ - @Excel(name = "土壤湿度") - @ApiModelProperty("土壤湿度") - private BigDecimal soilHumi; - - /** 删除标志(0代表存在,2代表删除) */ - private Integer delFlag; - -} diff --git a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/domain/DeviceRealtimedataPhotovoltaic.java b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/domain/DeviceRealtimedataPhotovoltaic.java new file mode 100644 index 0000000..32e170d --- /dev/null +++ b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/domain/DeviceRealtimedataPhotovoltaic.java @@ -0,0 +1,262 @@ +package com.fastbee.deviceData.domain; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.fastbee.common.annotation.Excel; +import com.fastbee.common.core.domain.BaseEntity; + +/** + * 光伏设备实时数据对象 iot_device_realtimedata_photovoltaic + * + * @author kerwincui + * @date 2024-11-14 + */ +@ApiModel(value = "DeviceRealtimedataPhotovoltaic",description = "光伏设备实时数据 iot_device_realtimedata_photovoltaic") +@Data +@EqualsAndHashCode(callSuper = true) +public class DeviceRealtimedataPhotovoltaic extends BaseEntity + { +private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 设备id */ + @Excel(name = "设备id") + @ApiModelProperty("设备id") + private Long deviceId; + + /** 1#环境温度 */ + @Excel(name = "1#环境温度") + @ApiModelProperty("1#环境温度") + private BigDecimal airTemp; + + /** 1#设备温度 */ + @Excel(name = "1#设备温度") + @ApiModelProperty("1#设备温度") + private BigDecimal mppTemp; + + /** 1#电池电量 */ + @Excel(name = "1#电池电量") + @ApiModelProperty("1#电池电量") + private Long batteryCap; + + /** 1#电池电压 */ + @Excel(name = "1#电池电压") + @ApiModelProperty("1#电池电压") + private BigDecimal batteryVolt; + + /** 1#电池电流 */ + @Excel(name = "1#电池电流") + @ApiModelProperty("1#电池电流") + private BigDecimal batteryCur; + + /** 1#电池功率 */ + @Excel(name = "1#电池功率") + @ApiModelProperty("1#电池功率") + private BigDecimal batteryPower; + + /** 1#负载电压 */ + @Excel(name = "1#负载电压") + @ApiModelProperty("1#负载电压") + private BigDecimal loadVolt; + + /** 1#负载电流 */ + @Excel(name = "1#负载电流") + @ApiModelProperty("1#负载电流") + private BigDecimal loadCur; + + /** 1#负载功率 */ + @Excel(name = "1#负载功率") + @ApiModelProperty("1#负载功率") + private BigDecimal loadPower; + + /** 1#光伏电压 */ + @Excel(name = "1#光伏电压") + @ApiModelProperty("1#光伏电压") + private BigDecimal photVolt; + + /** 1#光伏电流 */ + @Excel(name = "1#光伏电流") + @ApiModelProperty("1#光伏电流") + private BigDecimal photCur; + + /** 1#光伏功率 */ + @Excel(name = "1#光伏功率") + @ApiModelProperty("1#光伏功率") + private BigDecimal photPower; + + /** 1#当日累计充电量 */ + @Excel(name = "1#当日累计充电量") + @ApiModelProperty("1#当日累计充电量") + private BigDecimal cumChargeDay; + + /** 1#当月累计充电量 */ + @Excel(name = "1#当月累计充电量") + @ApiModelProperty("1#当月累计充电量") + private BigDecimal cumChargeMon; + + /** 1#当年累积充电量 */ + @Excel(name = "1#当年累积充电量") + @ApiModelProperty("1#当年累积充电量") + private BigDecimal cumChargeYear; + + /** 1#总累计充电量 */ + @Excel(name = "1#总累计充电量") + @ApiModelProperty("1#总累计充电量") + private BigDecimal cumChargeAll; + + /** 1#当日累计用电量 */ + @Excel(name = "1#当日累计用电量") + @ApiModelProperty("1#当日累计用电量") + private BigDecimal cumEleDay; + + /** 1#当月累积用电量 */ + @Excel(name = "1#当月累积用电量") + @ApiModelProperty("1#当月累积用电量") + private BigDecimal cumEleMon; + + /** 1#当年累计用电量 */ + @Excel(name = "1#当年累计用电量") + @ApiModelProperty("1#当年累计用电量") + private BigDecimal cumEleYear; + + /** 1#总累积用电量 */ + @Excel(name = "1#总累积用电量") + @ApiModelProperty("1#总累积用电量") + private BigDecimal cumEleAll; + + /** 1#手动控制模式 */ + @Excel(name = "1#手动控制模式") + @ApiModelProperty("1#手动控制模式") + private Long shoudong; + + /** 1#远程通断电 */ + @Excel(name = "1#远程通断电") + @ApiModelProperty("1#远程通断电") + private Long control; + + /** 2#环境温度 */ + @Excel(name = "2#环境温度") + @ApiModelProperty("2#环境温度") + private BigDecimal airTemp2; + + /** 2#设备温度 */ + @Excel(name = "2#设备温度") + @ApiModelProperty("2#设备温度") + private BigDecimal mppTemp2; + + /** 2#电池电量 */ + @Excel(name = "2#电池电量") + @ApiModelProperty("2#电池电量") + private Long batteryCap2; + + /** 2#电池电压 */ + @Excel(name = "2#电池电压") + @ApiModelProperty("2#电池电压") + private BigDecimal batteryVolt2; + + /** 2#电池电流 */ + @Excel(name = "2#电池电流") + @ApiModelProperty("2#电池电流") + private BigDecimal batteryCur2; + + /** 2#电池功率 */ + @Excel(name = "2#电池功率") + @ApiModelProperty("2#电池功率") + private BigDecimal batteryPower2; + + /** 2#负载电压 */ + @Excel(name = "2#负载电压") + @ApiModelProperty("2#负载电压") + private BigDecimal loadVolt2; + + /** 2#负载电流 */ + @Excel(name = "2#负载电流") + @ApiModelProperty("2#负载电流") + private BigDecimal loadCur2; + + /** 2#负载功率 */ + @Excel(name = "2#负载功率") + @ApiModelProperty("2#负载功率") + private BigDecimal loadPower2; + + /** 2#光伏电压 */ + @Excel(name = "2#光伏电压") + @ApiModelProperty("2#光伏电压") + private BigDecimal photVolt2; + + /** 2#光伏电流 */ + @Excel(name = "2#光伏电流") + @ApiModelProperty("2#光伏电流") + private BigDecimal photCur2; + + /** 2#光伏功率 */ + @Excel(name = "2#光伏功率") + @ApiModelProperty("2#光伏功率") + private BigDecimal photPower2; + + /** 2#当日累计充电量 */ + @Excel(name = "2#当日累计充电量") + @ApiModelProperty("2#当日累计充电量") + private BigDecimal cumChargeDay2; + + /** 2#当月累计充电量 */ + @Excel(name = "2#当月累计充电量") + @ApiModelProperty("2#当月累计充电量") + private BigDecimal cumChargeMon2; + + /** 2#当年累积充电量 */ + @Excel(name = "2#当年累积充电量") + @ApiModelProperty("2#当年累积充电量") + private BigDecimal cumChargeYear2; + + /** 2#总累计充电量 */ + @Excel(name = "2#总累计充电量") + @ApiModelProperty("2#总累计充电量") + private BigDecimal cumChargeAll2; + + /** 2#当日累计用电量 */ + @Excel(name = "2#当日累计用电量") + @ApiModelProperty("2#当日累计用电量") + private BigDecimal cumEleDay2; + + /** 2#当年累计用电量 */ + @Excel(name = "2#当年累计用电量") + @ApiModelProperty("2#当年累计用电量") + private BigDecimal cumEleYear2; + + /** 2#总累积用电量 */ + @Excel(name = "2#总累积用电量") + @ApiModelProperty("2#总累积用电量") + private BigDecimal cumEleAll2; + + /** 2#手动控制模式 */ + @Excel(name = "2#手动控制模式") + @ApiModelProperty("2#手动控制模式") + private Long shoudong2; + + /** 2#远程通断电 */ + @Excel(name = "2#远程通断电") + @ApiModelProperty("2#远程通断电") + private Long control2; + + /** 2#当月累计用电量 */ + @Excel(name = "2#当月累计用电量") + @ApiModelProperty("2#当月累计用电量") + private BigDecimal cumEleMon2; + + /** 实时时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "实时时间", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty("实时时间") + private Date realTime; + +} diff --git a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/mapper/DeviceRealtimedataMeteorologyMapper.java b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/mapper/DeviceRealtimedataMeteorologyMapper.java deleted file mode 100644 index a1735ea..0000000 --- a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/mapper/DeviceRealtimedataMeteorologyMapper.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.fastbee.deviceData.mapper; - -import java.util.List; -import com.fastbee.deviceData.domain.DeviceRealtimedataMeteorology; -import org.apache.ibatis.annotations.Mapper; - -/** - * 气象设备实时数据Mapper接口 - * - * @author kerwincui - * @date 2024-11-13 - */ -@Mapper -public interface DeviceRealtimedataMeteorologyMapper -{ - /** - * 查询气象设备实时数据 - * - * @param id 气象设备实时数据主键 - * @return 气象设备实时数据 - */ - public DeviceRealtimedataMeteorology selectDeviceRealtimedataMeteorologyById(Long id); - - /** - * 查询气象设备实时数据列表 - * - * @param deviceRealtimedataMeteorology 气象设备实时数据 - * @return 气象设备实时数据集合 - */ - public List selectDeviceRealtimedataMeteorologyList(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology); - - /** - * 新增气象设备实时数据 - * - * @param deviceRealtimedataMeteorology 气象设备实时数据 - * @return 结果 - */ - public int insertDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology); - - /** - * 修改气象设备实时数据 - * - * @param deviceRealtimedataMeteorology 气象设备实时数据 - * @return 结果 - */ - public int updateDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology); - - /** - * 删除气象设备实时数据 - * - * @param id 气象设备实时数据主键 - * @return 结果 - */ - public int deleteDeviceRealtimedataMeteorologyById(Long id); - - /** - * 批量删除气象设备实时数据 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteDeviceRealtimedataMeteorologyByIds(Long[] ids); -} diff --git a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/mapper/DeviceRealtimedataPhotovoltaicMapper.java b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/mapper/DeviceRealtimedataPhotovoltaicMapper.java new file mode 100644 index 0000000..4d92b84 --- /dev/null +++ b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/mapper/DeviceRealtimedataPhotovoltaicMapper.java @@ -0,0 +1,61 @@ +package com.fastbee.deviceData.mapper; + +import java.util.List; +import com.fastbee.deviceData.domain.DeviceRealtimedataPhotovoltaic; + +/** + * 光伏设备实时数据Mapper接口 + * + * @author kerwincui + * @date 2024-11-14 + */ +public interface DeviceRealtimedataPhotovoltaicMapper +{ + /** + * 查询光伏设备实时数据 + * + * @param id 光伏设备实时数据主键 + * @return 光伏设备实时数据 + */ + public DeviceRealtimedataPhotovoltaic selectDeviceRealtimedataPhotovoltaicById(Long id); + + /** + * 查询光伏设备实时数据列表 + * + * @param deviceRealtimedataPhotovoltaic 光伏设备实时数据 + * @return 光伏设备实时数据集合 + */ + public List selectDeviceRealtimedataPhotovoltaicList(DeviceRealtimedataPhotovoltaic deviceRealtimedataPhotovoltaic); + + /** + * 新增光伏设备实时数据 + * + * @param deviceRealtimedataPhotovoltaic 光伏设备实时数据 + * @return 结果 + */ + public int insertDeviceRealtimedataPhotovoltaic(DeviceRealtimedataPhotovoltaic deviceRealtimedataPhotovoltaic); + + /** + * 修改光伏设备实时数据 + * + * @param deviceRealtimedataPhotovoltaic 光伏设备实时数据 + * @return 结果 + */ + public int updateDeviceRealtimedataPhotovoltaic(DeviceRealtimedataPhotovoltaic deviceRealtimedataPhotovoltaic); + + /** + * 删除光伏设备实时数据 + * + * @param id 光伏设备实时数据主键 + * @return 结果 + */ + public int deleteDeviceRealtimedataPhotovoltaicById(Long id); + + /** + * 批量删除光伏设备实时数据 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDeviceRealtimedataPhotovoltaicByIds(Long[] ids); +} diff --git a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/service/IDeviceRealtimedataMeteorologyService.java b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/service/IDeviceRealtimedataMeteorologyService.java deleted file mode 100644 index 3c985ef..0000000 --- a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/service/IDeviceRealtimedataMeteorologyService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.fastbee.deviceData.service; - -import java.util.List; -import com.fastbee.deviceData.domain.DeviceRealtimedataMeteorology; - -/** - * 气象设备实时数据Service接口 - * - * @author kerwincui - * @date 2024-11-13 - */ -public interface IDeviceRealtimedataMeteorologyService -{ - /** - * 查询气象设备实时数据 - * - * @param id 气象设备实时数据主键 - * @return 气象设备实时数据 - */ - public DeviceRealtimedataMeteorology selectDeviceRealtimedataMeteorologyById(Long id); - - /** - * 查询气象设备实时数据列表 - * - * @param deviceRealtimedataMeteorology 气象设备实时数据 - * @return 气象设备实时数据集合 - */ - public List selectDeviceRealtimedataMeteorologyList(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology); - - /** - * 新增气象设备实时数据 - * - * @param deviceRealtimedataMeteorology 气象设备实时数据 - * @return 结果 - */ - public int insertDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology); - - /** - * 修改气象设备实时数据 - * - * @param deviceRealtimedataMeteorology 气象设备实时数据 - * @return 结果 - */ - public int updateDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology); - - /** - * 批量删除气象设备实时数据 - * - * @param ids 需要删除的气象设备实时数据主键集合 - * @return 结果 - */ - public int deleteDeviceRealtimedataMeteorologyByIds(Long[] ids); - - /** - * 删除气象设备实时数据信息 - * - * @param id 气象设备实时数据主键 - * @return 结果 - */ - public int deleteDeviceRealtimedataMeteorologyById(Long id); -} diff --git a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/service/IDeviceRealtimedataPhotovoltaicService.java b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/service/IDeviceRealtimedataPhotovoltaicService.java new file mode 100644 index 0000000..e9620ad --- /dev/null +++ b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/service/IDeviceRealtimedataPhotovoltaicService.java @@ -0,0 +1,61 @@ +package com.fastbee.deviceData.service; + +import java.util.List; +import com.fastbee.deviceData.domain.DeviceRealtimedataPhotovoltaic; + +/** + * 光伏设备实时数据Service接口 + * + * @author kerwincui + * @date 2024-11-14 + */ +public interface IDeviceRealtimedataPhotovoltaicService +{ + /** + * 查询光伏设备实时数据 + * + * @param id 光伏设备实时数据主键 + * @return 光伏设备实时数据 + */ + public DeviceRealtimedataPhotovoltaic selectDeviceRealtimedataPhotovoltaicById(Long id); + + /** + * 查询光伏设备实时数据列表 + * + * @param deviceRealtimedataPhotovoltaic 光伏设备实时数据 + * @return 光伏设备实时数据集合 + */ + public List selectDeviceRealtimedataPhotovoltaicList(DeviceRealtimedataPhotovoltaic deviceRealtimedataPhotovoltaic); + + /** + * 新增光伏设备实时数据 + * + * @param deviceRealtimedataPhotovoltaic 光伏设备实时数据 + * @return 结果 + */ + public int insertDeviceRealtimedataPhotovoltaic(DeviceRealtimedataPhotovoltaic deviceRealtimedataPhotovoltaic); + + /** + * 修改光伏设备实时数据 + * + * @param deviceRealtimedataPhotovoltaic 光伏设备实时数据 + * @return 结果 + */ + public int updateDeviceRealtimedataPhotovoltaic(DeviceRealtimedataPhotovoltaic deviceRealtimedataPhotovoltaic); + + /** + * 批量删除光伏设备实时数据 + * + * @param ids 需要删除的光伏设备实时数据主键集合 + * @return 结果 + */ + public int deleteDeviceRealtimedataPhotovoltaicByIds(Long[] ids); + + /** + * 删除光伏设备实时数据信息 + * + * @param id 光伏设备实时数据主键 + * @return 结果 + */ + public int deleteDeviceRealtimedataPhotovoltaicById(Long id); +} diff --git a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/service/impl/DeviceRealtimedataMeteorologyServiceImpl.java b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/service/impl/DeviceRealtimedataMeteorologyServiceImpl.java deleted file mode 100644 index 6b87e4a..0000000 --- a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/service/impl/DeviceRealtimedataMeteorologyServiceImpl.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.fastbee.deviceData.service.impl; - -import java.util.List; -import com.fastbee.common.utils.DateUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.fastbee.deviceData.mapper.DeviceRealtimedataMeteorologyMapper; -import com.fastbee.deviceData.domain.DeviceRealtimedataMeteorology; -import com.fastbee.deviceData.service.IDeviceRealtimedataMeteorologyService; - -/** - * 气象设备实时数据Service业务层处理 - * - * @author kerwincui - * @date 2024-11-13 - */ -@Service -public class DeviceRealtimedataMeteorologyServiceImpl implements IDeviceRealtimedataMeteorologyService -{ - @Autowired - private DeviceRealtimedataMeteorologyMapper deviceRealtimedataMeteorologyMapper; - - /** - * 查询气象设备实时数据 - * - * @param id 气象设备实时数据主键 - * @return 气象设备实时数据 - */ - @Override - public DeviceRealtimedataMeteorology selectDeviceRealtimedataMeteorologyById(Long id) - { - return deviceRealtimedataMeteorologyMapper.selectDeviceRealtimedataMeteorologyById(id); - } - - /** - * 查询气象设备实时数据列表 - * - * @param deviceRealtimedataMeteorology 气象设备实时数据 - * @return 气象设备实时数据 - */ - @Override - public List selectDeviceRealtimedataMeteorologyList(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology) - { - return deviceRealtimedataMeteorologyMapper.selectDeviceRealtimedataMeteorologyList(deviceRealtimedataMeteorology); - } - - /** - * 新增气象设备实时数据 - * - * @param deviceRealtimedataMeteorology 气象设备实时数据 - * @return 结果 - */ - @Override - public int insertDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology) - { - deviceRealtimedataMeteorology.setCreateTime(DateUtils.getNowDate()); - return deviceRealtimedataMeteorologyMapper.insertDeviceRealtimedataMeteorology(deviceRealtimedataMeteorology); - } - - /** - * 修改气象设备实时数据 - * - * @param deviceRealtimedataMeteorology 气象设备实时数据 - * @return 结果 - */ - @Override - public int updateDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology) - { - deviceRealtimedataMeteorology.setUpdateTime(DateUtils.getNowDate()); - return deviceRealtimedataMeteorologyMapper.updateDeviceRealtimedataMeteorology(deviceRealtimedataMeteorology); - } - - /** - * 批量删除气象设备实时数据 - * - * @param ids 需要删除的气象设备实时数据主键 - * @return 结果 - */ - @Override - public int deleteDeviceRealtimedataMeteorologyByIds(Long[] ids) - { - return deviceRealtimedataMeteorologyMapper.deleteDeviceRealtimedataMeteorologyByIds(ids); - } - - /** - * 删除气象设备实时数据信息 - * - * @param id 气象设备实时数据主键 - * @return 结果 - */ - @Override - public int deleteDeviceRealtimedataMeteorologyById(Long id) - { - return deviceRealtimedataMeteorologyMapper.deleteDeviceRealtimedataMeteorologyById(id); - } -} diff --git a/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/service/impl/DeviceRealtimedataPhotovoltaicServiceImpl.java b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/service/impl/DeviceRealtimedataPhotovoltaicServiceImpl.java new file mode 100644 index 0000000..3ef84d5 --- /dev/null +++ b/fastbee-service/fastbee-device-service/src/main/java/com/fastbee/deviceData/service/impl/DeviceRealtimedataPhotovoltaicServiceImpl.java @@ -0,0 +1,95 @@ +package com.fastbee.deviceData.service.impl; + +import java.util.List; +import com.fastbee.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.fastbee.deviceData.mapper.DeviceRealtimedataPhotovoltaicMapper; +import com.fastbee.deviceData.domain.DeviceRealtimedataPhotovoltaic; +import com.fastbee.deviceData.service.IDeviceRealtimedataPhotovoltaicService; + +/** + * 光伏设备实时数据Service业务层处理 + * + * @author kerwincui + * @date 2024-11-14 + */ +@Service +public class DeviceRealtimedataPhotovoltaicServiceImpl implements IDeviceRealtimedataPhotovoltaicService +{ + @Autowired + private DeviceRealtimedataPhotovoltaicMapper deviceRealtimedataPhotovoltaicMapper; + + /** + * 查询光伏设备实时数据 + * + * @param id 光伏设备实时数据主键 + * @return 光伏设备实时数据 + */ + @Override + public DeviceRealtimedataPhotovoltaic selectDeviceRealtimedataPhotovoltaicById(Long id) + { + return deviceRealtimedataPhotovoltaicMapper.selectDeviceRealtimedataPhotovoltaicById(id); + } + + /** + * 查询光伏设备实时数据列表 + * + * @param deviceRealtimedataPhotovoltaic 光伏设备实时数据 + * @return 光伏设备实时数据 + */ + @Override + public List selectDeviceRealtimedataPhotovoltaicList(DeviceRealtimedataPhotovoltaic deviceRealtimedataPhotovoltaic) + { + return deviceRealtimedataPhotovoltaicMapper.selectDeviceRealtimedataPhotovoltaicList(deviceRealtimedataPhotovoltaic); + } + + /** + * 新增光伏设备实时数据 + * + * @param deviceRealtimedataPhotovoltaic 光伏设备实时数据 + * @return 结果 + */ + @Override + public int insertDeviceRealtimedataPhotovoltaic(DeviceRealtimedataPhotovoltaic deviceRealtimedataPhotovoltaic) + { + deviceRealtimedataPhotovoltaic.setCreateTime(DateUtils.getNowDate()); + return deviceRealtimedataPhotovoltaicMapper.insertDeviceRealtimedataPhotovoltaic(deviceRealtimedataPhotovoltaic); + } + + /** + * 修改光伏设备实时数据 + * + * @param deviceRealtimedataPhotovoltaic 光伏设备实时数据 + * @return 结果 + */ + @Override + public int updateDeviceRealtimedataPhotovoltaic(DeviceRealtimedataPhotovoltaic deviceRealtimedataPhotovoltaic) + { + return deviceRealtimedataPhotovoltaicMapper.updateDeviceRealtimedataPhotovoltaic(deviceRealtimedataPhotovoltaic); + } + + /** + * 批量删除光伏设备实时数据 + * + * @param ids 需要删除的光伏设备实时数据主键 + * @return 结果 + */ + @Override + public int deleteDeviceRealtimedataPhotovoltaicByIds(Long[] ids) + { + return deviceRealtimedataPhotovoltaicMapper.deleteDeviceRealtimedataPhotovoltaicByIds(ids); + } + + /** + * 删除光伏设备实时数据信息 + * + * @param id 光伏设备实时数据主键 + * @return 结果 + */ + @Override + public int deleteDeviceRealtimedataPhotovoltaicById(Long id) + { + return deviceRealtimedataPhotovoltaicMapper.deleteDeviceRealtimedataPhotovoltaicById(id); + } +} diff --git a/fastbee-service/fastbee-device-service/src/main/resources/mapper.deviceData/DeviceRealtimedataMeteorologyMapper.xml b/fastbee-service/fastbee-device-service/src/main/resources/mapper.deviceData/DeviceRealtimedataMeteorologyMapper.xml deleted file mode 100644 index 250e8bb..0000000 --- a/fastbee-service/fastbee-device-service/src/main/resources/mapper.deviceData/DeviceRealtimedataMeteorologyMapper.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select id, device_id, air_temp, air_humi, wind_speed, wind_dir, air_pre, guangzhao, fushe, sum_rain, ins_rain, day_rain, zhengfa, soil_temp, soil_humi, del_flag, create_time, create_by, update_time, update_by from iot_device_realtimedata_meteorology - - - - - - - - insert into iot_device_realtimedata_meteorology - - device_id, - air_temp, - air_humi, - wind_speed, - wind_dir, - air_pre, - guangzhao, - fushe, - sum_rain, - ins_rain, - day_rain, - zhengfa, - soil_temp, - soil_humi, - del_flag, - create_time, - create_by, - update_time, - update_by, - - - #{deviceId}, - #{airTemp}, - #{airHumi}, - #{windSpeed}, - #{windDir}, - #{airPre}, - #{guangzhao}, - #{fushe}, - #{sumRain}, - #{insRain}, - #{dayRain}, - #{zhengfa}, - #{soilTemp}, - #{soilHumi}, - #{delFlag}, - #{createTime}, - #{createBy}, - #{updateTime}, - #{updateBy}, - - - - - update iot_device_realtimedata_meteorology - - device_id = #{deviceId}, - air_temp = #{airTemp}, - air_humi = #{airHumi}, - wind_speed = #{windSpeed}, - wind_dir = #{windDir}, - air_pre = #{airPre}, - guangzhao = #{guangzhao}, - fushe = #{fushe}, - sum_rain = #{sumRain}, - ins_rain = #{insRain}, - day_rain = #{dayRain}, - zhengfa = #{zhengfa}, - soil_temp = #{soilTemp}, - soil_humi = #{soilHumi}, - del_flag = #{delFlag}, - create_time = #{createTime}, - create_by = #{createBy}, - update_time = #{updateTime}, - update_by = #{updateBy}, - - where id = #{id} - - - - delete from iot_device_realtimedata_meteorology where id = #{id} - - - - delete from iot_device_realtimedata_meteorology where id in - - #{id} - - - \ No newline at end of file diff --git a/fastbee-service/fastbee-device-service/src/main/resources/mapper.deviceData/DeviceRealtimedataPhotovoltaicMapper.xml b/fastbee-service/fastbee-device-service/src/main/resources/mapper.deviceData/DeviceRealtimedataPhotovoltaicMapper.xml new file mode 100644 index 0000000..44904ea --- /dev/null +++ b/fastbee-service/fastbee-device-service/src/main/resources/mapper.deviceData/DeviceRealtimedataPhotovoltaicMapper.xml @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, device_id, air_temp, mpp_temp, battery_cap, battery_volt, battery_cur, battery_power, load_volt, load_cur, load_power, phot_volt, phot_cur, phot_power, cum_charge_day, cum_charge_mon, cum_charge_year, cum_charge_all, cum_ele_day, cum_ele_mon, cum_ele_year, cum_ele_all, shoudong, control, air_temp_2, mpp_temp_2, battery_cap_2, battery_volt_2, battery_cur_2, battery_power_2, load_volt_2, load_cur_2, load_power_2, phot_volt_2, phot_cur_2, phot_power_2, cum_charge_day_2, cum_charge_mon_2, cum_charge_year_2, cum_charge_all_2, cum_ele_day_2, cum_ele_year_2, cum_ele_all_2, shoudong_2, control_2, cum_ele_mon_2, create_time, real_time from iot_device_realtimedata_photovoltaic + + + + + + + + insert into iot_device_realtimedata_photovoltaic + + device_id, + air_temp, + mpp_temp, + battery_cap, + battery_volt, + battery_cur, + battery_power, + load_volt, + load_cur, + load_power, + phot_volt, + phot_cur, + phot_power, + cum_charge_day, + cum_charge_mon, + cum_charge_year, + cum_charge_all, + cum_ele_day, + cum_ele_mon, + cum_ele_year, + cum_ele_all, + shoudong, + control, + air_temp_2, + mpp_temp_2, + battery_cap_2, + battery_volt_2, + battery_cur_2, + battery_power_2, + load_volt_2, + load_cur_2, + load_power_2, + phot_volt_2, + phot_cur_2, + phot_power_2, + cum_charge_day_2, + cum_charge_mon_2, + cum_charge_year_2, + cum_charge_all_2, + cum_ele_day_2, + cum_ele_year_2, + cum_ele_all_2, + shoudong_2, + control_2, + cum_ele_mon_2, + create_time, + real_time, + + + #{deviceId}, + #{airTemp}, + #{mppTemp}, + #{batteryCap}, + #{batteryVolt}, + #{batteryCur}, + #{batteryPower}, + #{loadVolt}, + #{loadCur}, + #{loadPower}, + #{photVolt}, + #{photCur}, + #{photPower}, + #{cumChargeDay}, + #{cumChargeMon}, + #{cumChargeYear}, + #{cumChargeAll}, + #{cumEleDay}, + #{cumEleMon}, + #{cumEleYear}, + #{cumEleAll}, + #{shoudong}, + #{control}, + #{airTemp2}, + #{mppTemp2}, + #{batteryCap2}, + #{batteryVolt2}, + #{batteryCur2}, + #{batteryPower2}, + #{loadVolt2}, + #{loadCur2}, + #{loadPower2}, + #{photVolt2}, + #{photCur2}, + #{photPower2}, + #{cumChargeDay2}, + #{cumChargeMon2}, + #{cumChargeYear2}, + #{cumChargeAll2}, + #{cumEleDay2}, + #{cumEleYear2}, + #{cumEleAll2}, + #{shoudong2}, + #{control2}, + #{cumEleMon2}, + #{createTime}, + #{realTime}, + + + + + update iot_device_realtimedata_photovoltaic + + device_id = #{deviceId}, + air_temp = #{airTemp}, + mpp_temp = #{mppTemp}, + battery_cap = #{batteryCap}, + battery_volt = #{batteryVolt}, + battery_cur = #{batteryCur}, + battery_power = #{batteryPower}, + load_volt = #{loadVolt}, + load_cur = #{loadCur}, + load_power = #{loadPower}, + phot_volt = #{photVolt}, + phot_cur = #{photCur}, + phot_power = #{photPower}, + cum_charge_day = #{cumChargeDay}, + cum_charge_mon = #{cumChargeMon}, + cum_charge_year = #{cumChargeYear}, + cum_charge_all = #{cumChargeAll}, + cum_ele_day = #{cumEleDay}, + cum_ele_mon = #{cumEleMon}, + cum_ele_year = #{cumEleYear}, + cum_ele_all = #{cumEleAll}, + shoudong = #{shoudong}, + control = #{control}, + air_temp_2 = #{airTemp2}, + mpp_temp_2 = #{mppTemp2}, + battery_cap_2 = #{batteryCap2}, + battery_volt_2 = #{batteryVolt2}, + battery_cur_2 = #{batteryCur2}, + battery_power_2 = #{batteryPower2}, + load_volt_2 = #{loadVolt2}, + load_cur_2 = #{loadCur2}, + load_power_2 = #{loadPower2}, + phot_volt_2 = #{photVolt2}, + phot_cur_2 = #{photCur2}, + phot_power_2 = #{photPower2}, + cum_charge_day_2 = #{cumChargeDay2}, + cum_charge_mon_2 = #{cumChargeMon2}, + cum_charge_year_2 = #{cumChargeYear2}, + cum_charge_all_2 = #{cumChargeAll2}, + cum_ele_day_2 = #{cumEleDay2}, + cum_ele_year_2 = #{cumEleYear2}, + cum_ele_all_2 = #{cumEleAll2}, + shoudong_2 = #{shoudong2}, + control_2 = #{control2}, + cum_ele_mon_2 = #{cumEleMon2}, + create_time = #{createTime}, + real_time = #{realTime}, + + where id = #{id} + + + + delete from iot_device_realtimedata_photovoltaic where id = #{id} + + + + delete from iot_device_realtimedata_photovoltaic where id in + + #{id} + + + \ No newline at end of file