|
@@ -1,6 +1,7 @@ |
|
|
using Learun.Application.OA; |
|
|
using Learun.Application.OA; |
|
|
using Learun.Application.TwoDevelopment.LR_Desktop; |
|
|
using Learun.Application.TwoDevelopment.LR_Desktop; |
|
|
using Learun.Util; |
|
|
using Learun.Util; |
|
|
|
|
|
using Newtonsoft.Json; |
|
|
using System; |
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Configuration; |
|
|
using System.Configuration; |
|
@@ -95,9 +96,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers |
|
|
if (entity.IsSend == "1") |
|
|
if (entity.IsSend == "1") |
|
|
{ |
|
|
{ |
|
|
//获取配置文件 |
|
|
//获取配置文件 |
|
|
string siteId = HttpUtility.UrlEncode(ConfigurationManager.AppSettings["SiteId"]); |
|
|
|
|
|
string channelId = HttpUtility.UrlEncode(ConfigurationManager.AppSettings["ChannelId"]); |
|
|
|
|
|
string ApiKey = HttpUtility.UrlEncode(ConfigurationManager.AppSettings["ApiKey"]); |
|
|
|
|
|
|
|
|
string siteId = ConfigurationManager.AppSettings["SiteId"]; |
|
|
|
|
|
string channelId = ConfigurationManager.AppSettings["ChannelId"]; |
|
|
|
|
|
string ApiKey = ConfigurationManager.AppSettings["ApiKey"]; |
|
|
SemdNewList SendNew = new SemdNewList |
|
|
SemdNewList SendNew = new SemdNewList |
|
|
{ |
|
|
{ |
|
|
Title = entity.F_FullHead, |
|
|
Title = entity.F_FullHead, |
|
@@ -110,20 +111,18 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers |
|
|
AddUserName = entity.F_CreateUserName, |
|
|
AddUserName = entity.F_CreateUserName, |
|
|
}; |
|
|
}; |
|
|
WebHeaderCollection ApiId = new WebHeaderCollection |
|
|
WebHeaderCollection ApiId = new WebHeaderCollection |
|
|
{ |
|
|
|
|
|
{ "X-SS-API-KEY", ApiKey } |
|
|
|
|
|
}; |
|
|
|
|
|
string responses = Util.HttpMethods.HttpPosts("http://localhost:8007/api/v1/contents/" + siteId + "/" + channelId, SendNew.ToJson(), ApiId); |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
{ "X-SS-API-KEY", ApiKey } |
|
|
|
|
|
}; |
|
|
|
|
|
string responses = Util.HttpMethods.HttpPosts("http://192.168.50.127:8007/api/v1/contents/" + siteId + "/" + channelId, SendNew.ToJson(), ApiId); |
|
|
|
|
|
|
|
|
#endregion |
|
|
#endregion |
|
|
#region 修改审核状态 |
|
|
#region 修改审核状态 |
|
|
JavaScriptSerializer Jss = new JavaScriptSerializer(); |
|
|
|
|
|
Dictionary<string, object> DicText = (Dictionary<string, object>)Jss.DeserializeObject(responses); |
|
|
|
|
|
string Nid = DicText["id"].ToString(); |
|
|
|
|
|
|
|
|
string Nid = JsonConvert.DeserializeObject<Root>(responses).value.id; |
|
|
AuditList AList = new AuditList(); |
|
|
AuditList AList = new AuditList(); |
|
|
if (Nid != null) |
|
|
if (Nid != null) |
|
|
{ |
|
|
{ |
|
|
AList.siteId = siteId; |
|
|
|
|
|
|
|
|
AList.siteId = Convert.ToInt32(siteId); |
|
|
List<contents> listCon = new List<contents>(); |
|
|
List<contents> listCon = new List<contents>(); |
|
|
//这里应该循环,如果多个 |
|
|
//这里应该循环,如果多个 |
|
|
contents con = new contents(); |
|
|
contents con = new contents(); |
|
@@ -131,8 +130,8 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers |
|
|
con.id = Convert.ToInt32(Nid); |
|
|
con.id = Convert.ToInt32(Nid); |
|
|
listCon.Add(con); |
|
|
listCon.Add(con); |
|
|
AList.contents = listCon; |
|
|
AList.contents = listCon; |
|
|
AList.reasons = "终审通过"; |
|
|
|
|
|
Util.HttpMethods.HttpPosts("http://localhost:8007/api/v1/contents/actions/check", AList.ToJson(), ApiId); |
|
|
|
|
|
|
|
|
//AList.reasons = "终审通过"; |
|
|
|
|
|
Util.HttpMethods.HttpPosts("http://192.168.50.127:8007/api/v1/contents/check", AList.ToJson(), ApiId); |
|
|
} |
|
|
} |
|
|
#endregion |
|
|
#endregion |
|
|
return Success("发布成功!"); |
|
|
return Success("发布成功!"); |
|
@@ -157,4 +156,13 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers |
|
|
#endregion |
|
|
#endregion |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
public class Root |
|
|
|
|
|
{ |
|
|
|
|
|
public RootValue value { get; set; } |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public class RootValue |
|
|
|
|
|
{ |
|
|
|
|
|
public string id { get; set; } |
|
|
|
|
|
} |
|
|
} |
|
|
} |