|
@@ -42,20 +42,20 @@ public class DeviceChargingJob {
|
|
|
String now = DataTime.getSring();
|
|
|
//即将过期
|
|
|
FunctionUtils.NoParamsNoResult timeout1 = () -> {
|
|
|
- int day = (~(SysDictUtils.getValue(EnumDeviceCharging.Code.CODE.getCode(), EnumDeviceCharging.N_200.getCode(), Integer.class) - 1));
|
|
|
- String begin = DataTime.getStringAround(0, 0, day, 0, 0, 0);
|
|
|
- deviceChargingTimeout(begin, now, 1, 1000);
|
|
|
+ int day = SysDictUtils.getValue(EnumDeviceCharging.Code.CODE.getCode(), EnumDeviceCharging.N_200.getCode(), Integer.class);
|
|
|
+ String end = DataTime.getStringAround(0, 0, day, 0, 0, 0);
|
|
|
+ deviceChargingTimeout(now, end, now, 1, 1000);
|
|
|
};
|
|
|
//欠费
|
|
|
FunctionUtils.NoParamsNoResult timeout2 = () -> {
|
|
|
- deviceChargingTimeout(null, now, 1, 1000);
|
|
|
+ deviceChargingTimeout(null, now, now, 1, 1000);
|
|
|
};
|
|
|
timeout1.run();
|
|
|
timeout2.run();
|
|
|
return ReturnT.SUCCESS;
|
|
|
}
|
|
|
|
|
|
- private void deviceChargingTimeout(String begin, String end, long current, long size) {
|
|
|
+ private void deviceChargingTimeout(String begin, String end, String thisTime, long current, long size) {
|
|
|
//查询数据
|
|
|
IPage<DeviceCharging> iPage = Page.of(current, size);
|
|
|
IPage<Long> longIPage = deviceChargingMapper.deviceChargingTimeout(iPage, begin, end);
|
|
@@ -76,7 +76,7 @@ public class DeviceChargingJob {
|
|
|
.setChannelType(ChannelType.SMS.getCode())
|
|
|
.setMpOpenIds(Arrays.asList(contactPhone))
|
|
|
.setParams(new JHashMap<String, Object>()
|
|
|
- .set("dateTime", end)
|
|
|
+ .set("dateTime", thisTime)
|
|
|
.set("code", 1234)
|
|
|
);
|
|
|
msgInfos.add(msgInfo);
|
|
@@ -85,7 +85,7 @@ public class DeviceChargingJob {
|
|
|
});
|
|
|
//下一页
|
|
|
current++;
|
|
|
- deviceChargingTimeout(begin, end, current, size);
|
|
|
+ deviceChargingTimeout(begin, end, thisTime, current, size);
|
|
|
}
|
|
|
|
|
|
}
|