📄 adslflowservice.java
字号:
}
}
AdslFlowService adslFlowService = new AdslFlowService();
sResult = adslFlowService.isLock(isLock,tf_BSSFlowRecord);
return sResult;
} catch (Exception rux) {
log.warn(rux.getMessage(), rux);
return "0";
}
}
/**业务受理时发起调度
*
* @param request
* @param response
* @param _map
* @return
*/
public static String applyFinish(ServletRequest request, ServletResponse response, Map _map) {
boolean isLock = true;
String sResult = "";
TF_BSSFlowRecord tf_BSSFlowRecord = null;
try {
if (_map != null) {
String prodOrderId = (String) _map.get("PRODORDERID");
String so_type_id = (String) _map.get("SOiSO_TYPE_ID");
tf_BSSFlowRecord = new TF_BSSFlowRecord(new DacClient(),
Long.parseLong(prodOrderId));
String SOiSO_ID = tf_BSSFlowRecord.getRecordIDS("SOISO_ID");
String SOiSO_SEQ = tf_BSSFlowRecord.getRecordIDS("SOISO_SEQ");
String SOiSO_NBR = tf_BSSFlowRecord.getRecordIDS("SOISO_NBR");
String SOiAPPL_DATE = tf_BSSFlowRecord.getRecordIDS("SOIAPPL_DATE");
DataTable custArchives_dt = tf_BSSFlowRecord.getRecordFrom(BssParameter.CUST_ARCHIVES_TABLE);
CustArchivesBean custArchivesBean = AdslFlow.setfirstflow(custArchives_dt);
String SOiAREA_ID = custArchivesBean.getSERVIAREA_ID();
String SOiSO_TYPE_ID = so_type_id;//申请类型编码(新装)
String SOiSERV_TYPE_ID = tf_BSSFlowRecord.getRecordIDS("SERVISERV_TYPE_ID");
String cityCode = tf_BSSFlowRecord.getRecordIDS("CITYCODE");
FormBody result = BssInter1.callWebDealNewOrd(
SOiSO_ID,SOiSO_SEQ,SOiSO_NBR,SOiAPPL_DATE,SOiAREA_ID,SOiSO_TYPE_ID,SOiSERV_TYPE_ID,cityCode);
if(!result.getString("doonewebfld").equals("E")){
sResult = "0";
}
if(!sResult.equals("0")) {
isLock = false;
/**生成一张跟据上一次生成记录的子记录单*/
//修改原单和子单的状态和信息
Tf_ProdOrder tf_prodOrder = new Tf_ProdOrder(new DacClient(), Long.parseLong(prodOrderId));
tf_prodOrder.setProgressstate("2");
tf_prodOrder.setBosomprogressstate("2");
tf_prodOrder.setCustcode(SOiSO_NBR);
tf_prodOrder.save();
ProdorderDAO _pp = new ProdorderDAO();
_pp = _pp.getUserLockOrder(prodOrderId,"");
_pp.setUPPRODORDERID(prodOrderId);
_pp.addLockProdOrder(_pp);
/*******************/
}
}
sResult = "1";
} catch (Exception rux) {
log.warn(rux.getMessage(), rux);
isLock = false;
sResult = "0";
}
AdslFlowService adslFlowService = new AdslFlowService();
sResult = adslFlowService.isLock(isLock,tf_BSSFlowRecord);
return sResult;
}
/**费用确认
*
* @param request
* @param response
* @param _map
* @return
*/
public static String feeCheck(ServletRequest request, ServletResponse response, Map _map) {
try {
if (_map != null) {
String prodOrderId = (String) _map.get("PRODORDERID");
String feeMethods = (String) _map.get("FEEMETHOD");
String feeMethod[] = ExtString.split(feeMethods,"and",null,0);
TF_BSSFlowRecord tf_BSSFlowRecord = new TF_BSSFlowRecord(new DacClient(),
Long.parseLong(prodOrderId));
DataTable applFeeDt = tf_BSSFlowRecord.getRecordFrom(BssParameter.APPLFEE_TABLE);
if(applFeeDt != null){
String disctTypeId = tf_BSSFlowRecord.getRecordIDS("DISCTTYPE");
String disctType = "";
String soId = "";
String soSeq = "";
String feeId = "";
String fee = "";
String SO_CHARGEiPAY_METHOD_ID = "";
String cityCode = tf_BSSFlowRecord.getRecordIDS("CITYCODE");
for(int i=0;i<applFeeDt.getRows().getCount();i++){
DataRow dr = applFeeDt.getRow(i);
//判断此费用编码是否允许打入话费
if(!dr.getString("SO_CHARGEiACCT_COLL").equals("0.00") && !dr.getString("SO_CHARGEiACCT_COLL").equals("0.00") ) {
DataTable dt =
BssInter1.callWebSayFee(dr.getString("FEE_TYPEiFEE_TYPE_ID"),cityCode);
String isPass = dt.getRow(0).getString("SO_DISCT_PROTOCOLiSEQ");
if(isPass.equals("1")) {
return "1";
}
}
disctType += disctTypeId+"【★】";
soId += tf_BSSFlowRecord.getRecordIDS("SOISO_ID")+"【★】";
soSeq += tf_BSSFlowRecord.getRecordIDS("SOISO_SEQ")+"【★】";
feeId += dr.getString("STAND_FEEISTAND_FEE_ID")+"【★】";
fee += dr.getString("SO_CHARGEIACCT_RECE")+"【★】";
SO_CHARGEiPAY_METHOD_ID += "R"+"【★】";
}
DataTable dt = BssInter1.callWebApplFee(disctType,soId,soSeq,
feeId,fee,SO_CHARGEiPAY_METHOD_ID,cityCode);
tf_BSSFlowRecord.setStepSN(12);
tf_BSSFlowRecord.save();
if(dt == null) {
return "";
}
}
else {
return "";
}
}
return "0";
} catch (Exception rux) {
log.warn(rux.getMessage(), rux);
return "";
}
}
/**判断两个协议是否依赖
*
* @param protocolId
* @param prodOrderId
* @return
*/
public static String relaBProto(String protocolId,String prodOrderId) {
try {
String intfo = "";
boolean isPass = true;
if (prodOrderId != null) {
TF_BSSFlowRecord tf_BSSFlowRecord = TF_BSSFlowRecord.getBSSFlowRecord(new DacClient(),
Long.parseLong(prodOrderId));
DataTable select_protocol_dt = tf_BSSFlowRecord.getRecordFrom(BssParameter.SELECT_PROTOCOL_TABLE);
String protocolName = getInfoByField_value(tf_BSSFlowRecord.getRecordFrom("ADSLPROTOCOL_TABLE"),
protocolId,"PROT_INFO_SYSiPROTOCOL_ID","PROT_INFO_SYSiPROTOCOL_NAME");
for(int i=0;i<protocolName.length();i++) {
if(protocolName.charAt(i) == '{') {
intfo = protocolName.substring(i+1, i+4);
if(intfo.equals("依赖于")) {
isPass = false;
intfo = protocolName.substring(i+6,protocolName.length()-1);
}
}
}
if(isPass == false) {
String[] reProtocolName = ExtString.split(intfo,"或",null,0);
String reProtocolId = "";
boolean isHaving = false;
if(select_protocol_dt != null && select_protocol_dt.getRows().getCount() > 0) {
for(int j=0;j<select_protocol_dt.getRows().getCount();j++) {
reProtocolId = select_protocol_dt.getRow(j).getString(BssParameter.PROTOCOLID);
for(int i=0;i<reProtocolName.length;i++) {
protocolId = getInfoByField_value(tf_BSSFlowRecord.getRecordFrom("ADSLPROTOCOL_TABLE"),
reProtocolName[i],"PROT_INFO_SYSiPROTOCOL_NAME","PROT_INFO_SYSiPROTOCOL_ID");
//System.out.println("protocolId==>"+protocolId);
if(protocolId.equals(reProtocolId)) {
isHaving = true;
break;
}
if(isHaving == true) break;
}
}
}
if(isHaving == false) {
return "“" + intfo + "["+getInfoByField_value(tf_BSSFlowRecord.getRecordFrom("ADSLPROTOCOL_TABLE"),
intfo,"PROT_INFO_SYSiPROTOCOL_NAME","PROT_INFO_SYSiPROTOCOL_ID")+"]”";
}
else {
return "0";
}
}
}
return "0";
} catch (Exception rux) {
log.warn(rux.getMessage(), rux);
return "";
}
}
/**判断两个协议是否依赖
*
* @param protocolId
* @param prodOrderId
* @return
*/
public static String relaBProtoBySelect(String protocolId,String prodOrderId) {
try {
String intfo = "";
boolean isPass = true;
if (prodOrderId != null) {
TF_BSSFlowRecord tf_BSSFlowRecord = TF_BSSFlowRecord.getBSSFlowRecord(new DacClient(),
Long.parseLong(prodOrderId));
DataTable select_protocol_dt = tf_BSSFlowRecord.getRecordFrom(BssParameter.SELECT_PROTOCOL_TABLE);
String reProtocolId = "";
String reProtocolName = "";
String[] reProtocolNames = null;
if(select_protocol_dt != null && select_protocol_dt.getRows().getCount() > 0) {
for(int j=0;j<select_protocol_dt.getRows().getCount();j++) {
reProtocolId = select_protocol_dt.getRow(j).getString(BssParameter.PROTOCOLID);
reProtocolName = getInfoByField_value(tf_BSSFlowRecord.getRecordFrom("ADSLPROTOCOL_TABLE"),
reProtocolId,"PROT_INFO_SYSiPROTOCOL_ID","PROT_INFO_SYSiPROTOCOL_NAME");
for(int i=0;i<reProtocolName.length();i++) {
if(reProtocolName.charAt(i) == '{') {
intfo = reProtocolName.substring(i+1, i+4);
if(intfo.equals("依赖于")) {
intfo = reProtocolName.substring(i+6,reProtocolName.length()-1);
reProtocolNames = ExtString.split(intfo,"或",null,0);
String reProtocolId1 = "";
for(int l=0;l<reProtocolNames.length;l++) {
reProtocolId1 = AdslFlowService.getInfoByField_value(tf_BSSFlowRecord.getRecordFrom("ADSLPROTOCOL_TABLE"),
reProtocolNames[l],"PROT_INFO_SYSiPROTOCOL_NAME","PROT_INFO_SYSiPROTOCOL_ID");
if(protocolId.equals(reProtocolId1)) {
isPass = false;
break;
}
}
if(isPass == false) break;
}
}
}
}
}
if(isPass == false) {
return "“" + getInfoByField_value(tf_BSSFlowRecord.getRecordFrom("ADSLPROTOCOL_TABLE"),
reProtocolId,"PROT_INFO_SYSiPROTOCOL_ID","PROT_INFO_SYSiPROTOCOL_NAME") + "[" +
protocolId+"]”";
}
else {
return "0";
}
}
return "0";
} catch (Exception rux) {
log.warn(rux.getMessage(), rux);
return "";
}
}
/**判断两个协议是否依赖
*
* @param protocolId
* @param prodOrderId
* @return
*/
/*public static String relaBProto(String protocolId,String prodOrderId) {
try {
if (prodOrderId != null) {
TF_BSSFlowRecord tf_BSSFlowRecord = TF_BSSFlowRecord.getBSSFlowRecord(new DacClient(),
Long.parseLong(prodOrderId));
DataTable protocol_dt = tf_BSSFlowRecord.getRecordFrom("ADSLPROTOCOL_TABLE");
DataTable select_protocol_dt = tf_BSSFlowRecord.getRecordFrom(BssParameter.SELECT_PROTOCOL_TABLE);
String reProtocolId = "";
String cityCode = tf_BSSFlowRecord.getRecordIDS("CITYCODE");
String serviServ_id = tf_BSSFlowRecord.getRecordIDS(BssParameter.SERVISERV_ID);
if(protocol_dt != null && protocol_dt.getRows().getCount() > 0){
for(int i=0;i<protocol_dt.getRows().getCount();i++) {
String reProtocolId1 = protocol_dt.getRow(i).getString("PROT_INFO_SYSiPROTOCOL_ID");
String level = protocol_dt.getRow(i).getString("PROT_INFO_SYSIPROTOCOL_LEVEL");
reProtocolId = "!"+reProtocolId1+"!";
if(!level.equals("2")) {
DataTable dt = BssInter6.callWebRelaBProto(protocolId,reProtocolId,serviServ_id,cityCode);
boolean isHaving = false;
if(dt.getRow(0).getString("SO_DISCT_PROTOCOLiSEQ").equals("1")) {
if(select_protocol_dt != null && select_protocol_dt.getRows().getCount() > 0) {
for(int j=0;j<select_protocol_dt.getRows().getCount();j++) {
String reProtocolId2
= select_protocol_dt.getRow(j).getString(BssParameter.PROTOCOLID);
if(reProtocolId1.equals(reProtocolId2)) {
isHaving = true;
break;
}
}
}
if(isHaving == false) {
return "[" + getInfoByField_value(tf_BSSFlowRecord.getRecordFrom("ADSLPROTOCOL_TABLE"),
reProtocolId1,"PROT_INFO_SYSiPROTOCOL_ID","PROT_INFO_SYSiPROTOCOL_NAME") + "]";
}
else {
return "0";
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -