提交 910ee229 authored 作者: liuhaiquan's avatar liuhaiquan

查询路线最新的司机运费

上级 b6975fed
......@@ -30,4 +30,8 @@ public class OrderChildLineStatisticsVO {
@ApiModelProperty("时长均值")
private Integer timeAvg;
@ApiModelProperty("司机运费")
private BigDecimal driverFreight;
}
......@@ -11,7 +11,6 @@ import com.clx.performance.vo.app.OrderChildVO;
import com.clx.performance.vo.pc.PageCarrierOrderChildVO;
import com.clx.performance.vo.pc.PageOrderChildPoundAuditVO;
import com.msl.common.base.Optional;
import com.msl.common.base.PageParam;
import com.msl.common.dao.BaseDao;
import org.apache.ibatis.annotations.Param;
......@@ -152,4 +151,5 @@ public interface OrderChildDao extends BaseDao<OrderChildMapper, OrderChild, Int
List<OrderChild> selectInOrderChildNoList(List<String> childNoList);
List<Double> getLossNet(OrderChildReportParam param);
BigDecimal getLastDriverFreightByTransportLine(Integer sendSystemAddressId, Integer receiveSystemAddressId);
}
......@@ -13,11 +13,9 @@ import com.clx.performance.param.app.PageOrderChildOfDriverParam;
import com.clx.performance.param.app.PageOrderChildOfDriverSearchParam;
import com.clx.performance.param.pc.*;
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.PageOrderChildPoundAuditVO;
import com.msl.common.base.Optional;
import com.msl.common.base.PageParam;
import com.msl.common.dao.impl.BaseDaoImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;
......@@ -25,6 +23,7 @@ import org.springframework.stereotype.Repository;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;
/**
* @Author: aiqinguo
......@@ -452,4 +451,18 @@ public class OrderChildDaoImpl extends BaseDaoImpl<OrderChildMapper, OrderChild,
public List<Double> getLossNet(OrderChildReportParam 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;
}
}
......@@ -34,6 +34,10 @@ public class FeignOrderChildServiceImpl implements FeignOrderChildService {
vo.setPoundDifferenceRatioAvg(linePoundDifferenceRatioAvg==null? null:linePoundDifferenceRatioAvg.setScale(4, RoundingMode.HALF_UP).movePointRight(2));
vo.setTimeAvg(timeAvg==null? null : timeAvg/60);
BigDecimal driverFreight = orderChildDao.getLastDriverFreightByTransportLine(sendSystemAddressId, receiveSystemAddressId);
return vo;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论