ecapページ処理テクニック(ダイナミックライセンスを実現し、ドメイン値を交換し、カードによる手動入力を遮断する)
データ検討
共通データ要素
機構番号取得機構名
インベントリ印刷
多層データ要素の処理
ページバインド多層データ要素
ページが成功した後にイベントをコミット
エコー
中間業務のジャンプ割引取引
複数ページ印刷
1.ファイル形式
2.多層
js制御日
動的認可、サブトランザクションのオプション出力式を実現します.
シールドカード手動入力
ページコミット前のスワップドメインの値
システム情報の取得
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);
}