PublicChangePosFee.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Data;
  5. using System.Text.RegularExpressions;
  6. using MySystem.Models;
  7. using Library;
  8. using NPOI.SS.UserModel;
  9. using NPOI.XSSF.UserModel;
  10. using Microsoft.AspNetCore.Mvc;
  11. using System.IO;
  12. using LitJson;
  13. /// <summary>
  14. /// 设置机具服务费
  15. /// </summary>
  16. namespace MySystem
  17. {
  18. public class PublicChangePosFee
  19. {
  20. public static WebCMSEntities db = new WebCMSEntities();
  21. #region 金控-设置押金
  22. public static string SetJKDeposit(string SnIds,string DepositId)
  23. {
  24. // string DepositId = "299";
  25. string check = RedisDbconn.Instance.Get<string>("SetJKPosDepositWait:" + SnIds);
  26. if (!string.IsNullOrEmpty(check))
  27. {
  28. return "操作频繁,请稍后再试";
  29. }
  30. RedisDbconn.Instance.Set("SetJKPosDepositWait:" + SnIds, SnIds);
  31. RedisDbconn.Instance.SetExpire("SetJKPosDepositWait:" + SnIds, 10);
  32. Dictionary<string, object> Obj = new Dictionary<string, object>();
  33. string[] SnIdList = SnIds.Split(',');
  34. foreach (string SnId in SnIdList)
  35. {
  36. int SnIdNum = int.Parse(SnId);
  37. PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnIdNum && m.BindingState == 0 && (string.IsNullOrEmpty(m.SeoKeyword) || m.SeoKeyword == "0"));
  38. if (pos == null)
  39. {
  40. return "机具" + pos.PosSn + "已设置押金,请勿重复设置";
  41. }
  42. function.WriteLog(DateTime.Now.ToString() + ":请求参数," + pos.PosSn + ":" + DepositId, "金控-设置押金-返回报文");
  43. string content = function.GetWebRequest("http://sp.kexiaoshuang.com/api/test/SetDeposit?sn=" + pos.PosSn + "&num=" + DepositId);
  44. function.WriteLog(DateTime.Now.ToString() + "\n" + content, "金控-设置押金-返回报文");
  45. if (content == "fail")
  46. {
  47. return "机具" + pos.PosSn + "设置失败";
  48. }
  49. JsonData jsonObj = JsonMapper.ToObject(content);
  50. if (jsonObj["code"].ToString() != "000000")
  51. {
  52. return jsonObj["message"].ToString();
  53. }
  54. content = jsonObj["data"].ToString();
  55. content = PublicImportDataService.Instance.Decrypt(content);
  56. function.WriteLog(DateTime.Now.ToString() + "\n" + content, "金控-设置押金-返回报文");
  57. JsonData contentObj = JsonMapper.ToObject(content);
  58. if (contentObj["respCode"].ToString() != "00")
  59. {
  60. return contentObj["respMsg"].ToString();
  61. }
  62. decimal BeforeDeposit = 0;
  63. if (string.IsNullOrEmpty(pos.PrizeParams))
  64. {
  65. BeforeDeposit = 299;
  66. }
  67. else
  68. {
  69. BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
  70. }
  71. decimal amount = decimal.Parse(DepositId);
  72. pos.PrizeParams = amount.ToString("f0");
  73. db.SaveChanges();
  74. //设置押金添加记录
  75. PublicFunction.MerchantDepositSet(pos.BrandId, 0, SnIdNum, pos.PosSn, BeforeDeposit, decimal.Parse(pos.PrizeParams), content);
  76. }
  77. return "设置成功";
  78. }
  79. #endregion
  80. #region 开店宝-设置押金
  81. public static string SetKDBDeposit(string SnIds,string DepositId)
  82. {
  83. // string DepositId = "473";
  84. string check = RedisDbconn.Instance.Get<string>("SetKDBPosDepositWait:" + SnIds);
  85. if (!string.IsNullOrEmpty(check))
  86. {
  87. return "操作频繁,请稍后再试";
  88. }
  89. RedisDbconn.Instance.Set("SetKDBPosDepositWait:" + SnIds, SnIds);
  90. RedisDbconn.Instance.SetExpire("SetKDBPosDepositWait:" + SnIds, 10);
  91. string[] SnIdList = SnIds.Split(',');
  92. foreach (string SnId in SnIdList)
  93. {
  94. int SnIdNum = int.Parse(SnId);
  95. PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnIdNum && m.BindingState == 0 && (string.IsNullOrEmpty(m.SeoKeyword) || m.SeoKeyword == "0"));
  96. if (pos == null)
  97. {
  98. return "机具" + pos.PosSn + "已设置押金,请勿重复设置";
  99. }
  100. function.WriteLog(DateTime.Now.ToString() + ":请求参数," + pos.PosSn + ":" + DepositId, "开店宝-设置押金-返回报文");
  101. string content = PublicImportDataService.Instance.ModifyDeposit(pos.PosSn, DepositId);
  102. if (content == "fail")
  103. {
  104. return "机具" + pos.PosSn + "设置失败";
  105. }
  106. function.WriteLog(DateTime.Now.ToString() + "\n" + content, "开店宝-设置押金-返回报文");
  107. decimal BeforeDeposit = 0;
  108. if (string.IsNullOrEmpty(pos.PrizeParams))
  109. {
  110. BeforeDeposit = 299;
  111. }
  112. else
  113. {
  114. BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
  115. }
  116. decimal amount = decimal.Parse(PublicImportDataService.Instance.GetDepositAmount(DepositId));
  117. pos.PrizeParams = amount.ToString("f0");
  118. db.SaveChanges();
  119. //设置押金添加记录
  120. PublicFunction.MerchantDepositSet(pos.BrandId, 0, SnIdNum, pos.PosSn, BeforeDeposit, decimal.Parse(pos.PrizeParams), content);
  121. }
  122. return "设置成功";
  123. }
  124. #endregion
  125. #region 乐刷-设置押金
  126. public static string SetLSDeposit(string SnIds,string DepositId)
  127. {
  128. // string DepositId = "300";
  129. string check = RedisDbconn.Instance.Get<string>("SetLSPosDepositWait:" + SnIds);
  130. if (!string.IsNullOrEmpty(check))
  131. {
  132. return "操作频繁,请稍后再试";
  133. }
  134. RedisDbconn.Instance.Set("SetLSPosDepositWait:" + SnIds, SnIds);
  135. RedisDbconn.Instance.SetExpire("SetLSPosDepositWait:" + SnIds, 10);
  136. Dictionary<string, object> Obj = new Dictionary<string, object>();
  137. string[] SnIdList = SnIds.Split(',');
  138. foreach (string SnId in SnIdList)
  139. {
  140. int SnIdNum = int.Parse(SnId);
  141. PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnIdNum && m.BindingState == 0 && (string.IsNullOrEmpty(m.SeoKeyword) || m.SeoKeyword == "0"));
  142. if (pos == null)
  143. {
  144. return "机具" + pos.PosSn + "已设置押金,请勿重复设置";
  145. }
  146. string OldId = "", NewId = "";
  147. if (DepositId == "100")
  148. {
  149. NewId = "704067039039856640";
  150. }
  151. else if (DepositId == "200")
  152. {
  153. NewId = "709820183485095936";
  154. }
  155. else if (DepositId == "300")
  156. {
  157. NewId = "709820390742437888";
  158. }
  159. string content = PublicImportDataService.Instance.QueryActiveForConfig(pos.PosSn, pos.BrandId);
  160. JsonData jsonObj = JsonMapper.ToObject(content);
  161. if (jsonObj["code"].ToString() == "0")
  162. {
  163. OldId = jsonObj["data"]["posMarket"]["id"].ToString();
  164. }
  165. jsonObj = JsonMapper.ToObject(content);
  166. function.WriteLog(DateTime.Now.ToString() + ":请求参数," + pos.PosSn + ":" + OldId + ":" + NewId, "乐刷-设置押金-返回报文");
  167. content = PublicImportDataService.Instance.SetDepositForLS(pos.PosSn, OldId, NewId, pos.BrandId);
  168. function.WriteLog(DateTime.Now.ToString() + "\n" + content, "乐刷-设置押金-返回报文");
  169. if (content == "fail")
  170. {
  171. return "机具" + pos.PosSn + "设置失败";
  172. }
  173. jsonObj = JsonMapper.ToObject(content);
  174. if (jsonObj["code"].ToString() != "0")
  175. {
  176. return jsonObj["msg"].ToString();
  177. }
  178. function.WriteLog(DateTime.Now.ToString() + "\n" + content, "乐刷-设置押金-返回报文");
  179. decimal BeforeDeposit = 0;
  180. if (string.IsNullOrEmpty(pos.PrizeParams))
  181. {
  182. BeforeDeposit = 299;
  183. }
  184. else
  185. {
  186. BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
  187. }
  188. decimal amount = decimal.Parse(DepositId);
  189. if (pos.BrandId == 4 || pos.BrandId == 5)
  190. {
  191. amount -= 1;
  192. }
  193. pos.PrizeParams = amount.ToString("f0");
  194. db.SaveChanges();
  195. //设置押金添加记录
  196. PublicFunction.MerchantDepositSet(pos.BrandId, 0, SnIdNum, pos.PosSn, BeforeDeposit, decimal.Parse(pos.PrizeParams), content);
  197. }
  198. return "设置成功";
  199. }
  200. #endregion
  201. #region 立刷-设置押金
  202. public static string SetLISDeposit(string SnIds,string DepositId)
  203. {
  204. // string DepositId = "249";
  205. string check = RedisDbconn.Instance.Get<string>("SetLISPosDepositWait:" + SnIds);
  206. if (!string.IsNullOrEmpty(check))
  207. {
  208. return "操作频繁,请稍后再试";
  209. }
  210. RedisDbconn.Instance.Set("SetLISPosDepositWait:" + SnIds, SnIds);
  211. RedisDbconn.Instance.SetExpire("SetLISPosDepositWait:" + SnIds, 10);
  212. Dictionary<string, object> Obj = new Dictionary<string, object>();
  213. string[] SnIdList = SnIds.Split(',');
  214. foreach (string SnId in SnIdList)
  215. {
  216. int SnIdNum = int.Parse(SnId);
  217. PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnIdNum && m.BindingState == 0 && (string.IsNullOrEmpty(m.SeoKeyword) || m.SeoKeyword == "0"));
  218. if (pos == null)
  219. {
  220. return "机具" + pos.PosSn + "已设置押金,请勿重复设置";
  221. }
  222. function.WriteLog(DateTime.Now.ToString() + ":请求参数," + pos.PosSn + ":" + DepositId, "立刷-设置押金-返回报文");
  223. string content = PublicImportDataService.Instance.SetLiSDeposit(pos.PosSn, int.Parse(DepositId));
  224. function.WriteLog(DateTime.Now.ToString() + "\n" + content, "立刷-设置押金-返回报文");
  225. JsonData jsonObj = JsonMapper.ToObject(content);
  226. if (jsonObj["ret_code"].ToString() != "00")
  227. {
  228. return jsonObj["ret_msg"].ToString();
  229. }
  230. function.WriteLog(DateTime.Now.ToString() + "\n" + content, "立刷-设置押金-返回报文");
  231. decimal BeforeDeposit = 0;
  232. if (string.IsNullOrEmpty(pos.PrizeParams))
  233. {
  234. if (RelationClass.GetKqProductBrandInfo(pos.BrandId) == "立刷云电签")
  235. {
  236. BeforeDeposit = 249;
  237. }
  238. else
  239. {
  240. BeforeDeposit = 299;
  241. }
  242. }
  243. else
  244. {
  245. BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
  246. }
  247. pos.PrizeParams = DepositId;
  248. db.SaveChanges();
  249. //设置押金添加记录
  250. PublicFunction.MerchantDepositSet(pos.BrandId, 0, SnIdNum, pos.PosSn, BeforeDeposit, decimal.Parse(pos.PrizeParams), content);
  251. }
  252. return "设置成功";
  253. }
  254. #endregion
  255. #region 盛付通-设置押金
  256. public static string SetSFTDeposit(string SnIds,string DepositId)
  257. {
  258. // string DepositId = "2024POS299";
  259. string check = RedisDbconn.Instance.Get<string>("SetSFTPosDepositWait:" + SnIds);
  260. if (!string.IsNullOrEmpty(check))
  261. {
  262. return "操作频繁,请稍后再试";
  263. }
  264. RedisDbconn.Instance.Set("SetSFTPosDepositWait:" + SnIds, SnIds);
  265. RedisDbconn.Instance.SetExpire("SetSFTPosDepositWait:" + SnIds, 10);
  266. Dictionary<string, object> Obj = new Dictionary<string, object>();
  267. string[] SnIdList = SnIds.Split(',');
  268. foreach (string SnId in SnIdList)
  269. {
  270. int SnIdNum = int.Parse(SnId);
  271. PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnIdNum && m.BindingState == 0 && (string.IsNullOrEmpty(m.SeoKeyword) || m.SeoKeyword == "0"));
  272. if (pos == null)
  273. {
  274. return "机具" + pos.PosSn + "已设置押金,请勿重复设置";
  275. }
  276. function.WriteLog(DateTime.Now.ToString() + ":请求参数," + pos.PosSn + ":" + DepositId, "盛付通-设置押金-返回报文");
  277. string content = PublicImportDataService.Instance.SetDepositForSft(pos.PosSn, DepositId);
  278. function.WriteLog(DateTime.Now.ToString() + "\n" + content, "盛付通-设置押金-返回报文");
  279. JsonData jsonObj = JsonMapper.ToObject(content);
  280. if (jsonObj["respCode"].ToString() != "00")
  281. {
  282. return jsonObj["errorMsg"].ToString();
  283. }
  284. decimal BeforeDeposit = 0;
  285. if (string.IsNullOrEmpty(pos.PrizeParams))
  286. {
  287. BeforeDeposit = 299;
  288. }
  289. else
  290. {
  291. BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
  292. }
  293. pos.PrizeParams = DepositId.Replace("2024POS", "");
  294. db.SaveChanges();
  295. //设置押金添加记录
  296. PublicFunction.MerchantDepositSet(pos.BrandId, 0, SnIdNum, pos.PosSn, BeforeDeposit, decimal.Parse(pos.PrizeParams), content);
  297. }
  298. return "设置成功";
  299. }
  300. #endregion
  301. #region 海科-设置押金
  302. public static string SetHKDeposit(string SnIds,string DepositId)
  303. {
  304. // string DepositId = "300";
  305. string check = RedisDbconn.Instance.Get<string>("SetHKPosDepositWait:" + SnIds);
  306. if (!string.IsNullOrEmpty(check))
  307. {
  308. return "操作频繁,请稍后再试";
  309. }
  310. RedisDbconn.Instance.Set("SetHKPosDepositWait:" + SnIds, SnIds);
  311. RedisDbconn.Instance.SetExpire("SetHkPosDepositWait:" + SnIds, 10);
  312. Dictionary<string, object> Obj = new Dictionary<string, object>();
  313. string[] SnIdList = SnIds.Split(',');
  314. foreach (string SnId in SnIdList)
  315. {
  316. int SnIdNum = int.Parse(SnId);
  317. PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnIdNum && m.BindingState == 0 && (string.IsNullOrEmpty(m.SeoKeyword) || m.SeoKeyword == "0"));
  318. if (pos == null)
  319. {
  320. return "机具" + pos.PosSn + "已设置押金,请勿重复设置";
  321. }
  322. string OldId = "", NewId = "";
  323. if (DepositId == "100")
  324. {
  325. NewId = pos.BrandId == 8 ? "202207011718129" : "202207011718197";
  326. }
  327. else if (DepositId == "200")
  328. {
  329. NewId = pos.BrandId == 8 ? "747200504467566592" : "747199934126108672";
  330. }
  331. else if (DepositId == "300")
  332. {
  333. NewId = pos.BrandId == 8 ? "747193472108732416" : "747193820156276736";
  334. }
  335. string content = PublicImportDataService.Instance.QueryActiveForConfigHK(pos.PosSn, pos.BrandId);
  336. JsonData jsonObj = JsonMapper.ToObject(content);
  337. if (jsonObj["code"].ToString() == "0")
  338. {
  339. OldId = jsonObj["data"]["posMarket"]["id"].ToString();
  340. }
  341. jsonObj = JsonMapper.ToObject(content);
  342. function.WriteLog(DateTime.Now.ToString() + ":请求参数," + pos.PosSn + ":" + OldId + ":" + NewId, "海科-设置押金-返回报文");
  343. content = PublicImportDataService.Instance.SetDepositForHK(pos.PosSn, OldId, NewId, pos.BrandId);
  344. function.WriteLog(DateTime.Now.ToString() + "\n" + content, "海科-设置押金-返回报文");
  345. if (content == "fail")
  346. {
  347. return "机具" + pos.PosSn + "设置失败";
  348. }
  349. jsonObj = JsonMapper.ToObject(content);
  350. if (jsonObj["code"].ToString() != "0")
  351. {
  352. return jsonObj["msg"].ToString();
  353. }
  354. decimal amount = decimal.Parse(DepositId);
  355. decimal BeforeDeposit = 0;
  356. if (string.IsNullOrEmpty(pos.PrizeParams))
  357. {
  358. BeforeDeposit = 299;
  359. }
  360. else
  361. {
  362. BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
  363. }
  364. if (pos.BrandId == 8 || pos.BrandId == 9)
  365. {
  366. amount -= 1;
  367. }
  368. pos.PrizeParams = amount.ToString("f0");
  369. db.SaveChanges();
  370. //设置押金添加记录
  371. PublicFunction.MerchantDepositSet(pos.BrandId, 0, SnIdNum, pos.PosSn, BeforeDeposit, decimal.Parse(pos.PrizeParams), content);
  372. }
  373. return "设置成功";
  374. }
  375. #endregion
  376. #region 联动-设置押金
  377. public static string SetLDDeposit(string SnIds,string DepositId)
  378. {
  379. // string DepositId = "299";
  380. string check = RedisDbconn.Instance.Get<string>("SetLDPosDepositWait:" + SnIds);
  381. if (!string.IsNullOrEmpty(check))
  382. {
  383. return "操作频繁,请稍后再试";
  384. }
  385. RedisDbconn.Instance.Set("SetLDPosDepositWait:" + SnIds, SnIds);
  386. RedisDbconn.Instance.SetExpire("SetLDPosDepositWait:" + SnIds, 10);
  387. Dictionary<string, object> Obj = new Dictionary<string, object>();
  388. string[] SnIdList = SnIds.Split(',');
  389. foreach (string SnId in SnIdList)
  390. {
  391. int SnIdNum = int.Parse(SnId);
  392. PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnIdNum && m.BindingState == 0 && (string.IsNullOrEmpty(m.SeoKeyword) || m.SeoKeyword == "0"));
  393. if (pos == null)
  394. {
  395. return "机具" + pos.PosSn + "已设置押金,请勿重复设置";
  396. }
  397. function.WriteLog(DateTime.Now.ToString() + ":请求参数," + pos.PosSn + ":" + DepositId, "联动-设置押金-返回报文");
  398. string content = PublicImportDataService.Instance.LDServiceFee(pos.PosSn, int.Parse(DepositId), pos.BrandId);
  399. function.WriteLog(DateTime.Now.ToString() + "\n" + content, "联动-设置押金-返回报文");
  400. JsonData jsonObj = JsonMapper.ToObject(content);
  401. if (jsonObj["code"].ToString() != "000000")
  402. {
  403. return jsonObj["msg"].ToString();
  404. }
  405. decimal BeforeDeposit = 0;
  406. if (string.IsNullOrEmpty(pos.PrizeParams))
  407. {
  408. BeforeDeposit = 299;
  409. }
  410. else
  411. {
  412. BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
  413. }
  414. decimal amount = decimal.Parse(DepositId);
  415. pos.PrizeParams = amount.ToString("f0");
  416. db.SaveChanges();
  417. //设置押金添加记录
  418. PublicFunction.MerchantDepositSet(pos.BrandId, 0, SnIdNum, pos.PosSn, BeforeDeposit, decimal.Parse(pos.PrizeParams), content);
  419. }
  420. return "设置成功";
  421. }
  422. #endregion
  423. #region 盒易付-设置押金
  424. public static string SetHYFDeposit(string SnIds,string DepositId)
  425. {
  426. // string DepositId = "299";
  427. string check = RedisDbconn.Instance.Get<string>("SetHYFPosDepositWait:" + SnIds);
  428. if (!string.IsNullOrEmpty(check))
  429. {
  430. return "操作频繁,请稍后再试";
  431. }
  432. RedisDbconn.Instance.Set("SetHYFPosDepositWait:" + SnIds, SnIds);
  433. RedisDbconn.Instance.SetExpire("SetHYFPosDepositWait:" + SnIds, 10);
  434. Dictionary<string, object> Obj = new Dictionary<string, object>();
  435. string[] SnIdList = SnIds.Split(',');
  436. foreach (string SnId in SnIdList)
  437. {
  438. int SnIdNum = int.Parse(SnId);
  439. PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnIdNum && m.BindingState == 0 && (string.IsNullOrEmpty(m.SeoKeyword) || m.SeoKeyword == "0"));
  440. if (pos == null)
  441. {
  442. return "机具" + pos.PosSn + "已设置押金,请勿重复设置";
  443. }
  444. function.WriteLog(DateTime.Now.ToString() + ":请求参数," + pos.PosSn + ":" + DepositId, "盒易付-设置押金-返回报文");
  445. string content = PublicImportDataService.Instance.BoxServiceFee(pos.PosSn, DepositId);
  446. function.WriteLog(DateTime.Now.ToString() + "\n" + content, "盒易付-设置押金-返回报文");
  447. if (content == "fail")
  448. {
  449. return "机具" + pos.PosSn + "设置失败";
  450. }
  451. JsonData jsonObj = JsonMapper.ToObject(content);
  452. if (jsonObj["resultCode"].ToString() != "1")
  453. {
  454. return jsonObj["errorDesc"].ToString();
  455. }
  456. decimal BeforeDeposit = 0;
  457. if (string.IsNullOrEmpty(pos.PrizeParams))
  458. {
  459. BeforeDeposit = 299;
  460. }
  461. else
  462. {
  463. BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
  464. }
  465. decimal amount = decimal.Parse(DepositId);
  466. pos.PrizeParams = amount.ToString("f0");
  467. db.SaveChanges();
  468. //设置押金添加记录
  469. PublicFunction.MerchantDepositSet(pos.BrandId, 0, SnIdNum, pos.PosSn, BeforeDeposit, decimal.Parse(pos.PrizeParams), content);
  470. }
  471. return "设置成功";
  472. }
  473. #endregion
  474. }
  475. }