TestController.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. using Microsoft.AspNetCore.Mvc;
  2. using System;
  3. using System.Collections.Generic;
  4. using DllEapDal;
  5. using Cksoft.Data;
  6. using Cksoft.Data.Repository;
  7. using Cksoft.Unity;
  8. using Microsoft.Extensions.Logging;
  9. using DllEapDal.Onsemi;
  10. using DllEapEntity;
  11. using System.Linq;
  12. using DllEapEntity.Onsemi;
  13. using DllEapEntity.OFILM;
  14. using Newtonsoft.Json;
  15. using DllSocketFile;
  16. using DllEapCommon;
  17. using Microsoft.AspNetCore.Authorization;
  18. using System.Threading.Tasks;
  19. using DllEapDal.OFILM;
  20. using System.Threading;
  21. namespace DllEapBll.Controllers
  22. {
  23. /// <summary>
  24. /// 测试用
  25. /// </summary>
  26. [AllowAnonymous]
  27. [ApiController]
  28. [Route("/eap/api/[controller]/[action]")]
  29. public class TestController : ControllerBase
  30. {
  31. private ILogger loger = null;
  32. public TestController(ILogger<TestController> loger)
  33. {
  34. this.loger = loger;
  35. }
  36. /// <summary>
  37. ///
  38. /// </summary>
  39. /// <param name="macCode"></param>
  40. /// <param name="proName"></param>
  41. /// <returns></returns>
  42. [HttpGet]
  43. public EapResponse Test(string macCode, string proName)
  44. {
  45. var res = new EapResponse { Code = 1, Msg = string.Empty };
  46. IDatabase db = null;
  47. try
  48. {
  49. db = DbFactory.Base("eap");
  50. db.BeginTrans();
  51. var dal = new ProgramDal(db, loger);
  52. string errorinfo = string.Empty;
  53. loger.LogError($"机台={macCode},程序名称={proName} 开始下载");
  54. //macCode = "DIBD0034";
  55. //proName = "18-038";
  56. //proName = "DMP3099L-7-CU-AD0806AL796CXX-BN";
  57. var r = dal.DownloadProgram(macCode, proName, ref errorinfo);
  58. if (r < 0)
  59. {
  60. loger.LogError(errorinfo);
  61. db.Rollback();
  62. res.Code = -1;
  63. res.Msg = errorinfo;
  64. return res;
  65. }
  66. db.Commit();
  67. return res;
  68. }
  69. catch (Exception e)
  70. {
  71. res.Code = -1;
  72. res.Msg = e.Message;
  73. return res;
  74. }
  75. finally
  76. {
  77. if (db != null)
  78. db.Close();
  79. }
  80. }
  81. /// <summary>
  82. ///
  83. /// </summary>
  84. /// <param name="macCode"></param>
  85. /// <param name="proName"></param>
  86. /// <returns></returns>
  87. [HttpGet]
  88. public EapResponse Test02(string macCode, string proName)
  89. {
  90. var res = new EapResponse { Code = 1, Msg = string.Empty };
  91. IDatabase db = null;
  92. try
  93. {
  94. db = DbFactory.Base("eap");
  95. db.BeginTrans();
  96. var dal = new ProgramDal(db);
  97. string errorinfo = string.Empty;
  98. loger.LogError($"机台={macCode},程序名称={proName} 开始下载");
  99. //macCode = "DIBD0034";
  100. //proName = "18-038";
  101. //proName = "DMP3099L-7-CU-AD0806AL796CXX-BN";
  102. var r = dal.DownloadProgram(macCode, proName, ref errorinfo);
  103. if (r < 0)
  104. {
  105. loger.LogError(errorinfo);
  106. db.Rollback();
  107. res.Code = -1;
  108. res.Msg = errorinfo;
  109. return res;
  110. }
  111. db.Commit();
  112. return res;
  113. }
  114. catch (Exception e)
  115. {
  116. res.Code = -1;
  117. res.Msg = e.Message;
  118. return res;
  119. }
  120. finally
  121. {
  122. if (db != null)
  123. db.Close();
  124. }
  125. }
  126. /// <summary>
  127. /// ASE程序测试
  128. /// </summary>
  129. /// <param name="lotId"></param>
  130. /// <param name="macCode"></param>
  131. /// <returns></returns>
  132. [HttpGet]
  133. public EapResponse TestProgramForAsesh(string lotId, string macCode)
  134. {
  135. var res = new EapResponse { Code = 1, Msg = string.Empty };
  136. try
  137. {
  138. var dal = new MesDal();
  139. string errorinfo = string.Empty;
  140. //lotId = "BLD010S008";
  141. //macCode = "A2220-0019";
  142. var r = dal.DownloadProgram(lotId, macCode, ref errorinfo); // 加入测试代码
  143. if (r < 0)
  144. {
  145. WriteLog.WriteLogStr("", "", DateTime.Now, errorinfo, ref errorinfo);
  146. res.Code = -1;
  147. res.Msg = errorinfo;
  148. return res;
  149. }
  150. return res;
  151. }
  152. catch (Exception e)
  153. {
  154. res.Code = -1;
  155. res.Msg = e.Message;
  156. return res;
  157. }
  158. }
  159. /// <summary>
  160. /// 共享文件测试
  161. /// </summary>
  162. /// <returns></returns>
  163. [HttpGet]
  164. public EapResponse TestShareFile()
  165. {
  166. var res = new EapResponse { Code = 1, Msg = string.Empty };
  167. try
  168. {
  169. string errorinfo = "";
  170. byte[] datas = UnityHelper.ReadFile(@"d:\test.txt", ref errorinfo);
  171. UnityHelper.WriteFile(@"\\192.168.51.244\ShareFileDir", "wwwww", datas, ref errorinfo);
  172. loger.LogError($"写入完成{errorinfo}");
  173. return res;
  174. }
  175. catch (Exception e)
  176. {
  177. loger.LogError(e.Message.ToString());
  178. res.Code = -1;
  179. res.Msg = e.Message;
  180. return res;
  181. }
  182. }
  183. /// <summary>
  184. /// 测试欧非调用MES接口
  185. /// </summary>
  186. /// <param name="actionName"></param>
  187. /// <param name="macId"></param>
  188. /// <param name="recipe"></param>
  189. /// <param name="lotId"></param>
  190. /// <param name="version"></param>
  191. /// <returns></returns>
  192. [HttpGet]
  193. public OfilmMesApiResponse TestCallMesApi(string actionName, string macId, string recipe,
  194. string lotId, string version)
  195. {
  196. string errorinfo = string.Empty;
  197. var url = "http://192.168.51.100:8080/ofilm/eap/" + actionName;
  198. IDictionary<string, string> paras = new Dictionary<string, string>();
  199. paras.Add("equipmentID", macId);
  200. paras.Add("lotId", lotId);
  201. paras.Add("recipeName", recipe);
  202. paras.Add("version", version);
  203. var obj = HttpRequestHelper<OfilmMesApiResponse>.Get(url, paras, ref errorinfo);
  204. return obj;
  205. }
  206. /// <summary>
  207. /// 获取机台参数
  208. /// </summary>
  209. /// <returns></returns>
  210. [HttpGet]
  211. public EapApiResponse<string> TestEapApi()
  212. {
  213. string errorinfo = string.Empty;
  214. var url = "http://192.168.124.93:8606/eap/api/equipment/getEquipmentParams";
  215. var obj = new
  216. {
  217. equipmentID = "LHA-001",
  218. ParamsList = new string[] { "S00001", "S00002" }
  219. };
  220. return HttpRequestHelper<EapApiResponse<string>>.Post(url,
  221. JsonConvert.SerializeObject(obj), ref errorinfo);
  222. }
  223. /// <summary>
  224. /// 测试获取机台制程
  225. /// </summary>
  226. /// <param name="maccode"></param>
  227. /// <returns></returns>
  228. [HttpGet]
  229. public EapResponse TestGetProgressName(string maccode)
  230. {
  231. var res = new EapResponse { Code = 1, Msg = string.Empty };
  232. string errorinfo = "";
  233. IDatabase CurrDb = null;
  234. try
  235. {
  236. CurrDb = DbFactory.Base("eap");
  237. //读取机台信息
  238. string condition = $" and a.FCode='{maccode}'";
  239. List<Machine> mac = CurrDb.FindListForCondition<Machine>(condition, ref errorinfo).ToList();
  240. if (mac.Count <= 0)
  241. {
  242. errorinfo = $"未找到机台【{maccode}】。";
  243. return null;
  244. }
  245. switch (mac[0].MModeCode.ToLower())
  246. {
  247. case "dad3650":
  248. case "dfd6362":
  249. Dad3650ProgramDal dal3650 = new Dad3650ProgramDal(CurrDb);
  250. res.Data = dal3650.GetProgramName(mac[0], ref errorinfo);
  251. break;
  252. case "dfg8540":
  253. BgProgramDal bgdal = new BgProgramDal(CurrDb);
  254. res.Data = bgdal.GetProgramName(mac[0], ref errorinfo);
  255. break;
  256. default:
  257. Ad830PlusProgramDal dal = new Ad830PlusProgramDal(CurrDb);
  258. res.Data = dal.GetProgramName(mac[0], ref errorinfo);
  259. break;
  260. }
  261. return res;
  262. }
  263. catch (Exception ex)
  264. {
  265. //errorinfo = $"读取机台【{maccode}】程序名称发生错误,错误信息为【{ex.Message.ToString()}】";
  266. res.Code = -1;
  267. res.Msg = ex.Message;
  268. loger.LogError(res.Msg);
  269. return res;
  270. }
  271. finally
  272. {
  273. if (CurrDb != null)
  274. CurrDb.Close();
  275. }
  276. }
  277. ///// <summary>
  278. ///// 下载LOT
  279. ///// </summary>
  280. ///// <param name="macCode"></param>
  281. ///// <param name="handlerdown"></param>
  282. ///// <param name="programname"></param>
  283. ///// <returns></returns>
  284. //[HttpGet]
  285. //public string DownLotload(string macCode, string handlerdown, string programname)
  286. //{
  287. // int ver = 1;
  288. // var res = new EapResponse { Code = 1, Msg = string.Empty };
  289. // IDatabase db = null;
  290. // try
  291. // {
  292. // loger.LogError("programname参数值的内容为:" + programname);
  293. // Dictionary<string, string> dic = JsonConvert.DeserializeObject<Dictionary<string, string>>(programname);
  294. // string PartID = dic["PartID"].ToString();
  295. // string FolProgram = dic["FolProgram"].ToString() + ".zip";
  296. // string MarkProgram = dic["MarkProgram"].ToString();
  297. // string TestProgram = dic["TestProgram"].ToString();
  298. // string ProcessFlow = dic["ProcessFlow"].ToString().Trim().ToLower();
  299. // string lotID = dic["lotID"].ToString();
  300. // db = DbFactory.Base("eap");
  301. // db.BeginTrans();
  302. // string errorinfo = string.Empty;
  303. // string outstr = "";
  304. // //var dal = new StepTrackDal(db);
  305. // Machine mac = db.FindListForCondition<Machine>($" and a.FCode='{macCode}'", ref errorinfo).FirstOrDefault();
  306. // int result = -1;
  307. // Dad3350ProgramDal dal1 = new Dad3350ProgramDal(db);
  308. // AsmProgramDal apdal = new AsmProgramDal(db);
  309. // if (handlerdown == "on")
  310. // {
  311. // //机台下载程序文件
  312. // result = dal1.DownloadProgramForFile(mac, FolProgram, ver, ref errorinfo);
  313. // if (result <= 0)
  314. // {
  315. // errorinfo = $"机台[{mac.FCode}]下载程序文件[{FolProgram}]发生错误:{errorinfo}";
  316. // loger.LogError(errorinfo);
  317. // return errorinfo;
  318. // }
  319. // else
  320. // {
  321. // outstr += $"机台[{mac.FCode}]下载程序文件[{FolProgram}]成功!\r\n";
  322. // loger.LogError($"机台[{mac.FCode}]下载程序文件[{FolProgram}]成功!");
  323. // }
  324. // db.Commit();
  325. // //机台装载程序
  326. // FolProgram = FolProgram.Substring(0, FolProgram.Length - 4);
  327. // //AsmProgramDal apdal = new AsmProgramDal(db);
  328. // result = apdal.SelProgram(mac, FolProgram, ref errorinfo);
  329. // if (result < 0)
  330. // {
  331. // errorinfo = $"机台[{mac.FCode}]装载程序[{FolProgram}]异常:" + errorinfo;
  332. // loger.LogError(errorinfo);
  333. // return errorinfo;
  334. // }
  335. // else
  336. // {
  337. // outstr += $"机台[{mac.FCode}]装载程序[{FolProgram}]成功!\r\n";
  338. // loger.LogError($"机台[{mac.FCode}]装载程序[{FolProgram}]成功!");
  339. // }
  340. // }
  341. // //test、marking装载程序
  342. // var testmarkdal = new MachinetestmarkingDal(db);
  343. // string filter2 = $" and b.FCode='{mac.FCode}'";
  344. // var roles2 = testmarkdal.Get(1, 10, "desc", "a.MacID", filter2, errorinfo);
  345. // if (roles2 != null && roles2.Count() > 0)
  346. // {
  347. // foreach (var item in roles2)
  348. // {
  349. // string getname = string.Empty;
  350. // bool ismark = ProcessFlow.ToUpper() == "3-IN-1" ? true : false;
  351. // Machine testmarkmac = db.FindListForCondition<Machine>($" and a.ID='{item.parentID}'", ref errorinfo).FirstOrDefault();
  352. // if (testmarkmac.MModeCode == "QuickMark")
  353. // {
  354. // if (ismark)
  355. // {
  356. // getname = MarkProgram;
  357. // result = apdal.SelProgramQuickMark(testmarkmac, getname, ref errorinfo);
  358. // }
  359. // else
  360. // {
  361. // continue;
  362. // }
  363. // }
  364. // if (testmarkmac.MModeCode == "SineTest")
  365. // {
  366. // getname = TestProgram;
  367. // result = apdal.SelProgramSineTest(testmarkmac, getname, lotID, ref errorinfo);
  368. // }
  369. // if (testmarkmac.MModeCode == "QTTest")
  370. // {
  371. // string userid = string.Empty;
  372. // var partMachinedal = new PartMachineDal(db);
  373. // string filter = $" and b.partCode='{PartID}' and a.machineID='{testmarkmac.ID}'";
  374. // var roles = partMachinedal.Get(1, 10000, "desc", "a.partID", filter, errorinfo);
  375. // if (roles != null && roles.Count() > 0)
  376. // {
  377. // var qttest = roles.FirstOrDefault();
  378. // string qtp = qttest.qtype.ToUpper();
  379. // qtp = "CJ-" + qtp;
  380. // userid = qttest.employNum;
  381. // if (qttest.programName.Trim().Length > 0)
  382. // {
  383. // getname = qttest.programName;
  384. // result = apdal.SelProgramQTTest(testmarkmac, qttest.programName, lotID, qttest.employNum, qtp, ref errorinfo);
  385. // if (result < 0)
  386. // {
  387. // errorinfo = $"机台[{testmarkmac.FCode}]装载程序[{getname}]异常:" + errorinfo;
  388. // loger.LogError(errorinfo);
  389. // outstr += errorinfo + "\r\n";
  390. // }
  391. // else
  392. // {
  393. // outstr += $"机台[{testmarkmac.FCode}]装载程序[{getname}]成功!\r\n";
  394. // }
  395. // }
  396. // }
  397. // getname = TestProgram;
  398. // result = LoadQTTest(testmarkmac, TestProgram, lotID, userid, "FT-FT", ref errorinfo);
  399. // }
  400. // if (result < 0)
  401. // {
  402. // errorinfo = $"机台[{testmarkmac.FCode}]装载程序[{getname}]异常:" + errorinfo;
  403. // loger.LogError(errorinfo);
  404. // outstr += errorinfo + "\r\n";
  405. // }
  406. // else
  407. // {
  408. // outstr += $"机台[{testmarkmac.FCode}]装载程序[{getname}]成功!\r\n";
  409. // }
  410. // }
  411. // }
  412. // else
  413. // {
  414. // return $"找不到机台[{mac.FCode}]关联的Test、Marking配置信息!";
  415. // }
  416. // //var partdal = new PartInfoDal(db);
  417. // //string filter = $" and a.partCode='{PartID}'";
  418. // //var roles = partdal.Get(1, 10000, "desc", "a.partCode", filter, errorinfo).Select(x=>x.machineID);
  419. // //if (roles!=null && roles.Count()>0)
  420. // //{
  421. // // List<int> lstmac = roles.ToList();
  422. // // var lstMachine = lstmac.Where((x, i) => lstmac.FindIndex(z => z == x) == i);
  423. // // foreach (var itemMac in lstMachine)
  424. // // {
  425. // // }
  426. // // //return $"[{lotID}]lot调程成功!";
  427. // // return outstr;
  428. // //}
  429. // //else
  430. // //{
  431. // // return $"找不到产品编号[{PartID}]关联的机台配置信息!";
  432. // //}
  433. // return outstr;
  434. // }
  435. // catch (Exception e)
  436. // {
  437. // res.Code = -1;
  438. // res.Msg = e.Message;
  439. // loger.LogError(res.Msg);
  440. // return res.Msg;
  441. // }
  442. // finally
  443. // {
  444. // if (db != null)
  445. // db.Close();
  446. // }
  447. //}
  448. /// <summary>
  449. ///
  450. /// </summary>
  451. /// <param name="macCode"></param>
  452. /// <param name="programname"></param>
  453. /// <returns></returns>
  454. [HttpGet]
  455. public string LoadTest(string macCode, string programname)
  456. {
  457. string errorinfo = string.Empty;
  458. IDatabase db = null;
  459. try
  460. {
  461. db = DbFactory.Base("eap");
  462. AsmProgramDal apdal = new AsmProgramDal(db);
  463. Machine testmarkmac = db.FindListForCondition<Machine>($" and a.FCode='{macCode}'", ref errorinfo).FirstOrDefault();
  464. int result = apdal.SelProgramQuickMark(testmarkmac, programname, ref errorinfo);
  465. if (result < 0)
  466. {
  467. loger.LogError($"机台{testmarkmac.FCode}装载程序异常:" + errorinfo);
  468. return errorinfo;
  469. }
  470. return "成功";
  471. }
  472. catch (Exception ex)
  473. {
  474. return ex.Message.ToString();
  475. }
  476. }
  477. /// <summary>
  478. ///
  479. /// </summary>
  480. /// <param name="macCode"></param>
  481. /// <param name="programname"></param>
  482. /// <param name="lotid"></param>
  483. /// <returns></returns>
  484. [HttpGet]
  485. public string LoadTest2(string macCode, string programname, string lotid)
  486. {
  487. string errorinfo = string.Empty;
  488. IDatabase db = null;
  489. try
  490. {
  491. db = DbFactory.Base("eap");
  492. AsmProgramDal apdal = new AsmProgramDal(db);
  493. Machine testmarkmac = db.FindListForCondition<Machine>($" and a.FCode='{macCode}'", ref errorinfo).FirstOrDefault();
  494. int result = apdal.SelProgramSineTest(testmarkmac, programname, lotid, ref errorinfo);
  495. if (result < 0)
  496. {
  497. loger.LogError($"机台{testmarkmac.FCode}装载程序异常:" + errorinfo);
  498. return errorinfo;
  499. }
  500. return "成功!";
  501. }
  502. catch (Exception ex)
  503. {
  504. return ex.Message.ToString();
  505. }
  506. }
  507. /// <summary>
  508. ///
  509. /// </summary>
  510. /// <param name="macCode"></param>
  511. /// <param name="programname"></param>
  512. /// <param name="lotid"></param>
  513. /// <param name="userid"></param>
  514. /// <param name="stationid"></param>
  515. /// <returns></returns>
  516. [HttpGet]
  517. public string LoadTest3(string macCode, string programname, string lotid, string userid, string stationid)
  518. {
  519. string errorinfo = string.Empty;
  520. IDatabase db = null;
  521. try
  522. {
  523. db = DbFactory.Base("eap");
  524. AsmProgramDal apdal = new AsmProgramDal(db);
  525. Machine testmarkmac = db.FindListForCondition<Machine>($" and a.FCode='{macCode}'", ref errorinfo).FirstOrDefault();
  526. int result = apdal.SelProgramQTTest(testmarkmac, programname, lotid, userid, stationid, ref errorinfo);
  527. if (result < 0)
  528. {
  529. loger.LogError($"机台{testmarkmac.FCode}装载程序异常:" + errorinfo);
  530. return errorinfo;
  531. }
  532. return "成功!";
  533. }
  534. catch (Exception ex)
  535. {
  536. return ex.Message.ToString();
  537. }
  538. }
  539. ///// <summary>
  540. /////
  541. ///// </summary>
  542. ///// <param name="testmarkmac"></param>
  543. ///// <param name="programname"></param>
  544. ///// <param name="lotid"></param>
  545. ///// <param name="userid"></param>
  546. ///// <param name="stationid"></param>
  547. ///// <param name="errorinfo"></param>
  548. ///// <returns></returns>
  549. //[HttpGet]
  550. //public int LoadQTTest(Machine testmarkmac, string programname, string lotid, string userid, string stationid, ref string errorinfo)
  551. //{
  552. // IDatabase db = null;
  553. // try
  554. // {
  555. // db = DbFactory.Base("eap");
  556. // AsmProgramDal apdal = new AsmProgramDal(db);
  557. // //Machine testmarkmac = db.FindListForCondition<Machine>($" and a.FCode='{macCode}'", ref errorinfo).FirstOrDefault();
  558. // int result = apdal.SelProgramQTTest(testmarkmac, programname, lotid, userid, stationid, ref errorinfo);
  559. // if (result < 0)
  560. // {
  561. // //errorinfo = $"机台[{testmarkmac.FCode}]装载程序[{programname}]异常:" + errorinfo;
  562. // loger.LogError(errorinfo);
  563. // return result;
  564. // }
  565. // return 1;
  566. // }
  567. // catch (Exception ex)
  568. // {
  569. // errorinfo = ex.Message.ToString();
  570. // return -1;
  571. // }
  572. //}
  573. /// <summary>
  574. /// 测试停机
  575. /// </summary>
  576. /// <returns></returns>
  577. [HttpGet]
  578. public EapResponse TestStopMachine()
  579. {
  580. var res = new EapResponse { Code = 1, Msg = string.Empty };
  581. IDatabase db = null;
  582. try
  583. {
  584. db = DbFactory.Base("eap");
  585. db.BeginTrans();
  586. AppserverHelper dal = new AppserverHelper();
  587. string maccode = "DA00004";
  588. int a = 18765;
  589. string errorinfo = "";
  590. int result = dal.StopMachine(db, new Machine() { ID = 768, FCode = "DA00004" }, ref errorinfo);
  591. db.Commit();
  592. return res;
  593. }
  594. catch (Exception e)
  595. {
  596. res.Code = -1;
  597. res.Msg = e.Message;
  598. return res;
  599. }
  600. finally
  601. {
  602. if (db != null)
  603. db.Close();
  604. }
  605. }
  606. [HttpGet]
  607. public async Task<string> TestDashboard()
  608. {
  609. string errorinfo = string.Empty;
  610. int count = 0;
  611. while (true)
  612. {
  613. if (count > 100)
  614. {
  615. return "执行完毕";
  616. }
  617. using (IDatabase db = DbFactory.Base("eapslave"))
  618. {
  619. var dal = new MacStatusTotalDal(db);
  620. dal.GetTotalInfo($" and f.id=8", null, "2022-01-19", "1", ref errorinfo);
  621. count++;
  622. Thread.Sleep(2 * 1000);
  623. }
  624. }
  625. }
  626. }
  627. }