|
|
@@ -431,7 +431,7 @@ namespace MySystem
|
|
|
FeeRate = "0.60";
|
|
|
FeeAmt = trade.ErrorMsg;
|
|
|
}
|
|
|
- Dictionary<string, string> fee = GetFee(trade.TradeSnNo, FeeRate, FeeAmt);
|
|
|
+ Dictionary<string, string> fee = GetFee(trade.TradeSnNo, FeeRate, FeeAmt, trade.ProductType);
|
|
|
FeeRate = fee["FeeRate"];
|
|
|
FeeAmt = fee["FeeAmt"];
|
|
|
Dictionary<string, object> dataContent = new Dictionary<string, object>();
|
|
|
@@ -501,30 +501,37 @@ namespace MySystem
|
|
|
return brand;
|
|
|
}
|
|
|
|
|
|
- public static Dictionary<string, string> GetFee(string PosSn, string FeeRate, string FeeAmt)
|
|
|
+ public static Dictionary<string, string> GetFee(string PosSn, string FeeRate, string FeeAmt, string ProductType)
|
|
|
{
|
|
|
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);
|
|
|
+ List<string> BrandIds = new List<string>();
|
|
|
+ BrandIds.Add("1");
|
|
|
+ BrandIds.Add("7");
|
|
|
+ BrandIds.Add("10");
|
|
|
+ BrandIds.Add("11");
|
|
|
+ BrandIds.Add("15");
|
|
|
+ BrandIds.Add("16");
|
|
|
+ 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)
|
|
|
+ if(BrandIds.Contains(ProductType))
|
|
|
{
|
|
|
- result.Add("FeeRate", pos.MachineRatio.ToString("f2"));
|
|
|
- result.Add("FeeAmt", pos.SecondFee.ToString("f2"));
|
|
|
+ PosFeeItem pos = RedisDbconn.Instance.GetList<PosFeeItem>("PosFeeList").FirstOrDefault(m => m.PosSn == PosSn);
|
|
|
+ if(pos != null)
|
|
|
+ {
|
|
|
+ result.Add("FeeRate", pos.FeeRate.ToString("f2"));
|
|
|
+ result.Add("FeeAmt", pos.FeeAmt.ToString("f2"));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ result.Add("FeeRate", FeeRate);
|
|
|
+ result.Add("FeeAmt", FeeAmt);
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
result.Add("FeeRate", FeeRate);
|
|
|
result.Add("FeeAmt", FeeAmt);
|
|
|
}
|
|
|
- db.Dispose();
|
|
|
return result;
|
|
|
}
|
|
|
|