提交 cfdebfec authored 作者: 刘海泉's avatar 刘海泉

Merge remote-tracking branch 'origin/v26.2-jdk17springboot3-20240912' into test_jdk17

Former-commit-id: 91ef0291
......@@ -21,6 +21,8 @@ public class OpenOrderChildDTO {
private String sourceOrderNo;
@Schema(description = "源结算单编号", example = "1234", required = true)
private String sourceSettlementNo;
@Schema(description = "订单来源", example = "1234")
private Integer orderSource;
@Schema(description = "运费单价(分/吨)", example = "162", required = true)
private Integer freightPrice;
......@@ -36,6 +38,8 @@ public class OpenOrderChildDTO {
private Integer lossFee;
@Schema(description = "货损单价(分/吨)", example = "123")
private Integer lossFeePrice;
@Schema(description = "管理费(分)", example = "123")
private Integer invoiceServiceFee;
@Schema(description = "发货皮重(吨)")
private BigDecimal sendTare;
......@@ -61,6 +65,8 @@ public class OpenOrderChildDTO {
private BigDecimal receiveRough;
@Schema(description = "收货净重(吨)")
private BigDecimal receiveNet;
@Schema(description = "实收净重(吨)")
private BigDecimal realNet;
@Schema(description = "备注", example = "", required = true)
private String remark;
......
......@@ -709,6 +709,15 @@ public class OrderChildDaoImpl extends BaseDaoImpl<OrderChildMapper, OrderChild,
baseMapper.batchUpdateCancel(canCancelOrderChildList);
}
@Override
public List<OrderChild> findListByChildNoList(List<String> childNoList) {
return list(lQrWrapper()
.in(OrderChild :: getChildNo, childNoList)
);
}
@Override
public int countTakeByOrderGoodsNo(String orderGoodsNo) {
return baseMapper.countTakeByOrderGoodsNo(orderGoodsNo);
......@@ -718,13 +727,4 @@ public class OrderChildDaoImpl extends BaseDaoImpl<OrderChildMapper, OrderChild,
public int countLoadByOrderGoodsNo(String orderGoodsNo) {
return baseMapper.countLoadByOrderGoodsNo(orderGoodsNo);
}
@Override
public List<OrderChild> findListByChildNoList(List<String> childNoList) {
return list(lQrWrapper()
.in(OrderChild :: getChildNo, childNoList)
);
}
}
......@@ -20,10 +20,10 @@ public interface SettlementDriverDao extends BaseDao<SettlementDriverMapper, Set
boolean updatePayStatus(SettlementDriver item);
boolean updateInvoiceCompany(SettlementDriver item);
boolean updateSettleStatus(SettlementDriver item);
boolean updateInvoiceCompany(SettlementDriver item);
Optional<SettlementDriver> findBySettlementNo(String settlementNo);
Optional<SettlementDriver> findByChildNo(String childNo);
......
......@@ -17,6 +17,7 @@ import com.msl.message.sms.api.sms.content.SmsMessageContentImpl;
import com.msl.message.sms.api.sms.recipient.SmsMessageRecipientImpl;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
......@@ -51,10 +52,18 @@ public class SendOrderStatusNoticeSmsListener {
public void onMessage(Message message) {
try{
log.info("监听到发送订单状态通知短信,消息内容{}", new String(message.getBody()));
OrderInfoMessage order = JSONUtil.toBean(new String(message.getBody()),
new TypeReference<MqWrapper<OrderInfoMessage>>() {
},false).getData();
String targets = getTargets(order.getOrderStatus());
log.info("获取需要发送短信的手机号列表:{}",targets);
if(StringUtils.isBlank(targets)){
return;
}
SmsMessage smsMessage = new SmsMessage();
//设置消息内容
......@@ -73,7 +82,7 @@ public class SendOrderStatusNoticeSmsListener {
//设置消息接收人
SmsMessageRecipientImpl smsMessageRecipient = new SmsMessageRecipientImpl();
smsMessageRecipient.setUserType(USER_MOBILE.getCode());
smsMessageRecipient.setTargets(getTargets(order.getOrderStatus()));
smsMessageRecipient.setTargets(targets);
smsMessage.setContent(smsMessageContent);
......@@ -86,7 +95,7 @@ public class SendOrderStatusNoticeSmsListener {
//向消息中心发送消息
log.info("订单状态提醒发送短信开始,请求参数:{}", JSON.toJSONString(smsMessage));
Result<Object> result = configuredOpenClient.doAction(new MessageAction(smsMessage));
log.info("订单状态提醒发送短信开始,响应结果:{}", JSON.toJSONString(result));
log.info("订单状态提醒发送短信结束,响应结果:{}", JSON.toJSONString(result));
}catch (Exception e){
log.info("监听到发送订单状态通知短信发生异常,异常原因:{}", ExceptionUtils.getStackTrace(e));
}
......
......@@ -19,6 +19,7 @@ import com.clx.performance.model.settle.SettlementOwnerDetail;
import com.clx.performance.service.broker.OrderChildBrokerMqHandlerService;
import com.clx.performance.service.broker.OrderChildBrokerMqService;
import com.clx.performance.service.broker.OrderChildBrokerService;
import com.clx.performance.vo.mq.broker.BrokerOrderChildDriverPayMqParam;
import com.clx.performance.service.settle.SettlementPostService;
import com.clx.performance.vo.mq.broker.BrokerOrderChildDriverPayMqParam;
import com.clx.performance.vo.mq.broker.BrokerOrderChildSyncMqParam;
......
......@@ -260,6 +260,7 @@ public class OrderChildBrokerServiceImpl implements OrderChildBrokerService {
orderChildInfo.setSourceGoodsNo(orderChild.getOrderGoodsNo());
orderChildInfo.setSourceOrderNo(orderChild.getOrderNo());
orderChildInfo.setSourceSettlementNo(settlementOwnerDetail.getSettlementNo());
orderChildInfo.setOrderSource(orderChild.getOrderSource());
orderChildInfo.setFreight(orderChild.getFreightPrice()
.multiply(orderChild.getUnloadNet().min(orderChild.getLoadNet()))
......@@ -287,6 +288,10 @@ public class OrderChildBrokerServiceImpl implements OrderChildBrokerService {
orderChildInfo.setReceiveTare(orderChild.getUnloadTare());
orderChildInfo.setReceiveRough(orderChild.getUnloadRough());
orderChildInfo.setReceiveNet(orderChild.getUnloadNet());
orderChildInfo.setRealNet(settlementOwnerDetail.getWeight());
orderChildInfo.setInvoiceServiceFee(settlementOwnerDetail.getInvoiceServiceFee().intValue());
orderChildInfo.setInvoiceFlag(settlementOwnerDetail.getInvoiceType()==null? null
:Objects.equals(settlementOwnerDetail.getInvoiceType(),
SettlementOwnerEnum.InvoiceType.ONLINE.getCode())? 2 : 1);
......
......@@ -253,11 +253,6 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
@Transactional(rollbackFor = Exception.class)
public void settlementDriverSettlement(SettlementDriverSettleMqParam mq) {
OrderChild orderChild = orderChildDao
.getByChildNo(mq.getChildNo()).orElseThrow(PerformanceResultEnum.ORDER_CHILD_NO_FOUND);
OrderGoods orderGoods = orderGoodsDao
.getByOrderGoodsNo(orderChild.getOrderGoodsNo()).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
SettlementDriverDetail settlementDriverDetail = settlementDriverDetailDao
.getByChildNo(mq.getChildNo()).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
......@@ -302,6 +297,7 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
settlementDriverDetail.setSettlementNo(settlementDriver.getSettlementNo());
settlementDriverDetailDao.updateSettlementNo(settlementDriverDetail);
}
@Transactional(rollbackFor = Exception.class)
......@@ -1091,7 +1087,9 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
settlementDriverDetailDao.updateInvoiceTypeAndPrepayFreightFlag(settlementDriverDetail);
if (settlementDriver != null) {
settlementDriver.setPrepayFreightFlag(settlementDriverDetail.getPrepayFreightFlag());
settlementDriver.setInvoicingCompanyId(settlementDriverDetail.getInvoicingCompanyId());
settlementDriver.setInvoicingCompanyShorterName(settlementDriverDetail.getInvoicingCompanyShorterName());
settlementDriver.setInvoicingCompanyGroupCode(settlementDriverDetail.getInvoicingCompanyGroupCode());
}
if (Objects.equals(settlementOwnerDetail.getReportFlag(), com.clx.order.enums.OrderEnum.ReportFlag.NO.getCode())){
......
......@@ -15,7 +15,7 @@ public interface SettlementPostService {
void updateInvoice(List<String> childNoList);
void driverSettle(String childNo);
void riskAdd(Integer id);
void driverSettle(String childNo);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论