Commit 87d09c18 authored by 曹军's avatar 曹军

上传定时任务

parent 1ffff686
......@@ -61,7 +61,7 @@ public class UploadTransportVehicleInfo {
/**
* 车辆型号(如凯美瑞2023款、特斯拉Model 3等)
*/
private String vehicleMode;
private String vehicleModel;
/**
* 车辆类型(如小型轿车、货车、客车等)
......
......@@ -40,8 +40,8 @@ public class InFactoryTransportVehicleInfoService {
}
for (InFactoryTransportVehicleInfo inFactoryTransportVehicleInfo : inFactoryTransportVehicleInfos) {
String bodyJson = JSONObject.toJSONString(inFactoryTransportVehicleInfo);
// log.info("场内车辆最终被发送的数据bodyJson={}", bodyJson);
HttpUtils.sendPost(IN_FACTORY_URL, null, null, bodyJson);
log.info("场内车辆最终被发送的数据bodyJson={}", bodyJson);
HttpResponse httpResponse = HttpUtils.sendPost(IN_FACTORY_URL, null, null, bodyJson);
Thread.sleep(50);
}
log.info("上传场内车辆{}条", inFactoryTransportVehicleInfoUrls.size());
......
......@@ -13,6 +13,8 @@ import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.Objects;
......@@ -115,7 +117,13 @@ public class BeanConverter {
}
info.setLicensePlateColor(color);
}
info.setRegistrationDate(item.getRegistrationDate());
if (StringUtils.isNotBlank(item.getRegistrationDate())) {
String registrationDate = item.getRegistrationDate();
if (registrationDate.length() == 8) {
String s = registrationDate.substring(0, 4) + "-" + registrationDate.substring(4, 6) + "-" + registrationDate.substring(6);
info.setRegistrationDate(s);
}
}
if (StringUtils.isBlank(item.getNatureUse())) {
info.setUsaGenaTure("货运");
} else {
......@@ -128,7 +136,7 @@ public class BeanConverter {
if (StringUtils.isNotBlank(item.getOnBoardList())) {
info.setVehicleListImg(Base64Utils.imgToBase64(Base64Utils.encodeImageUrl(item.getOnBoardList())));
}
info.setVehicleMode(item.getModel());
info.setVehicleModel(item.getModel());
info.setVehicleType(item.getVehicleType());
info.setVin(item.getVin());
if (StringUtils.isNotBlank(item.getOwner()) && item.getOwner().contains("成都锦宸")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment