|
@@ -10,6 +10,7 @@ import com.xy.collections.list.JArrayList;
|
|
|
import com.xy.collections.map.JHashMap;
|
|
|
import com.xy.collections.map.JMap;
|
|
|
import com.xy.device.EnumDeviceCharging;
|
|
|
+import com.xy.dto.DeviceChangeStatusDTO;
|
|
|
import com.xy.dto.MercArrearageConfigDto;
|
|
|
import com.xy.dto.MercMsgInfoDto;
|
|
|
import com.xy.dto.be.MercDto;
|
|
@@ -17,6 +18,7 @@ import com.xy.entity.DeviceCharging;
|
|
|
import com.xy.entity.DeviceInfo;
|
|
|
import com.xy.enums.MsgConfigId;
|
|
|
import com.xy.mapper.DeviceChargingMapper;
|
|
|
+import com.xy.service.AlipayDeviceService;
|
|
|
import com.xy.service.DeviceInfoServiceImpl;
|
|
|
import com.xy.service.MercArrearageConfigService;
|
|
|
import com.xy.service.MercMsgInfoService;
|
|
@@ -51,6 +53,8 @@ public class DeviceChargingJob {
|
|
|
|
|
|
private MercFeignService mercFeignService;
|
|
|
|
|
|
+ private AlipayDeviceService alipayDeviceService;
|
|
|
+
|
|
|
/**
|
|
|
* 管理费设备停机
|
|
|
*
|
|
@@ -93,7 +97,7 @@ public class DeviceChargingJob {
|
|
|
MercArrearageConfigDto.Vo mercArrearageConfig = mercArrearageConfigJMaps.get(deviceInfo.getMercId());
|
|
|
if (Emptys.check(mercArrearageConfig)) {
|
|
|
DeviceCharging deviceCharging = deviceChargingsJMaps.get(deviceInfo.getDeviceId());
|
|
|
- String newTime = DataTime.getStringAround(0, 0, (~(mercArrearageConfig.getArrearageDay() - 1)), 0, 0, 0, DataTime.toString(now));
|
|
|
+ String newTime = DataTime.getStringAround(0, 0, (-mercArrearageConfig.getArrearageDay()), 0, 0, 0, DataTime.toString(now));
|
|
|
//过期时间 > (当前时间 - 配置天)
|
|
|
if (DataTime.stringContrast(DataTime.toString(deviceCharging.getTimeout()), newTime) > 0) {
|
|
|
return;
|
|
@@ -104,6 +108,14 @@ public class DeviceChargingJob {
|
|
|
.setFreezeStatus(2)
|
|
|
.setUpdateTime(now)
|
|
|
);
|
|
|
+ //支付宝刷脸柜停机
|
|
|
+ if (deviceInfo.getDeviceType() == 5) {
|
|
|
+ alipayDeviceService.changeStatus(new DeviceChangeStatusDTO()
|
|
|
+ .setTerminalId(String.valueOf(deviceInfo.getDeviceId()))
|
|
|
+ .setOperatorId("1")
|
|
|
+ .setStatus(2)
|
|
|
+ );
|
|
|
+ }
|
|
|
});
|
|
|
if (Emptys.check(updateDeviceInfos)) {
|
|
|
deviceInfoService.updateBatchById(updateDeviceInfos);
|