`

001_uploadSMCHB.bat

 
阅读更多

 

uploadSMCHB.bat - Shortcut
--------------
call setenv_xxx.bat
CALL checkSMCFile
CALL runImport
CALL backSMCFile
IF EXIST importCheck.OK GOTO :ok_import_chk
   CALL callPager.bat " SMC import error!"
:ok_import_chk

CALL gift_print
CALL gift_ftp
IF EXIST smcftpCheck.OK GOTO :ok_ftp_chk
   CALL callPager.bat " SMC FTP error!"
:ok_ftp_chk
pause

 setenv_xxx.bat-------------------

 

SET TOMCAT_HOME=D:\tomcat

SET JAVA_HOME=D:\jdk1.3

 

DEL D:\tomcat\webapps\d\WEB-INF\classes\reports\*.pdf

DEL D:\tomcat\webapps\d\WEB-INF\classes\reports\*.txt

DEL D:\tomcat\webapps\d\WEB-INF\classes\reports\*.dat

 

REM HB

IF EXIST D:\FTP\H.TXT GOTO :ok_hkp_smc

   REM CALL callPager.bat "No HKP SMCHB feed!"

   REM CALL createDummy.bat D:\FTP\H.TXT

:ok_hkp_smc

 

IF EXIST D:\FTP\U.TXT GOTO :ok_uvp_smc

   REM CALL callPager.bat "No UVP SMCHB feed!"

   REM CALL createDummy.bat D:\FTP\U.TXT

:ok_uvp_smc

 

REM GIFT

IF EXIST D:\FTP\C.TXT GOTO :ok_gift_smc

   REM CALL callPager.bat "No Campaign Gift feed!"

   CALL createDummy.bat D:\FTP\C.TXT

:ok_gift_smc

 

createDummy.bat--------------------------

REM Please work together with d.properties!!

 

SET _CLASSPATH=.;%TOMCAT_HOME%\lib\common\mm.mysql.jdbc-1.2c.jar;%TOMCAT_HOME%\lib\common\iText.jar

SET _MAINCLASS=m.CreateDummy

 

%JAVA_HOME%\bin\java -cp %_CLASSPATH% %_MAINCLASS% %1

 

checkSMCFile------------

DEL D:\tomcat\webapps\d\WEB-INF\classes\reports\*.pdf

DEL D:\tomcat\webapps\d\WEB-INF\classes\reports\*.txt

DEL D:\tomcat\webapps\d\WEB-INF\classes\reports\*.dat

 

REM HB

IF EXIST D:\FTP\H.TXT GOTO :ok_hkp_smc

   REM CALL callPager.bat "No HKP SMCHB feed!"

   REM CALL createDummy.bat D:\FTP\H.TXT

:ok_hkp_smc

 

IF EXIST D:\FTP\U.TXT GOTO :ok_uvp_smc

   REM CALL callPager.bat "No UVP SMCHB feed!"

   REM CALL createDummy.bat D:\FTP\U.TXT

:ok_uvp_smc

 

REM GIFT

IF EXIST D:\FTP\C.TXT GOTO :ok_gift_smc

   REM CALL callPager.bat "No Campaign Gift feed!"

   CALL createDummy.bat D:\FTP\C.TXT

:ok_gift_smc

 

reimport-----------------------

DEL importCheck.OK

 

REM Please work together with dPath.properties!!

REM SET _CLASSPATH=.;%TOMCAT_HOME%\lib\common\mm.mysql.jdbc-1.2c.jar;%TOMCAT_HOME%\lib\common\iText.jar

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\classes12.jar

 

SET _MAINCLASS=m.hk.d.feedimportmanager.SMCPEPEntitledFeedManager

%JAVA_HOME%\bin\java -cp %_CLASSPATH% %_MAINCLASS%  > runImportPEP.log

 

SET _MAINCLASS=m.hk.d.feedimportmanager.ChequedFeedManager

%JAVA_HOME%\bin\java -cp %_CLASSPATH% %_MAINCLASS%  > runImportCheque.log

 

:OK_IMPORT_LOG

ECHO. > importCheck.OK

 

backSMCFile------------ 

DEL D:\FTP\*.SMC

REM HB

IF NOT EXIST D:\FTP\H.TXT GOTO :no_hkp_smc

   REN D:\FTP\H.TXT H.SMC

:no_hkp_smc

 

IF NOT EXIST D:\FTP\U.TXT GOTO :no_uvp_smc

   REN D:\FTP\U.TXT U.SMC

:no_uvp_smc

gift_print------------------

REM Please work together with Path.properties!!

REM SET _CLASSPATH=.;%TOMCAT_HOME%\lib\common\mm.mysql.jdbc-1.2c.jar;%TOMCAT_HOME%\lib\common\iText.jar

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\classes12.jar

SET _MAINCLASS=m.hk..printmanager.PrintGiftCollectionNoticeManager

 

%JAVA_HOME%\bin\java -cp %_CLASSPATH% %_MAINCLASS%  > gift_print.log

 

find /c "Missing agent email" gift_print.log

if errorlevel 1 goto :OK_PRINT_LOG

CALL callPager.bat "D SMC no agent email error!"

 

:OK_PRINT_LOG

 

gift_ftp------------------

DEL smcftpCheck.OK

DEL gift_ftp.log.bak

REn gift_ftp.log gift_ftp.log.bak

 

winscp.com /script=reports\gift_ftp.dat /log=gift_ftp.log

 

IF ERRORLEVEL 1 GOTO :ERR_FTP_LOG

 

ECHO. > smcftpCheck.OK

 

:ERR_FTP_LOG

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics