|
|
@@ -4,16 +4,13 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
|
import com.google.gson.JsonArray;
|
|
|
-import com.google.gson.JsonElement;
|
|
|
import com.google.gson.JsonObject;
|
|
|
-import com.google.gson.JsonParser;
|
|
|
import com.xjrsoft.common.enums.DeleteMark;
|
|
|
import com.xjrsoft.common.exception.MyException;
|
|
|
import com.xjrsoft.module.hikvision.entity.HikvisionData;
|
|
|
import com.xjrsoft.module.hikvision.mapper.HikvisionDataMapper;
|
|
|
import com.xjrsoft.module.hikvision.util.ApiUtil;
|
|
|
import com.xjrsoft.module.personnel.dto.AddCarMessageApplyDto;
|
|
|
-import com.xjrsoft.module.personnel.dto.UpdateCarMessageApplyDto;
|
|
|
import com.xjrsoft.module.personnel.entity.CarMessageApply;
|
|
|
import com.xjrsoft.module.personnel.mapper.CarMessageApplyMapper;
|
|
|
import com.xjrsoft.module.personnel.service.ICarMessageApplyService;
|
|
|
@@ -21,8 +18,6 @@ import lombok.AllArgsConstructor;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import java.time.LocalDateTime;
|
|
|
-import java.util.Collection;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
@@ -59,17 +54,17 @@ public class CarMessageApplyServiceImpl extends MPJBaseServiceImpl<CarMessageApp
|
|
|
String apiUrl = "/api/resource/v1/vehicle/batch/delete";
|
|
|
String result = apiUtil.doPost(apiUrl, paramJson.toString(), null);
|
|
|
|
|
|
- JsonParser parser = new JsonParser();
|
|
|
- JsonObject resultJson = parser.parse(result).getAsJsonObject();
|
|
|
- if (resultJson.get("code").getAsInt() == 0 && !resultJson.get("data").isJsonNull()) {
|
|
|
- JsonArray data = resultJson.get("data").getAsJsonArray();
|
|
|
- for (JsonElement datum : data) {
|
|
|
- JsonObject object = datum.getAsJsonObject();
|
|
|
- idsMap.remove(object.get("vehicleId").getAsString());
|
|
|
- }
|
|
|
- Collection<String> values = idsMap.values();
|
|
|
-// this.removeBatchByIds(values); 远程没有数据
|
|
|
- }
|
|
|
+// JsonParser parser = new JsonParser();
|
|
|
+// JsonObject resultJson = parser.parse(result).getAsJsonObject();
|
|
|
+// if ("0".equals(resultJson.get("code").getAsString()) && !resultJson.get("data").isJsonNull()) {
|
|
|
+// JsonArray data = resultJson.get("data").getAsJsonArray();
|
|
|
+// for (JsonElement datum : data) {
|
|
|
+// JsonObject object = datum.getAsJsonObject();
|
|
|
+// idsMap.remove(object.get("vehicleId").getAsString());
|
|
|
+// }
|
|
|
+// Collection<String> values = idsMap.values();
|
|
|
+//// this.removeBatchByIds(values); 远程没有数据
|
|
|
+// }
|
|
|
// else{
|
|
|
this.removeBatchByIds(ids);
|
|
|
// }
|