| | |
| | | //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 |
| | |
| | | |
| | | result := Get_OMR(ISB_BW.Graphic,OMRRect); |
| | | //ShowMessage('result='+IntToStr(result)); |
| | | |
| | | end; |
| | | end; |
| | | |
| | |
| | | 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 |
| | |
| | | OMROkCount : Integer; |
| | | //Casecheck : Boolean; //是否要做檢核 |
| | | //AllCheck : Boolean; //是否要做完整檢核 |
| | | |
| | | ISB8W,ISB8H:integer; |
| | | begin |
| | | ///OMRErrInfo 1: 必要文件 2:相依文件 3:互斥文件 4:必填 5:欄位有值附文件 6:欄位有值不附文件 |
| | | /// 7: 欄位有值相關欄位也要有值 8:欄位有值要寫備註 9:停用日期 10:最大頁數 |
| | |
| | | //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'); |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | 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 |