public override string initExport(ExportParam param, int dbServerId) { string dbName = ""; string time = ""; List <IMongoQuery> queryList = new List <IMongoQuery>(); Dictionary <string, object> cond = param.m_condition; if (cond != null) { DbServerInfo info = ResMgr.getInstance().getDbInfo(param.m_dbServerIP); if (info != null) { dbName = info.m_serverName; } if (cond.ContainsKey("time")) { time = Convert.ToString(cond["time"]); DateTime mint = DateTime.Now, maxt = DateTime.Now; Tool.splitTimeStr(time, ref mint, ref maxt); IMongoQuery imq1 = Query.LT("genTime", BsonValue.Create(maxt)); IMongoQuery imq2 = Query.GTE("genTime", BsonValue.Create(mint)); IMongoQuery imq3 = Query.GT("rechargeCount", 0); queryList.Add(Query.And(imq1, imq2, imq3)); time = mint.ToString("yyyy年MM月dd日 HH时mm分ss秒") + "~" + maxt.ToString("yyyy年MM月dd日 HH时mm分ss秒"); } } m_imq = queryList.Count > 0 ? Query.And(queryList) : null; return(string.Format("充值用户统计-{0}-{1}.csv", dbName, time)); }
// /City/CreateExcelToClient/ public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; bool activeIsNull = true; string cityName = Request.QueryString["cityName"] ?? ""; string description = Request.QueryString["description"] ?? ""; bool isactive = true; if (Request.QueryString["isactive"] != "" && Request.QueryString["isactive"] != null) { activeIsNull = false; isactive = bool.Parse(Request.QueryString["isactive"]); } City city = new City(); city.CityName = cityName; city.Description = description; city.IsActive = isactive; ExportParam ep = new ExportParam(); ep.DT1 = CityService.GetCity(page, rows, city, activeIsNull); ep.HeadTitle1 = "地市信息"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string unitListCode = Request.QueryString["unitListCode"]; string unitListName = Request.QueryString["unitListName"]; string uniformCode = Request.QueryString["uniformCode"]; string unitCode1 = Request.QueryString["unitCode1"]; string unitCode2 = Request.QueryString["unitCode2"]; string unitCode3 = Request.QueryString["unitCode3"]; string unitCode4 = Request.QueryString["unitCode4"]; string isActive = Request.QueryString["isActive"]; UnitList unitlist = new UnitList(); unitlist.UnitListCode = unitListCode; unitlist.UnitListName = unitListName; unitlist.UniformCode = uniformCode; unitlist.UnitCode01 = unitCode1; unitlist.UnitCode02 = unitCode2; unitlist.UnitCode03 = unitCode3; unitlist.UnitCode04 = unitCode4; unitlist.IsActive = isActive; ExportParam ep = new ExportParam(); ep.DT1 = UnitListService.GetUnitList(page, rows, unitlist); ep.HeadTitle1 = "单位系列"; return(PrintService.Print(ep)); }
public override string initExport(ExportParam param, int dbServerId) { string dbName = ""; List <IMongoQuery> queryList = new List <IMongoQuery>(); Dictionary <string, object> cond = param.m_condition; if (cond != null) { DbServerInfo info = ResMgr.getInstance().getDbInfo(param.m_dbServerIP); if (info != null) { dbName = info.m_serverName; } if (cond.ContainsKey("sel")) { m_sel = Convert.ToInt32(cond["sel"]); } if (cond.ContainsKey("count")) { m_count = Convert.ToInt32(cond["count"]); } } string time = DateTime.Now.ToString("yyyy年MM月dd日"); return(string.Format("{0}预警-{1}-{2}.csv", m_sel == 0 ? "金币" : "礼券", time, dbName)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string productCode = Request.QueryString["productCode"] ?? ""; decimal minLimited = 100000; decimal maxLimited = 100000; decimal assemblyTime = 3600; if (Request.QueryString["minLimited"] != null && Request.QueryString["minLimited"] != "") { minLimited = decimal.Parse(Request.QueryString["minLimited"]); } if (Request.QueryString["maxLimited"] != null && Request.QueryString["maxLimited"] != "") { maxLimited = decimal.Parse(Request.QueryString["maxLimited"]); } if (Request.QueryString["assemblyTime"] != null && Request.QueryString["assemblyTime"] != "") { assemblyTime = decimal.Parse(Request.QueryString["assemblyTime"]); } ExportParam ep = new ExportParam(); ep.DT1 = ProductWarningService.GetProductWarning(page, rows, productCode, minLimited, maxLimited, assemblyTime); ep.HeadTitle1 = "产品预警信息设置"; return(PrintService.Print(ep)); }
// /Server/CreateExcelToClient/ public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; bool isactiveIsNull = true; string serverName = Request.QueryString["serverName"] ?? ""; string description = Request.QueryString["description"] ?? ""; string url = Request.QueryString["url"]; bool isactive = true; if (Request.QueryString["isactive"] != null && Request.QueryString["isactive"] != "") { isactiveIsNull = false; isactive = bool.Parse(Request.QueryString["isactive"]); } Server server = new Server(); server.ServerName = serverName; server.Description = description; server.Url = url; server.IsActive = isactive; ExportParam ep = new ExportParam(); ep.DT1 = ServerService.GetServer(page, rows, server, isactiveIsNull); ep.HeadTitle1 = "服务器信息"; return(PrintService.Print(ep)); }
public void export(ExportParam param) { if (!m_tables.ContainsKey(param.m_tableName)) { return; } m_tables[param.m_tableName].exportExcel(param, m_exportDir); }
public override OpRes exportData(StreamWriter sheet, ExportParam param, int dbServerId) { int skip = 0; List <Dictionary <string, object> > data = null; if (m_sel == 0) { sheet.WriteLine("玩家ID,玩家昵称,金币"); } else { sheet.WriteLine("玩家ID,玩家昵称,礼券"); } //while (true) { string[] retField = null; if (m_sel == 0) { retField = s_fieldGold; } else { retField = s_fieldTicket; } data = nextData(ref skip, m_count, null, TableName.PLAYER_INFO, dbServerId, DbName.DB_PLAYER, retField, retField[1], false); int t = 0; for (int i = 0; i < data.Count; i++) { t = Convert.ToInt32(data[i]["player_id"]); sheet.Write(t); sheet.Write(","); Dictionary <string, object> ret = getPlayerProperty(t, dbServerId, s_field); if (ret != null && ret.ContainsKey("nickname")) { sheet.Write(Convert.ToString(ret["nickname"])); } sheet.Write(","); if (m_sel == 0) { t = Convert.ToInt32(data[i]["gold"]); } else { t = Convert.ToInt32(data[i]["ticket"]); } sheet.Write(t); sheet.WriteLine(); } } return(OpRes.opres_success); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string billNo = Request.QueryString["billNo"]; ExportParam ep = new ExportParam(); ep.DT1 = CheckBillDetailService.GetCheckBillDetail(page, rows, billNo); ep.HeadTitle1 = "盘点单明细"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string orderId = Request.QueryString["orderId"]; ExportParam ep = new ExportParam(); ep.DT1 = SortOrderDetailService.GetSortOrderDetail(page, rows, orderId); ep.HeadTitle1 = "分拣订单管理"; return(PrintService.Print(ep)); }
public IActionResult ExportExcel(ExportParam input) { var result = _displayer.ExportExcel(input); if (result.IsSuccess) { return(File(result.Data, "application/octet-stream", DateTime.Now.ToString("yyyyMMddHHmmssfff") + ".xls")); } return(result.ToResultWebApi().ToJsonResult()); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string orderDate = Request.QueryString["orderDate"]; string sortingLineCode = Request.QueryString["sortingLineCode"]; ExportParam ep = new ExportParam(); ep.DT1 = SortOrderDispatchService.GetSortOrderDispatch(page, rows, orderDate, sortingLineCode); ep.HeadTitle1 = "分拣线路调度"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string type = Request.QueryString["type"]; string id = Request.QueryString["id"]; ExportParam ep = new ExportParam(); ep.DT1 = CellService.GetCell(page, rows, type, id); ep.HeadTitle1 = "仓库信息"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string queryString = Request.QueryString["queryString"]; string value = Request.QueryString["value"]; ExportParam ep = new ExportParam(); ep.DT1 = CellService.GetCellByE(page, rows, queryString, value); ep.HeadTitle1 = "储位卷烟预设"; return(PrintService.Print(ep)); }
public static FileStreamResult Print(ExportParam ep) { try { MemoryStream ms = ExportExcel.ExportDT(ep); return(new FileStreamResult(ms, ep.StreamType)); } catch (Exception) { return(new FileStreamResult(new MemoryStream(), ep.StreamType)); } }
// /LoginLog/CreateExcelToClient/ public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string loginPC = Request.QueryString["loginPC"]; string loginTime = Request.QueryString["loginTime"]; string logoutTime = Request.QueryString["logoutTime"]; ExportParam ep = new ExportParam(); ep.DT1 = LoginLogService.GetLoginLog(page, rows, loginPC, loginTime, logoutTime); ep.HeadTitle1 = "登录日志信息"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string brandCode = Request.QueryString["brandCode"]; string brandName = Request.QueryString["brandName"]; string isActive = Request.QueryString["isActive"]; ExportParam ep = new ExportParam(); ep.DT1 = BrandService.GetBrand(page, rows, brandCode, brandName, isActive); ep.HeadTitle1 = "卷烟品牌"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string billNo = Request.QueryString["billNo"]; bool isAbnormity = Convert.ToBoolean(Request.QueryString["isAbnormity"]); bool isGroup = Convert.ToBoolean(Request.QueryString["isGroup"]); string sortingName = string.Empty; ExportParam ep = new ExportParam(); ep.DT1 = MoveBillDetailService.GetMoveBillDetail(page, rows, billNo, isAbnormity, isGroup, out sortingName); ep.HeadTitle1 = sortingName + "移库单明细"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string unitCode = Request.QueryString["unitCode"]; string unitName = Request.QueryString["unitName"]; string isActive = Request.QueryString["isActive"]; ExportParam ep = new ExportParam(); ep.DT1 = UnitService.GetUnit(page, rows, unitCode, unitName, isActive); ep.HeadTitle1 = "计量单位"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string supplierCode = Request.QueryString["supplierCode"]; string supplierName = Request.QueryString["supplierName"]; string isActive = Request.QueryString["isActive"]; ExportParam ep = new ExportParam(); ep.DT1 = SupplierService.GetSupplier(page, rows, supplierCode, supplierName, isActive); ep.HeadTitle1 = "厂商信息"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string userName = Request.QueryString["userName"] ?? ""; string chineseName = Request.QueryString["chineseName"] ?? ""; string meMo = Request.QueryString["meMo"] ?? ""; ExportParam ep = new ExportParam(); ep.DT1 = UserService.GetUser(page, rows, userName, chineseName, meMo); ep.HeadTitle1 = "用户信息"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string jobCode = Request.QueryString["jobCode"]; string jobName = Request.QueryString["jobName"]; string isActive = Request.QueryString["isActive"]; ExportParam ep = new ExportParam(); ep.DT1 = JobService.GetJob(page, rows, jobCode, jobName, isActive); ep.HeadTitle1 = "岗位信息"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string roleName = Request.QueryString["roleName"] ?? ""; string meMo = Request.QueryString["meMo"] ?? ""; string isLock = Request.QueryString["isLock"] ?? ""; ExportParam ep = new ExportParam(); ep.DT1 = RoleService.GetRoleConten(page, rows, roleName, meMo, isLock); ep.HeadTitle1 = "角色信息"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string billNo = Request.QueryString["billNo"]; ExportParam ep = new ExportParam(); ep.DT1 = OutBillDetailService.GetOutBillDetail(page, rows, billNo); ep.DT2 = OutBillAllotService.AllotSearch(page, rows, billNo); ep.HeadTitle1 = "出库单据分配"; ep.HeadTitle2 = "出库单据分配明细"; return(PrintService.Print(ep)); }
// /ExceptionalLog/CreateExcelToClient/ public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string catchTime = Request.QueryString["catchTime"]; string moduleName = Request.QueryString["moduleName"]; string functionName = Request.QueryString["functionName"]; ExportParam ep = new ExportParam(); ep.DT1 = ExceptionalLogService.GetExceptionalLog(page, rows, catchTime, moduleName, functionName); ep.HeadTitle1 = "错误日志信息"; return(PrintService.Print(ep)); }
// GET: /Stockledger/CreateExcelToClient/ public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string warehouseCode = Request.QueryString["warehouseCode"]; string productCode = Request.QueryString["productCode"]; string settleDate = Request.QueryString["settleDate"]; ExportParam ep = new ExportParam(); ep.DT1 = StockledgerService.GetInfoDetail(page, rows, warehouseCode, productCode, settleDate); ep.HeadTitle1 = "库存历史总账明细"; return(PrintService.Print(ep)); }
public override string initExport(ExportParam param, int dbServerId) { string account = ""; int playerId = -1; string dbName = ""; string time = ""; List <IMongoQuery> queryList = new List <IMongoQuery>(); Dictionary <string, object> cond = param.m_condition; if (cond != null) { DbServerInfo info = ResMgr.getInstance().getDbInfo(param.m_dbServerIP); if (info != null) { dbName = info.m_serverName; } if (cond.ContainsKey("playerId")) { playerId = Convert.ToInt32(cond["playerId"]); queryList.Add(Query.EQ("playerId", BsonValue.Create(playerId))); Dictionary <string, object> ret = getPlayerProperty(playerId, dbServerId, m_playerFields); if (ret != null) { account = Convert.ToString(ret["account"]); } } if (cond.ContainsKey("taskId")) { int taskId = Convert.ToInt32(cond["taskId"]); queryList.Add(Query.EQ("taskId", BsonValue.Create(taskId))); } if (cond.ContainsKey("time")) { time = Convert.ToString(cond["time"]); DateTime mint = DateTime.Now, maxt = DateTime.Now; Tool.splitTimeStr(time, ref mint, ref maxt); IMongoQuery imq1 = Query.LT("genTime", BsonValue.Create(maxt)); IMongoQuery imq2 = Query.GTE("genTime", BsonValue.Create(mint)); queryList.Add(Query.And(imq1, imq2)); time = mint.ToString("yyyy年MM月dd日 HH时mm分ss秒") + "~" + maxt.ToString("yyyy年MM月dd日 HH时mm分ss秒"); } } m_imq = queryList.Count > 0 ? Query.And(queryList) : null; return(getExportFileName(playerId, account, dbName, time)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string billTypeCode = Request.QueryString["billTypeCode"]; string billTypeName = Request.QueryString["billTypeName"]; string billClass = "0004"; string isActive = Request.QueryString["isActive"]; ExportParam ep = new ExportParam(); ep.DT1 = BillTypeService.GetBillType(page, rows, billTypeCode, billTypeName, billClass, isActive); ep.HeadTitle1 = "盘点类型设置"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string productCode = Request.QueryString["productCode"]; string unitCode = Request.QueryString["unitCode"]; decimal minLimited = 100000; decimal maxLimited = 100000; ExportParam ep = new ExportParam(); ep.DT1 = ProductWarningService.GetQuantityLimitsDetail(page, rows, productCode, minLimited, maxLimited, unitCode); ep.HeadTitle1 = "产品超储短缺查询"; return(PrintService.Print(ep)); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string departmentCode = Request.QueryString["departmentCode"]; string departmentName = Request.QueryString["departmentName"]; string departmentLeaderId = Request.QueryString["departmentLeaderId"]; string companyId = Request.QueryString["companyId"]; ExportParam ep = new ExportParam(); ep.DT1 = DepartmentService.GetDepartment(page, rows, departmentCode, departmentName, departmentLeaderId, companyId); ep.HeadTitle1 = "部门信息"; return(PrintService.Print(ep)); }