Browse Source

显示调整

lzk 4 days ago
parent
commit
4ca9e426ba
1 changed files with 16 additions and 16 deletions
  1. 16 16
      3.Service/XYY.Service.Standard.Order/FBA/FBAOrderService.cs

+ 16 - 16
3.Service/XYY.Service.Standard.Order/FBA/FBAOrderService.cs

@@ -269,20 +269,20 @@ namespace XYY.Service.Standard.Order.FBA
                 {
                     if (BillWeight / boxes.Sum(x => x.OpLength * x.OpWidth * x.OpHeight / 1000000) >= 300)
                     {
-                        item.GoodsNames += ";-2/kg";
-                        await AddFbaHeavyCargoOtherFee(item.OrderId.Value, item.CustomerConfirmBillWeight.Value * -2.0m);
+                        item.GoodsNames += ";1:300";
+                        await AddFbaHeavyCargoOtherFee(item.OrderId.Value, item.CustomerConfirmBillWeight.Value * -2.0m, "重货1:300,-2/kg");
                     }
                     else if (BillWeight / boxes.Sum(x => x.OpLength * x.OpWidth * x.OpHeight / 1000000) >= 200)
                     {
-                        item.GoodsNames += ";-1/kg";
-                        await AddFbaHeavyCargoOtherFee(item.OrderId.Value, item.CustomerConfirmBillWeight.Value * -1.0m);
+                        item.GoodsNames += ";1:200";
+                        await AddFbaHeavyCargoOtherFee(item.OrderId.Value, item.CustomerConfirmBillWeight.Value * -1.0m, "重货1:200,-1/kg");
                     }
                 }
                 //实重/体积立方>300 做 1:300标识-1
                 if (new List<string>() { "USKPLine-5K", "USKPLine-J-5K" }.Contains(item.ChannelCode) && BillWeight / boxes.Sum(x => x.OpLength * x.OpWidth * x.OpHeight / 1000000) >= 300)
                 {
-                    item.GoodsNames += ";-1/kg";
-                    await AddFbaHeavyCargoOtherFee(item.Id, item.CustomerConfirmBillWeight.Value * -1.0m);
+                    item.GoodsNames += ";1:300";
+                    await AddFbaHeavyCargoOtherFee(item.Id, item.CustomerConfirmBillWeight.Value * -1.0m,"重货1:300,-1/kg");
                 }
                 if (!string.IsNullOrEmpty(item.GoodsNames))
                 {
@@ -296,12 +296,12 @@ namespace XYY.Service.Standard.Order.FBA
         /// 重货优惠 附加费添加
         /// </summary>
         /// <param name="otherFee"></param>
-        private async Task AddFbaHeavyCargoOtherFee(int OrderId, decimal otherFee)
+        private async Task AddFbaHeavyCargoOtherFee(int OrderId, decimal otherFee,string remark)
         {
             //只处理结算
             string sql = $@"delete FBA_Incidental where OrderId={OrderId} and FBAOtherFeeId=(select Id from FBA_OtherFee(nolock) where Name='重货优惠' ) and Target=1
-insert into FBA_Incidental(OrderId,CalculateType,Target,Fee,FBAOtherFeeId,CustomerRemark,JSRemark,SysncJS)
-select {OrderId},0,1,{otherFee},Id,CustomerRemark,JSRemark,SysncJS from FBA_OtherFee(nolock) where Name='重货优惠' ";
+insert into FBA_Incidental(OrderId,CalculateType,Target,Fee,FBAOtherFeeId,CustomerRemark,JSRemark,SysncJS,Remark)
+select {OrderId},0,1,{otherFee},Id,CustomerRemark,JSRemark,SysncJS,'{remark}' from FBA_OtherFee(nolock) where Name='重货优惠' ";
             await _unitOfWork.ExecuteAsync(sql);
         }
         private void ExpressBillInfo(IEnumerable<Order_MpsOrder> orders, IEnumerable<Order_MpsOrderBox> boxes, List<string> remotZipCode)
@@ -922,13 +922,13 @@ where Id in @Ids", 600, new { Ids = Ids });
                     //忽略其他的异常
                 }
                 #endregion
-                #region 附加费检测
-                if (item.GoodsNames.Contains("/kg"))
-                {
-                    var incidentals = await orderRepository.GetFBA_Incidentals(item.Id, FBAIncidentalCalculateTarget.客户);
-                    if (incidentals.Where(x=>x.SysncJS==true).Count() > 2) { exMessage += $"重货附加费同步条目不能超过两条!"; }
-                }
-                #endregion
+                //#region 附加费检测
+                //if (item.GoodsNames.Contains("/kg"))
+                //{
+                //    var incidentals = await orderRepository.GetFBA_Incidentals(item.Id, FBAIncidentalCalculateTarget.客户);
+                //    if (incidentals.Where(x=>x.SysncJS==true).Count() > 2) { exMessage += $"重货附加费同步条目不能超过两条!"; }
+                //}
+                //#endregion
             }
             if (!string.IsNullOrEmpty(exMessage)) { throw new Exception(exMessage); }
             #endregion