From a40c2eb885bcdb697c2e16dae4f43cb6cd718973 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期一, 22 一月 2024 11:28:03 +0800
Subject: [PATCH] 优化小区数据
---
service-job/src/main/java/com/java110/job/adapt/hcIot/tempCarFee/DeleteTempCarFeeConfigToIotAdapt.java | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/service-job/src/main/java/com/java110/job/adapt/hcIot/tempCarFee/DeleteTempCarFeeConfigToIotAdapt.java b/service-job/src/main/java/com/java110/job/adapt/hcIot/tempCarFee/DeleteTempCarFeeConfigToIotAdapt.java
old mode 100644
new mode 100755
index 9d23bcc..d640d07
--- a/service-job/src/main/java/com/java110/job/adapt/hcIot/tempCarFee/DeleteTempCarFeeConfigToIotAdapt.java
+++ b/service-job/src/main/java/com/java110/job/adapt/hcIot/tempCarFee/DeleteTempCarFeeConfigToIotAdapt.java
@@ -17,13 +17,13 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
-import com.java110.dto.tempCarFeeConfig.TempCarFeeConfigDto;
-import com.java110.entity.order.Business;
+import com.java110.dto.fee.TempCarFeeConfigDto;
+import com.java110.dto.system.Business;
import com.java110.intf.community.IParkingSpaceInnerServiceSMO;
import com.java110.intf.fee.ITempCarFeeConfigInnerServiceSMO;
import com.java110.job.adapt.DatabusAdaptImpl;
import com.java110.job.adapt.hcIot.asyn.IIotSendAsyn;
-import com.java110.po.tempCarFeeConfig.TempCarFeeConfigPo;
+import com.java110.po.tempCarFee.TempCarFeeConfigPo;
import com.java110.utils.constant.StatusConstant;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
@@ -64,23 +64,28 @@
@Override
public void execute(Business business, List<Business> businesses) {
JSONObject data = business.getData();
+ JSONArray businessTempCarFeeConfigs = new JSONArray();
if (data.containsKey(TempCarFeeConfigPo.class.getSimpleName())) {
Object bObj = data.get(TempCarFeeConfigPo.class.getSimpleName());
- JSONArray businessTempCarFeeConfigs = null;
+
if (bObj instanceof JSONObject) {
- businessTempCarFeeConfigs = new JSONArray();
+
businessTempCarFeeConfigs.add(bObj);
} else if (bObj instanceof List) {
businessTempCarFeeConfigs = JSONArray.parseArray(JSONObject.toJSONString(bObj));
} else {
businessTempCarFeeConfigs = (JSONArray) bObj;
}
- //JSONObject businessTempCarFeeConfig = data.getJSONObject("businessTempCarFeeConfig");
- for (int bTempCarFeeConfigIndex = 0; bTempCarFeeConfigIndex < businessTempCarFeeConfigs.size(); bTempCarFeeConfigIndex++) {
- JSONObject businessTempCarFeeConfig = businessTempCarFeeConfigs.getJSONObject(bTempCarFeeConfigIndex);
- doSendTempCarFeeConfig(business, businessTempCarFeeConfig);
+ }else {
+ if (data instanceof JSONObject) {
+ businessTempCarFeeConfigs.add(data);
}
}
+ //JSONObject businessTempCarFeeConfig = data.getJSONObject("businessTempCarFeeConfig");
+ for (int bTempCarFeeConfigIndex = 0; bTempCarFeeConfigIndex < businessTempCarFeeConfigs.size(); bTempCarFeeConfigIndex++) {
+ JSONObject businessTempCarFeeConfig = businessTempCarFeeConfigs.getJSONObject(bTempCarFeeConfigIndex);
+ doSendTempCarFeeConfig(business, businessTempCarFeeConfig);
+ }
}
private void doSendTempCarFeeConfig(Business business, JSONObject businessTempCarFeeConfig) {
--
Gitblit v1.8.0