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

📄 agent.java

📁 java swing源码 欢迎下载 有问题请联系 我一定负责到底
💻 JAVA
字号:
/**
 * 代理人注册
 */
package com.NCL.axis;

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

public class Agent{

	public static int number;
	public static String dates = "";
	
	/**
	 * 代理人注册
	 * @param IDValue 代理人号码
	 * @return
	 */
	public Element AgentRegist(String IDValue){
		Element outCustom = null;
		
		axisTypeSearch custom = new axisTypeSearch("00011005");
		
		String date = Data.getCurrentDate();
		String time = Data.getCurrentTime();
		String numbers = "00011005" + date.replaceAll("-", "");
		if(date.equals(dates)&&Integer.toString(number).length()<=6){
			number++;
		}else{
			number = 1;
			dates = date;
		}
		numbers += getStochastic(""+number);
		custom.setBaseElementIn("TransDate", date);
		custom.setBaseElementIn("TransTime", time);
		custom.setBaseElementIn("TransSeq", numbers);
		custom.setInputElement("AgentCode", IDValue);
		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();
	}
	
	/**
	 * 构造6位序列号,不足6位的在左侧补0
	 * @param num
	 * @return
	 */
	private String getStochastic(String num){
		String tt="";
		if(num.length()<6){
			for(int count=0;count<5-num.length();count++){
				tt+="0";
			}
		}
		return tt+num;
	}
	
	public static void main(String[]str){
	}
}

⌨️ 快捷键说明

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