| | |
| | | end; |
| | | end; |
| | | //////主要非主要文件///// |
| | | //showmessage(MainFormID); |
| | | showmessage(MainFormID); |
| | | MainDocNo := FormCode2DocNo(MainFormID); |
| | | MainVersion := FormCode2Version(MainFormID); |
| | | if FindSQLData(DM_FORM_INF_List,'DEPE_FORM_ID,MUTEX_FORM_ID','MAIN_FORM_ID,DOC_VERSION',MainDocNo+','+MainVersion,0,FindResult) then |
| | |
| | | end; |
| | | end; |
| | | //////互斥文件///// |
| | | end; |
| | | end; //MainFormID結束 |
| | | //end; |
| | | List.LoadFromFile(ImageSavePath + CaseID+'\upload\Context.dat'); |
| | | for i := 0 to List.Count - 1 do |
| | |
| | | LogFile1.LogToFile(logTimeString+'必填 '+CaseID+' '+'OMRFileList.Text='+OMRFileList.Text); |
| | | For i := 0 to OMRFileList.Count - 1 do |
| | | begin |
| | | //ShowMessage('OMRFileList.Strings['+IntToStr(i)+']'+OMRFileList.Strings[i]); |
| | | if CheckRequiredColumnValues(FWork_NO,CaseID) then Continue; |
| | | |
| | | // if FWH_category='N' then |
| | | // begin |
| | | // if ISExistImg(ImageSavePath+CaseID+'\upload\'+OMRFileList.Strings[i]) then |
| | | // begin |
| | | // Continue; |
| | | // end; |
| | | // end; |
| | | OMRFile := OMRFileList.Strings[i]; |
| | | OMRFormCode := FileName2FormCode(OMRFileList.Strings[i]); |
| | | OMRFormName := FormCode2FormName(CaseID,OMRFormCode); |
| | |
| | | ////依十字定位點縮放/// |
| | | //Display1.Lines.Add('OMRFile='+OMRFile+',OMRFormCode='+OMRFormCode+',OMRFormName='+OMRFormName); |
| | | LogFile1.LogToFile(logTimeString+'OMRFile='+OMRFile+',OMRFormCode='+OMRFormCode+',OMRFormName='+OMRFormName); |
| | | //ShowMessage('KKKKK'); |
| | | if not FileExists(CheckXmlPath+OMRFormCode+'.xml') then //沒有Xml就不用檢核 |
| | | Continue; |
| | | |
| | | |
| | | //ShowMessage('11638 OMRFileList.Strings['+IntToStr(i)+']'+OMRFileList.Strings[i]); |
| | | XT := TXmltool.Create(CheckXmlPath+OMRFormCode+'.xml'); |
| | | RelaXT := TXmltool.Create; |
| | | //ShowMessage('ModeNeedCheck='+BoolToStr(ModeNeedCheck(OMRErrInfo[4].Mode,FMode),true)); |
| | |
| | | Until not XT.SubNodes['/form/settype1/'].Next ; |
| | | end; |
| | | //*******必填******** |
| | | |
| | | //ShowMessage('11692 OMRFileList.Strings['+IntToStr(i)+']'+OMRFileList.Strings[i]); |
| | | //if AllCheck then |
| | | //begin |
| | | //*******有值相關文件的欄位也要有值******* |
| | |
| | | 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 抓相關然欄位所在圖檔的定位 |
| | | //ShowMessage(RelaFile); |
| | | //ShowMessage(ImageSavePath+CaseID+'\upload\'+RelaFile); |
| | | if RelaFile<>'' then |
| | | begin |
| | | 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 抓相關然欄位所在圖檔的定位 |
| | | end; |
| | | |
| | | OMROK := False; |
| | | //OMROK := False; |
| | | //if RelaXT.SubNodes['/form/settype2/'].First then |
| | |
| | | Until not XT.SubNodes['/form/settype3/'].Next ; |
| | | end; |
| | | //*******有值相關文件的欄位也要有值******* |
| | | //ShowMessage('11788 OMRFileList.Strings['+IntToStr(i)+']'+OMRFileList.Strings[i]); |
| | | |
| | | //*******有值相關文件的欄位不能有值******* |
| | | if ModeNeedCheck(OMRErrInfo[11].Mode,FMode) then //是否要檢核 |
| | |
| | | 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 抓相關然欄位所在圖檔的定位 |
| | | |
| | | if RelaFile<>'' then |
| | | begin |
| | | 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 抓相關然欄位所在圖檔的定位 |
| | | end; |
| | | |
| | | OMROK := False; |
| | | //OMROK := False; |
| | | //if RelaXT.SubNodes['/form/settype2/'].First then |
| | |
| | | end; |
| | | //*******有值相關文件的欄位不能有值******* |
| | | |
| | | |
| | | //ShowMessage('11889 OMRFileList.Strings['+IntToStr(i)+']'+OMRFileList.Strings[i]); |
| | | |
| | | //*******有值相依文件******* |
| | | if ModeNeedCheck(OMRErrInfo[5].Mode,FMode) then //是否要檢核 |
| | |
| | | RelaXT.Free; |
| | | end; |
| | | end; |
| | | //必填迴圈結束 |
| | | Finally |
| | | ValueXT.Free; |
| | | end; |