Commit e0b42a80 authored by 332784038@qq.com's avatar 332784038@qq.com

批量加价页面的订单列表返回订单额外费用数据

parent f8ca9619
......@@ -1078,7 +1078,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
// 当订单项产品有任何一个有特价标记时,那么订单标记为特价
orderMarkupVO.setSpecialPriceType(orderMarkupVO.getOrderItemBackVOList().stream().anyMatch(item -> item.getSpecialPriceType() || item.getSplitCustomPriceType() || item.getSpecialCommission() || item.getChannelManualPricing()));
}
// 额外费用
orderMarkupVO.setExtraCosts(receivableService.getExtraReceivableByOrderId(orderMarkupVO.getOrderId()));
}
}
return list;
......
......@@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.order.enums.OrderAbnormalStateEnum;
import cn.iocoder.yudao.module.order.enums.OrderStatusEnum;
import cn.iocoder.yudao.module.order.enums.OrderStatusMsgEnum;
import cn.iocoder.yudao.module.order.vo.orderItem.OrderItemBackVO;
import cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableBackVO;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.JSONObject;
......@@ -486,6 +487,8 @@ public class OrderMarkupVO {
@ApiModelProperty(value = "订单关联产品信息")
List<OrderItemBackVO> orderItemBackVOList;
@ApiModelProperty(value = "订单关联产品信息")
List<ReceivableBackVO> extraCosts;
@ApiModelProperty(value = "到仓件数")
private Integer checkNum;
......
......@@ -354,4 +354,6 @@ public interface ReceivableMapper extends AbstractMapper<ReceivableDO> {
List<Long> getAllBoxId();
List<Long> getDestWarehouseIdListByDestCity(@Param("destCity") List<Long> destCity);
List<ReceivableBackVO> getExtraReceivableByOrderId(@Param("orderId") Long orderId);
}
......@@ -144,6 +144,15 @@ public interface ReceivableService extends IService<ReceivableDO> {
*/
List<ReceivableBackVO> getReceivableByOrderId(Long orderId);
/**
* 根据订单id获得额外应收款(注:订单本身计算得出的运费、清关费、保价费除外的其他费用都属于额外费用)
*
* @param orderId 订单ID
* @return 应收款列表
*/
List<ReceivableBackVO> getExtraReceivableByOrderId(Long orderId);
/**
* 获得应收款列表, 用于 Excel 导出
*
......
......@@ -323,6 +323,10 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
return receivableBackVOList;
}
@Override
public List<ReceivableBackVO> getExtraReceivableByOrderId(Long orderId) {
return receivableMapper.getExtraReceivableByOrderId(orderId);
}
@Override
public List<ReceivableDO> getReceivableList(ReceivableQueryVO query) {
......
......@@ -705,4 +705,12 @@
</if>
GROUP BY r.id
</select>
<select id="getExtraReceivableByOrderId"
resultType="cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableBackVO">
SELECT r.*
FROM ecw_receivable r
WHERE r.deleted = 0
AND r.fee_source > 1
AND r.order_id = #{orderId}
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment