zhoufan преди 4 години
родител
ревизия
896bf1c5ad
променени са 47 файла, в които са добавени 0 реда и са изтрити 3941 реда
  1. 0 6
      RMYY_CallCenter_Api.sln
  2. 0 15
      RMYY_CallCenter_Api/App_Start/FilterConfig.cs
  3. 0 23
      RMYY_CallCenter_Api/App_Start/RouteConfig.cs
  4. 0 52
      RMYY_CallCenter_Api/Common/Common.cs
  5. 0 13
      RMYY_CallCenter_Api/Common/ListBase.cs
  6. 0 129
      RMYY_CallCenter_Api/Configs/log4net.config
  7. 0 56
      RMYY_CallCenter_Api/Configs/system.config
  8. 0 118
      RMYY_CallCenter_Api/Controllers/BaseController.cs
  9. 0 318
      RMYY_CallCenter_Api/Controllers/CallTel/CallInScreenController.cs
  10. 0 206
      RMYY_CallCenter_Api/Controllers/CallTel/CallblackController.cs
  11. 0 129
      RMYY_CallCenter_Api/Controllers/CallTel/CallleaveController.cs
  12. 0 280
      RMYY_CallCenter_Api/Controllers/CallTel/CallrecordsController.cs
  13. 0 180
      RMYY_CallCenter_Api/Controllers/CallTel/MobiledataController.cs
  14. 0 59
      RMYY_CallCenter_Api/Controllers/CallTel/WorkOffDaysController.cs
  15. 0 341
      RMYY_CallCenter_Api/Controllers/DictionaryController.cs
  16. 0 273
      RMYY_CallCenter_Api/Controllers/GongDanTypeController.cs
  17. 0 58
      RMYY_CallCenter_Api/Controllers/HomeController.cs
  18. 0 53
      RMYY_CallCenter_Api/Controllers/IndexController.cs
  19. 0 171
      RMYY_CallCenter_Api/Controllers/System/DepartmentController.cs
  20. 0 170
      RMYY_CallCenter_Api/Controllers/System/MenuController.cs
  21. 0 277
      RMYY_CallCenter_Api/Controllers/System/RoleController.cs
  22. 0 84
      RMYY_CallCenter_Api/Controllers/System/UserAccountController.cs
  23. 0 87
      RMYY_CallCenter_Api/Filter/AuthorizeFilter.cs
  24. 0 35
      RMYY_CallCenter_Api/Filter/ExceptionFilter.cs
  25. 0 1
      RMYY_CallCenter_Api/Global.asax
  26. 0 45
      RMYY_CallCenter_Api/Global.asax.cs
  27. 0 21
      RMYY_CallCenter_Api/Models/Filter/FilterCallPlan.cs
  28. 0 13
      RMYY_CallCenter_Api/Models/Filter/FilterCategory.cs
  29. 0 16
      RMYY_CallCenter_Api/Models/Filter/FilterDictionary.cs
  30. 0 14
      RMYY_CallCenter_Api/Models/Filter/FilterExpress.cs
  31. 0 15
      RMYY_CallCenter_Api/Models/Filter/FilterLog.cs
  32. 0 13
      RMYY_CallCenter_Api/Models/Filter/FilterModuleFunction.cs
  33. 0 14
      RMYY_CallCenter_Api/Models/Filter/FilterOrder.cs
  34. 0 16
      RMYY_CallCenter_Api/Models/Filter/FilterPagerInfo.cs
  35. 0 14
      RMYY_CallCenter_Api/Models/Filter/FilterProduct.cs
  36. 0 17
      RMYY_CallCenter_Api/Models/Filter/FilterQuestion.cs
  37. 0 15
      RMYY_CallCenter_Api/Models/Filter/FilterSysConfig.cs
  38. 0 48
      RMYY_CallCenter_Api/Models/Filter/FilterTalkRecord.cs
  39. 0 18
      RMYY_CallCenter_Api/Models/Filter/FilterUserAccount.cs
  40. 0 77
      RMYY_CallCenter_Api/Models/FormsPrincipal.cs
  41. 0 27
      RMYY_CallCenter_Api/Models/Input/DictionaryInput.cs
  42. 0 35
      RMYY_CallCenter_Api/Properties/AssemblyInfo.cs
  43. 0 237
      RMYY_CallCenter_Api/RMYY_CallCenter_Api.csproj
  44. 0 30
      RMYY_CallCenter_Api/Web.Debug.config
  45. 0 31
      RMYY_CallCenter_Api/Web.Release.config
  46. 0 73
      RMYY_CallCenter_Api/Web.config
  47. 0 18
      RMYY_CallCenter_Api/packages.config

+ 0 - 6
RMYY_CallCenter_Api.sln

@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
3 3
 # Visual Studio 15
4 4
 VisualStudioVersion = 15.0.28307.1525
5 5
 MinimumVisualStudioVersion = 10.0.40219.1
6
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RMYY_CallCenter_Api", "RMYY_CallCenter_Api\RMYY_CallCenter_Api.csproj", "{6AAD6561-5D5C-4C81-8BEA-9A9523179E48}"
7
-EndProject
8 6
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RMYY_CallCenter_Api.Utility", "RMYY_CallCenter_Api.Utility\RMYY_CallCenter_Api.Utility.csproj", "{4E6A4FE2-C305-48E6-A1BF-B939B9252E24}"
9 7
 EndProject
10 8
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RMYY_CallCenter_Api.DB", "RMYY_CallCenter_Api.DB\RMYY_CallCenter_Api.DB.csproj", "{F5E242C5-4F08-45CB-BFE7-E3B304FCCE1F}"
@@ -21,10 +19,6 @@ Global
21 19
 		Release|Any CPU = Release|Any CPU
22 20
 	EndGlobalSection
23 21
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
24
-		{6AAD6561-5D5C-4C81-8BEA-9A9523179E48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25
-		{6AAD6561-5D5C-4C81-8BEA-9A9523179E48}.Debug|Any CPU.Build.0 = Debug|Any CPU
26
-		{6AAD6561-5D5C-4C81-8BEA-9A9523179E48}.Release|Any CPU.ActiveCfg = Release|Any CPU
27
-		{6AAD6561-5D5C-4C81-8BEA-9A9523179E48}.Release|Any CPU.Build.0 = Release|Any CPU
28 22
 		{4E6A4FE2-C305-48E6-A1BF-B939B9252E24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29 23
 		{4E6A4FE2-C305-48E6-A1BF-B939B9252E24}.Debug|Any CPU.Build.0 = Debug|Any CPU
30 24
 		{4E6A4FE2-C305-48E6-A1BF-B939B9252E24}.Release|Any CPU.ActiveCfg = Release|Any CPU

+ 0 - 15
RMYY_CallCenter_Api/App_Start/FilterConfig.cs

@@ -1,15 +0,0 @@
1
-using RMYY_CallCenter_Api.Filter;
2
-using System.Web;
3
-using System.Web.Mvc;
4
-
5
-namespace RMYY_CallCenter_Api
6
-{
7
-    public class FilterConfig
8
-    {
9
-        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
10
-        {
11
-            filters.Add(new AuthorizeFilter());
12
-            filters.Add(new ExceptionFilter());
13
-        }
14
-    }
15
-}

+ 0 - 23
RMYY_CallCenter_Api/App_Start/RouteConfig.cs

@@ -1,23 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Web;
5
-using System.Web.Mvc;
6
-using System.Web.Routing;
7
-
8
-namespace RMYY_CallCenter_Api
9
-{
10
-    public class RouteConfig
11
-    {
12
-        public static void RegisterRoutes(RouteCollection routes)
13
-        {
14
-            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
15
-
16
-            routes.MapRoute(
17
-                name: "Default",
18
-                url: "{controller}/{action}/{id}",
19
-                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
20
-            );
21
-        }
22
-    }
23
-}

+ 0 - 52
RMYY_CallCenter_Api/Common/Common.cs

@@ -1,52 +0,0 @@
1
-using RMYY_CallCenter_Api.Utility;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Data;
5
-using System.Linq;
6
-using System.Web;
7
-
8
-namespace RMYY_CallCenter_Api
9
-{
10
-    public static class Common
11
-    {
12
-        /// <summary>
13
-        /// 获取授权action
14
-        /// </summary>
15
-        /// <returns></returns>
16
-        public static List<string> GetAuthActions()
17
-        {
18
-            var actions = CacheHelper.Get<List<string>>("AuthActions");
19
-            if (actions != null)
20
-            {
21
-                return actions;
22
-            }
23
-            else
24
-            {
25
-                var dt = DB.DbHelperSQL.Query("select F_Action FROM T_Sys_Menu with(nolock) where F_State=1 and isnull(F_Action,'')!='' ").Tables[0];
26
-                var actions1 = (from DataRow dr in dt.Rows select dr["F_Action"].ToString().ToLower()).ToList();
27
-                CacheHelper.Insert("AuthActions", actions1, 10);
28
-                return actions1;
29
-            }
30
-        }
31
-
32
-        /// <summary>
33
-        /// 获取角色授权action
34
-        /// </summary>
35
-        /// <returns></returns>
36
-        public static List<string> GetRoleActions(int roleId)
37
-        {
38
-            var actions = CacheHelper.Get<List<string>>("RoleActions_" + roleId);
39
-            if (actions != null)
40
-            {
41
-                return actions;
42
-            }
43
-            else
44
-            {
45
-                var dt = DB.DbHelperSQL.Query("select m.F_Action FROM T_Sys_RoleMenu rm with(nolock) left join T_Sys_Menu m with(nolock) on rm.F_MenuId=m.F_MenuId where m.F_State=1 and rm.RoleId=" + roleId + " and isnull(m.F_Action,'')!='' ").Tables[0];
46
-                var actions1 = (from DataRow dr in dt.Rows select dr["F_Action"].ToString().ToLower()).ToList();
47
-                CacheHelper.Insert("RoleActions_" + roleId, actions1, 10);
48
-                return actions1;
49
-            }
50
-        }
51
-    }
52
-}

+ 0 - 13
RMYY_CallCenter_Api/Common/ListBase.cs

@@ -1,13 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Web;
5
-
6
-namespace CallCenterApi.Interface.Models.Common
7
-{
8
-    public class ListBase
9
-    {
10
-        public int PageIndex { get; set; } = 1;
11
-        public int PageSize { get; set; } = 20;
12
-    }
13
-}

+ 0 - 129
RMYY_CallCenter_Api/Configs/log4net.config

@@ -1,129 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8" ?>
2
-<configuration>
3
-  <configSections>
4
-    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
5
-  </configSections>
6
-
7
-  <log4net>
8
-    <!--根配置-->
9
-    <root>
10
-      <!--日志级别:可选值: ERROR > WARN > INFO > DEBUG -->
11
-      <level value="ERROR"/>
12
-      <level value="WARN"/>
13
-      <level value="INFO"/>
14
-      <level value="DEBUG"/>
15
-      <appender-ref ref="ErrorLog" />
16
-      <appender-ref ref="WarnLog" />
17
-      <appender-ref ref="InfoLog" />
18
-      <appender-ref ref="DebugLog" />
19
-    </root>
20
-    <!-- 错误 Error.log-->
21
-    <appender name="ErrorLog" type="log4net.Appender.RollingFileAppender">
22
-      <!--目录路径,可以是相对路径或绝对路径-->
23
-      <param name="File" value="log"/>
24
-      <!--文件名,按日期生成文件夹-->
25
-      <param name="DatePattern" value="/yyyy-MM-dd/&quot;Error.log&quot;"/>
26
-      <!--追加到文件-->
27
-      <appendToFile value="true"/>
28
-      <!--创建日志文件的方式,可选值:Date[日期],文件大小[Size],混合[Composite]-->
29
-      <rollingStyle value="Composite"/>
30
-      <!--写到一个文件-->
31
-      <staticLogFileName value="false"/>
32
-      <!--单个文件大小。单位:KB|MB|GB-->
33
-      <maximumFileSize value="20MB"/>
34
-      <!--最多保留的文件数,设为"-1"则不限-->
35
-      <maxSizeRollBackups value="-1"/>
36
-      <!--日志格式-->
37
-      <layout type="log4net.Layout.PatternLayout">
38
-        <conversionPattern value="记录时间:[%date] %thread -- %-5level -- %logger [%M] %n%message%n%n"/>
39
-      </layout>
40
-      <filter type="log4net.Filter.LevelRangeFilter">
41
-        <param name="LevelMin" value="ERROR" />
42
-        <param name="LevelMax" value="ERROR" />
43
-      </filter>
44
-    </appender>
45
-
46
-    <!-- 警告 Warn.log-->
47
-    <appender name="WarnLog" type="log4net.Appender.RollingFileAppender">
48
-      <!--目录路径,可以是相对路径或绝对路径-->
49
-      <param name="File" value="log"/>
50
-      <!--文件名,按日期生成文件夹-->
51
-      <param name="DatePattern" value="/yyyy-MM-dd/&quot;Warn.log&quot;"/>
52
-      <!--追加到文件-->
53
-      <appendToFile value="true"/>
54
-      <!--创建日志文件的方式,可选值:Date[日期],文件大小[Size],混合[Composite]-->
55
-      <rollingStyle value="Composite"/>
56
-      <!--写到一个文件-->
57
-      <staticLogFileName value="false"/>
58
-      <!--单个文件大小。单位:KB|MB|GB-->
59
-      <maximumFileSize value="20MB"/>
60
-      <!--最多保留的文件数,设为"-1"则不限-->
61
-      <maxSizeRollBackups value="-1"/>
62
-      <!--日志格式-->
63
-      <layout type="log4net.Layout.PatternLayout">
64
-        <conversionPattern value="记录时间:[%date] %thread -- %-5level -- %logger [%M] %n%message%n%n"/>
65
-      </layout>
66
-      <filter type="log4net.Filter.LevelRangeFilter">
67
-        <param name="LevelMin" value="WARN" />
68
-        <param name="LevelMax" value="WARN" />
69
-      </filter>
70
-    </appender>
71
-
72
-    <!-- 信息 Info.log-->
73
-    <appender name="InfoLog" type="log4net.Appender.RollingFileAppender">
74
-      <!--目录路径,可以是相对路径或绝对路径-->
75
-      <param name="File" value="log"/>
76
-      <!--文件名,按日期生成文件夹-->
77
-      <param name="DatePattern" value="/yyyy-MM-dd/&quot;Info.log&quot;"/>
78
-      <!--追加到文件-->
79
-      <appendToFile value="true"/>
80
-      <!--创建日志文件的方式,可选值:Date[日期],文件大小[Size],混合[Composite]-->
81
-      <rollingStyle value="Composite"/>
82
-      <!--写到一个文件-->
83
-      <staticLogFileName value="false"/>
84
-      <!--单个文件大小。单位:KB|MB|GB-->
85
-      <maximumFileSize value="20MB"/>
86
-      <!--最多保留的文件数,设为"-1"则不限-->
87
-      <maxSizeRollBackups value="-1"/>
88
-      <!--日志格式-->
89
-      <layout type="log4net.Layout.PatternLayout">
90
-        <conversionPattern value="记录时间:[%date] %thread -- %-5level -- %logger [%M] %n%message%n%n"/>
91
-      </layout>
92
-      <filter type="log4net.Filter.LevelRangeFilter">
93
-        <param name="LevelMin" value="INFO" />
94
-        <param name="LevelMax" value="INFO" />
95
-      </filter>
96
-    </appender>
97
-
98
-    <!-- 调试 Debug.log-->
99
-    <appender name="DebugLog" type="log4net.Appender.RollingFileAppender">
100
-      <!--目录路径,可以是相对路径或绝对路径-->
101
-      <param name="File" value="log"/>
102
-      <!--文件名,按日期生成文件夹-->
103
-      <param name="DatePattern" value="/yyyy-MM-dd/&quot;Debug.log&quot;"/>
104
-      <!--追加到文件-->
105
-      <appendToFile value="true"/>
106
-      <!--创建日志文件的方式,可选值:Date[日期],文件大小[Size],混合[Composite]-->
107
-      <rollingStyle value="Composite"/>
108
-      <!--写到一个文件-->
109
-      <staticLogFileName value="false"/>
110
-      <!--单个文件大小。单位:KB|MB|GB-->
111
-      <maximumFileSize value="20MB"/>
112
-      <!--最多保留的文件数,设为"-1"则不限-->
113
-      <maxSizeRollBackups value="-1"/>
114
-      <!--日志格式-->
115
-      <layout type="log4net.Layout.PatternLayout">
116
-        <conversionPattern value="记录时间:[%date] %thread -- %-5level -- %logger [%M] %n%message%n%n"/>
117
-      </layout>
118
-      <filter type="log4net.Filter.LevelRangeFilter">
119
-        <param name="LevelMin" value="DEBUG" />
120
-        <param name="LevelMax" value="DEBUG" />
121
-      </filter>
122
-    </appender>
123
-
124
-
125
-  </log4net>
126
-  <startup>
127
-    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
128
-  </startup>
129
-</configuration>

+ 0 - 56
RMYY_CallCenter_Api/Configs/system.config

@@ -1,56 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<appSettings>
3
-  <!-- ================== 1:系统软件参数配置 ================== -->
4
-  <!-- 联系我们 -->
5
-  <add key="Contact" value="www.800100.net" />
6
-  <!-- 软件名称 -->
7
-  <add key="SoftName" value="华谊呼叫中心" />
8
-  <!-- 软件版本 -->
9
-  <add key="Version" value="5.0" />
10
-  <!-- 软件授权码-->
11
-  <add key="LicenceKey" value="" />
12
-  <!-- 是否开启全日志-->
13
-  <add key="IsLog" value="0" />
14
-  <!-- ================== 3:微信配置参数 ================== -->
15
-  <!-- 设置微信appid -->
16
-  <add key="WechatAppid" value="wxe03366d8c63d9b09" />
17
-  <!-- 设置微信appsecret -->
18
-  <add key="WechatAppsecret" value="3e42313935a4d6dc8b450172b8be2765" />
19
-  <!-- 设置微信token -->
20
-  <add key="WechatToken" value="72E4E2C7EC8BBF6AF535F53A213E8EBB" />
21
-  <!-- 设置微信EncodingAESKey -->
22
-  <add key="WechatEncodingAESKey" value="bOs7gmWm6FaqAViH9ZngbfhZS47pvzOucCrGO7tkMlD" />
23
-  <!-- ================== 5:Redis配置 ================== -->
24
-  <add key="Redis_Server" value="192.168.8.20"/>
25
-  <add key="Redis_Port" value="6379"/>
26
-  <!-- ================== 6:DingTalk配置 ================== -->
27
-  <add key="DingTalk_AppKey" value="ding77tk1okpuoxhitxs"/>
28
-  <add key="DingTalk_AppSecret" value="lrV9pt51pjxUY00qCkPdoZ-393can29IujDFdlR9SZnechH_pSG1Tl1maWocWrDB"/>
29
-  <add key="DingTalk_TokenCacheTime" value="7200"/>
30
-  <!-- ================== 8:外呼前缀配置 ================== -->
31
-  <!--外呼外地前缀-->
32
-  <add key="CallOutWPre" value="0" />
33
-  <!--外呼本地前缀-->
34
-  <add key="CallOutBPre" value="" />
35
-  <!--归属地-->
36
-  <add key="CallOutZipCode" value="0370" />
37
-  <!-- ================== 12:前端API路径配置 ================== -->
38
-  <!--生产环境-->
39
-  <add key="callcenter_url" value="http://192.168.8.13:1001/" />
40
-  <!--ip-->
41
-  <add key="socket_ip" value="192.168.5.7" />
42
-  <!--端口号-->
43
-  <add key="socket_port" value="8081" />
44
-  <!--菜单工单数量刷新间隔-->
45
-  <add key="menuworktime" value="30000" />
46
-  <!--首页报表刷新间隔,格式例如30000*60,务必将格式填写一致-->
47
-  <add key="indextime" value="30000*60" />
48
-  <add key="messageTime" value="60000" />
49
-  <!-- ================== 13:短信配置 ================== -->
50
-  <add key="Smsurl" value="http://rcsapi.wo.cn:8000/umcinterface/sendtempletmsg" />
51
-  <add key="Smscpcode" value="AABJYC" />
52
-  <add key="Smskey" value="724ee6be83d8d6f4d64ef5a537a9985d" />
53
-  <!-- ================== 14:其他配置 ================== -->
54
-  <add key="AuthDate" value="2021-10-12" />
55
-  <add key="OutSignCode" value="$RMYY20210707#" />
56
-</appSettings>

+ 0 - 118
RMYY_CallCenter_Api/Controllers/BaseController.cs

@@ -1,118 +0,0 @@
1
-using RMYY_CallCenter_Api.Models;
2
-using RMYY_CallCenter_Api.Utility;
3
-using System;
4
-using System.Collections.Generic;
5
-using System.Linq;
6
-using System.Web;
7
-using System.Web.Mvc;
8
-
9
-namespace RMYY_CallCenter_Api.Controllers
10
-{
11
-    public class BaseController : Controller
12
-    {
13
-        public new Model.T_Sys_UserAccount User
14
-        {
15
-            get
16
-            {
17
-                try
18
-                {
19
-                    var us = (FormsPrincipal<Model.T_Sys_UserAccount>)base.User;
20
-
21
-                    return us.UserData;
22
-                }
23
-                catch
24
-                {
25
-                    return null;
26
-                }
27
-            }
28
-        }
29
-        /// <summary>
30
-        /// 成功的消息格式化
31
-        /// </summary>
32
-        /// <param name="message"></param>
33
-        /// <returns></returns>
34
-        protected virtual ActionResult Success(string message)
35
-        {
36
-            var jsonMsg = new AjaxResult { state = ResultTypes.success.ToString(), message = message }.ToJson();
37
-            return Content(jsonMsg);
38
-        }
39
-
40
-        /// <summary>
41
-        /// 成功的消息格式化
42
-        /// </summary>
43
-        /// <param name="message"></param>
44
-        /// <param name="data"></param>
45
-        /// <returns></returns>
46
-        protected virtual ActionResult Success(string message, object data)
47
-        {
48
-            var jsonMsg = new AjaxResult { state = ResultTypes.success.ToString(), message = message, data = data }.ToJson();
49
-            return Content(jsonMsg);
50
-        }
51
-
52
-        /// <summary>
53
-        /// 跳转的消息格式化
54
-        /// </summary>
55
-        /// <param name="message"></param>
56
-        /// <param name="data"></param>
57
-        /// <returns></returns>
58
-        protected virtual ActionResult Redirect(string message, object data)
59
-        {
60
-            return Content(new AjaxResult { state = ResultTypes.redirect.ToString(), message = message, data = data }.ToJson());
61
-        }
62
-
63
-        /// <summary>
64
-        /// 错误的消息格式化
65
-        /// </summary>
66
-        /// <param name="message"></param>
67
-        /// <returns></returns>
68
-        protected virtual ActionResult Error(string message)
69
-        {
70
-            var jsonMsg = new AjaxResult { state = ResultTypes.error.ToString(), message = message }.ToJson();
71
-            return Content(jsonMsg);
72
-        }
73
-
74
-        /// <summary>
75
-        /// 错误的消息格式化
76
-        /// </summary>
77
-        /// <param name="message"></param>
78
-        /// <returns></returns>
79
-        protected virtual ActionResult Warn(string message)
80
-        {
81
-            var jsonMsg = new AjaxResult { state = ResultTypes.warning.ToString(), message = message }.ToJson();
82
-            return Content(jsonMsg);
83
-        }
84
-        /// <summary>
85
-        /// 警告的消息格式化
86
-        /// </summary>
87
-        /// <param name="message"></param>
88
-        /// <returns></returns>
89
-        protected virtual ActionResult Warn(string message, object data)
90
-        {
91
-            var jsonMsg = new AjaxResult { state = ResultTypes.warning.ToString(), message = message, data = data }.ToJson();
92
-            return Content(jsonMsg);
93
-        }
94
-
95
-
96
-        /// <summary>
97
-        /// 未登录或者登录已过期
98
-        /// </summary>
99
-        /// <param name="message"></param>
100
-        /// <returns></returns>
101
-        protected virtual ActionResult NoToken(string message)
102
-        {
103
-            var jsonMsg = new AjaxResult { state = ResultTypes.notoken.ToString(), message = message }.ToJson();
104
-            return Content(jsonMsg);
105
-        }
106
-
107
-        /// <summary>
108
-        /// 未授权
109
-        /// </summary>
110
-        /// <param name="message"></param>
111
-        /// <returns></returns>
112
-        protected virtual ActionResult UnAuthorized(string message)
113
-        {
114
-            var jsonMsg = new AjaxResult { state = ResultTypes.unauthorized.ToString(), message = message }.ToJson();
115
-            return Content(jsonMsg);
116
-        }
117
-    }
118
-}

+ 0 - 318
RMYY_CallCenter_Api/Controllers/CallTel/CallInScreenController.cs

@@ -1,318 +0,0 @@
1
-
2
-using RMYY_CallCenter_Api.Utility;
3
-using System;
4
-using System.Collections.Generic;
5
-using System.Data;
6
-using System.Linq;
7
-using System.Web;
8
-using System.Web.Mvc;
9
-
10
-namespace RMYY_CallCenter_Api.Controllers.CallTel
11
-{
12
-    public class CallInScreenController : BaseController
13
-    {
14
-        /// <summary>
15
-        /// 添加黑名单
16
-        /// </summary>
17
-        /// <returns></returns>
18
-        public ActionResult AddBlack(string tel, string callid, int num = 0, int type = 0)
19
-        {
20
-            Model.T_Call_Blacklist dModel = new Bll.T_Call_Blacklist().GetModelList(" F_TelPhone='" + tel + "' ").FirstOrDefault();
21
-
22
-            var date = DateTime.Now;
23
-            var enddate = date;
24
-            switch (type)
25
-            {
26
-                case 1: enddate = enddate.AddDays(num); break;
27
-                case 2: enddate = enddate.AddHours(num); break;
28
-                case 3: enddate = enddate.AddMinutes(num); break;
29
-                case 4: enddate = DateTime.MaxValue; break;
30
-            }
31
-            if (dModel == null)
32
-            {
33
-                dModel = new Model.T_Call_Blacklist();
34
-                dModel.F_CallId = callid;
35
-                dModel.F_TelPhone = tel.Trim();
36
-                dModel.F_SetTime = date;
37
-                dModel.F_RemoveTime = enddate;
38
-                dModel.F_BlackType = 1;
39
-                dModel.F_InterceptNum = 1;
40
-                dModel.F_UserId = User.F_UserId;
41
-                int b = new Bll.T_Call_Blacklist().Add(dModel);
42
-                if (b > 0)
43
-                {
44
-                    return Success("添加成功", dModel);
45
-                }
46
-                else
47
-                {
48
-                    return Error("添加失败");
49
-                }
50
-            }
51
-            else
52
-            {
53
-
54
-                dModel.F_RemoveTime = enddate;
55
-                dModel.F_BlackType = 1;
56
-                if (new Bll.T_Call_Blacklist().Update(dModel))
57
-                {
58
-                    return Success("添加成功", dModel);
59
-                }
60
-                else
61
-                {
62
-                    return Error("修改失败");
63
-                }
64
-            }
65
-        }
66
-
67
-        /// <summary>
68
-        /// 取消黑名单
69
-        /// </summary>
70
-        /// <returns></returns>
71
-        public ActionResult DelBlack(string tel)
72
-        {
73
-            Model.T_Call_Blacklist dModel = new Bll.T_Call_Blacklist().GetModelList(" F_TelPhone='" + tel + "' ").FirstOrDefault();
74
-            if (dModel != null)
75
-            {
76
-                bool bl = new Bll.T_Call_Blacklist().Delete(dModel.F_BlackId);
77
-                if (bl)
78
-                {
79
-                    return Success("取消成功");
80
-                }
81
-                else
82
-                {
83
-                    return Error("取消失败");
84
-                }
85
-            }
86
-            else
87
-            {
88
-                return Error("参数错误");
89
-            }
90
-        }
91
-
92
-        ///// <summary>
93
-        ///// 根据来电号码获取客户信息
94
-        ///// </summary>
95
-        ///// <returns></returns>
96
-        //public ActionResult GetCustomerByTel(string tel)
97
-        //{
98
-        //    var dt = new Bll.T_Cus_CustomerBase().GetList(" F_Telephone like '%" + tel + "%' or F_Mobile like '%" + tel + "%' ").Tables[0];
99
-
100
-        //    return Success("获取成功", dt);
101
-        //}
102
-
103
-        /// <summary>
104
-        /// 根据来电号码获取最近的callid
105
-        /// </summary>
106
-        /// <returns></returns>
107
-        public ActionResult GetCallIdByPhone(string tel)
108
-        {
109
-            return Success("加载成功", new Bll.T_Call_CallRecords().GetModelByTelphone(tel));
110
-        }
111
-
112
-        /// <summary>
113
-        /// 根据callid获取最近的通话记录
114
-        /// </summary>
115
-        /// <returns></returns>
116
-        public ActionResult GetTelRecordByCallid(string callid)
117
-        {
118
-            return Success("通话记录加载成功", new Bll.T_Call_CallRecords().GetModelByCallId(callid));
119
-        }
120
-
121
-        /// <summary>
122
-        /// 来电归属地查询
123
-        /// </summary>
124
-        /// <returns></returns>
125
-        public ActionResult GetPhoneLocation(string tel)
126
-        {
127
-
128
-            string location = "未知";
129
-            if (!string.IsNullOrEmpty(tel))
130
-            {
131
-                if (tel.Trim().Length == 11 && tel.Substring(0, 1) != "0")
132
-                {
133
-                    Bll.T_Sys_MobileData mobile_Bll = new Bll.T_Sys_MobileData();
134
-                    Model.T_Sys_MobileData mobileModel = mobile_Bll.GetModelList(" F_MobileNum = '" + tel.Substring(0, 7) + "'").FirstOrDefault();
135
-
136
-                    if (mobileModel != null)
137
-                    {
138
-                        location = mobileModel.F_CityDes + mobileModel.F_CardDes;
139
-                    }
140
-                }
141
-                else
142
-                {
143
-                    Bll.T_Sys_TelTitleData numbBll = new Bll.T_Sys_TelTitleData();
144
-                    if (tel.Length > 4)
145
-                    {
146
-                        List<Model.T_Sys_TelTitleData> mobileModel = numbBll.GetModelList(" 1=1 and F_KeyPhoneNum='" + tel.Substring(0, 4) + "'");
147
-                        if (mobileModel == null || mobileModel.Count <= 0)
148
-                        {
149
-                            mobileModel = numbBll.GetModelList(" 1=1 and F_KeyPhoneNum='" + tel.Substring(0, 3) + "'");
150
-                        }
151
-                        if (mobileModel.Count > 0)
152
-                        {
153
-                            location = mobileModel[0].F_TitleName;
154
-                        }
155
-                    }
156
-                }
157
-            }
158
-            return Success("归属地加载成功", location);
159
-
160
-
161
-        }
162
-
163
-        /// <summary>
164
-        /// 历史记录列表
165
-        /// </summary>
166
-        /// <returns></returns>
167
-        public ActionResult GetOldList(string tel,  int page = 1, int pagesize = 10)
168
-        {
169
-
170
-            string sql = "";
171
-            DataTable dt = new DataTable();
172
-
173
-            if (!string.IsNullOrEmpty(tel.Trim()) && tel != "undefined")
174
-            {
175
-                sql += " and CallNumber= '" + tel.Trim() + "' ";
176
-            }
177
-
178
-            int recordCount = 0;
179
-            dt = Bll.PagerBll.GetListPager(
180
-                "T_Call_CallRecords",
181
-                "CallRecordsId",
182
-                "*,dbo.GetUserName(UserCode) as UserName, dbo.GetDictionaryName(F_CallInType) as TypeName",
183
-                sql,
184
-                "ORDER BY CallRecordsId desc",
185
-                pagesize,
186
-                page,
187
-                true,
188
-                out recordCount);
189
-            var config = new Bll.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayPath' ").FirstOrDefault();
190
-            foreach (DataRow dr in dt.Rows)
191
-            {
192
-                string path = dr["FilePath"] != null ? dr["FilePath"].ToString() : "";
193
-                if (path != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
194
-                {
195
-                    var ym = config.F_ParamValue;
196
-                    if (ym.Substring(ym.Length - 1) == "/")
197
-                    {
198
-                        ym = ym.Substring(0, ym.Length - 1);
199
-                    }
200
-                    string lujing = path.Substring(path.IndexOf(':') + 1).Replace('\\', '/');
201
-                    string wlpath = ym + lujing;
202
-                    dr["FilePath"] = wlpath;
203
-                }
204
-            }
205
-
206
-            var obj = new
207
-            {
208
-                state = "success",
209
-                message = "成功",
210
-                rows = dt,
211
-                total = recordCount
212
-            };
213
-
214
-            return Content(obj.ToJson());
215
-
216
-
217
-        }
218
-
219
-        /// <summary>
220
-        /// 振铃事件
221
-        /// </summary>
222
-        /// <returns></returns>
223
-        public ActionResult UpdateZL(string callid)
224
-        {
225
-            Model.T_Call_CallRecords model = new Model.T_Call_CallRecords();
226
-            model.CallId = callid;
227
-            model.UserId = User.F_UserId;
228
-            model.UserCode = User.F_UserCode;
229
-            model.UserName = User.F_UserName;
230
-            model.ExtNumber = User.F_ExtensionNumber;
231
-
232
-            model.DealType = 5;
233
-            bool bl = new Bll.T_Call_CallRecords().UpdateCallInRingTelRecord(model);
234
-            if (bl)
235
-            {
236
-                return Success("更新振铃状态成功");
237
-            }
238
-            else
239
-            {
240
-                return Success("更新振铃状态失败");
241
-            }
242
-        }
243
-
244
-        /// <summary>
245
-        /// 摘机事件
246
-        /// </summary>
247
-        /// <returns></returns>
248
-        public ActionResult UpdateZJ(string callid)
249
-        {
250
-
251
-            Model.T_Call_CallRecords model = new Model.T_Call_CallRecords();
252
-            model.CallId = callid;
253
-            model.CallState = 1;
254
-            model.DealType = 6;
255
-            bool bl = new Bll.T_Call_CallRecords().UpdateCallInAnswerTelRecord(model);
256
-            if (bl)
257
-            {
258
-                return Success("更新摘机状态成功");
259
-            }
260
-            else
261
-            {
262
-                return Success("更新摘机状态失败");//临时修改
263
-            }
264
-
265
-        }
266
-
267
-        /// <summary>
268
-        /// 呼入性质
269
-        /// </summary>
270
-        /// <returns></returns>
271
-        public ActionResult UpdateCallInType(string callid, int tid = 0)
272
-        {
273
-            Model.T_Call_CallRecords vmodel = new Bll.T_Call_CallRecords().GetModelByCallId(callid);
274
-            if (vmodel != null)
275
-            {
276
-                var n = DB.DbHelperSQL.ExecuteSql("update T_Call_CallRecords set F_CallInType=" + tid + " where CallRecordsId=" + vmodel.CallRecordsId);
277
-                if (n > 0)
278
-                {
279
-                    return Success("操作成功");
280
-                }
281
-                else
282
-                {
283
-                    return Success("操作失败");
284
-                }
285
-            }
286
-            else
287
-            {
288
-                return Success("操作失败");
289
-            }
290
-        }
291
-
292
-        /// <summary>
293
-        /// 呼出性质
294
-        /// </summary>
295
-        /// <returns></returns>
296
-        public ActionResult UpdateCallOutType(string callid, int tid = 0)
297
-        {
298
-            Model.T_Call_CallRecords vmodel = new Bll.T_Call_CallRecords().GetModelByCallId(callid);
299
-            if (vmodel != null)
300
-            {
301
-                var n = DB.DbHelperSQL.ExecuteSql("update T_Call_CallRecords set F_CallInType=" + tid + " where CallRecordsId=" + vmodel.CallRecordsId);
302
-                if (n > 0)
303
-                {
304
-                    return Success("操作成功");
305
-                }
306
-                else
307
-                {
308
-                    return Success("操作失败");
309
-                }
310
-            }
311
-            else
312
-            {
313
-                return Success("操作失败");
314
-            }
315
-        }
316
-
317
-    }
318
-}

+ 0 - 206
RMYY_CallCenter_Api/Controllers/CallTel/CallblackController.cs

@@ -1,206 +0,0 @@
1
-using RMYY_CallCenter_Api.Utility;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Data;
5
-using System.Linq;
6
-using System.Web;
7
-using System.Web.Mvc;
8
-
9
-namespace RMYY_CallCenter_Api.Controllers.CallTel
10
-{
11
-    public class CallblackController : BaseController
12
-    {
13
-        //获取黑名单列表
14
-        public ActionResult GetList(string tel, int? type, string stime, string etime, int page = 1, int pagesize = 10)
15
-        {
16
-            string sql = "";
17
-            DataTable dt = new DataTable();
18
-
19
-            if (tel != null && tel.Trim() != "")
20
-            {
21
-                sql += " and F_TelPhone like '%" + tel.Trim() + "%' ";
22
-            }
23
-            if (stime != null && stime.Trim() != "")
24
-            {
25
-                sql += " and F_SetTime > '" + Convert.ToDateTime(stime.Trim()) + "' ";
26
-            }
27
-            if (etime != null && etime.Trim() != "")
28
-            {
29
-                sql += " and F_SetTime < '" + Convert.ToDateTime(etime.Trim()) + "' ";
30
-            }
31
-            if (type != null)
32
-            {
33
-                sql += " and F_BlackType=" + type;
34
-            }
35
-
36
-            int recordCount = 0;
37
-            dt = Bll.PagerBll.GetListPager(
38
-                "T_Call_Blacklist with(nolock)",
39
-                "F_BlackId",
40
-                "*,dbo.GetUserNameByID(F_UserId) as F_UserName",
41
-                sql,
42
-                "ORDER BY F_BlackId desc",
43
-                pagesize,
44
-                page,
45
-                true,
46
-                out recordCount);
47
-
48
-            var obj = new
49
-            {
50
-                state = "success",
51
-                message = "成功",
52
-                rows = dt,
53
-                total = recordCount
54
-            };
55
-
56
-            return Content(obj.ToJson());
57
-        }
58
-
59
-        //获取黑名单
60
-        public ActionResult GetBlack(int blackid)
61
-        {
62
-            if (blackid>0)
63
-            {
64
-                Bll.T_Call_Blacklist dBLL = new Bll.T_Call_Blacklist();
65
-                Model.T_Call_Blacklist dModel = dBLL.GetModel(blackid);
66
-                if (dModel != null)
67
-                {
68
-                    var sdate = ""; var edate = "";
69
-                    if (dModel.F_SetTime != null)
70
-                        sdate = dModel.F_SetTime.Value.ToString("yyyy-MM-dd");
71
-                    if (dModel.F_RemoveTime != null)
72
-                        edate = dModel.F_RemoveTime.Value.ToString("yyyy-MM-dd");
73
-                    var obj = new
74
-                    {
75
-                        F_BlackId = dModel.F_BlackId,
76
-                        F_TelPhone = dModel.F_TelPhone,
77
-                        F_BlackType = dModel.F_BlackType,
78
-                        F_SetTime = sdate,
79
-                        F_RemoveTime = edate,
80
-                        F_Describe = dModel.F_Describe,
81
-                        F_UserId = dModel.F_UserId,
82
-                        F_CreateTime = dModel.F_CreateTime
83
-                    };
84
-                    return Success("获取黑名单成功", obj);
85
-                }
86
-                else
87
-                {
88
-                    return Error("获取黑名单失败");
89
-                }
90
-            }
91
-            else
92
-            {
93
-                return Error("获取参数失败");
94
-            }
95
-
96
-        }
97
-
98
-        //添加黑名单
99
-        public ActionResult AddBlack(int blackid, string telphone, int? type, string settime, string removetime, string des)
100
-        {
101
-            var date = DateTime.Now;
102
-            if (blackid > 0)
103
-            {
104
-                Bll.T_Call_Blacklist dBLL = new Bll.T_Call_Blacklist();
105
-                Model.T_Call_Blacklist dModel = dBLL.GetModel(blackid);
106
-                if (dModel != null)
107
-                {
108
-                    if (telphone != null && telphone.Trim() != "")
109
-                        dModel.F_TelPhone = telphone.Trim();
110
-                    if (type != null)
111
-                    {
112
-                        dModel.F_BlackType = type;
113
-                        if (type == 1)
114
-                        {
115
-                            if (settime != null && settime.Trim() != "")
116
-                                dModel.F_SetTime = Convert.ToDateTime(settime.Trim());
117
-                            else
118
-                                dModel.F_SetTime = date;
119
-                            if (removetime != null && removetime.Trim() != "")
120
-                                dModel.F_RemoveTime = Convert.ToDateTime(removetime.Trim());
121
-                            else
122
-                                dModel.F_SetTime = date;
123
-                        }
124
-                    }
125
-                    if (des != null && des.Trim() != "")
126
-                        dModel.F_Describe = des.Trim();
127
-                    dModel.F_InterceptNum += 1;
128
-                    dModel.F_UserId = User.F_UserId;
129
-                    bool b = dBLL.Update(dModel);
130
-                    if (b)
131
-                    {
132
-                        return Success("黑名单编辑成功", dModel);
133
-                    }
134
-                    else
135
-                    {
136
-                        return Error("黑名单编辑失败");
137
-                    }
138
-                }
139
-                else
140
-                {
141
-                    return Error("黑名单编辑失败");
142
-                }
143
-            }
144
-            else
145
-            {
146
-                Model.T_Call_Blacklist dModel = new Model.T_Call_Blacklist();
147
-                dModel.F_CallId = "0";
148
-                if (telphone != null && telphone.Trim() != "")
149
-                    dModel.F_TelPhone = telphone.Trim();
150
-                if (type != null)
151
-                {
152
-                    dModel.F_BlackType = type;
153
-                    if (type == 1)
154
-                    {
155
-                        if (settime != null && settime.Trim() != "")
156
-                            dModel.F_SetTime = Convert.ToDateTime(settime.Trim());
157
-                        else
158
-                            dModel.F_SetTime = date;
159
-                        if (removetime != null && removetime.Trim() != "")
160
-                            dModel.F_RemoveTime = Convert.ToDateTime(removetime.Trim());
161
-                        else
162
-                            dModel.F_RemoveTime = date;
163
-                    }
164
-                }
165
-                if (des != null && des.Trim() != "")
166
-                    dModel.F_Describe = des.Trim();
167
-                dModel.F_InterceptNum = 1;
168
-                dModel.F_UserId = User.F_UserId;
169
-                int b = new Bll.T_Call_Blacklist().Add(dModel);
170
-                if (b > 0)
171
-                {
172
-                    return Success("黑名单添加成功", dModel);
173
-                }
174
-                else
175
-                {
176
-                    return Error("黑名单添加失败");
177
-                }
178
-            }
179
-        }
180
-
181
-
182
-        //删除黑名单记录
183
-        public ActionResult DelCallBlack(string[] ids)
184
-        {
185
-            if (ids != null && ids.Length > 0)
186
-            {
187
-                string idd = " ";
188
-                foreach (string str in ids)
189
-                {
190
-                    idd += str + ",";
191
-                }
192
-                if (new Bll.T_Call_Blacklist().DeleteList(idd.TrimEnd(',')))
193
-                {
194
-                    return Success("黑名单删除成功");
195
-                }
196
-                else
197
-                    return Error("黑名单删除失败");
198
-            }
199
-            else
200
-            {
201
-                return Error("请选择要删除的黑名单记录");
202
-            }
203
-
204
-        }
205
-    }
206
-}

+ 0 - 129
RMYY_CallCenter_Api/Controllers/CallTel/CallleaveController.cs

@@ -1,129 +0,0 @@
1
-using RMYY_CallCenter_Api.Utility;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Data;
5
-using System.Linq;
6
-using System.Web;
7
-using System.Web.Mvc;
8
-
9
-namespace RMYY_CallCenter_Api.Controllers.CallTel
10
-{
11
-    public class CallleaveController : BaseController
12
-    {
13
-        //获取留言列表
14
-        public ActionResult GetList(string settime, string removetime, string strtelnum, int status = -1, int page = 1, int pagesize = 10)
15
-        {
16
-            string sql = "";
17
-            DataTable dt = new DataTable();
18
-
19
-            if (strtelnum != null && strtelnum.Trim() != "")
20
-            {
21
-                sql += " and F_Phone= '" + strtelnum.Trim() + "' ";
22
-            }
23
-            if (settime.Trim() != "" && settime != "undefined")
24
-            {
25
-                sql += " and CONVERT(varchar(10),F_LeaveTime, 23) = '" + settime.Trim() + "' ";
26
-            }
27
-            if (removetime.Trim() != "" && removetime != "undefined")
28
-            {
29
-                sql += " and CONVERT(varchar(10),F_DealTime, 23) = '" + removetime.Trim() + "' ";
30
-            }
31
-            if (status > -1)
32
-            {
33
-                sql += " and F_Status = " + status;
34
-            }
35
-
36
-            int recordCount = 0;
37
-            dt = Bll.PagerBll.GetListPager(
38
-                "T_Call_LeaveRecord",
39
-                "F_Id",
40
-                "*",
41
-                sql,
42
-                "ORDER BY F_Id desc",
43
-                pagesize,
44
-                page,
45
-                true,
46
-                out recordCount);
47
-
48
-            var config = new Bll.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayLeaveVoice' ").FirstOrDefault();
49
-            foreach (DataRow dr in dt.Rows)
50
-            {
51
-                string path = dr["F_RecFileUrl"] != null ? dr["F_RecFileUrl"].ToString() : "";
52
-                if (path != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
53
-                {
54
-                    dr["F_RecFileUrl"] = config.F_ParamValue + path;
55
-                }
56
-            }
57
-
58
-            var obj = new
59
-            {
60
-                state = "success",
61
-                message = "成功",
62
-                rows = dt,
63
-                total = recordCount
64
-            };
65
-
66
-            return Content(obj.ToJson());
67
-        }
68
-
69
-        //删除留言记录
70
-        public ActionResult DelLeaveRecord(string[] ids)
71
-        {
72
-            if (ids != null && ids.Length > 0)
73
-            {
74
-                string idd = " ";
75
-                foreach (string str in ids)
76
-                {
77
-                    idd += str + ",";
78
-                }
79
-                if (new Bll.T_Call_LeaveRecord().DeleteList(idd.TrimEnd(',')))
80
-                {
81
-                    return Success("删除成功");
82
-                }
83
-                else
84
-                    return Error("删除失败");
85
-            }
86
-            else
87
-            {
88
-                return Error("请选择要删除的记录");
89
-            }
90
-        }
91
-
92
-        //更新留言处理状态
93
-        public ActionResult OptLeaveRecord(string[] ids)
94
-        {
95
-            if (ids.Length > 0)
96
-            {
97
-                foreach (string arrid in ids)
98
-                {
99
-                    Model.T_Call_LeaveRecord model = new Bll.T_Call_LeaveRecord().GetModel(Convert.ToInt32(arrid));
100
-                    if (model != null)
101
-                    {
102
-                        model.F_Status = 1;
103
-                        model.F_DealTime = DateTime.Now;
104
-                        model.F_DealContent = "1";
105
-                        model.F_UserName = User.F_UserName;
106
-                        model.F_UserCode = User.F_UserCode;
107
-                        model.F_UserId = User.F_UserId;
108
-
109
-                        new Bll.T_Call_LeaveRecord().Update(model);
110
-                    }
111
-                }
112
-                return Success("处理成功");
113
-            }
114
-            else
115
-            {
116
-                return Error("请选择要处理的留言");
117
-            }
118
-        }
119
-
120
-        /// <summary>
121
-        /// 获取留言信息
122
-        /// </summary>
123
-        /// <returns></returns>
124
-        public ActionResult GetLeaveRecord(int id)
125
-        {
126
-            return Success("获取成功", new Bll.T_Call_LeaveRecord().GetModel(id));
127
-        }
128
-    }
129
-}

+ 0 - 280
RMYY_CallCenter_Api/Controllers/CallTel/CallrecordsController.cs

@@ -1,280 +0,0 @@
1
-
2
-using RMYY_CallCenter_Api.DB;
3
-using RMYY_CallCenter_Api.Utility;
4
-using System;
5
-using System.Collections.Generic;
6
-using System.Data;
7
-using System.Linq;
8
-using System.Web;
9
-using System.Web.Mvc;
10
-
11
-namespace RMYY_CallCenter_Api.Controllers.CallTel
12
-{
13
-    public class CallrecordsController : BaseController
14
-    {
15
-        //获取通话记录列表
16
-        public ActionResult GetList( string phone, string usercode, string extnumber, string starttime, string endtime, int islike=1, int type=0,int actiontype=0,int calltype=-1, int callstate=-1, int page = 1, int pagesize = 10, int isdc=0)
17
-        {
18
-            string sql = "";
19
-            DataTable dt = new DataTable();
20
-
21
-            if (type != 0)
22
-            {
23
-                sql += " and F_CallInType = '" + type + "' ";
24
-            }
25
-            if (usercode != null && usercode.Trim() != "")
26
-            {
27
-                sql += " and UserCode in(" + usercode + ")";
28
-            }
29
-            
30
-            if (islike > 0)
31
-            {
32
-                if (phone != null && phone.Trim() != "")
33
-                {
34
-                    sql += " and CallNumber like '%" + phone + "%'";
35
-                }
36
-            }
37
-            else
38
-            {
39
-                if (phone != null && phone.Trim() != "")
40
-                {
41
-                    sql += " and CallNumber = '" + phone + "'";
42
-                }
43
-            }
44
-            if (callstate > -1)
45
-            {
46
-                if (callstate == 0)
47
-                {
48
-                    sql += " and CallState=0 and isnull(UserCode,'')!='' ";
49
-                }
50
-                else if (callstate == 3)
51
-                {
52
-                    sql += " and CallState=0 and CallType=0 and isnull(UserCode,'')='' ";
53
-                }
54
-                else
55
-                {
56
-                    sql += " and CallState='" + callstate + "'";
57
-                }
58
-            }
59
-            if (calltype > -1)
60
-            {
61
-                sql += " and CallType='" + calltype + "'";
62
-            }
63
-            if (actiontype > 0)
64
-            {
65
-                sql += " and ActionType=" + actiontype;
66
-            }
67
-            if (starttime.Trim() != "")
68
-            {
69
-                sql += " and BeginTime>='" + starttime + "' ";
70
-            }
71
-            if (endtime.Trim() != "")
72
-            { 
73
-                sql += " and BeginTime<='" + endtime + "' ";
74
-            }
75
-            if(extnumber.Trim()!="")
76
-            {
77
-                sql += " and isnull(ExtNumber,'')='" + extnumber.Trim() + "'";
78
-            }
79
-
80
-            if (isdc > 0)
81
-            {
82
-                var dtdc = DbHelperSQL.Query(" select   ROW_NUMBER()  OVER(ORDER BY CallRecordsId desc) 编号, CallNumber 电话号码,(case CallType when 0 then '呼入' else '呼出' end ) 呼叫方向,(case CallState when 0 then ( case  when CallType=0 and isnull(UserCode,'')='' then  '主动放弃' else '未接通'   end    ) else '已接通' end ) 呼叫状态,UserCode 坐席工号,dbo.GetUserName(UserCode) as 坐席姓名, "
83
-                    + "BeginTime 开始时间,TalkStartTime 通话开始时间 ,TalkEndTime " +
84
-                    " 通话结束时间 ,EndTime 结束时间 ,LongTime 通话时长 ,PhoneType " +
85
-                    "电话类别"
86
-                   + " from T_Call_CallRecords  a WITH(NOLOCK)  where 1=1 " + sql+ "ORDER BY CallRecordsId desc").Tables[0];
87
-                var msg = new NPOIHelper().ExportToExcel("通话记录", dtdc);
88
-                if (msg == "")
89
-                {
90
-                    return Success("导出成功");
91
-                }
92
-                else
93
-                {
94
-                    return Error("导出失败");
95
-                }
96
-            }
97
-            else
98
-            {
99
-                int recordCount = 0;
100
-                dt = Bll.PagerBll.GetListPager(
101
-                    "T_Call_CallRecords WITH(NOLOCK)",
102
-                    "CallRecordsId",
103
-                    "*,dbo.GetUserName(UserCode) as UserName, WorkOrderId,dbo.GetDictionaryName(F_CallInType) as TypeName",
104
-                    sql,
105
-                    "ORDER BY CallRecordsId desc",
106
-                    pagesize,
107
-                    page,
108
-                    true,
109
-                    out recordCount);
110
-
111
-                var config = new Bll.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayPath' ").FirstOrDefault();
112
-
113
-                foreach (DataRow dr in dt.Rows)
114
-                {
115
-                    string path = dr["FilePath"] != null ? dr["FilePath"].ToString() : "";
116
-                    if (path != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
117
-                    {
118
-                        var ym = config.F_ParamValue;
119
-                        if (ym.Substring(ym.Length - 1) == "/")
120
-                        {
121
-                            ym = ym.Substring(0, ym.Length - 1);
122
-                        }
123
-
124
-                        string lujing = path.Substring(path.IndexOf(':') + 1).Replace('\\', '/');
125
-                        string wlpath = ym + lujing;
126
-
127
-                        dr["FilePath"] = wlpath;
128
-                    }
129
-                }
130
-
131
-                var obj = new
132
-                {
133
-                    state = "success",
134
-                    message = "成功",
135
-                    rows = dt,
136
-                    total = recordCount
137
-                };
138
-
139
-                return Content(obj.ToJson());
140
-            }
141
-           
142
-
143
-
144
-        }
145
-
146
-        //获取未接来电
147
-        public ActionResult GetListWJ(string phone, string starttime, string endtime, int ishfSuccess=-1,int ishf=-1,int page = 1, int pagesize = 10)
148
-        {
149
-
150
-            string sql = "";
151
-            DataTable dt = new DataTable();
152
-
153
-
154
-            if (phone != null && phone.Trim() != "")
155
-            {
156
-                sql += " and CallNumber like '%" + phone + "%'";
157
-            }
158
-
159
-            if (starttime.Trim() != "")
160
-            {
161
-                sql += " and BeginTime>= '" + starttime + "' ";
162
-            }
163
-            if (endtime.Trim() != "")
164
-            {
165
-                sql += " and BeginTime<='" + endtime + "' ";
166
-            }
167
-            if (ishf>-1)
168
-            {
169
-                sql += " and F_wjishf=" + ishf + " ";
170
-            }
171
-            if (ishfSuccess>-1)
172
-            {
173
-                sql += " and F_wjishfSuccess=" + ishfSuccess;
174
-            }
175
-            sql += " and CallState='0' and CallType='0'";
176
-
177
-            int recordCount = 0;
178
-            dt = Bll.PagerBll.GetListPager(
179
-                        "T_Call_CallRecords WITH(NOLOCK)",
180
-                        "CallRecordsId",
181
-                        "*",
182
-                        sql,
183
-                        "ORDER BY CallRecordsId desc",
184
-                        pagesize,
185
-                        page,
186
-                        true,
187
-                        out recordCount);
188
-
189
-            var obj = new
190
-            {
191
-                state = "success",
192
-                message = "成功",
193
-                rows = dt,
194
-                total = recordCount
195
-            };
196
-
197
-            return Content(obj.ToJson());
198
-        }
199
-
200
-        //获取转移或三方通话,均为手机号
201
-        //rep_transfer只有转移的数据
202
-        public ActionResult GetListZY(string phone, string usercode, string starttime, string endtime, int callstate = -1, int page = 1, int pagesize = 10)
203
-        {
204
-            string sql = "";
205
-            DataTable dt = new DataTable();
206
-
207
-            sql += " and ActionType>1";//1正常呼入呼出、2转移、3三方通话
208
-
209
-            if (usercode != null && usercode.Trim() != "")
210
-            {
211
-                sql += " and UserCode='" + usercode + "'";
212
-            }
213
-
214
-            if (phone != null && phone.Trim() != "")
215
-            {
216
-                sql += " and CallNumber like '%" + phone + "%'";
217
-            }
218
-            if (callstate>-1)
219
-            {
220
-                sql += " and CallState='" + callstate + "'";
221
-            }
222
-
223
-            if (starttime.Trim() != "")
224
-            {
225
-                sql += " and BeginTime>= '" + starttime + "' ";
226
-            }
227
-            if (endtime.Trim() != "")
228
-            {
229
-                sql += " and BeginTime<='" + endtime + "' ";
230
-            }
231
-
232
-            int recordCount = 0;
233
-
234
-            dt = Bll.PagerBll.GetListPager(
235
-                   "T_Call_CallRecords WITH(NOLOCK)",
236
-                   "CallRecordsId",
237
-                   "*",
238
-                   sql,
239
-                   "ORDER BY CallRecordsId desc",
240
-                   pagesize,
241
-                   page,
242
-                   true,
243
-                   out recordCount);
244
-
245
-            var obj = new
246
-            {
247
-                state = "success",
248
-                message = "成功",
249
-                rows = dt,
250
-                total = recordCount
251
-            };
252
-
253
-            return Content(obj.ToJson());
254
-        }
255
-
256
-        //删除通话记录
257
-        public ActionResult DelCallRecord(string[] ids)
258
-        {
259
-            if (ids != null && ids.Length > 0)
260
-            {
261
-                string idd = " ";
262
-                foreach (string str in ids)
263
-                {
264
-                    idd += str + ",";
265
-                }
266
-                if (new Bll.T_Call_CallRecords().DeleteList(idd.TrimEnd(',')))
267
-                {
268
-                    return Success("删除成功");
269
-                }
270
-                else
271
-                    return Error("删除失败");
272
-            }
273
-            else
274
-            {
275
-                return Error("请选择要删除的记录");
276
-            }
277
-
278
-        }
279
-    }
280
-}

+ 0 - 180
RMYY_CallCenter_Api/Controllers/CallTel/MobiledataController.cs

@@ -1,180 +0,0 @@
1
-using RMYY_CallCenter_Api.Utility;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Data;
5
-using System.Linq;
6
-using System.Web;
7
-using System.Web.Mvc;
8
-
9
-namespace RMYY_CallCenter_Api.Controllers.CallTel
10
-{
11
-    public class MobiledataController : BaseController
12
-    {
13
-        //获取号码归属地列表
14
-        public ActionResult GetList(string strtelnum,int page = 1, int pagesize = 10)
15
-        {
16
-          
17
-                string sql = " and F_IsDelete=0";
18
-                DataTable dt = new DataTable();
19
-
20
-                if (strtelnum != null && strtelnum.Trim() != "")
21
-                {
22
-                    sql += " and (F_MobileNum= '" + strtelnum.Trim() + "' or F_ZipCode like '%" + strtelnum.Trim()
23
-                        + "%' or F_CityDes like '%" + strtelnum.Trim() + "%'or F_CardDes like '%" + strtelnum.Trim() + "%')";
24
-                }
25
-
26
-                int recordCount = 0;
27
-                dt = Bll.PagerBll.GetListPager(
28
-                    "T_Sys_MobileData with(nolock)",
29
-                    "F_Id",
30
-                    "*",
31
-                    sql,
32
-                    "ORDER BY F_Id desc",
33
-                    pagesize,
34
-                    page,
35
-                    true,
36
-                    out recordCount);
37
-
38
-                var obj = new
39
-                {
40
-                    state = "success",
41
-                    message = "成功",
42
-                    rows = dt,
43
-                    total = recordCount
44
-                };
45
-
46
-                return Content(obj.ToJson());
47
-
48
-           
49
-        }
50
-
51
-        //获取详情
52
-        public ActionResult GetMobiledata(int id)
53
-        {
54
-            return Success("获取号码归属地成功", new Bll.T_Sys_MobileData().GetModel(id));
55
-        }
56
-
57
-        //获取号码归属地
58
-        public ActionResult GetMobiledataByNum(string mobileNum)
59
-        {
60
-            if (!string.IsNullOrEmpty(mobileNum))
61
-            {
62
-                Model.T_Sys_MobileData dModel = new Bll.T_Sys_MobileData().GetModelList(" F_MobileNum='" + mobileNum.Trim() + "' ").FirstOrDefault();
63
-                if (dModel != null)
64
-                {
65
-                    return Success("获取号码归属地成功", dModel);
66
-                }
67
-                else
68
-                {
69
-                    return Error("获取号码归属地失败");
70
-                }
71
-            }
72
-            else
73
-            {
74
-                return Error("获取参数失败");
75
-            }
76
-        }
77
-
78
-        //添加/编辑号码归属地
79
-        public ActionResult AddMobiledata(string mobileNum, string zipCode, string cityDes, string cardDes, int id = 0)
80
-        {
81
-            Bll.T_Sys_MobileData dBLL = new Bll.T_Sys_MobileData();
82
-            Model.T_Sys_MobileData dModel = new Model.T_Sys_MobileData();
83
-
84
-            if (id != 0)
85
-            {
86
-
87
-                dModel = dBLL.GetModel(id);
88
-                if (dModel != null)
89
-                {
90
-                    if (!string.IsNullOrWhiteSpace(mobileNum.Trim()))
91
-                    {
92
-                        dModel.F_MobileNum = mobileNum.Trim();
93
-                    }
94
-                    if (!string.IsNullOrWhiteSpace(zipCode.Trim()))
95
-                    {
96
-                        dModel.F_ZipCode = zipCode.Trim();
97
-                    }
98
-                    if (!string.IsNullOrWhiteSpace(cityDes.Trim()))
99
-                    {
100
-                        dModel.F_CityDes = cityDes.Trim();
101
-                    }
102
-                    if (!string.IsNullOrWhiteSpace(cardDes.Trim()))
103
-                    {
104
-                        dModel.F_CardDes = cardDes.Trim();
105
-                    }
106
-
107
-                    bool b = dBLL.Update(dModel);
108
-                    if (b)
109
-                    {
110
-                        return Success("编辑成功");
111
-                    }
112
-                    else
113
-                    {
114
-                        return Error("编辑失败");
115
-                    }
116
-                }
117
-                else
118
-                {
119
-                    return Error("编辑失败");
120
-                }
121
-            }
122
-            else
123
-            {
124
-                dModel = new Model.T_Sys_MobileData();
125
-
126
-                if (!string.IsNullOrWhiteSpace(mobileNum.Trim()))
127
-                {
128
-                    dModel.F_MobileNum = mobileNum.Trim();
129
-                }
130
-                if (!string.IsNullOrWhiteSpace(zipCode.Trim()))
131
-                {
132
-                    dModel.F_ZipCode = zipCode.Trim();
133
-                }
134
-                if (!string.IsNullOrWhiteSpace(cityDes.Trim()))
135
-                {
136
-                    dModel.F_CityDes = cityDes.Trim();
137
-                }
138
-                if (!string.IsNullOrWhiteSpace(cardDes.Trim()))
139
-                {
140
-                    dModel.F_CardDes = cardDes.Trim();
141
-                }
142
-                dModel.F_IsDelete = 0;
143
-                dModel.F_CreateUser = User.F_UserCode;
144
-                dModel.F_CreateTime = DateTime.Now;
145
-                int n = dBLL.Add(dModel);
146
-                if (n > 0)
147
-                {
148
-                    return Success("添加成功", n);
149
-                }
150
-                else
151
-                {
152
-                    return Error("添加失败");
153
-                }
154
-            }
155
-        }
156
-
157
-        //删除号码归属地记录
158
-        public ActionResult DelMobiledata(string[] nums)
159
-        {
160
-            if (nums != null && nums.Length > 0)
161
-            {
162
-                string idd = " ";
163
-                foreach (string str in nums)
164
-                {
165
-                    idd += "'" + str + "',";
166
-                }
167
-                if (new Bll.T_Sys_MobileData().DeleteList(idd.TrimEnd(','), User.F_UserCode))
168
-                {
169
-                    return Success("删除成功");
170
-                }
171
-                else
172
-                    return Error("删除失败");
173
-            }
174
-            else
175
-            {
176
-                return Error("请选择要删除的记录");
177
-            }
178
-        }
179
-    }
180
-}

+ 0 - 59
RMYY_CallCenter_Api/Controllers/CallTel/WorkOffDaysController.cs

@@ -1,59 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Data;
4
-using System.Linq;
5
-using System.Web;
6
-using System.Web.Mvc;
7
-
8
-namespace RMYY_CallCenter_Api.Controllers.CallTel
9
-{
10
-    public class WorkOffDaysController : BaseController
11
-    {
12
-        Bll.T_Sys_WorkOffDays dBLL = new Bll.T_Sys_WorkOffDays();
13
-        //获取休息日列表
14
-        public ActionResult GetList(string date)
15
-        {
16
-            string sql = " and DATEDIFF(MONTH,GETDATE(),f_offdate) in (-1,0,1) ";
17
-            if (!string.IsNullOrEmpty(date))
18
-                sql = " and DATEDIFF(MONTH,'"+ date + "',f_offdate) in (-1,0,1) ";
19
-            List<Model.T_Sys_WorkOffDays> wodlist = dBLL.GetModelList(" F_OffState=0 " + sql + " order by F_OffDate");
20
-            var obj = wodlist.Select(wol => new
21
-            {
22
-                date = wol.F_OffDate.Value.ToString("yyyy-MM-dd"),
23
-            });
24
-            return Success("获取成功", obj);
25
-        }
26
-
27
-        /// <summary>
28
-        /// 设置或取消休息日
29
-        /// </summary>
30
-        /// <param name="offdate">日期</param>
31
-        /// <param name="type">0,设为休息日;1,取消休息日</param>
32
-        /// <returns></returns>
33
-        public ActionResult setOfforOn(string offdate, int type)
34
-        {
35
-            if (string.IsNullOrWhiteSpace(offdate))
36
-                return Error("参数错误");
37
-
38
-            Model.T_Sys_WorkOffDays dModel = dBLL.GetModel(offdate);
39
-            if (dModel == null)
40
-            {
41
-                return Error("设置的日期有误,请联系管理员");
42
-            }
43
-            dModel.F_OffDate = Convert.ToDateTime(offdate);
44
-            dModel.F_OffState = type;
45
-            dModel.F_DeleteBy = User.F_UserCode;
46
-            dModel.F_DeleteOn = DateTime.Now;
47
-
48
-            var res = dBLL.UpdateState(dModel);
49
-            if (res)
50
-            {
51
-                return Success("设置成功");
52
-            }
53
-            else
54
-            {
55
-                return Error("设置失败");
56
-            }
57
-        }
58
-    }
59
-}

+ 0 - 341
RMYY_CallCenter_Api/Controllers/DictionaryController.cs

@@ -1,341 +0,0 @@
1
-using RMYY_CallCenter_Api.Utility;
2
-using CallCenterApi.Interface.Models;
3
-using RMYY_CallCenter_Api.Controllers;
4
-using System;
5
-using System.Collections.Generic;
6
-using System.Data;
7
-using System.Linq;
8
-using System.Text;
9
-using System.Web;
10
-using System.Web.Mvc;
11
-using RMYY_CallCenter_Api.Model;
12
-using RMYY_CallCenter_Api.Models;
13
-
14
-namespace CallCenterApi.Interface.Controllers
15
-{
16
-    
17
-    public class DictionaryController : BaseController
18
-    {
19
-        private RMYY_CallCenter_Api.Bll.T_Sys_DictionaryBase dictionaryBaseBLL = new RMYY_CallCenter_Api.Bll.T_Sys_DictionaryBase();
20
-        private RMYY_CallCenter_Api.Bll.T_Sys_DictionaryValue dictionaryValueBLL = new RMYY_CallCenter_Api.Bll.T_Sys_DictionaryValue();
21
-      
22
-
23
-        #region 字典操作
24
-
25
-        /// <summary>
26
-        /// 获取字典列表
27
-        /// </summary>
28
-        /// <returns></returns>
29
-        public ActionResult GetList(FilterDictionary filter)
30
-        {
31
-            ActionResult res = NoToken("未知错误,请重新登录");
32
-            if (Request.IsAuthenticated)
33
-            {
34
-                var sql = " and F_State=1 ";
35
-                var recordCount = 0;
36
-                var dt = RMYY_CallCenter_Api.Bll.PagerBll.GetListPager(
37
-                  "T_Sys_DictionaryBase",
38
-                  "F_DictionaryFlag",
39
-                  "*",
40
-                  sql,
41
-                  "ORDER BY F_Sort ",
42
-                  filter.PageSize,
43
-                  filter.PageIndex,
44
-                  true,
45
-                  out recordCount);
46
-                List<T_Sys_DictionaryBase> modelList = dictionaryBaseBLL.DataTableToList(dt);
47
-                var obj = new
48
-                {
49
-                    rows = modelList.Select(x => new
50
-                    {
51
-                        name = x.F_DictionaryName,
52
-                        flag = x.F_DictionaryFlag,
53
-                        sort = x.F_Sort
54
-                    }),
55
-                    total = recordCount
56
-                };
57
-                res = Content(obj.ToJson());
58
-            }
59
-            return res;
60
-        }
61
-
62
-        /// <summary>
63
-        /// 获取字典
64
-        /// </summary>
65
-        /// <param name="dicFlag"></param>
66
-        /// <returns></returns>
67
-        public ActionResult GetDic(string dicFlag)
68
-        {
69
-            ActionResult res = NoToken("未知错误,请重新登录");
70
-            if (Request.IsAuthenticated)
71
-            {
72
-                T_Sys_DictionaryBase baseModel = dictionaryBaseBLL.GetModel(dicFlag);
73
-                if (baseModel != null)
74
-                    res = Success("加载字典成功", new
75
-                    {
76
-                        name = baseModel.F_DictionaryName,
77
-                        flag = baseModel.F_DictionaryFlag,
78
-                        sort = baseModel.F_Sort
79
-                    });
80
-                else
81
-                    res = Error("加载字典失败");
82
-            }
83
-            return res;
84
-        }
85
-        //[Authority]
86
-        /// <summary>
87
-        /// 添加字典
88
-        /// </summary>
89
-        /// <param name="input"></param>
90
-        /// <returns></returns>
91
-        public ActionResult AddDic(DictionaryBaseInput input)
92
-        {
93
-            ActionResult res = NoToken("未知错误,请重新登录");
94
-            if (Request.IsAuthenticated)
95
-            {
96
-                T_Sys_DictionaryBase orderModel = new T_Sys_DictionaryBase();
97
-                var model = dictionaryBaseBLL.GetModel(input.DicFlag.Trim());
98
-                if (model != null)
99
-                    return Error("字典标志已存在");
100
-                orderModel.F_DictionaryFlag = input.DicFlag;
101
-                orderModel.F_DictionaryName = input.Name;
102
-                orderModel.F_Describe = input.Remark;
103
-                orderModel.F_State = true;
104
-                orderModel.F_Sort = input.Sort;
105
-
106
-                if (dictionaryBaseBLL.Add(orderModel))
107
-                    res = Success("字典添加成功");
108
-                else
109
-                    res = Error("字典添加失败");
110
-            }
111
-            return res;
112
-        }
113
-
114
-        //[Authority]
115
-        /// <summary>
116
-        /// 编辑字典
117
-        /// </summary>
118
-        /// <param name="input"></param>
119
-        /// <returns></returns>
120
-        public ActionResult EditDic(DictionaryBaseInput input)
121
-        {
122
-            ActionResult res = NoToken("未知错误,请重新登录");
123
-            if (Request.IsAuthenticated)
124
-            {
125
-                T_Sys_DictionaryBase orderModel = dictionaryBaseBLL.GetModel(input.DicFlag.Trim());
126
-                if (orderModel == null)
127
-                    return Error("字典对象不存在");
128
-                orderModel.F_DictionaryFlag = input.DicFlag;
129
-                orderModel.F_DictionaryName = input.Name;
130
-                orderModel.F_Describe = input.Remark;
131
-                orderModel.F_Sort = input.Sort;
132
-                if (dictionaryBaseBLL.Update(orderModel))
133
-                    res = Success("字典添加成功");
134
-                else
135
-                    res = Error("字典添加失败");
136
-            }
137
-            return res;
138
-        }
139
-
140
-        //[Authority]
141
-        /// <summary>
142
-        /// 删除字典
143
-        /// </summary>
144
-        /// <param name="ids"></param>
145
-        /// <returns></returns>
146
-        public ActionResult DelDic(string[] ids)
147
-        {
148
-            ActionResult res = NoToken("未知错误,请重新登录");
149
-            if (Request.IsAuthenticated)
150
-            {
151
-                if (ids == null || ids.Length <= 0)
152
-                    return Error("获取参数失败");
153
-                StringBuilder sb = new StringBuilder();
154
-                foreach (var item in ids)
155
-                {
156
-                    sb.Append("'" + item + "',");
157
-                }
158
-                if (dictionaryBaseBLL.DeleteList(sb.ToString().Trim(',')))
159
-                    res = Success("删除成功");
160
-                else
161
-                    res = Error("删除失败");
162
-            }
163
-            return res;
164
-        }
165
-        #endregion
166
-
167
-        #region 字典值操作
168
-
169
-        //获取字典值列表
170
-        public ActionResult GetDicValueList(FilterDictionary filter)
171
-        {
172
-             ActionResult res = NoToken("未知错误,请重新登录");
173
-            if (Request.IsAuthenticated)
174
-            {
175
-                string sql = "";
176
-                DataTable dt = new DataTable();
177
-
178
-
179
-
180
-                if (!string.IsNullOrWhiteSpace(filter.Id))
181
-                {
182
-                    sql += " and F_DictionaryFlag= '" + filter.Id + "' ";
183
-                }
184
-
185
-                if (!string.IsNullOrWhiteSpace(filter.Flag))
186
-                {
187
-                    sql += " and F_DictionaryFlag like '%" + filter.Flag + "%' ";
188
-                }
189
-                if (!string.IsNullOrWhiteSpace(filter.Name))
190
-                {
191
-                    sql += " and F_Name like '%" + filter.Name + "%' ";
192
-                }
193
-
194
-                int recordCount = 0;
195
-                dt = RMYY_CallCenter_Api.Bll.PagerBll.GetListPager(
196
-                    "T_Sys_DictionaryValue",
197
-                    "F_DictionaryValueId",
198
-                    "*",
199
-                    sql,
200
-                    "ORDER BY F_Sort ",
201
-                    filter.PageSize,
202
-                    filter.PageIndex,
203
-                    true,
204
-                    out recordCount);
205
-                List<T_Sys_DictionaryValue> modelList = dictionaryValueBLL.DataTableToList(dt);
206
-
207
-                var obj = new
208
-                {
209
-                    rows = dt,
210
-                    total = recordCount
211
-                };
212
-
213
-                res = Content(obj.ToJson());
214
-            }
215
-            return res;
216
-        }
217
-
218
-        //获取字典值列表
219
-        public ActionResult GetDicValueListByFlag(string flag)
220
-        {
221
-            ActionResult res = NoToken("未知错误,请重新登录");
222
-            if (Request.IsAuthenticated)
223
-            {
224
-
225
-                DataTable dt = new DataTable();
226
-
227
-                dt = dictionaryValueBLL.GetList(" F_DictionaryFlag='" + flag + "' and F_State=1 ").Tables[0];
228
-
229
-                res = Success("列表加载成功", dt);
230
-            }
231
-            return res;
232
-        }        
233
-
234
-        //加载字典值
235
-        public ActionResult GetDicValue(int dicValueId = 0)
236
-        {
237
-            ActionResult res = NoToken("未知错误,请重新登录");
238
-            if (Request.IsAuthenticated)
239
-            {
240
-                if (dicValueId <= 0)
241
-                    return Error("字典值标识传输失败");
242
-                T_Sys_DictionaryValue valueModel = dictionaryValueBLL.GetModel(dicValueId);
243
-                if (valueModel != null)
244
-                    res = Success("加载字典值成功", new
245
-                    {
246
-                        id = valueModel.F_DictionaryValueId,
247
-                        dicflag = valueModel.F_DictionaryFlag,
248
-                        name = valueModel.F_Name,
249
-                        remark = valueModel.F_Describe,
250
-                        sort = valueModel.F_Sort,
251
-                    });
252
-                else
253
-                    res = Error("加载字典值失败");
254
-            }
255
-            return res;
256
-        }
257
-
258
-        //[Authority]
259
-        //添加字典值
260
-        public ActionResult AddDicValue(DictionaryValueInput input)
261
-        {
262
-            ActionResult res = NoToken("未知错误,请重新登录");
263
-            if (Request.IsAuthenticated)
264
-            {
265
-                T_Sys_DictionaryValue orderModel = new T_Sys_DictionaryValue();
266
-               
267
-                orderModel.F_Name = input.DicvName;
268
-                orderModel.F_Describe = input.DicDes;
269
-                orderModel.F_State = true;
270
-                orderModel.F_ValueCode = "";
271
-                orderModel.F_DictionaryFlag = input.DicFlag;
272
-                orderModel.F_Sort = input.Sort;
273
-
274
-
275
-                if (dictionaryValueBLL.Add(orderModel) > 0)
276
-                    res = Success("字典值添加成功");
277
-                else
278
-                    res = Error("字典值添加失败");
279
-            }
280
-            return res;
281
-        }
282
-        ////[Authority]
283
-        //编辑字典值
284
-        public ActionResult EditDicValue(DictionaryValueInput input)
285
-        {
286
-            ActionResult res = NoToken("未知错误,请重新登录");
287
-            if (Request.IsAuthenticated)
288
-            {
289
-                if (input.DicVid <= 0)
290
-                    return Error("字典值id获取失败");
291
-                T_Sys_DictionaryValue orderModel = dictionaryValueBLL.GetModel(input.DicVid);
292
-                if (orderModel == null)
293
-                    return Error("字典值对象获取失败");
294
-                orderModel.F_Name = input.DicvName;
295
-                orderModel.F_Describe = input.DicDes;
296
-                orderModel.F_ValueCode = "";
297
-                orderModel.F_DictionaryFlag = input.DicFlag;
298
-                orderModel.F_Sort = input.Sort;
299
-                if (dictionaryValueBLL.Update(orderModel))
300
-                    res = Success("字典值编辑成功");
301
-                else
302
-                    res = Error("字典值编辑失败");
303
-            }
304
-            return res;
305
-        }
306
-        //[Authority]
307
-        //删除字典值
308
-        public ActionResult DelDicValue(string[] ids)
309
-        {
310
-            ActionResult res = NoToken("未知错误,请重新登录");
311
-            if (Request.IsAuthenticated)
312
-            {
313
-                if (ids == null || ids.Length <= 0)
314
-                    return Error("获取参数失败");
315
-                var idStr = string.Join(",", ids);
316
-                if (dictionaryValueBLL.DeleteList(idStr))
317
-                    res = Success("删除成功");
318
-                else
319
-                    res = Error("删除失败");
320
-            }
321
-            return res;
322
-        }
323
-        #endregion
324
-
325
-        #region 微信端字典
326
-        /// <summary>
327
-        /// 获取字典值列表 - 微信端使用
328
-        /// </summary>
329
-        /// <param name="flag"></param>
330
-        /// <returns></returns>
331
-        public ActionResult GetDicValueListByFlagWx(string flag)
332
-        {
333
-            DataTable dt = new DataTable();
334
-            dt = dictionaryValueBLL.GetList(" F_DictionaryFlag='" + flag + "' and F_State=1 ").Tables[0];
335
-            return Success("列表加载成功", dt);
336
-        }
337
-        #endregion
338
-
339
-
340
-    }
341
-}

+ 0 - 273
RMYY_CallCenter_Api/Controllers/GongDanTypeController.cs

@@ -1,273 +0,0 @@
1
-
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Text;
6
-using System.Web;
7
-using System.Web.Mvc;
8
-using CallCenterApi.Interface.Models;
9
-using RMYY_CallCenter_Api.Model;
10
-using RMYY_CallCenter_Api.Models;
11
-using RMYY_CallCenter_Api.Utility;
12
-
13
-namespace RMYY_CallCenter_Api.Controllers
14
-{
15
-    public class GongDanTypeController : BaseController
16
-    {
17
-        private Bll.T_Sys_GongDan gongdanBll = new Bll.T_Sys_GongDan();
18
-        private Bll.T_Sys_GongDanType gongdanTypeBll = new Bll.T_Sys_GongDanType();
19
-        #region 工单类型详情
20
-        /// <summary>
21
-        /// 获取列表
22
-        /// </summary>
23
-        /// <returns></returns>
24
-        public ActionResult GetList()
25
-        {
26
-            var gModel = gongdanBll.GetAllList();
27
-            List<T_Sys_GongDan> g_list = gongdanBll.DataTableToList(gModel.Tables[0]);
28
-            g_list.Sort((x, y) => x.F_Sort - y.F_Sort);
29
-            var treelist = new List<TreeModel>();
30
-            foreach (var item in g_list)
31
-            {
32
-                TreeModel treeModel = new TreeModel();
33
-                treeModel.id = item.F_GDId.ToString();
34
-                treeModel.IconCls = item.F_ImgUrl;
35
-                treeModel.text = item.F_Name;
36
-                treeModel.parentid = item.F_ParentID.ToString();
37
-                treelist.Add(treeModel);
38
-            }
39
-
40
-            return Success("获取成功", treelist.TreeRecursion("0"));
41
-        }
42
-
43
-        /// <summary>
44
-        /// 添加
45
-        /// </summary>
46
-        /// <param name="input"></param>
47
-        /// <returns></returns>
48
-        public ActionResult AddGongDan(T_Sys_GongDan input)
49
-        {
50
-            //ActionResult res = NoToken("未知错误,请重新登录");
51
-            //if (Request.IsAuthenticated)
52
-            //{
53
-            T_Sys_GongDan model = new T_Sys_GongDan();
54
-            model.F_Name = input.F_Name;
55
-            model.F_Remark = input.F_Remark;
56
-            model.F_Sort = input.F_Sort;
57
-            model.F_ParentID = input.F_ParentID;
58
-            model.F_CreateTime = DateTime.Now;
59
-            model.F_TypeId = input.F_TypeId;
60
-            if (gongdanBll.Add(model) > 0)
61
-            {
62
-                return Success("类型添加成功!");
63
-            }
64
-            else
65
-            {
66
-                return Error("添加失败,请重试");
67
-            }
68
-            //}
69
-            //return res;
70
-
71
-        }
72
-
73
-        /// <summary>
74
-        /// 获取实体
75
-        /// </summary>
76
-        /// <param name="mId"></param>
77
-        /// <returns></returns>
78
-        [HttpGet]
79
-        public ActionResult GetModule(int mId = 0)
80
-        {
81
-            var entity_ModuleInfo = gongdanBll.GetModel(mId);
82
-            if (entity_ModuleInfo != null)
83
-            {
84
-                return Success("加载菜单成功", new
85
-                {
86
-                    name = entity_ModuleInfo.F_Name,
87
-                    remark = entity_ModuleInfo.F_Remark,
88
-                    sort = entity_ModuleInfo.F_Sort
89
-                });
90
-            }
91
-            else
92
-            {
93
-                return Error("加载失败");
94
-            }
95
-        }
96
-
97
-        /// <summary>
98
-        /// 删除
99
-        /// </summary>
100
-        /// <param name="ids"></param>
101
-        /// <returns></returns>
102
-        public ActionResult DelModule(string[] ids)
103
-        {
104
-            if (ids != null && ids.Length > 0)
105
-            {
106
-                string idd = " ";
107
-                foreach (string str in ids)
108
-                {
109
-                    idd += str + ",";
110
-                }
111
-                #region 判断子栏目是否存在
112
-                var sql = "";
113
-                sql += "F_ParentID in (" + idd.TrimEnd(',') + ") ";
114
-                var list = gongdanBll.DataTableToList(gongdanBll.GetList(sql).Tables[0]);
115
-                if (list.Count > 0)
116
-                    return Error("操作失败:子栏目存在,不能删除");
117
-                #endregion
118
-                if (gongdanBll.DeleteList(idd.TrimEnd(',')))
119
-                {
120
-                    return Success("删除成功");
121
-                }
122
-                else
123
-                {
124
-                    return Error("删除失败,请重试!");
125
-                }
126
-            }
127
-            else
128
-            {
129
-                return Error("获取参数失败");
130
-            }
131
-        }
132
-
133
-        /// <summary>
134
-        /// 编辑
135
-        /// </summary>
136
-        /// <param name="input"></param>
137
-        /// <returns></returns>
138
-        [HttpPost]
139
-        public ActionResult EditGongDan(T_Sys_GongDan input)
140
-        {
141
-            var ModuleInfo = gongdanBll.GetModel(input.F_GDId);
142
-            if (ModuleInfo != null)
143
-            {
144
-                ModuleInfo.F_ParentID = input.F_ParentID;
145
-                ModuleInfo.F_Name = input.F_Name;
146
-                ModuleInfo.F_Remark = input.F_Remark;
147
-                ModuleInfo.F_Sort = input.F_Sort;
148
-                if (gongdanBll.Update(ModuleInfo))
149
-                {
150
-                    return Success("修改成功");
151
-                }
152
-                else
153
-                {
154
-                    return Error("修改失败,请重试!");
155
-                }
156
-            }
157
-            else
158
-            {
159
-                return Error("对象获取失败");
160
-            }
161
-        }
162
-
163
-        #endregion
164
-
165
-        #region  工单类型
166
-        /// <summary>
167
-        /// 获取类型列表
168
-        /// </summary>
169
-        /// <returns></returns>
170
-        public ActionResult GetTypeList(FilterDictionary filter)
171
-        {
172
-            //ActionResult res = NoToken("未知错误,请重新登录");
173
-            //if (Request.IsAuthenticated)
174
-            //{
175
-                var recordCount = 0;
176
-                var dt = RMYY_CallCenter_Api.Bll.PagerBll.GetListPager(
177
-                  "T_Sys_GongDanType",
178
-                  "F_TypeId",
179
-                  "*",
180
-                  "",
181
-                  "ORDER BY F_TypeId ",
182
-                  filter.PageSize,
183
-                  filter.PageIndex,
184
-                  true,
185
-                  out recordCount);
186
-                List<T_Sys_GongDanType> modelList = gongdanTypeBll.DataTableToList(dt);
187
-                var obj = new
188
-                {
189
-                    rows = modelList.Select(x => new
190
-                    {
191
-                        name = x.F_TypeName,
192
-                        flag = x.F_TypeId
193
-                    }),
194
-                    total = recordCount
195
-                };
196
-              return  Content(obj.ToJson());
197
-            //}
198
-            //return res;
199
-        }
200
-        //[Authority]
201
-        /// <summary>
202
-        /// 添加类型
203
-        /// </summary>
204
-        /// <param name="input"></param>
205
-        /// <returns></returns>
206
-        public ActionResult AddType(T_Sys_GongDanType input)
207
-        {
208
-            //ActionResult res = NoToken("未知错误,请重新登录");
209
-            //if (Request.IsAuthenticated)
210
-            //{
211
-                T_Sys_GongDanType orderModel = new T_Sys_GongDanType();
212
-                orderModel.F_TypeName = input.F_TypeName;
213
-                orderModel.F_Remark = input.F_Remark;
214
-                orderModel.F_CreateTime = DateTime.Now;
215
-                if (gongdanTypeBll.Add(orderModel)>0)
216
-                   return  Success("添加成功");
217
-                else
218
-                   return  Error("添加失败");
219
-            //}
220
-            //return res;
221
-        }
222
-
223
-        //[Authority]
224
-        /// <summary>
225
-        /// 编辑类型
226
-        /// </summary>
227
-        /// <param name="input"></param>
228
-        /// <returns></returns>
229
-        public ActionResult EditType(T_Sys_GongDanType input)
230
-        {
231
-            //ActionResult res = NoToken("未知错误,请重新登录");
232
-            //if (Request.IsAuthenticated)
233
-            //{
234
-                T_Sys_GongDanType orderModel = gongdanTypeBll.GetModel(input.F_TypeId);             
235
-                orderModel.F_TypeName = input.F_TypeName;
236
-                orderModel.F_Remark = input.F_Remark;
237
-                //orderModel.F_Sort = input.Sort;
238
-                if (gongdanTypeBll.Update(orderModel))
239
-                    return Success("修改成功");
240
-                else
241
-                    return Error("修改失败");
242
-            //}
243
-            //return res;
244
-        }
245
-
246
-        //[Authority]
247
-        /// <summary>
248
-        /// 删除类型
249
-        /// </summary>
250
-        /// <param name="ids"></param>
251
-        /// <returns></returns>
252
-        public ActionResult DelType(string[] ids)
253
-        {
254
-            //ActionResult res = NoToken("未知错误,请重新登录");
255
-            //if (Request.IsAuthenticated)
256
-            //{
257
-                if (ids == null || ids.Length <= 0)
258
-                    return Error("获取参数失败");
259
-                StringBuilder sb = new StringBuilder();
260
-                foreach (var item in ids)
261
-                {
262
-                    sb.Append("'" + item + "',");
263
-                }
264
-                if (gongdanTypeBll.DeleteList(sb.ToString().Trim(',')))
265
-                return Success("删除成功");
266
-                else
267
-                    return Error("删除失败");
268
-            //}
269
-            //return res;
270
-        }
271
-        #endregion
272
-    }
273
-}

+ 0 - 58
RMYY_CallCenter_Api/Controllers/HomeController.cs

@@ -1,58 +0,0 @@
1
-using RMYY_CallCenter_Api.DB;
2
-using RMYY_CallCenter_Api.Models;
3
-using RMYY_CallCenter_Api.Utility;
4
-using System;
5
-using System.Collections.Generic;
6
-using System.Data;
7
-using System.Linq;
8
-using System.Web;
9
-using System.Web.Mvc;
10
-
11
-namespace RMYY_CallCenter_Api.Controllers
12
-{
13
-    [AllowAnonymous]
14
-    public class HomeController : BaseController
15
-    {
16
-        public ActionResult Index()
17
-        {
18
-            return Content("hello world!");
19
-        }
20
-
21
-        /// <summary>
22
-        /// 登录
23
-        /// </summary>
24
-        /// <param name="usercode"></param>
25
-        /// <param name="password"></param>
26
-        /// <returns></returns>
27
-        [HttpPost]
28
-        public ActionResult Login(string usercode, string password)
29
-        {
30
-            Dictionary<string, string> paras = new Dictionary<string, string>();
31
-            string sql = " select * from T_Sys_UserAccount where F_UserCode=@F_UserCode and F_PassWord=@F_PassWord";
32
-            paras.Add("@F_UserCode", usercode);
33
-            paras.Add("@F_PassWord", password.ToMD5String());
34
-            var dt = DbHelperSQL.Query(sql, paras).Tables[0];
35
-            if (dt != null && dt.Rows.Count > 0)
36
-            {
37
-                var dr = dt.Rows[0];
38
-
39
-                if (dr["F_EnableFlag"]?.ToString() == "0")
40
-                {
41
-                    return Error("此账号已经被禁用");
42
-                }
43
-
44
-                Dictionary<string, string> Dic = new Dictionary<string, string>();
45
-                Dic.Add("F_UserCode", dr["F_UserCode"].ToString());
46
-                Dic.Add("F_RoleId", dr["F_RoleId"].ToString());
47
-                Dic.Add("F_DeptId", dr["F_DeptId"].ToString());
48
-
49
-                var token = FormsPrincipal<Dictionary<string, string>>.GetCookieValue(Dic["F_UserCode"], Dic);
50
-                return Success("登录成功", token);
51
-            }
52
-            else
53
-            {
54
-                return Error("账号或密码错误");
55
-            }
56
-        }
57
-    }
58
-}

+ 0 - 53
RMYY_CallCenter_Api/Controllers/IndexController.cs

@@ -1,53 +0,0 @@
1
-using RMYY_CallCenter_Api.Utility;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Data;
5
-using System.Linq;
6
-using System.Web;
7
-using System.Web.Mvc;
8
-
9
-namespace RMYY_CallCenter_Api.Controllers
10
-{
11
-    public class IndexController : BaseController
12
-    {
13
-        // GET: Index
14
-        /// <summary>
15
-        /// 获取当前用户
16
-        /// </summary>
17
-        /// <returns></returns>
18
-        public ActionResult GetCurrentUser()
19
-        {
20
-            var Role = new Bll.T_Sys_Role().GetModel(User.F_RoleId);
21
-            var Dept = new Bll.T_Sys_Department().GetModel(User.F_DeptId);
22
-            return Success("成功", new { User, Role, Dept });
23
-        }
24
-        /// <summary>
25
-        /// 获取当前用户菜单
26
-        /// </summary>
27
-        /// <returns></returns>
28
-        public ActionResult GetMenu()
29
-        {
30
-            var Menus = CacheHelper.Get<DataTable>("RoleMenus_" + User.F_RoleId);
31
-            if (Menus != null)
32
-            {
33
-                return Success("成功", Menus);
34
-            }
35
-            else
36
-            {
37
-                var dt = new DataTable();
38
-                if (User.F_UserCode == "8000")
39
-                {
40
-                    dt = DB.DbHelperSQL.Query("select * FROM T_Sys_Menu m with(nolock) where F_State=1 ").Tables[0];
41
-                }
42
-                else
43
-                {
44
-                    dt = DB.DbHelperSQL.Query("select m.* FROM T_Sys_RoleMenu rm with(nolock) left join T_Sys_Menu m with(nolock) on rm.F_MenuId=m.F_MenuId where m.F_State=1 and rm.RoleId=" + User.F_RoleId + " and isnull(m.F_Action,'')!='' ").Tables[0];
45
-                }
46
-
47
-                CacheHelper.Insert("RoleMenus_" + User.F_RoleId, dt, 10);
48
-
49
-                return Success("成功", dt);
50
-            }
51
-        }
52
-    }
53
-}

+ 0 - 171
RMYY_CallCenter_Api/Controllers/System/DepartmentController.cs

@@ -1,171 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Web;
5
-using System.Web.Mvc;
6
-
7
-namespace RMYY_CallCenter_Api.Controllers.System
8
-{
9
-    public class DepartmentController : BaseController
10
-    {
11
-        private Bll.T_Sys_Department departmentBLL = new Bll.T_Sys_Department();
12
-
13
-        // GET: Department
14
-        /// <summary>
15
-        /// 获取列表
16
-        /// </summary>
17
-        /// <returns></returns>
18
-        public ActionResult GetList()
19
-        {
20
-            var list = departmentBLL.GetList(" F_State=1 ").Tables[0];
21
-
22
-            return Success("", list);
23
-        }
24
-
25
-        /// <summary>
26
-        /// 获取信息
27
-        /// </summary>
28
-        /// <param name="deptid"></param>
29
-        /// <param name="deptcode"></param>
30
-        /// <returns></returns>
31
-        public ActionResult GetModel(int deptid = 0, string deptcode = "")
32
-        {
33
-            string sql = " 1=1 ";
34
-            if (deptid > 0)
35
-            {
36
-                sql += " and F_DeptId=" + deptid;
37
-            }
38
-            if (!string.IsNullOrWhiteSpace(deptcode))
39
-            {
40
-                sql += " and F_DeptCode='" + deptcode + "'";
41
-            }
42
-            if (string.IsNullOrWhiteSpace(sql))
43
-                return Error("获取失败");
44
-
45
-            var role = departmentBLL.GetModelList(sql).FirstOrDefault();
46
-
47
-            return Success("获取成功", role);
48
-        }
49
-
50
-        /// <summary>
51
-        /// 新增
52
-        /// </summary>
53
-        /// <param name="pid"></param>
54
-        /// <param name="code"></param>
55
-        /// <param name="name"></param>
56
-        /// <param name="sort"></param>
57
-        /// <returns></returns>
58
-        [HttpPost]
59
-        public ActionResult Insert(int pid, string code, string name, int sort)
60
-        {
61
-            if (departmentBLL.Exists(code))
62
-            {
63
-                return Error("已经存在此编码");
64
-            }
65
-            else
66
-            {
67
-                Model.T_Sys_Department dModel = new Model.T_Sys_Department();
68
-                dModel.F_ParentId = pid;
69
-                dModel.F_Sort = sort;
70
-                dModel.F_DeptCode = code;
71
-                dModel.F_DeptName = name;
72
-                dModel.F_State = 1;
73
-                dModel.F_CreateTime = DateTime.Now;
74
-                dModel.F_CreateUser = User.F_UserCode;
75
-
76
-                int n = departmentBLL.Add(dModel);
77
-                if (n > 0)
78
-                {
79
-                    return Success("添加成功", n);
80
-                }
81
-
82
-                else
83
-                    return Error("添加失败");
84
-            }
85
-
86
-        }
87
-
88
-        /// <summary>
89
-        /// 编辑
90
-        /// </summary>
91
-        /// <param name="id"></param>
92
-        /// <param name="pid"></param>
93
-        /// <param name="code"></param>
94
-        /// <param name="name"></param>
95
-        /// <param name="sort"></param>
96
-        /// <returns></returns>
97
-        [HttpPost]
98
-        public ActionResult Update(int id, int pid, string code, string name, int sort)
99
-        {
100
-            Model.T_Sys_Department dModel = departmentBLL.GetModel(id);
101
-            if (dModel != null)
102
-            {
103
-                var list = departmentBLL.GetModelList(" F_DeptCode='" + code + "' and F_DeptId!='" + id + "' ");
104
-                if (list.Count > 0)
105
-                {
106
-                    return Error("已经存在此编码");
107
-                }
108
-                else
109
-                {
110
-                    dModel.F_ParentId = pid;
111
-                    dModel.F_Sort = sort;
112
-                    dModel.F_DeptCode = code;
113
-                    dModel.F_DeptName = name;
114
-                    dModel.F_State = 1;
115
-
116
-                    if (departmentBLL.Update(dModel))
117
-                    {
118
-                        return Success("修改成功");
119
-                    }
120
-                    else
121
-                        return Error("修改失败");
122
-                }
123
-            }
124
-            else
125
-            {
126
-                return Error("修改失败");
127
-            }
128
-        }
129
-
130
-        /// <summary>
131
-        /// 删除
132
-        /// </summary>
133
-        /// <param name="id"></param>
134
-        /// <returns></returns>
135
-        [HttpPost]
136
-        public ActionResult Delete(int id)
137
-        {
138
-            if (id > 0)
139
-            {
140
-                bool bl = true;
141
-                var list = departmentBLL.GetList("F_ParentId='" + id + "'").Tables[0];
142
-                if (list.Rows.Count == 0)
143
-                {
144
-                    var list1 = new Bll.T_Sys_UserAccount().GetList("F_DeptId='" + id + "'").Tables[0];
145
-                    if (list1.Rows.Count == 0)
146
-                    {
147
-                        bl = false;
148
-                    }
149
-                }
150
-                if (bl)
151
-                {
152
-                    return Error("正在被使用,不能删除");
153
-                }
154
-
155
-                if (departmentBLL.Delete(id))
156
-                {
157
-                    return Success("删除成功");
158
-                }
159
-                else
160
-                {
161
-                    return Error("删除失败");
162
-                }
163
-            }
164
-            else
165
-            {
166
-                return Error("删除失败");
167
-            }
168
-
169
-        }
170
-    }
171
-}

+ 0 - 170
RMYY_CallCenter_Api/Controllers/System/MenuController.cs

@@ -1,170 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Web;
5
-using System.Web.Mvc;
6
-
7
-namespace RMYY_CallCenter_Api.Controllers.System
8
-{
9
-    public class MenuController : BaseController
10
-    {
11
-        private Bll.T_Sys_Menu menuBLL = new Bll.T_Sys_Menu();
12
-
13
-        // GET: Menu
14
-        /// <summary>
15
-        /// 获取列表
16
-        /// </summary>
17
-        /// <returns></returns>
18
-        public ActionResult GetList()
19
-        {
20
-            var list = menuBLL.GetList(" F_State=1 ").Tables[0];
21
-
22
-            return Success("", list);
23
-        }
24
-
25
-        /// <summary>
26
-        /// 获取信息
27
-        /// </summary>
28
-        /// <param name="menuid"></param>
29
-        /// <param name="menucode"></param>
30
-        /// <returns></returns>
31
-        public ActionResult GetModel(int menuid = 0, string menucode = "")
32
-        {
33
-            string sql = " 1=1 ";
34
-            if (menuid > 0)
35
-            {
36
-                sql += " and F_MenuId=" + menuid;
37
-            }
38
-            if (!string.IsNullOrWhiteSpace(menucode))
39
-            {
40
-                sql += " and F_MenuCode='" + menucode + "'";
41
-            }
42
-            if (string.IsNullOrWhiteSpace(sql))
43
-                return Error("获取失败");
44
-
45
-            var role = menuBLL.GetModelList(sql).FirstOrDefault();
46
-
47
-            return Success("获取成功", role);
48
-        }
49
-
50
-        /// <summary>
51
-        /// 新增
52
-        /// </summary>
53
-        /// <param name="pid"></param>
54
-        /// <param name="code"></param>
55
-        /// <param name="name"></param>
56
-        /// <param name="sort"></param>
57
-        /// <returns></returns>
58
-        [HttpPost]
59
-        public ActionResult Insert(int pid, string code, string name, int sort, int type, string url, string function,string icon)
60
-        {
61
-            if (menuBLL.Exists(code))
62
-            {
63
-                return Error("已经存在此编码");
64
-            }
65
-            else
66
-            {
67
-                Model.T_Sys_Menu dModel = new Model.T_Sys_Menu();
68
-                dModel.F_ParentId = pid;
69
-                dModel.F_Sort = sort;
70
-                dModel.F_MenuCode = code;
71
-                dModel.F_MenuName = name;
72
-                dModel.F_Type = type;
73
-                dModel.F_Url = url;
74
-                dModel.F_Action = function;
75
-                dModel.F_Icon = icon;
76
-                dModel.F_State = 1;
77
-                dModel.F_CreateTime = DateTime.Now;
78
-                dModel.F_CreateUser = User.F_UserCode;
79
-
80
-                int n = menuBLL.Add(dModel);
81
-                if (n > 0)
82
-                {
83
-                    return Success("添加成功", n);
84
-                }
85
-
86
-                else
87
-                    return Error("添加失败");
88
-            }
89
-
90
-        }
91
-
92
-        /// <summary>
93
-        /// 编辑
94
-        /// </summary>
95
-        /// <param name="id"></param>
96
-        /// <param name="pid"></param>
97
-        /// <param name="code"></param>
98
-        /// <param name="name"></param>
99
-        /// <param name="sort"></param>
100
-        /// <returns></returns>
101
-        [HttpPost]
102
-        public ActionResult Update(int id, int pid, string code, string name, int sort, int type, string url, string function, string icon)
103
-        {
104
-            Model.T_Sys_Menu dModel = menuBLL.GetModel(id);
105
-            if (dModel != null)
106
-            {
107
-                var list = menuBLL.GetModelList(" F_DeptCode='" + code + "' and F_DeptId!='" + id + "' ");
108
-                if (list.Count > 0)
109
-                {
110
-                    return Error("已经存在此编码");
111
-                }
112
-                else
113
-                {
114
-                    dModel.F_ParentId = pid;
115
-                    dModel.F_Sort = sort;
116
-                    dModel.F_MenuCode = code;
117
-                    dModel.F_MenuName = name;
118
-                    dModel.F_Type = type;
119
-                    dModel.F_Url = url;
120
-                    dModel.F_Action = function;
121
-                    dModel.F_Icon = icon;
122
-                    dModel.F_State = 1;
123
-
124
-                    if (menuBLL.Update(dModel))
125
-                    {
126
-                        return Success("修改成功");
127
-                    }
128
-                    else
129
-                        return Error("修改失败");
130
-                }
131
-            }
132
-            else
133
-            {
134
-                return Error("修改失败");
135
-            }
136
-        }
137
-
138
-        /// <summary>
139
-        /// 删除
140
-        /// </summary>
141
-        /// <param name="id"></param>
142
-        /// <returns></returns>
143
-        [HttpPost]
144
-        public ActionResult Delete(int id)
145
-        {
146
-            if (id > 0)
147
-            {
148
-                var list = menuBLL.GetList("F_ParentId='" + id + "'").Tables[0];
149
-                if (list.Rows.Count>0)
150
-                {
151
-                    return Error("正在被使用,不能删除");
152
-                }
153
-
154
-                if (menuBLL.Delete(id))
155
-                {
156
-                    return Success("删除成功");
157
-                }
158
-                else
159
-                {
160
-                    return Error("删除失败");
161
-                }
162
-            }
163
-            else
164
-            {
165
-                return Error("删除失败");
166
-            }
167
-
168
-        }
169
-    }
170
-}

+ 0 - 277
RMYY_CallCenter_Api/Controllers/System/RoleController.cs

@@ -1,277 +0,0 @@
1
-using RMYY_CallCenter_Api.Utility;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Data;
5
-using System.Linq;
6
-using System.Web;
7
-using System.Web.Mvc;
8
-
9
-namespace RMYY_CallCenter_Api.Controllers.System
10
-{
11
-    public class RoleController : BaseController
12
-    {
13
-        private Bll.T_Sys_Role roleBLL = new Bll.T_Sys_Role();
14
-
15
-        // GET: Role
16
-
17
-        /// <summary>
18
-        /// 获取分页列表
19
-        /// </summary>
20
-        /// <returns></returns>
21
-        [HttpPost]
22
-        public ActionResult GetList()
23
-        {
24
-            DataTable dt = new DataTable();
25
-            string sql = string.Empty;
26
-
27
-            string rolecode = Request.Params["rolecode"]?.ToString();
28
-            string rolename = Request.Params["rolename"]?.ToString();
29
-
30
-            string strpageindex = Request.Params["page"];
31
-            int pageindex = 1;
32
-            string strpagesize = Request.Params["pagesize"];
33
-            int pagesize = 10;
34
-
35
-            if (!string.IsNullOrWhiteSpace(rolecode))
36
-            {
37
-                sql += " and F_RoleCode like '%" + rolecode + "%'";
38
-            }
39
-            if (!string.IsNullOrWhiteSpace(rolename))
40
-            {
41
-                sql += " and F_RoleName like '%" + rolename + "%'";
42
-            }
43
-
44
-            if (!string.IsNullOrWhiteSpace(strpageindex))
45
-            {
46
-                pageindex = strpageindex.ToInt();
47
-            }
48
-
49
-            if (!string.IsNullOrWhiteSpace(strpagesize))
50
-            {
51
-                pagesize = strpagesize.ToInt();
52
-            }
53
-
54
-            int recordCount = 0;
55
-            dt = Bll.PagerBll.GetListPager(
56
-                                    "T_Sys_Role with(nolock)",
57
-                                    "F_RoleId",
58
-                                    "*",
59
-                                    sql,
60
-                                    "ORDER BY F_RoleId desc",
61
-                                    pagesize,
62
-                                    pageindex,
63
-                                    true,
64
-                                    out recordCount);
65
-            var obj = new
66
-            {
67
-                rows = dt,
68
-                total = recordCount
69
-            };
70
-
71
-            return Content(obj.ToJson());
72
-        }
73
-
74
-        /// <summary>
75
-        /// 获取信息
76
-        /// </summary>
77
-        /// <param name="roleid"></param>
78
-        /// <param name="rolecode"></param>
79
-        /// <returns></returns>
80
-        public ActionResult GetModel(int roleid = 0, string rolecode = "")
81
-        {
82
-            string sql = " 1=1 ";
83
-            if (roleid > 0)
84
-            {
85
-                sql += " and F_RoleId=" + roleid;
86
-            }
87
-            if (!string.IsNullOrWhiteSpace(rolecode))
88
-            {
89
-                sql += " and F_RoleCode='" + rolecode + "'";
90
-            }
91
-            if (string.IsNullOrWhiteSpace(sql))
92
-                return Error("获取失败");
93
-
94
-            var role = roleBLL.GetModelList(sql).FirstOrDefault();
95
-
96
-            return Success("获取成功", role);
97
-        }
98
-
99
-        /// <summary>
100
-        /// 新增
101
-        /// </summary>
102
-        /// <param name="code"></param>
103
-        /// <param name="name"></param>
104
-        /// <param name="sort"></param>
105
-        /// <returns></returns>
106
-        [HttpPost]
107
-        public ActionResult Insert(string code, string name, int sort)
108
-        {
109
-            if (roleBLL.Exists(code))
110
-            {
111
-                return Error("已经存在此编码");
112
-            }
113
-            else
114
-            {
115
-                Model.T_Sys_Role dModel = new Model.T_Sys_Role();
116
-                dModel.F_Sort = sort;
117
-                dModel.F_RoleCode = code;
118
-                dModel.F_RoleName = name;
119
-                dModel.F_State = 1;
120
-                dModel.F_CreateTime = DateTime.Now;
121
-                dModel.F_CreateUser = User.F_UserCode;
122
-
123
-                int n = roleBLL.Add(dModel);
124
-                if (n > 0)
125
-                {
126
-                    return Success("添加成功", n);
127
-                }
128
-
129
-                else
130
-                    return Error("添加失败");
131
-            }
132
-
133
-        }
134
-
135
-        /// <summary>
136
-        /// 编辑
137
-        /// </summary>
138
-        /// <param name="id"></param>
139
-        /// <param name="code"></param>
140
-        /// <param name="name"></param>
141
-        /// <param name="sort"></param>
142
-        /// <returns></returns>
143
-        [HttpPost]
144
-        public ActionResult Update(int id, string code, string name, int sort)
145
-        {
146
-            Model.T_Sys_Role dModel = roleBLL.GetModel(id);
147
-            if (dModel != null)
148
-            {
149
-                var list = roleBLL.GetModelList(" F_RoleCode='" + code + "' and F_RoleId!='" + id + "' ");
150
-                if (list.Count > 0)
151
-                {
152
-                    return Error("已经存在此编码");
153
-                }
154
-                else
155
-                {
156
-                    dModel.F_Sort = sort;
157
-                    dModel.F_RoleCode = code;
158
-                    dModel.F_RoleName = name;
159
-                    dModel.F_Sort = sort;
160
-                    dModel.F_State = 1;
161
-
162
-                    if (roleBLL.Update(dModel))
163
-                    {
164
-                        return Success("修改成功");
165
-                    }
166
-                    else
167
-                        return Error("修改失败");
168
-                }
169
-            }
170
-            else
171
-            {
172
-                return Error("修改失败");
173
-            }
174
-        }
175
-
176
-        /// <summary>
177
-        /// 删除
178
-        /// </summary>
179
-        /// <param name="ids"></param>
180
-        /// <returns></returns>
181
-        [HttpPost]
182
-        public ActionResult Delete(string[] ids)
183
-        {
184
-            if (ids != null && ids.Count() > 0)
185
-            {
186
-                bool bl = true;
187
-                var idStr = string.Join(",", ids);
188
-                var list1 = new Bll.T_Sys_UserAccount().GetList("F_RoleId in (" + idStr + ")").Tables[0];
189
-                if (list1.Rows.Count == 0)
190
-                {
191
-                    bl = false;
192
-                }
193
-                if (bl)
194
-                {
195
-                    return Error("正在被使用,不能删除");
196
-                }
197
-
198
-                if (roleBLL.DeleteList(idStr))
199
-                {
200
-                    return Success("删除成功");
201
-                }
202
-                else
203
-                {
204
-                    return Error("删除失败");
205
-                }
206
-            }
207
-            else
208
-            {
209
-                return Error("删除失败");
210
-            }
211
-        }
212
-
213
-        /// <summary>
214
-        /// 获取权限
215
-        /// </summary>
216
-        /// <param name="roleid"></param>
217
-        /// <returns></returns>
218
-        public ActionResult GetRoleFunction(int roleid)
219
-        {
220
-            var moduleFList = new Bll.T_Sys_Menu().GetModelList(" F_State=1 ");
221
-            var list = DB.DbHelperSQL.Query("select F_MenuId from T_Sys_RoleMenu with(nolock) where F_RoleId=" + roleid).Tables[0];
222
-
223
-            return Success("加载成功", moduleFList.Select(x => new
224
-            {
225
-                id = x.F_MenuId,
226
-                pid = x.F_ParentId,
227
-                name = x.F_MenuName,
228
-                sort = x.F_Sort,
229
-                ischecked = list.Select("F_MenuId=" + x.F_MenuId).Count() > 0 ? true : false
230
-            }).OrderBy(p => p.sort));
231
-        }
232
-
233
-        /// <summary>
234
-        /// 保存权限
235
-        /// </summary>
236
-        /// <param name="roleid">角色id</param>
237
-        /// <param name="menuids">菜单id集合</param>
238
-        /// <returns></returns>
239
-        public ActionResult SaveRoleFunction(int roleid, string[] menuids)
240
-        {
241
-            DataTable dt = new DataTable();
242
-
243
-            if (menuids == null || roleid == 0)
244
-                return Error("参数错误");
245
-
246
-            var idStr = string.Join(",", menuids);
247
-
248
-            var role = roleBLL.GetModel(roleid);
249
-            if (role != null)
250
-            {
251
-                List<string> sqls = new List<string>();
252
-                string sql = " delete T_Sys_RoleMenu where F_RoleId=" + roleid + ";";
253
-                sqls.Add(sql);
254
-                foreach (string mid in menuids)
255
-                {
256
-                    string sql1 = " insert into T_Sys_RoleMenu(F_RoleId,F_MenuId) values(" + roleid + "," + mid + ");";
257
-                    sqls.Add(sql1);
258
-                }
259
-                int n = DB.DbHelperSQL.ExecuteSqlTransaction(sqls);
260
-                if (n > 0)
261
-                {
262
-                    CacheHelper.Remove("RoleMenus_" + roleid);
263
-                    CacheHelper.Remove("RoleActions_" + roleid);
264
-                    return Success("保存成功");
265
-                }
266
-                else
267
-                {
268
-                    return Error("保存失败");
269
-                }
270
-            }
271
-            else
272
-            {
273
-                return Error("参数错误");
274
-            }
275
-        }
276
-    }
277
-}

+ 0 - 84
RMYY_CallCenter_Api/Controllers/System/UserAccountController.cs

@@ -1,84 +0,0 @@
1
-using RMYY_CallCenter_Api.Utility;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Data;
5
-using System.Linq;
6
-using System.Web;
7
-using System.Web.Mvc;
8
-
9
-namespace RMYY_CallCenter_Api.Controllers.System
10
-{
11
-    public class UserAccountController : BaseController
12
-    {
13
-        // GET: UserAccount
14
-
15
-        /// <summary>
16
-        /// 获取分页列表
17
-        /// </summary>
18
-        /// <returns></returns>
19
-        [HttpPost]
20
-        public ActionResult GetList(string key, int roleid = 0, int deptid = 0, int page = 1, int pagesize = 10)
21
-        {
22
-            DataTable dt = new DataTable();
23
-            string sql = string.Empty;
24
-
25
-            if (deptid > 0)
26
-            {
27
-                sql += " and F_DeptId='" + deptid + "'";
28
-            }
29
-            if (roleid > 0)
30
-            {
31
-                sql += " and F_RoleId='" + roleid + "'";
32
-            }
33
-
34
-            if (!string.IsNullOrWhiteSpace(key))
35
-            {
36
-                sql += " and (F_UserCode like '%{0}%' or F_UserName like '%{1}%')";
37
-            }
38
-
39
-            int recordCount = 0;
40
-            dt = Bll.PagerBll.GetListPager(
41
-                                    "T_Sys_UserAccount with(nolock)",
42
-                                    "F_UserId",
43
-                                    "*",
44
-                                    sql,
45
-                                    "ORDER BY F_UserId desc",
46
-                                    pagesize,
47
-                                    page,
48
-                                    true,
49
-                                    out recordCount);
50
-            var obj = new
51
-            {
52
-                rows = dt,
53
-                total = recordCount
54
-            };
55
-
56
-            return Content(obj.ToJson());
57
-        }
58
-
59
-        /// <summary>
60
-        /// 获取用户信息
61
-        /// </summary>
62
-        /// <param name="userId"></param>
63
-        /// <param name="userCode"></param>
64
-        /// <returns></returns>
65
-        public ActionResult GetModel(int userid = 0, string usercode = "")
66
-        {
67
-            string sql = " 1=1 ";
68
-            if (userid > 0)
69
-            {
70
-                sql += " and F_UserId=" + userid;
71
-            }
72
-            if (!string.IsNullOrWhiteSpace(usercode))
73
-            {
74
-                sql += " and F_UserCode='" + usercode + "'";
75
-            }
76
-            if (string.IsNullOrWhiteSpace(sql))
77
-                return Error("获取失败");
78
-
79
-            Model.T_Sys_UserAccount User = new Bll.T_Sys_UserAccount().GetModelList(sql).FirstOrDefault();
80
-
81
-            return Success("获取成功", User);
82
-        }
83
-    }
84
-}

+ 0 - 87
RMYY_CallCenter_Api/Filter/AuthorizeFilter.cs

@@ -1,87 +0,0 @@
1
-using RMYY_CallCenter_Api.Models;
2
-using RMYY_CallCenter_Api.Utility;
3
-using System;
4
-using System.Collections.Generic;
5
-using System.Linq;
6
-using System.Web;
7
-using System.Web.Mvc;
8
-using System.Web.Security;
9
-
10
-namespace RMYY_CallCenter_Api.Filter
11
-{
12
-    public class AuthorizeFilter : AuthorizeAttribute
13
-    {
14
-        /// <summary>
15
-        /// 权限验证
16
-        /// </summary>
17
-        /// <param name="filterContext"></param>
18
-        public override void OnAuthorization(AuthorizationContext filterContext)
19
-        {
20
-            var ad = filterContext.ActionDescriptor;
21
-            if (ad.IsDefined(typeof(AllowAnonymousAttribute), true)
22
-                || ad.ControllerDescriptor.IsDefined(typeof(AllowAnonymousAttribute), true))
23
-            {
24
-                return;
25
-            }
26
-
27
-            var context = filterContext.RequestContext.HttpContext;
28
-            var token = context.Request["token"];
29
-            if (!string.IsNullOrEmpty(token))
30
-            {
31
-                try
32
-                {
33
-                    bool isAuth = false;
34
-                    //获取FormsAuthenticationTicket对象
35
-                    FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(token);
36
-                    if (ticket != null && !ticket.Expired && !string.IsNullOrEmpty(ticket.UserData))
37
-                    {
38
-                        Dictionary<string, string> userData = ticket.UserData.ToObject<Dictionary<string, string>>();
39
-                        if (userData != null)
40
-                        {
41
-                            var user = new Bll.T_Sys_UserAccount().GetModel(userData["F_UserCode"]);
42
-                            if (user != null && user.F_RoleId.ToString() == userData["F_RoleId"])
43
-                            {
44
-                                string action = ad.ControllerDescriptor.ControllerName + "/" + ad.ActionName;
45
-                                if ((Common.GetAuthActions().Contains(action.ToLower()) && Common.GetRoleActions(user.F_RoleId).Contains(action.ToLower()))|| user.F_UserCode == "8000")
46
-                                {
47
-                                    isAuth = true;
48
-                                    context.User = new FormsPrincipal<Model.T_Sys_UserAccount>(ticket, user);//重新给context.User赋值。
49
-                                }
50
-                                else
51
-                                {
52
-                                    context.Response.StatusCode = 200;
53
-                                    filterContext.Result = new ContentResult { Content = new AjaxResult { state = ResultTypes.error.ToString(), message = "无权限" }.ToJson() };
54
-                                    return;
55
-                                }
56
-                            }
57
-                        }
58
-                    }
59
-                    if (!isAuth)
60
-                    {
61
-                        context.Response.StatusCode = 200;
62
-                        filterContext.Result = new ContentResult { Content = new AjaxResult { state = ResultTypes.notoken.ToString(), message = "token无效或过期,请重新登录。" }.ToJson() };
63
-                        return;
64
-                    }
65
-                }
66
-                catch (Exception ex)
67
-                {
68
-                    LogHelper.Error("验证失败", ex);
69
-                    context.Response.StatusCode = 200;
70
-                    filterContext.Result = new ContentResult { Content = new AjaxResult { state = ResultTypes.notoken.ToString(), message = "token无效或过期,请重新登录。" }.ToJson() };
71
-                    return;
72
-                }
73
-            }
74
-            else
75
-            {
76
-                context.Response.StatusCode = 200;
77
-                filterContext.Result = new ContentResult { Content = new AjaxResult { state = ResultTypes.notoken.ToString(), message = "未传入token,请重新登录。" }.ToJson() };
78
-                return;
79
-            }
80
-
81
-            if (filterContext != null)
82
-            {
83
-                base.OnAuthorization(filterContext);
84
-            }
85
-        }
86
-    }
87
-}

+ 0 - 35
RMYY_CallCenter_Api/Filter/ExceptionFilter.cs

@@ -1,35 +0,0 @@
1
-using RMYY_CallCenter_Api.Utility;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-using System.Web.Mvc;
7
-
8
-namespace RMYY_CallCenter_Api.Filter
9
-{
10
-    public class ExceptionFilter : HandleErrorAttribute
11
-    {
12
-        public override void OnException(ExceptionContext context)
13
-        {
14
-            base.OnException(context);
15
-
16
-            var rt = context.RequestContext.HttpContext.Request;
17
-            Dictionary<string, string> Params = new Dictionary<string, string>();
18
-            Params.Add("request_url", rt.Url.ToString());
19
-
20
-            foreach (var key in rt.Params.AllKeys)
21
-            {
22
-                if (key == "ALL_HTTP")
23
-                {
24
-                    break;
25
-                }
26
-                Params.Add(key, rt.Params[key]);
27
-            }
28
-
29
-            LogHelper.Error("系统异常,参数:" + Params.ToJson(), context.Exception);
30
-            context.ExceptionHandled = true;
31
-            context.HttpContext.Response.StatusCode = 200;
32
-            context.Result = new ContentResult { Content = new AjaxResult { state = ResultTypes.error.ToString(), message = context.Exception.ToString() }.ToJson() };
33
-        }
34
-    }
35
-}

+ 0 - 1
RMYY_CallCenter_Api/Global.asax

@@ -1 +0,0 @@
1
-<%@ Application Codebehind="Global.asax.cs" Inherits="RMYY_CallCenter_Api.MvcApplication" Language="C#" %>

+ 0 - 45
RMYY_CallCenter_Api/Global.asax.cs

@@ -1,45 +0,0 @@
1
-using RMYY_CallCenter_Api.Utility;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-using System.Web.Mvc;
7
-using System.Web.Optimization;
8
-using System.Web.Routing;
9
-
10
-namespace RMYY_CallCenter_Api
11
-{
12
-    public class MvcApplication : System.Web.HttpApplication
13
-    {
14
-        protected void Application_Start()
15
-        {
16
-            AreaRegistration.RegisterAllAreas();
17
-            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
18
-            RouteConfig.RegisterRoutes(RouteTable.Routes);
19
-        }
20
-
21
-        protected void Application_AuthenticateRequest(object sender, EventArgs e)
22
-        {
23
-            HttpApplication app = (HttpApplication)sender;
24
-            var context = app.Context;
25
-            if (context == null) throw new ArgumentNullException("context");
26
-
27
-            Dictionary<string, string> Params = new Dictionary<string, string>();
28
-            Params.Add("request_url", context.Request.Url.ToString());
29
-
30
-            foreach (var key in context.Request.Params.AllKeys)
31
-            {
32
-                if (key == "ALL_HTTP")
33
-                {
34
-                    break;
35
-                }
36
-                Params.Add(key, context.Request.Params[key]);
37
-            }
38
-
39
-            if (ConfigHelper.GetValue("IsLog").ToString() == "1")
40
-            {
41
-                LogHelper.Debug(Params.ToJson());
42
-            }
43
-        }
44
-    }
45
-}

+ 0 - 21
RMYY_CallCenter_Api/Models/Filter/FilterCallPlan.cs

@@ -1,21 +0,0 @@
1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterCallPlan : ListBase
10
-    {
11
-        /// <summary>
12
-        /// 任务类型, 1=点击外呼; 2=自动外呼; 默认为2
13
-        /// </summary>
14
-        public int TaskType { get; set; } = 2;
15
-        /// <summary>
16
-        /// 任务名称
17
-        /// </summary>
18
-        public string Name { get; set; }
19
-
20
-    }
21
-}

+ 0 - 13
RMYY_CallCenter_Api/Models/Filter/FilterCategory.cs

@@ -1,13 +0,0 @@
1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterCategory : ListBase
10
-    {
11
-        public string Name { get; set; }
12
-    }
13
-}

+ 0 - 16
RMYY_CallCenter_Api/Models/Filter/FilterDictionary.cs

@@ -1,16 +0,0 @@
1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models
8
-{
9
-    public class FilterDictionary : ListBase
10
-    {
11
-        public string Id { get; set; } = "";
12
-        public string Name { get; set; } = "";
13
-        public string Flag { get; set; } = "";
14
-
15
-    }
16
-}

+ 0 - 14
RMYY_CallCenter_Api/Models/Filter/FilterExpress.cs

@@ -1,14 +0,0 @@
1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterExpress : ListBase
10
-    {
11
-        public string Name { get; set; }
12
-
13
-    }
14
-}

+ 0 - 15
RMYY_CallCenter_Api/Models/Filter/FilterLog.cs

@@ -1,15 +0,0 @@
1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterLog : ListBase
10
-    {
11
-        public string Name { get; set; }
12
-        public string LoginDate { get; set; }
13
-
14
-    }
15
-}

+ 0 - 13
RMYY_CallCenter_Api/Models/Filter/FilterModuleFunction.cs

@@ -1,13 +0,0 @@
1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterModuleFunction : ListBase
10
-    {
11
-        public int ModuleFunctionId { get; set; } = 0;
12
-    }
13
-}

+ 0 - 14
RMYY_CallCenter_Api/Models/Filter/FilterOrder.cs

@@ -1,14 +0,0 @@
1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterOrder : ListBase
10
-    {
11
-        
12
-
13
-    }
14
-}

+ 0 - 16
RMYY_CallCenter_Api/Models/Filter/FilterPagerInfo.cs

@@ -1,16 +0,0 @@
1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterPagerInfo : ListBase
10
-    {
11
-        /// <summary>
12
-        /// 关键字
13
-        /// </summary>
14
-        public string Key { get; set; }
15
-    }
16
-}

+ 0 - 14
RMYY_CallCenter_Api/Models/Filter/FilterProduct.cs

@@ -1,14 +0,0 @@
1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterProduct : ListBase
10
-    {
11
-        public string Name { get; set; }
12
-
13
-    }
14
-}

+ 0 - 17
RMYY_CallCenter_Api/Models/Filter/FilterQuestion.cs

@@ -1,17 +0,0 @@
1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterQuestion : ListBase
10
-    {
11
-        public int CategoryId { get; set; }
12
-        public int SelectType { get; set; }
13
-        public int PagerId { get; set; }
14
-        public string Key { get; set; }
15
-
16
-    }
17
-}

+ 0 - 15
RMYY_CallCenter_Api/Models/Filter/FilterSysConfig.cs

@@ -1,15 +0,0 @@
1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterSysConfig : ListBase
10
-    {
11
-        public string Value { get; set; } = "";
12
-        public string Code { get; set; } = "";
13
-
14
-    }
15
-}

+ 0 - 48
RMYY_CallCenter_Api/Models/Filter/FilterTalkRecord.cs

@@ -1,48 +0,0 @@
1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterTalkRecord : ListBase
10
-    {
11
-        /// <summary>
12
-        /// 通话号码
13
-        /// </summary>
14
-        public string Phone { get; set; }
15
-        /// <summary>
16
-        /// 通话类型   
17
-        /// 1=未转坐席;
18
-        /// 2=转坐席未接通;
19
-        /// 3=转坐席接通;
20
-        /// </summary>
21
-        public int CallType { get; set; } = 0;
22
-        /// <summary>
23
-        /// 坐席工号
24
-        /// </summary>
25
-        public string UserCode { get; set; }
26
-        /// <summary>
27
-        /// 页容量
28
-        /// </summary>
29
-        public new int PageSize { get; set; } = 100;
30
-        /// <summary>
31
-        /// 排序  排序字段,升降序
32
-        /// </summary>
33
-        public string SortField { get; set; }
34
-        /// <summary>
35
-        /// 开始时间
36
-        /// </summary>
37
-        public DateTime? StartTime { get; set; }
38
-        /// <summary>
39
-        /// 结束时间
40
-        /// </summary>
41
-        public DateTime? EndTime { get; set; }
42
-        /// <summary>
43
-        /// 通话时长
44
-        /// </summary>
45
-        public string TalkTime { get; set; }
46
-
47
-    }
48
-}

+ 0 - 18
RMYY_CallCenter_Api/Models/Filter/FilterUserAccount.cs

@@ -1,18 +0,0 @@
1
-using CallCenterApi.Interface.Models.Common;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Web;
6
-
7
-namespace CallCenterApi.Interface.Models.Filter
8
-{
9
-    public class FilterUserAccount : ListBase
10
-    {
11
-        public FilterUserAccount()
12
-        {
13
-            PageSize = 10;
14
-        }
15
-        public int dptid { get; set; } = 0;
16
-        public string Key { get; set; } = "";
17
-    }
18
-}

+ 0 - 77
RMYY_CallCenter_Api/Models/FormsPrincipal.cs

@@ -1,77 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Security.Principal;
5
-using System.Web;
6
-using System.Web.Script.Serialization;
7
-using System.Web.Security;
8
-
9
-namespace RMYY_CallCenter_Api.Models
10
-{
11
-    public class FormsPrincipal<TUserData> : IPrincipal
12
-       where TUserData : class, new()
13
-    {
14
-        private IIdentity _identity;
15
-        private TUserData _userData;
16
-
17
-        public FormsPrincipal(FormsAuthenticationTicket ticket, TUserData userData)
18
-        {
19
-            if (ticket == null)
20
-                throw new ArgumentNullException("ticket");
21
-            if (userData == null)
22
-                throw new ArgumentNullException("userData");
23
-
24
-            _identity = new FormsIdentity(ticket);
25
-            _userData = userData;
26
-        }
27
-
28
-        public TUserData UserData
29
-        {
30
-            get { return _userData; }
31
-        }
32
-
33
-        public IIdentity Identity
34
-        {
35
-            get { return _identity; }
36
-        }
37
-
38
-        public bool IsInRole(string role)
39
-        {
40
-            // 把判断用户组的操作留给UserData去实现。
41
-
42
-            IPrincipal principal = _userData as IPrincipal;
43
-            if (principal == null)
44
-                throw new NotImplementedException();
45
-            else
46
-                return principal.IsInRole(role);
47
-        }
48
-
49
-        /// <summary>
50
-        /// 执行用户登录操作
51
-        /// </summary>
52
-        /// <param name="loginName">登录名</param>
53
-        /// <param name="userData">与登录名相关的用户信息</param>
54
-        /// <param name="expiration">登录Cookie的过期时间,单位:分钟。</param>
55
-        public static string GetCookieValue(string loginName, TUserData userData)
56
-        {
57
-            if (string.IsNullOrEmpty(loginName))
58
-                throw new ArgumentNullException("loginName");
59
-            if (userData == null)
60
-                throw new ArgumentNullException("userData");
61
-
62
-            // 1. 把需要保存的用户数据转成一个字符串。
63
-            string data = null;
64
-            if (userData != null)
65
-                data = (new JavaScriptSerializer()).Serialize(userData);
66
-
67
-
68
-            // 2. 创建一个FormsAuthenticationTicket,它包含登录名以及额外的用户数据。
69
-            FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(
70
-                2, loginName, DateTime.Now, DateTime.Now.AddDays(8), true, data);
71
-
72
-
73
-            // 3. 加密Ticket,变成一个加密的字符串。
74
-            return FormsAuthentication.Encrypt(ticket);
75
-        }
76
-    }
77
-}

+ 0 - 27
RMYY_CallCenter_Api/Models/Input/DictionaryInput.cs

@@ -1,27 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Web;
5
-
6
-namespace RMYY_CallCenter_Api.Models
7
-{
8
-    public class DictionaryBaseInput
9
-    {
10
-        public string DicFlag { get; set; }
11
-        public string Name { get; set; }
12
-        public int Sort { get; set; } = 0;
13
-        public string Remark { get; set; }
14
-
15
-    }
16
-
17
-    public class DictionaryValueInput
18
-    {
19
-        public int DicVid { get; set; }
20
-        public string DicFlag { get; set; }
21
-        public string DicvName { get; set; }
22
-        public int Sort { get; set; } = 0;
23
-        public string DicDes { get; set; }
24
-
25
-
26
-    }
27
-}

+ 0 - 35
RMYY_CallCenter_Api/Properties/AssemblyInfo.cs

@@ -1,35 +0,0 @@
1
-using System.Reflection;
2
-using System.Runtime.CompilerServices;
3
-using System.Runtime.InteropServices;
4
-
5
-// 有关程序集的常规信息是通过以下项进行控制的
6
-// 控制。更改这些特性值可修改
7
-// 与程序集关联的信息。
8
-[assembly: AssemblyTitle("RMYY_CallCenter_Api")]
9
-[assembly: AssemblyDescription("")]
10
-[assembly: AssemblyConfiguration("")]
11
-[assembly: AssemblyCompany("")]
12
-[assembly: AssemblyProduct("RMYY_CallCenter_Api")]
13
-[assembly: AssemblyCopyright("版权所有(C)  2021")]
14
-[assembly: AssemblyTrademark("")]
15
-[assembly: AssemblyCulture("")]
16
-
17
-// 将 ComVisible 设置为 false 将使此程序集中的类型
18
-// 对 COM 组件不可见。如果需要
19
-// 从 COM 访问此程序集中的某个类型,请针对该类型将 ComVisible 特性设置为 true。
20
-[assembly: ComVisible(false)]
21
-
22
-// 如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
23
-[assembly: Guid("82335da9-71d1-417c-a963-19efec72da15")]
24
-
25
-// 程序集的版本信息由下列四个值组成:
26
-//
27
-//      主版本
28
-//      次版本
29
-//      内部版本号
30
-//      修订版本
31
-//
32
-// 你可以指定所有值,也可以让修订版本和内部版本号采用默认值,
33
-// 方法是按如下所示使用 "*":
34
-[assembly: AssemblyVersion("1.0.0.0")]
35
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0 - 237
RMYY_CallCenter_Api/RMYY_CallCenter_Api.csproj

@@ -1,237 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
-  <Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
4
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
5
-  <PropertyGroup>
6
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8
-    <ProductVersion>
9
-    </ProductVersion>
10
-    <SchemaVersion>2.0</SchemaVersion>
11
-    <ProjectGuid>{6AAD6561-5D5C-4C81-8BEA-9A9523179E48}</ProjectGuid>
12
-    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
13
-    <OutputType>Library</OutputType>
14
-    <AppDesignerFolder>Properties</AppDesignerFolder>
15
-    <RootNamespace>RMYY_CallCenter_Api</RootNamespace>
16
-    <AssemblyName>RMYY_CallCenter_Api</AssemblyName>
17
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
18
-    <MvcBuildViews>false</MvcBuildViews>
19
-    <UseIISExpress>true</UseIISExpress>
20
-    <Use64BitIISExpress />
21
-    <IISExpressSSLPort />
22
-    <IISExpressAnonymousAuthentication />
23
-    <IISExpressWindowsAuthentication />
24
-    <IISExpressUseClassicPipelineMode />
25
-    <UseGlobalApplicationHostFile />
26
-    <NuGetPackageImportStamp>
27
-    </NuGetPackageImportStamp>
28
-  </PropertyGroup>
29
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
30
-    <DebugSymbols>true</DebugSymbols>
31
-    <DebugType>full</DebugType>
32
-    <Optimize>false</Optimize>
33
-    <OutputPath>bin\</OutputPath>
34
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
35
-    <ErrorReport>prompt</ErrorReport>
36
-    <WarningLevel>4</WarningLevel>
37
-  </PropertyGroup>
38
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
39
-    <DebugSymbols>true</DebugSymbols>
40
-    <DebugType>pdbonly</DebugType>
41
-    <Optimize>true</Optimize>
42
-    <OutputPath>bin\</OutputPath>
43
-    <DefineConstants>TRACE</DefineConstants>
44
-    <ErrorReport>prompt</ErrorReport>
45
-    <WarningLevel>4</WarningLevel>
46
-  </PropertyGroup>
47
-  <ItemGroup>
48
-    <Reference Include="Microsoft.CSharp" />
49
-    <Reference Include="System" />
50
-    <Reference Include="System.Data" />
51
-    <Reference Include="System.Drawing" />
52
-    <Reference Include="System.Web.DynamicData" />
53
-    <Reference Include="System.Web.Entity" />
54
-    <Reference Include="System.Web.ApplicationServices" />
55
-    <Reference Include="System.ComponentModel.DataAnnotations" />
56
-    <Reference Include="System.Core" />
57
-    <Reference Include="System.Data.DataSetExtensions" />
58
-    <Reference Include="System.Xml.Linq" />
59
-    <Reference Include="System.Web" />
60
-    <Reference Include="System.Web.Extensions" />
61
-    <Reference Include="System.Web.Abstractions" />
62
-    <Reference Include="System.Web.Routing" />
63
-    <Reference Include="System.Xml" />
64
-    <Reference Include="System.Configuration" />
65
-    <Reference Include="System.Web.Services" />
66
-    <Reference Include="System.EnterpriseServices" />
67
-    <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
68
-      <Private>True</Private>
69
-      <HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
70
-    </Reference>
71
-    <Reference Include="System.Net.Http">
72
-    </Reference>
73
-    <Reference Include="System.Net.Http.WebRequest">
74
-    </Reference>
75
-    <Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
76
-      <Private>True</Private>
77
-      <HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.4\lib\net45\System.Web.Helpers.dll</HintPath>
78
-    </Reference>
79
-    <Reference Include="System.Web.Mvc, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
80
-      <Private>True</Private>
81
-      <HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.4\lib\net45\System.Web.Mvc.dll</HintPath>
82
-    </Reference>
83
-    <Reference Include="System.Web.Optimization">
84
-      <HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
85
-    </Reference>
86
-    <Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
87
-      <Private>True</Private>
88
-      <HintPath>..\packages\Microsoft.AspNet.Razor.3.2.4\lib\net45\System.Web.Razor.dll</HintPath>
89
-    </Reference>
90
-    <Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
91
-      <Private>True</Private>
92
-      <HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.4\lib\net45\System.Web.WebPages.dll</HintPath>
93
-    </Reference>
94
-    <Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
95
-      <Private>True</Private>
96
-      <HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.4\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
97
-    </Reference>
98
-    <Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
99
-      <Private>True</Private>
100
-      <HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.4\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
101
-    </Reference>
102
-    <Reference Include="Newtonsoft.Json">
103
-      <HintPath>..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
104
-    </Reference>
105
-    <Reference Include="WebGrease">
106
-      <Private>True</Private>
107
-      <HintPath>..\packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
108
-    </Reference>
109
-    <Reference Include="Antlr3.Runtime">
110
-      <Private>True</Private>
111
-      <HintPath>..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
112
-    </Reference>
113
-  </ItemGroup>
114
-  <ItemGroup>
115
-    <Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform">
116
-      <HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
117
-    </Reference>
118
-  </ItemGroup>
119
-  <ItemGroup>
120
-    <Compile Include="App_Start\FilterConfig.cs" />
121
-    <Compile Include="App_Start\RouteConfig.cs" />
122
-    <Compile Include="Common\Common.cs" />
123
-    <Compile Include="Common\ListBase.cs" />
124
-    <Compile Include="Controllers\BaseController.cs" />
125
-    <Compile Include="Controllers\CallTel\CallblackController.cs" />
126
-    <Compile Include="Controllers\CallTel\CallInScreenController.cs" />
127
-    <Compile Include="Controllers\CallTel\CallleaveController.cs" />
128
-    <Compile Include="Controllers\CallTel\CallrecordsController.cs" />
129
-    <Compile Include="Controllers\CallTel\MobiledataController.cs" />
130
-    <Compile Include="Controllers\CallTel\WorkOffDaysController.cs" />
131
-    <Compile Include="Controllers\DictionaryController.cs" />
132
-    <Compile Include="Controllers\GongDanTypeController.cs" />
133
-    <Compile Include="Controllers\HomeController.cs" />
134
-    <Compile Include="Controllers\IndexController.cs" />
135
-    <Compile Include="Controllers\System\DepartmentController.cs" />
136
-    <Compile Include="Controllers\System\MenuController.cs" />
137
-    <Compile Include="Controllers\System\RoleController.cs" />
138
-    <Compile Include="Controllers\System\UserAccountController.cs" />
139
-    <Compile Include="Filter\AuthorizeFilter.cs" />
140
-    <Compile Include="Filter\ExceptionFilter.cs" />
141
-    <Compile Include="Global.asax.cs">
142
-      <DependentUpon>Global.asax</DependentUpon>
143
-    </Compile>
144
-    <Compile Include="Models\Filter\FilterCallPlan.cs" />
145
-    <Compile Include="Models\Filter\FilterCategory.cs" />
146
-    <Compile Include="Models\Filter\FilterDictionary.cs" />
147
-    <Compile Include="Models\Filter\FilterExpress.cs" />
148
-    <Compile Include="Models\Filter\FilterLog.cs" />
149
-    <Compile Include="Models\Filter\FilterModuleFunction.cs" />
150
-    <Compile Include="Models\Filter\FilterOrder.cs" />
151
-    <Compile Include="Models\Filter\FilterPagerInfo.cs" />
152
-    <Compile Include="Models\Filter\FilterProduct.cs" />
153
-    <Compile Include="Models\Filter\FilterQuestion.cs" />
154
-    <Compile Include="Models\Filter\FilterSysConfig.cs" />
155
-    <Compile Include="Models\Filter\FilterTalkRecord.cs" />
156
-    <Compile Include="Models\Filter\FilterUserAccount.cs" />
157
-    <Compile Include="Models\FormsPrincipal.cs" />
158
-    <Compile Include="Models\Input\DictionaryInput.cs" />
159
-    <Compile Include="Properties\AssemblyInfo.cs" />
160
-  </ItemGroup>
161
-  <ItemGroup>
162
-    <Content Include="Global.asax" />
163
-    <Content Include="Web.config" />
164
-    <Content Include="Web.Debug.config">
165
-      <DependentUpon>Web.config</DependentUpon>
166
-    </Content>
167
-    <Content Include="Web.Release.config">
168
-      <DependentUpon>Web.config</DependentUpon>
169
-    </Content>
170
-  </ItemGroup>
171
-  <ItemGroup>
172
-    <Folder Include="App_Data\" />
173
-  </ItemGroup>
174
-  <ItemGroup>
175
-    <Content Include="Configs\log4net.config" />
176
-    <Content Include="Configs\system.config" />
177
-    <None Include="packages.config" />
178
-  </ItemGroup>
179
-  <ItemGroup>
180
-    <ProjectReference Include="..\RMYY_CallCenter_Api.Bll\RMYY_CallCenter_Api.Bll.csproj">
181
-      <Project>{7cc643a2-983d-4bdf-a9b1-6d169a026b76}</Project>
182
-      <Name>RMYY_CallCenter_Api.Bll</Name>
183
-    </ProjectReference>
184
-    <ProjectReference Include="..\RMYY_CallCenter_Api.DB\RMYY_CallCenter_Api.DB.csproj">
185
-      <Project>{F5E242C5-4F08-45CB-BFE7-E3B304FCCE1F}</Project>
186
-      <Name>RMYY_CallCenter_Api.DB</Name>
187
-    </ProjectReference>
188
-    <ProjectReference Include="..\RMYY_CallCenter_Api.Model\RMYY_CallCenter_Api.Model.csproj">
189
-      <Project>{7eaa6abf-89f4-4ee0-b8d8-db953eff3e4c}</Project>
190
-      <Name>RMYY_CallCenter_Api.Model</Name>
191
-    </ProjectReference>
192
-    <ProjectReference Include="..\RMYY_CallCenter_Api.Utility\RMYY_CallCenter_Api.Utility.csproj">
193
-      <Project>{4E6A4FE2-C305-48E6-A1BF-B939B9252E24}</Project>
194
-      <Name>RMYY_CallCenter_Api.Utility</Name>
195
-    </ProjectReference>
196
-  </ItemGroup>
197
-  <PropertyGroup>
198
-    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
199
-    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
200
-  </PropertyGroup>
201
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
202
-  <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
203
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
204
-  <Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
205
-    <AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
206
-  </Target>
207
-  <ProjectExtensions>
208
-    <VisualStudio>
209
-      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
210
-        <WebProjectProperties>
211
-          <UseIIS>True</UseIIS>
212
-          <AutoAssignPort>True</AutoAssignPort>
213
-          <DevelopmentServerPort>50973</DevelopmentServerPort>
214
-          <DevelopmentServerVPath>/</DevelopmentServerVPath>
215
-          <IISUrl>http://localhost:50973/</IISUrl>
216
-          <NTLMAuthentication>False</NTLMAuthentication>
217
-          <UseCustomServer>False</UseCustomServer>
218
-          <CustomServerUrl>
219
-          </CustomServerUrl>
220
-          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
221
-        </WebProjectProperties>
222
-      </FlavorProperties>
223
-    </VisualStudio>
224
-  </ProjectExtensions>
225
-  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
226
-    <PropertyGroup>
227
-      <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
228
-    </PropertyGroup>
229
-    <Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
230
-  </Target>
231
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
232
-       Other similar extension points exist, see Microsoft.Common.targets.
233
-  <Target Name="BeforeBuild">
234
-  </Target>
235
-  <Target Name="AfterBuild">
236
-  </Target> -->
237
-</Project>

+ 0 - 30
RMYY_CallCenter_Api/Web.Debug.config

@@ -1,30 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-
3
-<!-- 有关使用 Web.config 转换的详细信息,请访问 https://go.microsoft.com/fwlink/?LinkId=301874 -->
4
-
5
-<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6
-  <!--
7
-    在下例中,“SetAttributes”转换将更改
8
-    “connectionString”的值,仅在“Match”定位器找到值为“MyDB”的
9
-    特性“name”时使用“ReleaseSQLServer”。
10
-
11
-    <connectionStrings>
12
-      <add name="MyDB"
13
-        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14
-        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15
-    </connectionStrings>
16
-  -->
17
-  <system.web>
18
-    <!--
19
-      在以下示例中,"Replace" 转换将替换 Web.config 文件的
20
-      整个 <customErrors> 节。
21
-      请注意,由于在 <system.web> 节点下只有一个
22
-       customErrors 节,因此无需使用 "xdt:Locator" 属性。
23
-
24
-      <customErrors defaultRedirect="GenericError.htm"
25
-        mode="RemoteOnly" xdt:Transform="Replace">
26
-        <error statusCode="500" redirect="InternalError.htm"/>
27
-      </customErrors>
28
-    -->
29
-  </system.web>
30
-</configuration>

+ 0 - 31
RMYY_CallCenter_Api/Web.Release.config

@@ -1,31 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-
3
-<!-- 有关使用 Web.config 转换的详细信息,请访问 https://go.microsoft.com/fwlink/?LinkId=301874 -->
4
-
5
-<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6
-  <!--
7
-    在下例中,“SetAttributes”转换将更改
8
-    “connectionString”的值,仅在“Match”定位器找到值为“MyDB”的
9
-    特性“name”时使用“ReleaseSQLServer”。
10
-
11
-    <connectionStrings>
12
-      <add name="MyDB"
13
-        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14
-        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15
-    </connectionStrings>
16
-  -->
17
-  <system.web>
18
-    <compilation xdt:Transform="RemoveAttributes(debug)" />
19
-    <!--
20
-      在以下示例中,"Replace" 转换将替换 Web.config 文件的
21
-      整个 <customErrors> 节。
22
-      请注意,由于在 <system.web> 节点下只有一个
23
-       customErrors 节,因此无需使用 "xdt:Locator" 属性。
24
-
25
-      <customErrors defaultRedirect="GenericError.htm"
26
-        mode="RemoteOnly" xdt:Transform="Replace">
27
-        <error statusCode="500" redirect="InternalError.htm"/>
28
-      </customErrors>
29
-    -->
30
-  </system.web>
31
-</configuration>

+ 0 - 73
RMYY_CallCenter_Api/Web.config

@@ -1,73 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<!--
3
-  有关如何配置 ASP.NET 应用程序的详细信息,请访问
4
-  https://go.microsoft.com/fwlink/?LinkId=301880
5
-  -->
6
-<configuration>
7
-  <appSettings>
8
-    <add key="webpages:Version" value="3.0.0.0" />
9
-    <add key="webpages:Enabled" value="false" />
10
-    <add key="ClientValidationEnabled" value="true" />
11
-    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
12
-  </appSettings>
13
-  <connectionStrings>
14
-    <add name="ConnectionString" connectionString="Data Source=192.168.1.37;User ID=sa;pwd=hykj@800100;Initial Catalog=RMYY_CallCenter;" />
15
-  </connectionStrings>
16
-  <system.web>
17
-    <compilation debug="true" targetFramework="4.5" />
18
-    <httpRuntime targetFramework="4.5" />
19
-  </system.web>
20
-  <system.webServer>
21
-    <staticContent>
22
-      <mimeMap fileExtension=".apk" mimeType="application/vnd.android.package-archive" />
23
-    </staticContent>
24
-    <!--cors 支持跨域 clq新增 strat-->
25
-    <httpProtocol>
26
-      <customHeaders>
27
-        <add name="Access-Control-Allow-Origin" value="*" />
28
-        <add name="Access-Control-Allow-Headers" value="Content-Type" />
29
-        <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
30
-      </customHeaders>
31
-    </httpProtocol>
32
-    <!--cors 支持跨域 end-->
33
-    <validation validateIntegratedModeConfiguration="false" />
34
-  </system.webServer>
35
-  <runtime>
36
-    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
37
-      <dependentAssembly>
38
-        <assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" />
39
-        <bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
40
-      </dependentAssembly>
41
-      <dependentAssembly>
42
-        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
43
-        <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
44
-      </dependentAssembly>
45
-      <dependentAssembly>
46
-        <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
47
-        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
48
-      </dependentAssembly>
49
-      <dependentAssembly>
50
-        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
51
-        <bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
52
-      </dependentAssembly>
53
-      <dependentAssembly>
54
-        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
55
-        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
56
-      </dependentAssembly>
57
-      <dependentAssembly>
58
-        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
59
-        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
60
-      </dependentAssembly>
61
-      <dependentAssembly>
62
-        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
63
-        <bindingRedirect oldVersion="1.0.0.0-5.2.4.0" newVersion="5.2.4.0" />
64
-      </dependentAssembly>
65
-    </assemblyBinding>
66
-  </runtime>
67
-  <system.codedom>
68
-    <compilers>
69
-      <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
70
-      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
71
-    </compilers>
72
-  </system.codedom>
73
-</configuration>

+ 0 - 18
RMYY_CallCenter_Api/packages.config

@@ -1,18 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<packages>
3
-  <package id="Antlr" version="3.5.0.2" targetFramework="net45" />
4
-  <package id="Microsoft.AspNet.Mvc" version="5.2.4" targetFramework="net45" />
5
-  <package id="Microsoft.AspNet.Mvc.zh-Hans" version="5.2.4" targetFramework="net45" />
6
-  <package id="Microsoft.AspNet.Razor" version="3.2.4" targetFramework="net45" />
7
-  <package id="Microsoft.AspNet.Razor.zh-Hans" version="3.2.4" targetFramework="net45" />
8
-  <package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net45" />
9
-  <package id="Microsoft.AspNet.Web.Optimization.zh-Hans" version="1.1.3" targetFramework="net45" />
10
-  <package id="Microsoft.AspNet.WebPages" version="3.2.4" targetFramework="net45" />
11
-  <package id="Microsoft.AspNet.WebPages.zh-Hans" version="3.2.4" targetFramework="net45" />
12
-  <package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.0" targetFramework="net45" />
13
-  <package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.4" targetFramework="net45" />
14
-  <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
15
-  <package id="Modernizr" version="2.8.3" targetFramework="net45" />
16
-  <package id="Newtonsoft.Json" version="11.0.1" targetFramework="net45" />
17
-  <package id="WebGrease" version="1.6.0" targetFramework="net45" />
18
-</packages>