|
@@ -10,12 +10,14 @@ import com.xy.collections.list.JList;
|
|
|
import com.xy.collections.map.JMap;
|
|
|
import com.xy.dto.MercAccountDto;
|
|
|
import com.xy.dto.MercArrearageConfigDto;
|
|
|
+import com.xy.dto.be.MercDto;
|
|
|
import com.xy.entity.DeviceAlgorithmCharging;
|
|
|
import com.xy.entity.DeviceInfo;
|
|
|
import com.xy.service.DeviceAlgorithmChargingServiceImpl;
|
|
|
import com.xy.service.DeviceInfoServiceImpl;
|
|
|
import com.xy.service.MercAccountService;
|
|
|
import com.xy.service.MercArrearageConfigService;
|
|
|
+import com.xy.service.be.MercService;
|
|
|
import com.xy.sys.EnumMercCostMsgConfig;
|
|
|
import com.xy.utils.Emptys;
|
|
|
import com.xy.utils.SysDictUtils;
|
|
@@ -27,6 +29,7 @@ import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 设备算法费job
|
|
@@ -44,6 +47,8 @@ public class DeviceAlgorithmChargingJob {
|
|
|
|
|
|
private MercArrearageConfigService mercArrearageConfigService;
|
|
|
|
|
|
+ private MercService mercService;
|
|
|
+
|
|
|
/**
|
|
|
* 算法费设备停机
|
|
|
*
|
|
@@ -67,6 +72,9 @@ public class DeviceAlgorithmChargingJob {
|
|
|
selectList.setType(2);
|
|
|
List<MercArrearageConfigDto.Vo> data = mercArrearageConfigService.list(selectList).getData();
|
|
|
JMap<Long, MercArrearageConfigDto.Vo> mercArrearageConfigJMaps = new JArrayList<>(data).toMap(MercArrearageConfigDto.Vo::getMercId).cover();
|
|
|
+ //查询是否提现模式
|
|
|
+ Map<Long, Boolean> isDrawMaps = mercService.isDrawList(new MercDto.IsDrawList().setMercIds(new JArrayList<>(list).getProperty(MercAccountDto.Vo::getMercId))).getData();
|
|
|
+ //循环处理
|
|
|
mercAccounts.forEach(vo -> {
|
|
|
//验证白名单
|
|
|
MercArrearageConfigDto.Vo mercArrearageConfig = mercArrearageConfigJMaps.get(vo.getMercId());
|
|
@@ -75,6 +83,11 @@ public class DeviceAlgorithmChargingJob {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+ //验证是否提现模式
|
|
|
+ Boolean isDraw = isDrawMaps.get(vo.getMercId());
|
|
|
+ if (isDraw) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
//查询商户未冻结设备
|
|
|
List<DeviceInfo> deviceInfos = deviceInfoService.list(new LambdaQueryWrapper<DeviceInfo>()
|
|
|
.in(DeviceInfo::getDeviceType, Arrays.asList(1, 2))
|