⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prodfunlogimpl.java

📁 电信的网厅的整站代码
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
								else {
									_sb.append(drresult.getString(icol).trim().equals("")?" ":drresult.getString(icol).trim());
								}
							}
							else if(icol == 3) {
								if(!drresult.getString(icol).trim().equals("0")) {
									String time = drresult.getString("受理时间").trim();
									_sb.append("<a href='javascript:' title='"+time+"受理失败的"+tilte+"' onclick='getLog(\""+time+"\",\"4\",\""+sFunType+"\",\""+sProdfun+"\");'><font color=\"red\">");
									_sb.append(drresult.getString(icol).trim().equals("")?"&nbsp;":drresult.getString(icol).trim());
									_sb.append("</font></a>");
								}
								else {
									_sb.append(drresult.getString(icol).trim().equals("")?"&nbsp;":drresult.getString(icol).trim());
								}
							}
							else if(icol == 4) {
								if(!drresult.getString(icol).trim().equals("0")) {
									String time = drresult.getString("受理时间").trim();
									_sb.append("<a href='javascript:' title='"+time+"受理中的"+tilte+"' onclick='getLog(\""+time+"\",\"2\",\""+sFunType+"\",\""+sProdfun+"\");'><font color=\"red\">");
									_sb.append(drresult.getString(icol).trim().equals("")?"&nbsp;":drresult.getString(icol).trim());
									_sb.append("</font></a>");
								}
								else {
									_sb.append(drresult.getString(icol).trim().equals("")?"&nbsp;":drresult.getString(icol).trim());
								}
							}
							else if(icol == 5) {
								if(!drresult.getString(icol).trim().equals("0")) {
									String time = drresult.getString("受理时间").trim();
									_sb.append("<a href='javascript:' title='"+time+"等待受理的"+tilte+"' onclick='getLog(\""+time+"\",\"1\",\""+sFunType+"\",\""+sProdfun+"\");'><font color=\"red\">");
									_sb.append(drresult.getString(icol).trim().equals("")?"&nbsp;":drresult.getString(icol).trim());
									_sb.append("</font></a>");
								}
								else {
									_sb.append(drresult.getString(icol).trim().equals("")?"&nbsp;":drresult.getString(icol).trim());
								}
							}
							else if(icol == 6) {
								if(!drresult.getString(icol).trim().equals("0")) {
									String time = drresult.getString("受理时间").trim();
									_sb.append("<a href='javascript:' title='"+time+"受理无效的"+tilte+"' onclick='getLog(\""+time+"\",\"ohter\",\""+sFunType+"\",\""+sProdfun+"\");'><font color=\"red\">");
									_sb.append(drresult.getString(icol).trim().equals("")?"&nbsp;":drresult.getString(icol).trim());
									_sb.append("</font></a>");
								}
								else {
									_sb.append(drresult.getString(icol).trim().equals("")?"&nbsp;":drresult.getString(icol).trim());
								}
							}
							else if(icol == 7 || icol == 8 || icol == 9) {
								String actionNmae = "";
								String action = "";
								if(icol == 7) {
									actionNmae = "新申请的";
									action = "apply";
								}
								if(icol == 8) {
									actionNmae = "取消的";
									action = "cancel";
								}
								if(icol == 9) {
									actionNmae = "关闭的";
									action = "close";
								}
								if(!drresult.getString(icol).trim().equals("0")) {
									String time = drresult.getString("受理时间").trim();
									_sb.append("<a href='javascript:' title='"+time+actionNmae+tilte+"' onclick='getLog(\""+time+"\",\""+action+"\",\""+sFunType+"\");'><font color=\"red\">");
									_sb.append(drresult.getString(icol).trim().equals("")?"&nbsp;":drresult.getString(icol).trim());
									_sb.append("</font></a>");
								}
								else {
									_sb.append(drresult.getString(icol).trim().equals("")?"&nbsp;":drresult.getString(icol).trim());
								}
							}
							else {
								_sb.append(drresult.getString(icol).trim().equals("")?"&nbsp;":drresult.getString(icol).trim());
							}
						}
						else {
							String sValue = drresult.getString(icol).trim();
							com.doone.data.DataColumn dc = dcs.getDataColumn(icol);
							String columnName = dc.getColumnName();
							if(sValue.equals("普通号/取消套餐")) {
								String sTaoCanType = getTaoCanType(drresult.getString("funcode").trim(),_map);
								if(sTaoCanType.equals("1")) sValue = "普通号";
								else sValue = "取消套餐";
							}
							if(columnName.equals("所操作套餐名称")) {
								if(sValue.equals("取消套餐")) {
									sValue = "没有套餐";	
								}
							}
							if(columnName.equals("FUNCODE")) {
								_sb.append("<td class=\"body_td\" align=\"left\" nowrap style=\"display:none;\">");
							}
							else {
								_sb.append("<td class=\"body_td\" align=\"left\" nowrap>");
							}
							_sb.append(sValue.equals("")?"&nbsp;":sValue);
						}
						_sb.append("</TD>");

					}
					_sb.append("</tr>");
				}
			} catch (Exception e) {
				FileLogger.getLogger().info(e.getMessage(),e);
			}
			_sb.append("</table>");
		}
		else if(dt == null || dt.getRows().getCount() == 0 ) {
			_sb.append("<table>");
			_sb.append("<tr key=\"-1\" type=\"\">");
			_sb.append("<td class=\"InnerHead\" style=\"cursor: default;\" onclick=\"\" colspan=\"10\">没有找到任何记录信息</td>");
			_sb.append("</tr>");
			_sb.append("</table>");
		}

		return _sb.toString();
	}
	
	public String getTaoCanType(String sFuncode,Map _map) {
		String sTaoCanType = "";
		try {
		String sCityCode = (String) _map.get("CITYCODE");
		DacClient db = new DacClient();
		StringBuffer sql = new StringBuffer();
		List oParam = new ArrayList();
		
		
		sql.append("select distinct f.userware_type from TD_USERWARE_CONF f ");
		sql.append("where f.funcode = ? and CITYCODE= ? and state='E'");
		oParam.add(sFuncode);
		oParam.add(sCityCode);
		
		Object ap[] = new Object[oParam.size()];
		for (int i = 0; i < ap.length; i++) {
			ap[i] = oParam.get(i);
		}
		
		DataTable dt = db.executeQuery(sql.toString(), ap);
		if(dt != null && dt.getRows().getCount() > 0) {
			sTaoCanType = dt.getRow(0).getString("userware_type");
		}
		}catch(Exception e) {
			FileLogger.getLogger().warn(e.getMessage(), e);
		}
		return sTaoCanType;
	} 
	
	private String getFunType(Map _map) {
		String sBoardId = (String) _map.get("BOARDID");
		String sFuntype = "";
		if((sBoardId != null && sBoardId.equals("1280")) || (sBoardId != null && sBoardId.equals("1320"))) sFuntype = "T";
		else sFuntype = "C";
		return sFuntype;
	}
	
	private String getFunName(Map _map) {
		String sBoardId = (String) _map.get("BOARDID");
		String sFunName = "";
		if((sBoardId != null && sBoardId.equals("1280")) || (sBoardId != null && sBoardId.equals("1320"))) sFunName = "套餐";
		else sFunName = "程控功能";
		return sFunName;
	}
	
	private void buildTotalSQL(Map _map, StringBuffer totalSql, List oParam) {
		String sCityCode = (String) _map.get("CITYCODE");
		String sStartTime = (String) _map.get("STARTTIME");
		String sEndTime = (String) _map.get("ENDTIME");
		String sProdfun = (String) _map.get("PRODFUN");
		
		totalSql.append("select trunc(t1.accepttime) time1,count(1) cnt1 from tf_funorder t1,td_prodfun t6,tf_custinfoweb t ");
		totalSql.append("where t6.funtype = ? and t1.prodfunid = t6.prodfunid ");
		String sFuntype = getFunType(_map);
		oParam.add(sFuntype);
		if (!ExtString.isEmpty(sCityCode) && !sCityCode.equals("0590")) {
			totalSql.append("and t1.citycode = ? ");
			oParam.add(sCityCode);
		}
		if (!ExtString.isEmpty(sCityCode) && !sCityCode.equals("0590")) {
			totalSql.append("and t6.citycode = ? ");
			oParam.add(sCityCode);
		}		
		
		if (!ExtString.isEmpty(sStartTime)) {
			totalSql.append("and ");
			totalSql.append("t1.accepttime >= to_date(? || ' 00:00:00', 'yyyy-mm-dd hh24:mi:ss') ");
			oParam.add(sStartTime);
		}

		if (!ExtString.isEmpty(sEndTime)) {
			totalSql.append("and ");
			totalSql.append("t1.accepttime <= to_date(? || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss') ");
			oParam.add(sEndTime);
		}
		
		if (!ExtString.isEmpty(sProdfun) && !sProdfun.equals("0")) {
			totalSql.append("and ");
			totalSql.append("t1.prodfunid = ? ");
			oParam.add(sProdfun);
		}
		totalSql.append(" and t.userid=t1.userid  and t.custtypeid!='7' and t.custtypeid!='12' and t.state='E' ");
		totalSql.append(" group by trunc(t1.accepttime)");
	}
	
	private void buildSucceedSQL(Map _map, StringBuffer succeedSql, List oParam) {
		String sCityCode = (String) _map.get("CITYCODE");
		String sStartTime = (String) _map.get("STARTTIME");
		String sEndTime = (String) _map.get("ENDTIME");
		
		succeedSql.append("select trunc(t2.accepttime) time2,count(1) cnt2 from tf_funorder t2,td_prodfun t7,tf_custinfoweb t ");
		//succeedSql.append("where t7.funtype = ? and t2.prodfunid = t7.prodfunid and t2.progressstate in ('3','fun1') ");
		//t2.progressstate='set4'"已经存在,不要再受理了"请归到受理成功中
		succeedSql.append("where t7.funtype = ? and t2.prodfunid = t7.prodfunid and (t2.progressstate = '3' or t2.progressstate='set4')");
		
		String sFuntype = getFunType(_map);
		oParam.add(sFuntype);
		if (!ExtString.isEmpty(sCityCode) && !sCityCode.equals("0590")) {
			succeedSql.append("and t2.citycode = ? ");
			oParam.add(sCityCode);
		}
		if (!ExtString.isEmpty(sCityCode) && !sCityCode.equals("0590")) {
			succeedSql.append("and t7.citycode = ? ");
			oParam.add(sCityCode);
		}
		
		if (!ExtString.isEmpty(sStartTime)) {
			succeedSql.append("and ");
			succeedSql.append("t2.accepttime >= to_date(? || ' 00:00:00', 'yyyy-mm-dd hh24:mi:ss') ");
			oParam.add(sStartTime);
		}

		if (!ExtString.isEmpty(sEndTime)) {
			succeedSql.append("and ");
			succeedSql.append("t2.accepttime <= to_date(? || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss') ");
			oParam.add(sEndTime);
		}
		
		String sProdfun = (String) _map.get("PRODFUN");
		if (!ExtString.isEmpty(sProdfun) && !sProdfun.equals("0")) {
			succeedSql.append("and ");
			succeedSql.append("t2.prodfunid = ? ");
			oParam.add(sProdfun);
		}
		succeedSql.append(" and t.userid=t2.userid  and t.custtypeid!='7' and t.custtypeid!='12' and t.state='E' ");
		succeedSql.append(" group by trunc(t2.accepttime)");
	}
	
	private void buildFailSQL(Map _map, StringBuffer failSql, List oParam) {
		String sCityCode = (String) _map.get("CITYCODE");
		String sStartTime = (String) _map.get("STARTTIME");
		String sEndTime = (String) _map.get("ENDTIME");
		
		failSql.append("select trunc(t3.accepttime) time3,count(1) cnt3 from tf_funorder t3,td_prodfun t8 ,tf_custinfoweb t ");
		failSql.append("where t8.funtype = ? and t3.prodfunid = t8.prodfunid ");
		failSql.append("and (substrb(t3.progressstate,4) < '0' or t3.progressstate in ('4','f','F','911','not' ))   ");
		String sFuntype = getFunType(_map);
		oParam.add(sFuntype);
		if (!ExtString.isEmpty(sCityCode) && !sCityCode.equals("0590")) {
			failSql.append("and t3.citycode = ? ");
			oParam.add(sCityCode);
		}
		if (!ExtString.isEmpty(sCityCode) && !sCityCode.equals("0590")) {
			failSql.append("and t8.citycode = ? ");
			oParam.add(sCityCode);
		}
		
		if (!ExtString.isEmpty(sStartTime)) {
			failSql.append("and ");
			failSql.append("t3.accepttime >= to_date(? || ' 00:00:00', 'yyyy-mm-dd hh24:mi:ss') ");
			oParam.add(sStartTime);
		}

		if (!ExtString.isEmpty(sEndTime)) {
			failSql.append("and ");
			failSql.append("t3.accepttime <= to_date(? || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss') ");
			oParam.add(sEndTime);
		}
		
		String sProdfun = (String) _map.get("PRODFUN");
		if (!ExtString.isEmpty(sProdfun) && !sProdfun.equals("0")) {
			failSql.append("and ");
			failSql.append("t3.prodfunid = ? ");
			oParam.add(sProdfun);
		}
		failSql.append(" and t.userid=t3.userid  and t.custtypeid!='7' and t.custtypeid!='12' and t.state='E' ");
		failSql.append(" group by trunc(t3.accepttime)");
	}
	
	private void buildNullitySQL(Map _map, StringBuffer nullitySql, List oParam) {
		String sCityCode = (String) _map.get("CITYCODE");
		String sStartTime = (String) _map.get("STARTTIME");
		String sEndTime = (String) _map.get("ENDTIME");
		
		nullitySql.append("select trunc(t3.accepttime) time3,count(1) cnt3 from tf_funorder t3,td_prodfun t8 ,tf_custinfoweb t ");
		nullitySql.append("where t8.funtype = ? and t3.prodfunid = t8.prodfunid ");
		nullitySql.append("and (substrb(t3.progressstate,4) >= '0' or t3.progressstate = '119' )");
		String sFuntype = getFunType(_map);
		oParam.add(sFuntype);
		if (!ExtString.isEmpty(sCityCode) && !sCityCode.equals("0590")) {
			nullitySql.append("and t3.citycode = ? ");
			oParam.add(sCityCode);
		}
		if (!ExtString.isEmpty(sCityCode) && !sCityCode.equals("0590")) {
			nullitySql.append("and t8.citycode = ? ");
			oParam.add(sCityCode);
		}
		
		if (!ExtString.isEmpty(sStartTime)) {
			nullitySql.append("and ");
			nullitySql.append("t3.accepttime >= to_date(? || ' 00:00:00', 'yyyy-mm-dd hh24:mi:ss') ");
			oParam.add(sStartTime);
		}

		if (!ExtString.isEmpty(sEndTime)) {
			nullitySql.append("and ");
			nullitySql.append("t3.accepttime <= to_date(? || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss') ");
			oParam.add(sEndTime);
		}
		 
		String sProdfun = (String) _map.get("PRODFUN");
		if (!ExtString.isEmpty(sProdfun) && !sProdfun.equals("0")) {
			nullitySql.append("and ");
			nullitySql.append("t3.prodfunid = ? ");
			oParam.add(sProdfun);
		}
		nullitySql.append(" and t.userid=t3.userid and t.custtypeid!='11' and t.custtypeid!='7' and t.custtypeid!='12' and t.state='E' ");
		nullitySql.append(" group by trunc(t3.accepttime)");
	}
	
	private void buildActionSQL(Map _map, StringBuffer applySql, List oParam,String action) {
		String sCityCode = (String) _map.get("CITYCODE");
		String sStartTime = (String) _map.get("STARTTIME");
		String sEndTime = (String) _map.get("ENDTIME");
		
		applySql.append("select trunc(t3.accepttime) time3,count(1) cnt3 from tf_funorder t3,td_prodfun t8 ,tf_custinfoweb t ");
		applySql.append("where t3.prodfunid = t8.prodfunid and t3.action = ? and t8.funtype = ? ");
		oParam.add(action);
		String sFuntype = getFunType(_map);
		oParam.add(sFuntype);
		if (!ExtString.isEmpty(sCityCode) && !sCityCode.equals("0590")) {
			applySql.append("and t3.citycode = ? ");
			oParam.add(sCityCode);
		}
		if (!ExtString.isEmpty(sCityCode) && !sCityCode.equals("0590")) {
			applySql.append("and t8.citycode = ? ");
			oParam.add(sCityCode);
		}
		
		if (!ExtString.isEmpty(sStartTime)) {
			applySql.append("and ");
			applySql.append("t3.accepttime >= to_date(? || ' 00:00:00', 'yyyy-mm-dd hh24:mi:ss') ");
			oParam.add(sStartTime);
		}

		if (!ExtString.isEmpty(sEndTime)) {
			applySql.append("and ");
			applySql.append("t3.accepttime <= to_date(? || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss') ");
			oParam.add(sEndTime);
		}
		
		String sProdfun = (String) _map.get("PRODFUN");
		if (!ExtString.isEmpty(sProdfun) && !sProdfun.equals("0")) {
			applySql.append("and ");
			applySql.append("t3.prodfunid = ? ");
			oParam.add(sProdfun);
		}
		applySql.append(" and t.userid=t3.userid and t.custtypeid!='11' and t.custtypeid!='7' and t.custtypeid!='12' and t.state='E' ");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -