| | |
| | | tempInt:=0; |
| | | S := TStringlist.Create; |
| | | S2 := TStringlist.Create; |
| | | //ShowMessage('page='+IntToStr(Pages)); |
| | | try |
| | | S.LoadFromFile(ImageSavePath+CaseID+'\upload\Context.dat'); |
| | | S2.LoadFromFile(ImageSavePath+CaseID+'\upload\DocDir.dat'); //2017 1220 改成只承認第一份的 |
| | | |
| | | for I := 1 to pages do //從0到pages-1 改成 1到pages 20170316 這樣可以修改檢核的頁數問題 |
| | | begin |
| | | iPage := Add_Zoo(i,2); |
| | | for n := 0 to S.Count - 1 do |
| | | begin |
| | | |
| | | if (FWH_category='N') and (FIs_In_Wh='Y') then |
| | | begin |
| | | if ISExistImg(ImageSavePath+CaseID+'\upload\'+S.Strings[n]) then |
| | |
| | | Continue; |
| | | end; |
| | | end; |
| | | if Length(S2.Strings[n])>8 then //2017 1220 改成只承認第一份的 |
| | | |
| | | if (Length(S2.Strings[n])>8) and (Pos(DocNo,S2.Strings[n])<>0) then //2017 1220 改成只承認第一份的 |
| | | begin |
| | | //LogFile1.LogToFile(logTimeString+'有進'+docno+','+S2.Strings[n]+IntToStr(Pos(DocNo,S2.Strings[n]))); |
| | | v:=Pos('(',S2.Strings[n]); |
| | | v2:=Pos(')',S2.Strings[n]); |
| | | tempInt:=StrToInt(Copy(S2.Strings[n],v+1,v2-v-1)); |
| | |
| | | begin |
| | | docInt:=tempInt; |
| | | end; |
| | | |
| | | if docInt<>tempInt then |
| | | begin |
| | | Break |
| | | //LogFile1.LogToFile(logTimeString+'docInt='+IntToStr(docInt)+',tempInt='+IntToStr(tempInt)); |
| | | Result := Count; |
| | | Break; |
| | | end; |
| | | end; |
| | | |
| | | FormCode := FileName2FormCode(S.Strings[n]); |
| | | //LogFile1.LogToFile(logTimeString+'S.Strings[n]='+S.Strings[n]); |
| | | //Showmessage('1:'+version+','+FormCode2Version(FormCode)+','+DocNo+','+FormCode2DocNo(FormCode)+','+iPage+','+FormCode2Page(FormCode)); |
| | | //LogFile1.LogToFile(logTimeString+'FormCode='+FormCode); |
| | | LogFile1.LogToFile(logTimeString+'CheckCaseDocNoPage caseno='+CaseID+','+version+','+FormCode2Version(FormCode)+','+DocNo+','+FormCode2DocNo(FormCode)+','+iPage+','+FormCode2Page(FormCode)); |
| | | //ShowMessage(DocNo+','+IntToStr(docInt)+','+IntToStr(tempInt)); |
| | | //LogFile1.LogToFile(logTimeString+'FormCode='+FormCode); |
| | | if (version = FormCode2Version(FormCode)) and (DocNo = FormCode2DocNo(FormCode)) and (ipage = FormCode2Page(FormCode)) then |
| | | begin |
| | | LogFile1.LogToFile(logTimeString+'CheckCaseDocNoPage caseno='+CaseID+','+version+','+FormCode2Version(FormCode)+','+DocNo+','+FormCode2DocNo(FormCode)+','+iPage+','+FormCode2Page(FormCode)); |