📄 bsssreachcustimpl.java
字号:
package com.doone.fj1w.fjmgr.order.list;
import java.io.IOException;
import java.util.Map;
import com.doone.data.DataTable;
import com.doone.fj1w.fjmgr.order.BssInter1;
import com.doone.fj1w.fjmgr.order.BssInter2;
import com.doone.fj1w.fjmgr.order.BssInter4;
import com.doone.fj1w.fjmgr.order.BssReferCustBean;
import com.doone.fj1w.fjmgr.order.BssReferProductBean;
import com.doone.iossp.FormBody;
import com.doone.util.FileLogger;
/**
* <strong>
* bss接口获取客户的所有信息,
* 包括:增加,查询客户信息
* </strong>
* @author predan
*
*/
public class BssSreachCustImpl implements QueryListInterface{
private static final long serialVersionUID = 1L;
static private FileLogger log = new FileLogger();
public BssSreachCustImpl() {
}
/**
* <code>获取bss接口的地区信息</code>
* @param request
* @param response
* @param _map
*/
static public DataTable getBssArea(Map _map) {
try{
if(_map == null)
throw new RuntimeException("获取bss接口的地区信息的入参为空。");
String citycode = (String)_map.get("CITYCODE");
String flag = (String)_map.get("FLAG");
DataTable _dt = BssInter2.callWebQryAreaInfo(flag,citycode);
if(_dt == null)throw new java.io.IOException("网络异常,获取地区信息失败。");
return _dt;
}catch(java.io.IOException iox){
log.warn(iox.getMessage(),iox);
}catch(RuntimeException rux){
log.warn(rux.getMessage(),rux);
}
throw new RuntimeException("未知异常");
}
public DataTable getList(Map map) throws RuntimeException {
return null;
}
/**
* <code>获取地区名</code>
* @param areaid
* @param citycode
* @return
*/
static public String getAreaName(String areaid,String citycode){
DataTable _dt = null;
try{
_dt =BssInter2.callWebQryAreaInfo("6",citycode);
}catch(Exception ex){
return "";
}
if(_dt != null && _dt.getRows().getCount() == 0) return "";
int i = _dt.getRows().getCount() ;
for(;
-- i >= 0
&& !areaid.equals(_dt.getRow(i).getString("AREA_INFOiAREA_ID"));
);
if(i >= 0)
return _dt.getRow(i).getString("AREA_INFOiNAME");
return "";
}
/**
* <code>根据条件查询客户编码</code>
* @param _map
* @return
*/
public static DataTable sreachCust(Map _map){
try{
if(_map == null)
throw new RuntimeException("获取bss接口的地区信息的入参为空。");
String QRY_OPER_MODEL = (String)_map.get("QRY_OPER_MODEL");
String TEMP_STS_WORDS2 = "";
String CUSTiCUST_SORT_ID = "";
String CUSTiCUST_NAME = "";
String SERViSERV_TYPE_ID = "";
String SERV_ACC_NBRiSERV_ACC_NBR = "";
String CUSTiCUST_SIMP_NAME = "";
String CUSTiCERT_TYPE = "";
String CUSTiCERT_NBR = "";
String CUSTiADDRESS_ID = "";
String CUSTiMAIL_ADDR = "";
String CUSTiVIP = "";
if(QRY_OPER_MODEL == null || QRY_OPER_MODEL.equals(""))
throw new RuntimeException("请输入您的查询方式。");
if(QRY_OPER_MODEL.equals("1")){//客户名称查询
CUSTiCUST_NAME = (String)_map.get("CUSTiCUST_NAME");
}
if(QRY_OPER_MODEL.equals("2")){//业务号码查询
SERViSERV_TYPE_ID = (String)_map.get("SERViSERV_TYPE_ID");
SERV_ACC_NBRiSERV_ACC_NBR = (String)_map.get("SERV_ACC_NBRiSERV_ACC_NBR");
}
if(QRY_OPER_MODEL.equals("3")){//客户简拼
CUSTiCUST_SIMP_NAME = (String)_map.get("CUSTiCUST_SIMP_NAME");
}
if(QRY_OPER_MODEL.equals("4")){//证件号码
CUSTiCERT_TYPE = (String)_map.get("CUSTiCERT_TYPE");
CUSTiCERT_NBR = (String)_map.get("CUSTiCERT_NBR");
}
if(QRY_OPER_MODEL.equals("5")){//客户地址
CUSTiADDRESS_ID = (String)_map.get("CUSTiADDRESS_ID");
CUSTiMAIL_ADDR = (String)_map.get("CUSTiMAIL_ADDR");
}
if(QRY_OPER_MODEL.equals("6")){//贵宾卡号
CUSTiVIP = (String)_map.get("CUSTiVIP");
}
String citycode = (String)_map.get("CITYCODE");
String CUSTiAREA_ID = (String)_map.get("CUSTiAREA_ID");
DataTable _dt = BssInter1.callWebQryCustName(
QRY_OPER_MODEL,
TEMP_STS_WORDS2,
CUSTiAREA_ID,
CUSTiCUST_SORT_ID,
CUSTiCUST_NAME,
SERViSERV_TYPE_ID,
SERV_ACC_NBRiSERV_ACC_NBR,
CUSTiCUST_SIMP_NAME,
CUSTiCERT_TYPE,
CUSTiCERT_NBR,
CUSTiADDRESS_ID,
CUSTiMAIL_ADDR,
CUSTiVIP,
citycode);
if(_dt == null)
throw new java.io.IOException("网络异常,获取地区信息失败。");
return _dt;
}catch(java.io.IOException iox){
log.warn(iox.getMessage(),iox);
}catch(RuntimeException rux){
log.warn(rux.getMessage(),rux);
}
throw new RuntimeException("未知异常");
}
/**
* <code>查询服务类型信息</code>
* @param _map
* @return
*/
public static DataTable getOrderList(Map _map){
try{
if(_map == null)
throw new RuntimeException("获取bss接口的地区信息的入参为空。");
String citycode = (String)_map.get("CITYCODE");
String type = (String)_map.get("TYPE");//这哪一种类型的列表
if(type == null) throw new RuntimeException("入参中不存在获取哪一类型的列表。");
if(type.equals("2"))
return BssInter2.callWebQryServType(citycode);
throw new UnsupportedOperationException("没有这一类型的列表。");
}catch(IOException iox){
log.warn(iox.getMessage(),iox);
}
throw new RuntimeException("未知异常");
}
/**
* <code>
* 新增客户
* </code>
* @param _brCB
* @param city
*/
public static String addCustomer(BssReferCustBean _brCB,String city){
try{
if(_brCB == null)
throw new NullPointerException("新增客户信息不存在。");
FormBody _fb = BssInter1.callWebReferCust(_brCB,city);
if(_fb == null)
throw new RuntimeException("新增客户结果失败");
// CUSTiCUST_ID 客户编码
// CUSTiCUST_CODE 客户代码
String cust_id = _fb.getString("CUSTiCUST_ID");
String cust_code= _fb.getString("CUSTiCUST_CODE");
return cust_id+"#"+cust_code;
}catch(IOException iox){
log.warn(iox.getMessage(),iox);
}
throw new RuntimeException("未知异常");
}
/**
* <code>
* 查询客户信息
* </code>
* @param _map
* @return
*/
public static BssReferCustBean queryCustomer(Map _map){
try{
if(_map == null)
throw new RuntimeException("不存在入参");
String oper_log_id = "QZ00015822";
String cust_id = (String)_map.get("CUSTiCUST_ID");
String citycode = (String)_map.get("CITYCODE");
return BssInter2.callWebQryCustPatic(oper_log_id,cust_id,citycode);
}catch(IOException iox){
log.warn(iox.getMessage(),iox);
}
throw new RuntimeException("未知异常");
}
public static DataTable query_customer(Map _map){
try{
if(_map == null)
throw new RuntimeException("不存在入参");
String oper_log_id = "QZ00015822";
String cust_id = (String)_map.get("CUSTiCUST_ID");
String citycode = (String)_map.get("CITYCODE");
return BssInter2.call_webQryCustPatic(oper_log_id,cust_id,citycode);
}catch(IOException iox){
log.warn(iox.getMessage(),iox);
}
throw new RuntimeException("未知异常");
}
/**
* <code>
* 查询产品档案信息信息
* </code>
* @param _map
* @return
*/
public static BssReferProductBean queryProductInfo(Map _map){
try{
if(_map == null)
throw new RuntimeException("不存在入参");
String qry_oper_model = (String)_map.get("QRY_OPER_MODEL");
String serv_id = (String)_map.get("SERVISERV_ID");
String key_word = (String)_map.get("KEY_WORD");
String serv_type_id = (String)_map.get("SERV_TYPE_ID");
String so_type_id = (String)_map.get("SO_TYPE_ID");
String flag2 = "";
if(Integer.parseInt(serv_type_id) > 30){
flag2 = "0";
}
else if(so_type_id.equals("20") ||
so_type_id.equals("22") ||
so_type_id.equals("26") ||
so_type_id.equals("27")){
flag2 = "0";
}
else{
flag2 = "1";
}
String citycode = (String)_map.get("CITYCODE");
return BssInter4.callWebQryServ(qry_oper_model,serv_id,key_word,flag2,citycode);
}catch(IOException iox){
log.warn(iox.getMessage(),iox);
}
throw new RuntimeException("未知异常");
}
public static DataTable query_productInfo(Map _map){
try{
if(_map == null)
throw new RuntimeException("不存在入参");
String qry_oper_model = (String)_map.get("QRY_OPER_MODEL");
String serv_id = (String)_map.get("SERVISERV_ID");
String key_word = (String)_map.get("KEY_WORD");
String serv_type_id = (String)_map.get("SERV_TYPE_ID");
String so_type_id = (String)_map.get("SO_TYPE_ID");
String flag2 = "";
if(Integer.parseInt(serv_type_id) > 30){
flag2 = "0";
}
else if(so_type_id.equals("20") ||
so_type_id.equals("22") ||
so_type_id.equals("26") ||
so_type_id.equals("27")){
flag2 = "0";
}
else{
flag2 = "1";
}
String citycode = (String)_map.get("CITYCODE");
return BssInter4.call_webQryServ(qry_oper_model, serv_id, key_word, flag2, citycode);
}catch(Exception iox){
log.warn(iox.getMessage(),iox);
}
throw new RuntimeException("未知异常");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -