using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; using System.Threading; using Newtonsoft.Json; using Saraff.Twain; using HXX.Scanner.Socket; using HXX.Scanner.Common; namespace HXX.Scanner.Biz.Socket { /// /// 业务处理 每2秒报告扫描情况,废弃 /// public class biz_pushCompletedScan { public static void Work() { return; //if (config_environment.scan_type == ScanType.Formal || config_environment.scan_type == ScanType.Test_From_Web) //{ // Task.Run(() => // { // var batchNumber = config_environment.web_parameter.batchNumber; // var zipId = config_environment.web_parameter.zipId; // Thread.Sleep(2000); // while (config_environment.scan_state) // { // Thread.Sleep(1000); // SocketServerManager.Send_Family(config_environment.current_invoker, get_cmd(batchNumber, zipId).ToJson()); // } // Thread.Sleep(2000); // SocketServerManager.Send_Family(config_environment.current_invoker, get_cmd(batchNumber, zipId).ToJson()); // }); //} } private static cmd_pushCompletedScan get_cmd(string batchNumber, int zipId) { cmd_pushCompletedScan result = new cmd_pushCompletedScan(); result.action = "pushCompletedScan"; result.param = new subCmd_pushCompletedScan(); result.param.batchNumber = batchNumber; result.param.zipId = zipId; result.param.completedAmount = new biz_db().get_count_by_seq(batchNumber, zipId, config_environment.web_parameter.paperSchema); return result; } } }