Explorar o código

Merge branch '20200908' into 20201014

lin %!s(int64=4) %!d(string=hai) anos
pai
achega
68763b4b06

+ 4 - 0
smart-city-platform/src/main/java/com/bz/smart_city/dto/syncdata/MeterReadDataDto.java

@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.util.Date;
+
 @Data
 @ApiModel
 public class MeterReadDataDto {
@@ -11,4 +13,6 @@ public class MeterReadDataDto {
     private String fileNo;
     @ApiModelProperty("本期读数")
     private String reading;
+    @ApiModelProperty("抄表时间")
+    private Date readTime;
 }

+ 1 - 0
smart-city-platform/src/main/java/com/bz/smart_city/service/sync/SyncDataServiceImpl.java

@@ -77,6 +77,7 @@ public class SyncDataServiceImpl implements SyncDataService {
             MeterReadDataDto meterReadDataDto = new MeterReadDataDto();
             meterReadDataDto.setFileNo(idMatchFileNo.get(syncMeterRecord.getDeviceId()));
             meterReadDataDto.setReading(syncMeterRecord.getReadData());
+            meterReadDataDto.setReadTime(syncMeterRecord.getReadTime());
             meterReadDataDtos.add(meterReadDataDto);
         });
         return new ListObjectWrapper<MeterReadDataDto>(meterReadDataDtos);

+ 1 - 1
smart-city-platform/src/main/resources/mapper/ClearingRecordItemMapper.xml

@@ -397,7 +397,7 @@
         FROM
         sc_clearing_record_item it
         LEFT JOIN sc_clearing_record r ON ( it.record_id = r.id )
-        where account_period=#{accountPeriod} and  device_id in
+        where account_period=#{accountPeriod} and current_period_date is not null and  device_id in
         <foreach collection="deviceIds" item="item" separator="," open="(" close=")">
             #{item}
         </foreach>

+ 2 - 2
smart-city-platform/src/main/resources/mapper/MeterReadRecordMapper.xml

@@ -1667,8 +1667,8 @@
         where device_id= #{meterReadRecord.deviceId,jdbcType=BIGINT}
     </update>
     <select id="findSyncMeterRecord" resultMap="BaseResultMap">
-        select device_id,meter_file_no,read_data from sc_meter_read_record
-        where read_date=#{readTime}
+        select device_id,meter_file_no,read_data,read_time from sc_meter_read_record
+        where read_date=#{readTime} and read_data is not null
         and device_id in
         <foreach collection="deviceIds" item="item" separator="," open="(" close=")">
             #{item}