Browse Source

增加人工费

pjzs_starttask_update
shanji 2 years ago
parent
commit
62b053ef9c
  1. 2
      BBWY.Server.Business/AfterSaleOrder/AfterSaleOrderBusiness.cs
  2. 6
      BBWY.Server.Business/BillCorrection/BillCorrectionBusiness.cs
  3. 20
      BBWY.Server.Business/Order/OrderBusiness.cs
  4. 12
      BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs
  5. 2
      BBWY.Server.Business/ServiceOrder/ServiceOrderBusiness.cs
  6. 18
      BBWY.Server.Business/Sync/OrderEstimateCostSyncBusiness.cs
  7. 12
      BBWY.Server.Business/Sync/OrderSyncBusiness.cs
  8. 18
      BBWY.Server.Model/Db/Order/OrderCostDetail.cs
  9. 26
      BBWY.Server.Model/Db/Order/SkuRecentCost.cs
  10. 25
      BBWY.Server.Model/Db/PurchaseOrder/PurchaseOrder.cs
  11. 19
      BBWY.Server.Model/Dto/Request/PurchaseOrder/AddPurchaseOrderRequest.cs
  12. 19
      BBWY.Server.Model/Dto/Request/PurchaseOrder/EditPurchaseOrderRequest.cs
  13. 2
      BBWY.Server.Model/Dto/Response/BillCorrection/BillCorrectionOrderResponse.cs
  14. 10
      BBWY.Server.Model/Dto/Response/Order/ExportOrderResponse.cs

2
BBWY.Server.Business/AfterSaleOrder/AfterSaleOrderBusiness.cs

@ -170,7 +170,7 @@ namespace BBWY.Server.Business
dbAfterSaleOrder.FirstFreight = dbOrderCostDetail.FirstFreight; dbAfterSaleOrder.FirstFreight = dbOrderCostDetail.FirstFreight;
dbAfterSaleOrder.ReissueProductAmount = dbOrderCostDetail.SkuAmount; dbAfterSaleOrder.ReissueProductAmount = dbOrderCostDetail.SkuAmount;
dbAfterSaleOrder.ReissueFreight = dbOrderCostDetail.PurchaseFreight; dbAfterSaleOrder.ReissueFreight = dbOrderCostDetail.PurchaseFreight;
dbAfterSaleOrder.StorageAmount = dbOrderCostDetail.StorageAmount; //dbAfterSaleOrder.StorageAmount = dbOrderCostDetail.StorageAmount;
dbAfterSaleOrder.InStorageAmount = dbOrderCostDetail.InStorageAmount; dbAfterSaleOrder.InStorageAmount = dbOrderCostDetail.InStorageAmount;
dbAfterSaleOrder.OutStorageAmount = dbOrderCostDetail.OutStorageAmount; dbAfterSaleOrder.OutStorageAmount = dbOrderCostDetail.OutStorageAmount;
} }

6
BBWY.Server.Business/BillCorrection/BillCorrectionBusiness.cs

@ -68,7 +68,8 @@ namespace BBWY.Server.Business
InStorageAmount = g.Sum(g.Value.Item1.InStorageAmount), InStorageAmount = g.Sum(g.Value.Item1.InStorageAmount),
OutStorageAmount = g.Sum(g.Value.Item1.OutStorageAmount), OutStorageAmount = g.Sum(g.Value.Item1.OutStorageAmount),
ConsumableAmount = g.Sum(g.Value.Item1.ConsumableAmount), ConsumableAmount = g.Sum(g.Value.Item1.ConsumableAmount),
StorageAmount = g.Sum(g.Value.Item1.StorageAmount) PackagingLaborAmount = g.Sum(g.Value.Item1.PackagingLaborAmount),
//StorageAmount = g.Sum(g.Value.Item1.StorageAmount)
}); });
@ -99,7 +100,8 @@ namespace BBWY.Server.Business
order.InStorageAmount = orderCostDetail?.InStorageAmount ?? 0M; order.InStorageAmount = orderCostDetail?.InStorageAmount ?? 0M;
order.OutStorageAmount = orderCostDetail?.OutStorageAmount ?? 0M; order.OutStorageAmount = orderCostDetail?.OutStorageAmount ?? 0M;
order.ConsumableAmount = orderCostDetail?.ConsumableAmount ?? 0M; order.ConsumableAmount = orderCostDetail?.ConsumableAmount ?? 0M;
order.StorageAmount = orderCostDetail?.StorageAmount ?? 0M; order.PackagingLaborAmount = orderCostDetail?.PackagingLaborAmount ?? 0M;
//order.StorageAmount = orderCostDetail?.StorageAmount ?? 0M;
order.AfterTotalCost = afterOrder?.AfterTotalCost ?? 0M; order.AfterTotalCost = afterOrder?.AfterTotalCost ?? 0M;
if (order.StorageType == Model.Enums.StorageType.SD) if (order.StorageType == Model.Enums.StorageType.SD)

20
BBWY.Server.Business/Order/OrderBusiness.cs

@ -54,7 +54,7 @@ namespace BBWY.Server.Business
venderBusinessLazy = new Lazy<VenderBusiness>(() => serviceProvider.GetService<VenderBusiness>()); venderBusinessLazy = new Lazy<VenderBusiness>(() => serviceProvider.GetService<VenderBusiness>());
} }
private ISelect<Order, OrderConsignee, OrderCost, Storehouse> GetOrderListQueryConditions(SearchOrderRequest searchOrderRequest) private ISelect<Order, OrderConsignee, OrderCost, Storehouse> GetOrderListQueryConditions(SearchOrderRequest searchOrderRequest)
{ {
var select = fsql.Select<Order, OrderConsignee, OrderCost, Storehouse>().LeftJoin((o, ocs, oct, sh) => o.Id == ocs.OrderId) var select = fsql.Select<Order, OrderConsignee, OrderCost, Storehouse>().LeftJoin((o, ocs, oct, sh) => o.Id == ocs.OrderId)
.LeftJoin((o, ocs, oct, sh) => o.Id == oct.OrderId) .LeftJoin((o, ocs, oct, sh) => o.Id == oct.OrderId)
@ -341,7 +341,8 @@ namespace BBWY.Server.Business
OrderId = g.Key, OrderId = g.Key,
SkuAmount = g.Sum(g.Value.SkuAmount), SkuAmount = g.Sum(g.Value.SkuAmount),
FirstFreight = g.Sum(g.Value.FirstFreight), FirstFreight = g.Sum(g.Value.FirstFreight),
StorageAmount = g.Sum(g.Value.StorageAmount), //StorageAmount = g.Sum(g.Value.StorageAmount),
PackagingLaborAmount = g.Sum(g.Value.PackagingLaborAmount),
PurchaseFreight = g.Sum(g.Value.PurchaseFreight), PurchaseFreight = g.Sum(g.Value.PurchaseFreight),
ConsumableAmount = g.Sum(g.Value.ConsumableAmount), ConsumableAmount = g.Sum(g.Value.ConsumableAmount),
InStorageAmount = g.Sum(g.Value.InStorageAmount), InStorageAmount = g.Sum(g.Value.InStorageAmount),
@ -360,7 +361,8 @@ namespace BBWY.Server.Business
OrderId = g.Key, OrderId = g.Key,
SkuAmount = g.Sum(g.Value.Item1.SkuAmount), SkuAmount = g.Sum(g.Value.Item1.SkuAmount),
FirstFreight = g.Sum(g.Value.Item1.FirstFreight), FirstFreight = g.Sum(g.Value.Item1.FirstFreight),
StorageAmount = g.Sum(g.Value.Item1.StorageAmount), //StorageAmount = g.Sum(g.Value.Item1.StorageAmount),
PackagingLaborAmount = g.Sum(g.Value.Item1.PackagingLaborAmount),
PurchaseFreight = g.Sum(g.Value.Item1.PurchaseFreight), PurchaseFreight = g.Sum(g.Value.Item1.PurchaseFreight),
ConsumableAmount = g.Sum(g.Value.Item1.ConsumableAmount), ConsumableAmount = g.Sum(g.Value.Item1.ConsumableAmount),
InStorageAmount = g.Sum(g.Value.Item1.InStorageAmount), InStorageAmount = g.Sum(g.Value.Item1.InStorageAmount),
@ -377,7 +379,8 @@ namespace BBWY.Server.Business
order.FirstFreight = statistics?.FirstFreight ?? 0M; order.FirstFreight = statistics?.FirstFreight ?? 0M;
order.PurchaseSkuAmount = statistics?.SkuAmount ?? 0M; order.PurchaseSkuAmount = statistics?.SkuAmount ?? 0M;
order.PurchaseFreight = statistics?.PurchaseFreight ?? 0M; order.PurchaseFreight = statistics?.PurchaseFreight ?? 0M;
order.StorageAmount = statistics?.StorageAmount ?? 0M; //order.StorageAmount = statistics?.StorageAmount ?? 0M;
order.PackagingLaborAmount = statistics?.PackagingLaborAmount ?? 0M;
order.SkuIds = string.Join("|", orderSkuList.Where(osku => osku.OrderId == order.OrderId).Select(osku => osku.SkuId)); order.SkuIds = string.Join("|", orderSkuList.Where(osku => osku.OrderId == order.OrderId).Select(osku => osku.SkuId));
order.ProfitRatio = order.TotalCost == 0 ? 0 : Math.Round(order.Profit / order.TotalCost * 100, 2); order.ProfitRatio = order.TotalCost == 0 ? 0 : Math.Round(order.Profit / order.TotalCost * 100, 2);
order.ConsumableAmount = statistics?.ConsumableAmount ?? 0M; order.ConsumableAmount = statistics?.ConsumableAmount ?? 0M;
@ -594,7 +597,8 @@ namespace BBWY.Server.Business
//OperationAmount = purchaseOrder.SingleOperationAmount * deductionQuantity, //OperationAmount = purchaseOrder.SingleOperationAmount * deductionQuantity,
PurchaseFreight = purchaseOrder.SingleFreight * deductionQuantity, PurchaseFreight = purchaseOrder.SingleFreight * deductionQuantity,
SkuAmount = purchaseOrder.SingleSkuAmount * deductionQuantity, SkuAmount = purchaseOrder.SingleSkuAmount * deductionQuantity,
StorageAmount = purchaseOrder.SingleStorageAmount * deductionQuantity //StorageAmount = purchaseOrder.SingleStorageAmount * deductionQuantity
PackagingLaborAmount = purchaseOrder.SinglePackagingLaborAmount * deductionQuantity
}; };
orderCostDetail.CalculationSkuGrossProfit(orderSku.ShouldPay ?? 0M, orderCostDetail.CalculationSkuGrossProfit(orderSku.ShouldPay ?? 0M,
@ -957,7 +961,8 @@ namespace BBWY.Server.Business
//SingleOperationAmount = 0, //SingleOperationAmount = 0,
SingleInStorageAmount = 0, SingleInStorageAmount = 0,
SingleOutStorageAmount = 0, SingleOutStorageAmount = 0,
SingleStorageAmount = 0, SinglePackagingLaborAmount = 0M,
//SingleStorageAmount = 0,
SingleSkuAmount = relationOrderSku.SingleSkuAmount, SingleSkuAmount = relationOrderSku.SingleSkuAmount,
SingleDeliveryFreight = 0 SingleDeliveryFreight = 0
}; };
@ -981,7 +986,8 @@ namespace BBWY.Server.Business
PurchaseFreight = odsRequest.PurchaseFreight / odsRequest.RelationPurchaseOrderSkuList.Count(), PurchaseFreight = odsRequest.PurchaseFreight / odsRequest.RelationPurchaseOrderSkuList.Count(),
SkuAmount = relationOrderSku.SingleSkuAmount * relationOrderSku.Quantity, SkuAmount = relationOrderSku.SingleSkuAmount * relationOrderSku.Quantity,
SkuId = relationOrderSku.SkuId, SkuId = relationOrderSku.SkuId,
StorageAmount = 0, PackagingLaborAmount = 0,
//StorageAmount = 0,
//TotalCost = relationOrderSku.SingleSkuAmount * relationOrderSku.Quantity + odsRequest.PurchaseFreight / odsRequest.RelationPurchaseOrderSkuList.Count(), //TotalCost = relationOrderSku.SingleSkuAmount * relationOrderSku.Quantity + odsRequest.PurchaseFreight / odsRequest.RelationPurchaseOrderSkuList.Count(),
//UnitCost = purchaseOrder.UnitCost, //UnitCost = purchaseOrder.UnitCost,
PurchaseOrderPKId = purchaseOrder.Id PurchaseOrderPKId = purchaseOrder.Id

12
BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs

@ -94,9 +94,10 @@ namespace BBWY.Server.Business
.Set(po => po.SingleFirstFreight, editPurchaseOrderRequest.SingleFirstFreight) .Set(po => po.SingleFirstFreight, editPurchaseOrderRequest.SingleFirstFreight)
.Set(po => po.SingleInStorageAmount, editPurchaseOrderRequest.SingleInStorageAmount) .Set(po => po.SingleInStorageAmount, editPurchaseOrderRequest.SingleInStorageAmount)
.Set(po => po.SingleOutStorageAmount, editPurchaseOrderRequest.SingleOutStorageAmount) .Set(po => po.SingleOutStorageAmount, editPurchaseOrderRequest.SingleOutStorageAmount)
.Set(po => po.SingleRefundInStorageAmount, editPurchaseOrderRequest.SingleRefundInStorageAmount) //.Set(po => po.SingleRefundInStorageAmount, editPurchaseOrderRequest.SingleRefundInStorageAmount)
.Set(po => po.SingleConsumableAmount, editPurchaseOrderRequest.SingleConsumableAmount) .Set(po => po.SingleConsumableAmount, editPurchaseOrderRequest.SingleConsumableAmount)
.Set(po => po.SingleStorageAmount, editPurchaseOrderRequest.SingleStorageAmount) //.Set(po => po.SingleStorageAmount, editPurchaseOrderRequest.SingleStorageAmount)
.Set(po => po.SinglePackagingLaborAmount, editPurchaseOrderRequest.SinglePackagingLaborAmount)
.Set(po => po.SingleDeliveryFreight, editPurchaseOrderRequest.SingleDeliveryFreight) .Set(po => po.SingleDeliveryFreight, editPurchaseOrderRequest.SingleDeliveryFreight)
.ExecuteAffrows(); .ExecuteAffrows();
} }
@ -244,7 +245,8 @@ namespace BBWY.Server.Business
SingleConsumableAmount = 0, SingleConsumableAmount = 0,
SingleDeliveryFreight = 0, SingleDeliveryFreight = 0,
SingleFirstFreight = 0, SingleFirstFreight = 0,
SingleStorageAmount = 0, SinglePackagingLaborAmount = 0,
//SingleStorageAmount = 0,
//SingleOperationAmount = 0, //SingleOperationAmount = 0,
SingleOutStorageAmount = 0, SingleOutStorageAmount = 0,
SingleInStorageAmount = 0, SingleInStorageAmount = 0,
@ -285,8 +287,8 @@ namespace BBWY.Server.Business
PurchaseOrderPKId = purchaseOrder.Id, PurchaseOrderPKId = purchaseOrder.Id,
SkuAmount = currentOrderSkuProductAmount, SkuAmount = currentOrderSkuProductAmount,
SkuId = orderSku.SkuId, SkuId = orderSku.SkuId,
StorageAmount = 0, //StorageAmount = 0,
IsEstimateCost = false IsEstimateCost = false,
//UnitCost = purchaseOrder.UnitCost, //UnitCost = purchaseOrder.UnitCost,
//TotalCost = currentOrderSkuProductAmount + currentOrderSkuFreightAmount//purchaseOrder.UnitCost * orderSku.ItemTotal.Value //TotalCost = currentOrderSkuProductAmount + currentOrderSkuFreightAmount//purchaseOrder.UnitCost * orderSku.ItemTotal.Value
}; };

2
BBWY.Server.Business/ServiceOrder/ServiceOrderBusiness.cs

@ -148,7 +148,7 @@ namespace BBWY.Server.Business
dbso.FirstFreight = dbOrderCostDetail.FirstFreight; dbso.FirstFreight = dbOrderCostDetail.FirstFreight;
dbso.ReissueProductAmount = dbOrderCostDetail.SkuAmount; dbso.ReissueProductAmount = dbOrderCostDetail.SkuAmount;
dbso.ReissueFreight = dbOrderCostDetail.PurchaseFreight; dbso.ReissueFreight = dbOrderCostDetail.PurchaseFreight;
dbso.StorageAmount = dbOrderCostDetail.StorageAmount; //dbso.StorageAmount = dbOrderCostDetail.StorageAmount;
dbso.InStorageAmount = dbOrderCostDetail.InStorageAmount; dbso.InStorageAmount = dbOrderCostDetail.InStorageAmount;
dbso.OutStorageAmount = dbOrderCostDetail.OutStorageAmount; dbso.OutStorageAmount = dbOrderCostDetail.OutStorageAmount;
} }

18
BBWY.Server.Business/Sync/OrderEstimateCostSyncBusiness.cs

@ -105,7 +105,8 @@ namespace BBWY.Server.Business
var singleInStorageAmount = yesocd.InStorageAmount / q; var singleInStorageAmount = yesocd.InStorageAmount / q;
var singleOutStorageAmount = yesocd.OutStorageAmount / q; var singleOutStorageAmount = yesocd.OutStorageAmount / q;
var singleSkuAmount = yesocd.SkuAmount / q; var singleSkuAmount = yesocd.SkuAmount / q;
var singleStorageAmount = yesocd.StorageAmount / q; //var singleStorageAmount = yesocd.StorageAmount / q;
var singlePackagingLaborAmount = yesocd.PackagingLaborAmount / q;
var skuRecentCost = dbSkuRecentCostList.FirstOrDefault(x => x.SkuId == yesocd.SkuId); var skuRecentCost = dbSkuRecentCostList.FirstOrDefault(x => x.SkuId == yesocd.SkuId);
if (skuRecentCost != null) if (skuRecentCost != null)
@ -117,7 +118,8 @@ namespace BBWY.Server.Business
skuRecentCost.SingleInStorageAmount != singleInStorageAmount || skuRecentCost.SingleInStorageAmount != singleInStorageAmount ||
skuRecentCost.SingleOutStorageAmount != singleOutStorageAmount || skuRecentCost.SingleOutStorageAmount != singleOutStorageAmount ||
skuRecentCost.SingleSkuAmount != singleSkuAmount || skuRecentCost.SingleSkuAmount != singleSkuAmount ||
skuRecentCost.SingleStorageAmount != singleStorageAmount) skuRecentCost.SinglePackagingLaborAmount != singlePackagingLaborAmount)
//skuRecentCost.SingleStorageAmount != singleStorageAmount)
{ {
skuRecentCost.UpdateTime = DateTime.Now; skuRecentCost.UpdateTime = DateTime.Now;
var update = fsql.Update<SkuRecentCost>(yesocd.SkuId) var update = fsql.Update<SkuRecentCost>(yesocd.SkuId)
@ -128,7 +130,8 @@ namespace BBWY.Server.Business
.SetIf(skuRecentCost.SingleInStorageAmount != singleInStorageAmount, s => s.SingleInStorageAmount, singleInStorageAmount) .SetIf(skuRecentCost.SingleInStorageAmount != singleInStorageAmount, s => s.SingleInStorageAmount, singleInStorageAmount)
.SetIf(skuRecentCost.SingleOutStorageAmount != singleOutStorageAmount, s => s.SingleOutStorageAmount, singleOutStorageAmount) .SetIf(skuRecentCost.SingleOutStorageAmount != singleOutStorageAmount, s => s.SingleOutStorageAmount, singleOutStorageAmount)
.SetIf(skuRecentCost.SingleSkuAmount != singleSkuAmount, s => s.SingleSkuAmount, singleSkuAmount) .SetIf(skuRecentCost.SingleSkuAmount != singleSkuAmount, s => s.SingleSkuAmount, singleSkuAmount)
.SetIf(skuRecentCost.SingleStorageAmount != singleStorageAmount, s => s.SingleStorageAmount, singleStorageAmount) //.SetIf(skuRecentCost.SingleStorageAmount != singleStorageAmount, s => s.SingleStorageAmount, singleStorageAmount)
.SetIf(skuRecentCost.SinglePackagingLaborAmount != singlePackagingLaborAmount, s => s.SinglePackagingLaborAmount, singlePackagingLaborAmount)
.Set(s => s.UpdateTime, DateTime.Now); .Set(s => s.UpdateTime, DateTime.Now);
updateSkuRecentCostList.Add(update); updateSkuRecentCostList.Add(update);
} }
@ -150,7 +153,8 @@ namespace BBWY.Server.Business
SingleInStorageAmount = singleInStorageAmount, SingleInStorageAmount = singleInStorageAmount,
SingleOutStorageAmount = singleOutStorageAmount, SingleOutStorageAmount = singleOutStorageAmount,
SingleSkuAmount = singleSkuAmount, SingleSkuAmount = singleSkuAmount,
SingleStorageAmount = singleStorageAmount SinglePackagingLaborAmount = singlePackagingLaborAmount
//SingleStorageAmount = singleStorageAmount
}; };
insertSkuRecetCostList.Add(skuRecentCost); insertSkuRecetCostList.Add(skuRecentCost);
} }
@ -310,7 +314,8 @@ namespace BBWY.Server.Business
src.SingleFreight, src.SingleFreight,
src.SingleInStorageAmount, src.SingleInStorageAmount,
src.SingleOutStorageAmount, src.SingleOutStorageAmount,
src.SingleStorageAmount src.SinglePackagingLaborAmount
//src.SingleStorageAmount
}); });
foreach (var order in orderList) foreach (var order in orderList)
{ {
@ -340,7 +345,8 @@ namespace BBWY.Server.Business
PurchaseOrderPKId = 0, PurchaseOrderPKId = 0,
SkuAmount = (osku.SingleSkuAmount * osku.ItemTotal) ?? 0M, SkuAmount = (osku.SingleSkuAmount * osku.ItemTotal) ?? 0M,
SkuId = osku.SkuId, SkuId = osku.SkuId,
StorageAmount = (osku.SingleStorageAmount * osku.ItemTotal) ?? 0M, //StorageAmount = (osku.SingleStorageAmount * osku.ItemTotal) ?? 0M,
PackagingLaborAmount = (osku.SinglePackagingLaborAmount * osku.ItemTotal) ?? 0M,
IsEnabled = true, IsEnabled = true,
IsEstimateCost = true IsEstimateCost = true
}; };

12
BBWY.Server.Business/Sync/OrderSyncBusiness.cs

@ -106,7 +106,7 @@ namespace BBWY.Server.Business
var relayAPIHost = GetPlatformRelayAPIHost(shop.PlatformId); var relayAPIHost = GetPlatformRelayAPIHost(shop.PlatformId);
var orderListApiResult = restApiService.SendRequest(relayAPIHost, "api/PlatformSDK/GetOrderList", new SearchPlatformOrderRequest() var orderListApiResult = restApiService.SendRequest(relayAPIHost, "api/PlatformSDK/GetOrderList", new SearchPlatformOrderRequest()
{ {
StartDate = startTime ?? DateTime.Now.AddHours(shop.ShopName.Contains("腾奇") ? -0.5 : -3), StartDate = startTime ?? DateTime.Now.AddHours(-3),
EndDate = endTime ?? DateTime.Now, EndDate = endTime ?? DateTime.Now,
AppKey = shop.AppKey, AppKey = shop.AppKey,
AppSecret = shop.AppSecret, AppSecret = shop.AppSecret,
@ -142,9 +142,9 @@ namespace BBWY.Server.Business
{ {
//if (fsql.Select<OrderSyncTask>().Where(ost => ost.ShopId == syncOrderByDateRequest.ShopId && ost.State == Enums.OrderSyncState.Running).Any()) //if (fsql.Select<OrderSyncTask>().Where(ost => ost.ShopId == syncOrderByDateRequest.ShopId && ost.State == Enums.OrderSyncState.Running).Any())
// throw new BusinessException("存在未结束的同步任务,请稍后同步"); // throw new BusinessException("存在未结束的同步任务,请稍后同步");
//syncOrderByDateRequest.EndTime = syncOrderByDateRequest.EndTime.Date.AddDays(1).AddSeconds(-1); syncOrderByDateRequest.EndTime = syncOrderByDateRequest.EndTime.Date.AddDays(1).AddSeconds(-1);
//if ((syncOrderByDateRequest.EndTime - syncOrderByDateRequest.StartTime).Days > 7) if ((syncOrderByDateRequest.EndTime - syncOrderByDateRequest.StartTime).Days > 7)
// throw new BusinessException("同步任务时差最长7天"); throw new BusinessException("同步任务时差最长7天");
var orderSyncTask = new OrderSyncTask() var orderSyncTask = new OrderSyncTask()
{ {
@ -886,7 +886,8 @@ namespace BBWY.Server.Business
OutStorageAmount = purchaseOrder.SingleOutStorageAmount * deductionQuantity, OutStorageAmount = purchaseOrder.SingleOutStorageAmount * deductionQuantity,
PurchaseFreight = purchaseOrder.SingleFreight * deductionQuantity, PurchaseFreight = purchaseOrder.SingleFreight * deductionQuantity,
SkuAmount = purchaseOrder.SingleSkuAmount * deductionQuantity, SkuAmount = purchaseOrder.SingleSkuAmount * deductionQuantity,
StorageAmount = purchaseOrder.SingleStorageAmount * deductionQuantity, //StorageAmount = purchaseOrder.SingleStorageAmount * deductionQuantity,
PackagingLaborAmount = purchaseOrder.SinglePackagingLaborAmount * deductionQuantity,
IsEnabled = true, IsEnabled = true,
IsEstimateCost = false IsEstimateCost = false
}; };
@ -1109,6 +1110,7 @@ namespace BBWY.Server.Business
public void SyncAllShopOrder() public void SyncAllShopOrder()
{ {
var shopList = venderBusiness.GetShopList(platform: Enums.Platform.); var shopList = venderBusiness.GetShopList(platform: Enums.Platform.);
//var a = shopList.FirstOrDefault(s => s.ShopName == "创艺家居日用专营店");
foreach (var shop in shopList) foreach (var shop in shopList)
{ {
Task.Factory.StartNew(() => SyncOrder(shop, string.Empty, isAuto: true), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.SyncOrderTaskScheduler); Task.Factory.StartNew(() => SyncOrder(shop, string.Empty, isAuto: true), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.SyncOrderTaskScheduler);

18
BBWY.Server.Model/Db/Order/OrderCostDetail.cs

@ -90,11 +90,11 @@ namespace BBWY.Server.Model.Db
[Column(DbType = "decimal(20,2)")] [Column(DbType = "decimal(20,2)")]
public decimal ConsumableAmount { get; set; } = 0.00M; public decimal ConsumableAmount { get; set; } = 0.00M;
/// <summary> ///// <summary>
/// 仓储费 ///// 仓储费
/// </summary> ///// </summary>
[Column(DbType = "decimal(20,2)")] //[Column(DbType = "decimal(20,2)")]
public decimal StorageAmount { get; set; } = 0.00M; //public decimal StorageAmount { get; set; } = 0.00M;
[Column(DbType = "bit")] [Column(DbType = "bit")]
public bool IsEnabled { get; set; } = true; public bool IsEnabled { get; set; } = true;
@ -105,6 +105,12 @@ namespace BBWY.Server.Model.Db
[Column(DbType = "decimal(20,2)")] [Column(DbType = "decimal(20,2)")]
public decimal SkuGrossProfit { get; set; } = 0.00M; public decimal SkuGrossProfit { get; set; } = 0.00M;
/// <summary>
/// 包装人工费
/// </summary>
[Column(DbType = "decimal(20,2)")]
public decimal PackagingLaborAmount { get; set; } = 0.00M;
/// <summary> /// <summary>
/// 总计(不含发货运费) /// 总计(不含发货运费)
/// </summary> /// </summary>
@ -113,7 +119,7 @@ namespace BBWY.Server.Model.Db
{ {
get get
{ {
return SkuAmount + PurchaseFreight + FirstFreight + InStorageAmount + OutStorageAmount + StorageAmount + ConsumableAmount; return SkuAmount + PurchaseFreight + FirstFreight + InStorageAmount + OutStorageAmount + PackagingLaborAmount + ConsumableAmount;
} }
} }

26
BBWY.Server.Model/Db/Order/SkuRecentCost.cs

@ -68,11 +68,11 @@ namespace BBWY.Server.Model.Db
[Column(DbType = "decimal(20,2)")] [Column(DbType = "decimal(20,2)")]
public decimal? SingleOutStorageAmount { get; set; } = 0.00M; public decimal? SingleOutStorageAmount { get; set; } = 0.00M;
/// <summary> ///// <summary>
/// 退货入仓操作费(单件) ///// 退货入仓操作费(单件)
/// </summary> ///// </summary>
[Column(DbType = "decimal(20,2)")] //[Column(DbType = "decimal(20,2)")]
public decimal? SingleRefundInStorageAmount { get; set; } = 0.00M; //public decimal? SingleRefundInStorageAmount { get; set; } = 0.00M;
/// <summary> /// <summary>
/// SKU成本(单件) /// SKU成本(单件)
@ -80,15 +80,21 @@ namespace BBWY.Server.Model.Db
[Column(DbType = "decimal(20,2)")] [Column(DbType = "decimal(20,2)")]
public decimal? SingleSkuAmount { get; set; } public decimal? SingleSkuAmount { get; set; }
/// <summary> ///// <summary>
/// 仓储费(单件) ///// 仓储费(单件)
/// </summary> ///// </summary>
[Column(DbType = "decimal(20,2)")] //[Column(DbType = "decimal(20,2)")]
public decimal? SingleStorageAmount { get; set; } = 0.00M; //public decimal? SingleStorageAmount { get; set; } = 0.00M;
[Column(DbType = "datetime")] [Column(DbType = "datetime")]
public DateTime? UpdateTime { get; set; } public DateTime? UpdateTime { get; set; }
/// <summary>
/// 包装人工单价
/// </summary>
[Column(DbType = "decimal(20,2)")]
public decimal SinglePackagingLaborAmount { get; set; } = 0.00M;
} }
} }

25
BBWY.Server.Model/Db/PurchaseOrder/PurchaseOrder.cs

@ -17,29 +17,13 @@ namespace BBWY.Server.Model.Db
[Column(DbType = "datetime")] [Column(DbType = "datetime")]
public DateTime? CreateTime { get; set; } public DateTime? CreateTime { get; set; }
/// <summary>
/// 头程运费
/// </summary>
//[Column(DbType = "decimal(20,2)")]
//public decimal FirstFreight { get; set; } = 0.00M;
/// <summary>
/// 采购运费
/// </summary>
//[Column(DbType = "decimal(20,2)")]
//public decimal Freight { get; set; } = 0.00M;
/// <summary> /// <summary>
/// 产品Id /// 产品Id
/// </summary> /// </summary>
[Column(StringLength = 50)] [Column(StringLength = 50)]
public string ProductId { get; set; } public string ProductId { get; set; }
/// <summary>
/// 采购金额
/// </summary>
//[Column(DbType = "decimal(20,2)")]
//public decimal PurchaseAmount { get; set; } = 0.00M;
/// <summary> /// <summary>
/// 采购方式 /// 采购方式
@ -106,11 +90,6 @@ namespace BBWY.Server.Model.Db
[Column(DbType = "decimal(20,2)")] [Column(DbType = "decimal(20,2)")]
public decimal SingleFirstFreight { get; set; } = 0.00M; public decimal SingleFirstFreight { get; set; } = 0.00M;
/// <summary>
/// 单件操作费
/// </summary>
//[Column(DbType = "decimal(20,2)")]
//public decimal SingleOperationAmount { get; set; } = 0.00M;
/// <summary> /// <summary>
/// 单件入仓操作费 /// 单件入仓操作费
@ -143,7 +122,7 @@ namespace BBWY.Server.Model.Db
//public decimal SingleStorageAmount { get; set; } = 0.00M; //public decimal SingleStorageAmount { get; set; } = 0.00M;
/// <summary> /// <summary>
/// 单件销售运费(不参与均价计算) /// 单件销售(尾程)运费(不参与均价计算)
/// </summary> /// </summary>
[Column(DbType = "decimal(20,2)")] [Column(DbType = "decimal(20,2)")]
public decimal SingleDeliveryFreight { get; set; } = 0.00M; public decimal SingleDeliveryFreight { get; set; } = 0.00M;

19
BBWY.Server.Model/Dto/Request/PurchaseOrder/AddPurchaseOrderRequest.cs

@ -60,13 +60,13 @@
/// </summary> /// </summary>
public decimal SingleConsumableAmount { get; set; } = 0.00M; public decimal SingleConsumableAmount { get; set; } = 0.00M;
/// <summary> ///// <summary>
/// 单件仓储费 ///// 单件仓储费
/// </summary> ///// </summary>
public decimal SingleStorageAmount { get; set; } //public decimal SingleStorageAmount { get; set; }
/// <summary> /// <summary>
/// 单件销售运费(不参与均价计算) /// 单件尾程销售运费(不参与均价计算)
/// </summary> /// </summary>
public decimal SingleDeliveryFreight { get; set; } public decimal SingleDeliveryFreight { get; set; }
@ -82,8 +82,13 @@
public decimal SingleOutStorageAmount { get; set; } = 0.00M; public decimal SingleOutStorageAmount { get; set; } = 0.00M;
/// <summary> /// <summary>
/// 退货入仓操作 /// 单间包装人工
/// </summary> /// </summary>
public decimal SingleRefundInStorageAmount { get; set; } = 0.00M; public decimal SinglePackagingLaborAmount { get; set; } = 0.00M;
///// <summary>
///// 退货入仓操作费
///// </summary>
//public decimal SingleRefundInStorageAmount { get; set; } = 0.00M;
} }
} }

19
BBWY.Server.Model/Dto/Request/PurchaseOrder/EditPurchaseOrderRequest.cs

@ -34,13 +34,13 @@
/// </summary> /// </summary>
public decimal SingleConsumableAmount { get; set; } = 0.00M; public decimal SingleConsumableAmount { get; set; } = 0.00M;
/// <summary> ///// <summary>
/// 单件仓储费 ///// 单件仓储费
/// </summary> ///// </summary>
public decimal SingleStorageAmount { get; set; } = 0.00M; //public decimal SingleStorageAmount { get; set; } = 0.00M;
/// <summary> /// <summary>
/// 单件销售运费(不参与均价计算) /// 单件尾程销售运费(不参与均价计算)
/// </summary> /// </summary>
public decimal SingleDeliveryFreight { get; set; } = 0.00M; public decimal SingleDeliveryFreight { get; set; } = 0.00M;
@ -56,8 +56,13 @@
public decimal SingleOutStorageAmount { get; set; } = 0.00M; public decimal SingleOutStorageAmount { get; set; } = 0.00M;
/// <summary> /// <summary>
/// 退货入仓 /// 单间包装人工
/// </summary> /// </summary>
public decimal SingleRefundInStorageAmount { get; set; } = 0.00M; public decimal SinglePackagingLaborAmount { get; set; } = 0.00M;
///// <summary>
///// 退货入仓费
///// </summary>
//public decimal SingleRefundInStorageAmount { get; set; } = 0.00M;
} }
} }

2
BBWY.Server.Model/Dto/Response/BillCorrection/BillCorrectionOrderResponse.cs

@ -61,6 +61,8 @@ namespace BBWY.Server.Model.Dto
/// </summary> /// </summary>
public decimal ConsumableAmount { get; set; } = 0.00M; public decimal ConsumableAmount { get; set; } = 0.00M;
public decimal PackagingLaborAmount { get; set; } = 0.00M;
/// <summary> /// <summary>
/// 仓储费 /// 仓储费
/// </summary> /// </summary>

10
BBWY.Server.Model/Dto/Response/Order/ExportOrderResponse.cs

@ -32,11 +32,6 @@ namespace BBWY.Server.Model.Dto
/// </summary> /// </summary>
public decimal FirstFreight { get; set; } public decimal FirstFreight { get; set; }
/// <summary>
/// 仓储费
/// </summary>
public decimal StorageAmount { get; set; }
/// <summary> /// <summary>
/// 发货快递费 /// 发货快递费
/// </summary> /// </summary>
@ -94,6 +89,11 @@ namespace BBWY.Server.Model.Dto
/// </summary> /// </summary>
public decimal ConsumableAmount { get; set; } public decimal ConsumableAmount { get; set; }
/// <summary>
/// 人工打包费
/// </summary>
public decimal PackagingLaborAmount { get; set; }
/// <summary> /// <summary>
/// 入仓操作费 /// 入仓操作费
/// </summary> /// </summary>

Loading…
Cancel
Save