if(document.@[email protected]!='0'&& document.@[email protected] !='1'){ document.location.href='/TxRunAction.do?SubTranName=_JM_E2_516503_01'; }else{ alert('复核笔数结束'); document.location.href='/TxRunAction.do?SubTranName=_JM_E2_516503_init'; //closeTran(); }
//判断成功与否 String s_cur_record = com.adtec.client.util.DataPoolTool.getInfoFromTpDataPool("BILL_cur_record",0); String s_all_record = com.adtec.client.util.DataPoolTool.getInfoFromTpDataPool("BILL_record_num",0); int cur_record,all_record; if(!com.adtec.client.util.StringUtil.isNull(s_cur_record)){ cur_record = Integer.parseInt(s_cur_record); } if(!com.adtec.client.util.StringUtil.isNull(s_all_record)){ all_record = Integer.parseInt(s_all_record); } //取数据元素 String file = com.adtec.client.ftp.FtpProxy.getLocalFile(); if(file == null) return ; String [] dateElmenets = { "BILL_No","BILL_AccSeqNo","BILL_ActTeller","BILL_Acc_flag","BILL_NoteType","BILL_NoteDate","BILL_NoteNo","BILL_NoteBrchNo","BILL_NoteBrchName","BILL_RecvBrch","BILL_RevBankName","BILL_DrAcctNo0","BILL_DrAcctNo","BILL_DrAcName","BILL_CrAcctNo0","BILL_CrAcctNo","BILL_CrAcName","BkAmt1","BILL_PayPw","BkPayMode","BkCertType","BkCertNo","BILL_Remark","BILL_ChgType"}; com.adtec.client.ftp.parser.FloatLenParserRule rule = new com.adtec.client.ftp.parser.FloatLenParserRule("\\|"); com.adtec.client.ftp.parser.TxtParser parser= new com.adtec.client.ftp.parser.TxtParser(file); parser.setElements(dateElmenets ); parser.setRule(rule); java.util.List data = parser.getTranData("*",cur_record+1,cur_record+1); com.adtec.client.ftp.FtpProxy.dataToPoolAction(data); $BkTotNum = all_record - cur_record ; String if_success = $__ERR_RET; if( !"00000".equals(if_success) ) return ; cur_record = cur_record+1; if( cur_record > all_record) cur_record = all_record; com.adtec.client.util.DataPoolTool.setInfoToTpDataPool("BILL_cur_record", 0, cur_record);
常用数据元素
机构号: HB_Branch_Number 柜员号: HB_Teller_Number 授权柜员号:HB_Authorization_Teller 流水号: 核心交易: HB_Journal_Number, 支付交易:BkSeqNo 电子银行:BkSeqNo
机构号获取机构名
$BkAcctName = ""; if($BkAcctNo!=null&&!$BkAcctNo.equals("")){ com.adtec.client.bean.T_brhm t =com.adtec.client.dao.T_brhmDao.load($BkAcctNo); if(t!=null){ $BkAcctName = t.getBr_name(); $HB_AnsychErrorMsg = "交易成功"; } else $HB_AnsychErrorMsg = "错误的机构号!"; }
清单打印
if(("5".equals($BkType2)) || ("7".equals($BkType2)) || ("8".equals($BkType2)) || ("9".equals($BkType2))){ com.adtec.client.ftp.FtpProxy.setServerName("AREA_STAR"); } else { com.adtec.client.ftp.FtpProxy.setServerName("SVR_STAR"); } if("00000".equals($__ERR_RET)){ $HB_Teller_Number=com.adtec.client.util.DataPoolTool.getInfoFromSpDataPool("HB_Teller_Number", 0); $Hidden_Value = com.adtec.client.util.DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:MM:SS"); $HB_PrintDataLocalFileName=com.adtec.client.print.XlsModelFix.ticketExport("492042.xls",0,21,1); }
处理多层数据元素
List pagelist=com.adtec.client.returncode.OutPutCodeDispose.dispose("TS_E1_507007","TS_E1_507007","TS_E1_507007"); if("00000".equals($__ERR_RET)){ String[] aselementName ={"ETS_TaxPayerName","ETS_DrAcName","ETS_AuthName","ETS_StatInfo"}; String[] srcname ={"ETS_CollectNums1","ETS_CollectSum1","ETS_CollectNums2","ETS_CollectSum2"}; String[] fmt={"FMT_HOST_CLI_Public_TS_E1_507007"}; String[] temp1={}; String temp2=""; String s="-"; String itemnums=com.adtec.afc.datapool.EP.epGetValue(com.adtec.struct.ECAPTxRunInfo.getInstance().getIpID(),"ETS_ItemNums",0); String itemsum=com.adtec.afc.datapool.EP.epGetValue(com.adtec.struct.ECAPTxRunInfo.getInstance().getIpID(),"ETS_ItemSum",0); int i=0; for(int n=0;n<4;n++){ temp1=com.adtec.afc.datapool.EP.epGetElementValue(com.adtec.struct.ECAPTxRunInfo.getInstance().getIpID(),srcname[n]); for(i=0;i<3;i++){ if(i<temp1.length){ if ("-1".equals(temp1[i])) com.adtec.afc.datapool.EP.epPut(com.adtec.struct.ECAPTxRunInfo.getInstance().getIpID(),aselementName[n],s); else{ if(n==2&&i==0) com.adtec.afc.datapool.EP.epPut(com.adtec.struct.ECAPTxRunInfo.getInstance().getIpID(),aselementName[n],temp1[i]+"("+itemnums+")"); else if(n==3&&i==0) com.adtec.afc.datapool.EP.epPut(com.adtec.struct.ECAPTxRunInfo.getInstance().getIpID(),aselementName[n],temp1[i]+"("+itemsum+")"); else com.adtec.afc.datapool.EP.epPut(com.adtec.struct.ECAPTxRunInfo.getInstance().getIpID(),aselementName[n],temp1[i]); } }else{ com.adtec.afc.datapool.EP.epPut(com.adtec.struct.ECAPTxRunInfo.getInstance().getIpID(),aselementName[n],s); } } } com.adtec.client.print.LocalPrintDataElementDispose.initPrintPool(); com.adtec.client.print.LocalPrintDataElementDispose.copyIPDataPool2PrintData(aselementName); com.adtec.client.print.LocalPrintDataElementDispose.disposeLocalPrint(fmt,aselementName); } return pagelist;
页面绑定多层数据元素
页面成功后提交事件
ECAPTxRunInfo ecapInfo = com.adtec.struct.ECAPTxRunInfo.getInstance(); int ipId = ecapInfo.getIpID(); com.adtec.afc.datapool.EP.epPut (ipId ,"TS_F_payamt", 1, TS_F_traceno); com.adtec.afc.datapool.EP.epPut (ipId ,"TS_F_payamt", 2, TS_F_transacct);
回显
com.adtec.afc.datapool.EP.epGetValue(com.adtec.struct.ECAPTxRunInfo.getInstance().getIpID(),"TS_F_payamt",1);
中间业务跳补登折交易
//补登折 var bdflag = document.@[email protected]; if(bdflag == '1') { alert('请到600交易补登折!'); openSubTran(document.@FormName@,'TS_F5_907050_01','_B6_000600','_B6_000600_init'); }
打印多页
1.文件形式
com.adtec.client.ftp.FtpProxy.downLoadFile(); String downfile = com.adtec.client.ftp.FtpProxy.getLocalFile(); if((downfile==null)||(downfile.equals(""))) { return; }else{ $BkFileFmt=""; $BkFileDel="\\|"; $BkFileType="txt"; com.adtec.client.pubapp.ecapframe.Pagination.initialize(elements,10,"2"); } String[] aselementName = {"ETS_TaxType","ETS_BudgetCode","ETS_OLicNo","ETS_Period","ETS_TransferFund"}; String[] fmt_name={"FMT_HOST_CLI_Public_GM_E1_511012_01"}; com.adtec.client.print.LocalPrintDataElementDispose.initPrintPool(); com.adtec.client.print.LocalPrintDataElementDispose.copyIPDataPool2PrintData(aselementName); com.adtec.client.print.LocalPrintDataElementDispose.disposeLocalPrint(fmt_name,aselementName); int allpage = $ECAP_ALLPAGENUM; int nowpage = $ECAP_NOWPAGENUM; if(allpage>1) { for(int i = 2;i<=allpage;i++) { $ECAP_NOWPAGENUM = i; com.adtec.client.pubapp.ecapframe.Pagination.initialize(elements,10,"2"); com.adtec.client.print.LocalPrintDataElementDispose.initPrintPool(); com.adtec.client.print.LocalPrintDataElementDispose.copyIPDataPool2PrintData(aselementName); com.adtec.client.print.LocalPrintDataElementDispose.disposeLocalPrint(fmt_name,aselementName); } }
<script type="text/JavaScript"> function print_selection_GM_E1_51101201() { var returnNo = document.@[email protected]; var prtfilename = document.@[email protected]("|"); var ipgs; if(returnNo=="00000") { ipgs = prtfilename.length; if(prtfilename.length>0) { for(var i=0;i<prtfilename.length;i++){ if(prtfilename[i]!=''){ FmtEngine('电子缴税凭证[第' + (i+1) + '页],共'+ipgs+'页' ,'FMT_HOST_CLI_Public_GM_E1_511012_01',prtfilename[i]); } } } } return; } </script>
2.多层
String[] aselementName ={"ETS_TaxPayerName","ETS_DrAcctNo","ETS_CollTime","ETS_CoComDate","ETS_Amt","ETS_MEMO3","ETS_LicNo","ETS_CoBrchName","TS_F_printnum","TS_F_frontdate"}; String[] fmt_name={"FMT_HOST_CLI_Public_GM_E1_511012_11"}; com.adtec.client.print.LocalPrintDataElementDispose.initPrintPool(); com.adtec.client.print.LocalPrintDataElementDispose.copyIPDataPool2PrintData(aselementName); com.adtec.client.print.LocalPrintDataElementDispose.disposeLocalPrint(fmt_name,aselementName); int len = com.adtec.afc.datapool.EP.getSuffixNo(com.adtec.struct.ECAPTxRunInfo.getInstance().getIpID(), "ETS_TaxPayerName"); if(len>1) { for(int i = 2;i<=len;i++) { com.adtec.client.print.LocalPrintDataElementDispose.initPrintPool(); com.adtec.client.print.LocalPrintDataElementDispose.copyIPDataPool2PrintData(aselementName); com.adtec.client.print.LocalPrintDataElementDispose.disposeLocalPrint(fmt_name,aselementName); } }
<script type="text/JavaScript"> function print_selection_GM_E1_51101211() { var returnNo = document.@[email protected]; var prtfilename = document.@[email protected]("|"); var ipgs; if(returnNo=="00000") { ipgs = prtfilename.length; if(prtfilename.length>0) { for(var i=0;i<prtfilename.length;i++){ if(prtfilename[i]!=''){ FmtEngine('电子缴税凭证[第' + (i+1) + '页],共'+ipgs+'页' ,'FMT_HOST_CLI_Public_GM_E1_511012_11',prtfilename[i]); } } } } return; } </script>
js控制日期
function checkDate(startdate,enddate) { if(startdate.length>=10&&enddate.length>=10) { var date1=new Date(enddate.substring(0,4),enddate.substring(5,7)-1,enddate.substring(8,10)); var date0=new Date(startdate.substring(0,4),startdate.substring(5,7)-1,startdate.substring(8,10)); var difference1 = Date.UTC(date1.getYear(),date1.getMonth(),date1.getDate(),0,0,0)- Date.UTC(date0.getYear(),date0.getMonth(),date0.getDate(),0,0,0); var days1=difference1/1000/60/60/24; if(days1>=0) { if(days1>5) return '11'; return '1'; } else { return '2'; } } else { return '3'; } } if(checkDate(document.@[email protected],document.@[email protected])==2){ return '起始日期不能大于终止日期!'; } else if(checkDate(document.@[email protected],document.@[email protected])==11) { return '只能查询5天内的记录!'; } else{ return ''; }
实现动态授权,子交易可选输出表达式:
com.adtec.client.returncode.OutPutCodeDispose.dispose("GM_F6_91114100_01"); java.util.List alpage = new java.util.ArrayList(); String[] aspage = new String[2]; aspage[0] = "SUBTRAN_OUT_PG"; if("00000".equals(com.adtec.client.util.DataPoolTool.getInfoFromDataPool("__ERR_RET",0))) { aspage[1] = "GM_F6_91114100_01_001010";; } else { aspage[1] = "GM_F6_91114100_init"; } alpage.add(aspage); return alpage;
屏蔽刷卡手工输入
get37650Account_new(document.@[email protected],document.@[email protected],'B','B','0');//只能刷卡 get37650Account_new(document.form2.textaccount,document.form2.textcardno,'B','K','0'); //可以手工输入
页面提交前交换域的值
if($TS_F_paymode.equals("1")) { $HB_accntNumber1 = $TS_F_payaccount; } else { $HB_accntNumber1 = $TS_F_account; $HB_accntNumber2 = $TS_F_payaccount; }
获取系统信息
$QUERY_QryTeller=$TS_F_tellerno; $QUERY_QryBrhm=$TS_F_brchno; String dt = com.adtec.afc.datapool.EP.epGetValue(com.adtec.struct.ECAPTxRunInfo.getInstance().getSpID(), "HB_Head_Date",0); $QUERY_QryDateBeg = dt.substring(4,8) + dt.substring(2,4) + dt.substring(0,2); $QUERY_QryDateEnd = dt.substring(4,8) + dt.substring(2,4) + dt.substring(0,2);
String dt = com.adtec.afc.datapool.EP.epGetValue(com.adtec.struct.ECAPTxRunInfo.getInstance().getSpID(), "HB_Head_Date",0); String err = $__ERR_RET; if ((err.equals("") || err == null)&&dt!=null&&dt.trim().length()==8){ $ETS_CuCleanDate = dt.substring(4,8) + dt.substring(2,4) + dt.substring(0,2); }