Commit 88cd98eb by dupengfei

修改人员编号截取方式

parent 9011ff5c
...@@ -11,6 +11,8 @@ import javax.xml.rpc.ParameterMode; ...@@ -11,6 +11,8 @@ import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.ServiceException; import javax.xml.rpc.ServiceException;
import javax.xml.rpc.encoding.XMLType; import javax.xml.rpc.encoding.XMLType;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/** /**
* <P>Copyright: Founder Copyright (c) 2020</P> * <P>Copyright: Founder Copyright (c) 2020</P>
...@@ -75,13 +77,32 @@ public class QueryService { ...@@ -75,13 +77,32 @@ public class QueryService {
//定义接口对应方法 //定义接口对应方法
String interfaceMethod="QueryService"; String interfaceMethod="QueryService";
String dataObjectCode="R-BZCJ-XYRXX-001"; String dataObjectCode="R-BZCJ-XYRXX-001";
url = propertiesUtil.getValue("nmjz_interfaceurl_"+rybh.substring(1,5)); if (HasDight(rybh.substring(0, 3))){
url = propertiesUtil.getValue("nmjz_interfaceurl_"+rybh.substring(1,5));
}else {
url = propertiesUtil.getValue("nmjz_interfaceurl_"+rybh.substring(3,7));
}
System.out.println("调用警综接口地址url="+url); System.out.println("调用警综接口地址url="+url);
//定义接口查询参数xml //定义接口查询参数xml
String paraXml= ServiceUtil.createXmlQureyPerson(condition, dataObjectCode); String paraXml= ServiceUtil.createXmlQureyPerson(condition, dataObjectCode);
String result=callService(paraXml,interfaceMethod); String result=callService(paraXml,interfaceMethod);
return result; return result;
} }
/*
* 判断字符串是否包含数字
*
* */
public static boolean HasDight(String url){
boolean flag = false;
Pattern p = Pattern.compile(".*\\d+.*");
Matcher m = p.matcher(url);
if(m.matches()){
flag = true;
}
return flag;
}
public String createKey(String unitCode) { public String createKey(String unitCode) {
//定义接口对应方法 //定义接口对应方法
String interfaceMethod="CreateGiapPrimaryKey"; String interfaceMethod="CreateGiapPrimaryKey";
......
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