|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.huaxu.zoniot.dao.*;
|
|
|
import com.huaxu.zoniot.model.DeviceData;
|
|
|
+import com.huaxu.zoniot.service.CcrcService;
|
|
|
import com.huaxu.zoniot.utils.HttpClientUtils;
|
|
|
import com.huaxu.zoniot.entity.DeviceInfoPushConfig;
|
|
|
import com.huaxu.zoniot.entity.MeterInfo;
|
|
@@ -53,6 +54,8 @@ public class MeterFileSyncServiceImpl implements MeterFileSyncService {
|
|
|
private String exchange;
|
|
|
@Value("${spring.rabbitmq.device.queue}")
|
|
|
private String queue;
|
|
|
+ @Autowired
|
|
|
+ private CcrcService ccrcService;
|
|
|
|
|
|
@Override
|
|
|
public int httpSync(Integer configId) {
|
|
@@ -273,8 +276,7 @@ public class MeterFileSyncServiceImpl implements MeterFileSyncService {
|
|
|
@Override
|
|
|
public int rabbitSync() {
|
|
|
|
|
|
- List<Integer> customerIds = new ArrayList<>();
|
|
|
- customerIds.add(127);
|
|
|
+ List<Integer> customerIds = ccrcService.getCustomerIds();
|
|
|
|
|
|
if (customerIds != null && customerIds.size() > 0) {
|
|
|
for (Integer customerId : customerIds) {
|
|
@@ -296,8 +298,8 @@ public class MeterFileSyncServiceImpl implements MeterFileSyncService {
|
|
|
List<Integer> cIds = customerMapper.getSubId(customerId);
|
|
|
String pushCustomers = StringUtils.join(cIds, ",");
|
|
|
String pushChannels = "40,55";
|
|
|
- log.info("begin query push device list , beginDate={}, endDate={}",
|
|
|
- beginDate, endDate);
|
|
|
+ log.info("begin query push device list ,pushCustomers={}, beginDate={}, endDate={}",
|
|
|
+ pushCustomers,beginDate, endDate);
|
|
|
List<DeviceData> dataList = waterMeterMapper.getPushMeterListV2(pushCustomers,
|
|
|
pushChannels,
|
|
|
status,
|