public QueryLoanProjectJsonInfo QueryLoanProject(string UID, string loan_proj_no, string loan_status, int current_page, int page_size) { QueryLoanProjectJsonInfo JsonInfo = null; string sign, sign_type; string gateway = loan_url + "?_input_charset=utf-8"; #region 拼接参数并转换成数组 List <string> liststr = new List <string>(); liststr.Add("service=query_loan_project"); liststr.Add("version=1.0"); liststr.Add("partner_id=" + partner_id); liststr.Add("_input_charset=utf-8"); liststr.Add("uid=" + UID); if (loan_proj_no != "") { liststr.Add("loan_proj_no=" + loan_proj_no); } if (loan_status != "" && loan_status != "NORMAL") { liststr.Add("loan_status=" + loan_status); } if (current_page > 0) { liststr.Add("current_page=" + current_page); } if (page_size > 0) { liststr.Add("page_size=" + page_size); } #endregion string[] parameters = liststr.ToArray(); sign_type = "MD5"; sign = pub.ReturnSignStr(parameters, "utf-8", tradesignkey); #region 拼接传递参数 StringBuilder prestr = new StringBuilder(); prestr.Append("&service=query_loan_project"); prestr.Append("&version=1.0"); prestr.Append("&partner_id=" + partner_id); prestr.Append("&sign=" + sign); prestr.Append("&sign_type=" + sign_type); prestr.Append("&uid=" + UID); if (loan_proj_no != "") { prestr.Append("&loan_proj_no=" + loan_proj_no); } if (loan_status != "" && loan_status != "NORMAL") { prestr.Append("&loan_status=" + loan_status); } if (current_page > 0) { prestr.Append("¤t_page=" + current_page); } if (page_size > 0) { prestr.Append("&page_size=" + page_size); } #endregion string request_url = gateway + prestr.ToString(); CookieCollection cookies = new CookieCollection(); string strJson = HttpHelper.GetResponseString(HttpHelper.CreateGetHttpResponse(request_url, 0, "", cookies)); JsonInfo = JsonHelper.JSONToObject <QueryLoanProjectJsonInfo>(strJson); if (JsonInfo != null && JsonInfo.Is_success == "T") { pub.AddSysInterfaceLog(2, "信贷信息查询", "成功", request_url, "信贷信息查询成功"); } else { pub.AddSysInterfaceLog(2, "信贷信息查询", "失败", request_url, JsonInfo.Error_code + ":" + JsonInfo.Error_message); } return(JsonInfo); }
public string GetContractTemplateContent(ContractInfo ci, string orders_sn)//得到合同的内容模板 { StringBuilder strHTML = new StringBuilder(); OrdersInfo entity = Myorder.GetOrdersInfoBySN(orders_sn); SupplierInfo supplierInfo = null; string supplierName = ""; string member_name = ""; MemberInfo memberinfo = new Member().GetMemberByID(); if (memberinfo != null) { member_name = memberinfo.Member_NickName; } if (entity != null) { QueryLoanProjectJsonInfo JsonInfo = null; if (entity.Orders_Loan_proj_no != "") { JsonInfo = credit.QueryLoanProject("M" + tools.NullStr(Session["member_id"]), entity.Orders_Loan_proj_no, "", 0, 0); } else { JsonInfo = new QueryLoanProjectJsonInfo(); } supplierInfo = MySupplier.GetSupplierByID(entity.Orders_SupplierID, pub.CreateUserPrivilege("1392d14a-6746-4167-804a-d04a2f81d226")); if (supplierInfo != null) { supplierName = supplierInfo.Supplier_CompanyName; } else { supplierName = "--"; } } string srcString = ""; if (entity.Orders_ContractID < 1) { } else { //ContractTemplateInfo ContractInfo = MyContractTemplate.GetContractTemplateByID(1, pub.CreateUserPrivilege("d4d58107-0e58-485f-af9e-3b38c7ff9672")); if (entity != null) { ContractInfo ContractInfo = MyContract.GetContractByID(entity.Orders_ContractID, pub.CreateUserPrivilege("a3465003-08b3-4a31-9103-28d16c57f2c8")); if (ContractInfo != null) { srcString = ContractInfo.Contract_Template; } } } string s = ""; if (srcString != null) { QueryInfo qi = new QueryInfo(); qi.CurrentPage = 1; qi.PageSize = 0; string Contract_CompanyName = ""; string Contract_CompanyAbbreviation = ""; string State_CN = ""; int Contract_ShopNum = 0; string Contract_CEO = ""; string Contract_TrainCEO = ""; string Contract_ShopType = ""; string Contract_Address = ""; string Contract_Tel = ""; if (ci != null) { } else { } return(srcString); //return s; } else { return(srcString); } return(srcString); }