Commit 3b9a3a68 authored by panhong18943's avatar panhong18943

汇丰银企直连优化

parent 2a52cf52
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
select t2.reqsn select t2.reqsn
from hl_hsbc_paying_batch t2 from hl_hsbc_paying_batch t2
where t2.status = 'SEND_MID' where t2.status = 'SEND_MID'
and t2.errcode is null
order by 1 order by 1
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
tranfer_dir.mkdirs();//创建文件夹 tranfer_dir.mkdirs();//创建文件夹
} }
var send_flag;
function batch_send(reqsn) { function batch_send(reqsn) {
var fileName = reqsn; var fileName = reqsn;
...@@ -81,17 +83,20 @@ ...@@ -81,17 +83,20 @@
var AUTH_CODE = AuthTypeMode.getProperties("AUTH_CODE"); var AUTH_CODE = AuthTypeMode.getProperties("AUTH_CODE");
var DOWN_FILEDIR = AuthTypeMode.getProperties("DOWN_FILEDIR"); var DOWN_FILEDIR = AuthTypeMode.getProperties("DOWN_FILEDIR");
send_flag = 'N';
try { try {
var sftpTool = new SftpTool(URL,USER_NAME,PORT); var sftpTool = new SftpTool(URL,USER_NAME,PORT);
var send_code = sftpTool.upload(ROOT_PATH, FilePath, new AuthTypeMode(AUTH_CODE,KEY_PATH)); var send_code = sftpTool.upload(ROOT_PATH, FilePath, new AuthTypeMode(AUTH_CODE,KEY_PATH));
send_flag = 'Y';
} catch (e) { } catch (e) {
var error_bm = new ModelService('hsbc.HSBC110.hsbc_get_log_id'); var error_bm = new ModelService('hsbc.HSBC110.hsbc_get_log_id');
error_bm.update({ error_bm.update({
reqsn: reqsn 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 //生成log_id
var log_bm = new ModelService('hsbc.HSBC110.hsbc_get_log_id'); var log_bm = new ModelService('hsbc.HSBC110.hsbc_get_log_id');
...@@ -122,6 +127,7 @@ ...@@ -122,6 +127,7 @@
}); });
} }
} }
}
function main() { function main() {
println('main'); println('main');
var bm = new ModelService('hsbc.HSBC110.hsbc_batch_temp'); 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