📄 appealinter.java
字号:
package com.doone.fj1w.fjmgr.order;
import java.util.Hashtable;
import com.doone.iossp.FormBody;
import com.doone.util.FileLogger;
/**
* @docRoot
* <strong>
* 所有的后台审核转派的接口
* </strong>
*
* @serial jdk1.4.2
* @see Hashtable,Vector,IOException,Parameter
* @see WSClientThird,FormBody,FileLogger
* @author wushaol
* @version 1.0 2005-11-08
*/
public class AppealInter {
public static FileLogger _logger = new FileLogger();
public AppealInter(){}
/**
* 宽带故障送接口
*/
/**
* RESULT
0:成功
其它(1、2、3、4、5、6)失败,具体信息内容放在ERR_MSG
错误信息情况:
1:异常错误信息
2:根据帐号在宽带资料中查找无匹配记录情况,不予自动受理
3:根据帐号在宽带资料中查找记录多于一条的情况,不予自动受理
4:此申告信息已经受理,不再受理
5:此工单为拆机单,不予自动受理
6:XML格式错误,无法解析
pass
*/
static public String toADSLAppealThird(Hashtable _fb,String id){
try{
String methodname = "SendLanFaultApply_APP";
String result = CallTuxdoInter.callTuxdo(_fb,
methodname,
_fb.get("AREA_CODE").toString());
FormBody fb = new FormBody();
fb.fromXML(result);
int value = 0 ;
try{
value = Integer.parseInt(fb.getString("RESULT"));
}catch(NumberFormatException nfe){
value = 1;
}
switch(value){
case 0:
//工单流水,即即宽带障碍系统中的故障单号
String faultId =(String)fb.getString("FAULT_ID");
AppealDAO _appeal = new AppealDAO();
if(_appeal.setThirdOrderToAppeal(faultId,id))
return "转派成功~"+faultId;
return "第三方工单流水号为空,请重新转派";
case 1: return "异常错误信息";
case 2: return "根据帐号在宽带资料中查找无匹配记录情况,不予自动受理";
case 3: return "根据帐号在宽带资料中查找记录多于一条的情况,不予自动受理";
case 4: return "此申告信息已经受理,不再受理";
case 5: return "此工单为拆机单,不予自动受理";
case 6: return "XML格式错误,无法解析";
default: break;
}
}catch(Exception ex){
_logger.warn(ex.getMessage(),ex);
}
return "转派失败,原因未知";
}
/**
* @param applid
* 故障id
* @param failuretel
* 故障电话
* @param fault_phen
* 障碍现象ID
* @param contact
* 联系电话
* @param description
* 障碍描述
* @param cityCode
* 归属地市
* @param webOrder
* 网上订单号
* pass
*/
static public String toThirdParty(String applid,
String failuretel,
String fault_phen,
String contact,
String description,
String cityCode,
String webOrder) {
try{
Hashtable ht = new Hashtable();
//故障电话
ht.put("P_TEL_NBR", failuretel);
ht.put("P_FAULT_PHEN", fault_phen);
ht.put("P_CONTACT", contact);
ht.put("P_DESCRIPTION", description);
ht.put("P_CITY_FLAG", cityCode);
ht.put("WEBORDER",webOrder);
// by zengzc 2005-12-16 这个送到接口的目的是专门提供给泉州112用的,
//其他地市均不用。但是不管是哪个地市,数据都送到112系统。
String methodname = "INTER_112_APPEAL";
String result = CallTuxdoInter.callTuxdo(ht,methodname);
FormBody fb = new FormBody();
fb.fromXML(result);
result = fb.getString("P_FLAG");
if (result != null
&& !result.equals("null")
&& result.equals("0")) { //处理结果-1异常情况
String thirdID = fb.getString("P_FAULT_ID");//工单流水
if(AppealDAO.updateOherorder(thirdID, applid))
return "转派成功~"+thirdID;
}else{
return fb.getString("P_FAULT_ID");
}
}catch(Exception ex){
_logger.warn(ex.getMessage(),ex);
}
return "转派失败,原因未知";
}
/**
* param:
* -----------------------
* String userid
* String sex
* accountName --投诉人
* mailAddr —-信函投递地址
* relationName --联系人
* relationTel --联系电话
* custLevel --客户级别
* custImpLevel --重要程度
* appealType1 --1级类型
* appealContent--详细内容
* requRestTime --要求回复时间
* appealComment--处理建议
* P_CITY_FLAG --归属地市
* ------------------------
* @return
*/
static public String toThirdConsu( String applid,
String Acc_nbr,
String sex,
String accountName,
String mailAddr,
String relationName,
String relationTel,
String custLevel,
String custImpLevel,
String appealType1,
String appealType2,
String appealContent,
String requRestTime,
String appealComment,
String P_CITY_FLAG){
try{
Hashtable ht = new Hashtable();
//故障电话
ht.put("Home_city", P_CITY_FLAG);
/**
* 号码经测试至少要8位。在这里做个判段。当其它地市号码小于8位时。
* 自动加上区号。暂时先这样吧。。
* 因为lan与adsl,还有卡号估计都会超过8位。所以当小于等于7位时,当作固话小灵通
* */
String aa = Acc_nbr;
if(Acc_nbr.length()<=7)aa = P_CITY_FLAG+"-"+Acc_nbr;
/*因为接口的值与数据库不符,所以在这里转换该值*/
if ("2".equals(sex)) {
sex = "B";
} else {
sex = "A";
}
ht.put("Acc_nbr", aa);
ht.put("Sex", sex);
ht.put("AccountName", accountName);
ht.put("MailAddr", mailAddr);
ht.put("RelationName", relationName);
ht.put("RelationTel", relationTel);
ht.put("CustLevel", custLevel);
ht.put("CustImpLevel", custImpLevel);
ht.put("AppealType1", appealType1);
ht.put("AppealType2", appealType2);
ht.put("AppealContent", appealContent);
ht.put("RequRestTime", requRestTime);
ht.put("AppealComment", appealComment);
ht.put("P_CITY_FLAG", P_CITY_FLAG);
String methodname = "INTER_180_APPEAL";
String result = CallTuxdoInter.callTuxdo(ht,methodname);
FormBody fb = new FormBody();
fb.fromXML(result);
result = fb.getString("AppealNo");
if (result != null
&& !result.equals("null")
&& !result.equals("")) { //处理结果-1异常情况
String thirdID = fb.getString("AppealNo");//工单流水
if(AppealDAO.updateOherorder(thirdID, applid))
return "转派成功~"+thirdID;
}else{
return fb.getString("ResultInfo");
}
}catch(Exception ex){
_logger.warn(ex.getMessage(),ex);
}
return "转派失败,原因未知";
}
/**
* 888****************固话新装送接口******************************************
*
* 固话送接口
*
* @param String parentid 不知道可空
* @param String prodorderid 不知道可空
* @param V_CUST_ACC_NBR 业务号码
* @param V_CUST_NAME 用户名
* @param V_CUST_IDCARD 身份证号
* @param V_SO_NWKCALL 程控产品ID
* @param V_SO_DDD_PASSWD 长途限制密码
* @param V_SO_ADDR 地址
* @param V_SO_CONTACT_NBR 联系电话
* @param V_SO_CONTACT_MSG 联系人
*
* @return String
*/
public static String webPreSoThird( String parentid,
String prodorderid,
String name,
String card,
String call,
String pwd,
String add,
String nbr,
String msg,
String card_name,
String areacode,
String prodfun_str_code,
String prodfun_str_name,
String vipno,
String otherdesc,
String citycode) {
String exs = "";
try{
Hashtable ht = new Hashtable();
ht.put("V_CUST_ACC_NBR", ""); //业务号码
ht.put("V_CUST_NAME", name); //用户名
ht.put("V_CUST_IDCARD", card);
ht.put("V_SO_NWKCALL", call);
ht.put("V_SO_DDD_PASSWD", pwd);
ht.put("V_SO_ADDR", add);
ht.put("V_SO_CONTACT_NBR", nbr);
ht.put("V_SO_CONTACT_MSG", msg);
ht.put("V_IDCARD_NAME",card_name);
ht.put("V_AREA_CODE",areacode);
ht.put("V_SO_NWKCALL_ALL",prodfun_str_code);//程控ID组串
ht.put("V_SO_NWKCALL_DESC",prodfun_str_name);//程控名称组串
ht.put("V_VIP_NO",vipno);
ht.put("V_NEW_DESC",otherdesc);
String servicename = "ServiceCall_APP";
String methodname = "WebPreSo";
String result = CallTuxdoInter.callTuxdo(ht,
servicename,
citycode,
methodname);
FormBody fb = new FormBody();
fb.fromXML(result);
result = fb.getString("v_code");
if (result != null
&& !result.equals("null")
&& result.equals("0")) { //处理结果-1异常情况
String code = fb.getString("V_SO_NBR");//流水号
//更新第三方流水
if(parentid != null && !parentid.equals(""))
ProdorderDAO.updateOtherorder(code,parentid);
if(prodorderid != null && !prodorderid.equals(""))
ProdorderDAO.updateOtherorder(code,prodorderid);
return "1";
}else{
return "未知异常";
}
}catch(Exception ex){
_logger.warn(ex.getMessage(),ex);
exs = ex.getMessage();
}
return exs;
}
/**
* <p>移机直接送接口</p>
* @param String parentid 不知道可空
* @param String prodorderid 不知道可空
* @param tel
* @param so_type
* @param newaddr
* @param rtel
* @param link
* @param areacode
* @param otherdesc
* @param citycode
* @see wull
* @return
*/
public static String webSoYjThird(String parentid,
String prodorderid,
String tel,
String so_type,
String newaddr,
String rtel,
String link,
String areacode,
String otherdesc,
String citycode) {
String exs = "";
try
{
Hashtable ht = new Hashtable();
ht.put("in_dh", tel); //业务号码
ht.put("in_so_type", so_type); //用户名
ht.put("in_new_addr", newaddr);
ht.put("in_contact_detail", rtel);
ht.put("in_contact_name", link);
ht.put("V_AREA_CODE", areacode);
ht.put("V_MOVE_DESC", otherdesc);
String servicename = "ServiceCall_APP";
String methodname = "WebSoYj"; //业务编码
String result = CallTuxdoInter.callTuxdo(ht,
servicename,
citycode,
methodname);
FormBody fb = new FormBody();
fb.fromXML(result);
result = fb.getString("out_code");//状态,如果返回0时,表示成功
if (result != null
&& !result.equals("null")
&& result.equals("0")) {
String out_so_nbr = fb.getString("out_so_nbr");//流水号
if(parentid != null && !parentid.equals(""))
ProdorderDAO.updateOtherorder(out_so_nbr,parentid);
if(prodorderid != null && !prodorderid.equals(""))
ProdorderDAO.updateOtherorder(out_so_nbr,prodorderid);
ProdorderDAO.updateOtherMSG(fb.getString("out_char"),prodorderid) ;
ProdorderDAO.updateOtherMSG(fb.getString("out_char"),parentid) ;
return "1";
}else{
//转派失败的时候,将接口返回的错误信息写到数据库中去.
ProdorderDAO.updateOtherMSG(fb.getString("out_char"),prodorderid) ;
ProdorderDAO.updateOtherMSG(fb.getString("out_char"),parentid) ;
return fb.getString("out_char");
}
} catch (Exception ex) {
_logger.warn(ex.getMessage(), ex);
exs = ex.getMessage();
}
return exs;
}
/**
* <title>湖北业务受理单送接口的总入口.</title>
*
* @param prodorderDAO 定单详细资料.
* @return
*/
public String hbToInterface(final String cityCode ,final ProdorderDAO prodorderDAO){
try {
String servicename = "ServiceCall_APP";
String methodname = "WebPreSo";
String result = CallTuxdoInter.callTuxdo(prodorderDAO.toHashtable(),
servicename,
cityCode,
methodname);
FormBody fb = new FormBody();
fb.fromXML(result);
result = fb.getString("v_code");
if (result != null
&& !result.equals("null")
&& result.equals("0")) { //处理结果-1异常情况
String code = fb.getString("V_SO_NBR");//流水号
//更新第三方流水
if(!prodorderDAO.getUPPRODORDERID().equals(""))
ProdorderDAO.updateOtherorder(code,prodorderDAO.getUPPRODORDERID());
if(!prodorderDAO.getPRODORDERID().equals(""))
ProdorderDAO.updateOtherorder(code,prodorderDAO.getPRODORDERID());
return "1";
}else{
return "未知异常";
}
} catch (Exception ex) {
_logger.warn(ex.getMessage(), ex);
}
return "";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -