提交 aaf1236f authored 作者: jiangwujie's avatar jiangwujie

feature(电子围栏): 增加日志

上级 d0f3ea2c
......@@ -1785,6 +1785,7 @@ public class OrderChildServiceImpl implements OrderChildService {
}
/**
* todo 要改成两个
* 获取监装
* @param orderNo
* @param childNo
......@@ -3246,14 +3247,16 @@ public class OrderChildServiceImpl implements OrderChildService {
OrderGoods orderGoods = orderGoodsDao.getByOrderGoodsNo(orderGoodsNo).get();
BigDecimal siteLongitudeX = orderGoods.getSendLongitude();
BigDecimal siteLatitudeY = orderGoods.getSendLatitude();
log.info("运单号:{},卡车:{},status:{},站点经度:{},站点纬度:{},卡车经度:{},卡车纬度:{}", orderGoodsNo, truckNo, child.getStatus(), siteLongitudeX, siteLatitudeY, truckLongitudeX, truckLatitudeY);
//调高德获取距离
if (Objects.nonNull(truckLongitudeX) && Objects.nonNull(truckLatitudeY)) {
Integer distance = getGdRoute(truckNo, orderGoods.getSendLongitude(), orderGoods.getSendLatitude(), siteLongitudeX,
siteLatitudeY);
if (distance == null) {
log.error("高德获取卡车与货源地位置距离失败,orderGoodsNo:{},orderChildNo:{},truckNo:{}", orderGoodsNo, childNo, truckNo);
log.info("高德获取卡车与货源地位置距离失败,orderGoodsNo:{},orderChildNo:{},truckNo:{}", orderGoodsNo, childNo, truckNo);
continue;
}
log.info("运单号:{},卡车:{},status:{},站点经度:{},站点纬度:{},卡车经度:{},卡车纬度:{},距离:{}", orderGoodsNo, truckNo, child.getStatus(), siteLongitudeX, siteLatitudeY, truckLongitudeX, truckLatitudeY, distance);
// 超出货源地+通知触发距离
if (distance > driverNoticeConfigVO.getNoticeTriggerDistanceMeter()) {
if (Objects.equals(child.getExitNoticeStatus(), OrderChildEnum.ExitNoticeStatus.NOT_NOTIFIED.getCode())
......@@ -3268,7 +3271,9 @@ public class OrderChildServiceImpl implements OrderChildService {
// 已装货
if (Objects.equals(child.getStatus(), OrderChildEnum.Status.LOAD.getCode())) {
Object[] superviseInfo = getSuperviseInfo(child.getOrderNo(), child.getChildNo());
log.info("运单号:{},卡车:{},监装信息{}", childNo, truckNo, superviseInfo);
if (superviseInfo != null) {
log.info("{}超出货源地x公里范围了,运单{}为装货成功状态,发送短信", truckNo, childNo);
sendSupervisionSms(child.getDriverMobile(), child.getTruckNo(), child.getChildNo(), (String) superviseInfo[2]);
}
}
......@@ -3277,11 +3282,14 @@ public class OrderChildServiceImpl implements OrderChildService {
child.setEnterExitSendStatus(OrderChildEnum.EnterExitSendStatus.DRIVE_OUT.getCode());
orderChildDao.updateEntityByKey(child);
}
} else if(distance <= 1000){
} else if (distance <= 1000) {
log.info("运单号:{},卡车:{},status:{},站点经度:{},站点纬度:{},卡车经度:{},卡车纬度:{},距离:{} 距离小于1km", orderGoodsNo, truckNo, child.getStatus(), siteLongitudeX, siteLatitudeY, truckLongitudeX, truckLatitudeY, distance);
// 这里的1km的距离是产品需求写死的,不使用通知配置范围
// 未超出货源地+通知触发距离
// 驶入货源地+通知触发距离范围内了
if (Objects.equals(child.getEnterExitSendStatus(), OrderChildEnum.EnterExitSendStatus.DRIVE_OUT.getCode())) {
if (Objects.equals(child.getEnterExitSendStatus(), OrderChildEnum.EnterExitSendStatus.DRIVE_OUT.getCode())
|| Objects.equals(child.getEnterExitSendStatus(), OrderChildEnum.EnterExitSendStatus.INIT.getCode())
) {
//驶入货源地x公里范围了,且通知状态为已通知
// 修改 通知状态 为未通知
child.setExitNoticeStatus(OrderChildEnum.ExitNoticeStatus.NOT_NOTIFIED.getCode());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论