⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cardverify.java

📁 java swing源码 欢迎下载 有问题请联系 我一定负责到底
💻 JAVA
字号:
/**
 * 卡单验证
 */
package com.NCL.axis;

import org.dom4j.Element;
import com.sinosoft.common.*;

public class CardVerify{

	public static int number;
	public static String dates = "";

	/**
	 * 00012012团卡在线激活.xls
	 * 
	 * **/
	public Element CardVerify(String CardType,
			String CardNo,String PassWord,String ContPlanCode){
		Element outCustom = null;
		axisType custom = new axisType("00012021_CVerify");
		String date = Data.getCurrentDate();
		String time = Data.getCurrentTime();
		String numbers = "00012012" + date.replaceAll("-", "");
		if(date.equals(dates)&&Integer.toString(number).length()<=5){
			number++;
		}else{
			number = 1;
			dates = date;
		}
		numbers += getStochastic(""+number);
		custom.setBaseElementIn("TransDate", date);
		custom.setBaseElementIn("TransTime", time);
		custom.setBaseElementIn("TransSeq", numbers);
		custom.setInputElement("DealType", "4");
		custom.setInputElement("CardType", CardType);
		custom.setInputElement("CardNo", CardNo);
		custom.setInputElement("ActType", "2");
		custom.setInputElement("PassWord", PassWord);
		custom.setInputElement("ContPlanCode", ContPlanCode);
		Element eles = custom.getOupPutElecment();
		if(eles!=null){
		if( eles.elementIterator().hasNext())
			outCustom = (Element) eles.elementIterator().next();
		}
		return outCustom;
	}
	/**
	 * 根据eleName获取值
	 * @param ele 
	 * @param eleName
	 * @return
	 */
	public String getElementText(Element ele,String eleName){
		return ele.element(eleName).getText();
	}
	/**
	 * 构造5位序列号,不足5位的在左侧补0
	 * @param num
	 * @return String
	 */
	private String getStochastic(String num){
		String tt="";
		if(num.length()<5){
			for(int count=0;count<5-num.length();count++){
				tt+="0";
			}
		}
		return tt+num;
	}
	public static void main(String[]set){
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -