postplus 제거, 차량정원 체크 추가
parent
9a7ae6d2dc
commit
43bb16039d
@ -0,0 +1,129 @@
|
|||||||
|
// 전자우편 발송 등록 전 오류 자료가 존재하는지 체크
|
||||||
|
//사진파일 체크
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if FieldByName('MM_CARNO').AsString = '' then
|
||||||
|
begin
|
||||||
|
sm('차량번호가 공란인 내역이 있습니다.' + #13 + '차량번호를 입력해주세요.');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if FieldByName('GP_ACCOUNT_NO').AsString = '' then
|
||||||
|
begin
|
||||||
|
sm('가상계좌가 공란인 내역이 있습니다.' + #13 + '가상계좌를 입력해주세요.');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if FieldByName('GP_ERC_NO').AsString = '' then
|
||||||
|
begin
|
||||||
|
sm('전자납부번호가 공란인 내역이 있습니다.' + #13 + '전자납부번호를 입력해주세요.');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if FieldByName('GP_JUSO').AsString = '' then
|
||||||
|
begin
|
||||||
|
sm('주소가 공란인 내역이 있습니다.' + #13 + '주소를 입력해주세요.');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if (FieldByName('GP_TAXNO').AsString = '') and
|
||||||
|
((copy(CPSystem_Info.Sido_Code,1,2) = '11') or (debug_level = 4)) then
|
||||||
|
begin
|
||||||
|
sm('과세번호가 공란인 내역이 있습니다.' + #13 + '과세번호를 입력해주세요.');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
img_chk := 0;
|
||||||
|
imcode := fieldbyname('MM_code').AsString;
|
||||||
|
// sm(fieldbyname('MM_code').AsString+#13+fieldbyname('MM_imagecnt').AsString);
|
||||||
|
sgg_code := Copy(imcode, 1, 5); //시군구
|
||||||
|
YearPath := Copy(imcode, 6, 4); //년도
|
||||||
|
if fieldbyname('MM_imagecnt').Asinteger = 1 then
|
||||||
|
begin
|
||||||
|
if sFtp.isFileExists(sFtp.FtpRootDir + sgg_code + '/' + YearPath + '/' + fieldbyname('MM_code').AsString+'A.jpg') then
|
||||||
|
inc(img_chk);
|
||||||
|
end
|
||||||
|
else if fieldbyname('MM_imagecnt').Asinteger = 2 then
|
||||||
|
begin
|
||||||
|
if sFtp.isFileExists(sFtp.FtpRootDir + sgg_code + '/' + YearPath + '/' + fieldbyname('MM_code').AsString+'A.jpg') then
|
||||||
|
inc(img_chk);
|
||||||
|
if sFtp.isFileExists(sFtp.FtpRootDir + sgg_code + '/' + YearPath + '/' + fieldbyname('MM_code').AsString+'B.jpg') then
|
||||||
|
inc(img_chk);
|
||||||
|
end else if fieldbyname('MM_imagecnt').Asinteger = 3 then
|
||||||
|
begin
|
||||||
|
if sFtp.isFileExists(sFtp.FtpRootDir + sgg_code + '/' + YearPath + '/' + fieldbyname('MM_code').AsString+'A.jpg') then
|
||||||
|
inc(img_chk);
|
||||||
|
if sFtp.isFileExists(sFtp.FtpRootDir + sgg_code + '/' + YearPath + '/' + fieldbyname('MM_code').AsString+'B.jpg') then
|
||||||
|
inc(img_chk);
|
||||||
|
if sFtp.isFileExists(sFtp.FtpRootDir + sgg_code + '/' + YearPath + '/' + fieldbyname('MM_code').AsString+'C.jpg') then
|
||||||
|
inc(img_chk);
|
||||||
|
end else if fieldbyname('MM_imagecnt').Asinteger = 4 then
|
||||||
|
begin
|
||||||
|
if sFtp.isFileExists(sFtp.FtpRootDir + sgg_code + '/' + YearPath + '/' + fieldbyname('MM_code').AsString+'A.jpg') then
|
||||||
|
inc(img_chk);
|
||||||
|
if sFtp.isFileExists(sFtp.FtpRootDir + sgg_code + '/' + YearPath + '/' + fieldbyname('MM_code').AsString+'B.jpg') then
|
||||||
|
inc(img_chk);
|
||||||
|
if sFtp.isFileExists(sFtp.FtpRootDir + sgg_code + '/' + YearPath + '/' + fieldbyname('MM_code').AsString+'C.jpg') then
|
||||||
|
inc(img_chk);
|
||||||
|
if sFtp.isFileExists(sFtp.FtpRootDir + sgg_code + '/' + YearPath + '/' + fieldbyname('MM_code').AsString+'D.jpg') then
|
||||||
|
inc(img_chk);
|
||||||
|
end;
|
||||||
|
|
||||||
|
//sm(FindField('MM_imagecnt').Asstring+#13+inttostr(img_chk));
|
||||||
|
//sm(sFtp.FtpRootDir);
|
||||||
|
|
||||||
|
if img_chk <> fieldbyname('MM_imagecnt').Asinteger then
|
||||||
|
begin
|
||||||
|
sm('사진파일 검사 중'+#13+ '차량번호 : '+ fieldbyname('MM_carno').AsString +'('+ fieldbyname('MM_code').AsString+')'+
|
||||||
|
'의 사진이 서버에 저장되지 않았습니다.'+#13+
|
||||||
|
'서버로 사진을 재전송 처리후 발송하시기 바랍니다.');
|
||||||
|
//sm(sFtp.FtpRootDir + sgg_code + '/' + YearPath + '/' + fieldbyname('MM_code').AsString);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//사진파일 체크
|
||||||
|
with cdDetail do begin
|
||||||
|
|
||||||
|
IndexDefs.Clear;
|
||||||
|
IndexDefs.Add('IDX_GP_MM_CARNO_ASC' , 'GP_MM_CARNO;MM_CODE' , []);
|
||||||
|
IndexName := 'IDX_GP_MM_CARNO_ASC';
|
||||||
|
//IndexFieldNames := 'MM_CODE';
|
||||||
|
lblSort.Caption := '정렬 : 차량번호';
|
||||||
|
lblSeek.Caption := '차량번호 검색';
|
||||||
|
|
||||||
|
First;
|
||||||
|
DisableControls;
|
||||||
|
|
||||||
|
LVY_NO_Cnt := 0;
|
||||||
|
ERC_NO_Cnt := 0;
|
||||||
|
ACCOUNT_NO_Cnt := 0;
|
||||||
|
while not eof do begin
|
||||||
|
if FieldByName('MC_LVY_NO').AsString = '' then Inc(LVY_NO_Cnt);
|
||||||
|
if FieldByName('MC_ERC_NO').AsString = '' then Inc(ERC_NO_Cnt);
|
||||||
|
if FieldByName('MC_ACCOUNT_NO').AsString = '' then Inc(ACCOUNT_NO_Cnt);
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
EnableControls;
|
||||||
|
if LVY_NO_Cnt > 0 then
|
||||||
|
begin
|
||||||
|
Msg_Warning('출력불가' + #13 +
|
||||||
|
'부과번호가 발취 안된 자료가 ' + IntToStr(LVY_NO_Cnt) + ' 건 있습니다.');
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ERC_NO_Cnt > 0 then
|
||||||
|
begin
|
||||||
|
Msg_Warning('출력불가' + #13 +
|
||||||
|
'전자납부번호가 발취 안된 자료가 ' + IntToStr(ERC_NO_Cnt) + ' 건 있습니다.');
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if ACCOUNT_NO_Cnt > 0 then
|
||||||
|
begin
|
||||||
|
Msg_Warning('출력불가' + #13 +
|
||||||
|
'가상계좌가 발취 안된 자료가 ' + IntToStr(ACCOUNT_NO_Cnt) + ' 건 있습니다.');
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
Loading…
Reference in New Issue