Commit 3b9a3a68 authored by panhong18943's avatar panhong18943

汇丰银企直连优化

parent 2a52cf52
......@@ -34,6 +34,7 @@
select t2.reqsn
from hl_hsbc_paying_batch t2
where t2.status = 'SEND_MID'
and t2.errcode is null
order by 1
]]></bm:query-sql>
</bm:operation>
......
......@@ -26,6 +26,8 @@
tranfer_dir.mkdirs();//创建文件夹
}
var send_flag;
function batch_send(reqsn) {
var fileName = reqsn;
......@@ -81,17 +83,20 @@
var AUTH_CODE = AuthTypeMode.getProperties("AUTH_CODE");
var DOWN_FILEDIR = AuthTypeMode.getProperties("DOWN_FILEDIR");
send_flag = 'N';
try {
var sftpTool = new SftpTool(URL,USER_NAME,PORT);
var send_code = sftpTool.upload(ROOT_PATH, FilePath, new AuthTypeMode(AUTH_CODE,KEY_PATH));
send_flag = 'Y';
} catch (e) {
var error_bm = new ModelService('hsbc.HSBC110.hsbc_get_log_id');
error_bm.update({
reqsn: reqsn
});
raise_app_error(e.message);
var logger = $logger("server-script");
logger.severe('上传失败' + e);
}
if (send_flag == 'Y' && send_code=='UPLOAD_SUCCESS') {
//插入日志表
//生成log_id
var log_bm = new ModelService('hsbc.HSBC110.hsbc_get_log_id');
......@@ -122,6 +127,7 @@
});
}
}
}
function main() {
println('main');
var bm = new ModelService('hsbc.HSBC110.hsbc_batch_temp');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment