📄 orderdetailattribute.java
字号:
package com.doone.fj1w.fjmgr.order.page;
import java.util.Calendar;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import com.doone.data.DataTable;
import com.doone.fj1w.fjmgr.order.AddressDAO;
import com.doone.fj1w.fjmgr.order.CommonMethod;
import com.doone.fj1w.fjmgr.order.ConfigDAO;
import com.doone.fj1w.fjmgr.order.DisplayPage;
public class OrderDetailAttribute extends PageAttribute{
//审核人员页面属性.
private String restoreMan = ""; //审核人
private String restoreTime = ""; //审核时间
private String outDate = ""; //时限
private String restoreContent = ""; //回复内容
//获取单的状态.
private String[] statR = null;
//传入工单id.
private String prodorderid = "";
private String message = "";
private String bakid = "",newid = "";
private DataTable table = null;
private DataTable review = null;
public OrderDetailAttribute(HttpServletRequest request) {
super(request);
}
public void initail() throws RuntimeException{
try {
prodorderid = request.getParameter("PRODORDERID");
if (prodorderid == null || prodorderid.equals("")) {
throw new RuntimeException("参数不正确,无法完成请求操作!");
}
//解Base64.
prodorderid = DisplayPage.decode(prodorderid);
//备份.
bakid = prodorderid;
//控制开始.
OrderDetailControl control = new OrderDetailControl(prodorderid,this.getUserID());
table = control.control();
if (table == null || table.getRows().getCount() == 0) {
throw new RuntimeException("查询历史记录单失败(没有记录),请重新受理!");
}
//获取基本信息.
statR = control.getStatu();
review = control.lastReviewMessage();
prodorderid = control.getChildProdOrderId();
newid = prodorderid;
message = control.getAttention();
} catch (RuntimeException ex) {
throw ex;
}
}
/**
* 获取页面属性.
*
*/
public void view(){
try {
//获取上一次审核信息.
if (review != null && review.getRows().getCount() > 0) {
restoreMan = review.getRow(0).getString("RESTOREMAN");
restoreTime = review.getRow(0).getString("RESTORETIME");
if(restoreTime == null || restoreTime.equals("")){
restoreTime = CommonMethod.getCurrentDate();
}
outDate = table.getRow(0).getString("outDate");
restoreContent = review.getRow(0).getString("restoreContent");
} else {
restoreMan = getUserCode();
Calendar cal = Calendar.getInstance(java.util.Locale.CHINA);
cal.setTime(new Date());
restoreTime = CommonMethod.getCurrentDate();
outDate = "";
restoreContent = "";
}
} catch (Exception ex) {}
}
/**
* 设置程控信息
*
*/
private String getRemoteControlMess(){
//如果当前工单是固话或宽带.
if(isRemoteControl()){
return CommonMethod.orderFunName(this.bakid);
}
return "";
}
/**
* <title>是否有程控信息.</title>
* @return
*/
public boolean isRemoteControl(){
if(this.statR[2].equals("1")||this.statR[2].equals("3")){
//新装
if(statR[3].equals("N")){
return true;
}
}
return false;
}
/**
* <title>是否有终端设备.</title>
* @return
*/
public boolean isTerminal(){
if(!CommonMethod.formatResult(
table.getRow(0).getString("USEMODENMODE")).equals("")){
return true;
}
return false;
}
public String getTermialMessage(){
//终端设备(1、adsl moden租用 2、adsl moden购买(220元/台) 3、□adsl moden自备
String id = CommonMethod.formatResult(table.getRow(0).getString("USEMODENMODE"));
if(id.equals("1")){
return "ADSL MODEN租用";
}else if(id.equals("2")){
return "ADSL MODEN购买(220元/台)";
}else{
return "ADSL MODEN自备";
}
}
/**
* <title>宽带速率与套餐价格</title>
* @return
*/
public boolean isAdslSpeed(){
//存在宽带速率套餐价格.
if(!CommonMethod.formatResult(
table.getRow(0).getString("ADSL_PRICE_ID")).equals("")){
return true;
}
return false;
}
public String getAdslSpeedMessage(){
String price = CommonMethod.formatResult(table.getRow(0).getString("ADSL_PRICE_ID"));
return CommonMethod.getAdslPrice(price);
}
public String getRemoteControl() {
return getRemoteControlMess();
}
/**
* <title>获取错误信息.</title>
* @return
*/
public String getAlertMessage(){
return this.message;
}
public String[] getStatR() {
return statR;
}
public String getBakid() {
return DisplayPage.encode(bakid);
}
public DataTable getTable() {
return table;
}
public DataTable getReview() {
return review;
}
public String getProdorderid() {
return prodorderid;
}
public String getNewid() {
return DisplayPage.encode(newid);
}
public String getMessage() {
return message;
}
public String getOutDate() {
return outDate;
}
public String getRestoreContent() {
return restoreContent;
}
public String getRestoreMan() {
return restoreMan;
}
public String getRestoreTime() {
return restoreTime;
}
public String getCalling() {
try{
ConfigDAO configDAO = new ConfigDAO("CALLING", table.getRow(0).getString("CALLING"));
return (String)configDAO.getParadesc().get(table.getRow(0).getString("CALLING"));
}catch(Exception ex){}
return "";
}
public String getCartName() {
try{
ConfigDAO cartDAO = new ConfigDAO("CARTNAME", table.getRow(0).getString("CARTNAME"));
return (String) cartDAO.getParadesc().get(table.getRow(0).getString("CARTNAME"));
}catch(Exception ex){}
return "";
}
public String getOrderCityCode() {
return CommonMethod.formatResult(table.getRow(0).getString("CITYCODE"));
}
public String getOrderCityName() {//地市名称
return CommonMethod.formatResult(table.getRow(0).getString("CITYNAME"));
}
/**
* 增加工单县市
* 暂时先这样改吧。单独取一次地址表tf_address
* @return
*/
public String getOrderAreaCode() {
String prodorderid = table.getRow(0).getString("PRODORDERID");
String up_id = table.getRow(0).getString("UPPRODORDERID");
if(!"0".equals(up_id))prodorderid = up_id;
AddressDAO ad = new AddressDAO( prodorderid);
String a = ad.getAreacode();
if(a==null || "".equals(a))a = table.getRow(0).getString("CITYCODE")+"00";
return a;
}
/**
* wull 增加因为预选号要父ID名称
* @return
*/
public String getUpPordorderId(){
return table.getRow(0).getString("UPPRODORDERID");
}
public String getOrderAreaName() {//
//wull update 取工单的地市不能取用户注册时的areacode,要取用户受理的areacode
String areaCode = CommonMethod.formatResult(getOrderAreaCode());
if(areaCode.equals("")){
return getOrderCityName();
}
return CommonMethod.getAreaName(areaCode);
}
public String getBuildPaymentMode() {
try{
return (String) new ConfigDAO("BuildPaymentMode",
table.getRow(0).getString("BuildPaymentMode")).getParadesc().get(
table.getRow(0).getString("BuildPaymentMode"));
}catch(Exception ex){return "";}
}
public String getCommPaymentMode() {
try{
return (String) new ConfigDAO("CommPaymentMode",
table.getRow(0).getString("CommPaymentMode")).getParadesc().get(
table.getRow(0).getString("CommPaymentMode"));
}catch(Exception ex){return "";}
}
public String getThirdOrder() {
String thirdOrder = CommonMethod.formatResult(table.getRow(0).getString("CUSTCODE"));
thirdOrder = thirdOrder.equals("") ? "暂无": thirdOrder;
return thirdOrder;
}
public String getWebOrder() {
return CommonMethod.formatResult(table.getRow(0).getString("WebOrder"));
}
public String getProductName() {
return CommonMethod.formatResult(table.getRow(0).getString("ProductName"));
}
public String getOperationType() {
return table.getRow(0).getString("OPERATIONTYPE");
}
public String getOperationTypeName() {
return CommonMethod.getActive(table.getRow(0).getString("OPERATIONTYPE"));
}
public String getThirdMsg() {
return CommonMethod.formatResult(table.getRow(0).getString("THIRDMSG"));
}
public String getStatu() {
return CommonMethod.formatResult(table.getRow(0).getString("STATU"));
}
public String getCartNo() {
return CommonMethod.formatResult(table.getRow(0).getString("CartNo"));
}
public String getIfMove() {
//adsl/固定电话是否同移 1-同移,0-不同移
if(CommonMethod.formatResult(table.getRow(0).getString("IF_MOVE")).equals("1")){
return "同移";
}else{
return "不同移";
}
}
public String getNewAdd() {
return CommonMethod.formatResult(table.getRow(0).getString("NEWADDR"));
}
public String getOldAdd() {
return CommonMethod.formatResult(table.getRow(0).getString("OLDADDR"));
}
public String getPostalcode() {
return CommonMethod.formatResult(table.getRow(0).getString("POSTALCODE"));
}
public String getRelationTel() {
return CommonMethod.formatResult(table.getRow(0).getString("RELATIONTEL"));
}
public String getSERV_NBR_NAME() {
return CommonMethod.formatResult(table.getRow(0).getString("SERV_NBR_NAME"));
}
public String getOrderUserName() {
return CommonMethod.formatResult(table.getRow(0).getString("USERNAME"));
}
public String getUserTime() {
return CommonMethod.formatResult(table.getRow(0).getString("UseTime"));
}
public String getVipNo() {
return CommonMethod.formatResult(table.getRow(0).getString("VIPNO"));
}
public String getAboutTel() {
return CommonMethod.formatResult(table.getRow(0).getString("ABOUTTEL"));
}
public String getEMail() {
return CommonMethod.formatResult(table.getRow(0).getString("EMAIL"));
}
public String getLinkMan() {
return CommonMethod.formatResult(table.getRow(0).getString("LINKMAN"));
}
public String getMailAddress() {
return CommonMethod.formatResult(table.getRow(0).getString("MAILADDRESS"));
}
public String getOtherdesc() {
return CommonMethod.formatResult(table.getRow(0).getString("OTHERDESC"));
}
public String getProductId() {
return CommonMethod.formatResult(table.getRow(0).getString("PRODUCTID"));
}
public String getADSL_PRICE_ID() {
return CommonMethod.formatResult(table.getRow(0).getString("ADSL_PRICE_ID"));
}
/**
* 是否手动受理第三方系统.
* @return
*/
public boolean isMoualTrans(){
String[] value = new String[3];
value[0] = this.getCityCode();
value[1] = statR[2];
value[2] = statR[3];
//目前可以自动送接口的受理单只有厦门,加上泉州市外地区.
//以后会扩展请注意.
if(this.getOrderCityCode().equals("0592")
|| this.getOrderCityCode().equals("0595")){
return CommonMethod.isMoualTrans(value);
}
return false;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -