|
|
@@ -431,7 +431,9 @@ namespace MySystem
|
|
|
FeeRate = "0.60";
|
|
|
FeeAmt = trade.ErrorMsg;
|
|
|
}
|
|
|
- if(decimal.Parse(FeeRate) > 0.63M) FeeRate = "0.63";
|
|
|
+ Dictionary<string, string> fee = GetFee(trade.TradeSnNo, FeeRate, FeeAmt);
|
|
|
+ FeeRate = fee["FeeRate"];
|
|
|
+ FeeAmt = fee["FeeAmt"];
|
|
|
Dictionary<string, object> dataContent = new Dictionary<string, object>();
|
|
|
dataContent.Add("pos_sn", trade.TradeSnNo); //机具sn
|
|
|
dataContent.Add("mer_no", trade.MerNo); //商户号
|
|
|
@@ -498,6 +500,33 @@ namespace MySystem
|
|
|
db.Dispose();
|
|
|
return brand;
|
|
|
}
|
|
|
+
|
|
|
+ public static Dictionary<string, string> GetFee(string PosSn, string FeeRate, string FeeAmt)
|
|
|
+ {
|
|
|
+ if(decimal.Parse(FeeRate) > 0.63M) FeeRate = "0.63";
|
|
|
+ List<int> BrandIds = new List<int>();
|
|
|
+ BrandIds.Add(1);
|
|
|
+ BrandIds.Add(7);
|
|
|
+ BrandIds.Add(10);
|
|
|
+ BrandIds.Add(11);
|
|
|
+ BrandIds.Add(15);
|
|
|
+ BrandIds.Add(27);
|
|
|
+ Dictionary<string, string> result = new Dictionary<string, string>();
|
|
|
+ JavaProductModels.WebCMSEntities db = new JavaProductModels.WebCMSEntities();
|
|
|
+ JavaProductModels.KxsMachine pos = db.KxsMachine.FirstOrDefault(m => m.PosSn == PosSn && BrandIds.Contains(m.BrandId));
|
|
|
+ if(pos != null)
|
|
|
+ {
|
|
|
+ result.Add("FeeRate", pos.MachineRatio.ToString("f2"));
|
|
|
+ result.Add("FeeAmt", pos.SecondFee.ToString("f2"));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ result.Add("FeeRate", FeeRate);
|
|
|
+ result.Add("FeeAmt", FeeAmt);
|
|
|
+ }
|
|
|
+ db.Dispose();
|
|
|
+ return result;
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
}
|