Merge branch 'dev' of https://git.njzscloud.com/lzq/njzscloud into dev
commit
3e052223e6
|
|
@ -117,7 +117,11 @@ public class Hsoa {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void relogin() {
|
public synchronized static void relogin() {
|
||||||
|
if (StrUtil.isBlank(refTnt) || StrUtil.isBlank(tnt)) {
|
||||||
|
log.info("无需重置登录TOKEN");
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
wlock.lock();
|
wlock.lock();
|
||||||
log.info("重置登录TOKEN");
|
log.info("重置登录TOKEN");
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.njzscloud.supervisory.hsoa.constant;
|
||||||
|
|
||||||
|
import com.njzscloud.common.core.ienum.DictStr;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典代码:push_type
|
||||||
|
* 字典名称:审核状态
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public enum PushType implements DictStr {
|
||||||
|
GuiJi("GuiJi", "车辆轨迹推送"),
|
||||||
|
LianDan("LianDan", "联单推送"),
|
||||||
|
;
|
||||||
|
private final String val;
|
||||||
|
private final String txt;
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
package com.njzscloud.supervisory.hsoa.controller;
|
package com.njzscloud.supervisory.hsoa.controller;
|
||||||
|
|
||||||
import com.njzscloud.common.core.utils.R;
|
import com.njzscloud.common.core.utils.R;
|
||||||
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
import com.njzscloud.supervisory.hsoa.Hsoa;
|
import com.njzscloud.supervisory.hsoa.Hsoa;
|
||||||
|
import com.njzscloud.supervisory.hsoa.constant.PushType;
|
||||||
|
import com.njzscloud.supervisory.hsoa.pojo.entity.HsoaRecode;
|
||||||
import com.njzscloud.supervisory.hsoa.pojo.param.PushProvincialSaveParam;
|
import com.njzscloud.supervisory.hsoa.pojo.param.PushProvincialSaveParam;
|
||||||
import com.njzscloud.supervisory.hsoa.pojo.param.PushVehicleTrajectoryParam;
|
import com.njzscloud.supervisory.hsoa.pojo.param.PushVehicleTrajectoryParam;
|
||||||
import com.njzscloud.supervisory.hsoa.pojo.result.HsoaResult;
|
import com.njzscloud.supervisory.hsoa.pojo.result.HsoaResult;
|
||||||
|
|
@ -9,6 +13,8 @@ import com.njzscloud.supervisory.hsoa.service.HsoaService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RequestMapping("/hsoa")
|
@RequestMapping("/hsoa")
|
||||||
|
|
@ -28,4 +34,19 @@ public class HsoaController {
|
||||||
return R.success(hsoaResult);
|
return R.success(hsoaResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
@GetMapping("/paging")
|
||||||
|
public R<PageResult<HsoaRecode>> paging(PageParam pageParam,
|
||||||
|
@RequestParam("pushType") PushType pushType,
|
||||||
|
@RequestParam(value = "orderSn", required = false) String orderSn,
|
||||||
|
@RequestParam(value = "licensePlate", required = false) String licensePlate,
|
||||||
|
@RequestParam(value = "success", required = false) Boolean success,
|
||||||
|
@RequestParam(value = "startTime", required = false) LocalDateTime startTime,
|
||||||
|
@RequestParam(value = "endTime", required = false) LocalDateTime endTime
|
||||||
|
) {
|
||||||
|
return R.success(hsoaService.paging(pageParam, orderSn, licensePlate, pushType, success, startTime, endTime));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.njzscloud.supervisory.hsoa.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njzscloud.supervisory.hsoa.pojo.entity.HsoaRecode;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface HsoaMapper extends BaseMapper<HsoaRecode> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.njzscloud.supervisory.hsoa.pojo.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.njzscloud.supervisory.hsoa.constant.PushType;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("hsoa_recode")
|
||||||
|
public class HsoaRecode {
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
private Long orderId;
|
||||||
|
private String orderSn;
|
||||||
|
private String licensePlate;
|
||||||
|
private PushType pushType;
|
||||||
|
private Boolean success;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createTime;
|
||||||
|
}
|
||||||
|
|
@ -1,17 +1,39 @@
|
||||||
package com.njzscloud.supervisory.hsoa.service;
|
package com.njzscloud.supervisory.hsoa.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.io.IoUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njzscloud.common.core.jackson.Jackson;
|
import com.njzscloud.common.core.jackson.Jackson;
|
||||||
|
import com.njzscloud.common.core.tuple.Tuple2;
|
||||||
|
import com.njzscloud.common.core.utils.ImgUtil;
|
||||||
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
|
import com.njzscloud.common.oss.util.AliOSS;
|
||||||
import com.njzscloud.supervisory.hsoa.Hsoa;
|
import com.njzscloud.supervisory.hsoa.Hsoa;
|
||||||
|
import com.njzscloud.supervisory.hsoa.constant.PushType;
|
||||||
|
import com.njzscloud.supervisory.hsoa.mapper.HsoaMapper;
|
||||||
|
import com.njzscloud.supervisory.hsoa.pojo.entity.HsoaRecode;
|
||||||
import com.njzscloud.supervisory.hsoa.pojo.param.PushProvincialSaveParam;
|
import com.njzscloud.supervisory.hsoa.pojo.param.PushProvincialSaveParam;
|
||||||
|
import com.njzscloud.supervisory.hsoa.pojo.param.PushProvincialUploadParam;
|
||||||
import com.njzscloud.supervisory.hsoa.pojo.result.HsoaResult;
|
import com.njzscloud.supervisory.hsoa.pojo.result.HsoaResult;
|
||||||
|
import com.njzscloud.supervisory.hsoa.pojo.result.UploadResult;
|
||||||
import com.njzscloud.supervisory.order.pojo.result.OrderPagingResult;
|
import com.njzscloud.supervisory.order.pojo.result.OrderPagingResult;
|
||||||
|
import com.njzscloud.supervisory.order.utils.FileUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -20,116 +42,7 @@ import static com.njzscloud.supervisory.hsoa.pojo.param.PushProvincialUploadPara
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class HsoaService {
|
public class HsoaService extends ServiceImpl<HsoaMapper, HsoaRecode> implements IService<HsoaRecode> {
|
||||||
// private final OrderInfoService orderInfoService;
|
|
||||||
/* private final TruckLocationTrackService truckLocationTrackService;
|
|
||||||
private final AtomicBoolean run = new AtomicBoolean(false);
|
|
||||||
private final AtomicInteger succ = new AtomicInteger(0);
|
|
||||||
private final AtomicInteger fail = new AtomicInteger(0);
|
|
||||||
private final AtomicInteger total = new AtomicInteger(0);
|
|
||||||
private final AtomicLong order = new AtomicLong(0);
|
|
||||||
|
|
||||||
public synchronized Map<String, Object> pushOrder(Long orderId, Integer count) {
|
|
||||||
MapBuilder<String, Object> builder = MapUtil.<String, Object>builder();
|
|
||||||
|
|
||||||
if (run.get()) {
|
|
||||||
int i1 = total.get();
|
|
||||||
int i2 = succ.get();
|
|
||||||
int i3 = fail.get();
|
|
||||||
long v = order.get();
|
|
||||||
return builder
|
|
||||||
.put("订单", v)
|
|
||||||
.put("任务数量", i1)
|
|
||||||
.put("成功数量", i2)
|
|
||||||
.put("失败数量", i3)
|
|
||||||
.put("剩余数量", i1 - i2 - i3)
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
OrderPagingResult orderDetail = orderInfoService.detail(orderId);
|
|
||||||
Assert.notNull(orderDetail, () -> Exceptions.clierr("订单不存在"));
|
|
||||||
String licensePlate = orderDetail.getLicensePlate();
|
|
||||||
String transCompanyName = orderDetail.getTransCompanyName();
|
|
||||||
List<TruckLocationTrackEntity> list = truckLocationTrackService.list(Wrappers.<TruckLocationTrackEntity>lambdaQuery().eq(TruckLocationTrackEntity::getOrderId, orderId));
|
|
||||||
|
|
||||||
if (list.isEmpty()) {
|
|
||||||
return builder
|
|
||||||
.put("订单", orderId)
|
|
||||||
.put("任务数量", 0)
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
if (count == null || count == 0) {
|
|
||||||
count = list.size();
|
|
||||||
} else {
|
|
||||||
count = Math.min(count, list.size());
|
|
||||||
}
|
|
||||||
run.set(true);
|
|
||||||
order.set(orderId);
|
|
||||||
total.set(count);
|
|
||||||
succ.set(0);
|
|
||||||
fail.set(0);
|
|
||||||
int c = count;
|
|
||||||
Thread thread = new Thread(() -> {
|
|
||||||
for (int i = 0; i < c; i++) {
|
|
||||||
ThreadUtil.sleep(1000);
|
|
||||||
TruckLocationTrackEntity locationTrack = list.get(i);
|
|
||||||
boolean b = run.get();
|
|
||||||
if (!b) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
Double longitude = locationTrack.getLongitude();
|
|
||||||
Double latitude = locationTrack.getLatitude();
|
|
||||||
Double speed = locationTrack.getSpeed();
|
|
||||||
Integer direction = locationTrack.getDirection();
|
|
||||||
LocalDateTime locationTime = locationTrack.getLocationTime();
|
|
||||||
String time = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").format(locationTime);
|
|
||||||
HsoaResult<?> result = Hsoa.pushVehicleTrajectory(new PushVehicleTrajectoryParam()
|
|
||||||
.setCompanyName(transCompanyName)
|
|
||||||
.setTransportLicense(orderDetail.getCertificateSn())
|
|
||||||
.setPlateNumber(licensePlate)
|
|
||||||
.setVehicleType(orderDetail.getTruckCategory())
|
|
||||||
.setLongitude(longitude + "")
|
|
||||||
.setLatitude(latitude + "")
|
|
||||||
.setSpeed(speed)
|
|
||||||
.setDirection(direction + 0.0)
|
|
||||||
.setStateType("正常行驶")
|
|
||||||
.setAlarmType("无")
|
|
||||||
.setLoadStatus("2")
|
|
||||||
.setSealedStatus("1")
|
|
||||||
.setLiftStatus("0")
|
|
||||||
.setAccStatus(1)
|
|
||||||
.setGpsTime(time)
|
|
||||||
.setLocationMode("WGS84")
|
|
||||||
);
|
|
||||||
if (result == null || !result.isSuccess()) {
|
|
||||||
fail.incrementAndGet();
|
|
||||||
log.error("推送定位数据失败,数据Id:{}", locationTrack.getId());
|
|
||||||
} else {
|
|
||||||
succ.incrementAndGet();
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
fail.incrementAndGet();
|
|
||||||
log.error("推送定位数据失败,数据Id:{}", locationTrack.getId(), e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
run.set(false);
|
|
||||||
});
|
|
||||||
thread.setDaemon(true);
|
|
||||||
thread.start();
|
|
||||||
|
|
||||||
int i1 = total.get();
|
|
||||||
int i2 = succ.get();
|
|
||||||
int i3 = fail.get();
|
|
||||||
return builder
|
|
||||||
.put("订单", orderId)
|
|
||||||
.put("任务数量", i1)
|
|
||||||
.put("成功数量", i2)
|
|
||||||
.put("失败数量", i3)
|
|
||||||
.put("剩余数量", i1 - i2 - i3)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
} */
|
|
||||||
|
|
||||||
public HsoaResult<?> pushProvincialSave(OrderPagingResult detail) {
|
public HsoaResult<?> pushProvincialSave(OrderPagingResult detail) {
|
||||||
log.info("上传数据:{}", Jackson.toJsonStr(detail));
|
log.info("上传数据:{}", Jackson.toJsonStr(detail));
|
||||||
|
|
@ -239,14 +152,13 @@ public class HsoaService {
|
||||||
.setTransportationEnterpriseId(detail.getTransCompanyId() == null ? null : detail.getTransCompanyId().toString())
|
.setTransportationEnterpriseId(detail.getTransCompanyId() == null ? null : detail.getTransCompanyId().toString())
|
||||||
.setTransportationEnterpriseName(detail.getTransCompanyName())
|
.setTransportationEnterpriseName(detail.getTransCompanyName())
|
||||||
);
|
);
|
||||||
log.info(Jackson.toJsonStr(param));
|
// log.info(Jackson.toJsonStr(param));
|
||||||
return Hsoa.pushProvincial(param);
|
return Hsoa.pushProvincial(param);
|
||||||
// return null;
|
// return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String upload(List<String> urls, String uploadPath) {
|
private String upload(List<String> urls, String uploadPath) {
|
||||||
return null;
|
if (CollUtil.isEmpty(urls)) return null;
|
||||||
/* if (CollUtil.isEmpty(urls)) return null;
|
|
||||||
String url = urls.get(0);
|
String url = urls.get(0);
|
||||||
if (StrUtil.isBlank(url)) return null;
|
if (StrUtil.isBlank(url)) return null;
|
||||||
url = url.substring(1);
|
url = url.substring(1);
|
||||||
|
|
@ -262,15 +174,28 @@ public class HsoaService {
|
||||||
.setUploadPath(uploadPath)
|
.setUploadPath(uploadPath)
|
||||||
);
|
);
|
||||||
if (upload.isSuccess()) {
|
if (upload.isSuccess()) {
|
||||||
log.info("图片:{}、{}", uploadPath, upload.getUrl());
|
|
||||||
return upload.getUrl();
|
return upload.getUrl();
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
log.error("上传失败", e);
|
||||||
|
return null;
|
||||||
} finally {
|
} finally {
|
||||||
IoUtil.close(in);
|
IoUtil.close(in);
|
||||||
} */
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public PageResult<HsoaRecode> paging(PageParam pageParam, String orderSn, String licensePlate, PushType pushType, Boolean success, LocalDateTime startTime, LocalDateTime endTime) {
|
||||||
|
Page<HsoaRecode> page = pageParam.toPage();
|
||||||
|
page.addOrder(OrderItem.desc("create_time"), OrderItem.desc("id"));
|
||||||
|
return PageResult.of(this.page(page, Wrappers.<HsoaRecode>lambdaQuery()
|
||||||
|
.eq(StrUtil.isNotBlank(orderSn), HsoaRecode::getOrderSn, orderSn)
|
||||||
|
.eq(StrUtil.isNotBlank(licensePlate), HsoaRecode::getLicensePlate, licensePlate)
|
||||||
|
.eq(pushType != null, HsoaRecode::getPushType, pushType)
|
||||||
|
.eq(success != null, HsoaRecode::getSuccess, success)
|
||||||
|
.ge(startTime != null, HsoaRecode::getCreateTime, startTime)
|
||||||
|
.le(endTime != null, HsoaRecode::getCreateTime, endTime)
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,16 +16,16 @@ public class OrderExportResult {
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
|
||||||
* 序号
|
|
||||||
*/
|
|
||||||
private Integer sort;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单号
|
* 订单号
|
||||||
*/
|
*/
|
||||||
private String sn;
|
private String sn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 序号
|
||||||
|
*/
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清运时间(日期)
|
* 清运时间(日期)
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@ import com.njzscloud.supervisory.expense.pojo.entity.ExpenseItemsConfigEntity;
|
||||||
import com.njzscloud.supervisory.expense.service.ExpenseItemsConfigService;
|
import com.njzscloud.supervisory.expense.service.ExpenseItemsConfigService;
|
||||||
import com.njzscloud.supervisory.goods.contant.MoneyStrategy;
|
import com.njzscloud.supervisory.goods.contant.MoneyStrategy;
|
||||||
import com.njzscloud.supervisory.hsoa.Hsoa;
|
import com.njzscloud.supervisory.hsoa.Hsoa;
|
||||||
|
import com.njzscloud.supervisory.hsoa.constant.PushType;
|
||||||
|
import com.njzscloud.supervisory.hsoa.pojo.entity.HsoaRecode;
|
||||||
import com.njzscloud.supervisory.hsoa.pojo.param.PushVehicleTrajectoryParam;
|
import com.njzscloud.supervisory.hsoa.pojo.param.PushVehicleTrajectoryParam;
|
||||||
import com.njzscloud.supervisory.hsoa.pojo.result.HsoaResult;
|
import com.njzscloud.supervisory.hsoa.pojo.result.HsoaResult;
|
||||||
import com.njzscloud.supervisory.hsoa.service.HsoaService;
|
import com.njzscloud.supervisory.hsoa.service.HsoaService;
|
||||||
|
|
@ -1348,18 +1350,25 @@ public class OrderInfoService extends ServiceImpl<OrderInfoMapper, OrderInfoEnti
|
||||||
log.error("订单状态改变事件发布失败,订单{},状态{}", orderInfoEntity_.getSn(), newOrderStatus, e);
|
log.error("订单状态改变事件发布失败,订单{},状态{}", orderInfoEntity_.getSn(), newOrderStatus, e);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
/* CompletableFuture.runAsync(() -> {
|
CompletableFuture.runAsync(() -> {
|
||||||
OrderPagingResult detail = this.detail(orderId);
|
OrderPagingResult detail = this.detail(orderId);
|
||||||
HsoaResult<?> result = hsoaService.pushProvincialSave(detail);
|
HsoaResult<?> result = hsoaService.pushProvincialSave(detail);
|
||||||
|
HsoaRecode hsoaRecode = new HsoaRecode()
|
||||||
|
.setOrderId(orderId)
|
||||||
|
.setOrderSn(detail.getSn())
|
||||||
|
.setLicensePlate(detail.getLicensePlate())
|
||||||
|
.setPushType(PushType.LianDan);
|
||||||
if (result == null || !result.isSuccess()) {
|
if (result == null || !result.isSuccess()) {
|
||||||
Hsoa.relogin();
|
Hsoa.relogin();
|
||||||
log.error("推送订单数据失败,数据Id:{}", entity.getId());
|
log.error("推送订单数据失败,数据Id:{}", entity.getId());
|
||||||
|
hsoaService.save(hsoaRecode.setSuccess(Boolean.FALSE));
|
||||||
|
} else {
|
||||||
|
hsoaService.save(hsoaRecode.setSuccess(Boolean.TRUE));
|
||||||
}
|
}
|
||||||
}).exceptionally(e -> {
|
}).exceptionally(e -> {
|
||||||
log.error("推送订单数据失败,数据Id:{}", entity.getId(), e);
|
log.error("推送订单数据失败,数据Id:{}", entity.getId(), e);
|
||||||
return null;
|
return null;
|
||||||
}); */
|
});
|
||||||
|
|
||||||
// 出厂付费
|
// 出厂付费
|
||||||
if (OrderCategory.PuTong.equals(orderInfoEntity.getOrderCategory()) && MoneyWay.OUT.getVal().equals(entity.getMoneyWay())) {
|
if (OrderCategory.PuTong.equals(orderInfoEntity.getOrderCategory()) && MoneyWay.OUT.getVal().equals(entity.getMoneyWay())) {
|
||||||
|
|
@ -1931,10 +1940,19 @@ public class OrderInfoService extends ServiceImpl<OrderInfoMapper, OrderInfoEnti
|
||||||
.setAccStatus(1)
|
.setAccStatus(1)
|
||||||
.setGpsTime(time)
|
.setGpsTime(time)
|
||||||
.setLocationMode("WGS84");
|
.setLocationMode("WGS84");
|
||||||
|
|
||||||
|
HsoaRecode hsoaRecode = new HsoaRecode()
|
||||||
|
.setOrderId(orderInfoId)
|
||||||
|
.setOrderSn(orderDetail.getSn())
|
||||||
|
.setLicensePlate(licensePlate)
|
||||||
|
.setPushType(PushType.GuiJi);
|
||||||
HsoaResult<?> result = Hsoa.pushVehicleTrajectory(param);
|
HsoaResult<?> result = Hsoa.pushVehicleTrajectory(param);
|
||||||
if (result == null || !result.isSuccess()) {
|
if (result == null || !result.isSuccess()) {
|
||||||
Hsoa.relogin();
|
Hsoa.relogin();
|
||||||
log.error("推送定位数据失败,数据Id:{}", entity.getId());
|
log.error("推送定位数据失败,数据Id:{}", entity.getId());
|
||||||
|
hsoaService.save(hsoaRecode.setSuccess(Boolean.FALSE));
|
||||||
|
} else {
|
||||||
|
hsoaService.save(hsoaRecode.setSuccess(Boolean.TRUE));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("推送定位数据失败,数据Id:{}", entity.getId(), e);
|
log.error("推送定位数据失败,数据Id:{}", entity.getId(), e);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue