doom4ster
2017-08-15 18c81dee7ca13b13078cd8adc4eccab7a7c3ad89
CB_IMGPSScan.cab ver2.0.1.32  修正檢核相關欄位時的定位偏差
修改5個檔案
33 ■■■■ 已變更過的檔案
CB_IMGPSScan.dproj 4 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan.ocx 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan.res 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScanImp.dcu 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScanImp.pas 29 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan.dproj
@@ -95,7 +95,7 @@
                        <VersionInfo Name="MajorVer">2</VersionInfo>
                        <VersionInfo Name="MinorVer">0</VersionInfo>
                        <VersionInfo Name="Release">1</VersionInfo>
                        <VersionInfo Name="Build">31</VersionInfo>
                        <VersionInfo Name="Build">32</VersionInfo>
                        <VersionInfo Name="Debug">False</VersionInfo>
                        <VersionInfo Name="PreRelease">False</VersionInfo>
                        <VersionInfo Name="Special">False</VersionInfo>
@@ -107,7 +107,7 @@
                    <VersionInfoKeys>
                        <VersionInfoKeys Name="CompanyName"/>
                        <VersionInfoKeys Name="FileDescription"/>
                        <VersionInfoKeys Name="FileVersion">2.0.1.31</VersionInfoKeys>
                        <VersionInfoKeys Name="FileVersion">2.0.1.32</VersionInfoKeys>
                        <VersionInfoKeys Name="InternalName"/>
                        <VersionInfoKeys Name="LegalCopyright"/>
                        <VersionInfoKeys Name="LegalTrademarks"/>
CB_IMGPSScan.ocx
Binary files differ
CB_IMGPSScan.res
Binary files differ
CB_IMGPSScanImp.dcu
Binary files differ
CB_IMGPSScanImp.pas
@@ -4682,7 +4682,7 @@
//ShowMessage('Xdpi='+IntToStr(Xdpi)+#10#13+'Ydpi='+IntToStr(Ydpi)+#10#13+'H='+IntToStr(H)+#10#13+'W='+IntToStr(W)+#10#13);
//ShowMessage('Site='+Site);
    OMRRect := CM_Str2Rect(Site,Xdpi,UpLPoint);
//ShowMessage(IntToStr(OMRRect.Left)+#10#13+IntToStr(OMRRect.top)+#10#13+IntToStr(OMRRect.Right)+#10#13+IntToStr(OMRRect.Bottom));
Display1.Lines.Add('UpLPoint=('+IntToStr(UpLPoint.X)+','+IntToStr(UpLPoint.Y)+');'+Site+';'+IntToStr(OMRRect.Left)+','+IntToStr(OMRRect.top)+','+IntToStr(OMRRect.Right)+','+IntToStr(OMRRect.Bottom));
    if OMRRect.Left < 0 then
      OMRRect.Left := 0;
    if OMRRect.Top < 0  then
@@ -4694,6 +4694,7 @@
    result := Get_OMR(ISB_BW.Graphic,OMRRect);
//ShowMessage('result='+IntToStr(result));
  end;
end;
@@ -5719,7 +5720,7 @@
    DW := GetFindResult('T1.FORM_WIDTH');
    ANCHOR := UpperCase(GetFindResult('T1.ANCHOR'));
    ANCHOR := Index2Anchor(ANCHOR);
//showmessage(FormID+#13+DH+#13+DW+#13);
Display1.Lines.Add(FormID+','+DH+','+DW);
//ShowMessage('AAAAAAAAA');
    if ((ANCHOR = 'ANCHOR') or (ANCHOR = 'FRAME')) and (DH <> '') and (DW <> '') then  //有十字定位點
    begin
@@ -10878,6 +10879,8 @@
  OMROkCount : Integer;
  //Casecheck : Boolean;  //是否要做檢核
  //AllCheck : Boolean;  //是否要做完整檢核
  ISB8W,ISB8H:integer;
begin
  ///OMRErrInfo  1: 必要文件  2:相依文件 3:互斥文件  4:必填 5:欄位有值附文件  6:欄位有值不附文件
  ///            7: 欄位有值相關欄位也要有值  8:欄位有值要寫備註 9:停用日期 10:最大頁數
@@ -11104,6 +11107,7 @@
                    //Showmessage(ColCName +','+ inttostr(OMRMpsV1.GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site))+','+inttostr(Pixel + SafePixel));
//SafePixel:=90000;
Display1.Lines.Add(ColEName+' '+ColCName+'   圖像實際點數='+IntToStr(GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt))+' 設定點數='+IntToStr( (Pixel + SafePixel)));
//FindPoint(ISB_BW.Graphic,UpLPoint,UpRPoint,DownLPoint,ANCHOR);
                    if GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt) > (Pixel + SafePixel)  then
                    begin
                      //Showmessage('oh');
@@ -11164,6 +11168,11 @@
                      RelaFormName := FormCode2FormName(CaseID,RelaFormCode);
                      Anchor1 := FormID2Anchor(RelaFormCode);
                      RelaXT.LoadFromFile(CheckXmlPath+RelaFormCode+'.xml');
Display1.Lines.Add(RelaFile+','+RelaFormName);
                      ISB8.LoadFromFile(ImageSavePath+CaseID+'\upload\'+RelaFile,1); //20170815
                      ISB8W:= ISB8.Graphic.Width;
                      ISB8H:= ISB8.Graphic.Height;
                      FindPoint(ISB8.Graphic,UpLPoint,UpRPoint,DownLPoint,ISB8W,ISB8H,ANCHOR);  //20170815  抓相關然欄位所在圖檔的定位
                      OMROK := False;
                      //OMROK := False;
                      //if RelaXT.SubNodes['/form/settype2/'].First then
@@ -11190,12 +11199,12 @@
                                OMROK := True;
                                Break;
                              end;
                              ///依十字定位點縮放////
                              ImageReSize_FormID(CaseID,OMRFile); //20170815 重新抓定位
                              ////依十字定位點縮放////
                            end;
                          end;
                          //Else
                          //begin
                            //ColCName := XT['/form/settype1/'+ColEName+'/'+nodename+'/'];
                          //end;
                        Until not RelaXT.SubNodes['/form/settype2/'+RelaColEName+'/'].Next;
                        if not OMROk then
                        begin
@@ -11256,6 +11265,10 @@
                    RelaFormName := FormCode2FormName(CaseID,RelaFormCode);
                    Anchor1 := FormID2Anchor(RelaFormCode);
                    RelaXT.LoadFromFile(CheckXmlPath+RelaFormCode+'.xml');
                    ISB8.LoadFromFile(ImageSavePath+CaseID+'\upload\'+RelaFile,1); //20170815
                    ISB8W:= ISB8.Graphic.Width;
                    ISB8H:= ISB8.Graphic.Height;
                    FindPoint(ISB8.Graphic,UpLPoint,UpRPoint,DownLPoint,ISB8W,ISB8H,ANCHOR);  //20170815  抓相關然欄位所在圖檔的定位
                    OMROK := False;
                    //OMROK := False;
                    //if RelaXT.SubNodes['/form/settype2/'].First then
@@ -11277,13 +11290,15 @@
                          if  FileExists(ImageSavePath+CaseID+'\upload\'+RelaFile) then
                          begin
 Display1.Lines.Add(ColEName+' '+ColCName+'   圖像實際點數='+IntToStr(GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt))+' 設定點數='+IntToStr( (Pixel + SafePixel)));
                            if GetSiteOMR(ImageSavePath+CaseID+'\upload\'+RelaFile,RelaSite,Bt) > (RelaPixel + SafePixel)  then
                            begin
                              inc(OMROkCount);
                              //OMROK := True;
                              //Break;
                            end;
                            ///依十字定位點縮放////
                            ImageReSize_FormID(CaseID,OMRFile);
                            ////依十字定位點縮放////
                          end;
                        end;
                        //Else