`

002_printAvailableJob.bat

 
阅读更多

 

call D:\s\setEnv_D.bat

ECHO.>printAvailable.log
IF EXIST printAvailableHistory.log GOTO :GO_PRINT_LOG
   ECHO.>printAvailableHistory.log
:GO_PRINT_LOG

CALL printReport.bat "AVAILABLE" "pap_feed.txt" "printAvailableFTP.dat" "printAvailable.log" > printAvailableJob.log

COPY /A printAvailableHistory.log+printAvailable.log

FIND /c "ERROR" printAvailable.log
IF NOT ERRORLEVEL 1 GOTO :NO_PRINT_LOG
FIND /c "AVAILABLE DONE" printAvailable.log
IF ERRORLEVEL 1 GOTO :NO_PRINT_LOG
GOTO :OK_PRINT_LOG

:NO_PRINT_LOG
CALL callPager.bat "D print available contract error!"

:OK_PRINT_LOG

DEL printAvailableFTP.log.bak
REN printAvailableFTP.log printAvailableFTP.log.bak
winscp.com /script=printAvailableFTP.dat /log=printAvailableFTP.log

IF ERRORLEVEL 1 GOTO :ERR_FTP_CHK
GOTO :OK_FTP_CHK

:ERR_FTP_CHK
CALL callPager.bat "D FTP available contract failed!"

:OK_FTP_CHK

ECHO.>printAvailableCheque.log
IF EXIST printAvailableChequeHistory.log GOTO :GO_PRINT_LOG
   ECHO.>printAvailableChequeHistory.log
:GO_PRINT_LOG

CALL printReport.bat "AVAILABLE_CHEQUE" "dc_avail_cheque_feed.txt" "printAvailableChequeFTP.dat" "printAvailableCheque.log" > printAvailableChequeJob.log

COPY /A printAvailableChequeHistory.log+printAvailableCheque.log

FIND /c "ERROR" printAvailableCheque.log
IF NOT ERRORLEVEL 1 GOTO :NO_PRINT_LOG
FIND /c "AVAILABLE_CHEQUE DONE" printAvailableCheque.log
IF ERRORLEVEL 1 GOTO :NO_PRINT_LOG
GOTO :OK_PRINT_LOG

:NO_PRINT_LOG
CALL callPager.bat "D print available cheque error!"

:OK_PRINT_LOG

DEL printAvailableChequeFTP.log.bak
REN printAvailableChequeFTP.log printAvailableChequeFTP.log.bak
winscp.com /script=printAvailableChequeFTP.dat /log=printAvailableChequeFTP.log

IF ERRORLEVEL 1 GOTO :ERR_FTP_CHK
GOTO :OK_FTP_CHK

:ERR_FTP_CHK
CALL callPager.bat "D FTP available cheque failed!"

:OK_FTP_CHK

pause

 callpager-------------

 

printReport--------------

REM Please work together with deliveryPath.properties!!

 

SET _CLASSPATH=.;%TOMCAT_HOME%\lib\common\msbase.jar;%TOMCAT_HOME%\lib\common\msutil.jar;%TOMCAT_HOME%\lib\common\mssqlserver.jar;%TOMCAT_HOME%\lib\common\iText.jar;%TOMCAT_HOME%\lib\common\mail.jar;%TOMCAT_HOME%\lib\common\activation.jar;%TOMCAT_HOME%\lib\common\poi-2.5.1-final-20040804.jar;%TOMCAT_HOME%\lib\common\classes12.jar

SET _MAINCLASS=m.h.delivery.PrintReportJob

 

 

%JAVA_HOME%\bin\java -cp %_CLASSPATH% %_MAINCLASS% %1 %2 %3 %4

 

pause

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics