Commit 6c9ce8e0 authored by liudong1993's avatar liudong1993

Merge branch 'sdzq' of http://gitlab.oytour.com/Kui2/mall.oytour.com into sdzq-ld

parents db322aed 600a4caf
...@@ -193,7 +193,7 @@ namespace Mall.Module.Product ...@@ -193,7 +193,7 @@ namespace Mall.Module.Product
/// <param name="rowCount">总条数</param> /// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param> /// <param name="query">查询条件</param>
/// <returns></returns> /// <returns></returns>
public List<RB_GuideCar_Site_Extend> GetLogisticsPinkageList(int pageIndex, int pageSize, out long rowCount, RB_GuideCar_Site_Extend query) public List<RB_GuideCar_Site_Extend> GetGuideCarSiteList(int pageIndex, int pageSize, out long rowCount, RB_GuideCar_Site_Extend query)
{ {
List<RB_GuideCar_Site_Extend> list = SiteRepository.GetPageListRepository(pageIndex, pageSize, out rowCount, query); List<RB_GuideCar_Site_Extend> list = SiteRepository.GetPageListRepository(pageIndex, pageSize, out rowCount, query);
if (list != null && list.Any()) if (list != null && list.Any())
...@@ -213,7 +213,7 @@ namespace Mall.Module.Product ...@@ -213,7 +213,7 @@ namespace Mall.Module.Product
/// </summary> /// </summary>
/// <param name="query"></param> /// <param name="query"></param>
/// <returns></returns> /// <returns></returns>
public RB_GuideCar_Site_Extend GetPinkageModel(RB_GuideCar_Site_Extend query) public RB_GuideCar_Site_Extend GetGuideCarSiteModel(RB_GuideCar_Site_Extend query)
{ {
RB_GuideCar_Site_Extend model = SiteRepository.GetLogisticsRulesList(query).FirstOrDefault(); RB_GuideCar_Site_Extend model = SiteRepository.GetLogisticsRulesList(query).FirstOrDefault();
if (model != null) if (model != null)
......
...@@ -152,12 +152,19 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -152,12 +152,19 @@ namespace Mall.WebApi.Controllers.AppletWeChat
foreach (var item in list) foreach (var item in list)
{ {
if (item.OrderStatus == 7)
{
item.FXCommission = 0;
item.LiveCommission = 0;
item.RemitFXCommission = 0;
item.RefundActual = item.RefundActual > 0 ? item.RefundActual : item.AllPrice;
}
item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney; item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney;
item.NoPaid = item.ALLCommission; item.NoPaid = item.ALLCommission;
item.RemitFXCommission = item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0); item.RemitFXCommission = item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
item.Paid = item.ServiceCharge + item.RefundActual + item.RemitFXCommission + item.CostMoney + item.GoodsFreight + item.PayMoney; item.Paid = item.RefundActual + item.RemitFXCommission + item.CostMoney + item.GoodsFreight + item.PayMoney;
item.GrossProfit = item.AllPrice + item.YSMoney - item.ALLCommission; item.GrossProfit = item.AllPrice + item.YSMoney - item.ALLCommission;
if (item.AllPrice == 0) if (item.AllPrice == 0)
{ {
item.GrossProfitRate = 0; item.GrossProfitRate = 0;
...@@ -166,7 +173,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -166,7 +173,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
{ {
item.GrossProfitRate = ((item.AllPrice + item.YSMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.YSMoney)), 4, MidpointRounding.AwayFromZero) * 100); item.GrossProfitRate = ((item.AllPrice + item.YSMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.YSMoney)), 4, MidpointRounding.AwayFromZero) * 100);
} }
// item.Paid = item.PaidCostMoney + item.RemitFXCommission; // item.Paid = item.PaidCostMoney + item.RemitFXCommission;
//item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney; //item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney;
//item.GrossProfitRate = (item.AllPrice + item.RealMoney - item.RefundActual) == 0 ? 0 : Math.Round((item.GrossProfit / ((item.AllPrice + item.RealMoney - item.RefundActual) == 0 ? 1 : (item.AllPrice + item.RealMoney - item.RefundActual))), 2, MidpointRounding.AwayFromZero); //item.GrossProfitRate = (item.AllPrice + item.RealMoney - item.RefundActual) == 0 ? 0 : Math.Round((item.GrossProfit / ((item.AllPrice + item.RealMoney - item.RefundActual) == 0 ? 1 : (item.AllPrice + item.RealMoney - item.RefundActual))), 2, MidpointRounding.AwayFromZero);
...@@ -364,13 +371,19 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -364,13 +371,19 @@ namespace Mall.WebApi.Controllers.AppletWeChat
} }
foreach (var item in list) foreach (var item in list)
{ {
if (item.OrderStatus == 7)
{
item.FXCommission = 0;
item.LiveCommission = 0;
item.RemitFXCommission = 0;
item.RefundActual = item.RefundActual > 0 ? item.RefundActual : item.AllPrice;
}
item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney; item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney;
item.NoPaid = item.ALLCommission; item.NoPaid = item.ALLCommission;
item.RemitFXCommission = item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0); item.RemitFXCommission = item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
item.Paid = item.ServiceCharge + item.RefundActual + item.RemitFXCommission + item.CostMoney + item.GoodsFreight + item.PayMoney; item.Paid = item.RefundActual + item.RemitFXCommission + item.CostMoney + item.GoodsFreight + item.PayMoney;
item.GrossProfit = item.AllPrice + item.YSMoney - item.ALLCommission; item.GrossProfit = item.AllPrice + item.YSMoney - item.ALLCommission;
if (item.AllPrice == 0) if (item.AllPrice == 0)
{ {
item.GrossProfitRate = 0; item.GrossProfitRate = 0;
...@@ -415,7 +428,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -415,7 +428,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
datarow.ExcelRows.Add(new ExcelColumn(value: item.FXCommission.ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.FXCommission.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.RemitFXCommission.ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.RemitFXCommission.ToString("#0.00")) { });
string commissionInfo = ""; string commissionInfo = "";
if (item.OrderCommissionList != null && item.OrderCommissionList.Any()) if (item.OrderCommissionList != null && item.OrderCommissionList.Any()&&item.OrderStatus!=7)
{ {
foreach (var itemCommi in item.OrderCommissionList) foreach (var itemCommi in item.OrderCommissionList)
{ {
...@@ -567,14 +580,19 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -567,14 +580,19 @@ namespace Mall.WebApi.Controllers.AppletWeChat
} }
foreach (var item in list) foreach (var item in list)
{ {
if (item.OrderStatus == 7)
{
item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney; item.FXCommission = 0;
item.LiveCommission = 0;
item.RemitFXCommission = 0;
item.RefundActual = item.RefundActual > 0 ? item.RefundActual : item.AllPrice;
}
item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney;
item.NoPaid = item.ALLCommission; item.NoPaid = item.ALLCommission;
item.RemitFXCommission = item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0); item.RemitFXCommission = item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
item.Paid = item.ServiceCharge + item.RefundActual + item.RemitFXCommission + item.CostMoney + item.GoodsFreight + item.PayMoney; item.Paid = item.RefundActual + item.RemitFXCommission + item.CostMoney + item.GoodsFreight + item.PayMoney;
item.GrossProfit = item.AllPrice + item.YSMoney - item.ALLCommission; item.GrossProfit = item.AllPrice + item.YSMoney - item.ALLCommission;
if (item.AllPrice == 0) if (item.AllPrice == 0)
{ {
item.GrossProfitRate = 0; item.GrossProfitRate = 0;
......
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