From 068b44b1c01932ba35fcd7d44460bc9fa7ce0a6f Mon Sep 17 00:00:00 2001
From: doom4ster <doom4ster@gmail.com>
Date: 星期四, 16 三月 2017 10:50:36 +0800
Subject: [PATCH] OCX ver2.0.1.1

---
 CB_IMGPSScanImp.dcu |    0 
 CB_IMGPSScan.ocx    |    0 
 CB_IMGPSScan.dproj  |    4 ++--
 CB_IMGPSScan.res    |    0 
 CB_IMGPSScanImp.pas |   38 ++++++++++++++++++++++++++++++++++----
 5 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/CB_IMGPSScan.dproj b/CB_IMGPSScan.dproj
index 9aa0de4..97f1f69 100644
--- a/CB_IMGPSScan.dproj
+++ b/CB_IMGPSScan.dproj
@@ -94,7 +94,7 @@
 						<VersionInfo Name="MajorVer">2</VersionInfo>
 						<VersionInfo Name="MinorVer">0</VersionInfo>
 						<VersionInfo Name="Release">1</VersionInfo>
-						<VersionInfo Name="Build">0</VersionInfo>
+						<VersionInfo Name="Build">1</VersionInfo>
 						<VersionInfo Name="Debug">False</VersionInfo>
 						<VersionInfo Name="PreRelease">False</VersionInfo>
 						<VersionInfo Name="Special">False</VersionInfo>
@@ -106,7 +106,7 @@
 					<VersionInfoKeys>
 						<VersionInfoKeys Name="CompanyName"/>
 						<VersionInfoKeys Name="FileDescription"/>
-						<VersionInfoKeys Name="FileVersion">2.0.1.0</VersionInfoKeys>
+						<VersionInfoKeys Name="FileVersion">2.0.1.1</VersionInfoKeys>
 						<VersionInfoKeys Name="InternalName"/>
 						<VersionInfoKeys Name="LegalCopyright"/>
 						<VersionInfoKeys Name="LegalTrademarks"/>
diff --git a/CB_IMGPSScan.ocx b/CB_IMGPSScan.ocx
index 219da58..67957ee 100644
--- a/CB_IMGPSScan.ocx
+++ b/CB_IMGPSScan.ocx
Binary files differ
diff --git a/CB_IMGPSScan.res b/CB_IMGPSScan.res
index e6557d8..559b854 100644
--- a/CB_IMGPSScan.res
+++ b/CB_IMGPSScan.res
Binary files differ
diff --git a/CB_IMGPSScanImp.dcu b/CB_IMGPSScanImp.dcu
index 91bcee7..286fd56 100644
--- a/CB_IMGPSScanImp.dcu
+++ b/CB_IMGPSScanImp.dcu
Binary files differ
diff --git a/CB_IMGPSScanImp.pas b/CB_IMGPSScanImp.pas
index 9b04af0..a963e1f 100644
--- a/CB_IMGPSScanImp.pas
+++ b/CB_IMGPSScanImp.pas
@@ -825,6 +825,7 @@
     function GetCurrentVersionNo: String;
     procedure initParameter;
     procedure LastInitFormidListCreate(path:string);
+    function checkFormCodeIsCustom(path,formcode:string):boolean;
   protected
     { Protected declarations }
     procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
@@ -3648,8 +3649,8 @@
   str:='';
   for I := 1 to 11 do // 看 OMRErrInfo 的內容
   begin
-  str:=str+BoolToStr(OMRErrInfo[i].Display)+','
-          +BoolToStr(OMRErrInfo[i].Ignore)+','+OMRErrInfo[i].Info+','
+  str:=str+BoolToStr(OMRErrInfo[i].Display,true)+','
+          +BoolToStr(OMRErrInfo[i].Ignore,true)+','+OMRErrInfo[i].Info+','
           +OMRErrInfo[i].Mode+#10#13;
   end;
   ShowMessage('OMRErrInfo='+str);
@@ -5474,6 +5475,7 @@
   must_formidStr :string;
   last_add_formidstr :string;
   casepath:String;
+  filesizeInt:integer;
 begin
   Result := True;
   TransName := CaseID;
@@ -5584,6 +5586,10 @@
   end;
   ///保留外部影像  end///////////////////////////////
 
+  //file_size 計算  就先不做 20170316
+  filesizeInt:=0;
+
+
   //////壓檔/////
   ZipMainFile(Path,Path,'Img.zip');
   if HaveMask then
@@ -5598,6 +5604,7 @@
   +'&doc_data='+HTTPEncode(UTF8Encode(Doc_Data))
   +'&doc_data1='+HTTPEncode(UTF8Encode(Doc_Data1))
   +'&attach='+AttachYN
+  +'&file_size='+IntToStr(filesizeInt)
   +'&must_formid='+must_formidStr  //擁有的 formid
   +'&last_add_formid='+last_add_formidstr   //當次新加的 formid
   +'&in_doc1='+HTTPEncode(UTF8Encode(In_Doc1))
@@ -6442,6 +6449,27 @@
       Break;
     end;
   end;
+end;
+
+function TCB_IMGPSScanX.checkFormCodeIsCustom(path, formcode: string): boolean;
+var
+  i:integer;
+  ini : Tmeminifile;
+  str1:String;
+begin
+//ShowMessage(path);
+  ini := Tmeminifile.Create(Path+'CustomDocNo.ini');
+  str1:=ini.ReadString(Copy(formcode,1,8),'FormID','');
+//ShowMessage('str1'+str1);
+  if str1 = formcode then
+  begin
+    Result:=True;
+  end
+  else
+  begin
+    Result := False;
+  end;
+
 end;
 
 Function TCB_IMGPSScanX.CheckCaseID_OK:Boolean;  //檢查是否有未配號的案件
@@ -10481,7 +10509,7 @@
           //20131203 yuu說不檢查這個,先拿掉   20170315 楷琳說未歸類要擋
           if FCheck_main_form='Y' then
           begin
-            if (FMode <> 'SSCAN') and (Fmode <> 'ESCAN') then  //簽署章件會換主FormID,先跳過
+            if (FMode <> 'SSCAN') then  //簽署章件會換主FormID,先跳過
             begin
               ErrStr:=_Msg('找不到分案文件');   //找不到主文件
               OMRErr2ini(CaseID,ErrStr,'','','','','','',False,False,True);
@@ -10586,10 +10614,12 @@
         end }
         /////未註冊文件/////
         //////停用文件//
-        {Else} IF ModeNeedCheck(OMRErrInfo[9].Mode,FMode) and (not FormIDExists(FormCode,True,0)) then  //有停用的文件
+        {Else} IF ModeNeedCheck(OMRErrInfo[9].Mode,FMode) and (not FormIDExists(FormCode,True,0)) and (not checkFormCodeIsCustom(ImageSavePath + CaseID+'\upload\',FormCode)) then  //有停用的文件
         begin
+//ShowMessage('AAAA');
           ErrStr:=Format(OMRErrInfo[9].Info,[FormCode2FormName(CaseID,FormCode)]);   //有停用文件
           OMRErr2ini(CaseID,ErrStr,'','','','','','',False,OMRErrInfo[9].Ignore,OMRErrInfo[9].Display);
+//ShowMessage('ErrStr='+ErrStr);
           if OMRErrInfo[9].Display then
             CaseOk := false;
         end;

--
Gitblit v1.8.0