提交 204c4eb3 authored 作者: liuhaiquan's avatar liuhaiquan

Merge remote-tracking branch 'origin/v6.4_transportation_20231110' into test

...@@ -30,4 +30,8 @@ public class OrderChildLineStatisticsVO { ...@@ -30,4 +30,8 @@ public class OrderChildLineStatisticsVO {
@ApiModelProperty("时长均值") @ApiModelProperty("时长均值")
private Integer timeAvg; private Integer timeAvg;
@ApiModelProperty("司机运费")
private BigDecimal driverFreight;
} }
...@@ -11,7 +11,6 @@ import com.clx.performance.vo.app.OrderChildVO; ...@@ -11,7 +11,6 @@ import com.clx.performance.vo.app.OrderChildVO;
import com.clx.performance.vo.pc.PageCarrierOrderChildVO; import com.clx.performance.vo.pc.PageCarrierOrderChildVO;
import com.clx.performance.vo.pc.PageOrderChildPoundAuditVO; import com.clx.performance.vo.pc.PageOrderChildPoundAuditVO;
import com.msl.common.base.Optional; import com.msl.common.base.Optional;
import com.msl.common.base.PageParam;
import com.msl.common.dao.BaseDao; import com.msl.common.dao.BaseDao;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -152,4 +151,5 @@ public interface OrderChildDao extends BaseDao<OrderChildMapper, OrderChild, Int ...@@ -152,4 +151,5 @@ public interface OrderChildDao extends BaseDao<OrderChildMapper, OrderChild, Int
List<OrderChild> selectInOrderChildNoList(List<String> childNoList); List<OrderChild> selectInOrderChildNoList(List<String> childNoList);
List<Double> getLossNet(OrderChildReportParam param); List<Double> getLossNet(OrderChildReportParam param);
BigDecimal getLastDriverFreightByTransportLine(Integer sendSystemAddressId, Integer receiveSystemAddressId);
} }
...@@ -13,11 +13,9 @@ import com.clx.performance.param.app.PageOrderChildOfDriverParam; ...@@ -13,11 +13,9 @@ import com.clx.performance.param.app.PageOrderChildOfDriverParam;
import com.clx.performance.param.app.PageOrderChildOfDriverSearchParam; import com.clx.performance.param.app.PageOrderChildOfDriverSearchParam;
import com.clx.performance.param.pc.*; import com.clx.performance.param.pc.*;
import com.clx.performance.vo.app.OrderChildVO; import com.clx.performance.vo.app.OrderChildVO;
import com.clx.performance.vo.pc.OrderGoodsVO;
import com.clx.performance.vo.pc.PageCarrierOrderChildVO; import com.clx.performance.vo.pc.PageCarrierOrderChildVO;
import com.clx.performance.vo.pc.PageOrderChildPoundAuditVO; import com.clx.performance.vo.pc.PageOrderChildPoundAuditVO;
import com.msl.common.base.Optional; import com.msl.common.base.Optional;
import com.msl.common.base.PageParam;
import com.msl.common.dao.impl.BaseDaoImpl; import com.msl.common.dao.impl.BaseDaoImpl;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -25,6 +23,7 @@ import org.springframework.stereotype.Repository; ...@@ -25,6 +23,7 @@ import org.springframework.stereotype.Repository;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import java.util.Objects;
/** /**
* @Author: aiqinguo * @Author: aiqinguo
...@@ -453,4 +452,18 @@ public class OrderChildDaoImpl extends BaseDaoImpl<OrderChildMapper, OrderChild, ...@@ -453,4 +452,18 @@ public class OrderChildDaoImpl extends BaseDaoImpl<OrderChildMapper, OrderChild,
public List<Double> getLossNet(OrderChildReportParam param) { public List<Double> getLossNet(OrderChildReportParam param) {
return baseMapper.getLossNet(param); return baseMapper.getLossNet(param);
} }
@Override
public BigDecimal getLastDriverFreightByTransportLine(Integer sendSystemAddressId, Integer receiveSystemAddressId) {
LambdaQueryWrapper<OrderChild> query = new LambdaQueryWrapper<>();
query.eq(OrderChild :: getSendSystemAddressId,sendSystemAddressId);
query.eq(OrderChild :: getReceiveSystemAddressId,receiveSystemAddressId);
query.orderByDesc(OrderChild :: getCreateTime);
query.last("limit 1");
OrderChild child = baseMapper.selectOne(query);
if(Objects.nonNull(child)){
return child.getFreight();
}
return BigDecimal.ZERO;
}
} }
...@@ -25,7 +25,7 @@ public class OrderChildDriverConfirmListener { ...@@ -25,7 +25,7 @@ public class OrderChildDriverConfirmListener {
@Autowired @Autowired
private OrderChildMqHandlerService orderChildMqHandlerService; private OrderChildMqHandlerService orderChildMqHandlerService;
@RabbitListener(queues = RabbitKeyOrderChildConstants.ORDER_CHILD_ADD_QUEUE) @RabbitListener(queues = RabbitKeyOrderChildConstants.ORDER_CHILD_DRIVER_CONFIRM_QUEUE)
public void process(Message message) { public void process(Message message) {
try{ try{
log.info("运单-司机确认收货, message:{}", new String(message.getBody())); log.info("运单-司机确认收货, message:{}", new String(message.getBody()));
......
...@@ -78,6 +78,8 @@ public interface OrderGoodsMapper extends BaseMapper<OrderGoods> { ...@@ -78,6 +78,8 @@ public interface OrderGoodsMapper extends BaseMapper<OrderGoods> {
@SelectProvider(type = OrderGoodsSqlProvider.class, method = "getAlreadyTransportWeight") @SelectProvider(type = OrderGoodsSqlProvider.class, method = "getAlreadyTransportWeight")
BigDecimal getAlreadyTransportWeight(@Param("orderNo") String orderNo); BigDecimal getAlreadyTransportWeight(@Param("orderNo") String orderNo);
@SelectProvider(type = OrderGoodsSqlProvider.class, method = "getCancelOrderGoods")
List<OrderGoodsAPPVO> getCancelOrderGoods(@Param(value = "param") List<String> param); List<OrderGoodsAPPVO> getCancelOrderGoods(@Param(value = "param") List<String> param);
@Select("select sum(already_transport_weight) from order_goods where order_no=#{orderNo}") @Select("select sum(already_transport_weight) from order_goods where order_no=#{orderNo}")
......
...@@ -417,10 +417,13 @@ public class OrderGoodsServiceImpl implements OrderGoodsService { ...@@ -417,10 +417,13 @@ public class OrderGoodsServiceImpl implements OrderGoodsService {
} }
} }
} }
if (CollectionUtils.isNotEmpty(truckList)) {
orderGoodsTruckBindDao.saveBatchEntity(param.getOrderNo(), orderGoodsNo, truckList, now); orderGoodsTruckBindDao.saveBatchEntity(param.getOrderNo(), orderGoodsNo, truckList, now);
goodsOrderTruckRecordComponent.saveTruckRecord(orderGoodsNo, truckList); goodsOrderTruckRecordComponent.saveTruckRecord(orderGoodsNo, truckList);
} }
}
orderGoodsStatusLazyComponent.deleteRedisRecordForLastOrderTime(orderGoodsNo); orderGoodsStatusLazyComponent.deleteRedisRecordForLastOrderTime(orderGoodsNo);
orderGoodsStatusLazyComponent.deleteRedisRecordForLastArriveSendTime(orderGoodsNo); orderGoodsStatusLazyComponent.deleteRedisRecordForLastArriveSendTime(orderGoodsNo);
......
...@@ -34,6 +34,10 @@ public class FeignOrderChildServiceImpl implements FeignOrderChildService { ...@@ -34,6 +34,10 @@ public class FeignOrderChildServiceImpl implements FeignOrderChildService {
vo.setPoundDifferenceRatioAvg(linePoundDifferenceRatioAvg==null? null:linePoundDifferenceRatioAvg.setScale(4, RoundingMode.HALF_UP).movePointRight(2)); vo.setPoundDifferenceRatioAvg(linePoundDifferenceRatioAvg==null? null:linePoundDifferenceRatioAvg.setScale(4, RoundingMode.HALF_UP).movePointRight(2));
vo.setTimeAvg(timeAvg==null? null : timeAvg/60); vo.setTimeAvg(timeAvg==null? null : timeAvg/60);
BigDecimal driverFreight = orderChildDao.getLastDriverFreightByTransportLine(sendSystemAddressId, receiveSystemAddressId);
return vo; return vo;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论