doom4ster
2017-03-16 c2ca52370281338f658b7fae6d30f418dfda4d35
重覆3/6到3/15做的事情
修改9個檔案
205 ■■■■ 已變更過的檔案
CB_IMGPSScan.dproj 6 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan.ocx 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan.res 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan.ridl 10 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan.tlb 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScanImp.dcu 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScanImp.pas 179 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan_TLB.dcu 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan_TLB.pas 10 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan.dproj
@@ -93,8 +93,8 @@
                        <VersionInfo Name="AutoIncBuild">False</VersionInfo>
                        <VersionInfo Name="MajorVer">2</VersionInfo>
                        <VersionInfo Name="MinorVer">0</VersionInfo>
                        <VersionInfo Name="Release">0</VersionInfo>
                        <VersionInfo Name="Build">9</VersionInfo>
                        <VersionInfo Name="Release">1</VersionInfo>
                        <VersionInfo Name="Build">0</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.0.9</VersionInfoKeys>
                        <VersionInfoKeys Name="FileVersion">2.0.1.0</VersionInfoKeys>
                        <VersionInfoKeys Name="InternalName"/>
                        <VersionInfoKeys Name="LegalCopyright"/>
                        <VersionInfoKeys Name="LegalTrademarks"/>
CB_IMGPSScan.ocx
Binary files differ
CB_IMGPSScan.res
Binary files differ
CB_IMGPSScan.ridl
@@ -6,7 +6,7 @@
// However, when applying changes via the Editor this file will be regenerated
// and comments or formatting changes will be lost.
// ************************************************************************ //
// File generated on 2017/2/22 ¤U¤È 03:44:07 (- $Rev: 12980 $, 56349640).
// File generated on 2017/3/16 ¤W¤È 12:29:28 (- $Rev: 12980 $, 706234).
[
  uuid(F7D1C429-BE85-4FAD-A058-36A41C2AAA89),
@@ -314,6 +314,14 @@
    HRESULT _stdcall imgdelete([out, retval] BSTR* Value);
    [propput, id(0x000000FF)]
    HRESULT _stdcall imgdelete([in] BSTR Value);
    [propget, id(0x00000100)]
    HRESULT _stdcall isExternal([out, retval] BSTR* Value);
    [propput, id(0x00000100)]
    HRESULT _stdcall isExternal([in] BSTR Value);
    [propget, id(0x00000101)]
    HRESULT _stdcall check_main_form([out, retval] BSTR* Value);
    [propput, id(0x00000101)]
    HRESULT _stdcall check_main_form([in] BSTR Value);
  };
  [
CB_IMGPSScan.tlb
Binary files differ
CB_IMGPSScanImp.dcu
Binary files differ
CB_IMGPSScanImp.pas
@@ -404,6 +404,8 @@
    FFileSizeLimit:integer;//匯入單一檔案大小限  依業務別決定  以KB為單位  預設5*1024kb
    FCaseNoLength:integer;//案件編號長度檢查  依業務別決定   無預設  一定要傳入
    FImgDelete:string; // Y/N  有權限可在補件時刪除影像
    FIsExternal:string;//Y/N
    FCheck_main_form:string; //Y/N
    ////////傳入參數///////
    //********Http參數********
@@ -479,6 +481,8 @@
    NowShowFileList : TStringlist;  //目前顯示的影像清單
    NowSelectFileList : TStringlist; //目前被點選的影像清單
    GuideFormIDList : TStringlist; //要當導引頁表單清單
    LastInitFormidList:TStringList;
    LastAddFormidList:TstringList;
    //********清單區********
    //********顯示區********
@@ -820,6 +824,7 @@
    procedure PaintEvent(Sender: TObject);
    function GetCurrentVersionNo: String;
    procedure initParameter;
    procedure LastInitFormidListCreate(path:string);
  protected
    { Protected declarations }
    procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
@@ -935,6 +940,10 @@
    procedure Set_scancolor(const Value: WideString); safecall;
    function Get_imgdelete: WideString; safecall;
    procedure Set_imgdelete(const Value: WideString); safecall;
    function Get_check_main_form: WideString; safecall;
    function Get_isExternal: WideString; safecall;
    procedure Set_check_main_form(const Value: WideString); safecall;
    procedure Set_isExternal(const Value: WideString); safecall;
  public
    { Public declarations }
    procedure Initialize; override;
@@ -1544,6 +1553,9 @@
  Cust_DocNoList.Free; //自行定義文件名稱
  IN_WH_DocNoList.Free; //入庫的文件清單
  GuideFormIDList.Free; //要當導引頁表單清單
  LastInitFormidList.Free;
  LastAddFormidList.Free;
  //********清單區********
  if FEvents <> nil then FEvents.OnDestroy;
end;
@@ -3355,13 +3367,14 @@
      Showmessage(Format(_Msg('FormID:%s尚未註冊'),[SampleFormID]));
      Panel1.Enabled := True;
      Panel2.Enabled := True;
      DataLoading(false,false);
      Exit;
    end;
    SampleAnchorMode := FormID2Anchor(SampleFormID);
    Panel1.Enabled := False;
    Panel2.Enabled := False;
//ShowMessage('AAAAA');
    Try
      StatrTwainScan;
    Except
@@ -5455,6 +5468,12 @@
  Doc_Data,Doc_Data1 : String;
  In_Doc1,In_Doc2 : String;
  AttachYN : String; //是否有附件 Y:有 N:沒有
  ST1,ST2:TStringList;
  str1,str2:String;
  must_formidStr :string;
  last_add_formidstr :string;
  casepath:String;
begin
  Result := True;
  TransName := CaseID;
@@ -5500,13 +5519,71 @@
//ShowMessage('DDDDDDDDDD');
  //LoanDoc := 'Y';
  //產生遮罩影像
  if FWork_No = 'CW' then
    HaveMask := Case2Mask(Path,MaskPath);
//  if FWork_No = 'CW' then
//    HaveMask := Case2Mask(Path,MaskPath);
  //產生遮罩影像
 // S := S +#13+'5-->'+ Timetostr(now);
  ///////必要formid 20170315 start  //////////////////////////////
  must_formidStr:='';
  last_add_formidstr:='';
  ST1:=TStringList.Create;
  ST1.LoadFromFile(path+'FormCode_Name.dat');
//ShowMessage(ST1.Text);
  ST2:=TStringList.Create;
//ShowMessage('壓縮前');
  for I := 0 to ST1.Count - 1 do
  begin
    if (Pos('_',St1.Strings[i])<>1) and (Pos('_',St1.Strings[i])<>-11) then
    begin
      str1:=Copy(ST1.Strings[i],1,Pos('_',St1.Strings[i])-1);
      if ST2.IndexOf(str1) = -1 then
      begin
        ST2.Add(str1);
        must_formidStr:= must_formidStr+str1+'@#,';
      end;
    end;
  end;
  must_formidStr:=Copy(must_formidStr,1,Length(must_formidStr)-3) ;
  for I := 0 to LastInitFormidList.Count - 1 do
  begin
    if ST2.IndexOf(LastInitFormidList.Strings[i]) <> -1 then
    begin
      ST2.Delete(ST2.IndexOf(LastInitFormidList.Strings[i]));
    end;
  end;
  for I := 0 to ST2.Count - 1 do
  begin
    if i <> ST2.Count then
    begin
      last_add_formidstr:=last_add_formidstr+ST2.Strings[i]+'@#,';
    end
    else
    begin
      last_add_formidstr:=last_add_formidstr+ST2.Strings[i]
    end;
  end;
  ST1.Free;
  ST2.Free;
  ///////必要formid 20170315 end //////////////////////////
  ///保留外部影像  start///////////////////////////////
  casepath:= Copy(Path,1,pos('Upload',path)-1);
//ShowMessage('casepath='+casepath);
//FIsExternal:='Y';
  if (FMode='ESCAN') and (FIsExternal='Y') then
  begin
    if FileExists(casepath+'Download\FirstImg.zip') then
    begin
      CopyFile(PWChar(casepath+'Download\FirstImg.zip'),PWChar(path+'FirstImg.zip'),false);
    end
    else
    begin
      CopyFile(PWChar(casepath+'Download\'+CaseID+'.zip'),PWChar(path+'FirstImg.zip'),false);
    end;
  end;
  ///保留外部影像  end///////////////////////////////
  //////壓檔/////
  ZipMainFile(Path,Path,'Img.zip');
  if HaveMask then
@@ -5521,9 +5598,12 @@
  +'&doc_data='+HTTPEncode(UTF8Encode(Doc_Data))
  +'&doc_data1='+HTTPEncode(UTF8Encode(Doc_Data1))
  +'&attach='+AttachYN
  +'&must_formid='+must_formidStr  //擁有的 formid
  +'&last_add_formid='+last_add_formidstr   //當次新加的 formid
  +'&in_doc1='+HTTPEncode(UTF8Encode(In_Doc1))
  +'&in_doc2='+HTTPEncode(UTF8Encode(In_Doc2));
//ShowMessage('SendData='+SendData);
//exit;
  if not upFile(HTTPSClient,FUrl,'service/imgpsc/IMGPSC02/caseupload',SendData,'file',Path+'Img.zip',FReWrite,Memo1,False) then
  begin
    Showmessage(Format(_Msg('傳送案件編號(%s)檔案時,網路發生錯誤!!'+_Msg('錯誤代碼:')),[CaseID])+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason);
@@ -5782,7 +5862,7 @@
  EnCodeDateTime := En_DecryptionStr_Base64('E',ServerDate+GetBalance2Time(Balance),Mpskey);
  ///service/slic/SLIC04/case?data=&verify=&case_no=&file=
  SendData := 'data='+HTTPEncode(UTF8Encode(FData))+'&verify='+FVerify+'&case_no='+CaseID+'&file=';
ShowMessage(SendData);
//ShowMessage(SendData);
  if not dnFile_Get(HTTPSClient,Furl,'service/imgpsc/IMGPSC04/case',SendData,Path+CaseID+'.zip',FReWrite,Memo1,False,DownImgStatus) then
  begin
    HttpErrStr := _Msg('錯誤代碼:')+Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason;
@@ -5801,7 +5881,7 @@
    Result := False;
    Exit;
  end;
ShowMessage('sssss');
//ShowMessage('sssss');
  AttPath := Path + 'AttFile\';
  if FileExists(Path+CaseID+'.zip') then
  begin
@@ -7017,6 +7097,12 @@
    if FileExists(SoPath+'UseCase.ini') then
      ZipfileList.Add(SoPath+'UseCase.ini');
    if FileExists(SoPath+'FirstImg.zip') then//20170315 加的
    begin
      ZipfileList.Add(SoPath+'FirstImg.zip');
    end;
    ExeCuteZip(DePath+ZipName,SoPath,ZipFileList,False,False);
    //Showmessage('111');
  finally
@@ -7972,6 +8058,30 @@
  iDocNoList.Free;
  OldCaseInfoForm.Free;
  end;
end;
procedure TCB_IMGPSScanX.LastInitFormidListCreate(path: string);
var
  i:integer;
  ST1:TStringList;
  str1:string;
begin
//ShowMessage('path='+path);
  ST1:=TStringList.Create;
  ST1.LoadFromFile(path+'FormCode_Name.dat');
  for I := 0 to ST1.Count - 1 do
  begin
    if (Pos('_',St1.Strings[i])<>1) and (Pos('_',St1.Strings[i])<>-11) then
    begin
      str1:=Copy(ST1.Strings[i],1,Pos('_',St1.Strings[i])-1);
      if LastInitFormidList.IndexOf(str1) = -1 then
      begin
        LastInitFormidList.Add(str1);
      end;
    end;
  end;
  ST1.Free;
end;
procedure TCB_IMGPSScanX.LoadImgFile;  //載入新件及替換件
@@ -10365,15 +10475,20 @@
        begin
        end;
//ShowMessage('MainFormID='+MainFormID);
        if MainFormID = ''then
        begin
          //20131203 yuu說不檢查這個,先拿掉
          {if FMode <> 'SSCAN' then  //簽署章件會換主FormID,先跳過
          //20131203 yuu說不檢查這個,先拿掉   20170315 楷琳說未歸類要擋
          if FCheck_main_form='Y' then
          begin
            ErrStr:=_Msg('找不到分案文件');   //找不到主文件
            OMRErr2ini(CaseID,ErrStr,'','','','','','',False,False,True);
            CaseOk := false;
          end;}
            if (FMode <> 'SSCAN') and (Fmode <> 'ESCAN') then  //簽署章件會換主FormID,先跳過
            begin
              ErrStr:=_Msg('找不到分案文件');   //找不到主文件
              OMRErr2ini(CaseID,ErrStr,'','','','','','',False,False,True);
              CaseOk := false;
            end;
          end;
        end
        Else
        begin
@@ -12785,7 +12900,7 @@
  PageLVclear := True;
  InitialOk := False;
  FMode := 'DSCAN' ;
  //FMode := 'DSCAN' ;
  //FIs_In_Wh := 'Y';
  if FIs_In_Wh = 'Y' then
    AttName := 'Attach'  //入庫附件
@@ -12886,6 +13001,8 @@
  Cust_DocNoList := TStringlist.Create; //自行定義的文件名稱
  IN_WH_DocNoList := TStringlist.Create; //入庫的文件清單
  GuideFormIDList := TStringlist.Create; //要當導引頁表單清單
  LastInitFormidList :=TStringList.Create;
  LastAddFormidList := TStringList.Create;
  //********清單區********
  ShowText := _Msg('資料載入中,請稍候');
@@ -13057,6 +13174,7 @@
//        //LoadImgFile;
//      end;
      Create_Cust_DocDir(FCaseID); //產生外面傳入的文件
      LastInitFormidListCreate(ImageSavePath+FCaseID+'\Download\');
    end;
  end;
@@ -13188,12 +13306,6 @@
      s.Free;
      end;
    end;}
    //*******DOC必要文件檢核應該寫在這邊 START 20170222 ************
    //DocDir.dat 會含有DOC列表  所以上傳前要給檢查  有沒有少必要的DOC
    //並檢查 DOC 中 有沒有影像
    //*******DOC必要文件檢核應該寫在這邊 END************
    if (FMode = 'NSCAN') then
    begin
      /////訊問是否可上傳/////
@@ -13269,6 +13381,13 @@
  LoadImgFile;
  if (FMode = 'ESCAN') and (SuccessCount = 1) then
  begin
    if FEvents <> nil Then
    begin
      FEvents.OnClosePage;
    end;
  end;
  if (FMode = 'DSCAN') and (SuccessCount = 1) then
  begin
    if FEvents <> nil Then
    begin
@@ -14086,7 +14205,27 @@
procedure TCB_IMGPSScanX.Set_imgdelete(const Value: WideString);
begin
  FImgDelete:=Value;
end;
function TCB_IMGPSScanX.Get_check_main_form: WideString;
begin
end;
function TCB_IMGPSScanX.Get_isExternal: WideString;
begin
end;
procedure TCB_IMGPSScanX.Set_check_main_form(const Value: WideString);
begin
  FCheck_main_form := Value;
end;
procedure TCB_IMGPSScanX.Set_isExternal(const Value: WideString);
begin
  FIsExternal:=Value;
end;
initialization
CB_IMGPSScan_TLB.dcu
Binary files differ
CB_IMGPSScan_TLB.pas
@@ -12,7 +12,7 @@
// ************************************************************************ //
// $Rev: 17252 $
// File generated on 2017/2/22 ¤U¤È 03:44:05 from Type Library described below.
// File generated on 2017/3/16 ¤W¤È 12:29:25 from Type Library described below.
// ************************************************************************  //
// Type Lib: C:\Users\Hong\Desktop\Delphi2009_project\work_project\°ê®õ±M®×\°ê®õ©Ð¶U\±½´y¤¸¥óCB_IMGPSScan\20170208_³]¸mgit\CB_IMGPSScan (1)
@@ -228,6 +228,10 @@
    procedure Set_casenolength(const Value: WideString); safecall;
    function Get_imgdelete: WideString; safecall;
    procedure Set_imgdelete(const Value: WideString); safecall;
    function Get_isExternal: WideString; safecall;
    procedure Set_isExternal(const Value: WideString); safecall;
    function Get_check_main_form: WideString; safecall;
    procedure Set_check_main_form(const Value: WideString); safecall;
    property Visible: WordBool read Get_Visible write Set_Visible;
    property AutoScroll: WordBool read Get_AutoScroll write Set_AutoScroll;
    property AutoSize: WordBool read Get_AutoSize write Set_AutoSize;
@@ -287,6 +291,8 @@
    property filesizelimit: WideString read Get_filesizelimit write Set_filesizelimit;
    property casenolength: WideString read Get_casenolength write Set_casenolength;
    property imgdelete: WideString read Get_imgdelete write Set_imgdelete;
    property isExternal: WideString read Get_isExternal write Set_isExternal;
    property check_main_form: WideString read Get_check_main_form write Set_check_main_form;
  end;
// *********************************************************************//
@@ -355,6 +361,8 @@
    property filesizelimit: WideString dispid 253;
    property casenolength: WideString dispid 254;
    property imgdelete: WideString dispid 255;
    property isExternal: WideString dispid 256;
    property check_main_form: WideString dispid 257;
  end;
// *********************************************************************//