yzh
2021-10-08 21141fd4e8a1b3445a500733a1aeb880d5be748f
web/web/ExportDocument.aspx.cs
@@ -25,6 +25,9 @@
            case "exportGwStatisV3"://导出统计报表
                this.ExprortGwStatisV3();
                break;
            case "exGwProduct":
                this.ExGwProduct();
                break;
        }
    }
@@ -303,13 +306,14 @@
                this.Response.End();
            }
            DataTable dataTable = gwSmDao.LoadSpDataTable(apMid, opName, clientId, spid, mobile, sDate, beginTime, endTime, content, @int, opstat);
            WebTool webTool = new WebTool();
            Dictionary<string, string> dictionary = new Dictionary<string, string>();
            dictionary["AP消息ID"] = "AP_MID";
            dictionary["CLTID"] = "CLIENT_ID";
            dictionary["代理商"] = "CLIENT_ID";
            dictionary["账号"] = "SP_ID";
            dictionary["APID"] = "AP_ID";
            dictionary["OPID"] = "OP_ID";
            dictionary["接入点ID"] = "AP_ID";
            dictionary["通道名"] = "OP_NAME";
            dictionary["码号"] = "ACCESS_CODE";
            dictionary["接收号码"] = "MOBILE";
            dictionary["PKN "] = "PK_NUMBER";
@@ -328,7 +332,38 @@
            dictionary["状态报告回执时间"] = "OP_DELIVER_TIME";
            dictionary["内容"] = "MSG_CONTENT";
            dictionary["状态"] = "STAT";
            dictionary["耗时"] = "OUT_TIME";
            webTool.Export(dataTable, dictionary, "日志_" + sDate, this.Context.Response);
        }
    }
    //产品导出Excel
    private void ExGwProduct()
    {
        string name = this.AppContext.GetString("name");
        string classes = this.AppContext.GetString("classes");
        string is_default = this.AppContext.GetString("is_default");
        string op_group_id = this.AppContext.GetString("op_group_id") == "0" ? "" : this.AppContext.GetString("op_group_id");
        using (GwProductDao gwProductDao = new GwProductDao())
        {
            DataTable dataTable = gwProductDao.LoadGwProductDataTable(name, classes, is_default, op_group_id);
            WebTool webTool = new WebTool();
            Dictionary<string, string> dictionary = new Dictionary<string, string>();
            //dictionary["产品ID"] = "ID";
            dictionary["产品名称"] = "NAME";
            //dictionary["图标"] = "ICON";
            dictionary["使用说明"] = "INSTRUCTIONS";
            dictionary["类别"] = "CLASSES";
            dictionary["父级产品分类"] = "PARENT_ID";
            //dictionary["路径"] = "PATH";
            dictionary["是否默认"] = "IS_DEFAULT";
            dictionary["是否启用"] = "IS_ENABLE";
            dictionary["排序"] = "SORT";
            dictionary["默认通道"] = "OP_GROUP_ID";
            dictionary["API账号生成规则"] = "API_SP_XH_ID";
            dictionary["默认赠送条数"] = "GIVING_NUM";
            dictionary["备注"] = "REMARK";
            webTool.Export(dataTable, dictionary, "PRODUCT_" + (object)DateTime.Now.Ticks, this.Context.Response);
        }
    }
}