diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java index 114d761..1a82659 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java @@ -51,6 +51,12 @@ private String date; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 有无白蚁 1有 2无 */ @ApiModelProperty(value = "有无白蚁 1有 2无") @@ -111,11 +117,23 @@ private Date heatingDatetime; /** + * 连拍张数(>0则连拍) + */ + @ApiModelProperty(value = "连拍张数(>0则连拍)") + private Integer continueCaptureCount; + + /** * 上传时间 */ @ApiModelProperty(value = "上传时间") private Date uptime; + /** + * 设备执行状态(enable|disabled) + */ + @ApiModelProperty(value = "设备执行状态(enable|disabled)") + private String executeStatus; + // DB Property diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java index 114d761..1a82659 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java @@ -51,6 +51,12 @@ private String date; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 有无白蚁 1有 2无 */ @ApiModelProperty(value = "有无白蚁 1有 2无") @@ -111,11 +117,23 @@ private Date heatingDatetime; /** + * 连拍张数(>0则连拍) + */ + @ApiModelProperty(value = "连拍张数(>0则连拍)") + private Integer continueCaptureCount; + + /** * 上传时间 */ @ApiModelProperty(value = "上传时间") private Date uptime; + /** + * 设备执行状态(enable|disabled) + */ + @ApiModelProperty(value = "设备执行状态(enable|disabled)") + private String executeStatus; + // DB Property diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java index e9aa1ce..2fdd729 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java @@ -51,6 +51,12 @@ private String date; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 有无白蚁 1有 2无 */ @ApiModelProperty(value = "有无白蚁 1有 2无") @@ -111,11 +117,23 @@ private Date heatingDatetime; /** + * 连拍张数(>0则连拍) + */ + @ApiModelProperty(value = "连拍张数(>0则连拍)") + private Integer continueCaptureCount; + + /** * 上传时间 */ @ApiModelProperty(value = "上传时间") private Date uptime; + /** + * 设备执行状态(enable|disabled) + */ + @ApiModelProperty(value = "设备执行状态(enable|disabled)") + private String executeStatus; + // DB Property /** diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java index 114d761..1a82659 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java @@ -51,6 +51,12 @@ private String date; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 有无白蚁 1有 2无 */ @ApiModelProperty(value = "有无白蚁 1有 2无") @@ -111,11 +117,23 @@ private Date heatingDatetime; /** + * 连拍张数(>0则连拍) + */ + @ApiModelProperty(value = "连拍张数(>0则连拍)") + private Integer continueCaptureCount; + + /** * 上传时间 */ @ApiModelProperty(value = "上传时间") private Date uptime; + /** + * 设备执行状态(enable|disabled) + */ + @ApiModelProperty(value = "设备执行状态(enable|disabled)") + private String executeStatus; + // DB Property diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java index e9aa1ce..2fdd729 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java @@ -51,6 +51,12 @@ private String date; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 有无白蚁 1有 2无 */ @ApiModelProperty(value = "有无白蚁 1有 2无") @@ -111,11 +117,23 @@ private Date heatingDatetime; /** + * 连拍张数(>0则连拍) + */ + @ApiModelProperty(value = "连拍张数(>0则连拍)") + private Integer continueCaptureCount; + + /** * 上传时间 */ @ApiModelProperty(value = "上传时间") private Date uptime; + /** + * 设备执行状态(enable|disabled) + */ + @ApiModelProperty(value = "设备执行状态(enable|disabled)") + private String executeStatus; + // DB Property /** diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java index 8a031cc..13bbd65 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java @@ -31,6 +31,12 @@ private Date lastMedicateTime; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 是否投过药(1是 | 2 否) */ @ApiModelProperty(value = "是否投过药(1是 | 2 否)") diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java index 114d761..1a82659 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java @@ -51,6 +51,12 @@ private String date; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 有无白蚁 1有 2无 */ @ApiModelProperty(value = "有无白蚁 1有 2无") @@ -111,11 +117,23 @@ private Date heatingDatetime; /** + * 连拍张数(>0则连拍) + */ + @ApiModelProperty(value = "连拍张数(>0则连拍)") + private Integer continueCaptureCount; + + /** * 上传时间 */ @ApiModelProperty(value = "上传时间") private Date uptime; + /** + * 设备执行状态(enable|disabled) + */ + @ApiModelProperty(value = "设备执行状态(enable|disabled)") + private String executeStatus; + // DB Property diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java index e9aa1ce..2fdd729 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java @@ -51,6 +51,12 @@ private String date; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 有无白蚁 1有 2无 */ @ApiModelProperty(value = "有无白蚁 1有 2无") @@ -111,11 +117,23 @@ private Date heatingDatetime; /** + * 连拍张数(>0则连拍) + */ + @ApiModelProperty(value = "连拍张数(>0则连拍)") + private Integer continueCaptureCount; + + /** * 上传时间 */ @ApiModelProperty(value = "上传时间") private Date uptime; + /** + * 设备执行状态(enable|disabled) + */ + @ApiModelProperty(value = "设备执行状态(enable|disabled)") + private String executeStatus; + // DB Property /** diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java index 8a031cc..13bbd65 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java @@ -31,6 +31,12 @@ private Date lastMedicateTime; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 是否投过药(1是 | 2 否) */ @ApiModelProperty(value = "是否投过药(1是 | 2 否)") diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceMonitoringDataService.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceMonitoringDataService.java index 496807a..8a84fef 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceMonitoringDataService.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceMonitoringDataService.java @@ -8,9 +8,7 @@ import com.newfiber.termite.domain.response.SnWarinTotalDaysResponseInfo; import com.newfiber.termite.domain.response.WarnMonitoringResponseInfo; import com.newfiber.termite.enums.EExistsAnt; - import java.time.LocalDate; -import java.time.LocalTime; import java.util.List; /** @@ -62,6 +60,14 @@ DeviceMonitoringData lastHeating(String sn); /** + */ + DeviceMonitoringData lastCapture(String sn); + + /** + */ + DeviceMonitoringData lastExecuteStatus(String sn); + + /** * 分页查询白蚁防治数据 * * @param request 分页参数 diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java index 114d761..1a82659 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java @@ -51,6 +51,12 @@ private String date; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 有无白蚁 1有 2无 */ @ApiModelProperty(value = "有无白蚁 1有 2无") @@ -111,11 +117,23 @@ private Date heatingDatetime; /** + * 连拍张数(>0则连拍) + */ + @ApiModelProperty(value = "连拍张数(>0则连拍)") + private Integer continueCaptureCount; + + /** * 上传时间 */ @ApiModelProperty(value = "上传时间") private Date uptime; + /** + * 设备执行状态(enable|disabled) + */ + @ApiModelProperty(value = "设备执行状态(enable|disabled)") + private String executeStatus; + // DB Property diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java index e9aa1ce..2fdd729 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java @@ -51,6 +51,12 @@ private String date; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 有无白蚁 1有 2无 */ @ApiModelProperty(value = "有无白蚁 1有 2无") @@ -111,11 +117,23 @@ private Date heatingDatetime; /** + * 连拍张数(>0则连拍) + */ + @ApiModelProperty(value = "连拍张数(>0则连拍)") + private Integer continueCaptureCount; + + /** * 上传时间 */ @ApiModelProperty(value = "上传时间") private Date uptime; + /** + * 设备执行状态(enable|disabled) + */ + @ApiModelProperty(value = "设备执行状态(enable|disabled)") + private String executeStatus; + // DB Property /** diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java index 8a031cc..13bbd65 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java @@ -31,6 +31,12 @@ private Date lastMedicateTime; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 是否投过药(1是 | 2 否) */ @ApiModelProperty(value = "是否投过药(1是 | 2 否)") diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceMonitoringDataService.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceMonitoringDataService.java index 496807a..8a84fef 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceMonitoringDataService.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceMonitoringDataService.java @@ -8,9 +8,7 @@ import com.newfiber.termite.domain.response.SnWarinTotalDaysResponseInfo; import com.newfiber.termite.domain.response.WarnMonitoringResponseInfo; import com.newfiber.termite.enums.EExistsAnt; - import java.time.LocalDate; -import java.time.LocalTime; import java.util.List; /** @@ -62,6 +60,14 @@ DeviceMonitoringData lastHeating(String sn); /** + */ + DeviceMonitoringData lastCapture(String sn); + + /** + */ + DeviceMonitoringData lastExecuteStatus(String sn); + + /** * 分页查询白蚁防治数据 * * @param request 分页参数 diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceMonitoringDataServiceImpl.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceMonitoringDataServiceImpl.java index 8f25064..9e77029 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceMonitoringDataServiceImpl.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceMonitoringDataServiceImpl.java @@ -15,10 +15,11 @@ import com.newfiber.termite.enums.EHeatingFlag; import com.newfiber.termite.mapper.DeviceMonitoringDataMapper; import com.newfiber.termite.service.IDeviceMonitoringDataService; - import java.time.LocalDate; import java.time.format.DateTimeFormatter; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; import javax.annotation.Resource; import org.springframework.beans.BeanUtils; @@ -106,6 +107,16 @@ } @Override + public DeviceMonitoringData lastCapture(String sn) { + return null; + } + + @Override + public DeviceMonitoringData lastExecuteStatus(String sn) { + return null; + } + + @Override public List selectPage(DeviceMonitoringDataQueryRequest request) { return deviceMonitoringDataMapper.selectByCondition(request); } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java index 114d761..1a82659 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringData.java @@ -51,6 +51,12 @@ private String date; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 有无白蚁 1有 2无 */ @ApiModelProperty(value = "有无白蚁 1有 2无") @@ -111,11 +117,23 @@ private Date heatingDatetime; /** + * 连拍张数(>0则连拍) + */ + @ApiModelProperty(value = "连拍张数(>0则连拍)") + private Integer continueCaptureCount; + + /** * 上传时间 */ @ApiModelProperty(value = "上传时间") private Date uptime; + /** + * 设备执行状态(enable|disabled) + */ + @ApiModelProperty(value = "设备执行状态(enable|disabled)") + private String executeStatus; + // DB Property diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java index e9aa1ce..2fdd729 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/DeviceMonitoringDataRealtime.java @@ -51,6 +51,12 @@ private String date; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 有无白蚁 1有 2无 */ @ApiModelProperty(value = "有无白蚁 1有 2无") @@ -111,11 +117,23 @@ private Date heatingDatetime; /** + * 连拍张数(>0则连拍) + */ + @ApiModelProperty(value = "连拍张数(>0则连拍)") + private Integer continueCaptureCount; + + /** * 上传时间 */ @ApiModelProperty(value = "上传时间") private Date uptime; + /** + * 设备执行状态(enable|disabled) + */ + @ApiModelProperty(value = "设备执行状态(enable|disabled)") + private String executeStatus; + // DB Property /** diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java index 8a031cc..13bbd65 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/dto/TermiteDataUpRequest.java @@ -31,6 +31,12 @@ private Date lastMedicateTime; /** + * 批次号 + */ + @ApiModelProperty(value = "批次号") + private String batchNo; + + /** * 是否投过药(1是 | 2 否) */ @ApiModelProperty(value = "是否投过药(1是 | 2 否)") diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceMonitoringDataService.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceMonitoringDataService.java index 496807a..8a84fef 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceMonitoringDataService.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceMonitoringDataService.java @@ -8,9 +8,7 @@ import com.newfiber.termite.domain.response.SnWarinTotalDaysResponseInfo; import com.newfiber.termite.domain.response.WarnMonitoringResponseInfo; import com.newfiber.termite.enums.EExistsAnt; - import java.time.LocalDate; -import java.time.LocalTime; import java.util.List; /** @@ -62,6 +60,14 @@ DeviceMonitoringData lastHeating(String sn); /** + */ + DeviceMonitoringData lastCapture(String sn); + + /** + */ + DeviceMonitoringData lastExecuteStatus(String sn); + + /** * 分页查询白蚁防治数据 * * @param request 分页参数 diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceMonitoringDataServiceImpl.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceMonitoringDataServiceImpl.java index 8f25064..9e77029 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceMonitoringDataServiceImpl.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceMonitoringDataServiceImpl.java @@ -15,10 +15,11 @@ import com.newfiber.termite.enums.EHeatingFlag; import com.newfiber.termite.mapper.DeviceMonitoringDataMapper; import com.newfiber.termite.service.IDeviceMonitoringDataService; - import java.time.LocalDate; import java.time.format.DateTimeFormatter; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; import javax.annotation.Resource; import org.springframework.beans.BeanUtils; @@ -106,6 +107,16 @@ } @Override + public DeviceMonitoringData lastCapture(String sn) { + return null; + } + + @Override + public DeviceMonitoringData lastExecuteStatus(String sn) { + return null; + } + + @Override public List selectPage(DeviceMonitoringDataQueryRequest request) { return deviceMonitoringDataMapper.selectByCondition(request); } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/TermiteServiceImpl.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/TermiteServiceImpl.java index 339a964..5dc4672 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/TermiteServiceImpl.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/TermiteServiceImpl.java @@ -129,8 +129,9 @@ Boolean debugFlag = false; + @Override @Transactional(rollbackFor = Exception.class) - public DataUpResponse termiteDataup(TermiteDataUpRequest termiteDateUpRequest, MultipartFile image){ + public DataUpResponse termiteDataup(TermiteDataUpRequest termiteDateUpRequest, MultipartFile image) throws Exception{ String date = DateUtil.formatDateTime(new Date()); log.info("站点{}在{}时刻上传数据", termiteDateUpRequest.getSn(), date); String url = CosUtil.putFile(image); @@ -215,23 +216,29 @@ } @NotNull - private String uploadFile(PhotoIdentifyDto dataDto, MultipartFile image, DeviceMonitoringData existedDeviceMonitoringData, DeviceInfo deviceInfo) - throws IOException { + private String uploadFile(PhotoIdentifyDto dataDto, MultipartFile image, DeviceMonitoringData existedDeviceMonitoringData, DeviceInfo deviceInfo) throws IOException { String url = ""; if(EExistsAnt.True.getCode().equals(dataDto.getYesnoant())){ - Image srcImage = ImgUtil.read(image.getInputStream()); - Img img = Img.from(srcImage); - img.setPositionBaseCentre(false); - img = img.pressText("项目:" + deviceInfo.getProjectName(), Color.WHITE, font, 0, 900, 1f); - img = img.pressText("位置:" + deviceInfo.getLocation(), Color.WHITE, font, 0, 1000, 1f); - img = img.pressText("时间:" + DateUtil.format(existedDeviceMonitoringData.getUptime(), "yyyy-MM-dd HH:mm"), Color.WHITE, font, 0, 1100, 1f); - url = CosUtil.putFile(ImgUtil.toStream(img.getImg(), FileUtil.extName(image.getName())), FileUploadUtils.extractFilename(image)); + url = uploadFile(image, existedDeviceMonitoringData.getUptime(), deviceInfo); }else{ url = existedDeviceMonitoringData.getRtpitcu(); } return url; } + @NotNull + private String uploadFile(MultipartFile image, Date uptime, DeviceInfo deviceInfo) throws IOException { + String url; + Image srcImage = ImgUtil.read(image.getInputStream()); + Img img = Img.from(srcImage); + img.setPositionBaseCentre(false); + img = img.pressText("项目:" + deviceInfo.getProjectName(), Color.WHITE, font, 0, 900, 1f); + img = img.pressText("位置:" + deviceInfo.getLocation(), Color.WHITE, font, 0, 1000, 1f); + img = img.pressText("时间:" + DateUtil.format(uptime, "yyyy-MM-dd HH:mm"), Color.WHITE, font, 0, 1100, 1f); + url = CosUtil.putFile(ImgUtil.toStream(img.getImg(), FileUtil.extName(image.getName())), FileUploadUtils.extractFilename(image)); + return url; + } + private void jingChuUpload(DeviceMonitoringData existedDeviceMonitoringData, String yesnoant) { JingchuDeviceConfig jingchuDeviceConfig = jingchuDeviceConfigService.selectDetail(existedDeviceMonitoringData.getSn()); JingchuProjectConfig jingchuProjectConfig = jingchuProjectConfigService.selectDetail(existedDeviceMonitoringData.getProjectCode());