提交 31ba468c authored 作者: 艾庆国's avatar 艾庆国

Merge branch 'refs/heads/v25.3_broker_20240906' into test

Former-commit-id: 34a3540d
...@@ -9,6 +9,7 @@ import com.clx.performance.dao.settle.SettlementOwnerDetailDao; ...@@ -9,6 +9,7 @@ import com.clx.performance.dao.settle.SettlementOwnerDetailDao;
import com.clx.performance.model.settle.OrderChildSyncTransportRecord; import com.clx.performance.model.settle.OrderChildSyncTransportRecord;
import com.clx.performance.model.settle.SettlementOwner; import com.clx.performance.model.settle.SettlementOwner;
import com.clx.performance.model.settle.SettlementOwnerDetail; import com.clx.performance.model.settle.SettlementOwnerDetail;
import com.clx.performance.service.broker.OrderChildBrokerMqService;
import com.clx.performance.service.settle.SettlementMqService; import com.clx.performance.service.settle.SettlementMqService;
import com.msl.common.job.JobLog; import com.msl.common.job.JobLog;
import com.xxl.job.core.context.XxlJobHelper; import com.xxl.job.core.context.XxlJobHelper;
...@@ -36,6 +37,7 @@ public class SettlementJob { ...@@ -36,6 +37,7 @@ public class SettlementJob {
private final SettlementOwnerDetailDao settlementOwnerDetailDao; private final SettlementOwnerDetailDao settlementOwnerDetailDao;
private final SettlementOwnerDao settlementOwnerDao; private final SettlementOwnerDao settlementOwnerDao;
private final OrderChildSyncTransportRecordDao orderChildSyncTransportRecordDao; private final OrderChildSyncTransportRecordDao orderChildSyncTransportRecordDao;
private final OrderChildBrokerMqService orderChildBrokerMqService;
/** /**
* 同步无车承运运单开票类型 * 同步无车承运运单开票类型
...@@ -129,4 +131,61 @@ public class SettlementJob { ...@@ -129,4 +131,61 @@ public class SettlementJob {
} }
} }
/**
* 网络货运运单更新(测试)
*/
@XxlJob("settlementBrokerOrderChildUpdateTest")
public void settlementBrokerOrderChildUpdateTest() {
try {
List<String> childNoList=null;
String jobParam= XxlJobHelper.getJobParam();
log.info("网络货运运单更新, param:{}", jobParam);
if (StringUtils.isNotBlank(jobParam)) {
childNoList = JSON.parseArray(jobParam, String.class);
}
if (childNoList == null && childNoList.isEmpty()) {
return;
}
for (String childNo : childNoList) {
// 发送mq (运单更新)
orderChildBrokerMqService.orderChildUpdate(childNo);
}
} catch (Exception e) {
log.warn("网络货运运单更新失败,msg:{}", ExceptionUtils.getStackTrace(e));
JobLog.error("网络货运运单更新失败", e);
}
}
/**
* 网络货运运单同步(测试)
*/
@XxlJob("settlementBrokerOrderChildSyncTest")
public void settlementBrokerOrderChildSyncTest() {
try {
List<String> childNoList=null;
String jobParam= XxlJobHelper.getJobParam();
log.info("网络货运运单同步, param:{}", jobParam);
if (StringUtils.isNotBlank(jobParam)) {
childNoList = JSON.parseArray(jobParam, String.class);
}
if (childNoList == null && childNoList.isEmpty()) {
return;
}
for (String childNo : childNoList) {
// 发送mq (运单同步)
orderChildBrokerMqService.orderChildSync(childNo);
}
} catch (Exception e) {
log.warn("网络货运运单同步失败,msg:{}", ExceptionUtils.getStackTrace(e));
JobLog.error("网络货运运单同步失败", e);
}
}
} }
...@@ -252,7 +252,8 @@ public class OrderChildBrokerServiceImpl implements OrderChildBrokerService { ...@@ -252,7 +252,8 @@ public class OrderChildBrokerServiceImpl implements OrderChildBrokerService {
orderChildInfo.setSourceOrderNo(orderChild.getOrderNo()); orderChildInfo.setSourceOrderNo(orderChild.getOrderNo());
orderChildInfo.setSourceSettlementNo(settlementOwnerDetail.getSettlementNo()); orderChildInfo.setSourceSettlementNo(settlementOwnerDetail.getSettlementNo());
orderChildInfo.setFreight(orderChild.getFreightPrice().multiply(orderChild.getUnloadNet()) orderChildInfo.setFreight(orderChild.getFreightPrice()
.multiply(orderChild.getUnloadNet().min(orderChild.getLoadNet()))
.setScale(0, RoundingMode.HALF_UP).intValue()); .setScale(0, RoundingMode.HALF_UP).intValue());
orderChildInfo.setDriverFreight(orderChild.getFreight().intValue()); orderChildInfo.setDriverFreight(orderChild.getFreight().intValue());
orderChildInfo.setDriverFreightPrice(orderChild.getFreightPrice().intValue()); orderChildInfo.setDriverFreightPrice(orderChild.getFreightPrice().intValue());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论