public CollectionInvokeResult <StringObjectDictionary> LatestLocationBySourceId(string strParms, IList <string> sourceIds) { CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> { Success = true }; try { var dictionary = new StringObjectDictionary().MixInJson(strParms); //List<string> sourceIdList = new List<string>(); //foreach (var item in sourceIds) { // sourceIdList.Add("'" + item + "'"); //} if (sourceIds.Count > 0) { dictionary.Add("SourceIds", "'" + string.Join(" , ", sourceIds.ToArray()) + "'"); } //分隔符 dictionary.Add("SplitChar", "','"); result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("LatestLocation_List", dictionary); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public CollectionInvokeResult <StringObjectDictionary> GetWorkExecuteMonitor(string stationId, string strShowType) { CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> { Success = true }; try { StringObjectDictionary filters = new StringObjectDictionary(); filters.Add("StationId", Guid.Parse(stationId)); if (GlobalManager.isAgencyUser(new User() { UserId = NormalSession.UserId.ToGuid() })) { filters.Add("UserId", NormalSession.UserId.ToGuid()); } //监控模式 if (!string.IsNullOrEmpty(strShowType)) { //当前时间一个小时之前所有未完成服务项目数据,以及当前时间前后一个小时之内所有数据 filters.Add("WhereClause", " ((a.RemindTime<DATEADD(HH,-1,GETDATE()) and a.ServeManLeaveTime is null) " + " or ( a.RemindTime between DATEADD(HH,-1,GETDATE()) and DATEADD(HH,1,GETDATE())) ) "); } result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("DayOfWorkExecuteMonitor", filters); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <StringObjectDictionary> ListForEasyUIgrid(EasyUIgridCollectionParam <StringObjectDictionary> param) { EasyUIgridCollectionInvokeResult <StringObjectDictionary> result = new EasyUIgridCollectionInvokeResult <StringObjectDictionary> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } List <string> whereClause = new List <string>(); /**********************************************************/ if (param.filterFields != null) { foreach (var field in param.filterFields) { filters[field.key] = field.value; } } /***********************begin 模糊查询*********************/ if (param.fuzzyFields != null) { foreach (var field in param.fuzzyFields) { whereClause.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } } /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ if (!string.IsNullOrEmpty(param.sort)) { filters.Add("OrderByClause", param.sort + " " + param.order ?? "ASC"); } /***********************end 排序***************************/ //result.rows = BuilderFactory.DefaultBulder().List<OldManLocateInfo>(); gridCollectionPager.EasyUIgridDoPage <StringObjectDictionary>(BuilderFactory.DefaultBulder().ListStringObjectDictionary("OldManLocateInfo_List2", filters), param, ref result); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <Column> ListForEasyUIgrid(EasyUIgridCollectionParam <Column> param) { EasyUIgridCollectionInvokeResult <Column> result = new EasyUIgridCollectionInvokeResult <Column> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } List <string> whereClause = new List <string>(); /**********************************************************/ if (param.filterFields != null) { foreach (var field in param.filterFields) { filters[field.key] = field.value; } } /***********************begin 模糊查询*********************/ if (param.fuzzyFields != null) { foreach (var field in param.fuzzyFields) { whereClause.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } } /***********************end 模糊查询***********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } if (!string.IsNullOrEmpty(param.sort)) { filters.Add("OrderByClause", param.sort + " " + param.order ?? "ASC"); } IList <Column> columns = BuilderFactory.DefaultBulder().List <Column>(filters); if (param.page == 0 && param.rows == 0)//不分页显示 { result.rows = columns; } else { gridCollectionPager.EasyUIgridDoPage <Column>(columns, param, ref result); } } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <NormalAccount> ListForEasyUIgridForWeixinQuery(EasyUIgridCollectionParam <NormalAccount> param) { EasyUIgridCollectionInvokeResult <NormalAccount> result = new EasyUIgridCollectionInvokeResult <NormalAccount> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } List <string> whereClause = new List <string>(); /**********************************************************/ /***********************begin 模糊查询*********************/ if (param.fuzzyFields != null) { foreach (var field in param.fuzzyFields) { if (field.key.Contains("StationId")) { filters.Add("StationId", field.value); whereClause.Add(string.Format("a.OpenId in (select OpenId from Pub_WXStationAuthRequest where DoStatus=1 and {0}='{1}') and b.OpenId is null", field.key, field.value)); } else { whereClause.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } } } /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ if (!string.IsNullOrEmpty(param.sort)) { filters.Add("OrderByClause", param.sort + " " + param.order ?? "ASC"); } /***********************end 排序***************************/ gridCollectionPager.EasyUIgridDoPage <NormalAccount>(BuilderFactory.DefaultBulder().List <NormalAccount>("NormalAccount_UnBound_List", filters), param, ref result); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <Article> ListForEasyUIgrid(string connectId, EasyUIgridCollectionParam <Article> param) { EasyUIgridCollectionInvokeResult <Article> result = new EasyUIgridCollectionInvokeResult <Article> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } List <string> whereClause = new List <string>(); /**********************************************************/ /***********************begin 模糊查询*********************/ if (param.fuzzyFields != null) { List <string> fuzzys = new List <string>(); foreach (var field in param.fuzzyFields) { fuzzys.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } if (fuzzys.Count > 0) { whereClause.Add("(" + string.Join((string.IsNullOrEmpty(param.fuzzyFieldOP) ? " AND " : " " + param.fuzzyFieldOP + " "), fuzzys.ToArray()) + ")"); } } /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ if (!string.IsNullOrEmpty(param.sort)) { filters.Add("OrderByClause", param.sort + " " + param.order ?? "ASC"); } /***********************end 排序***************************/ //gridCollectionPager.EasyUIgridDoPage4Model<Article>(filters, param, ref result,connectId); gridCollectionPager.EasyUIgridDoPage <Article>(BuilderFactory.DefaultBulder(connectId).List <Article>(filters), param, ref result); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <StringObjectDictionary> ServiceStationListForGrid(EasyUIgridCollectionParam <ServiceStation> param) { EasyUIgridCollectionInvokeResult <StringObjectDictionary> result = new EasyUIgridCollectionInvokeResult <StringObjectDictionary> { Success = true }; try { List <string> whereClause = new List <string>(); StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } if (param.fuzzyFields != null) { List <string> fuzzys = new List <string>(); foreach (var field in param.fuzzyFields) { if (string.IsNullOrEmpty(field.value)) { continue; } fuzzys.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } if (fuzzys.Count > 0) { whereClause.Add("(" + string.Join((string.IsNullOrEmpty(param.fuzzyFieldOP) ? " AND " : " " + param.fuzzyFieldOP + " "), fuzzys.ToArray()) + ")"); } } if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } if (!string.IsNullOrEmpty(param.sort)) { filters.Add("OrderByClause", param.sort + " " + param.order ?? "ASC"); } filters.Add("PageNo", param.page); filters.Add("PageSize", param.rows); if (param.page == 1)//只第一次取 { result.total = BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).GetRecordCount("Count_ServiceStation_CMSListByPage", filters); } result.rows = BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ListStringObjectDictionary("ServiceStation_CMSListByPage", filters); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <StringObjectDictionary> ListRechargeObjectAsCanAssign3(EasyUIgridCollectionParam <StringObjectDictionary> param) { EasyUIgridCollectionInvokeResult <StringObjectDictionary> result = new EasyUIgridCollectionInvokeResult <StringObjectDictionary> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } List <string> whereClause = new List <string>(); if (param.filterFields != null) { foreach (var field in param.filterFields) { filters[field.key] = field.value; } } /**********************************************************/ /***********************begin 模糊查询*********************/ /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Format("OldManName like '%{0}%' or InputCode1 like '{0}%' ", filters["k"])); } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ if (!string.IsNullOrEmpty(param.sort)) { filters.Add("OrderByClause", param.sort + " " + param.order ?? "ASC"); } /***********************end 排序***************************/ result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("ListRechargeObjectAsCanAssign3", filters); result.total = result.rows.Count; } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public JqgridCollectionInvokeResult <ServiceCallBack> ListForJqgrid(JqgridCollectionParam <ServiceCallBack> param) { JqgridCollectionInvokeResult <ServiceCallBack> result = new JqgridCollectionInvokeResult <ServiceCallBack> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } List <string> whereClause = new List <string>(); /**********************************************************/ /***********************begin 模糊查询*********************/ if (param.fuzzyFields != null) { foreach (var field in param.fuzzyFields) { whereClause.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } } /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ if (!string.IsNullOrEmpty(param.sidx)) { filters.Add("OrderByClause", param.sidx + " " + param.sord ?? "ASC"); } /***********************end 排序***************************/ gridCollectionPager.JqgridDoPage <ServiceCallBack>(BuilderFactory.DefaultBulder().List <ServiceCallBack>(filters), param, ref result); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
private IList <T> _getTreeData <T>(StringObjectDictionary param) where T : TreeNode, new() { if (param.ContainsKey("OrderByClause")) { param["OrderByClause"] = string.Join(",", param["OrderByClause"].ToString().Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)); } param.Add("ErrorCode", null); param.Add("ErrorMessage", null); var results = BuilderFactory.DefaultBulder(GlobalManager.getConnectString(GetHttpHeader(GlobalManager.ConnectIdKey))).ExecuteSPForQuery <StringObjectDictionary>("SP_Sys_GetTreeData", param).Select(item => { T node = new T(); node.MixDictionary(item); node.pId = node.pId.Trim(); return(node); }).ToList(); return(results); }
private void ExportAssessmentNotice(HttpContext context, dynamic param) { try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); List <string> whereClause = new List <string>(); if (param.ReportIds != null) { List <string> fuzzys = new List <string>(); foreach (var field in param.ReportIds) { fuzzys.Add(string.Format(" '{0}' ", field)); } if (fuzzys.Count > 0) { whereClause.Add("ReportId in(" + string.Join(" , ", fuzzys.ToArray()) + ") "); } if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ if (!string.IsNullOrEmpty((string)param.sort)) { filters.Add("OrderByClause", (string)param.sort + " " + (string)param.order ?? "ASC"); } /***********************end 排序***************************/ string strConnectId = (string)param.ConnectId; IList <EvaluatedReport> evaluatedReportList = BuilderFactory.DefaultBulder(strConnectId).List <EvaluatedReport>(filters); string xlsName = "告知书-" + DateTime.Now.ToString("yyyy年MM月dd日") + "-" + DateTime.Now.Millisecond.ToString() + ".xls"; NPOIManager.CreateEvaluateNoticeExcel <EvaluatedReport>(context, evaluatedReportList, xlsName, "养老服务告知书", strConnectId); } catch (Exception ex) { context.Response.Write("<script type='text/javascript'>parent.alertInfo('Excel导出失败!');</script>"); context.Response.End(); } }
public ModelInvokeResult <SubSetColumnPK> UpdateEmployee(string strSubSetId, string strColumnNameNew, SubSetColumn subSetColumn) { ModelInvokeResult <SubSetColumnPK> result = new ModelInvokeResult <SubSetColumnPK> { Success = true }; try { List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>(); string _SubSetId = strSubSetId; subSetColumn.SubSetId = _SubSetId; string _ColumnNameNew = subSetColumn.ColumnNameNew;//双主键中的一个可更新时 StringObjectDictionary dictionary = subSetColumn.ToStringObjectDictionary(false); dictionary.Add("Old_ColumnNameNew", strColumnNameNew); subSetColumn.OperatedBy = NormalSession.UserId.ToGuid(); subSetColumn.OperatedOn = DateTime.Now; statements.Add(new IBatisNetBatchStatement { StatementName = "SubSetColumn_Update2", ParameterObject = dictionary, Type = SqlExecuteType.UPDATE }); BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements); result.instance = new SubSetColumnPK { SubSetId = _SubSetId, ColumnNameNew = _ColumnNameNew }; } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public ModelInvokeResult <CallObject> QueryObjectKey(string ObjectType, string ObjectKey) { ModelInvokeResult <CallObject> result = new ModelInvokeResult <CallObject> { Success = true }; try { /***********************begin 自定义代码*******************/ string sql = "select ObjectKey from Pub_CallObject where ObjectType='" + ObjectType + "' AND ObjectKey='" + ObjectKey + "'"; var ret = BuilderFactory.DefaultBulder().ExecuteNativeSqlForQuery(sql); if (ret.Count != 0) { /***********************end 自定义代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); List <string> whereClause = new List <string>(); whereClause.Add(" ObjectKey in(select max(ObjectKey) MaxKey from Pub_CallObject where ObjectType='" + ObjectType + "')"); filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); //filters.Add("OrderByClause", "CheckInTime desc"); /***********************begin 自定义代码*******************/ /***********************此处添加自定义代码*****************/ /***********************end 自定义代码*********************/ result.instance = BuilderFactory.DefaultBulder().List <CallObject>(filters).FirstOrDefault(); } } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <StringObjectDictionary> ListByOldMan(EasyUIgridCollectionParam <StringObjectDictionary> param) { EasyUIgridCollectionInvokeResult <StringObjectDictionary> result = new EasyUIgridCollectionInvokeResult <StringObjectDictionary> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); List <string> whereClause = new List <string>(); /**********************************************************/ if (param.filterFields != null) { foreach (var field in param.filterFields) { filters[field.key] = field.value; } } /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ if (!string.IsNullOrEmpty(param.sort)) { filters.Add("OrderByClause", param.sort + " " + param.order ?? "ASC"); } /***********************end 排序***************************/ result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("OldManLocateInfo_By_Reminder_List", filters); result.total = result.rows.Count; } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <FlowDefineMapping> ListForEasyUIgridPage(string strConnectId, EasyUIgridCollectionParam <FlowDefineMapping> param) { EasyUIgridCollectionInvokeResult <FlowDefineMapping> result = new EasyUIgridCollectionInvokeResult <FlowDefineMapping> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } List <string> whereClause = new List <string>(); /**********************************************************/ if (param.filterFields != null) { foreach (var field in param.filterFields) { filters[field.key] = field.value; } } /***********************begin 模糊查询*********************/ if (param.fuzzyFields != null) { List <string> fuzzys = new List <string>(); foreach (var field in param.fuzzyFields) { fuzzys.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } if (fuzzys.Count > 0) { whereClause.Add("(" + string.Join((string.IsNullOrEmpty(param.fuzzyFieldOP) ? " AND " : " " + param.fuzzyFieldOP + " "), fuzzys.ToArray()) + ")"); } } /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ gridCollectionPager.EasyUIgridDoPage4Model <FlowDefineMapping>(filters, param, ref result, strConnectId); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <StringObjectDictionary> ListCourseSchedule(EasyUIgridCollectionParam <ListCourseScheduleParam> param) { EasyUIgridCollectionInvokeResult <StringObjectDictionary> result = new EasyUIgridCollectionInvokeResult <StringObjectDictionary> { Success = true }; try { StringObjectDictionary filters = param.instance.ToStringObjectDictionary(false); DateTime beginDate = DateTime.Parse(param.instance.BeginDateStr); DateTime endDate = DateTime.Parse(param.instance.EndDateStr); List <string> thePivotColumnsForSelect = new List <string>(); List <string> thePivotColumns = new List <string>(); TimeSpan ts = endDate - beginDate; DateTime dt = beginDate; for (int i = 0; i < ts.Days; i++) { thePivotColumnsForSelect.Add(string.Format("[{0}] as _{0}", dt.ToString("yyyyMMdd"))); thePivotColumns.Add(dt.ToString("yyyyMMdd")); dt = dt.AddDays(1); } thePivotColumnsForSelect.Add(string.Format("[{0}] as _{0}", dt.ToString("yyyyMMdd"))); thePivotColumns.Add(dt.ToString("yyyyMMdd")); filters.Add("PivotColumnsForSelect", string.Join(",", thePivotColumnsForSelect.ToArray())); filters.Add("PivotColumns", "[" + string.Join("],[", thePivotColumns.ToArray()) + "]"); if (!string.IsNullOrEmpty(param.instance.DeviceName)) { filters.Add("DeviceName", "DeviceName like '" + param.instance.DeviceName + "%'"); } if (!string.IsNullOrEmpty(param.instance.DeviceCode)) { filters.Add("DeviceCode", "DeviceCode like '" + param.instance.DeviceCode + "%'"); } result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("CourseScheduleList", filters); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <ServiceWorkOrder> ListForEasyUIgridByStation(EasyUIgridCollectionParam <ServiceWorkOrder> param) { EasyUIgridCollectionInvokeResult <ServiceWorkOrder> result = new EasyUIgridCollectionInvokeResult <ServiceWorkOrder> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } List <string> whereClause = new List <string>(); /**********************************************************/ /***********************begin 模糊查询*********************/ if (param.fuzzyFields != null) { List <string> fuzzys = new List <string>(); foreach (var field in param.fuzzyFields) { if (field.key.Contains("OldManName") || field.key.Contains("Tel") || field.key.Contains("Mobile") || field.key.Contains("WorkOrderContent") || field.key.Contains("ServeManName")) { fuzzys.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } else { whereClause.Add(string.Format("{0} >= '{1}'", field.key, field.value)); } } if (fuzzys.Count > 0) { whereClause.Add("(" + string.Join((string.IsNullOrEmpty(param.fuzzyFieldOP) ? " AND " : " " + param.fuzzyFieldOP + " "), fuzzys.ToArray()) + ")"); } } /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ gridCollectionPager.EasyUIgridDoPage4Model <ServiceWorkOrder>(filters, param, ref result); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public InvokeResult Create2(string strParam) { InvokeResult result = new InvokeResult { Success = true }; try { StringObjectDictionary param = new StringObjectDictionary(); param.Add("ColumnString", strParam.Trim()); param.Add("OperatedBy", NormalSession.UserId.ToGuid()); BuilderFactory.DefaultBulder().ExecuteSPNoneQuery("SP_Pub_InsertColumn", param); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public CollectionInvokeResult <StringObjectDictionary> GetRoomInfo(string stationId, string roomId) { CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> { Success = true }; try { StringObjectDictionary filters = new StringObjectDictionary(); filters.Add("StationId", Guid.Parse(stationId)); filters.Add("RoomId", Guid.Parse(roomId)); result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("GetRoomInfoForMonitor", filters); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public CollectionInvokeResult <EvaluatedRequisition_V> GetRequisitionResult(RequisitionParams requisitionParams) { CollectionInvokeResult <EvaluatedRequisition_V> result = new CollectionInvokeResult <EvaluatedRequisition_V>() { Success = true }; try { StringObjectDictionary filters = new StringObjectDictionary(); List <string> whereClause = new List <string>(); var dictionary = requisitionParams.ToStringObjectDictionary(); foreach (var field in dictionary) { if (field.Value != null && field.Value.ToString() != "null" && field.Value.ToString() != "") { if (field.Key == "ResidentName" || field.Key == "IDNo") { whereClause.Add(string.Format("{0} like '%{1}%'", field.Key, field.Value)); } else { filters[field.Key] = field.Value; } } } //特殊-只统计低保 filters["IncomeStatus"] = "00001"; //权限 string sql = PermissionsCategoryView(); if (sql == "user") { whereClause.Add("'0'='1'"); } else if (sql != "admin") { whereClause.Add(sql); } if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } result.rows = BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).List <EvaluatedRequisition_V>("GetEvaluatedRequisition_List", filters); //result.rows = BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ListStringObjectDictionary("SP_Pam_GetWorkItemForServeMan", evaluatedRequisition_V); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <ServiceWorkOrder> ListForEasyUIgrid(EasyUIgridCollectionParam <ServiceWorkOrder> param) { EasyUIgridCollectionInvokeResult <ServiceWorkOrder> result = new EasyUIgridCollectionInvokeResult <ServiceWorkOrder> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } List <string> whereClause = new List <string>(); /**********************************************************/ /***********************begin 模糊查询*********************/ if (param.fuzzyFields != null) { foreach (var field in param.fuzzyFields) { whereClause.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } } /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ /* * if (!string.IsNullOrEmpty(param.sort)) * { * filters.Add("OrderByClause", param.sort + " " + param.order ?? "ASC"); * }*/ /***********************end 排序***************************/ gridCollectionPager.EasyUIgridDoPage4Model <ServiceWorkOrder>(filters, param, ref result); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <StringObjectDictionary> ListForEasyUIgridForAudit(EasyUIgridCollectionParam <StringObjectDictionary> param) { EasyUIgridCollectionInvokeResult <StringObjectDictionary> result = new EasyUIgridCollectionInvokeResult <StringObjectDictionary> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); List <string> whereClause = new List <string>(); /**********************************************************/ if (param.filterFields != null) { foreach (var field in param.filterFields) { if (field.value != null) { filters[field.key] = field.value; } } } /***********************begin 模糊查询*********************/ if (param.fuzzyFields != null) { foreach (var field in param.fuzzyFields) { whereClause.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } } /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ /***********************end 排序***************************/ gridCollectionPager.EasyUIgridDoPage4StringObjectDictionary("WXStationAuthRequest_ListByPageForAudit", filters, param, ref result); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <StringObjectDictionary> QuerySurveyResultsForGrid(EasyUIgridCollectionParam param) { EasyUIgridCollectionInvokeResult <StringObjectDictionary> result = new EasyUIgridCollectionInvokeResult <StringObjectDictionary> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); List <string> whereClause = new List <string>(); if (param.filterFields != null) { foreach (var field in param.filterFields) { filters[field.key] = field.value; } } if (param.fuzzyFields != null) { foreach (var field in param.fuzzyFields) { whereClause.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } } /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ //if (!string.IsNullOrEmpty(param.sort)) //{ // filters.Add("OrderByClause", param.sort + " " + param.order ?? "ASC"); //} /***********************end 排序***************************/ gridCollectionPager.EasyUIgridDoPage4StringObjectDictionary("SurveyResultMixed_ListByPage", filters, param, ref result); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public CollectionInvokeResult <ServiceListDaily_All_V> QueryTodayService(ServiceListDaily_All_V serviceListDaily_All_V) { CollectionInvokeResult <ServiceListDaily_All_V> result = new CollectionInvokeResult <ServiceListDaily_All_V> { Success = true }; try { StringObjectDictionary filters = new StringObjectDictionary(); filters = serviceListDaily_All_V.ToStringObjectDictionary(false); List <string> whereClause = new List <string>(); if (!string.IsNullOrEmpty(serviceListDaily_All_V.DoStatus)) { string[] doStatus = serviceListDaily_All_V.DoStatus.Split(','); foreach (var item in doStatus) { whereClause.Add(string.Format(" '{0} '", item.ToString())); } } filters.Add("WhereClause", " DATEDIFF(D,CheckInTime,GETDATE())=0 "); if (whereClause.Count > 0) { filters.Remove("DoStatus"); filters["WhereClause"] += " and DoStatus in(" + string.Join(" , ", whereClause.ToArray()) + ")"; } filters.Add("OrderByClause", " CheckInTime desc "); result.rows = BuilderFactory.DefaultBulder().List <ServiceListDaily_All_V>(filters); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public CollectionInvokeResult <StringObjectDictionary> GetWorkOrderFinished(InputWorkOrderV2Param param) { CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> { Success = true }; try { List <string> whereClause = new List <string>(); Guid stationId = Guid.Parse(GetHttpHeader("StationId")); StringObjectDictionary param_filters = param.ToStringObjectDictionary(false); StringObjectDictionary filters = new StringObjectDictionary(); if (param_filters != null) { foreach (var field in param_filters) { if (field.Key == "fuzzyFields") { List <string> fuzzys = new List <string>(); foreach (var fields in param.fuzzyFields) { fuzzys.Add(string.Format("{0} like '%{1}%'", fields.key, fields.value)); } if (fuzzys.Count > 0) { whereClause.Add("(" + string.Join(" or ", fuzzys.ToArray()) + ")"); } } else { filters[field.Key] = field.Value; } } } if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } filters["StationId"] = stationId; //StringObjectDictionary filters = new { StationId = stationId }.ToStringObjectDictionary(); result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("GetWorkOrderFinished", filters); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <StringObjectDictionary> OrgDeviceListByPage(EasyUIgridCollectionParam <StringObjectDictionary> param) { EasyUIgridCollectionInvokeResult <StringObjectDictionary> result = new EasyUIgridCollectionInvokeResult <StringObjectDictionary> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); List <string> whereClause = new List <string>(); if (param.filterFields != null) { foreach (var field in param.filterFields) { filters[field.key] = field.value; } } if (param.fuzzyFields != null) { List <string> fuzzys = new List <string>(); foreach (var field in param.fuzzyFields) { fuzzys.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } if (fuzzys.Count > 0) { whereClause.Add("(" + string.Join((string.IsNullOrEmpty(param.fuzzyFieldOP) ? " AND " : " " + param.fuzzyFieldOP + " "), fuzzys.ToArray()) + ")"); } } /***********************begin 自定义代码*******************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } gridCollectionPager.EasyUIgridDoPage4StringObjectDictionary("OrgDeviceListByPage", filters, param, ref result); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <EvaluatedReport> ListForEasyUIgridPage(EasyUIgridCollectionParam <EvaluatedReport> param) { EasyUIgridCollectionInvokeResult <EvaluatedReport> result = new EasyUIgridCollectionInvokeResult <EvaluatedReport> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } List <string> whereClause = new List <string>(); /**********************************************************/ /***********************begin 模糊查询*********************/ if (param.fuzzyFields != null) { foreach (var field in param.fuzzyFields) { whereClause.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } } /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ gridCollectionPager.EasyUIgridDoPage4Model <EvaluatedReport>(filters, param, ref result); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public CollectionInvokeResult <TableJoin> QueryDuplicates(string strParms) { CollectionInvokeResult <TableJoin> result = new CollectionInvokeResult <TableJoin> { Success = true }; StringObjectDictionary filters = new StringObjectDictionary(); try { var dictionary = new StringObjectDictionary().MixInJson(strParms); filters.Add("WhereClause", "((TableName1='" + dictionary["TableName1"] + "' and TableName2='" + dictionary["TableName2"] + "') or (TableName2='" + dictionary["TableName1"] + "' and TableName1='" + dictionary["TableName2"] + "')) and Status=1 and Id != " + dictionary["Id"]); result.rows = BuilderFactory.DefaultBulder().List <TableJoin>(filters); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
private void _MessageLoopForAccessPoints() { foreach (var part in accessPointParts) { if (threadsToAccessPoints.ContainsKey(part.ObjectId)) { Thread accessPointThead = threadsToAccessPoints[part.ObjectId] as Thread; if (accessPointThead != null) { if (accessPointThead.IsAlive) { accessPointThead.Abort(); threadsToAccessPoints.Remove(part.ObjectId); } } } threadsToAccessPoints.Add(part.ObjectId, InitAccessPointThread(part)); } }
public InvokeResult UpdateWorkExecute(WorkExecuteParam param) { InvokeResult result = new InvokeResult { Success = true }; try { StringObjectDictionary filters = new StringObjectDictionary(); if (param != null && param.Ids.Count > 0) { filters.Add("Ids", string.Join("','", param.Ids.Where(s => !string.IsNullOrEmpty(s)).ToArray())); BuilderFactory.DefaultBulder().ExecuteScalar("DailyReminder_UpdateWorkExecute", filters); } } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }