public string NodeInfo(dynamic _) { var recdata = this.GetResquetData <NodelInModel>(); try { #region "接口调用验证" //bool flag = DataValidation(recdata.DateTime, recdata.Random, recdata.Sign); //if (!flag) //{ // return this.WriteValidationLog("LoginModule", recdata.DeviceId); //} #endregion NodeBusiness messageBll = new NodeBusiness(); NodeInfoModel info = messageBll.GetNodeInfo(recdata.data.CompCode); if (info != null) { return(this.SendData <NodeInfoModel>(info, "获取经营节点详细成功", ResponseType.Success)); } else { return(this.SendData("获取经营节点列详细为空!", ResponseType.Success)); } } catch (Exception ex) { return(this.WriteExceptionLog("LoginModule", recdata.DeviceId, recdata.DeviceId, "获取经营节点详细异常:" + Json.ToJson(recdata) + "[异常信息:" + ex.Message + "]", "获取经营节点详细异常:" + ex.Message)); } }
/// <summary> /// 获取经营节点的信息 /// </summary> /// <param name="strCompId"></param> /// <returns></returns> public NodeInfoModel GetNodeInfo(string strCompId) { NodeInfoModel info = null; string strSql = string.Format(@" select comp_id, comp_name, legal_represent, reg_id, addr, tel, area_name,'' compprofile from v_bl_node_info where comp_id=:v_comp_id "); DataTable dt = OracleHelper.Query(strSql, new OracleParameter("v_comp_id", strCompId)); if (dt != null) { if (dt.Rows.Count > 0) { info = new NodeInfoModel(); info.Address = dt.Rows[0]["addr"] == DBNull.Value ? string.Empty : dt.Rows[0]["addr"].ToString(); info.CompName = dt.Rows[0]["comp_name"] == DBNull.Value ? string.Empty : dt.Rows[0]["comp_name"].ToString(); info.CompProfile = dt.Rows[0]["compprofile"] == DBNull.Value ? string.Empty : dt.Rows[0]["compprofile"].ToString(); info.ContactInformation = dt.Rows[0]["tel"] == DBNull.Value ? string.Empty : dt.Rows[0]["tel"].ToString(); info.LegalPerson = dt.Rows[0]["legal_represent"] == DBNull.Value ? string.Empty : dt.Rows[0]["legal_represent"].ToString(); info.License = dt.Rows[0]["reg_id"] == DBNull.Value ? string.Empty : dt.Rows[0]["reg_id"].ToString(); info.Telphone = dt.Rows[0]["tel"] == DBNull.Value ? string.Empty : dt.Rows[0]["tel"].ToString(); } } return(info); }