Commit eec91258 authored by 吴春's avatar 吴春

提交代码

parent f6303840
......@@ -3918,7 +3918,8 @@ namespace Mall.Module.Product
model.RejectRemark,
model.IsCanApplyForAfterSale,
model.PresentFXGrade,
model.BuyerMessage
model.BuyerMessage,
model.DestinationAddress
});
}
......
......@@ -96,7 +96,10 @@ namespace Mall.Repository.Product
{
where += $@" and od.{nameof(RB_Goods_OrderDetail.SupplierId)}={dmodel.SupplierId}";
}
if (dmodel.OrderClassify > -1)
{
where += $@" and o.{nameof(RB_Goods_Order.OrderClassify)}={dmodel.OrderClassify}";
}
if (dmodel.IsFinance > 0)
{
if (dmodel.IsSelectAll == 1)
......@@ -112,6 +115,7 @@ namespace Mall.Repository.Product
}
else if (dmodel.IsSelectAll == 2)
{
if (dmodel.IsFinance == 1)
{
where += $@" and od.{nameof(RB_Goods_OrderDetail.FreightFinanceId)}>0";
......@@ -120,17 +124,45 @@ namespace Mall.Repository.Product
{
where += $@" and od.{nameof(RB_Goods_OrderDetail.FreightFinanceId)}<=0";
}
}
else
else if (dmodel.IsSelectAll == 3)
{
if (dmodel.IsFinance == 1)
{
where += $@" and (od.{nameof(RB_Goods_OrderDetail.FreightFinanceId)}>0 or od.{nameof(RB_Goods_OrderDetail.CostFinanceId)}>0)";
where += $@" and od.{nameof(RB_Goods_OrderDetail.InsuranceFinanceId)}>0";
}
else
{
where += $@" and (od.{nameof(RB_Goods_OrderDetail.FreightFinanceId)}<=0 or od.{nameof(RB_Goods_OrderDetail.CostFinanceId)} <= 0)";
where += $@" and od.{nameof(RB_Goods_OrderDetail.InsuranceFinanceId)}<=0";
}
}
else
{
if (dmodel.OrderClassify == 0)
{
if (dmodel.IsFinance == 1)
{
where += $@" and (od.{nameof(RB_Goods_OrderDetail.FreightFinanceId)}>0 or od.{nameof(RB_Goods_OrderDetail.CostFinanceId)}>0)";
}
else
{
where += $@" and (od.{nameof(RB_Goods_OrderDetail.FreightFinanceId)}<=0 or od.{nameof(RB_Goods_OrderDetail.CostFinanceId)} <= 0)";
}
}
else {
if (dmodel.IsFinance == 1)
{
where += $@" and (od.{nameof(RB_Goods_OrderDetail.InsuranceFinanceId)}>0 or od.{nameof(RB_Goods_OrderDetail.CostFinanceId)}>0)";
}
else
{
where += $@" and (od.{nameof(RB_Goods_OrderDetail.InsuranceFinanceId)}<=0 or od.{nameof(RB_Goods_OrderDetail.CostFinanceId)} <= 0)";
}
}
}
}
if (!string.IsNullOrEmpty(dmodel.StartTime))
......@@ -586,7 +618,8 @@ where {where} order by o.CreateDate desc";
{
where += $@" and o.{nameof(RB_Goods_Order.OrderNo)} ='{dmodel.OrderNo}'";
}
if (dmodel.UserId > 0) {
if (dmodel.UserId > 0)
{
where += $@" and o.{nameof(RB_Goods_Order.UserId)} ={dmodel.UserId}";
}
......
......@@ -300,21 +300,43 @@ namespace Mall.WebApi.Controllers.User
{
if (orderGoodsItem.CostMoney > 0 && orderGoodsItem.CostFinanceId <= 0)
{
var newOrderGoods = new RB_Goods_OrderDetail_Extend
if (orderGoodsItem.OrderClassify == 1 && orderGoodsItem.CarType != Common.Enum.Goods.GuideCarGoodsTypeEnum.Line)
{
FinanceType = 1,
Final_Price = orderGoodsItem.Final_Price,
Number = orderGoodsItem.Number,
FreightMoney = orderGoodsItem.FreightMoney,
GoodsName = orderGoodsItem.GoodsName,
OrderNo = orderGoodsItem.OrderNo,
Id = orderGoodsItem.Id,
CostMoney = orderGoodsItem.CostMoney,
FreightCostMoney = orderGoodsItem.FreightCostMoney,
InsuranceCostMoney = orderGoodsItem.InsuranceCostMoney
};
OrderDetailPaid += ((orderGoodsItem.CostMoney ?? 0) * (orderGoodsItem.Number ?? 0));
result.Add(newOrderGoods);
var newOrderGoods = new RB_Goods_OrderDetail_Extend
{
FinanceType = 1,
Final_Price = orderGoodsItem.Final_Price,
Number =1,
FreightMoney = orderGoodsItem.FreightMoney,
GoodsName = orderGoodsItem.GoodsName,
OrderNo = orderGoodsItem.OrderNo,
Id = orderGoodsItem.Id,
CostMoney = orderGoodsItem.CostMoney,
FreightCostMoney = orderGoodsItem.FreightCostMoney,
InsuranceCostMoney = orderGoodsItem.InsuranceCostMoney
};
OrderDetailPaid += (orderGoodsItem.CostMoney ?? 0);
result.Add(newOrderGoods);
}
else {
var newOrderGoods = new RB_Goods_OrderDetail_Extend
{
FinanceType = 1,
Final_Price = orderGoodsItem.Final_Price,
Number = orderGoodsItem.Number,
FreightMoney = orderGoodsItem.FreightMoney,
GoodsName = orderGoodsItem.GoodsName,
OrderNo = orderGoodsItem.OrderNo,
Id = orderGoodsItem.Id,
CostMoney = orderGoodsItem.CostMoney,
FreightCostMoney = orderGoodsItem.FreightCostMoney,
InsuranceCostMoney = orderGoodsItem.InsuranceCostMoney
};
OrderDetailPaid += ((orderGoodsItem.CostMoney ?? 0) * (orderGoodsItem.Number ?? 0));
result.Add(newOrderGoods);
}
}
}
if (demodel.IsSelectAll == 0 || demodel.IsSelectAll == 2)
......@@ -349,14 +371,14 @@ namespace Mall.WebApi.Controllers.User
{
FinanceType = 3,
Final_Price = orderGoodsItem.Final_Price,
Number = orderGoodsItem.Number,
Number = 1,//orderGoodsItem.Number,
FreightMoney = orderGoodsItem.FreightMoney,
GoodsName = orderGoodsItem.GoodsName,
OrderNo = orderGoodsItem.OrderNo,
Id = orderGoodsItem.Id,
CostMoney = orderGoodsItem.CostMoney,
FreightCostMoney = orderGoodsItem.FreightCostMoney,
InsuranceCostMoney = ((orderGoodsItem.InsuranceCostMoney ?? 0) / (orderGoodsItem.Number ?? 1))
InsuranceCostMoney = (orderGoodsItem.InsuranceCostMoney ?? 0)
};
OrderDetailPaid += (orderGoodsItem.InsuranceCostMoney ?? 0);
result.Add(newOrderGoods);
......@@ -377,7 +399,7 @@ namespace Mall.WebApi.Controllers.User
Name = orderGoodsItem.GoodsName,
OrderId = orderGoodsItem.OrderId ?? 0,
OrderDetailId = orderGoodsItem.Id,
GoodsPrice = ((orderGoodsItem.CostMoney ?? 0) * (orderGoodsItem.Number ?? 0)),
GoodsPrice =(orderGoodsItem.OrderClassify==1&& orderGoodsItem.CarType!=Common.Enum.Goods.GuideCarGoodsTypeEnum.Line)? (orderGoodsItem.CostMoney ?? 0): ((orderGoodsItem.CostMoney ?? 0) * (orderGoodsItem.Number ?? 0)),
FreightMoney = orderGoodsItem.FreightCostMoney,
Unit_Price = orderGoodsItem.CostMoney,
Number = orderGoodsItem.Number,
......
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