GetHaoDaFTPInfoService.cs 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Data;
  5. using System.Threading;
  6. using Library;
  7. using LitJson;
  8. using System.Net;
  9. using System.IO;
  10. using MySystem.SpModels;
  11. namespace MySystem
  12. {
  13. /// <summary>
  14. /// 获取好哒ftp数据
  15. /// </summary>
  16. public class GetHaoDaFTPInfoService
  17. {
  18. public readonly static GetHaoDaFTPInfoService Instance = new GetHaoDaFTPInfoService();
  19. private GetHaoDaFTPInfoService()
  20. { }
  21. // 47.108.253.46
  22. // 用户名:hdftp
  23. // 密:haodatradeftp2024
  24. // 目录:/haoda-trade
  25. public string ftpServerAddress = "ftp://47.108.253.46";
  26. public string ftpUser = "hdftp";
  27. public string ftpPassword = "haodatradeftp2024";
  28. public void Start()
  29. {
  30. //每天凌晨执行获取好哒FTP昨日交易数据
  31. Thread th2 = new Thread(GetDepositDataReady);
  32. th2.IsBackground = true;
  33. th2.Start();
  34. }
  35. /// <summary>
  36. /// 获取好哒FTP昨日交易数据
  37. /// </summary>
  38. public void GetDepositDataReady()
  39. {
  40. while (true)
  41. {
  42. if (DateTime.Now.Hour > 10 && DateTime.Now.Hour < 22)
  43. {
  44. string check = function.ReadInstance("/GetFTPDepositYesterday/check" + DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + ".txt");
  45. if (string.IsNullOrEmpty(check))
  46. {
  47. function.WritePage("/GetFTPDepositYesterday/", "check" + DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + ".txt", DateTime.Now.ToString());
  48. GetDepositData(DateTime.Now.AddDays(-1).ToString("yyyyMMdd"));
  49. Thread.Sleep(60000);
  50. GetTradeData(DateTime.Now.AddDays(-1).ToString("yyyyMMdd"));
  51. Thread.Sleep(600000);
  52. }
  53. }
  54. if (DateTime.Now.Hour > 10)
  55. {
  56. GetDepositData("d_" + DateTime.Now.ToString("yyyyMMdd"));
  57. }
  58. GetTradeData(DateTime.Now.ToString("yyyyMMdd"));
  59. Thread.Sleep(1800000);
  60. }
  61. }
  62. public void StartListen()
  63. {
  64. //每天凌晨执行获取好哒FTP昨日交易数据
  65. Thread th2 = new Thread(ListenDepositDataReady);
  66. th2.IsBackground = true;
  67. th2.Start();
  68. }
  69. /// <summary>
  70. /// 获取好哒FTP昨日交易数据
  71. /// </summary>
  72. public void ListenDepositDataReady()
  73. {
  74. while (true)
  75. {
  76. string content = RedisDbconn.Instance.RPop<string>("ListenDepositDataQueue2");
  77. if (!string.IsNullOrEmpty(content))
  78. {
  79. GetDepositData2(content);
  80. Thread.Sleep(2000);
  81. }
  82. else
  83. {
  84. Thread.Sleep(60000);
  85. }
  86. }
  87. }
  88. public void GetDepositData(string Date)
  89. {
  90. // 要下载的文件路径
  91. string filePath = "/haoda-deposit/deposit_" + Date + ".csv";
  92. try
  93. {
  94. // 创建FtpWebRequest对象
  95. FtpWebRequest request = (FtpWebRequest)WebRequest.Create(ftpServerAddress + filePath);
  96. request.Method = WebRequestMethods.Ftp.DownloadFile;
  97. request.Credentials = new NetworkCredential(ftpUser, ftpPassword);
  98. // 使用WebResponse获取响应
  99. FtpWebResponse response = (FtpWebResponse)request.GetResponse();
  100. // 打开数据流
  101. Stream responseStream = response.GetResponseStream();
  102. StreamReader reader = new StreamReader(responseStream);
  103. // 读取数据
  104. string fileContents = reader.ReadToEnd();
  105. if (!string.IsNullOrEmpty(fileContents))
  106. {
  107. WebCMSEntities db = new WebCMSEntities();
  108. MpMainModels2.WebCMSEntities mpdb2 = new MpMainModels2.WebCMSEntities();
  109. var DataInfo = fileContents.TrimEnd('\n').Split('\n', 2);
  110. if(DataInfo.Length > 1)
  111. {
  112. var DataList = DataInfo[1].Split('\n');
  113. foreach (var DataListItem in DataList)
  114. {
  115. var DataListInfo = DataListItem.Split(',');
  116. string SnNo = DataListInfo[0]; //sn
  117. string MerNo = DataListInfo[1]; //商户编号
  118. string PosKind = DataListInfo[2]; //机具型号
  119. string ActDate = DataListInfo[3]; //激活时间
  120. string Deposit = DataListInfo[4]; //押金金额
  121. string PrizeAmt = "0"; //奖励金额
  122. string PrizeDate = "None"; //奖励发放时间
  123. string Name = ""; //发放人姓名
  124. string MerName = ""; //商户名称
  125. string PassDate = ""; //审核通过时期
  126. if(Date.StartsWith("d_"))
  127. {
  128. MerName = DataListInfo[5]; //商户名称
  129. PassDate = DataListInfo[6]; //审核通过时期
  130. }
  131. else
  132. {
  133. PrizeAmt = DataListInfo[5]; //奖励金额
  134. PrizeDate = DataListInfo[6]; //奖励发放时间
  135. Name = DataListInfo[7]; //发放人姓名
  136. MerName = DataListInfo[8]; //商户名称
  137. PassDate = DataListInfo[9]; //审核通过时期
  138. }
  139. string ActDateString = ActDate.Substring(0, 4) + "-" + ActDate.Substring(4, 2) + "-" + ActDate.Substring(6, 2);
  140. if(DateTime.Parse(ActDateString) >= DateTime.Parse(DateTime.Now.AddDays(-2).ToString("yyyy-MM-dd")))
  141. {
  142. string PrizeDateString = "";
  143. if(PrizeDate == "None")
  144. {
  145. PrizeDate = Date;
  146. }
  147. else
  148. {
  149. PrizeDateString = PrizeDate.Substring(0, 4) + "-" + PrizeDate.Substring(4, 2) + "-" + PrizeDate.Substring(6, 2);
  150. }
  151. if(!db.BindRecord.Any(m => m.MerSnNo == SnNo))
  152. {
  153. string ProductType = "0";
  154. if(PosKind == "好哒语音王Y512") ProductType = "18";
  155. if(PosKind == "4G收款王M820") ProductType = "19";
  156. if(PosKind == "4G收款王M826") ProductType = "20";
  157. if(PosKind == "好哒S312") ProductType = "21";
  158. if(PosKind == "好哒扫码通M837") ProductType = "29";
  159. db.BindRecord.Add(new BindRecord()
  160. {
  161. CreateDate = DateTime.Now,
  162. UpdateTime = DateTime.Now, //机具绑定、解绑时间
  163. CreateTime = DateTime.Now, //商户操作时间
  164. MerSnNo = SnNo, //序列号
  165. MerNo = MerNo, //商户编号
  166. MerName = MerName,
  167. SeoTitle = PrizeAmt,
  168. SeoKeyword = ActDateString,
  169. ProductType = ProductType,
  170. Field1 = Deposit,
  171. Field2 = PrizeDate,
  172. Field3 = Name,
  173. Field4 = PassDate,
  174. Status = 1,
  175. });
  176. db.Merchants.Add(new Merchants()
  177. {
  178. SnNo = SnNo,
  179. CreateTime = DateTime.Now,
  180. UpdateTime = DateTime.Now,
  181. AgentName = Name,
  182. MerRealName = Name,
  183. MerNo = MerNo,
  184. MerName = Name,
  185. ProductType = ProductType,
  186. Status = 1,
  187. });
  188. db.SaveChanges();
  189. Thread.Sleep(1000);
  190. db.ActivateRecord.Add(new ActivateRecord()
  191. {
  192. SnNo = SnNo,
  193. CreateDate = DateTime.Now,
  194. SeoTitle = Deposit,
  195. ActivateDate = DateTime.Now,
  196. AgentNo = MerNo,
  197. MerRealName = Name,
  198. MerNo = MerNo,
  199. MerName = Name,
  200. ProductType = ProductType,
  201. ChannelSerial = DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8),
  202. Status = 1,
  203. Field1 = PassDate,
  204. });
  205. db.SaveChanges();
  206. //推送MQ给创业帮
  207. var merchantAddInfo = mpdb2.MerchantAddInfo.FirstOrDefault(m => m.MchtNo == MerNo) ?? new MpMainModels2.MerchantAddInfo();
  208. if (merchantAddInfo.BrandId == 1 && !string.IsNullOrEmpty(merchantAddInfo.CybMakerCode))
  209. {
  210. SortedList<string, string> obj = new SortedList<string, string>();
  211. obj.Add("create_time", ActDateString);
  212. obj.Add("sn", SnNo);
  213. obj.Add("deposit", Deposit);
  214. obj.Add("subject_type", merchantAddInfo.SubjectType);
  215. obj.Add("merch_no", merchantAddInfo.MchtNo);
  216. obj.Add("maker_code", merchantAddInfo.CybMakerCode);
  217. PushHelper.Instance.Do(obj, "cashNotify");
  218. }
  219. }
  220. }
  221. }
  222. }
  223. db.Dispose();
  224. mpdb2.Dispose();
  225. }
  226. // 关闭响应
  227. reader.Dispose();
  228. responseStream.Dispose();
  229. response.Close();
  230. }
  231. catch (WebException ex)
  232. {
  233. function.WriteLog(DateTime.Now.ToString() + ":" + ex.ToString(), "获取好哒FTP文件数据异常");
  234. }
  235. }
  236. public void GetDepositData2(string Date)
  237. {
  238. // 要下载的文件路径
  239. string filePath = "/haoda-deposit/deposit_" + Date + ".csv";
  240. try
  241. {
  242. // 创建FtpWebRequest对象
  243. FtpWebRequest request = (FtpWebRequest)WebRequest.Create(ftpServerAddress + filePath);
  244. request.Method = WebRequestMethods.Ftp.DownloadFile;
  245. request.Credentials = new NetworkCredential(ftpUser, ftpPassword);
  246. // 使用WebResponse获取响应
  247. FtpWebResponse response = (FtpWebResponse)request.GetResponse();
  248. // 打开数据流
  249. Stream responseStream = response.GetResponseStream();
  250. StreamReader reader = new StreamReader(responseStream);
  251. // 读取数据
  252. string fileContents = reader.ReadToEnd();
  253. if (!string.IsNullOrEmpty(fileContents))
  254. {
  255. WebCMSEntities db = new WebCMSEntities();
  256. MpMainModels2.WebCMSEntities mpdb2 = new MpMainModels2.WebCMSEntities();
  257. var DataInfo = fileContents.TrimEnd('\n').Split('\n', 2);
  258. if(DataInfo.Length > 1)
  259. {
  260. var DataList = DataInfo[1].Split('\n');
  261. foreach (var DataListItem in DataList)
  262. {
  263. var DataListInfo = DataListItem.Split(',');
  264. string SnNo = DataListInfo[0]; //sn
  265. string MerNo = DataListInfo[1]; //商户编号
  266. string PosKind = DataListInfo[2]; //机具型号
  267. string ActDate = DataListInfo[3]; //激活时间
  268. string Deposit = DataListInfo[4]; //押金金额
  269. string PrizeAmt = DataListInfo[5]; //奖励金额
  270. string PrizeDate = DataListInfo[6]; //奖励发放时间
  271. string Name = DataListInfo[7]; //发放人姓名
  272. string ActDateString = ActDate.Substring(0, 4) + "-" + ActDate.Substring(4, 2) + "-" + ActDate.Substring(6, 2);
  273. string PrizeDateString = "";
  274. if(PrizeDate == "None")
  275. {
  276. PrizeDate = Date;
  277. }
  278. else
  279. {
  280. PrizeDateString = PrizeDate.Substring(0, 4) + "-" + PrizeDate.Substring(4, 2) + "-" + PrizeDate.Substring(6, 2);
  281. }
  282. string ProductType = "0";
  283. if(PosKind == "好哒语音王Y512") ProductType = "18";
  284. if(PosKind == "4G收款王M820") ProductType = "19";
  285. if(PosKind == "4G收款王M826") ProductType = "20";
  286. if(PosKind == "好哒S312") ProductType = "21";
  287. db.BindRecord.Add(new BindRecord()
  288. {
  289. CreateDate = DateTime.Now,
  290. UpdateTime = DateTime.Now, //机具绑定、解绑时间
  291. CreateTime = DateTime.Now, //商户操作时间
  292. MerSnNo = SnNo, //序列号
  293. MerNo = MerNo, //商户编号
  294. MerName = Name,
  295. SeoTitle = PrizeAmt,
  296. SeoKeyword = ActDateString,
  297. ProductType = ProductType,
  298. Field1 = Deposit,
  299. Field2 = PrizeDate,
  300. Status = 1,
  301. });
  302. db.Merchants.Add(new Merchants()
  303. {
  304. SnNo = SnNo,
  305. CreateTime = DateTime.Now,
  306. UpdateTime = DateTime.Now,
  307. AgentName = Name,
  308. MerRealName = Name,
  309. MerNo = MerNo,
  310. MerName = Name,
  311. ProductType = ProductType,
  312. Status = 1,
  313. });
  314. db.SaveChanges();
  315. Thread.Sleep(1000);
  316. db.ActivateRecord.Add(new ActivateRecord()
  317. {
  318. SnNo = SnNo,
  319. CreateDate = DateTime.Now,
  320. SeoTitle = Deposit,
  321. ActivateDate = DateTime.Now,
  322. AgentNo = MerNo,
  323. MerRealName = Name,
  324. MerNo = MerNo,
  325. MerName = Name,
  326. ProductType = ProductType,
  327. ChannelSerial = DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8),
  328. Status = 1,
  329. });
  330. db.SaveChanges();
  331. //推送MQ给创业帮
  332. var merchantAddInfo = mpdb2.MerchantAddInfo.FirstOrDefault(m => m.MchtNo == MerNo) ?? new MpMainModels2.MerchantAddInfo();
  333. if (merchantAddInfo.BrandId == 1 && !string.IsNullOrEmpty(merchantAddInfo.CybMakerCode))
  334. {
  335. SortedList<string, string> obj = new SortedList<string, string>();
  336. obj.Add("create_time", ActDateString);
  337. obj.Add("sn", SnNo);
  338. obj.Add("deposit", Deposit);
  339. obj.Add("subject_type", merchantAddInfo.SubjectType);
  340. obj.Add("merch_no", merchantAddInfo.MchtNo);
  341. obj.Add("maker_code", merchantAddInfo.CybMakerCode);
  342. PushHelper.Instance.Do(obj, "cashNotify");
  343. }
  344. }
  345. }
  346. db.Dispose();
  347. mpdb2.Dispose();
  348. }
  349. // 关闭响应
  350. reader.Dispose();
  351. responseStream.Dispose();
  352. response.Close();
  353. }
  354. catch (WebException ex)
  355. {
  356. function.WriteLog(DateTime.Now.ToString() + ":" + ex.ToString(), "获取好哒FTP文件数据异常");
  357. }
  358. }
  359. public void StartTrade()
  360. {
  361. //每天凌晨执行获取好哒FTP昨日交易数据
  362. Thread th2 = new Thread(GetTradeDataReady);
  363. th2.IsBackground = true;
  364. th2.Start();
  365. }
  366. /// <summary>
  367. /// 获取好哒FTP昨日交易数据
  368. /// </summary>
  369. public void GetTradeDataReady()
  370. {
  371. while (true)
  372. {
  373. if (DateTime.Now.Hour > 10 && DateTime.Now.Hour < 22)
  374. {
  375. string check = function.ReadInstance("/GetFTPTradeYesterday/check" + DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + ".txt");
  376. if (string.IsNullOrEmpty(check))
  377. {
  378. function.WritePage("/GetFTPTradeYesterday/", "check" + DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + ".txt", DateTime.Now.ToString());
  379. GetTradeData(DateTime.Now.AddDays(-1).ToString("yyyyMMdd"));
  380. Thread.Sleep(600000);
  381. }
  382. }
  383. else
  384. {
  385. Thread.Sleep(1800000);
  386. }
  387. }
  388. }
  389. public void StartTradeListen()
  390. {
  391. //每天凌晨执行获取好哒FTP昨日交易数据
  392. Thread th2 = new Thread(ListenTradeDataReady);
  393. th2.IsBackground = true;
  394. th2.Start();
  395. }
  396. /// <summary>
  397. /// 获取好哒FTP昨日交易数据
  398. /// </summary>
  399. public void ListenTradeDataReady()
  400. {
  401. while (true)
  402. {
  403. string content = RedisDbconn.Instance.RPop<string>("ListenTradeDataQueue");
  404. if (!string.IsNullOrEmpty(content))
  405. {
  406. GetTradeData(content);
  407. Thread.Sleep(2000);
  408. }
  409. else
  410. {
  411. Thread.Sleep(60000);
  412. }
  413. }
  414. }
  415. public void GetTradeData(string Date)
  416. {
  417. // 要下载的文件路径
  418. string filePath = "/haoda-trade/" + Date + ".csv";
  419. function.WriteLog(DateTime.Now.ToString() + ":" + filePath, "获取好哒FTP文件交易数据");
  420. try
  421. {
  422. // 创建FtpWebRequest对象
  423. FtpWebRequest request = (FtpWebRequest)WebRequest.Create(ftpServerAddress + filePath);
  424. request.Method = WebRequestMethods.Ftp.DownloadFile;
  425. request.Credentials = new NetworkCredential(ftpUser, ftpPassword);
  426. // 使用WebResponse获取响应
  427. FtpWebResponse response = (FtpWebResponse)request.GetResponse();
  428. // 打开数据流
  429. Stream responseStream = response.GetResponseStream();
  430. StreamReader reader = new StreamReader(responseStream);
  431. // 读取数据
  432. string fileContents = reader.ReadToEnd();
  433. function.WriteLog("fileContents:" + fileContents, "获取好哒FTP文件交易数据");
  434. if (!string.IsNullOrEmpty(fileContents))
  435. {
  436. MpMainModels2.WebCMSEntities db = new MpMainModels2.WebCMSEntities();
  437. var DataInfo = fileContents.TrimEnd('\n').Split('\n', 2);
  438. if(DataInfo.Length > 1)
  439. {
  440. var DataList = DataInfo[1].Split('\n');
  441. foreach (var DataListItem in DataList)
  442. {
  443. var DataListInfo = DataListItem.Split(',');
  444. var MerchantNo = ""; // 商户号
  445. var BaseNo = ""; // 设备号
  446. var OrderNo = ""; // 订单号
  447. var PayWay = ""; // 支付方式(微信 支付宝)
  448. var TradeType = ""; // 交易类型
  449. var TradeAmount = ""; // 交易金额
  450. var TradeFee = ""; // 交易手续费
  451. var TradeDate = ""; // 交易时间
  452. var TradeCycle = ""; // 结算周期
  453. MerchantNo = DataListInfo[0];
  454. BaseNo = DataListInfo[1];
  455. OrderNo = DataListInfo[3];
  456. PayWay = DataListInfo[4];
  457. TradeType = DataListInfo[5];
  458. TradeAmount = DataListInfo[6];
  459. TradeFee = DataListInfo[7];
  460. TradeDate = DataListInfo[8];
  461. TradeCycle = DataListInfo[9];
  462. TradeDate = TradeDate.Substring(0, 4) + "-" + TradeDate.Substring(4, 2) + "-" + TradeDate.Substring(6, 2) + " " + TradeDate.Substring(8, 2) + ":" + TradeDate.Substring(10, 2) + ":" + TradeDate.Substring(12, 2);
  463. function.WriteLog("OrderNo:" + OrderNo, "获取好哒FTP文件交易数据");
  464. function.WriteLog("MerchantNo:" + MerchantNo, "获取好哒FTP文件交易数据");
  465. var PayMode = 0;
  466. if (PayWay.Contains("支付宝")) PayMode = 1;
  467. if (PayWay.Contains("微信")) PayMode = 2;
  468. var merchantAddInfo = db.MerchantAddInfo.FirstOrDefault(m => m.MchtNo == MerchantNo) ?? new MpMainModels2.MerchantAddInfo();
  469. if (merchantAddInfo.Id > 0)
  470. {
  471. function.WriteLog("找到商户", "获取好哒FTP文件交易数据");
  472. var merchantInfo = db.MerchantInfo.FirstOrDefault(m => m.Id == merchantAddInfo.Id) ?? new MpMainModels2.MerchantInfo();
  473. if(merchantInfo.IsAct == 0)
  474. {
  475. merchantInfo.IsAct = 1;
  476. }
  477. var orders = db.ConsumerOrders.FirstOrDefault(m => m.SeoTitle == OrderNo && m.OrderNo == OrderNo) ?? new MpMainModels2.ConsumerOrders();
  478. if (orders.Id == 0)
  479. {
  480. function.WriteLog("订单号不存在,开始入库", "获取好哒FTP文件交易数据");
  481. var query = db.ConsumerOrders.Add(new MpMainModels2.ConsumerOrders()
  482. {
  483. Status = 1,
  484. CreateDate = DateTime.Parse(TradeDate),
  485. UpdateDate = DateTime.Parse(TradeDate),
  486. SnNo = BaseNo,
  487. PayMoney = decimal.Parse(TradeAmount),
  488. PayMode = PayMode,
  489. SeoTitle = OrderNo,
  490. OrderNo = OrderNo,
  491. MerchantId = merchantAddInfo.Id,
  492. UserId = merchantInfo.UserId,
  493. SeoKeyword = merchantAddInfo.CybMakerCode,
  494. }).Entity;
  495. db.SaveChanges();
  496. function.WriteLog("入库完毕", "获取好哒FTP文件交易数据");
  497. //推送MQ给创业帮
  498. if (merchantAddInfo.BrandId == 1)
  499. {
  500. if(!string.IsNullOrEmpty(merchantAddInfo.CybMakerCode))
  501. {
  502. SortedList<string, string> obj = new SortedList<string, string>();
  503. obj.Add("create_time", TradeDate);
  504. obj.Add("sn", BaseNo);
  505. obj.Add("pay_money", TradeAmount);
  506. obj.Add("pay_mode", PayMode.ToString());
  507. obj.Add("order_no", OrderNo);
  508. obj.Add("merch_no", merchantAddInfo.MchtNo);
  509. obj.Add("maker_code", merchantAddInfo.CybMakerCode);
  510. PushHelper.Instance.Do(obj);
  511. }
  512. OrderMessageHelper.SendOrderMsg(query);
  513. }
  514. }
  515. }
  516. }
  517. }
  518. db.Dispose();
  519. }
  520. // 关闭响应
  521. reader.Dispose();
  522. responseStream.Dispose();
  523. response.Close();
  524. function.WriteLog("结束\n\n\n", "获取好哒FTP文件数据异常");
  525. }
  526. catch (WebException ex)
  527. {
  528. function.WriteLog(DateTime.Now.ToString() + ":" + ex.ToString(), "获取好哒FTP文件交易数据异常");
  529. }
  530. }
  531. }
  532. }