|
@@ -39,6 +39,7 @@ public class MeasurementSettlementRecordHander {
|
|
MeasurementSettlementMapper measurementSettlementMapper;
|
|
MeasurementSettlementMapper measurementSettlementMapper;
|
|
@Resource
|
|
@Resource
|
|
DeviceMapper deviceMapper;
|
|
DeviceMapper deviceMapper;
|
|
|
|
+ int theDeviceDoesNotStart=5;
|
|
private String dateFormat="yyyyMMdd";
|
|
private String dateFormat="yyyyMMdd";
|
|
@XxlJob("measurementHandler")
|
|
@XxlJob("measurementHandler")
|
|
public ReturnT<String> execute(String info) {
|
|
public ReturnT<String> execute(String info) {
|
|
@@ -184,7 +185,7 @@ public class MeasurementSettlementRecordHander {
|
|
protected MeterReadRecordDTO getClearingStartMeterRecord(Device device,Date clearingStartDate ,MeasurementRecord lastItem,List<MeterReadRecord> records) {
|
|
protected MeterReadRecordDTO getClearingStartMeterRecord(Device device,Date clearingStartDate ,MeasurementRecord lastItem,List<MeterReadRecord> records) {
|
|
MeterReadRecordDTO r = new MeterReadRecordDTO();
|
|
MeterReadRecordDTO r = new MeterReadRecordDTO();
|
|
// 设备为未启动则直接设置为 0
|
|
// 设备为未启动则直接设置为 0
|
|
- if(device.getDeviceStatus() == 5) {
|
|
|
|
|
|
+ if(device.getDeviceStatus()==theDeviceDoesNotStart) {
|
|
r.setReadDateTime(clearingStartDate);
|
|
r.setReadDateTime(clearingStartDate);
|
|
r.setReadData(0d);
|
|
r.setReadData(0d);
|
|
}
|
|
}
|
|
@@ -231,7 +232,7 @@ public class MeasurementSettlementRecordHander {
|
|
protected MeterReadRecordDTO getClearingEndMeterRecord(Device device,Date clearingEndDate ,MeasurementRecord lastItem,List<MeterReadRecord> records) {
|
|
protected MeterReadRecordDTO getClearingEndMeterRecord(Device device,Date clearingEndDate ,MeasurementRecord lastItem,List<MeterReadRecord> records) {
|
|
MeterReadRecordDTO r = new MeterReadRecordDTO();
|
|
MeterReadRecordDTO r = new MeterReadRecordDTO();
|
|
// 设备为未启动则直接设置为 0
|
|
// 设备为未启动则直接设置为 0
|
|
- if(device.getDeviceStatus() == 5) {
|
|
|
|
|
|
+ if(device.getDeviceStatus() == theDeviceDoesNotStart) {
|
|
r.setReadDateTime(clearingEndDate);
|
|
r.setReadDateTime(clearingEndDate);
|
|
r.setReadData(0d);
|
|
r.setReadData(0d);
|
|
}
|
|
}
|