From 1eaff9bbfd37549483bbc57011900dda1c11e908 Mon Sep 17 00:00:00 2001
From: doom4ster <doom4ster@gmail.com>
Date: 星期五, 15 十二月 2017 13:03:12 +0800
Subject: [PATCH] ver2.0.1.60 加log

---
 CB_IMGPSScanImp.pas |   92 +++++++++++++++++++++++++---------------------
 1 files changed, 50 insertions(+), 42 deletions(-)

diff --git a/CB_IMGPSScanImp.pas b/CB_IMGPSScanImp.pas
index a02ce81..f30b15c 100644
--- a/CB_IMGPSScanImp.pas
+++ b/CB_IMGPSScanImp.pas
@@ -1225,53 +1225,24 @@
   ST1,ST2,ST3,ST4:TStringList;
   i,j,k:Integer;
 begin
-//ShowMessage('casepath='+casepath);
+
   ST1:=TStringList.Create;
   ST2:=TStringList.Create;
   ST3:=TStringList.Create;
 
-//FImgDelete:='Y';
-  {if FileExists(casepath+'CaseDocNo.dat') then
-  begin
-    ST1.LoadFromFile(casepath+'CaseDocNo.dat');
-    for I := 0 to ST1.Count - 1 do
-    begin
-      ST2.LoadFromFile(casepath+ST1.Strings[i]+'\Context.dat');
-      for j := 0 to ST2.Count - 1 do
-      begin
-        ExistImgList.Add(casepath+ST1.Strings[i]+'\'+ST2.Strings[j])
-      end;
-    end;
-  end;
-
-  if FileExists(casepath+'S_Attach\Context.dat') then
-  begin
-    ST3.LoadFromFile(casepath+'S_Attach\Context.dat');
-    for I := 0 to ST3.Count - 1 do
-    begin
-      ExistImgList.Add(casepath+'S_Attach\'+ST3.Strings[i])
-    end;
-  end;
-
-  if FileExists(casepath+'Attach\Context.dat') then
-  begin
-    ST3.LoadFromFile(casepath+'Attach\Context.dat');
-    for I := 0 to ST3.Count - 1 do
-    begin
-      ExistImgList.Add(casepath+'Attach\'+ST3.Strings[i])
-    end;
-  end; }
   ExistImgList.Clear;
   ST1.LoadFromFile(casepath+'Download\Context.dat');
   for I := 0 to ST1.Count - 1 do
   begin
+LogFile1.LogToFile(logTimeString+casepath+'Download\'+ST1.Strings[i]+',MD5='+LoadFileGetMD5(casepath+'Download\'+ST1.Strings[i]));
     ExistImgList.Add(LoadFileGetMD5(casepath+'Download\'+ST1.Strings[i])) ;
   end;
+LogFile1.LogToFile(logTimeString+'ExistImgList.text'+ExistImgList.CommaText);
 
   ST1.Free;
   ST2.Free;
   ST3.Free;
-//ShowMessage('ExistImgList='+ExistImgList.Text);
+
 end;
 
 procedure TCB_IMGPSScanX.Initialize;
@@ -4061,8 +4032,8 @@
   //lb1.Caption:='AAAAAAAAAAA';
   //Showmessage(CreateDocnoFrom_Info(NowCaseno));
   //Showmessage(self.CreateCustDocNoFrom_Info(NowCaseno));
-  ShowMessage('FMaxUploadSize='+FMaxUploadSize);
-        initkscan;
+  //ShowMessage('FMaxUploadSize='+FMaxUploadSize);
+        //initkscan;
 	showmessage('FUrl='+FUrl+#10#13+
 	'FCaseID='+FCaseID+#10#13+
 	'FMode='+FMode+#10#13+
@@ -4093,7 +4064,8 @@
     'FImgDelete='+    FImgDelete+#10#13+
     'FIsExternal='+    FIsExternal+#10#13+
     'FWH_category='+FWH_category+
-    'FCheck_main_form='+    FCheck_main_form);
+    'FCheck_main_form='+    FCheck_main_form+#10#13+
+    'FMaxUploadSize='+FMaxUploadSize);
     //FImgDelete:='Y';
   LoadImgFile;
  { ShowMessage('UpLPoint='+IntToStr(UpLPoint.X)+','+IntToStr(UpLPoint.Y)+#10#13+
@@ -8465,6 +8437,7 @@
   CaseDocNo_CopiesList := TStringlist.Create;
   StrList := TStringlist.Create;
   ST1:=TStringList.Create;
+LogFile1.LogToFile(logTimeString+'產文件樹開始');
   try
     CaseNode.ImageIndex := 1;
     CaseNode.SelectedIndex := 1;
@@ -8485,7 +8458,8 @@
         FileList.LoadFromFile(ImageSavePath+Caseno+'\'+CaseDocNoList.Strings[i]+'\Context.dat');
       iDocNo := DocNoDir2DocNo(CaseDocNoList.Strings[i]);
       ST1.Clear;
-//ShowMessage(FileList.Text);
+
+LogFile1.LogToFile(logTimeString+'FileList.Text='+FileList.CommaText);
       if (FWH_category='N') and (FIs_In_Wh='Y') then
       begin
         for n := 0 to FileList.Count - 1 do
@@ -8505,11 +8479,9 @@
         end;
       end;
 
-
+LogFile1.LogToFile(logTimeString+'WH_category='+FWH_category+',Is_In_Wh='+FIs_In_Wh+',FileList.Text='+FileList.CommaText);
       if FileList.Count=0 then Continue;
 
-
-//Showmessage('aaa '+FileList.Text);
       DocNoCopies := Strtoint(CaseDocNo_CopiesList.Strings[i]);
       DocNoPage := FileList.Count;
       iDocNo := DocNoDir2DocNo(CaseDocNoList.Strings[i]);
@@ -8686,7 +8658,7 @@
         end;
       end;
     end;
-
+LogFile1.LogToFile(logTimeString+'產文件樹結束');
   Finally
   FileList.Free;
   CaseDocNoList.Free;
@@ -9221,7 +9193,7 @@
 
 function TCB_IMGPSScanX.logTimeString: String;
 begin
-Result:=FormatDateTime('yyyymmdd hh:mm:ss',now) +'  '
+Result:=FormatDateTime('yyyymmdd hh:mm:ss',now) +'  caseNo='+NowCaseno+'  ';
 end;
 
 Function TCB_IMGPSScanX.FindDivFormCode(FormCode:String):Boolean; //找有沒有分案的條碼
@@ -14293,6 +14265,8 @@
 
   ReduceLogFile;
 
+  LogFile1.LogToFile(logTimeString+'OCX取表data結束');
+
   ShowText := _Msg('資料載入中,請稍候');
   DataLoading(True,True);
 
@@ -14417,6 +14391,40 @@
 //ShowMessage('ImageSavePath='+ImageSavePath);
   DataLoading(False,False);
 
+  LogFile1.LogToFile(logTimeString+'OCX初始化結束');
+  LogFile1.LogToFile(logTimeString+'FUrl='+FUrl+
+	',FCaseID='+FCaseID+
+	',FMode='+FMode+
+	',FModeName='+FModeName+
+	',FWork_no='+FWork_no+
+	',FUserID='+FUserID+
+	',FUserName='+FUserName+
+	',FUserUnit='+FUserUnit+
+	',FData='+FData+
+	',FVerify='+FVerify+
+	',FReWrite='+FReWrite+
+	',FLanguage='+FLanguage+
+	',FLoanDoc_Value='+FLoanDoc_Value+
+	',FLoanDoc_Enable='+FLoanDoc_Enable+
+	',FUseProxy='+FUseProxy+
+	',FC_DocNoList='+FC_DocNoList+
+	',FC_DocNameList='+FC_DocNameList+
+	',FFixFileList='+FFixFileList+
+	',FIs_In_Wh='+FIs_In_Wh+
+	',FOldCaseInfo='+FOldCaseInfo+
+	',FPrintyn='+FPrintyn+
+	',FIs_OldCase='+FIs_OldCase+
+	',FCustDocYN='+FCustDocYN);
+  LogFile1.LogToFile(logTimeString+'FImgDPI='+IntToStr(FImgDPI)+
+    ',FScanColor='+    IntToStr(FScanColor)+
+    ',FFileSizeLimit='+  IntToStr(FFileSizeLimit)+
+    ',FCaseNoLength='+ IntToStr(FCaseNoLength)+
+    ',FImgDelete='+FImgDelete+
+    ',FIsExternal='+FIsExternal+
+    ',FWH_category='+FWH_category+
+    ',FCheck_main_form='+FCheck_main_form+
+    ',FMaxUploadSize='+FMaxUploadSize);
+
 end;
 
 procedure TCB_IMGPSScanX.Timer2Timer(Sender: TObject);

--
Gitblit v1.8.0