线索增加eid,否则打不开
This commit is contained in:
parent
085deceb17
commit
282fcbdb0f
|
|
@ -23,6 +23,31 @@ namespace Mini.Common
|
||||||
{
|
{
|
||||||
return ConfigHelper.GetSectionValue(key);
|
return ConfigHelper.GetSectionValue(key);
|
||||||
}
|
}
|
||||||
|
public static string PostAjaxData(string url, string param, Encoding encoding, Dictionary<string, string> header, int timeout = 20000)
|
||||||
|
{
|
||||||
|
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||||
|
request.Method = "POST";
|
||||||
|
request.ContentType = "application/json;charet=utf-8";
|
||||||
|
request.Headers.Add("dataType", "json");
|
||||||
|
request.Headers.Add("type", "post");
|
||||||
|
request.Timeout = timeout;
|
||||||
|
foreach (var head in header)
|
||||||
|
{
|
||||||
|
request.Headers.Add(head.Key, head.Value);
|
||||||
|
}
|
||||||
|
byte[] data = encoding.GetBytes(param);
|
||||||
|
|
||||||
|
using (BinaryWriter reqStream = new BinaryWriter(request.GetRequestStream()))
|
||||||
|
{
|
||||||
|
reqStream.Write(data, 0, data.Length);
|
||||||
|
}
|
||||||
|
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
|
||||||
|
{
|
||||||
|
StreamReader reader = new StreamReader(response.GetResponseStream(), encoding);
|
||||||
|
string result = reader.ReadToEnd();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取时间戳
|
/// 获取时间戳
|
||||||
|
|
|
||||||
|
|
@ -35,5 +35,11 @@ namespace Mini.Model.ViewModel
|
||||||
public string deptname { get; set; }
|
public string deptname { get; set; }
|
||||||
public int? deptid { get; set; }
|
public int? deptid { get; set; }
|
||||||
}
|
}
|
||||||
|
public class Wx_isDealDTO
|
||||||
|
{
|
||||||
|
public List<string> extuseridList { get; set; }
|
||||||
|
public List<string> residList { get; set; }
|
||||||
|
public List<string> eidList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -758,6 +758,88 @@ namespace Mini.Web.Areas.Admin.Controllers
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool CheckFlag(string ext_flag)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
//ext_flag = Utility.Decrypt(ext_flag);
|
||||||
|
//if (Utility.ConvertStringToDateTime(ext_flag).AddHours(2) >= DateTime.Now)
|
||||||
|
//{
|
||||||
|
// return true;
|
||||||
|
//}
|
||||||
|
//return false;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 聊天记录列表 from 合规系统
|
||||||
|
/// </summary>
|
||||||
|
[Area("Admin")]
|
||||||
|
public ActionResult User_extuserList3(string exuserid, string isHg, string showstyle, string resid, string ext_flag, string eid)
|
||||||
|
{
|
||||||
|
List<Wx_ExuserModel> list = new List<Wx_ExuserModel>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!CheckFlag(ext_flag))
|
||||||
|
{
|
||||||
|
return Content("验证失败或链接超时");
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(exuserid))
|
||||||
|
{
|
||||||
|
list = _iww_hhuser_service.Extuser_GetAllUser(exuserid);
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
item.name = ManagerPhoneHelper.FormatPhoneUserName(string.Format("{0}", item.name));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
LogHelper.Error(e.ToString());
|
||||||
|
}
|
||||||
|
List<Ww_MsgRoom> roomeCList = new List<Ww_MsgRoom>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string notShowGroup = _bas_parameter.GetParameterValue(ParameterEnums.NotShowGroupCorp);
|
||||||
|
List<RoomParam> roomlist = list.GroupBy(m => new { m.corpid, m.extuserid }).Select(m => new RoomParam { corpid = m.Key.corpid, extuserid = m.Key.extuserid }).ToList();
|
||||||
|
foreach (RoomParam item in roomlist)
|
||||||
|
{
|
||||||
|
if (notShowGroup.IndexOf($"[{item.corpid}]") > -1)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
List<Ww_MsgRoom> roomeCList2 = _iww_hhuser_service.GetRoomListByChengYuan(item.corpid, item.extuserid);
|
||||||
|
foreach (Ww_MsgRoom ww in roomeCList2)
|
||||||
|
{
|
||||||
|
if (roomeCList.Where(m => m.roomid == ww.roomid).Count() == 0)
|
||||||
|
{
|
||||||
|
Ww_MsgRoom room = new Ww_MsgRoom
|
||||||
|
{
|
||||||
|
corp = ww.corp,
|
||||||
|
roomid = ww.roomid,
|
||||||
|
ctime = ww.ctime,
|
||||||
|
ctimestr = ww.ctimestr,
|
||||||
|
roomname = ww.roomname,
|
||||||
|
userlist = ww.userlist
|
||||||
|
};
|
||||||
|
room.ctimestr = room.ctime.HasValue ? room.ctime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
|
||||||
|
roomeCList.Add(room);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
roomeCList = roomeCList.OrderByDescending(m => m.ctime).ToList();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
LogHelper.Error("错误:" + e.ToString());
|
||||||
|
}
|
||||||
|
//BuildExuserInfo(list);
|
||||||
|
//Extuser_AddDeal(list, resid);
|
||||||
|
ViewBag.data = Common.JsonHelper.ObjDivertToJson(list);
|
||||||
|
ViewBag.roomData = Common.JsonHelper.ObjDivertToJson(roomeCList);//群的列表
|
||||||
|
ViewBag.isHg = isHg;
|
||||||
|
ViewBag.eid = eid;
|
||||||
|
// SetBuriedLog(new Ww_Buried_Log { eid = eid, buried_type = "企微聊天记录列表" });
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[Area("Admin")]
|
[Area("Admin")]
|
||||||
public ActionResult OneMessage(string corpid, string name, string extuserid, string uname, string userid)
|
public ActionResult OneMessage(string corpid, string name, string extuserid, string uname, string userid)
|
||||||
|
|
@ -815,7 +897,7 @@ namespace Mini.Web.Areas.Admin.Controllers
|
||||||
j = JsonConvert.SerializeObject(new saledsleadDesDto { appid = $"{corp}_1", appuserid = customer, deptid = deptid, eid = eid, employeeid = eid, employee_id = eid, employee = eid, ext_flag = ext_flag });
|
j = JsonConvert.SerializeObject(new saledsleadDesDto { appid = $"{corp}_1", appuserid = customer, deptid = deptid, eid = eid, employeeid = eid, employee_id = eid, employee = eid, ext_flag = ext_flag });
|
||||||
content = Utility.encyptDataByConfig("saleclue", Newtonsoft.Json.JsonConvert.SerializeObject
|
content = Utility.encyptDataByConfig("saleclue", Newtonsoft.Json.JsonConvert.SerializeObject
|
||||||
(
|
(
|
||||||
new { account = "account", password = "password", appid = $"{corp}_1", appuserid = customer, employee_id = eid, time = Utility.GetTimeStamp() }
|
new { account = "account", password = "password", appid = $"{corp}_1", appuserid = customer, employee_id = eid,eid=eid, time = Utility.GetTimeStamp() }
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
ViewBag.content = System.Web.HttpUtility.UrlEncode(content);
|
ViewBag.content = System.Web.HttpUtility.UrlEncode(content);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,106 @@
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "User_extuserList";
|
||||||
|
Layout = "~/Areas/Admin/Views/Shared/_content.cshtml";
|
||||||
|
}
|
||||||
|
<style>
|
||||||
|
.x-body {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="x-body">
|
||||||
|
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
|
||||||
|
<br />
|
||||||
|
<table class="layui-hide" id="tabl2" lay-filter="tabl2"></table>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var lauidata = @Html.Raw(ViewBag.data);
|
||||||
|
var lauiRoomData = @Html.Raw(ViewBag.roomData);//群
|
||||||
|
layui.use('table', function () {
|
||||||
|
var table = layui.table;
|
||||||
|
table.render({
|
||||||
|
id: 'wxmessagelist',//列表别名ID
|
||||||
|
elem: '#tabl1',//表ID
|
||||||
|
data: lauidata,
|
||||||
|
page: false,
|
||||||
|
limit: 500,
|
||||||
|
cols: [
|
||||||
|
[{
|
||||||
|
field: 'nn', title: '<i class="layui-icon layui-icon-login-wechat" style="font-size: 16px; color: #319041;"></i> 单人聊天', colspan: 5
|
||||||
|
}]
|
||||||
|
,
|
||||||
|
[
|
||||||
|
{ field: 'corpname', title: '企微主体' }
|
||||||
|
, { field: 'name', title: '微信昵称' }
|
||||||
|
, { field: 'extuserid', title: '客户ID' }
|
||||||
|
, { field: 'deptname', title: '事业部' }
|
||||||
|
, { field: 'isDeal', title: '成交状态' }
|
||||||
|
, { field: 'isUnfollow', title: '取关状态' }
|
||||||
|
, { field: 'eidInfo', title: '员工' }
|
||||||
|
, { field: 'uname', title: '员工企微名称' }
|
||||||
|
, { field: 'userid', title: '员工企微ID' }
|
||||||
|
, { field: 'action', title: '查看', templet: '#actionTpl' }
|
||||||
|
]
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
table.render({
|
||||||
|
id: 'room',//列表别名ID
|
||||||
|
elem: '#tabl2',//表ID
|
||||||
|
data: lauiRoomData,
|
||||||
|
cols: [[{
|
||||||
|
field: 'nn', title: '<i class="layui-icon layui-icon-group" style="font-size: 16px; color: #4374a7;"></i> 群聊', colspan: 5
|
||||||
|
}]
|
||||||
|
, [
|
||||||
|
{ field: 'roomid', title: '群ID' }
|
||||||
|
, { field: 'roomname', title: '群名称' }
|
||||||
|
, { field: 'ctimestr', title: '时间' }
|
||||||
|
, { field: 'action', title: '查看', templet: '#actionTpl2' }
|
||||||
|
]],
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function showMessage(corpid, name, extuserid, uname, userid) {
|
||||||
|
//alert(username);
|
||||||
|
//alert(jobwxusername);
|
||||||
|
//alert(companycode);
|
||||||
|
var ext_flag = "@Html.Raw($"&ext_flag={Mini.Common.Utility.EncryptUrlEncode(Mini.Common.Utility.ConvertDateTimeLong(DateTime.Now).ToString()).ToString()}")";
|
||||||
|
var url = "MessageDetial?isgroup=false&corp=" + corpid + "&nickname=" + name + "&customer=" + extuserid + "&uname=" + uname + "&eid=@Html.Raw(ViewBag.eid)" + "&userid=" + userid + "&IsHg=@Html.Raw(ViewBag.isHg)" + ext_flag;
|
||||||
|
layui.use('layer', function () {
|
||||||
|
var layer = layui.layer;
|
||||||
|
layer.open({
|
||||||
|
title: '微信聊天信息',
|
||||||
|
type: 2,
|
||||||
|
content: url,
|
||||||
|
area: ['90%', '90%']
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function showGroup(corpid, roomid) {
|
||||||
|
//alert(username);
|
||||||
|
//alert(jobwxusername);
|
||||||
|
//alert(companycode);
|
||||||
|
var url = "GroupRoom?isgroup=true&corp=" + corpid + "&roomid=" + roomid + "&IsHg=@Html.Raw(ViewBag.isHg)";
|
||||||
|
layui.use('layer', function () {
|
||||||
|
var layer = layui.layer;
|
||||||
|
layer.open({
|
||||||
|
title: '企业微信群聊天记录',
|
||||||
|
type: 2,
|
||||||
|
content: url,
|
||||||
|
area: ['90%', '90%']
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script type="text/html" id="actionTpl">
|
||||||
|
{{# if(d.isOutDept!=1){ }}
|
||||||
|
<a href="javascript:void(0)" onclick="showMessage('{{d.corpid}}','{{encodeURIComponent(d.name.replace(/'/g,""))}}','{{d.extuserid}}','{{encodeURIComponent(d.uname.replace(/'/g,""))}}','{{d.userid}}')" style="color:red">查看</a>
|
||||||
|
{{# }else{ }}
|
||||||
|
<span></span>
|
||||||
|
{{# } }}
|
||||||
|
</script>
|
||||||
|
<script type="text/html" id="actionTpl2">
|
||||||
|
<a href="javascript:void(0)" onclick="showGroup('{{d.corp}}','{{d.roomid}}')" style="color:red">查看</a>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
@ -6,15 +6,15 @@
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"crmContext": "Server=10.22.11.112;uid=root;pwd=Sa123456.;database=wework;port=3306;Connection Timeout=380;",
|
"crmContext": "Server=10.22.11.116;uid=root;pwd=Sa123456.;database=wework;port=3306;Connection Timeout=380;",
|
||||||
"crmMsgContext": "Server=10.22.11.112;uid=root;pwd=Sa123456.;database=wework_ww89347c2378b6e050;port=3306;sslmode=none;Connection Timeout=380;",
|
"crmMsgContext": "Server=10.22.11.116;uid=root;pwd=Sa123456.;database=wework_ww89347c2378b6e050;port=3306;sslmode=none;Connection Timeout=380;",
|
||||||
"wxContext": "Server=10.22.11.112;uid=root;pwd=Sa123456.;database=wxcontext;port=3306;sslmode=none;Connection Timeout=380;",
|
"wxContext": "Server=10.22.11.116;uid=root;pwd=Sa123456.;database=wxcontext;port=3306;sslmode=none;Connection Timeout=380;",
|
||||||
"hgContext": "DATA SOURCE=192.168.11.67:1521/orcl;PERSIST SECURITY INFO=True;USER ID=UPDEV;PASSWORD=sa123456."
|
"hgContext": "DATA SOURCE=192.168.11.67:1521/orcl;PERSIST SECURITY INFO=True;USER ID=UPDEV;PASSWORD=sa123456."
|
||||||
},
|
},
|
||||||
"HHMessageFile": "http://10.22.11.112:8081/",
|
"HHMessageFile": "http://10.22.11.116:8081/",
|
||||||
"InnerFile": "http://10.22.11.112:8081/",
|
"InnerFile": "http://10.22.11.116:8081/",
|
||||||
"NewCoreInterface": "http://192.168.11.111:909/",
|
"NewCoreInterface": "http://192.168.11.111:909/",
|
||||||
"HG_INTERNAL_WEBAPI": "p://192.168.11.80:8094/",
|
"HG_INTERNAL_WEBAPI": "http://192.168.11.80:8094/",
|
||||||
"CRM_CORE_WEBAPI": "http://192.168.11.80:8088/",
|
"CRM_CORE_WEBAPI": "http://192.168.11.80:8088/",
|
||||||
"ZXD_WEBAPI": "http://120.77.165.155:8089/"
|
"ZXD_WEBAPI": "http://120.77.165.155:8089/"
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue