private void StatTask(string typemodule, string archid, string archpos, string filename, string filepath, int archstat, string pages, int tagpage) { if (archstat <= (int)T_ConFigure.ArchStat.扫描完) { if (ftp.SaveRemoteFileUp(T_ConFigure.gArchScanPath, archpos, filepath, filename)) { Common.DelTask(Convert.ToInt32(archid)); Common.SetScanFinish(Convert.ToInt32(archid), Convert.ToInt32(pages), 1, archstat); try { File.Delete(filepath); Directory.Delete(Path.Combine(T_ConFigure.LocalTempPath, archpos)); } catch { } return; } } else if (archstat <= (int)T_ConFigure.ArchStat.排序完) { string pageinfo = ""; string[] Pagetmp; Dictionary <int, string> abc = new Dictionary <int, string>(); List <int> userid = new List <int>(); List <int> A0 = new List <int>(); List <int> A1 = new List <int>(); List <int> A2 = new List <int>(); List <int> A3 = new List <int>(); List <int> A4 = new List <int>(); ReadDict(Convert.ToInt32(archid), out abc, out Pagetmp); string time = DateTime.Now.ToString("yyyyMMddHHmmssfff"); string IndexFileName = time + Common.TifExtension; string RemoteDir = IndexFileName.Substring(0, 8); string LocalIndexFile = Path.Combine(@T_ConFigure.LocalTempPath, IndexFileName); if (!Himg._OrderSave(tagpage, Convert.ToInt32(pages), filepath, LocalIndexFile, abc, out pageinfo, out userid, out A0, out A1, out A2, out A3, out A4, Pagetmp)) { return; } else { int p0 = 0, p1 = 0, p2 = 0, p3 = 0, p4 = 0; for (int i = 0; i < userid.Count; i++) { int uid = userid[i]; int a0 = A0[i]; int a1 = A1[i]; int a2 = A2[i]; int a3 = A3[i]; int a4 = A4[i]; p0 += a0; p1 += a1; p2 += a2; p3 += a3; p4 += a4; Common.SetScanPage(Convert.ToInt32(archid), a0, a1, a2, a3, a4, uid); } Common.UpdaeImgPage(Convert.ToInt32(archid), p0, p1, p2, p3, p4); } if (ftp.SaveRemoteFileUp(T_ConFigure.FtpArchIndex, RemoteDir, LocalIndexFile, IndexFileName)) { Common.SetIndexFinish(Convert.ToInt32(archid), DESEncrypt.DesEncrypt(IndexFileName), archstat, pageinfo); Common.DelTask(Convert.ToInt32(archid)); try { File.Delete(filepath); File.Delete(LocalIndexFile); Directory.Delete(Path.Combine(T_ConFigure.LocalTempPath, archpos)); string file = Path.Combine(T_ConFigure.gArchScanPath, archpos, T_ConFigure.ScanTempFile); if (ftp.FtpCheckFile(file)) { ftp.FtpDelFile(file); } } catch { } return; } } else if (archstat == (int)T_ConFigure.ArchStat.质检完) { string RemoteDir = filename.Substring(0, 8); if (ftp.SaveRemoteFileUp(T_ConFigure.FtpArchSave, RemoteDir, filepath, filename)) { Common.DelTask(Convert.ToInt32(archid)); Common.SetCheckFinish(Convert.ToInt32(archid), DESEncrypt.DesEncrypt(filename), 1, (int)T_ConFigure.ArchStat.质检完); try { File.Delete(filepath); Directory.Delete(Path.GetDirectoryName(filepath)); } catch { } } } }