biz_pushCompletedScan.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.IO;
  7. using System.Threading;
  8. using Newtonsoft.Json;
  9. using Saraff.Twain;
  10. using HXX.Scanner.Socket;
  11. using HXX.Scanner.Common;
  12. namespace HXX.Scanner.Biz.Socket
  13. {
  14. /// <summary>
  15. /// 业务处理 每2秒报告扫描情况,废弃
  16. /// </summary>
  17. public class biz_pushCompletedScan
  18. {
  19. public static void Work()
  20. {
  21. return;
  22. //if (config_environment.scan_type == ScanType.Formal || config_environment.scan_type == ScanType.Test_From_Web)
  23. //{
  24. // Task.Run(() =>
  25. // {
  26. // var batchNumber = config_environment.web_parameter.batchNumber;
  27. // var zipId = config_environment.web_parameter.zipId;
  28. // Thread.Sleep(2000);
  29. // while (config_environment.scan_state)
  30. // {
  31. // Thread.Sleep(1000);
  32. // SocketServerManager.Send_Family(config_environment.current_invoker, get_cmd(batchNumber, zipId).ToJson());
  33. // }
  34. // Thread.Sleep(2000);
  35. // SocketServerManager.Send_Family(config_environment.current_invoker, get_cmd(batchNumber, zipId).ToJson());
  36. // });
  37. //}
  38. }
  39. private static cmd_pushCompletedScan get_cmd(string batchNumber, int zipId)
  40. {
  41. cmd_pushCompletedScan result = new cmd_pushCompletedScan();
  42. result.action = "pushCompletedScan";
  43. result.param = new subCmd_pushCompletedScan();
  44. result.param.batchNumber = batchNumber;
  45. result.param.zipId = zipId;
  46. result.param.completedAmount = new biz_db().get_count_by_seq(batchNumber, zipId, config_environment.web_parameter.paperSchema);
  47. return result;
  48. }
  49. }
  50. }