凭证相关--凭证接口ip调整
This commit is contained in:
parent
3c4d6f33f1
commit
3f2384056c
@ -1,5 +1,6 @@
|
||||
package com.tenwa.voucher.serviceImp;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -8,6 +9,7 @@ import org.junit.Test;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.amarsoft.dict.als.cache.CacheLoaderFactory;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
@ -19,6 +21,7 @@ import com.tenwa.voucher.service.CustomerService;
|
||||
*/
|
||||
public class CustomerServiceImpl implements CustomerService{
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public String Customer_syn(String CUST_ID,String CUST_NAME, String CUST_NO,String CUST_STATUS){
|
||||
// 获取当前系统时间
|
||||
String startime = StringFunction.getTodayNow();
|
||||
@ -44,11 +47,17 @@ public class CustomerServiceImpl implements CustomerService{
|
||||
// return "传输失败:纳税人识别号不能为空 !";
|
||||
}else if(CUST_STATUS==null || CUST_STATUS=="" || CUST_STATUS.length()<=0){
|
||||
return "传输失败:标识不能为空 !";
|
||||
}else if(!"U".equals(CUST_STATUS) && !"I".equals(CUST_STATUS)){
|
||||
return "传输失败:传输标识有误 !";
|
||||
}
|
||||
|
||||
// 执行sql, 用于获取数据及判断新增 or 修改操作
|
||||
sql1="SELECT cust_id,cust_name FROM CUSTOMER_LIST CL WHERE (CUST_ID ='"+CUST_ID+"' OR CUST_NAME ='"+CUST_NAME+"') ";
|
||||
List<Map<String, String>> list = DataOperatorUtil.getDataBySql(Sqlca, sql1, null);
|
||||
sql1="SELECT cust_id,cust_name FROM CUSTOMER_LIST CL WHERE (CUST_ID =:CUST_ID OR CUST_NAME =:CUST_NAME) ";
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("CUST_ID", CUST_ID);
|
||||
map.put("CUST_NAME", CUST_NAME);
|
||||
|
||||
List<Map<String, String>> list = DataOperatorUtil.getDataBySql(Sqlca, sql1, map);
|
||||
|
||||
// 如果状态为大写I, 并且查询解果list没有查到结果, 则新增一条客商信息
|
||||
if("I".equals(CUST_STATUS) && (list.size()==0 || list == null)) {
|
||||
|
||||
@ -21,7 +21,7 @@ public class WebServiceFilter implements Filter {
|
||||
public void doFilter(ServletRequest req, ServletResponse res,
|
||||
FilterChain chain) throws IOException, ServletException {
|
||||
// TODO Auto-generated method stub
|
||||
String ips = "0:0:0:0:0:0:0:1|192.168.0.1|127.0.0.1|172.16.21.220|219.142.26.222|172.16.21.48";
|
||||
String ips = "0:0:0:0:0:0:0:1|192.168.0.1|127.0.0.1|172.16.21.220|219.142.26.222|172.16.21.48|172.16.21.249|172.16.23.226";
|
||||
if(ips.indexOf(req.getRemoteAddr()) != -1){
|
||||
chain.doFilter(req, res);
|
||||
}else{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user