test11

pass_enc=N
batlog=1
path=3
type=# -lt 5
then
echo "必须输入参数:ftp|tcpip|special +路径+文件名+put|get+specail参数[id+pwd_enc]|tcpip参数[transip+transport]|ftp参数[ftpip+ftpuser+ftppwd+ftpremotepath+pwd_enc]";
return 1
fi
if [ # -ne 9
then
echo "必须输入参数:ftp|tcpip|special +路径+文件名+put|get+ftpip+ftpuser+ftppwd+ftpremotepath+pwd_enc" |tee -a 4 != put -a batlog
return 1
fi
ftpip=6
ftppwd=8
pass_enc=transmittype = sftp ]
then
if test batlog
return 1
fi
if [ 4 != get ]
then
echo "输入参数必须为put或get" |tee -a 5
ftpuser=7
ftpremotepath=9
fi
if [ # -ne 6
then
echo "必须输入参数:ftp|tcpip|special +路径+文件名+put|get+transip+transport" |tee -a 4 != put -a batlog
return 1
fi
transip=6
fi
if [ # -lt 5
then
echo "必须输入参数:ftp|tcpip|special +路径+文件名+put|get+id+pwd_enc" |tee -a 4 != put -a batlog
return 1
fi
id=6
fi
#if [transmittype != tcpip -a $transmittype != special]
#then

echo "必须输入参数:ftp|tcpip|special +路径+文件名+put|get+specail参数[id]|tcpip参数[transip+transport]|ftp参数[ftpip+ftpuser+ftppwd+ftpremotepath]";

return 1

fi

echo "参数:transmittype transport"

hsbcconvfile()
{
#输入参数
#srcFile="要转换的文件"
#dstFile="转换后的文件"
cat /dev/null > srcFile.tmp
mv srcFile.bak
cat srcFile.tmp
lastnum=srcFile.tmp | grep -n "1}' )
totalnum=totalnum srcFile
echo "totalnum=(head -n srcFile | grep -n "1}' )
do
let "leftnum=totalnum-startnum"
endnum=leftnum endfilter" | head -n 1 | awk -F":" '{print endnum ]
then
endnum=tmpnum datanum > srcFile.tmp >> srcFile.tmp2 srcFile.tmp
awk '{
if( NR%4 == 1){
printf "%s|%s|" ,substr( NF ;
}
else if( NR%4 == 2){
printf "%s|%s|%s|" ,substr( (NF-1),0, 1,54 ),1,6,12),srcFile.tmp > dstFile.tmp | sed 's/ //g' | sed 's/,//g' > srcFile.tmp
rm PPID
time=date '+%Y-%m-%d %H:%M:%S'
logPrefix="[进程"time"]"
}
generateLogPrefixForPID()
{
pid=pid"]"
}
special_handle(){
if [ type = put ]
then
ftpip=127.0.0.1
ftpuser=sftp4nbwyklgngl
ftppwd=Paic1234
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ $? -ne 0 ]
then
echo "同步上传F5文件失败"
fi
fi
fi
fi

if [ type = put ]
then
ftpip=127.0.0.1
ftpuser=sftp4hllsjgngl
ftppwd=Paic1234
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ $? -ne 0 ]
then
echo "同步上传F5文件失败"
fi
fi
fi
fi

if [ path"/"type = put ]
then jarLib -jar ossUrl password ossFilePath filename ? -ne 0 ]
then
echo "TMS通过BIS将退费渠道送盘文件上传到小雨伞保险经纪公司提供的阿里云服务器失败!"
return 1
else
echo "TMS通过BIS将退费渠道送盘文件上传到小雨伞保险经纪公司提供的阿里云服务器成功!"
fi
fi
if [ filepath" ]
then
rm "javaCmd -cp jarLib"/OssClient.jar" userName bucketName path type 2>&1
if [ -s "$filepath" ]
then
echo "TMS通过BIS到小雨伞保险经纪公司提供的阿里云服务器下载退费渠道对账回盘文件成功!"
else
echo "TMS通过BIS到小雨伞保险经纪公司提供的阿里云服务器下载退费渠道对账回盘文件失败!"
return 1
fi
fi
fi

if [ type = put ]
then
sftp_ip=123.125.115.224
sftp_port=2223
ftpuser=insur_1000000015
ftppwd=DEsa_1000000015
filedate=filename | cut -b 26-33 )
ftpremotepath=./insur_1000000015/1000000015/upload
expect <<eof> sftp_port sftp_ip
expect {
"(yes/no)?" {send "yes\r";exp_continue}
"assword:" {send "ftpremotepath\r"
expect "sftp> "
send "mkdir filedate\r"
expect "sftp> "
send "lcd type LOGPATH/sftp$LOGPATH/sftp$error_num -ge 1 ] || [ $success_flag -lt 1 ]
then
echo "上传百度清单文件失败!"
return 1
else
echo "上传百度清单文件成功!"
fi
fi
fi</eof>

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate wx81d43e90bbdc2c44wx81d43e90bbdd
if [ $? -ne 0 ]
then
echo "CMS获取健康险微信APP渠道收款对账文件失败!"
return 1
else
echo "CMS获取健康险微信APP渠道收款对账文件成功!"
fi
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate c3649c5af09278986886afc61dde1fbd
if [ $? -ne 0 ]
then
echo "CMS获取养老险重疾业务收款对账文件失败!"
return 1
else
echo "CMS获取养老险重疾业务收款对账文件成功!"
fi
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate wx4308c960536ea371wx4308c960536e
if [ $? -ne 0 ]
then
echo "CMS获取健康险金管家平台微信收款对账文件失败!"
return 1
else
echo "CMS获取健康险金管家平台微信收款对账文件成功!"
fi
fi
fi

if [ type = put ]
then
ftpip=127.0.0.1
ftpuser=sftp4cqssd
ftppwd=Paic1234
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ $? -ne 0 ]
then
echo "同步上传F5文件失败"
fi
fi
fi
fi

if [ type = put ]
then
ftpip=127.0.0.1
ftpuser=sftp4wsrj
ftppwd=Paic1234
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ $? -ne 0 ]
then
echo "同步上传F5文件失败"
fi
fi
fi
fi

if [ type = put ]
then
ftpip=127.0.0.1
ftpuser=sftp4jiayi
ftppwd=Paic1234
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ $? -ne 0 ]
then
echo "同步上传F5文件失败"
fi
fi
fi
fi

if [ path"/"( echo 5}' )
subFilename=filename | awk -F "." '{print subFilename".zip"
zipFilePath=zipFilename
bakFilePath=dateStr
filename=type = get ]
then
ftpremotepath="./out/"? -ne 0 ]
then
echo "TMS通过BIS到平安付获取普惠的不足额代扣项目交易对账文件失败!"
return 1
else
echo "TMS通过BIS到平安付获取普惠的不足额代扣项目交易对账文件成功!"
if [ -e filePath path
unzip ? -ne 0 ]
then
echo "文件解压失败!"
return 1
else
echo "文件解压成功!"
fi
fi
fi
fi

if [ path"/"type = get ]
then
if [ -e "filepath"
fi
ossFilePath="production-charge" jarLib -jar ossUrl password ossFilePath filename filepath" ]
then
echo "TMS通过BIS到小雨伞保险经纪公司提供的阿里云服务器下载对账文件成功!"
else
echo "TMS通过BIS到小雨伞保险经纪公司提供的阿里云服务器下载对账文件失败!"
return 1
fi
fi
fi

if [ filename
filepath=tmpFilename
merchantNo=filename | awk -F "_" '{print ( echo type = get ]
then
if [ merchantNo = "900000030499" ]
then
ftpuser=PH_GD_030499
ftppwd=PH_GD_030499
elif [ merchantNo = "900000137443" ]
then
ftpuser=lhbank
ftppwd=lhbnk@123
elif [ merchantNo = "900000186428" ]
then
ftpuser=qdbank
ftppwd=qdbnk@123
elif [ merchantNo = "900000296559" ]
then
ftpuser=bhbank
ftppwd=bhbnk@123
elif [ merchantNo = "900000293606" ]
then
ftpuser=zhxt2
ftppwd=zhxt2@123
elif [ merchantNo = "900000346663" ]
then
ftpuser=zhxt16
ftppwd=zhxt16@123
elif [ merchantNo = "900000364567" ]
then
ftpuser=jsbank
ftppwd=jsbnk@123
elif [ merchantNo = "900000493654" ]
then
ftpuser=dzbank
ftppwd=dzbank@123
elif [ merchantNo = "900000493974" ]
then
ftpuser=cabank
ftppwd=cabank@123
elif [ merchantNo = "900000031749" ]
then
ftpuser=njbank
ftppwd=njbnk@123
fi
ftpremotepath="./out"
sftpfile
if [ path/filepath
if [ $? -ne 0 ]
then
echo "复制文件失败!"
return 1
else
echo "复制文件成功!"
fi
fi
fi
fi

卡行天下

if [ filename
filepath=tmpFilename
filedate=filename | awk -F "_" '{print (echo 3}')
ftpip=sftp.yqb.com
ftpuser=puhui_cipauth
ftppwd=J4NwPXpVlkrfLn1Sb57QGg==
if [ filedate
cp path/? -ne 0 ]
then
echo "复制文件失败!"
return 1
else
echo "复制文件成功!"
sftpfile
if [ $? -ne 0 ]
then
echo "TC上传影像文件到壹钱包失败!"
return 1
else
echo "TC上传影像文件到壹钱包成功!"
fi
fi
fi
fi

if [ type = put ]
then
ftpip=127.0.0.1
ftpuser=sftp4yadea
ftppwd=Paic1234
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ $? -ne 0 ]
then
echo "同步上传F5文件失败 "
fi
fi
fi

if [ ? -ne 0 ]
then
ftpip=? -ne 0 ]
then
echo "下载文件失败"
return 1
else
echo "下载文件成功"
fi
else
echo "下载文件成功"
fi
fi
fi

if [ type = put ]
then
ftpip=127.0.0.1
ftpuser=sftp4meilian
ftppwd=Paic1234
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ $? -ne 0 ]
then
echo "同步上传F5文件失败 "
fi
fi
fi

if [ ? -ne 0 ]
then
ftpip=? -ne 0 ]
then
echo "下载文件失败"
return 1
else
echo "下载文件成功"
fi
else
echo "下载文件成功"
fi
fi
fi

if [ path"/"filepath.tmp
if [ filepath tmpfilepath -o ? -ne 0 ]
then
echo "TMS将代扣送盘文件上传到平安付服务器失败!"
return 1
else
echo "TMS将代扣送盘文件上传到平安付服务器成功!"
fi
fi
if [ ? -ne 0 ]
then
echo "TMS到平安付服务器下载代扣回盘文件失败!"
return 1
else
echo "TMS到平安付服务器下载代扣回盘文件成功!"
mv -f tmpfilepath
iconv -f utf-8 -t gbk filepath
fi
fi
fi
if [ path"/"( echo 1}' )
timePath=subFilename | awk -F "_" '{print ( echo ( echo ( echo filename".tgz"
ftpip=sftp.yqb.com
ftpuser=puhui_accttrade
ftppwd=TrhY7qh2vfdg7KTP3ISkNSyxpln45E5i7sClpX5drz8=
if [ yearPath"/"dayPath
sftpfile
if [ path
tar -zxf $filename
fi
fi
fi

if [ type = put ]
then
ftpip=127.0.0.1
ftpuser=sftp4kxtx
ftppwd=Paic1234
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ id = "sftp4hema" ]
then
ret=0
if [ ? -ne 0 ]
then
echo "上传文件失败"
return 1
else
echo "上传文件成功"
ftpip=? -ne 0 ]
then
echo "同步上传F5文件失败"
fi
fi
fi
fi
if [ ( echo 1}' )
dateInfo=subStr | awk -F "_" '{print (echo path"/"dateInfopath"/"PrefixStr".txt"
if [ ? -ne 0 ]
then
ftpip=? -ne 0 ]
then
echo "TMS通过BIS到翼支付平台下载对账文件失败!"
return 1
else
echo "TMS通过BIS到翼支付平台下载对账文件成功!"
cp filePath
fi
else
echo "TMS通过BIS到翼支付平台下载对账文件成功!"
cp filePath
fi
fi
fi
if [ type = put ]
then
result_file=filename | awk -F "." '{print WORKDIR/etc/QueryEnterprisePaymentToWeChat.etc filename certFile logPrefixPID &
if [ logPrefix"BIS获取产险微信支付交易对账文件失败!" >> logPrefix"BIS获取产险微信支付交易对账文件成功!" >> type = get ]
then
filePath=filename
bkSerial_filename=bkSerial_filename ]
then
generateLogPrefix
echo batlog
return 1
fi
if [ ! -s logPrefix"CMS通过BIS获取产险微信支付交易对账文件失败!" >> logPrefix"CMS通过BIS获取产险微信支付交易对账文件成功!" >> id = "sftp4pintu" ]
then
ret=0
if [ ? -ne 0 ]
then
echo "上传文件失败"
return 1
else
echo "上传文件成功"
ftpip=? -ne 0 ]
then
echo "同步上传F5文件失败 "
fi
fi
fi
if [ ? -ne 0 ]
then
ftpip=? -ne 0 ]
then
echo "下载文件失败"
return 1
else
echo "下载文件成功"
fi
else
echo "下载文件成功"
fi
fi
fi
if [ type = put ]
then
ftpip=127.0.0.1
ftpuser=sftp4masty
ftppwd=Paic1234
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ type = get ]
then
ftpip=127.0.0.1
ftpuser=sftp4masty
ftppwd=Paic1234
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ id = "sftp4pintu" ]
then
ret=0
if [ ? -ne 0 ]
then
echo "上传文件失败"
return 1
else
echo "上传文件成功"
ftpip=? -ne 0 ]
then
echo "同步上传F5文件失败 "
fi
fi
fi
if [ ? -ne 0 ]
then
ftpip=? -ne 0 ]
then
echo "下载文件失败"
return 1
else
echo "下载文件成功"
fi
else
echo "下载文件成功"
fi
fi
fi
if [ path"/"localFile ]
then
rm ( echo 1}' )
#.ZIP文件全名
localZipFile=tempFileName".ZIP"
corpAgreementNo=filename | awk -F "_" '{print ( echo 5}' )
javaCmd="/wls/deployop/bin/jrockit_160_14_R27.6.5-32_4PA/bin/java"
jarLib="/wls/otherapps/bisinternetbank/jar/pabank"
if [ jarLib type corpAgreementNo localFile ]
then
echo "TMS从平安银行下载文件失败!"
return 1
else
echo "TMS从平安银行下载文件成功!"
fi
fi
fi
if [ type = put ]
then
sftpfile
if [ F5IP
sftpfile
if [ type = get ]
then
sftpfile
if [ F5IP
sftpfile
if [ id = "TMS_ALIPAY_YLXSKDZ" ]
then
ret=0
if [ (echo filedate
sftpfile
if [ id = "TMS_YQB_CXCZSC" ]
then
ret=0
pass_enc=Y
subFilename=filename | awk -F "." '{print ( echo 1}' )
merchantNo=subFilename | awk -F "_" '{print ( echo 3}' )
ftpip=sftp.yqb.com
ftpuser=ownerMall_29575_prd
ftppwd=Rh0/sI7yl1Y5AGP8veoMo21866Og7CQPJVItkwQ6dAs=
if [ fileType = saleCard ]
then
ftpremotepath="./purchase/"merchantNo
else
ftpremotepath="./redeem/"merchantNo
fi
sftpfile
if [ id = "TMS_ALIPAY_CXJRYZT" ]
then
ret=0
if [ (echo filedate
sftpfile
if [ id = "TMS_PHZCMA" ]
then
ftpip="120.52.145.148:80"
ftpuser="tmsuser"
ftppwd="8fB7Izs9pM5Tc1COLx5b8A=="
ftpremotepath="./upload/bis"
if [ ? -ne 0 ]
then
echo "TMS通过BIS上传文件到众筹失败!"
return 1
else
echo "TMS通过BIS上传文件到众筹成功!"
fi
fi
if [ ? -ne 0 ]
then
echo "TMS通过BIS到众筹下载文件失败!"
return 1
else
echo "TMS通过BIS到众筹下载文件成功!"
fi
fi
fi
if [ filename
filepath=tmpFilename
filename=filename | cut -b 8- )
ftpip=sftp.yqb.com
ftpuser=YLXSH_PROD
ftppwd=gzjuwocWb0j1nuNTAtOyMA==
if [ filepath filename
if [ ? -ne 0 ]
then
echo "TMS上传养老险退款送盘文件到壹钱包失败!"
return 1
else
echo "TMS上传养老险退款送盘文件到壹钱包成功!"
fi
fi
fi
if [ ? -ne 0 ]
then
echo "TMS通过BIS到壹钱包下载退款回盘文件失败!"
return 1
else
echo "TMS通过BIS到壹钱包下载退款回盘文件成功!"
cp filename ? -ne 0 ]
then
echo "复制文件失败!"
return 1
else
echo "复制文件成功!"
fi
fi
fi
fi
if [ type = get ]
then
filedate=filename | cut -b 12-19 )
ksh path filedate 9O6M6M6Y9M7M6M3E5V9I8A5A2D4B5A7N
if [ id = "TMS_ALIPAY_JKXZFDZ" ]
then
ret=0
if [ (echo filedate
sftpfile
if [ id = "XTCFBSMJJ_IAPS" ]
then
ret=0
ftpip=sftp.yqb.com
ftpuser=XTSM_PROD
ftppwd=18uxDP4ivyLgUcOPqAa7kw==
tmpFilename=( echo 1}' )
if [ ( echo 1}' )
subfilename3=tmpFilename | awk -F "to_bank" '{print subfilename2"to_bank_fund_txn"path/path/( echo 2}' )
fi
fileType=subfilename3 | cut -b 1-2 )
if [ fileType = 10 ]
then
ftpremotepath=./apply/in
fi
if [ ? -ne 0 ]
then
echo "信托财富宝私募基金通过BIS上传文件到平安付失败!"
return 1
else
echo "信托财富宝私募基金通过BIS上传文件到平安付成功!"
fi
fi
fi
if [ filename
filepath=tmpFilename
supplier=tmpFilename | awk -F "_" '{print ( echo 2}' )
docType=tmpFilename | awk -F "_" '{print ( echo 4}' )
ftpremotepath=./outPath/monthInfo
filename=tmpFilename | awk -F monthInfo"_" '{print type = put ]
then
cp path/? -ne 0 ]
then
echo "财酷通过BIS上传文件到壹钱包失败!"
return 1
else
echo "财酷通过BIS上传文件到壹钱包成功!"
fi
fi
if [ ? -ne 0 ]
then
echo "财酷通过BIS到壹钱包下载文件失败!"
return 1
else
echo "财酷通过BIS到壹钱包下载文件成功!"
cp filename ? -ne 0 ]
then
echo "复制文件失败!"
return 1
else
echo "复制文件成功!"
fi
fi
fi
fi
if [ type = put ]
then
ftpip=127.0.0.1
ftpuser=sftp4fuShun
ftppwd=Paic1234
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ type = get ]
then
ftpip=127.0.0.1
ftpuser=sftp4fuShun
ftppwd=Paic1234
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ id = "YLXYKYT_WXTK" ]
then
ret=0
certFile=/wls/otherapps/bisinternetbank/cert/apiclient_cert_1445458402_prd.pem
keyFile=/wls/otherapps/bisinternetbank/cert/apiclient_key_1445458402_prd.pem
if [ WORKDIR/etc/applyForRefundToWeChat.etc filename https://api.mch.weixin.qq.com/secapi/pay/refund 2i3o4p9k0p8l5l6l4l7p8o9l9l8m9m9o keyFile
if [ type = get ]
then
transaction_id=filename | awk -F "_" '{print WORKDIR/etc/queryRefundToWeChat.etc filename https://api.mch.weixin.qq.com/pay/refundquery wx5cb2de974b3cf865 1445458402 certFile ? -ne 0 ]
then
echo "CMS通过BIS获取微信查询退款回盘文件失败!"
return 1
else
echo "CMS通过BIS获取微信查询退款回盘文件成功!"
fi
fi
fi
if [ path"/"[(echo transDate | cut -b 1-4month=echo transDate | cut -b 7-8`
queryDate=month-type = get ]
then
if [ -e "filepath"
fi jarLib -jar path url comId downloadKey filepath" ]
then
echo "从京东下载车险日终对账文件失败!"
return 1
else
echo "从京东下载车险日终对账文件成功!"
fi
fi
fi
#阳光经纪业务对账
if [ type = put ]
then
ftpip=127.0.0.1
ftpuser=sftp4ygjj
ftppwd=Paic1234
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ id = "TMS_YQB" ]
then
ret=0
ftpuser=JKX_HBDF_PROD
ftpip=sftp.yqb.com
ftppwd=z+US4qShRxfI2FKoIxi5rQ==
ftpremotepath=./out
tmpfilename=filename
if [ path/path/? -ne 0 ]
then
echo "转码失败 "
return 1
fi
rm filename
mv tmpfilename filename
sftpfile
if [ type = get ]
then
sftpfile
if [ path/path/? -ne 0 ]
then
echo "转码失败 "
return 1
fi
rm filename
mv tmpfilename filename
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate 98f58a58ec4f450e84785faf83e43606
if [ $? -ne 0 ]
then
echo "获取微信收款对账文件失败!"
return 1
else
echo "获取微信收款对账文件成功!"
fi
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate 98f58a58ec4f450e84785faf83e43606
if [ $? -ne 0 ]
then
echo "获取微信收款对账文件失败!"
return 1
else
echo "获取微信收款对账文件成功!"
fi
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate 98f58a58ec4f450e84785faf83e43606
if [ $? -ne 0 ]
then
echo "获取微信收款对账文件失败!"
return 1
else
echo "获取微信收款对账文件成功!"
fi
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate 98f58a58ec4f450e84785faf83e43606
if [ $? -ne 0 ]
then
echo "获取微信收款对账文件失败!"
return 1
else
echo "获取微信收款对账文件成功!"
fi
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate 98f58a58ec4f450e84785faf83e43606
if [ $? -ne 0 ]
then
echo "获取微信收款对账文件失败!"
return 1
else
echo "获取微信收款对账文件成功!"
fi
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate 98f58a58ec4f450e84785faf83e43606
if [ $? -ne 0 ]
then
echo "获取微信收款对账文件失败!"
return 1
else
echo "获取微信收款对账文件成功!"
fi
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate 98f58a58ec4f450e84785faf83e43606
if [ $? -ne 0 ]
then
echo "获取微信收款对账文件失败!"
return 1
else
echo "获取微信收款对账文件成功!"
fi
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate 98f58a58ec4f450e84785faf83e43606
if [ $? -ne 0 ]
then
echo "获取微信收款对账文件失败!"
return 1
else
echo "获取微信收款对账文件成功!"
fi
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate 98f58a58ec4f450e84785faf83e43606
if [ $? -ne 0 ]
then
echo "获取微信收款对账文件失败!"
return 1
else
echo "获取微信收款对账文件成功!"
fi
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate 98f58a58ec4f450e84785faf83e43606
if [ $? -ne 0 ]
then
echo "获取微信收款对账文件失败!"
return 1
else
echo "获取微信收款对账文件成功!"
fi
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate 98f58a58ec4f450e84785faf83e43606
if [ $? -ne 0 ]
then
echo "获取微信收款对账文件失败!"
return 1
else
echo "获取微信收款对账文件成功!"
fi
fi
fi

if [ type = get ]
then
filedate=filename | cut -b 23-30 )
ksh path filedate 98f58a58ec4f450e84785faf83e43606
if [ $? -ne 0 ]
then
echo "获取微信收款对账文件失败!"
return 1
else
echo "获取微信收款对账文件成功!"
fi
fi
fi

if [ (echo $

javaCmd="/wls/deployop/bin/jdk1.8.0_60/bin/java"
jarPath="/wls/otherapps/bisinternetbank/lib/AlipayBillDownload.jar"
if [ $type = get ]
then
    $javaCmd -jar $jarPath $pid $filename $filePath $logFilePath $appId $serverUrl $charset $signType $billType $date $privateKey $alipayPublicKey $format > $LOGPATH/sftp/sftp$$.log 2>&1
    if [ $? -ne 0 ]
    then
        generateLogPrefix
        echo $logPrefix"sftp下载文件失败"
        cat $LOGPATH/sftp/sftp$$.log >> $batlog
        echo "下载文件失败"
        return 1
    else
        generateLogPrefix
        echo $logPrefix"sftp下载文件成功"
        cat $LOGPATH/sftp/sftp$$.log >> $batlog
        echo "下载文件成功"
    fi
fi

fi

if [ type = get ]
then
ksh path ? -ne 0 ]
then
echo "获取【阿里巴巴】支持实时对账文件失败!"
return 1
else
echo "获取【阿里巴巴】支持实时对账文件成功!"
fi
fi
fi
if [ type = get ]
then
ksh path ? -ne 0 ]
then
echo "获取支付宝【e-pay】对账文件失败!"
return 1
else
echo "获取支付宝【e-pay】对账文件成功!"
fi
fi
fi
if [ type = put ]
then
ftpip=127.0.0.1
ftpuser=scbeimen
ftppwd=scbeimen
ftpremotepath=./
sftpfile
if [ F5IP
sftpfile
if [ id = "PAFTP11" ]
then
ret=0
if [ ? -ne 0 ]
then
echo "上传文件失败"
return 1
else
echo "上传文件成功"
ftpip=? -ne 0 ]
then
echo "同步上传F5文件失败 "
fi
fi
fi
fi
#花旗银行批量传输
if [ type = put ]
then
cp filename filename.bak
java CreateSMime -e path/path -c LOGPATH/ y >> path/path/path/WORKDIR/etc/ CitiFileTransmit put WORKDIR/tmp/citi_put$WORKDIR/tmp/citi_put$batlog
if [ WORKDIR/tmp/citi_put$1}' ) -eq 0 ]
then
rm WORKDIR/tmp/citi_put$type = get ]
then
if [ -e filename ]
then
echo "文件["filename"]已经存在" >> filename 7 256`
java -DConfigPath=tmpfile >> path/WORKDIR/etc/pingan_city.pfx -p 8EEe32sHQQovd/a/7Dumzg== -h kLbrP6SiCYfQFGuXYMBQiVWFsSY= -i tmpfile -o WORKDIR/etc/CITICFX_SIGN_usage_for_get.cer -L WORKDIR/tmp/WORKDIR/tmp/path/WORKDIR/tmp/(ls -l filename | awk '{print path/path/batlog
else path batlog
fi
else
return 1
fi
else
return 1
fi
fi
fi
fi
return 0
}
################乌鲁木齐批量转帐文件配置######################
getdata2()
{
fileclt -h Port -f local_path -r
if [ local_path
fi
return 0
}
senddata2()
{
fileclt -h Port -f local_path -s
if [ ( echo 1}')
sftp_port=ftpip | awk -F: '{ print sftp_port ]
then
sftp_port="22"
echo "ip=sftp_ip 端口$sftp_port"
fi

expect <<eof> sftp_port -oIdentityfile=ftpuser@keyPwd\r"}
}
expect "sftp> "
send "cd path\r"
expect "sftp> "
send "filename\r"
expect "sftp> "
send "exit\r"
expect eof
EOF
if [ LOGPATH/sftp$LOGPATH/sftp$result -lt 1 ]
then
return 1
fi
return 0
}</eof>

sftpfilebyjava()
{
if [ pass_enc = y ]
then
javaCmd="/wls/deployop/bin/jrockit-jdk1.4.2_15/bin/java"
jarLib="/wls/otherapps/bisinternetbank/lib/"
result=`jarLib -jar ftppwd`
ftppwd=$result
fi

java8Cmd="/wls/deployop/bin/jdk1.8.0_60/bin/java"
jarPath="/wls/otherapps/bisinternetbank/lib/SftpClient.jar"

$java8Cmd -jar $jarPath $ftpuser@$ftpip $ftppwd $path $ftpremotepath $type $filename > $LOGPATH/sftp/sftp$$.log 2>&1

if [ $? -ne 0 ]
then
    generateLogPrefix
    echo $logPrefix"sftp文件失败,错误信息如下:"
    cat $LOGPATH/sftp/sftp$$.log >> $batlog
    echo "BIS传输文件失败!"
    return 1
else
    generateLogPrefix
    echo $logPrefix"sftp文件成功!"
    cat $LOGPATH/sftp/sftp$$.log >> $batlog
    echo "BIS传输文件成功!"
    return 0
fi

}

mkdir_sftpfile()
{
if [ pass_enc = y ]
then
javaCmd="/wls/deployop/bin/jrockit-jdk1.4.2_15/bin/java"
jarLib="/wls/otherapps/bisinternetbank/lib/"
result=`jarLib -jar ftppwd`
ftppwd=( echo 1}')
sftp_port=ftpip | awk -F: '{ print sftp_port ]
then
sftp_port="22"
echo "ip=sftp_ip 端口LOGPATH/sftp$sftp_port sftp_ip
expect {
"(yes/no)?" {send "yes\r";exp_continue}
"assword:" {send "ftpremotepath\r"
expect "sftp> "
send "cd path\r"
expect "sftp> "
send "filename\r"
expect "sftp> "
send "ls LOGPATH/sftp$LOGPATH/sftp$LOGPATH/sftp$error_num -ge 1 ] || [ LOGPATH/sftp$batlog
return 1
fi
return 0
}

function reqNetEasebyTime_sub {
transDate=2
year=`echo transDate | cut -b 5-6day=echo year-day
resultCode=""
startTime="date"" 23:59:59"
params="method=queryByOperationTime&platformId=startTime&endTime=pageNo&pageSize=100&operationType=7"
dealUrl="params"
tmprspFile=page_No
if [ -e "tmprspFile
fi
echo "wget --no-check-certificate -O dealUrl" >>tmprspFile --tries=1 --timeout=5 "? -ne 0 ]
then
echo "连接失败">>( cat 2}' | awk -F "" '{print resultCode" != "" ]
then
echo "获取网易宝第[resultCode]" >>type = put ]
then
#echo "putbatchdata Port filename "
putbatchdata Port filename
if [ filename]失败"
return 1
else
echo "◆发送文件[type = get ]
then
getbatchdata Port filename
if [ filename]失败"
return 1
else
echo "◆获取文件[pass_enc = Y -o javaCmd -cp jarLib"/PWDAES.jar" result
fi
remotpath_put=remotpath | awk -F: '{ print ( echo 2}')
if [ -z remotpath
else
echo "remotpath_put=remotpath_get"
fi
ftp_ip=IP | awk -F: '{ print ( echo 2}')
if [ -z ftp_port"
fi
if [ ftp_ip user remotpath_get
lcd filename
bye" > WORKDIR/tmp/autoftp.cmd | ftp -vin >WORKDIR/tmp/ftp.log`
fi
if [ ftp_ip user remotpath_put
lcd filename
bye" > WORKDIR/tmp/autoftp.cmd | ftp -vin >WORKDIR/tmp/ftp.log`
fi
if [ WORKDIR/tmp/ftp.log >> 1
rspcode=""
startTime="month-year-day+23%3A59%3A59"
params="encoding=UTF-8&pId=startTime&endTime=pageNo&showUpdateTime=1&outputType=text"
dealUrl="params"
echo "wget -O pageNo --tries=1 --timeout=5 batlog
wget -O pageNo --tries=1 --timeout=5 ? -ne 0 ]
then
rspcode=""
return -1
else
rspcode=path"/Rsp_file"rspcode" -o "pageNo" != 1 ]
then
echo "网易宝批次:[rspcode]" >>1
tmprspFile="Alp_Rsp_file"path"/"tmpfilePath" ]
then
rm WORKDIR/etc/getTbFinanceDetail.etc tmprspFile alpURL page_No batlog
ksh path alpkey pId acctdate 2>/dev/null >>tmpfilePath | awk -F "<is_success>" '{print 1}' | tr -d '\n'`
if [ "tmprspFile >> tmpfilePath | awk -F "<has_next_page>" '{print 1}' | tr -d '\n'`
echo suclistfile
fi
sleep 1
}
sftpfile()
{
if [ pass_enc = y ]
then
javaCmd="/wls/deployop/bin/jrockit-jdk1.4.2_15/bin/java"
jarLib="/wls/otherapps/bisinternetbank/lib/"
result=`jarLib -jar ftppwd`
ftppwd=( echo 1}')
sftp_port=ftpip | awk -F: '{ print sftp_port ]
then
sftp_port="22"
echo "ip=ftpip 端口WORKDIR"/tmp/autosftp."$type = put ]
then
echo "cd path
-put sftp_cmd
echo "sftp -oPort=WORKDIR/bin/ssh_i386 -b ftpuser@LOGPATH/ftp$sftp_port -oPassword=WORKDIR/bin/ssh_i386 -b ftpuser@LOGPATH/ftp$LOGPATH/ftp$type = get ]
then
echo "cd path
-get sftp_cmd
echo "sftp -oPort=WORKDIR/bin/ssh_i386 -b ftpuser@LOGPATH/ftp$sftp_port -oPassword=WORKDIR/bin/ssh_i386 -b ftpuser@LOGPATH/ftp$LOGPATH/ftp$sftp_cmd
byeflag=`grep -E -c "bye" result -gt 0 -a LOGPATH/ftp$batlog
#rm LOGPATH/ftp$batlog
#rm ( echo 1}')
sftp_port=ftpip | awk -F: '{ print sftp_port ]
then
sftp_port="22"
echo "ip=sftp_ip 端口LOGPATH/sftp$sftp_port sftp_ip
expect "sftp> "
send "cd path\r"
expect "sftp> "
send "filename\r"
expect "sftp> "
send "exit\r"
expect eof
EOF
if [ ! -e LOGPATH/sftp$LOGPATH/sftp$error_num -ge 1 ] || [ LOGPATH/sftp$LOGPATH/fail_sftp$tmpdate
return 1
fi
return 0
}
deal_sftpfile()
{
if [ pass_enc = y ]
then
javaCmd="/wls/deployop/bin/jrockit-jdk1.4.2_15/bin/java"
jarLib="/wls/otherapps/bisinternetbank/lib/"
result=`jarLib -jar ftppwd`
ftppwd=LOGPATH/ftp$sftport ftpip
expect {
"(yes/no)?" {send "yes\r";exp_continue}
"assword:" {send "ftpremotepath\r"
expect "sftp> "
send "lcd type type = get ]
then
result=`grep -E -c "Fetching" LOGPATH/ftp$result -lt 1 ]
then
return 1
fi
return 0
}
put_hsbc_file()
{
expect <<eof> ftpuser@ftppwd\r"}
}
expect "sftp> "
send "cd path\r"
expect "sftp> "
send "filename\r"
expect "sftp> "
send "exit\r"
expect eof
EOF
result=`grep -E -c "Uploading" result -lt 1 ]
then
return 1
fi
return 0
}
transmit()
{
echo "转发调用开始"
ret=1
if [ ftpip
user=ftppwd
remotpath=? -ne 0 ]
then
return 1
fi
echo "FTP转发参数 path transmittype = sftp ]
then
ret=0
IP=ftpuser
passwd=ftpremotepath
sftpfile
if [ LOGPATH/ftp$LOGPATH/ftp$IP filename"
fi
if [ transip
Port=? -ne 0 ]
then
return 1
fi
fi
if [ ? -ne 0 ]
then
return 1
fi
fi
if [ transmittype对应的设置"
ret=1
fi
return 0
}
transmit >>? -ne 0 ]
then
echo "转发调用失败" |tee -a batlog
return 0
fi</eof></has_next_page></is_success>

全部评论

相关推荐

双非坐过牢:非佬,可以啊10.28笔试,11.06评估11.11,11.12两面,11.19oc➕offer
点赞 评论 收藏
分享
10-28 11:04
已编辑
美团_后端实习生(实习员工)
一个2人:我说几个点吧,你的实习经历写的让人觉得毫无含金量,你没有挖掘你需求里的 亮点, 让人觉得你不仅打杂还摆烂。然后你的简历太长了🤣你这个实习经历看完,估计没几个人愿意接着看下去, sdk, 索引这种东西单拎出来说太顶真了兄弟,好好优化下简历吧
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务