瀏覽代碼

士大夫

duhongyu 4 年之前
父節點
當前提交
29dc7c20d1
共有 37 個文件被更改,包括 4994 次插入847 次删除
  1. 1 0
      CallCenterApi/CallCenterApi.BLL/CallCenterApi.BLL.csproj
  2. 158 0
      CallCenterApi/CallCenterApi.BLL/T_Bus_People.cs
  3. 8 0
      CallCenterApi/CallCenterApi.BLL/T_Bus_WorkOrder.cs
  4. 1 0
      CallCenterApi/CallCenterApi.DAL/CallCenterApi.DAL.csproj
  5. 481 0
      CallCenterApi/CallCenterApi.DAL/T_Bus_People.cs
  6. 1 1
      CallCenterApi/CallCenterApi.DAL/T_Call_CallRecords.cs
  7. 11 0
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Configs/system.config
  8. 492 92
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/APPController.cs
  9. 1 1
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs
  10. 6 6
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/IndexController.cs
  11. 318 24
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Sms/SmsNewController.cs
  12. 1 1
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs
  13. 1 1
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/WebChart/InfoController.cs
  14. 18 5
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/WebChart/InfoNewController.cs
  15. 1 1
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/AddressBookController.cs
  16. 1 1
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/RepositoryController.cs
  17. 1 1
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WorkOrderReportController.cs
  18. 65 31
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs
  19. 813 0
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/APPSController.cs
  20. 209 570
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/AffairsController.cs
  21. 510 101
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs
  22. 6 1
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Global.asax.cs
  23. 5 1
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Common/ButtonGroup.cs
  24. 211 0
      CallCenterApi/CallCenterApi.Model/T_Bus_People.cs
  25. 5 0
      CallCenterCommon/CallCenter.QuartzService/CallCenter.QuartzService.csproj
  26. 44 0
      CallCenterCommon/CallCenter.QuartzService/Peoplewebsite.cs
  27. 1602 0
      CallCenterCommon/CallCenter.QuartzService/PushWorkorder.cs
  28. 1 1
      CallCenterCommon/CallCenter.QuartzService/SatisfactionClose.cs
  29. 8 4
      CallCenterCommon/CallCenter.QuartzService/ZhengWuDuiJie.cs
  30. 2 2
      CallCenterCommon/CallCenter.Utility/FileUp.cs
  31. 1 1
      CallCenterCommon/CallCenter.Utility/ImageUpload.cs
  32. 11 1
      CallCenterCommon/CallCenter.Utility/Time/DateTimeConvert.cs
  33. 二進制
      文档/材料/C5106-2019国家“互联网 监管”系统监管数据标准V4.1.docx
  34. 二進制
      文档/材料/安阳12345向数据平台数据推送(1).docx
  35. 二進制
      文档/材料/安阳12345服务器资源0728.xlsx
  36. 二進制
      文档/材料/承办网络系统使用操作手册.docx
  37. 二進制
      文档/材料/经分助手消息API文档.pdf

+ 1 - 0
CallCenterApi/CallCenterApi.BLL/CallCenterApi.BLL.csproj

59
     <Compile Include="T_Bus_Feedback_Next.cs" />
59
     <Compile Include="T_Bus_Feedback_Next.cs" />
60
     <Compile Include="T_Bus_NoticeCriticism.cs" />
60
     <Compile Include="T_Bus_NoticeCriticism.cs" />
61
     <Compile Include="T_Bus_Operation.cs" />
61
     <Compile Include="T_Bus_Operation.cs" />
62
+    <Compile Include="T_Bus_People.cs" />
62
     <Compile Include="T_Bus_PerformDuties.cs" />
63
     <Compile Include="T_Bus_PerformDuties.cs" />
63
     <Compile Include="T_Bus_PerformDutiesRecords.cs" />
64
     <Compile Include="T_Bus_PerformDutiesRecords.cs" />
64
     <Compile Include="T_Bus_RemindRecord.cs" />
65
     <Compile Include="T_Bus_RemindRecord.cs" />

+ 158 - 0
CallCenterApi/CallCenterApi.BLL/T_Bus_People.cs

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Data;
4
+using System.Linq;
5
+using System.Text;
6
+using System.Threading.Tasks;
7
+
8
+namespace CallCenterApi.BLL
9
+{
10
+    /// <summary>
11
+    /// T_Bus_People
12
+    /// </summary>
13
+    public partial class T_Bus_People
14
+    {
15
+        private readonly CallCenterApi.DAL.T_Bus_People dal = new CallCenterApi.DAL.T_Bus_People();
16
+        public T_Bus_People()
17
+        { }
18
+        #region  BasicMethod
19
+
20
+        /// <summary>
21
+        /// 得到最大ID
22
+        /// </summary>
23
+        public int GetMaxId()
24
+        {
25
+            return dal.GetMaxId();
26
+        }
27
+
28
+        /// <summary>
29
+        /// 是否存在该记录
30
+        /// </summary>
31
+        public bool Exists(int F_ID)
32
+        {
33
+            return dal.Exists(F_ID);
34
+        }
35
+
36
+        /// <summary>
37
+        /// 增加一条数据
38
+        /// </summary>
39
+        public int Add(CallCenterApi.Model.T_Bus_People model)
40
+        {
41
+            return dal.Add(model);
42
+        }
43
+
44
+        /// <summary>
45
+        /// 更新一条数据
46
+        /// </summary>
47
+        public bool Update(CallCenterApi.Model.T_Bus_People model)
48
+        {
49
+            return dal.Update(model);
50
+        }
51
+
52
+        /// <summary>
53
+        /// 删除一条数据
54
+        /// </summary>
55
+        public bool Delete(int F_ID)
56
+        {
57
+
58
+            return dal.Delete(F_ID);
59
+        }
60
+        /// <summary>
61
+        /// 删除一条数据
62
+        /// </summary>
63
+        public bool DeleteList(string F_IDlist)
64
+        {
65
+            return dal.DeleteList(F_IDlist);
66
+        }
67
+
68
+        /// <summary>
69
+        /// 得到一个对象实体
70
+        /// </summary>
71
+        public CallCenterApi.Model.T_Bus_People GetModel(int F_ID)
72
+        {
73
+
74
+            return dal.GetModel(F_ID);
75
+        }
76
+
77
+       
78
+
79
+        /// <summary>
80
+        /// 获得数据列表
81
+        /// </summary>
82
+        public DataSet GetList(string strWhere)
83
+        {
84
+            return dal.GetList(strWhere);
85
+        }
86
+        /// <summary>
87
+        /// 获得前几行数据
88
+        /// </summary>
89
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
90
+        {
91
+            return dal.GetList(Top, strWhere, filedOrder);
92
+        }
93
+        /// <summary>
94
+        /// 获得数据列表
95
+        /// </summary>
96
+        public List<CallCenterApi.Model.T_Bus_People> GetModelList(string strWhere)
97
+        {
98
+            DataSet ds = dal.GetList(strWhere);
99
+            return DataTableToList(ds.Tables[0]);
100
+        }
101
+        /// <summary>
102
+        /// 获得数据列表
103
+        /// </summary>
104
+        public List<CallCenterApi.Model.T_Bus_People> DataTableToList(DataTable dt)
105
+        {
106
+            List<CallCenterApi.Model.T_Bus_People> modelList = new List<CallCenterApi.Model.T_Bus_People>();
107
+            int rowsCount = dt.Rows.Count;
108
+            if (rowsCount > 0)
109
+            {
110
+                CallCenterApi.Model.T_Bus_People model;
111
+                for (int n = 0; n < rowsCount; n++)
112
+                {
113
+                    model = dal.DataRowToModel(dt.Rows[n]);
114
+                    if (model != null)
115
+                    {
116
+                        modelList.Add(model);
117
+                    }
118
+                }
119
+            }
120
+            return modelList;
121
+        }
122
+
123
+        /// <summary>
124
+        /// 获得数据列表
125
+        /// </summary>
126
+        public DataSet GetAllList()
127
+        {
128
+            return GetList("");
129
+        }
130
+
131
+        /// <summary>
132
+        /// 分页获取数据列表
133
+        /// </summary>
134
+        public int GetRecordCount(string strWhere)
135
+        {
136
+            return dal.GetRecordCount(strWhere);
137
+        }
138
+        /// <summary>
139
+        /// 分页获取数据列表
140
+        /// </summary>
141
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
142
+        {
143
+            return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
144
+        }
145
+        /// <summary>
146
+        /// 分页获取数据列表
147
+        /// </summary>
148
+        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
149
+        //{
150
+        //return dal.GetList(PageSize,PageIndex,strWhere);
151
+        //}
152
+
153
+        #endregion  BasicMethod
154
+        #region  ExtensionMethod
155
+
156
+        #endregion  ExtensionMethod
157
+    }
158
+}

+ 8 - 0
CallCenterApi/CallCenterApi.BLL/T_Bus_WorkOrder.cs

116
         /// <summary>
116
         /// <summary>
117
         /// 获得数据列表
117
         /// 获得数据列表
118
         /// </summary>
118
         /// </summary>
119
+        public List<CallCenterApi.Model.T_Bus_WorkOrder> GetModelList(int Top, string strWhere, string filedOrder)
120
+        {
121
+            DataSet ds = dal.GetList(Top, strWhere, filedOrder);
122
+            return DataTableToList(ds.Tables[0]);
123
+        }
124
+        /// <summary>
125
+        /// 获得数据列表
126
+        /// </summary>
119
         public List<CallCenterApi.Model.T_Bus_WorkOrder> GetModelList(string strWhere)
127
         public List<CallCenterApi.Model.T_Bus_WorkOrder> GetModelList(string strWhere)
120
         {
128
         {
121
             DataSet ds = dal.GetList(strWhere);
129
             DataSet ds = dal.GetList(strWhere);

+ 1 - 0
CallCenterApi/CallCenterApi.DAL/CallCenterApi.DAL.csproj

60
     <Compile Include="T_Bus_Feedback_Next.cs" />
60
     <Compile Include="T_Bus_Feedback_Next.cs" />
61
     <Compile Include="T_Bus_NoticeCriticism.cs" />
61
     <Compile Include="T_Bus_NoticeCriticism.cs" />
62
     <Compile Include="T_Bus_Operation.cs" />
62
     <Compile Include="T_Bus_Operation.cs" />
63
+    <Compile Include="T_Bus_People.cs" />
63
     <Compile Include="T_Bus_PerformDuties.cs" />
64
     <Compile Include="T_Bus_PerformDuties.cs" />
64
     <Compile Include="T_Bus_PerformDutiesRecords.cs" />
65
     <Compile Include="T_Bus_PerformDutiesRecords.cs" />
65
     <Compile Include="T_Bus_RemindRecord.cs" />
66
     <Compile Include="T_Bus_RemindRecord.cs" />

+ 481 - 0
CallCenterApi/CallCenterApi.DAL/T_Bus_People.cs

1
+using CallCenterApi.DB;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Data;
5
+using System.Data.SqlClient;
6
+using System.Linq;
7
+using System.Text;
8
+using System.Threading.Tasks;
9
+
10
+namespace CallCenterApi.DAL
11
+{
12
+    /// <summary>
13
+    /// 数据访问类:T_Bus_People
14
+    /// </summary>
15
+    public partial class T_Bus_People
16
+    {
17
+        public T_Bus_People()
18
+        { }
19
+        #region  BasicMethod
20
+
21
+        /// <summary>
22
+        /// 得到最大ID
23
+        /// </summary>
24
+        public int GetMaxId()
25
+        {
26
+            return DbHelperSQL.GetMaxID("F_ID", "T_Bus_People");
27
+        }
28
+
29
+        /// <summary>
30
+        /// 是否存在该记录
31
+        /// </summary>
32
+        public bool Exists(int F_ID)
33
+        {
34
+            StringBuilder strSql = new StringBuilder();
35
+            strSql.Append("select count(1) from T_Bus_People");
36
+            strSql.Append(" where F_ID=@F_ID");
37
+            SqlParameter[] parameters = {
38
+                    new SqlParameter("@F_ID", SqlDbType.Int,4)
39
+            };
40
+            parameters[0].Value = F_ID;
41
+
42
+            return DbHelperSQL.Exists(strSql.ToString(), parameters);
43
+        }
44
+
45
+
46
+        /// <summary>
47
+        /// 增加一条数据
48
+        /// </summary>
49
+        public int Add(CallCenterApi.Model.T_Bus_People model)
50
+        {
51
+            StringBuilder strSql = new StringBuilder();
52
+            strSql.Append("insert into T_Bus_People(");
53
+            strSql.Append("tid,forumName,subject,nickName,typeName,domainName,stateInfo,dateline,videoImgUrl,videoUrl,videoDuration,content,threadsCheckTime,realName,phone,remark,aid,attachment,topicMainTitle,F_WorkOrderId,state)");
54
+            strSql.Append(" values (");
55
+            strSql.Append("@tid,@forumName,@subject,@nickName,@typeName,@domainName,@stateInfo,@dateline,@videoImgUrl,@videoUrl,@videoDuration,@content,@threadsCheckTime,@realName,@phone,@remark,@aid,@attachment,@topicMainTitle,@F_WorkOrderId,@state)");
56
+            strSql.Append(";select @@IDENTITY");
57
+            SqlParameter[] parameters = {
58
+                    new SqlParameter("@tid", SqlDbType.Decimal,9),
59
+                    new SqlParameter("@forumName", SqlDbType.NVarChar,50),
60
+                    new SqlParameter("@subject", SqlDbType.NVarChar,500),
61
+                    new SqlParameter("@nickName", SqlDbType.NVarChar,500),
62
+                    new SqlParameter("@typeName", SqlDbType.NVarChar,500),
63
+                    new SqlParameter("@domainName", SqlDbType.NVarChar,500),
64
+                    new SqlParameter("@stateInfo", SqlDbType.NVarChar,50),
65
+                    new SqlParameter("@dateline", SqlDbType.DateTime),
66
+                    new SqlParameter("@videoImgUrl", SqlDbType.NVarChar,1000),
67
+                    new SqlParameter("@videoUrl", SqlDbType.NVarChar,1000),
68
+                    new SqlParameter("@videoDuration", SqlDbType.Int,4),
69
+                    new SqlParameter("@content", SqlDbType.NVarChar,-1),
70
+                    new SqlParameter("@threadsCheckTime", SqlDbType.DateTime),
71
+                    new SqlParameter("@realName", SqlDbType.NVarChar,50),
72
+                    new SqlParameter("@phone", SqlDbType.NVarChar,50),
73
+                    new SqlParameter("@remark", SqlDbType.NVarChar,-1),
74
+                    new SqlParameter("@aid", SqlDbType.NVarChar,50),
75
+                    new SqlParameter("@attachment", SqlDbType.Int,4),
76
+                    new SqlParameter("@topicMainTitle", SqlDbType.NVarChar,500),
77
+                    new SqlParameter("@F_WorkOrderId", SqlDbType.VarChar,500),
78
+            new SqlParameter("@state", SqlDbType.Int )};
79
+            parameters[0].Value = model.tid;
80
+            parameters[1].Value = model.forumName;
81
+            parameters[2].Value = model.subject;
82
+            parameters[3].Value = model.nickName;
83
+            parameters[4].Value = model.typeName;
84
+            parameters[5].Value = model.domainName;
85
+            parameters[6].Value = model.stateInfo;
86
+            parameters[7].Value = model.dateline;
87
+            parameters[8].Value = model.videoImgUrl;
88
+            parameters[9].Value = model.videoUrl;
89
+            parameters[10].Value = model.videoDuration;
90
+            parameters[11].Value = model.content;
91
+            parameters[12].Value = model.threadsCheckTime;
92
+            parameters[13].Value = model.realName;
93
+            parameters[14].Value = model.phone;
94
+            parameters[15].Value = model.remark;
95
+            parameters[16].Value = model.aid;
96
+            parameters[17].Value = model.attachment;
97
+            parameters[18].Value = model.topicMainTitle;
98
+            parameters[19].Value = model.F_WorkOrderId;
99
+            parameters[20].Value = model.state;
100
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
101
+            if (obj == null)
102
+            {
103
+                return 0;
104
+            }
105
+            else
106
+            {
107
+                return Convert.ToInt32(obj);
108
+            }
109
+        }
110
+        /// <summary>
111
+        /// 更新一条数据
112
+        /// </summary>
113
+        public bool Update(CallCenterApi.Model.T_Bus_People model)
114
+        {
115
+            StringBuilder strSql = new StringBuilder();
116
+            strSql.Append("update T_Bus_People set ");
117
+            strSql.Append("tid=@tid,");
118
+            strSql.Append("forumName=@forumName,");
119
+            strSql.Append("subject=@subject,");
120
+            strSql.Append("nickName=@nickName,");
121
+            strSql.Append("typeName=@typeName,");
122
+            strSql.Append("domainName=@domainName,");
123
+            strSql.Append("stateInfo=@stateInfo,");
124
+            strSql.Append("dateline=@dateline,");
125
+            strSql.Append("videoImgUrl=@videoImgUrl,");
126
+            strSql.Append("videoUrl=@videoUrl,");
127
+            strSql.Append("videoDuration=@videoDuration,");
128
+            strSql.Append("content=@content,");
129
+            strSql.Append("threadsCheckTime=@threadsCheckTime,");
130
+            strSql.Append("realName=@realName,");
131
+            strSql.Append("phone=@phone,");
132
+            strSql.Append("remark=@remark,");
133
+            strSql.Append("aid=@aid,");
134
+            strSql.Append("attachment=@attachment,");
135
+            strSql.Append("topicMainTitle=@topicMainTitle,");
136
+            strSql.Append("state=@state,");
137
+            strSql.Append("F_WorkOrderId=@F_WorkOrderId");
138
+            strSql.Append(" where F_ID=@F_ID");
139
+            SqlParameter[] parameters = {
140
+                    new SqlParameter("@tid", SqlDbType.Decimal,9),
141
+                    new SqlParameter("@forumName", SqlDbType.NVarChar,50),
142
+                    new SqlParameter("@subject", SqlDbType.NVarChar,500),
143
+                    new SqlParameter("@nickName", SqlDbType.NVarChar,500),
144
+                    new SqlParameter("@typeName", SqlDbType.NVarChar,500),
145
+                    new SqlParameter("@domainName", SqlDbType.NVarChar,500),
146
+                    new SqlParameter("@stateInfo", SqlDbType.NVarChar,50),
147
+                    new SqlParameter("@dateline", SqlDbType.DateTime),
148
+                    new SqlParameter("@videoImgUrl", SqlDbType.NVarChar,1000),
149
+                    new SqlParameter("@videoUrl", SqlDbType.NVarChar,1000),
150
+                    new SqlParameter("@videoDuration", SqlDbType.Int,4),
151
+                    new SqlParameter("@content", SqlDbType.NVarChar,-1),
152
+                    new SqlParameter("@threadsCheckTime", SqlDbType.DateTime),
153
+                    new SqlParameter("@realName", SqlDbType.NVarChar,50),
154
+                    new SqlParameter("@phone", SqlDbType.NVarChar,50),
155
+                    new SqlParameter("@remark", SqlDbType.NVarChar,-1),
156
+                    new SqlParameter("@aid", SqlDbType.NVarChar,50),
157
+                    new SqlParameter("@attachment", SqlDbType.Int,4),
158
+                    new SqlParameter("@topicMainTitle", SqlDbType.NVarChar,500),
159
+                    new SqlParameter("@state", SqlDbType.Int,4),
160
+                    new SqlParameter("@F_WorkOrderId", SqlDbType.VarChar,500),
161
+                    new SqlParameter("@F_ID", SqlDbType.Int,4)};
162
+            parameters[0].Value = model.tid;
163
+            parameters[1].Value = model.forumName;
164
+            parameters[2].Value = model.subject;
165
+            parameters[3].Value = model.nickName;
166
+            parameters[4].Value = model.typeName;
167
+            parameters[5].Value = model.domainName;
168
+            parameters[6].Value = model.stateInfo;
169
+            parameters[7].Value = model.dateline;
170
+            parameters[8].Value = model.videoImgUrl;
171
+            parameters[9].Value = model.videoUrl;
172
+            parameters[10].Value = model.videoDuration;
173
+            parameters[11].Value = model.content;
174
+            parameters[12].Value = model.threadsCheckTime;
175
+            parameters[13].Value = model.realName;
176
+            parameters[14].Value = model.phone;
177
+            parameters[15].Value = model.remark;
178
+            parameters[16].Value = model.aid;
179
+            parameters[17].Value = model.attachment;
180
+            parameters[18].Value = model.topicMainTitle;
181
+            parameters[19].Value = model.state;
182
+            parameters[20].Value = model.F_WorkOrderId;
183
+            parameters[21].Value = model.F_ID;
184
+
185
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
186
+            if (rows > 0)
187
+            {
188
+                return true;
189
+            }
190
+            else
191
+            {
192
+                return false;
193
+            }
194
+        }
195
+
196
+        /// <summary>
197
+        /// 删除一条数据
198
+        /// </summary>
199
+        public bool Delete(int F_ID)
200
+        {
201
+
202
+            StringBuilder strSql = new StringBuilder();
203
+            strSql.Append("delete from T_Bus_People ");
204
+            strSql.Append(" where F_ID=@F_ID");
205
+            SqlParameter[] parameters = {
206
+                    new SqlParameter("@F_ID", SqlDbType.Int,4)
207
+            };
208
+            parameters[0].Value = F_ID;
209
+
210
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
211
+            if (rows > 0)
212
+            {
213
+                return true;
214
+            }
215
+            else
216
+            {
217
+                return false;
218
+            }
219
+        }
220
+        /// <summary>
221
+        /// 批量删除数据
222
+        /// </summary>
223
+        public bool DeleteList(string F_IDlist)
224
+        {
225
+            StringBuilder strSql = new StringBuilder();
226
+            strSql.Append("delete from T_Bus_People ");
227
+            strSql.Append(" where F_ID in (" + F_IDlist + ")  ");
228
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
229
+            if (rows > 0)
230
+            {
231
+                return true;
232
+            }
233
+            else
234
+            {
235
+                return false;
236
+            }
237
+        }
238
+
239
+
240
+        /// <summary>
241
+        /// 得到一个对象实体
242
+        /// </summary>
243
+        public CallCenterApi.Model.T_Bus_People GetModel(int F_ID)
244
+        {
245
+
246
+            StringBuilder strSql = new StringBuilder();
247
+            strSql.Append("select  top 1 F_ID,tid,forumName,subject,nickName,typeName,domainName,stateInfo,dateline,videoImgUrl,videoUrl,videoDuration,content,threadsCheckTime,realName,phone,remark,aid,attachment,topicMainTitle,F_WorkOrderId,state from T_Bus_People ");
248
+            strSql.Append(" where F_ID=@F_ID");
249
+            SqlParameter[] parameters = {
250
+                    new SqlParameter("@F_ID", SqlDbType.Int,4)
251
+            };
252
+            parameters[0].Value = F_ID;
253
+
254
+            CallCenterApi.Model.T_Bus_People model = new CallCenterApi.Model.T_Bus_People();
255
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
256
+            if (ds.Tables[0].Rows.Count > 0)
257
+            {
258
+                return DataRowToModel(ds.Tables[0].Rows[0]);
259
+            }
260
+            else
261
+            {
262
+                return null;
263
+            }
264
+        }
265
+
266
+
267
+        /// <summary>
268
+        /// 得到一个对象实体
269
+        /// </summary>
270
+        public CallCenterApi.Model.T_Bus_People DataRowToModel(DataRow row)
271
+        {
272
+            CallCenterApi.Model.T_Bus_People model = new CallCenterApi.Model.T_Bus_People();
273
+            if (row != null)
274
+            {
275
+                if (row["F_ID"] != null && row["F_ID"].ToString() != "")
276
+                {
277
+                    model.F_ID = int.Parse(row["F_ID"].ToString());
278
+                }
279
+                if (row["tid"] != null && row["tid"].ToString() != "")
280
+                {
281
+                    model.tid = decimal.Parse(row["tid"].ToString());
282
+                }
283
+                if (row["forumName"] != null)
284
+                {
285
+                    model.forumName = row["forumName"].ToString();
286
+                }
287
+                if (row["subject"] != null)
288
+                {
289
+                    model.subject = row["subject"].ToString();
290
+                }
291
+                if (row["nickName"] != null)
292
+                {
293
+                    model.nickName = row["nickName"].ToString();
294
+                }
295
+                if (row["typeName"] != null)
296
+                {
297
+                    model.typeName = row["typeName"].ToString();
298
+                }
299
+                if (row["domainName"] != null)
300
+                {
301
+                    model.domainName = row["domainName"].ToString();
302
+                }
303
+                if (row["stateInfo"] != null)
304
+                {
305
+                    model.stateInfo = row["stateInfo"].ToString();
306
+                }
307
+                if (row["dateline"] != null && row["dateline"].ToString() != "")
308
+                {
309
+                    model.dateline = DateTime.Parse(row["dateline"].ToString());
310
+                }
311
+                if (row["videoImgUrl"] != null)
312
+                {
313
+                    model.videoImgUrl = row["videoImgUrl"].ToString();
314
+                }
315
+                if (row["videoUrl"] != null)
316
+                {
317
+                    model.videoUrl = row["videoUrl"].ToString();
318
+                }
319
+                if (row["videoDuration"] != null && row["videoDuration"].ToString() != "")
320
+                {
321
+                    model.videoDuration = int.Parse(row["videoDuration"].ToString());
322
+                }
323
+                if (row["content"] != null)
324
+                {
325
+                    model.content = row["content"].ToString();
326
+                }
327
+                if (row["threadsCheckTime"] != null && row["threadsCheckTime"].ToString() != "")
328
+                {
329
+                    model.threadsCheckTime = DateTime.Parse(row["threadsCheckTime"].ToString());
330
+                }
331
+                if (row["realName"] != null)
332
+                {
333
+                    model.realName = row["realName"].ToString();
334
+                }
335
+                if (row["phone"] != null)
336
+                {
337
+                    model.phone = row["phone"].ToString();
338
+                }
339
+                if (row["remark"] != null)
340
+                {
341
+                    model.remark = row["remark"].ToString();
342
+                }
343
+                if (row["aid"] != null)
344
+                {
345
+                    model.aid = row["aid"].ToString();
346
+                }
347
+                if (row["attachment"] != null && row["attachment"].ToString() != "")
348
+                {
349
+                    model.attachment = int.Parse(row["attachment"].ToString());
350
+                }
351
+                if (row["topicMainTitle"] != null)
352
+                {
353
+                    model.topicMainTitle = row["topicMainTitle"].ToString();
354
+                }
355
+                if (row["F_WorkOrderId"] != null)
356
+                {
357
+                    model.F_WorkOrderId = row["F_WorkOrderId"].ToString();
358
+                }
359
+                if (row["state"] != null && row["state"].ToString() != "")
360
+                {
361
+                    model.state = int.Parse(row["state"].ToString());
362
+                }
363
+                
364
+            }
365
+            return model;
366
+        }
367
+
368
+        /// <summary>
369
+        /// 获得数据列表
370
+        /// </summary>
371
+        public DataSet GetList(string strWhere)
372
+        {
373
+            StringBuilder strSql = new StringBuilder();
374
+            strSql.Append("select F_ID,tid,forumName,subject,nickName,typeName,domainName,stateInfo,dateline,videoImgUrl,videoUrl,videoDuration,content,threadsCheckTime,realName,phone,remark,aid,attachment,topicMainTitle,F_WorkOrderId,state ");
375
+            strSql.Append(" FROM T_Bus_People ");
376
+            if (strWhere.Trim() != "")
377
+            {
378
+                strSql.Append(" where " + strWhere);
379
+            }
380
+            return DbHelperSQL.Query(strSql.ToString());
381
+        }
382
+
383
+        /// <summary>
384
+        /// 获得前几行数据
385
+        /// </summary>
386
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
387
+        {
388
+            StringBuilder strSql = new StringBuilder();
389
+            strSql.Append("select ");
390
+            if (Top > 0)
391
+            {
392
+                strSql.Append(" top " + Top.ToString());
393
+            }
394
+            strSql.Append(" F_ID,tid,forumName,subject,nickName,typeName,domainName,stateInfo,dateline,videoImgUrl,videoUrl,videoDuration,content,threadsCheckTime,realName,phone,remark,aid,attachment,topicMainTitle,F_WorkOrderId,state ");
395
+            strSql.Append(" FROM T_Bus_People ");
396
+            if (strWhere.Trim() != "")
397
+            {
398
+                strSql.Append(" where " + strWhere);
399
+            }
400
+            strSql.Append(" order by " + filedOrder);
401
+            return DbHelperSQL.Query(strSql.ToString());
402
+        }
403
+
404
+        /// <summary>
405
+        /// 获取记录总数
406
+        /// </summary>
407
+        public int GetRecordCount(string strWhere)
408
+        {
409
+            StringBuilder strSql = new StringBuilder();
410
+            strSql.Append("select count(1) FROM T_Bus_People ");
411
+            if (strWhere.Trim() != "")
412
+            {
413
+                strSql.Append(" where " + strWhere);
414
+            }
415
+            object obj = DbHelperSQL.GetSingle(strSql.ToString());
416
+            if (obj == null)
417
+            {
418
+                return 0;
419
+            }
420
+            else
421
+            {
422
+                return Convert.ToInt32(obj);
423
+            }
424
+        }
425
+        /// <summary>
426
+        /// 分页获取数据列表
427
+        /// </summary>
428
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
429
+        {
430
+            StringBuilder strSql = new StringBuilder();
431
+            strSql.Append("SELECT * FROM ( ");
432
+            strSql.Append(" SELECT ROW_NUMBER() OVER (");
433
+            if (!string.IsNullOrEmpty(orderby.Trim()))
434
+            {
435
+                strSql.Append("order by T." + orderby);
436
+            }
437
+            else
438
+            {
439
+                strSql.Append("order by T.F_ID desc");
440
+            }
441
+            strSql.Append(")AS Row, T.*  from T_Bus_People T ");
442
+            if (!string.IsNullOrEmpty(strWhere.Trim()))
443
+            {
444
+                strSql.Append(" WHERE " + strWhere);
445
+            }
446
+            strSql.Append(" ) TT");
447
+            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
448
+            return DbHelperSQL.Query(strSql.ToString());
449
+        }
450
+
451
+        /*
452
+		/// <summary>
453
+		/// 分页获取数据列表
454
+		/// </summary>
455
+		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
456
+		{
457
+			SqlParameter[] parameters = {
458
+					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
459
+					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
460
+					new SqlParameter("@PageSize", SqlDbType.Int),
461
+					new SqlParameter("@PageIndex", SqlDbType.Int),
462
+					new SqlParameter("@IsReCount", SqlDbType.Bit),
463
+					new SqlParameter("@OrderType", SqlDbType.Bit),
464
+					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
465
+					};
466
+			parameters[0].Value = "T_Bus_People";
467
+			parameters[1].Value = "F_ID";
468
+			parameters[2].Value = PageSize;
469
+			parameters[3].Value = PageIndex;
470
+			parameters[4].Value = 0;
471
+			parameters[5].Value = 0;
472
+			parameters[6].Value = strWhere;	
473
+			return CallCenterApi.RunProcedure("UP_GetRecordByPage",parameters,"ds");
474
+		}*/
475
+
476
+        #endregion  BasicMethod
477
+        #region  ExtensionMethod
478
+
479
+        #endregion  ExtensionMethod
480
+    }
481
+}

+ 1 - 1
CallCenterApi/CallCenterApi.DAL/T_Call_CallRecords.cs

1043
             {
1043
             {
1044
                 StringBuilder strSql = new StringBuilder();
1044
                 StringBuilder strSql = new StringBuilder();
1045
                 strSql.Append("update T_Call_CallRecords set ");
1045
                 strSql.Append("update T_Call_CallRecords set ");
1046
-                strSql.Append("CallbackCallid=@CallbackCallid,");
1046
+                strSql.Append("CallbackCallid=@CallbackCallid");
1047
 
1047
 
1048
                 strSql.Append(" where CallId=@CallId");
1048
                 strSql.Append(" where CallId=@CallId");
1049
                 SqlParameter[] parameters = {
1049
                 SqlParameter[] parameters = {

+ 11 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Configs/system.config

108
   <add key="AuthDate" value="2023-10-12" />
108
   <add key="AuthDate" value="2023-10-12" />
109
   <add key="OutSignCode" value="$AY12345#" />
109
   <add key="OutSignCode" value="$AY12345#" />
110
   <add key="Affairs" value="0" />
110
   <add key="Affairs" value="0" />
111
+
112
+<add key="APP_CODE" value="d377d97d7e9346e7831351ee5b62a418" />
113
+  <add key="APP_SECRET" value="ff24bb32f2e14ea595dcd1748feceabd" />
114
+  
115
+  <add key="Rmwurl" value="http://api-qa-dfbbs.peopletech.cn/pro-dfbbs-api" />
116
+
117
+<!--<add key="APP_CODE" value="314f185e71e74dd8879ab154746f7681" />
118
+  <add key="APP_SECRET" value="900a640b37e84a8c88ffc83d6f3500f6" />
119
+  <add key="Rmwurl" value="http://liuyan-api.people.com.cn/api" />-->
120
+  
121
+    <add key="AppUrl" value="http://111.6.36.62:8001" />
111
 </appSettings>
122
 </appSettings>

File diff suppressed because it is too large
+ 492 - 92
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/APPController.cs


+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs

32
                 sql += " and F_DeptName like '%" + deptname.Trim() + "%'";
32
                 sql += " and F_DeptName like '%" + deptname.Trim() + "%'";
33
             }
33
             }
34
             if (User.F_RoleCode == "GLY" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "MTDD" || User.F_RoleCode == "ZXHWY"
34
             if (User.F_RoleCode == "GLY" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "MTDD" || User.F_RoleCode == "ZXHWY"
35
-                || User.F_RoleCode == "DBZY")
35
+                || User.F_RoleCode == "DBZY" || User.F_RoleCode == "DMTSH")
36
             {
36
             {
37
                
37
                
38
                 if (iscbdw == 0)
38
                 if (iscbdw == 0)

+ 6 - 6
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/IndexController.cs

33
         {
33
         {
34
             int zxdcl = 0;
34
             int zxdcl = 0;
35
             string zxdclsql = "";
35
             string zxdclsql = "";
36
-            if (User.F_RoleCode != "GLY" && User.F_RoleCode != "ZXLD" && User.F_RoleCode != "YSZY" && User.F_RoleCode != "DDZG" && User.F_RoleCode != "MTDD")
36
+            if (User.F_RoleCode != "GLY" && User.F_RoleCode != "ZXLD" && User.F_RoleCode != "YSZY" && User.F_RoleCode != "DDZG" && User.F_RoleCode != "MTDD" && User.F_RoleCode != "DMTSH")
37
             {
37
             {
38
                 if (User.F_RoleCode != "ZJZY" && User.F_RoleCode != "ZXHWY")
38
                 if (User.F_RoleCode != "ZJZY" && User.F_RoleCode != "ZXHWY")
39
                     zxdclsql += " and F_CreateUser='" + User.F_UserCode + "'";
39
                     zxdclsql += " and F_CreateUser='" + User.F_UserCode + "'";
57
 
57
 
58
             int ybdhf = 0;
58
             int ybdhf = 0;
59
             string ybdhfsql = "";
59
             string ybdhfsql = "";
60
-            if (User.F_RoleCode != "GLY" && User.F_RoleCode != "ZXLD" && User.F_RoleCode != "YSZY" && User.F_RoleCode != "DDZG" && User.F_RoleCode != "MTDD")
60
+            if (User.F_RoleCode != "GLY" && User.F_RoleCode != "ZXLD" && User.F_RoleCode != "YSZY" && User.F_RoleCode != "DDZG" && User.F_RoleCode != "MTDD" && User.F_RoleCode != "DMTSH")
61
             {
61
             {
62
                 if (User.F_RoleCode != "ZJZY" && User.F_RoleCode != "ZXHWY")
62
                 if (User.F_RoleCode != "ZJZY" && User.F_RoleCode != "ZXHWY")
63
                     ybdhfsql += " and F_CreateUser='" + User.F_UserCode + "'";
63
                     ybdhfsql += " and F_CreateUser='" + User.F_UserCode + "'";
574
             //}
574
             //}
575
             #endregion
575
             #endregion
576
             #region 调度专员(ZXLD) 中心领导(ZXLDGLY) 中心领导管理员(ZXLDGLYGLY) 调度主管(DDZG)
576
             #region 调度专员(ZXLD) 中心领导(ZXLDGLY) 中心领导管理员(ZXLDGLYGLY) 调度主管(DDZG)
577
-            if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "MTDD" || User.F_RoleCode == "ZXLDGLY" || User.F_RoleCode == "ZXLDGLYGLY" )
577
+            if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "MTDD" || User.F_RoleCode == "ZXLDGLY" || User.F_RoleCode == "ZXLDGLYGLY" || User.F_RoleCode == "DMTSH")
578
             {//调度专员(ZXLD) 中心领导(ZXLDGLY) 中心领导管理员(ZXLDGLYGLY)
578
             {//调度专员(ZXLD) 中心领导(ZXLDGLY) 中心领导管理员(ZXLDGLYGLY)
579
                 int[] sts = { 1, 3, 5 };
579
                 int[] sts = { 1, 3, 5 };
580
 
580
 
817
                     }
817
                     }
818
                     #endregion
818
                     #endregion
819
                     #region 调度专员(ZXLD) 中心领导(ZXLDGLY) 中心领导管理员(ZXLDGLYGLY)
819
                     #region 调度专员(ZXLD) 中心领导(ZXLDGLY) 中心领导管理员(ZXLDGLYGLY)
820
-                    if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "MTDD" || User.F_RoleCode == "ZXLDGLY" || User.F_RoleCode == "ZXLDGLYGLY")
820
+                    if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "MTDD" || User.F_RoleCode == "ZXLDGLY" || User.F_RoleCode == "ZXLDGLYGLY" || User.F_RoleCode == "DMTSH")
821
                     {//调度专员(ZXLD) 中心领导(ZXLDGLY) 中心领导管理员(ZXLDGLYGLY)
821
                     {//调度专员(ZXLD) 中心领导(ZXLDGLY) 中心领导管理员(ZXLDGLYGLY)
822
                         int[] sts = { 1, 3, 5 };
822
                         int[] sts = { 1, 3, 5 };
823
 
823
 
1129
                     + " where F_State=1 and F_IsDelete=0 and ISNULL(F_FeedbackTime, '')='' and  F_DeptId = '" + User.F_DeptId + "' ";
1129
                     + " where F_State=1 and F_IsDelete=0 and ISNULL(F_FeedbackTime, '')='' and  F_DeptId = '" + User.F_DeptId + "' ";
1130
             }
1130
             }
1131
 
1131
 
1132
-            if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "MTDD")
1132
+            if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "MTDD" || User.F_RoleCode == "DMTSH")
1133
             {
1133
             {
1134
                 sql += " and  F_CreateUser = '" + User.F_UserCode + "' ";
1134
                 sql += " and  F_CreateUser = '" + User.F_UserCode + "' ";
1135
             }
1135
             }
1151
                     + " where F_State=1 and F_IsDelete=0 and F_LimitTime<getdate() and ISNULL(F_FeedbackTime, '')='' and  F_DeptId = '" + User.F_DeptId + "' ";
1151
                     + " where F_State=1 and F_IsDelete=0 and F_LimitTime<getdate() and ISNULL(F_FeedbackTime, '')='' and  F_DeptId = '" + User.F_DeptId + "' ";
1152
             }
1152
             }
1153
 
1153
 
1154
-            if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "MTDD" )
1154
+            if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "MTDD" || User.F_RoleCode == "DMTSH")
1155
             {
1155
             {
1156
                 sqltimeout += " and  F_CreateUser = '" + User.F_UserCode + "' ";
1156
                 sqltimeout += " and  F_CreateUser = '" + User.F_UserCode + "' ";
1157
             }
1157
             }

File diff suppressed because it is too large
+ 318 - 24
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Sms/SmsNewController.cs


+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

45
                 {
45
                 {
46
                     sql += " and F_DeptId=" + Id;
46
                     sql += " and F_DeptId=" + Id;
47
                 }
47
                 }
48
-                if (User.F_RoleCode == "GLY" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "ZXHWY"|| User.F_RoleCode == "MTDD")
48
+                if (User.F_RoleCode == "GLY" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "ZXHWY"|| User.F_RoleCode == "MTDD" || User.F_RoleCode == "DMTSH")
49
                 {
49
                 {
50
                 }
50
                 }
51
                 else
51
                 else

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/WebChart/InfoController.cs

1029
             string lx = "select COUNT(1) from t_bus_workorder where F_InfoSource != '1' and F_InfoSource != '2501' and F_InfoSource != '2580' and F_WorkState = 1 and F_IsDelete = 0 and datediff(DAY , F_CreateTime , getdate())= 0 "+ sql;
1029
             string lx = "select COUNT(1) from t_bus_workorder where F_InfoSource != '1' and F_InfoSource != '2501' and F_InfoSource != '2580' and F_WorkState = 1 and F_IsDelete = 0 and datediff(DAY , F_CreateTime , getdate())= 0 "+ sql;
1030
             string ys = "select COUNT(1) from t_bus_workorder where F_InfoSource != '1' and F_InfoSource != '2501' and F_InfoSource != '2580' and F_WorkState = 5 and F_IsDelete = 0 "+ sql;
1030
             string ys = "select COUNT(1) from t_bus_workorder where F_InfoSource != '1' and F_InfoSource != '2501' and F_InfoSource != '2580' and F_WorkState = 5 and F_IsDelete = 0 "+ sql;
1031
             string th = "select COUNT(1) from t_bus_workorder where F_InfoSource != '1' and F_InfoSource != '2501' and F_InfoSource != '2580' and F_WorkState = 3 and F_IsDelete = 0 "+ sql;
1031
             string th = "select COUNT(1) from t_bus_workorder where F_InfoSource != '1' and F_InfoSource != '2501' and F_InfoSource != '2580' and F_WorkState = 3 and F_IsDelete = 0 "+ sql;
1032
-            string bj = "select COUNT(1) from t_bus_workorder where F_InfoSource != '1' and F_InfoSource != '2501' and F_InfoSource != '2580' and F_WorkState = 1 and F_IsDelete = 0 and datediff(DAY , F_CloseTime  , getdate())= 0  "+ sql;
1032
+            string bj = "select COUNT(1) from t_bus_workorder where F_InfoSource != '1' and F_InfoSource != '2501' and F_InfoSource != '2580' and F_IsDelete = 0 and datediff(DAY , F_CloseTime  , getdate())= 0  "+ sql;
1033
             var lxcount = DbHelperSQL.Query(lx).Tables[0];
1033
             var lxcount = DbHelperSQL.Query(lx).Tables[0];
1034
             var yscount = DbHelperSQL.Query(ys).Tables[0];
1034
             var yscount = DbHelperSQL.Query(ys).Tables[0];
1035
             var thcount = DbHelperSQL.Query(th).Tables[0];
1035
             var thcount = DbHelperSQL.Query(th).Tables[0];

+ 18 - 5
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/WebChart/InfoNewController.cs

976
         /// <returns></returns>
976
         /// <returns></returns>
977
         public ActionResult GetDeptDeptAchievements(string starttime="", string endtime="",int type=0)
977
         public ActionResult GetDeptDeptAchievements(string starttime="", string endtime="",int type=0)
978
         {
978
         {
979
-            if (RedisHelper.StringGet("InfoNewGetDeptAchievements"+ type) != null)
979
+
980
+            if (string.IsNullOrEmpty(starttime))
981
+            {
982
+                starttime = DateTime.Now.AddMonths(-1).ToString("yyyy-MM") + "-21 00:00:00";
983
+                endtime = DateTime.Now.ToString("yyyy-MM") + "-20 00:00:00";
984
+            }
985
+            else
986
+            {
987
+                if (string.IsNullOrEmpty(endtime))
988
+                {
989
+                    endtime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
990
+                }
991
+            }
992
+            if (RedisHelper.StringGet("InfoNewGetDeptAchievements"+ type+ starttime+ endtime) != null)
980
             {
993
             {
981
                     Task.Run(() =>
994
                     Task.Run(() =>
982
                 {
995
                 {
985
                     paras.Add("@sdate", starttime);
998
                     paras.Add("@sdate", starttime);
986
                     paras.Add("@edate", endtime);
999
                     paras.Add("@edate", endtime);
987
                     var ob = DbHelperSQL.RunProcedure("P_DeptAchievements", paras, "DeptAchievements").Tables[0]; ;
1000
                     var ob = DbHelperSQL.RunProcedure("P_DeptAchievements", paras, "DeptAchievements").Tables[0]; ;
988
-                    RedisHelper.KeyDelete("InfoNewGetDeptAchievements" + type);
989
-                    RedisHelper.StringSet("InfoNewGetDeptAchievements" + type, ob.ToJson(), new TimeSpan(0, 5, 0));
1001
+                    RedisHelper.KeyDelete("InfoNewGetDeptAchievements" + type + starttime + endtime);
1002
+                    RedisHelper.StringSet("InfoNewGetDeptAchievements" + type + starttime + endtime, ob.ToJson(), new TimeSpan(0, 5, 0));
990
                     
1003
                     
991
                 });
1004
                 });
992
                 
1005
                 
993
-                return Content(RedisHelper.StringGet("InfoNewGetDeptAchievements"+ type).ToString());
1006
+                return Content(RedisHelper.StringGet("InfoNewGetDeptAchievements"+ type + starttime + endtime).ToString());
994
             }
1007
             }
995
             else
1008
             else
996
             {
1009
             {
999
                 paras.Add("@sdate", starttime);
1012
                 paras.Add("@sdate", starttime);
1000
                 paras.Add("@edate", endtime);
1013
                 paras.Add("@edate", endtime);
1001
                 var obj = DbHelperSQL.RunProcedure("P_DeptAchievements", paras, "DeptAchievements").Tables[0]; ;
1014
                 var obj = DbHelperSQL.RunProcedure("P_DeptAchievements", paras, "DeptAchievements").Tables[0]; ;
1002
-                RedisHelper.StringSet("InfoNewGetDeptAchievements"+ type, obj.ToJson(), new TimeSpan(0, 5, 0));
1015
+                RedisHelper.StringSet("InfoNewGetDeptAchievements"+ type + starttime + endtime, obj.ToJson(), new TimeSpan(0, 5, 0));
1003
                 return Content(obj.ToJson());
1016
                 return Content(obj.ToJson());
1004
             }
1017
             }
1005
 
1018
 

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/AddressBookController.cs

46
             {
46
             {
47
                 pagesize = Convert.ToInt32(strpagesize);
47
                 pagesize = Convert.ToInt32(strpagesize);
48
             }
48
             }
49
-            if (User.F_RoleCode == "GLY" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "ZXHWY"|| User.F_RoleCode == "MTDD" || User.F_RoleCode == "YSZY")
49
+            if (User.F_RoleCode == "GLY" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "ZXHWY"|| User.F_RoleCode == "MTDD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "DMTSH")
50
             {
50
             {
51
             }
51
             }
52
             else
52
             else

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/RepositoryController.cs

75
             {
75
             {
76
                 sql += " and F_DeptId ='" + deptid + "'";
76
                 sql += " and F_DeptId ='" + deptid + "'";
77
             }
77
             }
78
-            else if (User.F_RoleCode != "GLY" || User.F_RoleCode != "ZXLD" || User.F_RoleCode != "ZXHWY"|| User.F_RoleCode != "MTDD")
78
+            else if (User.F_RoleCode != "GLY" || User.F_RoleCode != "ZXLD" || User.F_RoleCode != "ZXHWY"|| User.F_RoleCode != "MTDD" || User.F_RoleCode != "DMTSH")
79
             {
79
             {
80
                 sql += " and F_DeptId ='" + User.F_DeptId  + "'";
80
                 sql += " and F_DeptId ='" + User.F_DeptId  + "'";
81
             }
81
             }

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WorkOrderReportController.cs

1087
         /// <param name="isdc"></param>
1087
         /// <param name="isdc"></param>
1088
         /// <returns></returns>
1088
         /// <returns></returns>
1089
         public ActionResult GetDeptDeptAchievements(string starttime, string endtime
1089
         public ActionResult GetDeptDeptAchievements(string starttime, string endtime
1090
-            ,int type=0,int   deptid=0)
1090
+            , int type=0,int   deptid=0)
1091
         {
1091
         {
1092
             if (string.IsNullOrEmpty(starttime))
1092
             if (string.IsNullOrEmpty(starttime))
1093
             {
1093
             {

+ 65 - 31
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

100
 
100
 
101
             if (notconnected>0)
101
             if (notconnected>0)
102
             {
102
             {
103
-                sql += "and CallNumber in (select CallNumber from T_Call_CallRecords where CallType = 0  group by CallNumber having SUM( case when CallState = 1 and DealType = 6 then 1 else 0 end )= 0)";
103
+               if (notconnected!=2)
104
+                {
105
+                    string where = "";
106
+                    if (starttime.Trim() != "")
107
+                    {
108
+                        where += " and BeginTime>='" + starttime + "' ";
109
+                    }
110
+                    if (endtime.Trim() != "")
111
+                    {
112
+                        where += " and BeginTime<='" + endtime + "' ";
113
+                    }
114
+                    sql += "and CallNumber in (select CallNumber from T_Call_CallRecords where CallType = 0" + where + "  group by CallNumber having SUM( case when CallState = 1 and DealType = 6 then 1 else 0 end )= 0)";
115
+                }
116
+                
104
             }
117
             }
105
-           
118
+            if (starttime.Trim() != "")
119
+            {
120
+                sql += " and BeginTime>='" + starttime + "' ";
121
+            }
122
+            if (endtime.Trim() != "")
123
+            {
124
+                sql += " and BeginTime<='" + endtime + "' ";
125
+            }
126
+
106
             //else
127
             //else
107
             //    sql += " and isnull(UserCode,'')<>'' ";
128
             //    sql += " and isnull(UserCode,'')<>'' ";
108
             if (calltype.Trim() != "")
129
             if (calltype.Trim() != "")
130
             {
151
             {
131
                 sql += " and ActionType=" + actiontype.Trim();
152
                 sql += " and ActionType=" + actiontype.Trim();
132
             }
153
             }
133
-            if (starttime.Trim() != "")
134
-            {
135
-                sql += " and BeginTime>='" + starttime + "' ";
136
-            }
137
-            if (endtime.Trim() != "")
138
-            { 
139
-                sql += " and BeginTime<='" + endtime + "' ";
140
-            }
154
+           
141
             if(extnumber.Trim()!="")
155
             if(extnumber.Trim()!="")
142
             {
156
             {
143
                 sql += " and isnull(ExtNumber,'')='" + extnumber.Trim() + "'";
157
                 sql += " and isnull(ExtNumber,'')='" + extnumber.Trim() + "'";
172
             else
186
             else
173
             {
187
             {
174
                 int recordCount = 0;
188
                 int recordCount = 0;
175
-                dt = BLL.PagerBLL.GetListPager(
176
-                    "T_Call_CallRecords WITH(NOLOCK)",
177
-                    "CallRecordsId",
178
-                    "*,dbo.GetUserName(UserCode) as UserName, WorkOrderId,dbo.GetDictionaryName(F_CallInType) as TypeName",
179
-                    sql,
180
-                    "ORDER BY CallRecordsId desc",
181
-                    pagesize,
182
-                    pageindex,
183
-                    true,
184
-                    out recordCount);
189
+                if (notconnected==2)
190
+                {
185
 
191
 
186
-                var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayPath' ").FirstOrDefault();
192
+                    dt = BLL.PagerBLL.GetListPager(
193
+                   "(select COUNT(1) count, CallNumber from  T_Call_CallRecords where CallType = 0 "+sql +" group by CallNumber having SUM( case when CallState = 1 and DealType = 6 then 1 else 0 end) = 0) a",
194
+                   "CallNumber",
195
+                   "*",
196
+                   "",
197
+                   "order by a.count",
198
+                   pagesize,
199
+                   pageindex,
200
+                   true,
201
+                   out recordCount);
187
 
202
 
188
-                foreach (DataRow dr in dt.Rows)
203
+                }
204
+                else
189
                 {
205
                 {
190
-                    string path = dr["FilePath"] != null ? dr["FilePath"].ToString() : "";
191
-                    if (path != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
206
+                    
207
+                    dt = BLL.PagerBLL.GetListPager(
208
+                        "T_Call_CallRecords WITH(NOLOCK)",
209
+                        "CallRecordsId",
210
+                        "*,dbo.GetUserName(UserCode) as UserName, WorkOrderId,dbo.GetDictionaryName(F_CallInType) as TypeName",
211
+                        sql,
212
+                        "ORDER BY CallRecordsId desc ",
213
+                        pagesize,
214
+                        pageindex,
215
+                        true,
216
+                        out recordCount);
217
+
218
+                    var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayPath' ").FirstOrDefault();
219
+
220
+                    foreach (DataRow dr in dt.Rows)
192
                     {
221
                     {
193
-                        var ym = config.F_ParamValue;
194
-                        if (ym.Substring(ym.Length - 1) == "/")
222
+                        string path = dr["FilePath"] != null ? dr["FilePath"].ToString() : "";
223
+                        if (path != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
195
                         {
224
                         {
196
-                            ym = ym.Substring(0, ym.Length - 1);
197
-                        }
225
+                            var ym = config.F_ParamValue;
226
+                            if (ym.Substring(ym.Length - 1) == "/")
227
+                            {
228
+                                ym = ym.Substring(0, ym.Length - 1);
229
+                            }
198
 
230
 
199
-                        string lujing = path.Substring(path.IndexOf(':') + 1).Replace('\\', '/');
200
-                        string wlpath = ym + lujing;
231
+                            string lujing = path.Substring(path.IndexOf(':') + 1).Replace('\\', '/');
232
+                            string wlpath = ym + lujing;
201
 
233
 
202
-                        dr["FilePath"] = wlpath;
234
+                            dr["FilePath"] = wlpath;
235
+                        }
203
                     }
236
                     }
204
                 }
237
                 }
238
+             
205
 
239
 
206
                 var obj = new
240
                 var obj = new
207
                 {
241
                 {

+ 813 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/APPSController.cs

21
 using System.Text;
21
 using System.Text;
22
 using System.Net;
22
 using System.Net;
23
 using System.Threading.Tasks;
23
 using System.Threading.Tasks;
24
+using System.Security.Cryptography;
24
 
25
 
25
 namespace CallCenterApi.Interface.Controllers.workorder
26
 namespace CallCenterApi.Interface.Controllers.workorder
26
 {
27
 {
3970
         }
3971
         }
3971
 
3972
 
3972
         #endregion
3973
         #endregion
3974
+
3975
+        #region 人民网对接
3976
+
3977
+        /// <summary>
3978
+        /// MD5加密
3979
+        /// </summary>
3980
+        /// <param name="txt"></param>
3981
+        /// <returns></returns>
3982
+        public static string Md5(string txt)
3983
+        {
3984
+            byte[] sor = Encoding.UTF8.GetBytes(txt);
3985
+            MD5 md5 = MD5.Create();
3986
+            byte[] result = md5.ComputeHash(sor);
3987
+            StringBuilder strbul = new StringBuilder(40);
3988
+            for (int i = 0; i < result.Length; i++)
3989
+            {
3990
+                //加密结果"x2"结果为32位,"x3"结果为48位,"x4"结果为64位
3991
+                strbul.Append(result[i].ToString("x2"));
3992
+            }
3993
+            return strbul.ToString().ToLower(); ;
3994
+        }
3995
+        public class Review
3996
+        {
3997
+            public List<contentList> contentList { set; get; }
3998
+        }
3999
+        public class contentList
4000
+        {
4001
+            public int objId { set; get; }
4002
+            public string nickName { set; get; }
4003
+            public string content { set; get; }
4004
+            public int dateline { set; get; }
4005
+            public string subject { set; get; }
4006
+            public int dataType { set; get; }
4007
+            public string stateInfo { set; get; }
4008
+
4009
+        }
4010
+        public class details
4011
+        {
4012
+            public List <contentLists> contentList { set; get; }
4013
+        }
4014
+        public class contentLists
4015
+        {
4016
+            public decimal? longitude { set; get; }//经度
4017
+            public decimal? latitude { set; get; }//维度
4018
+            public string threadPlace { set; get; }//地址
4019
+        }
4020
+
4021
+        public class resultData
4022
+        {
4023
+            public List<Data> data { set; get; }
4024
+            public string lastItem { set; get; }
4025
+        }
4026
+        public class Data
4027
+        {
4028
+            public int tid { set; get; }//id
4029
+            public string forumName { set; get; }//板块名称
4030
+            public string subject { set; get; }//标题
4031
+            public string nickName { set; get; }//昵称
4032
+            public string typeName { set; get; }//留言类型名称
4033
+            public string domainName { set; get; }//领域类型名称
4034
+            public string stateInfo { set; get; }//状态信息
4035
+            public int dateline { set; get; }//留言时间时间戳
4036
+            public string videoImgUrl { set; get; }//视频预览图地址
4037
+            public string videoUrl { set; get; }//视频地址
4038
+            public int videoDuration { set; get; }//视频时常
4039
+            public string content { set; get; }//内容
4040
+            public int threadsCheckTime { set; get; }//留言审核时间
4041
+            public hiddenInfo hiddenInfo { set; get; }
4042
+            public List<attachmentList> attachmentList { set; get; }// 附件
4043
+            public string topicMainTitle { set; get; }// 附件列表
4044
+            public int attachment { set; get; }// 是否有附件 1:有附件,0:无附件
4045
+        }
4046
+        public class hiddenInfo
4047
+        {
4048
+            public string realName { set; get; }//姓名
4049
+            public string phone { set; get; }//电话号码
4050
+            public string remark { set; get; }//备注
4051
+
4052
+        }
4053
+        public class attachmentList
4054
+        {
4055
+            public int aid { set; get; }
4056
+            public string orgFileUrl { set; get; }
4057
+            public string midPicUrl { set; get; }
4058
+            public string smallPicUrl { set; get; }
4059
+            public int originalType { set; get; }
4060
+            public string videoPicUrl { set; get; }
4061
+            public string videoUrl { set; get; }
4062
+            public int isPublic { set; get; }
4063
+            public int duration { set; get; }
4064
+            public string ossRequestId { set; get; }
4065
+        }
4066
+        private FileUp fileup = new FileUp();
4067
+        private string lastItem = "";
4068
+        //待回复wait_to_answer 待一次解释wait_to_first_explain 待二次解释wait_to_second_explain
4069
+        public ActionResult GetLY(int display = 1, string searchState = "wait_to_answer")
4070
+        {
4071
+            string token = Login();
4072
+            Dictionary<string, string> LY = new Dictionary<string, string>();
4073
+            LY.Add("fid", "1150");
4074
+            LY.Add("display", display.ToString());
4075
+            LY.Add("lastItem", lastItem);
4076
+            LY.Add("searchState", searchState);
4077
+            //序列化参数
4078
+            // 发送请求
4079
+            var request = (HttpWebRequest)WebRequest.Create(rmwurl+"/v1/org/threads/list-ans");
4080
+            request.Method = "POST";
4081
+            request.ContentType = "application/json;charset=UTF-8";
4082
+            var byteData = Encoding.UTF8.GetBytes(createParamMap("/v1/org/threads/list-ans", LY.ToJson(), token).ToJson());
4083
+            var length = byteData.Length;
4084
+            request.ContentLength = length;
4085
+            var writer = request.GetRequestStream();
4086
+            writer.Write(byteData, 0, length);
4087
+            writer.Close();
4088
+            //接收数据
4089
+            var response = (HttpWebResponse)request.GetResponse();
4090
+            var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8")).ReadToEnd();
4091
+            //  var responseString = HttpMethods.HttpPost(Smsurl, jsonParam, "application/json;charset=UTF-8");
4092
+            JObject jo = (JObject)JsonConvert.DeserializeObject(responseString);
4093
+            resultData resultData = JsonConvert.DeserializeObject<resultData>(jo["resultData"].ToString());
4094
+
4095
+            if (resultData.data != null && resultData.data.Count > 0)
4096
+            {
4097
+                foreach (var it in resultData.data)
4098
+                {
4099
+                    lastItem = resultData.lastItem;
4100
+                    var Peoples = new BLL.T_Bus_People().GetModelList("tid='" + it.tid + "'");
4101
+                    Model.T_Bus_People People = new Model.T_Bus_People();
4102
+                    if (Peoples != null && Peoples.Count > 0)
4103
+                    {
4104
+                        People = Peoples.FirstOrDefault();
4105
+                        if (display == 1)
4106
+                            continue;
4107
+                        else if (searchState == "wait_to_first_explain" && People.state == 1)
4108
+                            continue;
4109
+                        else if (searchState == "wait_to_second_explain" && People.state == 2)
4110
+                            continue;
4111
+
4112
+                        GetHFLY(People, token, searchState);
4113
+                    }
4114
+                    else
4115
+                    {
4116
+                        if (display != 1)
4117
+                            continue;
4118
+                        Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = new Model.T_Bus_WorkOrder();
4119
+                        using (TransactionScope trans = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0, 10, 0)))
4120
+                        {
4121
+                            #region 保存工单信息
4122
+                            string creattime = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00";
4123
+                            string endtime = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59";
4124
+
4125
+                            modelT_Bus_WorkOrder.F_WorkOrderId = new BLL.T_Bus_WorkOrder().GetNewWorkOrderID(4, 4964, creattime, endtime);
4126
+                            modelT_Bus_WorkOrder.F_InfoSource = 4;//信息来源
4127
+                            modelT_Bus_WorkOrder.F_PhoneType = "";//电话类型
4128
+                            if (it.typeName == "咨询")
4129
+                                modelT_Bus_WorkOrder.F_InfoType = 9;
4130
+                            else if (it.typeName == "建言")
4131
+                                modelT_Bus_WorkOrder.F_InfoType = 12;
4132
+                            else if (it.typeName == "投诉")
4133
+                                modelT_Bus_WorkOrder.F_InfoType = 11;
4134
+                            else if (it.typeName == "求助")
4135
+                                modelT_Bus_WorkOrder.F_InfoType = 10;
4136
+                            else if (it.typeName == "感谢")
4137
+                                modelT_Bus_WorkOrder.F_InfoType = 13;
4138
+                            else
4139
+                                modelT_Bus_WorkOrder.F_InfoType = 90;
4140
+
4141
+                      
4142
+
4143
+                            if (it.hiddenInfo != null)
4144
+                            {
4145
+                                modelT_Bus_WorkOrder.F_CusName = it.hiddenInfo.realName;
4146
+                                modelT_Bus_WorkOrder.F_CusPhone = it.hiddenInfo.phone;
4147
+                                modelT_Bus_WorkOrder.F_ConName = it.hiddenInfo.realName;
4148
+                                modelT_Bus_WorkOrder.F_ConPhone = it.hiddenInfo.realName;
4149
+                            }
4150
+                            modelT_Bus_WorkOrder.F_CusSex = "2";
4151
+                            modelT_Bus_WorkOrder.F_CusAddress = "";
4152
+                            modelT_Bus_WorkOrder.F_ComTitle = "【" + it.domainName + " " + it.typeName + "】" + it.subject;
4153
+                            modelT_Bus_WorkOrder.F_ComContent = it.content;
4154
+                            modelT_Bus_WorkOrder.F_Key = "";
4155
+                            modelT_Bus_WorkOrder.F_IsProtect = 1;
4156
+                            modelT_Bus_WorkOrder.F_Latitude = 0;
4157
+                            modelT_Bus_WorkOrder.F_Longitude = 0;
4158
+                            modelT_Bus_WorkOrder.F_VisitType = 0;
4159
+                            string path = "/Upload/People/" + DateTime.Now.ToString("yyyy") + "/" + DateTime.Now.ToString("MM") + "/" + DateTime.Now.ToString("dd") + "/";
4160
+                            string resid = "";
4161
+                            if (it.attachment == 1)
4162
+                            {
4163
+                                if (it.attachmentList != null && it.attachmentList.Count > 0)
4164
+                                {
4165
+                                    foreach (var ia in it.attachmentList)
4166
+                                    {
4167
+                                        string item = "";
4168
+                                        if (ia.originalType == 1)
4169
+                                        {
4170
+                                            item = ia.orgFileUrl;
4171
+                                        }
4172
+                                        else
4173
+                                        {
4174
+                                            item = ia.videoPicUrl;
4175
+                                        }
4176
+                                        var filename = fileup.GetFileName(item);
4177
+                                        var fileext = fileup.GetExt(item);
4178
+                                        ImageUpload iu = new ImageUpload();
4179
+                                        iu.SavePath = path;
4180
+                                        var re = iu.downloadurl(item, filename);
4181
+
4182
+                                        if (re == "")
4183
+                                        {
4184
+                                            #region 附件保存
4185
+                                            Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
4186
+                                            model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
4187
+                                            model_T_Sys_Accessories.F_FileName = filename;//附件名称
4188
+                                            model_T_Sys_Accessories.F_FileType = fileext;//附件类型
4189
+                                            model_T_Sys_Accessories.F_FileUrl = path + filename;//附件地址
4190
+                                            model_T_Sys_Accessories.F_Size = 0;//iu.FileSize;
4191
+                                            model_T_Sys_Accessories.F_UserCode = "人民网";//上传人  
4192
+                                            var assid = new BLL.T_Sys_Accessories().Add(model_T_Sys_Accessories);
4193
+                                            model_T_Sys_Accessories.F_FileId = assid;
4194
+                                            #endregion
4195
+                                            if (assid > 0)
4196
+                                            {
4197
+                                                resid += "," + assid.ToString();
4198
+                                            }
4199
+                                            else
4200
+                                                continue;
4201
+                                        }
4202
+
4203
+                                    }
4204
+                                }
4205
+
4206
+                            }
4207
+                            if (!string.IsNullOrEmpty(it.videoUrl))
4208
+                            {
4209
+                                string item = it.videoUrl;
4210
+                                var filename = fileup.GetFileName(item);
4211
+                                var fileext = fileup.GetExt(item);
4212
+                                ImageUpload iu = new ImageUpload();
4213
+                                iu.SavePath = path;
4214
+                                var re = iu.downloadurl(item, filename);
4215
+                                if (re == "")
4216
+                                {
4217
+                                    #region 附件保存
4218
+                                    Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
4219
+                                    model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
4220
+                                    model_T_Sys_Accessories.F_FileName = filename;//附件名称
4221
+                                    model_T_Sys_Accessories.F_FileType = fileext;//附件类型
4222
+                                    model_T_Sys_Accessories.F_FileUrl = path + filename;//附件地址
4223
+                                    model_T_Sys_Accessories.F_Size = 0;//iu.FileSize;
4224
+                                    model_T_Sys_Accessories.F_UserCode = "人民网";//上传人  
4225
+                                    var assid = new BLL.T_Sys_Accessories().Add(model_T_Sys_Accessories);
4226
+                                    model_T_Sys_Accessories.F_FileId = assid;
4227
+                                    #endregion
4228
+                                    if (assid > 0)
4229
+                                    {
4230
+                                        resid += "," + assid.ToString();
4231
+                                    }
4232
+                                    else
4233
+                                        continue;
4234
+                                }
4235
+                            }
4236
+                            if (!string.IsNullOrEmpty(resid))
4237
+                            {
4238
+                                modelT_Bus_WorkOrder.F_File = resid.TrimStart(',');
4239
+                            }
4240
+                            modelT_Bus_WorkOrder.F_Level = 1;
4241
+                            modelT_Bus_WorkOrder.F_IsResult = 0;
4242
+                            modelT_Bus_WorkOrder.F_CreateUser = "人民网";//登记人工号
4243
+                            try
4244
+                            {
4245
+                                modelT_Bus_WorkOrder.F_CreateTime = DateTimeConvert.FromSendTimetag(it.dateline);
4246
+                            }
4247
+                            catch
4248
+                            {
4249
+                                modelT_Bus_WorkOrder.F_CreateTime = DateTime.Now;//登记时间
4250
+                            }
4251
+                            modelT_Bus_WorkOrder.F_WorkState = 1;// 0;//工单状态0登记中
4252
+                            modelT_Bus_WorkOrder.F_IsClosed = 0;//工单是否关闭
4253
+                            modelT_Bus_WorkOrder.F_IsOverdue = 0;//是否逾期(0:否,1:是)
4254
+                            modelT_Bus_WorkOrder.F_IsDelete = 0;//是否删除(0:否,1:是)
4255
+                            modelT_Bus_WorkOrder.F_ToBereply = 0;
4256
+                            modelT_Bus_WorkOrder.F_Business = 0;
4257
+                            if (it.forumName.Contains ("市长"))
4258
+                            modelT_Bus_WorkOrder.F_SplitUser = "市长";
4259
+                            else if (it.forumName.Contains("省长"))
4260
+                                modelT_Bus_WorkOrder.F_SplitUser = "省长";
4261
+                            else
4262
+                                modelT_Bus_WorkOrder.F_SplitUser = it.forumName;
4263
+                            details resultDatas = GetDetails(token, it .tid);
4264
+                            if (resultDatas!=null && resultDatas.contentList!=null && resultDatas.contentList .Count >0)
4265
+                            {
4266
+
4267
+                                modelT_Bus_WorkOrder.F_Longitude = resultDatas.contentList[0].longitude;
4268
+                                modelT_Bus_WorkOrder.F_Latitude  = resultDatas.contentList[0].latitude ;
4269
+                                modelT_Bus_WorkOrder.F_SourceAddress = resultDatas.contentList[0].threadPlace ;
4270
+                            }
4271
+                            #region
4272
+                            #endregion
4273
+                            modelT_Bus_WorkOrder.F_Id = new BLL.T_Bus_WorkOrder().Add(modelT_Bus_WorkOrder);
4274
+                            #endregion
4275
+                            if (modelT_Bus_WorkOrder.F_Id > 0)
4276
+                            {
4277
+                                People.tid = it.tid;
4278
+                                People.forumName = it.forumName;
4279
+                                People.subject = it.subject;
4280
+                                People.nickName = it.nickName;
4281
+                                People.typeName = it.typeName;
4282
+                                People.domainName = it.domainName;
4283
+                                People.stateInfo = it.stateInfo;
4284
+                                //待回复wait_to_answer 待一次解释 待二次解释wait_to_second_explain
4285
+                                if (display == 1)
4286
+                                    People.state = 0;
4287
+                                else if (searchState == "wait_to_first_explain")
4288
+                                    People.state = 1;
4289
+                                else if (searchState == "wait_to_second_explain")
4290
+                                    People.state = 2;
4291
+                                People.dateline = DateTimeConvert.FromSendTimetag(it.dateline);
4292
+                                People.videoImgUrl = it.videoImgUrl;
4293
+                                People.videoUrl = it.videoUrl;
4294
+                                People.videoDuration = it.videoDuration;
4295
+                                People.content = it.content;
4296
+                                People.threadsCheckTime = DateTimeConvert.FromSendTimetag(it.threadsCheckTime);
4297
+                                if (it.hiddenInfo != null)
4298
+                                {
4299
+                                    People.realName = it.hiddenInfo.realName;
4300
+                                    People.phone = it.hiddenInfo.phone;
4301
+                                    People.remark = it.hiddenInfo.remark;
4302
+
4303
+                                }
4304
+                                if (it.attachment == 1)
4305
+                                {
4306
+                                    if (it.attachmentList != null && it.attachmentList.Count > 0)
4307
+                                    {
4308
+                                        foreach (var ia in it.attachmentList)
4309
+                                        {
4310
+                                            People.aid += "," + ia.aid;
4311
+                                        }
4312
+                                    }
4313
+                                    if (!string.IsNullOrEmpty(People.aid))
4314
+                                        People.aid = People.aid.TrimStart(',');
4315
+                                }
4316
+                                People.topicMainTitle = it.topicMainTitle;
4317
+                                People.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
4318
+
4319
+                                if (Peoples != null && Peoples.Count > 0)
4320
+                                    new BLL.T_Bus_People().Update(People);
4321
+                                else
4322
+                                    new BLL.T_Bus_People().Add(People);
4323
+                                string userinfo = "人民网";
4324
+                                string message = "";
4325
+                                message = userinfo + " 登记并提交工单,工单编号:" + modelT_Bus_WorkOrder.F_WorkOrderId;
4326
+                                // var curuser = User;
4327
+                                #region 插入操作记录
4328
+                                Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
4329
+                                oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
4330
+                                oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
4331
+                                oper.F_CallRecordId = modelT_Bus_WorkOrder.F_CallRecordId;
4332
+                                oper.F_File = modelT_Bus_WorkOrder.F_File;
4333
+                                oper.F_Message = message;
4334
+                                oper.F_CreateUser = "人民网";
4335
+                                oper.F_CreateTime = DateTime.Now;
4336
+                                oper.F_IsDelete = 0;
4337
+                                new BLL.T_Bus_Operation().Add(oper);
4338
+                                #endregion
4339
+                            }
4340
+                            trans.Complete();
4341
+                        }
4342
+
4343
+                    }
4344
+
4345
+
4346
+
4347
+                }
4348
+                LYlIST(token, display, searchState);
4349
+            }
4350
+            return Success("添加成功");
4351
+        }
4352
+        public details GetDetails(string token,int tid)
4353
+        {
4354
+            Dictionary<string, object> XQ = new Dictionary<string, object>();
4355
+            XQ.Add("fromTrash", 0);
4356
+            XQ.Add("tid", tid);
4357
+
4358
+            //序列化参数
4359
+            // 发送请求
4360
+            var request = (HttpWebRequest)WebRequest.Create(rmwurl + "/v1/threads/content");
4361
+            request.Method = "POST";
4362
+            request.ContentType = "application/json;charset=UTF-8";
4363
+            var byteData = Encoding.UTF8.GetBytes(createParamMap("/v1/threads/content", XQ.ToJson(), token).ToJson());
4364
+            var length = byteData.Length;
4365
+            request.ContentLength = length;
4366
+            var writers = request.GetRequestStream();
4367
+            writers.Write(byteData, 0, length);
4368
+            writers.Close();
4369
+            //接收数据
4370
+            var response = (HttpWebResponse)request.GetResponse();
4371
+            var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8")).ReadToEnd();
4372
+            JObject jo = (JObject)JsonConvert.DeserializeObject(responseString);
4373
+            details resultData = JsonConvert.DeserializeObject<details>(jo["resultData"].ToString());
4374
+            return resultData;
4375
+        }
4376
+        public void GetHFLY(Model.T_Bus_People People, string token,string searchState)
4377
+        {
4378
+            if (searchState == "wait_to_first_explain")
4379
+                People.state = 1;
4380
+            else if (searchState == "wait_to_second_explain")
4381
+                People.state = 2;
4382
+            new BLL.T_Bus_People().Update(People);
4383
+            Dictionary<string, object > LY = new Dictionary<string, object>();
4384
+                LY.Add("tid", People.tid );
4385
+                //序列化参数
4386
+                // 发送请求
4387
+                var request = (HttpWebRequest)WebRequest.Create(rmwurl+"/v1/org/threads/content");
4388
+                request.Method = "POST";
4389
+                request.ContentType = "application/json;charset=UTF-8";
4390
+
4391
+                var byteData = Encoding.UTF8.GetBytes(createParamMap("/v1/org/threads/content", LY.ToJson(), token).ToJson());
4392
+                var length = byteData.Length;
4393
+                request.ContentLength = length;
4394
+                var writer = request.GetRequestStream();
4395
+                writer.Write(byteData, 0, length);
4396
+                writer.Close();
4397
+                //接收数据
4398
+                var response = (HttpWebResponse)request.GetResponse();
4399
+                var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8")).ReadToEnd();
4400
+
4401
+                //  var responseString = HttpMethods.HttpPost(Smsurl, jsonParam, "application/json;charset=UTF-8");
4402
+                JObject jo = (JObject)JsonConvert.DeserializeObject(responseString);
4403
+                Review resultData = JsonConvert.DeserializeObject<Review>(jo["resultData"].ToString());
4404
+                if (resultData.contentList != null && resultData.contentList.Count > 0)
4405
+                {
4406
+                    foreach (var it in resultData.contentList)
4407
+                    {
4408
+                        if (it.dataType == 6)
4409
+                        {
4410
+                            var model = new BLL.T_Bus_WorkOrder().GetModel(People.F_WorkOrderId);
4411
+                            if (model != null)
4412
+                            {
4413
+                                string strStm_Src_Dsc = "人民网";
4414
+                                string strWrkOrder_Cst_Ssf_Cd = it.stateInfo;
4415
+                                string content = it.content;
4416
+                                DateTime time = DateTimeConvert.FromSendTimetag(it.dateline);
4417
+                                string strSql = string.Format(@"INSERT INTO PublicComment ( [WorkOrderId], [strStm_Src_Dsc], [strWrkOrder_Cst_Ssf_Cd], [strUdt_Psn_ID], [strSsf_Cst_Ass_CntDsc], [strRltv_InsID], [strInpt_Inst_Nm], [strHpCnt], [CreateTime],[str_type]) 
4418
+                   values   ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}') ;select @@IDENTITY ", model.F_WorkOrderId, strStm_Src_Dsc, strWrkOrder_Cst_Ssf_Cd, "", content, "", "", "", time, 2);
4419
+                                object objres = DbHelperSQL.GetSingle(strSql);
4420
+
4421
+                            }
4422
+                        }
4423
+
4424
+                    }
4425
+
4426
+
4427
+                }
4428
+            
4429
+        }
4430
+        public void LYlIST(string token, int display, string searchState)
4431
+        {
4432
+
4433
+            Dictionary<string, string> LY = new Dictionary<string, string>();
4434
+            LY.Add("fid", "1150");
4435
+            LY.Add("display", display.ToString());
4436
+            LY.Add("lastItem", lastItem);
4437
+            LY.Add("searchState", searchState);
4438
+            //序列化参数
4439
+            // 发送请求
4440
+            var request = (HttpWebRequest)WebRequest.Create(rmwurl+"/v1/org/threads/list-ans");
4441
+            request.Method = "POST";
4442
+            request.ContentType = "application/json;charset=UTF-8";
4443
+
4444
+            var byteData = Encoding.UTF8.GetBytes(createParamMap("/v1/org/threads/list-ans", LY.ToJson(), token).ToJson());
4445
+            var length = byteData.Length;
4446
+            request.ContentLength = length;
4447
+            var writer = request.GetRequestStream();
4448
+            writer.Write(byteData, 0, length);
4449
+            writer.Close();
4450
+            //接收数据
4451
+            var response = (HttpWebResponse)request.GetResponse();
4452
+            var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8")).ReadToEnd();
4453
+            JObject jo = (JObject)JsonConvert.DeserializeObject(responseString);
4454
+            resultData resultData = JsonConvert.DeserializeObject<resultData>(jo["resultData"].ToString());
4455
+            if (resultData.data != null && resultData.data.Count > 0)
4456
+            {
4457
+                foreach (var it in resultData.data)
4458
+                {
4459
+                    lastItem = resultData.lastItem;
4460
+                    var Peoples = new BLL.T_Bus_People().GetModelList("tid='" + it.tid + "'");
4461
+                    Model.T_Bus_People People = new Model.T_Bus_People();
4462
+                    if (Peoples != null && Peoples.Count > 0)
4463
+                    {
4464
+                        People = Peoples.FirstOrDefault();
4465
+                        if (display == 1)
4466
+                            continue;
4467
+                        else if (searchState == "wait_to_first_explain" && People.state == 1)
4468
+                            continue;
4469
+                        else if (searchState == "wait_to_second_explain" && People.state == 2)
4470
+                            continue;
4471
+                        GetHFLY(People, token, searchState);
4472
+                    }
4473
+                    else
4474
+                    {
4475
+                        if (display != 1)
4476
+                            continue;
4477
+                        Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = new Model.T_Bus_WorkOrder();
4478
+
4479
+                        using (TransactionScope trans = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0, 10, 0)))
4480
+                        {
4481
+                            #region 保存工单信息
4482
+                            string creattime = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00";
4483
+                            string endtime = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59";
4484
+
4485
+                            modelT_Bus_WorkOrder.F_WorkOrderId = new BLL.T_Bus_WorkOrder().GetNewWorkOrderID(4, 4964, creattime, endtime);
4486
+                            modelT_Bus_WorkOrder.F_InfoSource = 4;//信息来源
4487
+                            modelT_Bus_WorkOrder.F_PhoneType = "";//电话类型
4488
+                            if (it.typeName == "咨询")
4489
+                                modelT_Bus_WorkOrder.F_InfoType = 9;
4490
+                            else if (it.typeName == "建言")
4491
+                                modelT_Bus_WorkOrder.F_InfoType = 12;
4492
+                            else if (it.typeName == "投诉")
4493
+                                modelT_Bus_WorkOrder.F_InfoType = 11;
4494
+                            else if (it.typeName == "求助")
4495
+                                modelT_Bus_WorkOrder.F_InfoType = 10;
4496
+                            else if (it.typeName == "感谢")
4497
+                                modelT_Bus_WorkOrder.F_InfoType = 13;
4498
+                            else
4499
+                                modelT_Bus_WorkOrder.F_InfoType = 90;
4500
+
4501
+                           
4502
+
4503
+                            if (it.hiddenInfo != null)
4504
+                            {
4505
+                                modelT_Bus_WorkOrder.F_CusName = it.hiddenInfo.realName;
4506
+                                modelT_Bus_WorkOrder.F_CusPhone = it.hiddenInfo.phone;
4507
+                                modelT_Bus_WorkOrder.F_ConName = it.hiddenInfo.realName;
4508
+                                modelT_Bus_WorkOrder.F_ConPhone = it.hiddenInfo.realName;
4509
+                            }
4510
+                            modelT_Bus_WorkOrder.F_CusSex = "2";
4511
+                            modelT_Bus_WorkOrder.F_CusAddress = "";
4512
+
4513
+
4514
+
4515
+                            modelT_Bus_WorkOrder.F_ComTitle = "【" + it.domainName + " " + it.typeName + "】" + it.subject;
4516
+
4517
+                            modelT_Bus_WorkOrder.F_ComContent = it.content;
4518
+                            modelT_Bus_WorkOrder.F_Key = "";
4519
+
4520
+                            modelT_Bus_WorkOrder.F_IsProtect = 1;
4521
+                            modelT_Bus_WorkOrder.F_Latitude = 0;
4522
+                            modelT_Bus_WorkOrder.F_Longitude = 0;
4523
+                            modelT_Bus_WorkOrder.F_VisitType = 0;
4524
+                            string path = "/Upload/People/" + DateTime.Now.ToString("yyyy") + "/" + DateTime.Now.ToString("MM") + "/" + DateTime.Now.ToString("dd") + "/";
4525
+                            string resid = "";
4526
+                            if (it.attachment == 1)
4527
+                            {
4528
+                                if (it.attachmentList != null && it.attachmentList.Count > 0)
4529
+                                {
4530
+                                    foreach (var ia in it.attachmentList)
4531
+                                    {
4532
+                                        string item = "";
4533
+                                        if (ia.originalType == 1)
4534
+                                        {
4535
+                                            item = ia.orgFileUrl;
4536
+                                        }
4537
+                                        else
4538
+                                        {
4539
+                                            item = ia.videoPicUrl;
4540
+                                        }
4541
+
4542
+                                        var filename = fileup.GetFileName(item);
4543
+                                        var fileext = fileup.GetExt(item);
4544
+                                        ImageUpload iu = new ImageUpload();
4545
+                                        iu.SavePath = path;
4546
+                                        var re = iu.downloadurl(item, filename);
4547
+
4548
+                                        if (re == "")
4549
+                                        {
4550
+                                            #region 附件保存
4551
+                                            Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
4552
+                                            model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
4553
+                                            model_T_Sys_Accessories.F_FileName = filename;//附件名称
4554
+                                            model_T_Sys_Accessories.F_FileType = fileext;//附件类型
4555
+                                            model_T_Sys_Accessories.F_FileUrl = path + filename;//附件地址
4556
+                                            model_T_Sys_Accessories.F_Size = 0;//iu.FileSize;
4557
+                                            model_T_Sys_Accessories.F_UserCode = "人民网";//上传人  
4558
+                                            var assid = new BLL.T_Sys_Accessories().Add(model_T_Sys_Accessories);
4559
+                                            model_T_Sys_Accessories.F_FileId = assid;
4560
+                                            #endregion
4561
+                                            if (assid > 0)
4562
+                                            {
4563
+                                                resid += "," + assid.ToString();
4564
+                                            }
4565
+                                            else
4566
+                                                continue;
4567
+                                        }
4568
+
4569
+                                    }
4570
+                                }
4571
+
4572
+                            }
4573
+                            if (!string.IsNullOrEmpty(it.videoUrl))
4574
+                            {
4575
+                                string item = it.videoUrl;
4576
+                                var filename = fileup.GetFileName(item);
4577
+                                var fileext = fileup.GetExt(item);
4578
+                                ImageUpload iu = new ImageUpload();
4579
+                                iu.SavePath = path;
4580
+                                var re = iu.downloadurl(item, filename);
4581
+                                if (re == "")
4582
+                                {
4583
+                                    #region 附件保存
4584
+                                    Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
4585
+                                    model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
4586
+                                    model_T_Sys_Accessories.F_FileName = filename;//附件名称
4587
+                                    model_T_Sys_Accessories.F_FileType = fileext;//附件类型
4588
+                                    model_T_Sys_Accessories.F_FileUrl = path + filename;//附件地址
4589
+                                    model_T_Sys_Accessories.F_Size = 0;//iu.FileSize;
4590
+                                    model_T_Sys_Accessories.F_UserCode = "人民网";//上传人  
4591
+                                    var assid = new BLL.T_Sys_Accessories().Add(model_T_Sys_Accessories);
4592
+                                    model_T_Sys_Accessories.F_FileId = assid;
4593
+                                    #endregion
4594
+                                    if (assid > 0)
4595
+                                    {
4596
+                                        resid += "," + assid.ToString();
4597
+                                    }
4598
+                                    else
4599
+                                        continue;
4600
+                                }
4601
+                            }
4602
+                            if (!string.IsNullOrEmpty(resid))
4603
+                            {
4604
+                                modelT_Bus_WorkOrder.F_File = resid.TrimStart(',');
4605
+                            }
4606
+                            modelT_Bus_WorkOrder.F_Level = 1;
4607
+                            modelT_Bus_WorkOrder.F_IsResult = 0;
4608
+                            modelT_Bus_WorkOrder.F_CreateUser = "人民网";//登记人工号
4609
+                            try
4610
+                            {
4611
+                                modelT_Bus_WorkOrder.F_CreateTime = DateTimeConvert.FromSendTimetag(it.dateline);
4612
+                            }
4613
+                            catch
4614
+                            {
4615
+                                modelT_Bus_WorkOrder.F_CreateTime = DateTime.Now;//登记时间
4616
+                            }
4617
+
4618
+                            modelT_Bus_WorkOrder.F_WorkState = 1;// 0;//工单状态0登记中
4619
+                            modelT_Bus_WorkOrder.F_IsClosed = 0;//工单是否关闭
4620
+                            modelT_Bus_WorkOrder.F_IsOverdue = 0;//是否逾期(0:否,1:是)
4621
+                            modelT_Bus_WorkOrder.F_IsDelete = 0;//是否删除(0:否,1:是)
4622
+                            modelT_Bus_WorkOrder.F_ToBereply = 0;
4623
+                            modelT_Bus_WorkOrder.F_Business = 0;
4624
+
4625
+                            #region
4626
+                            if (it.forumName.Contains("市长"))
4627
+                                modelT_Bus_WorkOrder.F_SplitUser = "市长";
4628
+                            else if (it.forumName.Contains("省长"))
4629
+                                modelT_Bus_WorkOrder.F_SplitUser = "省长";
4630
+                            else
4631
+                                modelT_Bus_WorkOrder.F_SplitUser = it.forumName;
4632
+
4633
+                            //序列化参数
4634
+                            // 发送请求
4635
+                            details resultDatas = GetDetails(token, it.tid);
4636
+                            if (resultDatas != null && resultDatas.contentList != null && resultDatas.contentList.Count > 0)
4637
+                            {
4638
+
4639
+                                modelT_Bus_WorkOrder.F_Longitude = resultDatas.contentList[0].longitude;
4640
+                                modelT_Bus_WorkOrder.F_Latitude = resultDatas.contentList[0].latitude;
4641
+                                modelT_Bus_WorkOrder.F_SourceAddress = resultDatas.contentList[0].threadPlace;
4642
+                            }
4643
+                            #endregion
4644
+                            modelT_Bus_WorkOrder.F_Id = new BLL.T_Bus_WorkOrder().Add(modelT_Bus_WorkOrder);
4645
+
4646
+                            #endregion
4647
+                            if (modelT_Bus_WorkOrder.F_Id > 0)
4648
+                            {
4649
+                                People.tid = it.tid;
4650
+                                People.forumName = it.forumName;
4651
+                                People.subject = it.subject;
4652
+                                People.nickName = it.nickName;
4653
+                                People.typeName = it.typeName;
4654
+                                People.domainName = it.domainName;
4655
+                                People.stateInfo = it.stateInfo;
4656
+                                People.state = 0;
4657
+                                People.dateline = DateTimeConvert.FromSendTimetag(it.dateline);
4658
+                                People.videoImgUrl = it.videoImgUrl;
4659
+                                People.videoUrl = it.videoUrl;
4660
+                                People.videoDuration = it.videoDuration;
4661
+                                People.content = it.content;
4662
+                                People.threadsCheckTime = DateTimeConvert.FromSendTimetag(it.threadsCheckTime);
4663
+                                if (it.hiddenInfo != null)
4664
+                                {
4665
+                                    People.realName = it.hiddenInfo.realName;
4666
+                                    People.phone = it.hiddenInfo.phone;
4667
+                                    People.remark = it.hiddenInfo.remark;
4668
+
4669
+                                }
4670
+                                if (it.attachment == 1)
4671
+                                {
4672
+                                    if (it.attachmentList != null && it.attachmentList.Count > 0)
4673
+                                    {
4674
+                                        foreach (var ia in it.attachmentList)
4675
+                                        {
4676
+                                            People.aid += "," + ia.aid;
4677
+                                        }
4678
+                                    }
4679
+                                    if (!string.IsNullOrEmpty(People.aid))
4680
+                                        People.aid = People.aid.TrimStart(',');
4681
+                                }
4682
+                                People.topicMainTitle = it.topicMainTitle;
4683
+                                People.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
4684
+
4685
+                                if (Peoples != null && Peoples.Count > 0)
4686
+                                    new BLL.T_Bus_People().Update(People);
4687
+                                else
4688
+                                    new BLL.T_Bus_People().Add(People);
4689
+                                string userinfo = "人民网";
4690
+                                string message = "";
4691
+                                message = userinfo + " 登记并提交工单,工单编号:" + modelT_Bus_WorkOrder.F_WorkOrderId;
4692
+                                // var curuser = User;
4693
+                                #region 插入操作记录
4694
+                                Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
4695
+                                oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
4696
+                                oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
4697
+                                oper.F_CallRecordId = modelT_Bus_WorkOrder.F_CallRecordId;
4698
+                                oper.F_File = modelT_Bus_WorkOrder.F_File;
4699
+                                oper.F_Message = message;
4700
+                                oper.F_CreateUser = "人民网";
4701
+                                oper.F_CreateTime = DateTime.Now;
4702
+                                oper.F_IsDelete = 0;
4703
+                                new BLL.T_Bus_Operation().Add(oper);
4704
+                                #endregion
4705
+                            }
4706
+                            trans.Complete();
4707
+                        }
4708
+
4709
+
4710
+                    }
4711
+
4712
+
4713
+
4714
+                }
4715
+                LYlIST(token, display, searchState);
4716
+            }
4717
+        }
4718
+
4719
+
4720
+        public class login
4721
+        {
4722
+            public string loginName { set; get; }
4723
+            public string password { set; get; }
4724
+        }
4725
+        public string Login()
4726
+        {
4727
+            Dictionary<string, string> login = new Dictionary<string, string>();
4728
+            login.Add("loginName", "ayszxx");
4729
+            login.Add("password", "5116008");
4730
+            //序列化参数
4731
+
4732
+            // 发送请求
4733
+            //序列化参数
4734
+
4735
+            // 发送请求
4736
+            var request = (HttpWebRequest)WebRequest.Create(rmwurl+"/v1/user/login");
4737
+            request.Method = "POST";
4738
+            request.ContentType = "application/json;charset=UTF-8";
4739
+
4740
+            var byteData = Encoding.UTF8.GetBytes(createParamMap("/v1/user/login", login.ToJson()).ToJson());
4741
+            var length = byteData.Length;
4742
+            request.ContentLength = length;
4743
+            var writer = request.GetRequestStream();
4744
+            writer.Write(byteData, 0, length);
4745
+            writer.Close();
4746
+            //接收数据
4747
+            var response = (HttpWebResponse)request.GetResponse();
4748
+            var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8")).ReadToEnd();
4749
+
4750
+
4751
+            JObject paras = null;
4752
+            paras = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(responseString);
4753
+            var txnBodyCom = paras["resultData"].ToString();
4754
+            var result = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(txnBodyCom);
4755
+            //  token = jo["token"].ToString();
4756
+            // string result = SmsNewHelper.Send(mobiles, Content);
4757
+
4758
+            return result["token"].ToString();
4759
+        }
4760
+        private string APP_CODE = Configs.GetValue("APP_CODE");
4761
+        private string APP_SECRET = Configs.GetValue("APP_SECRET");
4762
+        private string rmwurl = Configs.GetValue("Rmwurl");
4763
+        //private string APP_CODE = "314f185e71e74dd8879ab154746f7681";
4764
+        //private string APP_SECRET = "900a640b37e84a8c88ffc83d6f3500f6";
4765
+        //private string rmwurl = "http://liuyan-api.people.com.cn/api";
4766
+        public Dictionary<string, string> createParamMap(string url, string param)
4767
+        {
4768
+            Dictionary<string, string> parame = new Dictionary<string, string>();
4769
+            parame.Add("appCode", APP_CODE);
4770
+            parame.Add("param", param);
4771
+            parame.Add("signature", Md5(url + param + APP_SECRET));
4772
+            return parame;
4773
+        }
4774
+
4775
+        public Dictionary<string, string> createParamMap(string url, string param, string token)
4776
+        {
4777
+            Dictionary<string, string> parame = new Dictionary<string, string>();
4778
+            parame.Add("token", token);
4779
+            parame.Add("appCode", APP_CODE);
4780
+            parame.Add("param", param);
4781
+            parame.Add("signature", Md5(url + param + APP_SECRET + token));
4782
+            return parame;
4783
+        }
4784
+
4785
+        #endregion
3973
     }
4786
     }
3974
 }
4787
 }

File diff suppressed because it is too large
+ 209 - 570
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/AffairsController.cs


+ 510 - 101
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

6
 using CallCenterApi.Interface.Controllers.Sms;
6
 using CallCenterApi.Interface.Controllers.Sms;
7
 using CallCenterApi.Interface.Models.Common;
7
 using CallCenterApi.Interface.Models.Common;
8
 using CallCenterApi.Model;
8
 using CallCenterApi.Model;
9
-
9
+using Newtonsoft.Json.Linq;
10
 using System;
10
 using System;
11
 using System.Collections.Generic;
11
 using System.Collections.Generic;
12
 using System.Data;
12
 using System.Data;
13
 using System.IO;
13
 using System.IO;
14
 using System.Linq;
14
 using System.Linq;
15
 using System.Net;
15
 using System.Net;
16
+using System.Security.Cryptography;
16
 using System.Text;
17
 using System.Text;
17
 using System.Threading.Tasks;
18
 using System.Threading.Tasks;
18
 using System.Transactions;
19
 using System.Transactions;
72
             int sourcearea = RequestString.GetInt("sourcearea", 0);
73
             int sourcearea = RequestString.GetInt("sourcearea", 0);
73
             int deptid = RequestString.GetInt("deptid", 0);
74
             int deptid = RequestString.GetInt("deptid", 0);
74
             int pydt = RequestString.GetInt("pydt", 0);
75
             int pydt = RequestString.GetInt("pydt", 0);
76
+            string myd = HttpUtility.UrlDecode(RequestString.GetQueryString("myd"));
75
             int zdpy = RequestString.GetInt("zdpy", 0);
77
             int zdpy = RequestString.GetInt("zdpy", 0);
76
             int smpy = RequestString.GetInt("smpy", 0);
78
             int smpy = RequestString.GetInt("smpy", 0);
77
             int dealtype = RequestString.GetInt("dealtype", -1);
79
             int dealtype = RequestString.GetInt("dealtype", -1);
189
             string value1 = "";
191
             string value1 = "";
190
             if (pydt > 0)
192
             if (pydt > 0)
191
             {
193
             {
192
-                if (zdpy > 0)
194
+                string comment = "";
195
+                if (!string.IsNullOrEmpty(myd))
193
                 {
196
                 {
194
-                    sql += " and datediff(day,F_CreateTime,getdate() )>15 and F_WorkState = 9 and F_CloseTime is not null " +
195
-                        "and   F_WorkOrderId not in (select WorkOrderId   from PublicComment WITH(NOLOCK) )";
197
+                    comment+= "b.strWrkOrder_Cst_Ssf_Cd='" + myd + "'";
198
+                }
199
+                    if (zdpy > 0)
200
+                {
201
+                    if (!string.IsNullOrEmpty(myd))
202
+                    {
203
+                        sql += " and datediff(day,F_CreateTime,getdate() )>15 and F_WorkState = 9 and F_CloseTime is not null " +
204
+                       "and   F_WorkOrderId not in (select WorkOrderId   from PublicComment WITH(NOLOCK) where strWrkOrder_Cst_Ssf_Cd='"+ myd + "')";
205
+                    }
206
+                    else
207
+                    {
208
+                        sql += " and datediff(day,F_CreateTime,getdate() )>15 and F_WorkState = 9 and F_CloseTime is not null " +
209
+                       "and   F_WorkOrderId not in (select WorkOrderId   from PublicComment WITH(NOLOCK) )";
210
+                    }
211
+                   
196
                 }
212
                 }
197
                 else if (smpy > 0)
213
                 else if (smpy > 0)
198
                 {
214
                 {
199
-                    //sql += " and  F_WorkOrderId in (select WorkOrderId   from PublicComment WITH(NOLOCK) ) ";
200
-                    value1 = "inner join PublicComment b on  a .F_WorkOrderId =b .WorkOrderId ";
215
+                    value1 = "inner join PublicComment b on  a .F_WorkOrderId =b .WorkOrderId "+ comment;
201
                 }
216
                 }
202
                 else
217
                 else
203
                 {
218
                 {
204
                     sql += " and (datediff(day,F_CreateTime,getdate() )>15 and F_WorkState = 9 and F_CloseTime is not null)  ";
219
                     sql += " and (datediff(day,F_CreateTime,getdate() )>15 and F_WorkState = 9 and F_CloseTime is not null)  ";
205
-                    value1 = "left join PublicComment b on  a .F_WorkOrderId =b .WorkOrderId ";
220
+                    value1 = "left join PublicComment b on  a .F_WorkOrderId =b .WorkOrderId "+ comment;
206
                 }
221
                 }
222
+               
207
             }
223
             }
208
             else if (dbdata > 0)
224
             else if (dbdata > 0)
209
             {
225
             {
1720
             int deptid = RequestString.GetInt("deptid", 0);
1736
             int deptid = RequestString.GetInt("deptid", 0);
1721
             int deptlevel = RequestString.GetInt("deptlevel", 0);
1737
             int deptlevel = RequestString.GetInt("deptlevel", 0);
1722
             int issms = RequestString.GetInt("issms", -1);
1738
             int issms = RequestString.GetInt("issms", -1);
1739
+            int smspy = RequestString.GetInt("smspy", -1);//0未发送短信1
1723
             int db = RequestString.GetInt("db", 0);
1740
             int db = RequestString.GetInt("db", 0);
1724
             int visit = RequestString.GetInt("visit", -1);//0满意1一评不满意2二评不满意
1741
             int visit = RequestString.GetInt("visit", -1);//0满意1一评不满意2二评不满意
1725
             string strpageindex = RequestString.GetQueryString("page");
1742
             string strpageindex = RequestString.GetQueryString("page");
1747
                     sql += " and F_DealTime<='" + dealstrendtime + "' ";
1764
                     sql += " and F_DealTime<='" + dealstrendtime + "' ";
1748
                 }
1765
                 }
1749
             }
1766
             }
1767
+            if(smspy>-1)
1768
+            {
1769
+                if (smspy==0)
1770
+                {
1771
+                    sql += "and F_IsSms = 1 and F_WorkOrderID not in (select WorkOrderId   from PublicComment)";
1772
+                }
1773
+                else if (smspy == 1)
1774
+                {//短信默认好评
1775
+                    sql += "and F_IsSms = 1 and F_WorkOrderID  in (select WorkOrderId   from PublicComment where " +
1776
+                        " strSsf_Cst_Ass_CntDsc ='15天未评议自动评议工单')";
1777
+                }
1778
+                else if (smspy == 2)
1779
+                {//短信人工好评
1780
+                    sql += "and F_IsSms = 1 and F_WorkOrderID  in (select WorkOrderId   from PublicComment where " +
1781
+                        " strSsf_Cst_Ass_CntDsc !='15天未评议自动评议工单' and strWrkOrder_Cst_Ssf_Cd !='不满意' and strWrkOrder_Cst_Ssf_Cd !='非常不满意')";
1782
+                }
1783
+                else if (smspy == 3)
1784
+                {//短信人工差评
1785
+                    sql += "and F_IsSms = 1 and F_WorkOrderID  in (select WorkOrderId   from PublicComment where " +
1786
+                        " strSsf_Cst_Ass_CntDsc !='15天未评议自动评议工单' and strWrkOrder_Cst_Ssf_Cd  in ('不满意' or '非常不满意')";
1787
+                }
1788
+            }
1750
             switch (strtab)
1789
             switch (strtab)
1751
             {
1790
             {
1752
                 case "-1"://待处理工单(其他来源)
1791
                 case "-1"://待处理工单(其他来源)
1773
                             sql += " and F_WorkState in (" + (int)EnumWorkState.audit + "," + (int)EnumWorkState.auditreback + ") ";
1812
                             sql += " and F_WorkState in (" + (int)EnumWorkState.audit + "," + (int)EnumWorkState.auditreback + ") ";
1774
                             sql += "and F_WorkOrderID not in (select F_WorkOrderID from T_Bus_RemindRecord where F_Type=1 and F_IsDelete=0 and  (F_Content != '推诿工单' or F_Content is null  ) and F_State!=2)";
1813
                             sql += "and F_WorkOrderID not in (select F_WorkOrderID from T_Bus_RemindRecord where F_Type=1 and F_IsDelete=0 and  (F_Content != '推诿工单' or F_Content is null  ) and F_State!=2)";
1775
                         }
1814
                         }
1815
+                        else if (strstate.Trim() == "6" )
1816
+                        {
1817
+                            sql += " and F_WorkState = '" + strstate.Trim() + "' ";
1818
+                        }
1776
                         else
1819
                         else
1777
                         {
1820
                         {
1778
                             sql += "and F_ToBereply=" + tobereply;
1821
                             sql += "and F_ToBereply=" + tobereply;
2134
             }
2177
             }
2135
             else
2178
             else
2136
             {
2179
             {
2137
-                cols = "F_WorkOrderId,F_CusName,F_ComTitle,F_WorkState,F_MainDeptId,F_OtherDeptIds,F_DealTime,F_LeaveRecordId,F_CallRecordId,F_IsResult,F_IsProtect,F_IsReturn,F_CreateTime,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName,(select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK)  where F_Type=3 and F_State=1 and F_IsDelete=0" +
2180
+                cols = "F_WorkOrderId,F_InfoSource,F_CusName,F_ComTitle,F_WorkState,F_MainDeptId,F_OtherDeptIds,F_DealTime,F_LeaveRecordId,F_CallRecordId,F_IsResult,F_IsProtect,F_IsReturn,F_CreateTime,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName,(select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK)  where F_Type=3 and F_State=1 and F_IsDelete=0" +
2138
               "and F_WorkOrderId=a.F_WorkOrderId order by F_CreateTime desc ) as Backreason ,F_CloseTime,F_Identification,F_IsRelease";
2181
               "and F_WorkOrderId=a.F_WorkOrderId order by F_CreateTime desc ) as Backreason ,F_CloseTime,F_Identification,F_IsRelease";
2139
 
2182
 
2140
             }
2183
             }
2351
                 if (Int32.Parse(strtab) == 0 || Int32.Parse(strtab) == 3)
2394
                 if (Int32.Parse(strtab) == 0 || Int32.Parse(strtab) == 3)
2352
                 {
2395
                 {
2353
                     btns.Clear();
2396
                     btns.Clear();
2354
-                    btns = ButtonGroup.GetButtons(dr["F_WorkState"].ToString(), User.F_RoleCode.ToUpper(), dr["F_IsResult"].ToString(), iszbdw);
2397
+                    btns = ButtonGroup.GetButtons(dr["F_WorkState"].ToString(), User.F_RoleCode.ToUpper(), dr["F_IsResult"].ToString(), iszbdw
2398
+                        );
2399
+                    if (dr["F_InfoSource"].ToString()=="2580"&& dr["F_WorkState"].ToString()=="7")
2400
+                    {
2401
+                        if (User.F_RoleCode.ToUpper() == "ZJZY" || User.F_RoleCode.ToUpper() == "GNZY" || User.F_RoleCode.ToUpper() == "GLY" || User.F_RoleCode.ToUpper() == "ZXLD" || User.F_RoleCode.ToUpper() == "YSZY" || User.F_RoleCode.ToUpper() == "DDZG" || User.F_RoleCode.ToUpper() == "MTDD"|| User.F_RoleCode.ToUpper() == "ZXHWY")
2402
+                        {
2403
+                            var butts = btns.Find(c => c.key == ButtonGroup.visit().key);
2404
+                            if (butts != null)
2405
+                            {
2406
+                                btns.Remove(butts);
2407
+                                btns.Add(ButtonGroup.visits());
2408
+                            }
2409
+                               
2410
+                        }
2411
+                    }
2355
                     #region 判断是否存在待督办
2412
                     #region 判断是否存在待督办
2356
                     var recount = reminds.Where(r => r.F_WorkOrderId == dr["F_WorkOrderId"].ToString()).Count();
2413
                     var recount = reminds.Where(r => r.F_WorkOrderId == dr["F_WorkOrderId"].ToString()).Count();
2357
                     var butt = btns.Find(c => c.key == ButtonGroup.turnsee().key);
2414
                     var butt = btns.Find(c => c.key == ButtonGroup.turnsee().key);
2367
                         if ( butt != null)
2424
                         if ( butt != null)
2368
                             btns.Remove(butt);
2425
                             btns.Remove(butt);
2369
                     }
2426
                     }
2427
+
2428
+
2370
                     #endregion
2429
                     #endregion
2430
+                    if (dr["F_InfoSource"].ToString() == "4" && dr["F_WorkState"].ToString() == "7")
2431
+                    {
2432
+                        if (User.F_RoleCode.ToUpper() == "GLY" || User.F_RoleCode.ToUpper() == "MTDD")
2433
+                        {
2434
+                            var prople = new BLL.T_Bus_People().GetModelList("state !=3 and F_WorkOrderId='" + dr["F_WorkOrderId"].ToString() + "'");
2435
+                            if (prople != null&& prople.Count >0)
2436
+                            {
2437
+                                btns.Add(ButtonGroup.Explain());
2438
+                            }
2439
+
2440
+                        }
2441
+                    }
2371
                 }
2442
                 }
2372
                 else if (Int32.Parse(strtab) == 5)
2443
                 else if (Int32.Parse(strtab) == 5)
2373
                 {
2444
                 {
2598
                         {
2669
                         {
2599
                             if (issh==0)
2670
                             if (issh==0)
2600
                             {
2671
                             {
2601
-                                sql += "and F_WorkOrderID not in (select F_WorkOrderID from T_Bus_ToExamine where   F_AssignedId=0  " +
2602
-                                    "and F_Type!=0)";
2672
+                                sql += "and F_WorkOrderID not in (select F_WorkOrderID from T_Bus_ToExamine where   F_AssignedId=0  and F_IsDelete=0 and (F_Type!=0 or F_Type is null) and  F_State=0 ) ";
2603
                             }
2673
                             }
2604
                             else if (issh == 1)
2674
                             else if (issh == 1)
2605
                             {
2675
                             {
2807
                     //  sql += " and F_WorkOrderID in(select F_WorkOrderID from T_Bus_Feedback b WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_Type = 3 and F_IsAudit = 1  ) ";
2877
                     //  sql += " and F_WorkOrderID in(select F_WorkOrderID from T_Bus_Feedback b WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_Type = 3 and F_IsAudit = 1  ) ";
2808
                     // sql += "and F_WorkOrderID in(  select  b.F_WorkOrderID from T_Bus_Feedback b  WITH(NOLOCK)  inner join T_Bus_Feedback a on a.F_Id = b.F_Id and a .F_Id = (select max(t1.F_Id) from T_Bus_Feedback t1 where t1.F_WorkOrderId = b.F_WorkOrderId)  where b.F_State = 1 and b.F_IsDelete = 0 and b.F_Type = 3 and b.F_IsAudit = 1  ) ";
2878
                     // sql += "and F_WorkOrderID in(  select  b.F_WorkOrderID from T_Bus_Feedback b  WITH(NOLOCK)  inner join T_Bus_Feedback a on a.F_Id = b.F_Id and a .F_Id = (select max(t1.F_Id) from T_Bus_Feedback t1 where t1.F_WorkOrderId = b.F_WorkOrderId)  where b.F_State = 1 and b.F_IsDelete = 0 and b.F_Type = 3 and b.F_IsAudit = 1  ) ";
2809
                     sql += "and F_IsSendBack =1";
2879
                     sql += "and F_IsSendBack =1";
2810
-                    if (User.F_RoleCode != "GLY" && User.F_RoleCode != "ZXLD" && User.F_RoleCode != "YSZY" && User.F_RoleCode != "MTDD")
2880
+                    if (User.F_RoleCode != "GLY" && User.F_RoleCode != "DMTCK" && User.F_RoleCode != "ZXLD" && User.F_RoleCode != "YSZY" && User.F_RoleCode != "MTDD")
2811
                     {
2881
                     {
2812
                         sql += " and F_CreateUser='" + User.F_UserCode + "'";
2882
                         sql += " and F_CreateUser='" + User.F_UserCode + "'";
2813
                     }
2883
                     }
3237
                         btns.Add(ButtonGroup.turnsee());
3307
                         btns.Add(ButtonGroup.turnsee());
3238
                     }
3308
                     }
3239
 
3309
 
3240
-                    if (User.F_RoleCode.ToUpper() == "DMTSH" )
3310
+                    if (User.F_RoleCode.ToUpper() == "MTDD" && strtab=="0"&&issh ==2)
3241
                     {
3311
                     {
3242
                         btns.Add(ButtonGroup.AuditDispatch());
3312
                         btns.Add(ButtonGroup.AuditDispatch());
3243
                         btns.Add(ButtonGroup.Failed());
3313
                         btns.Add(ButtonGroup.Failed());
5120
                     break;
5190
                     break;
5121
 
5191
 
5122
                 case "3"://已办未果
5192
                 case "3"://已办未果
5123
-                    sql += " and F_WorkState = '6' ";
5193
+                    sql += " and F_WorkState in(6,7) ";
5124
                     sql += " and F_IsProResult = '" + 2 + "' ";
5194
                     sql += " and F_IsProResult = '" + 2 + "' ";
5125
                     sql += "  and F_WorkOrderID in(select F_WorkOrderID from T_Bus_Feedback_Next WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and F_Type in (1,2) ";
5195
                     sql += "  and F_WorkOrderID in(select F_WorkOrderID from T_Bus_Feedback_Next WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and F_Type in (1,2) ";
5126
                     if (User.F_RoleCode != "GLY" && User.F_RoleCode != "DDZG")
5196
                     if (User.F_RoleCode != "GLY" && User.F_RoleCode != "DDZG")
7892
             int pagesize = RequestString.GetInt("pagesize", 10);
7962
             int pagesize = RequestString.GetInt("pagesize", 10);
7893
             int business = RequestString.GetInt("business", 0);
7963
             int business = RequestString.GetInt("business", 0);
7894
             int Supervisor = RequestString.GetInt("Supervisor", 0);
7964
             int Supervisor = RequestString.GetInt("Supervisor", 0);
7965
+            string strSupervisor = HttpUtility.UrlDecode(RequestString.GetQueryString("strSupervisor"));//
7895
             int isExamine = RequestString.GetInt("isExamine", 0);
7966
             int isExamine = RequestString.GetInt("isExamine", 0);
7896
 
7967
 
7897
             int dbdeptid = RequestString.GetInt("dbdeptid", 0);
7968
             int dbdeptid = RequestString.GetInt("dbdeptid", 0);
7963
 
8034
 
7964
 
8035
 
7965
             int iscb = RequestString.GetInt("iscb", -1);
8036
             int iscb = RequestString.GetInt("iscb", -1);
8037
+
8038
+
7966
             if (business > 0)
8039
             if (business > 0)
7967
                 sql += " and F_Business = '1'";
8040
                 sql += " and F_Business = '1'";
7968
-           
8041
+            
8042
+            if (strSupervisor.Trim() != "" && strSupervisor != "undefined")
8043
+            {
8044
+                Remind += " and Supervisor ='" + strSupervisor + "' ";
8045
+            }
7969
             if (User.F_RoleCode == "DBZY")
8046
             if (User.F_RoleCode == "DBZY")
7970
             {
8047
             {
7971
                 if (Supervisor == 1)
8048
                 if (Supervisor == 1)
8110
                     else
8187
                     else
8111
                         sql += "and F_WorkState =6";
8188
                         sql += "and F_WorkState =6";
8112
                     break;
8189
                     break;
8190
+                case "7"://督办综合查询
8191
+
8192
+                    sql += "  and F_WorkOrderID in(" + sqlsup + "  )  " + "   and F_IsDelete=0  ";
8193
+                   
8194
+                    break;
8113
 
8195
 
8114
 
8196
 
8115
             }
8197
             }
8486
                                 }
8568
                                 }
8487
                                 else
8569
                                 else
8488
                                 {
8570
                                 {
8571
+                                    btns.Add(ButtonGroup.takeback());
8489
                                     btns.Add(ButtonGroup.forceend());
8572
                                     btns.Add(ButtonGroup.forceend());
8490
                                 }
8573
                                 }
8491
                             }
8574
                             }
11318
                       if (User.F_RoleCode == "GNZY")
11401
                       if (User.F_RoleCode == "GNZY")
11319
                         keyValuePairs.Add("F_EditUser", "GNZY");
11402
                         keyValuePairs.Add("F_EditUser", "GNZY");
11320
 
11403
 
11321
-                      if (User.F_RoleCode == "MTDD"&&!string .IsNullOrEmpty (maindeptids))
11404
+                      if (source !=1&& !string .IsNullOrEmpty (maindeptids))
11322
                        {
11405
                        {
11323
                         var deptlist = new BLL.T_Sys_Department().GetModelList("F_DeptId in (" + maindeptids + ")");
11406
                         var deptlist = new BLL.T_Sys_Department().GetModelList("F_DeptId in (" + maindeptids + ")");
11324
                         if (deptlist != null)
11407
                         if (deptlist != null)
11358
                             modelT_Bus_ToExamine.F_State = 0;
11441
                             modelT_Bus_ToExamine.F_State = 0;
11359
                             modelT_Bus_ToExamine.F_AssignedId = 0;
11442
                             modelT_Bus_ToExamine.F_AssignedId = 0;
11360
                             modelT_Bus_ToExamine.F_IsDelete = 0;
11443
                             modelT_Bus_ToExamine.F_IsDelete = 0;
11444
+                            modelT_Bus_ToExamine.F_Type = null;
11361
                             modelT_Bus_ToExamine.F_CreatUser = User.F_UserCode;
11445
                             modelT_Bus_ToExamine.F_CreatUser = User.F_UserCode;
11362
                             modelT_Bus_ToExamine.F_MainDeptId = maindeptids;
11446
                             modelT_Bus_ToExamine.F_MainDeptId = maindeptids;
11363
                             var n = new BLL.T_Bus_ToExamine().Update (modelT_Bus_ToExamine);
11447
                             var n = new BLL.T_Bus_ToExamine().Update (modelT_Bus_ToExamine);
11370
                             modelT_Bus_ToExamine.F_State = 0;
11454
                             modelT_Bus_ToExamine.F_State = 0;
11371
                             modelT_Bus_ToExamine.F_AssignedId = 0;
11455
                             modelT_Bus_ToExamine.F_AssignedId = 0;
11372
                             modelT_Bus_ToExamine.F_IsDelete = 0;
11456
                             modelT_Bus_ToExamine.F_IsDelete = 0;
11457
+                            modelT_Bus_ToExamine.F_Type = null;
11373
                             modelT_Bus_ToExamine.F_CreatUser = User.F_UserCode;
11458
                             modelT_Bus_ToExamine.F_CreatUser = User.F_UserCode;
11374
                             modelT_Bus_ToExamine.F_MainDeptId = maindeptids;
11459
                             modelT_Bus_ToExamine.F_MainDeptId = maindeptids;
11375
                             var n = new BLL.T_Bus_ToExamine().Add(modelT_Bus_ToExamine);
11460
                             var n = new BLL.T_Bus_ToExamine().Add(modelT_Bus_ToExamine);
11378
                       }
11463
                       }
11379
                 
11464
                 
11380
 
11465
 
11381
-                    modelT_Bus_WorkOrder.F_IsResult = isresult;
11466
+                        modelT_Bus_WorkOrder.F_IsResult = isresult;
11382
                         keyValuePairs.Add("F_Result", result);
11467
                         keyValuePairs.Add("F_Result", result);
11383
                         modelT_Bus_WorkOrder.F_Result = result;//处理结果
11468
                         modelT_Bus_WorkOrder.F_Result = result;//处理结果
11384
                         if (isopen > 0)
11469
                         if (isopen > 0)
11404
                             keyValuePairs.Add("F_CloseUser", User.F_UserCode);
11489
                             keyValuePairs.Add("F_CloseUser", User.F_UserCode);
11405
                             // modelT_Bus_WorkOrder.F_CloseUser = User.F_UserCode;
11490
                             // modelT_Bus_WorkOrder.F_CloseUser = User.F_UserCode;
11406
                             keyValuePairs.Add("F_CloseTime", DateTime.Now);
11491
                             keyValuePairs.Add("F_CloseTime", DateTime.Now);
11407
-
11408
-
11409
                         if (!string.IsNullOrEmpty(modelT_Bus_WorkOrder.F_MainWorkorder1))
11492
                         if (!string.IsNullOrEmpty(modelT_Bus_WorkOrder.F_MainWorkorder1))
11410
                         {
11493
                         {
11411
                             var model = workorderBLL.GetModel(modelT_Bus_WorkOrder.F_MainWorkorder1);
11494
                             var model = workorderBLL.GetModel(modelT_Bus_WorkOrder.F_MainWorkorder1);
11575
 
11658
 
11576
                             }
11659
                             }
11577
                         }
11660
                         }
11578
-
11579
                         // modelT_Bus_WorkOrder.F_CloseTime = DateTime.Now;
11661
                         // modelT_Bus_WorkOrder.F_CloseTime = DateTime.Now;
11580
-                        if (!string.IsNullOrEmpty(file))
11581
-                        {
11582
-                            Model.T_Bus_Feedback modelT_Bus_Feedback = new T_Bus_Feedback();
11583
-                            modelT_Bus_Feedback.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;//工单编号
11584
-
11585
-                            modelT_Bus_Feedback.F_DealUser = User.F_UserCode;
11586
-                            modelT_Bus_Feedback.F_Result = result;//反馈内容
11587
-                            #region 20200114新增字段 zhengbingbing
11588
-
11589
-                            modelT_Bus_Feedback.F_IsProtect = modelT_Bus_WorkOrder.F_IsProtect;//是否保密(0:否1:是)
11590
-
11591
-                            DateTime contime = DateTime.Now;
11592
-                            modelT_Bus_Feedback.F_IsProResult = 1;
11593
-                            #endregion
11594
-                            modelT_Bus_Feedback.F_File = file;
11595
-                            modelT_Bus_Feedback.F_IsAudit = 0;
11596
-                            modelT_Bus_Feedback.F_IsDelete = 0;
11597
-                            modelT_Bus_Feedback.F_CreateUser = User.F_UserCode;//办理人
11598
-                            modelT_Bus_Feedback.F_CreateTime = DateTime.Now;//办理时间
11599
-                            modelT_Bus_Feedback.F_CreateDeptId = User.F_DeptId;//办理部门
11600
-                            modelT_Bus_Feedback.F_IsFeedEnd = 1;
11601
-                            modelT_Bus_Feedback.F_State = 1;
11602
-                            modelT_Bus_Feedback.F_Type = 1;
11603
-
11604
-                            new BLL.T_Bus_Feedback().Add(modelT_Bus_Feedback);
11605
                         }
11662
                         }
11606
-                    }
11607
                         else if (issubmit == 1)
11663
                         else if (issubmit == 1)
11608
                         {
11664
                         {
11609
                             keyValuePairs.Add("F_SubmitTime", DateTime.Now);
11665
                             keyValuePairs.Add("F_SubmitTime", DateTime.Now);
11611
                             keyValuePairs.Add("F_WorkState", 1);
11667
                             keyValuePairs.Add("F_WorkState", 1);
11612
                             modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.submit;// 1;//提交领导
11668
                             modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.submit;// 1;//提交领导
11613
                         }
11669
                         }
11614
-                        #region
11670
+
11671
+                    if (!string.IsNullOrEmpty(file))
11672
+                    {
11673
+                        Model.T_Bus_Feedback modelT_Bus_Feedback = new T_Bus_Feedback();
11674
+                        modelT_Bus_Feedback.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;//工单编号
11675
+                        modelT_Bus_Feedback.F_DealUser = User.F_UserCode;
11676
+                        modelT_Bus_Feedback.F_Result = result;//反馈内容
11677
+                        #region 20200114新增字段 zhengbingbing
11678
+                        modelT_Bus_Feedback.F_IsProtect = modelT_Bus_WorkOrder.F_IsProtect;//是否保密(0:否1:是)
11679
+                        DateTime contime = DateTime.Now;
11680
+                        modelT_Bus_Feedback.F_IsProResult = 1;
11615
                         #endregion
11681
                         #endregion
11616
-                        if (state > 0)
11682
+                        modelT_Bus_Feedback.F_File = file;
11683
+                        modelT_Bus_Feedback.F_IsAudit = 0;
11684
+                        modelT_Bus_Feedback.F_IsDelete = 0;
11685
+                        modelT_Bus_Feedback.F_CreateUser = User.F_UserCode;//办理人
11686
+                        modelT_Bus_Feedback.F_CreateTime = DateTime.Now;//办理时间
11687
+                        modelT_Bus_Feedback.F_CreateDeptId = User.F_DeptId;//办理部门
11688
+                        modelT_Bus_Feedback.F_IsFeedEnd = 1;
11689
+                        modelT_Bus_Feedback.F_State = 1;
11690
+                        modelT_Bus_Feedback.F_Type = 1;
11691
+                        new BLL.T_Bus_Feedback().Add(modelT_Bus_Feedback);
11692
+                    }
11693
+                    #region
11694
+                    #endregion
11695
+                    if (state > 0)
11617
                         {
11696
                         {
11618
                             if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "ZXLDGLYGLY" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG" || User.F_RoleCode == "MTDD")
11697
                             if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "ZXLDGLYGLY" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG" || User.F_RoleCode == "MTDD")
11619
                             {
11698
                             {
13998
         public ActionResult TakeBackWorkOrder()
14077
         public ActionResult TakeBackWorkOrder()
13999
         {
14078
         {
14000
 
14079
 
14001
-            if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "ZXLDGLYGLY" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG" || User.F_RoleCode == "MTDD")
14080
+            if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "ZXLDGLYGLY" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG" || User.F_RoleCode == "MTDD" || User.F_RoleCode == "DBZY")
14002
             {
14081
             {
14003
                 string workorderid = RequestString.GetFormString("workorderid");
14082
                 string workorderid = RequestString.GetFormString("workorderid");
14004
 
14083
 
14078
                                 new BLL.T_Bus_Feedback_Next().Update(cg);
14157
                                 new BLL.T_Bus_Feedback_Next().Update(cg);
14079
                             }
14158
                             }
14080
                             #endregion
14159
                             #endregion
14081
-
14160
+                          var   modelT_Bus_RemindRecord = new BLL.T_Bus_RemindRecord().GetModelList(" F_State !=2  and F_IsDelete = 0 and F_Type = 1 and F_WorkOrderId = '" 
14161
+                       + modelT_Bus_WorkOrder.F_WorkOrderId + "' order by F_CreateTime desc").FirstOrDefault();
14162
+                            if (modelT_Bus_RemindRecord!=null )
14163
+                            {
14164
+                                modelT_Bus_RemindRecord.F_State = 0;
14165
+                                new BLL.T_Bus_RemindRecord().Update(modelT_Bus_RemindRecord);
14166
+                            }
14082
                             #region 插入操作记录
14167
                             #region 插入操作记录
14083
                             Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
14168
                             Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
14084
                             oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
14169
                             oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
14191
                             oper.F_CreateTime = DateTime.Now;
14276
                             oper.F_CreateTime = DateTime.Now;
14192
                             oper.F_IsDelete = 0;
14277
                             oper.F_IsDelete = 0;
14193
 
14278
 
14194
-                            operBLL.Add(oper);
14279
+                          int n=  operBLL.Add(oper);
14195
 
14280
 
14196
                             Task.Run(() =>
14281
                             Task.Run(() =>
14197
                             {
14282
                             {
14198
-                                process_info(oper.F_Id, "case_process_info","查收工单");
14283
+                                process_info(n, "case_process_info","查收工单");
14199
                             }).ContinueWith(p => {
14284
                             }).ContinueWith(p => {
14200
                                 System.Diagnostics.Debug.WriteLine(DateTime.Now);
14285
                                 System.Diagnostics.Debug.WriteLine(DateTime.Now);
14201
                             });
14286
                             });
14340
                 string reason = RequestString.GetFormString("reason");
14425
                 string reason = RequestString.GetFormString("reason");
14341
                 int isjb = RequestString.GetInt("isjb", 0);
14426
                 int isjb = RequestString.GetInt("isjb", 0);
14342
                 int rebackid = RequestString.GetInt("rebackid", 0);
14427
                 int rebackid = RequestString.GetInt("rebackid", 0);
14343
-
14428
+                int zb = RequestString.GetInt("zb", 0);
14344
                 Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
14429
                 Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
14345
                 Model.T_Bus_Feedback modelT_Bus_Feedback = new BLL.T_Bus_Feedback().GetModel(rebackid);
14430
                 Model.T_Bus_Feedback modelT_Bus_Feedback = new BLL.T_Bus_Feedback().GetModel(rebackid);
14346
                 Model.T_Bus_AssignedInfo modelT_Bus_AssignedInfo = assignBLL.GetNewModelByWorkOrderID(workorderid);
14431
                 Model.T_Bus_AssignedInfo modelT_Bus_AssignedInfo = assignBLL.GetNewModelByWorkOrderID(workorderid);
14409
                                     modelAssignedInfo_Next.F_State = 2;
14494
                                     modelAssignedInfo_Next.F_State = 2;
14410
                                     new BLL.T_Bus_AssignedInfo_Next().Update(modelAssignedInfo_Next);
14495
                                     new BLL.T_Bus_AssignedInfo_Next().Update(modelAssignedInfo_Next);
14411
                                 }
14496
                                 }
14412
-                                if (modelT_Bus_RemindRecord != null)
14413
-                                {
14414
-                                    if (modelT_Bus_RemindRecord.F_State == 1)
14415
-                                    {
14497
+
14498
+                                if (zb==0)
14499
+                                {if (modelT_Bus_RemindRecord!=null )
14500
+                                  {
14416
                                         modelT_Bus_RemindRecord.F_State = 0;
14501
                                         modelT_Bus_RemindRecord.F_State = 0;
14417
-                                        remindBLL.Update(modelT_Bus_RemindRecord);
14502
+                                        new BLL.T_Bus_RemindRecord().Update(modelT_Bus_RemindRecord);
14418
                                     }
14503
                                     }
14504
+                                   
14419
                                 }
14505
                                 }
14420
                             }
14506
                             }
14421
                             else
14507
                             else
15545
                             else
15631
                             else
15546
                                 keyValuePairs.Add("F_AdditionalReply", modelT_Bus_WorkOrder.F_AdditionalReply + "; "+ replycount);
15632
                                 keyValuePairs.Add("F_AdditionalReply", modelT_Bus_WorkOrder.F_AdditionalReply + "; "+ replycount);
15547
                             keyValuePairs.Add("F_IsProResult",3);
15633
                             keyValuePairs.Add("F_IsProResult",3);
15548
-                           // modelT_Bus_WorkOrder.F_IsProResult = 3;
15549
                             bool n = workorderBLL.UpdateWorkOrder (modelT_Bus_WorkOrder.F_Id , keyValuePairs);
15634
                             bool n = workorderBLL.UpdateWorkOrder (modelT_Bus_WorkOrder.F_Id , keyValuePairs);
15550
                             if (!string.IsNullOrEmpty(files))
15635
                             if (!string.IsNullOrEmpty(files))
15551
                             {
15636
                             {
17153
             var model = new BLL.T_Bus_WorkOrder().GetModel(WorkOrderId);
17238
             var model = new BLL.T_Bus_WorkOrder().GetModel(WorkOrderId);
17154
             if (model != null)
17239
             if (model != null)
17155
             {
17240
             {
17156
-                Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
17157
-                keyValuePairs.Add("F_IsSms", "1");
17158
-               // model.F_IsSms = 1;
17159
-                new BLL.T_Bus_WorkOrder().UpdateWorkOrder (model.F_Id , keyValuePairs);
17160
 
17241
 
17161
-                //string count = "您反映的诉求已有回复,请前往安阳政务服务官网(https://zwfw.anyang.gov.cn)登录后查看办结结果并对办理情况进行评价,或者拨打12345市长热线来电咨询,谢谢!";
17162
-                string content = "您提交的" + model.F_ComTitle + "事项的办理结果为:" + model.F_Result + "请于15天内回复:“$" + model.F_Id + "#”+1、满意,2、基本满意,3、不满意+#评议内容,进行评价。(不超过60字)";
17163
-                string mag = "[\"" + model.F_ComTitle + "\",\"" + model.F_Result + "\",\"" + model.F_Id + "\"]";
17164
-                string  n = SmsNewController.AddSmS(0, content, phone, "660571546305982464", mag, WorkOrderId);
17165
-                if (n=="")
17242
+                if (model.F_InfoSource == 1 || model.F_InfoSource == 2501)
17166
                 {
17243
                 {
17167
-                    Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
17168
-                    oper.F_WorkOrderId = model.F_WorkOrderId;
17169
-                    oper.F_State = model.F_WorkState;
17170
-                    oper.F_CallRecordId = model.F_CallRecordId;
17171
-                    oper.F_File = model.F_File;
17172
-                    string userinfo = User.depname + "(" + User.F_UserCode + ")";
17173
-                    oper.F_Message = userinfo + "发送了市民评价短信" ;
17244
+                    Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
17245
+                    keyValuePairs.Add("F_IsSms", "1");
17246
+                    // model.F_IsSms = 1;
17247
+                    new BLL.T_Bus_WorkOrder().UpdateWorkOrder(model.F_Id, keyValuePairs);
17174
 
17248
 
17175
-                    oper.F_CreateUser = User.F_UserCode;
17176
-                    oper.F_CreateTime = DateTime.Now;
17177
-                    oper.F_IsDelete = 0;
17178
-                    operBLL.Add(oper);
17179
-                      return Success("发送成功");
17180
-                 }
17249
+                    //string count = "您反映的诉求已有回复,请前往安阳政务服务官网(https://zwfw.anyang.gov.cn)登录后查看办结结果并对办理情况进行评价,或者拨打12345市长热线来电咨询,谢谢!";
17250
+                    string content = "您提交的" + model.F_ComTitle + "事项的办理结果为:" + model.F_Result + "请于15天内回复:“$" + model.F_Id + "#”+1、满意,2、基本满意,3、不满意+#评议内容,进行评价。(不超过60字)";
17251
+                    string mag = "[\"" + model.F_ComTitle + "\",\"" + model.F_Result + "\",\"" + model.F_Id + "\"]";
17252
+                    string n = SmsNewController.AddSmS(0, content, phone, "660571546305982464", mag, WorkOrderId);
17253
+                    if (n == "")
17254
+                    {
17255
+                        Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
17256
+                        oper.F_WorkOrderId = model.F_WorkOrderId;
17257
+                        oper.F_State = model.F_WorkState;
17258
+                        oper.F_CallRecordId = model.F_CallRecordId;
17259
+                        oper.F_File = model.F_File;
17260
+                        string userinfo = User.depname + "(" + User.F_UserCode + ")";
17261
+                        oper.F_Message = userinfo + "发送了市民评价短信";
17262
+
17263
+                        oper.F_CreateUser = User.F_UserCode;
17264
+                        oper.F_CreateTime = DateTime.Now;
17265
+                        oper.F_IsDelete = 0;
17266
+                        operBLL.Add(oper);
17267
+                        return Success("发送成功");
17268
+                    }
17269
+                    else
17270
+                        return Error(n);
17271
+                }
17181
                 else
17272
                 else
17182
-                    return Error(n );
17273
+                {
17274
+                    if (model.F_InfoSource == 2 || model.F_InfoSource == 2458)
17275
+                    {
17276
+                        Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
17277
+                        keyValuePairs.Add("F_IsSms", "1");
17278
+                        // model.F_IsSms = 1;
17279
+                        new BLL.T_Bus_WorkOrder().UpdateWorkOrder(model.F_Id, keyValuePairs);
17280
+
17281
+                        //string count = "您反映的诉求已有回复,请前往安阳政务服务官网(https://zwfw.anyang.gov.cn)登录后查看办结结果并对办理情况进行评价,或者拨打12345市长热线来电咨询,谢谢!";
17282
+                        string content = "您诉求的诉求已完成,请前往安阳政务服务官网(https://zwfw.anyang.gov.cn),登录后查看办结结果对执行情况进行评价,谢谢";
17283
+                        string n = SmsNewController.AddSmS(0, content, phone, "614918587799461888", "", WorkOrderId);
17284
+                        if (n == "")
17285
+                        {
17286
+                            Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
17287
+                            oper.F_WorkOrderId = model.F_WorkOrderId;
17288
+                            oper.F_State = model.F_WorkState;
17289
+                            oper.F_CallRecordId = model.F_CallRecordId;
17290
+                            oper.F_File = model.F_File;
17291
+                            string userinfo = User.depname + "(" + User.F_UserCode + ")";
17292
+                            oper.F_Message = userinfo + "发送了市民评价短信";
17293
+
17294
+                            oper.F_CreateUser = User.F_UserCode;
17295
+                            oper.F_CreateTime = DateTime.Now;
17296
+                            oper.F_IsDelete = 0;
17297
+                            operBLL.Add(oper);
17298
+                            return Success("发送成功");
17299
+                        }
17300
+                        else
17301
+                            return Error(n);
17302
+                    }
17303
+                   
17304
+
17305
+                }
17306
+               
17183
             }
17307
             }
17308
+               
17309
+            
17184
             return Error("发送失败");
17310
             return Error("发送失败");
17185
         }
17311
         }
17186
         /// <summary>
17312
         /// <summary>
17234
                                     //    return Error("回访时,提交重办只能操作一次");
17360
                                     //    return Error("回访时,提交重办只能操作一次");
17235
                                     //}
17361
                                     //}
17236
                                     Dictionary<string, object> keyValuePairs2 = new Dictionary<string, object>();
17362
                                     Dictionary<string, object> keyValuePairs2 = new Dictionary<string, object>();
17237
-                                    //if (modelT_Bus_WorkOrder.F_RemindDay == 1 || modelT_Bus_WorkOrder.F_RemindDay == 3)
17238
-                                    //    keyValuePairs2.Add("F_RemindDay", 3);
17239
-                                    //else
17240
-                                    //    keyValuePairs2.Add("F_RemindDay", 2);
17363
+                                      if (modelT_Bus_WorkOrder.F_RemindDay == 1 || modelT_Bus_WorkOrder.F_RemindDay == 3)
17364
+                                      keyValuePairs2.Add("F_RemindDay", 3);
17365
+                                    else
17366
+                                        keyValuePairs2.Add("F_RemindDay", 2);
17241
                                     keyValuePairs2.Add("F_WorkState", (int)EnumWorkState.resubmit);
17367
                                     keyValuePairs2.Add("F_WorkState", (int)EnumWorkState.resubmit);
17242
                                     modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.resubmit;
17368
                                     modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.resubmit;
17243
                                     keyValuePairs2.Add("F_IsExamine", 1);
17369
                                     keyValuePairs2.Add("F_IsExamine", 1);
17485
                                                     modelT_Bus_AssignedInfo.F_OtherDeptIds = "";//协办单位id
17611
                                                     modelT_Bus_AssignedInfo.F_OtherDeptIds = "";//协办单位id
17486
                                                     modelT_Bus_AssignedInfo.F_AssignedOpinion = cbreason;//交办意见
17612
                                                     modelT_Bus_AssignedInfo.F_AssignedOpinion = cbreason;//交办意见
17487
                                                     modelT_Bus_AssignedInfo.F_State = 1;//0草稿  1正式
17613
                                                     modelT_Bus_AssignedInfo.F_State = 1;//0草稿  1正式
17488
-                                                    modelT_Bus_AssignedInfo.F_CreateUser = curuser.F_UserCode;
17614
+                                                    modelT_Bus_AssignedInfo.F_CreateUser = modelT_Bus_ToExamine.F_CreatUser ;
17489
                                                     modelT_Bus_AssignedInfo.F_CreateTime = DateTime.Now;
17615
                                                     modelT_Bus_AssignedInfo.F_CreateTime = DateTime.Now;
17490
                                                     modelT_Bus_AssignedInfo.F_IsDelete = 0;
17616
                                                     modelT_Bus_AssignedInfo.F_IsDelete = 0;
17491
                                                     modelT_Bus_AssignedInfo.F_IsOverdue = 0;
17617
                                                     modelT_Bus_AssignedInfo.F_IsOverdue = 0;
17532
                                                     keyValuePairs.Add("F_IsReload", t);
17658
                                                     keyValuePairs.Add("F_IsReload", t);
17533
                                                     keyValuePairs1.Add("F_OtherDeptIds", "");
17659
                                                     keyValuePairs1.Add("F_OtherDeptIds", "");
17534
                                                     // modelT_Bus_WorkOrder.F_OtherDeptIds = otherdeptids;
17660
                                                     // modelT_Bus_WorkOrder.F_OtherDeptIds = otherdeptids;
17535
-                                                    keyValuePairs1.Add("F_AssignUser", curuser.F_UserCode);
17661
+                                                    keyValuePairs1.Add("F_AssignUser", modelT_Bus_ToExamine.F_CreatUser);
17536
                                                     // modelT_Bus_WorkOrder.F_AssignUser = curuser.F_UserCode;
17662
                                                     // modelT_Bus_WorkOrder.F_AssignUser = curuser.F_UserCode;
17537
                                                     keyValuePairs1.Add("F_AssignTime", DateTime.Now);
17663
                                                     keyValuePairs1.Add("F_AssignTime", DateTime.Now);
17538
                                                     // modelT_Bus_WorkOrder.F_AssignTime = DateTime.Now;
17664
                                                     // modelT_Bus_WorkOrder.F_AssignTime = DateTime.Now;
17712
                                                         modelT_Bus_AssignedInfo.F_AssignedOpinion = cbreason ;//交办意见
17838
                                                         modelT_Bus_AssignedInfo.F_AssignedOpinion = cbreason ;//交办意见
17713
                                                         modelT_Bus_AssignedInfo.F_TimeResp = assignBLL.GetRepTimly(DateTime.Now);//及时查收时间点
17839
                                                         modelT_Bus_AssignedInfo.F_TimeResp = assignBLL.GetRepTimly(DateTime.Now);//及时查收时间点
17714
                                                         modelT_Bus_AssignedInfo.F_State = 1;//0草稿  1正式
17840
                                                         modelT_Bus_AssignedInfo.F_State = 1;//0草稿  1正式
17715
-                                                        modelT_Bus_AssignedInfo.F_CreateUser = curuser.F_UserCode;
17841
+                                                        modelT_Bus_AssignedInfo.F_CreateUser = modelT_Bus_ToExamine.F_CreatUser;
17716
                                                         modelT_Bus_AssignedInfo.F_CreateTime = DateTime.Now;
17842
                                                         modelT_Bus_AssignedInfo.F_CreateTime = DateTime.Now;
17717
                                                         modelT_Bus_AssignedInfo.F_IsDelete = 0;
17843
                                                         modelT_Bus_AssignedInfo.F_IsDelete = 0;
17718
                                                         modelT_Bus_AssignedInfo.F_IsOverdue = 0;
17844
                                                         modelT_Bus_AssignedInfo.F_IsOverdue = 0;
17751
                                                             modelT_Bus_WorkOrder1.F_MainDeptId = deptinfo.F_DeptId;
17877
                                                             modelT_Bus_WorkOrder1.F_MainDeptId = deptinfo.F_DeptId;
17752
                                                             keyValuePairs2.Add("F_OtherDeptIds", "");
17878
                                                             keyValuePairs2.Add("F_OtherDeptIds", "");
17753
                                                             // modelT_Bus_WorkOrder1.F_OtherDeptIds = otherdeptids;
17879
                                                             // modelT_Bus_WorkOrder1.F_OtherDeptIds = otherdeptids;
17754
-                                                            keyValuePairs2.Add("F_AssignUser", curuser.F_UserCode);
17880
+                                                            keyValuePairs2.Add("F_AssignUser", modelT_Bus_ToExamine.F_CreatUser);
17755
                                                             // modelT_Bus_WorkOrder1.F_AssignUser = curuser.F_UserCode;
17881
                                                             // modelT_Bus_WorkOrder1.F_AssignUser = curuser.F_UserCode;
17756
                                                             keyValuePairs2.Add("F_AssignTime", DateTime.Now);
17882
                                                             keyValuePairs2.Add("F_AssignTime", DateTime.Now);
17757
                                                             // modelT_Bus_WorkOrder1.F_AssignTime = DateTime.Now;
17883
                                                             // modelT_Bus_WorkOrder1.F_AssignTime = DateTime.Now;
18182
                                             }
18308
                                             }
18183
                                         }
18309
                                         }
18184
                                     }
18310
                                     }
18185
-                                  
18186
-                                    string count = "您反映的诉求已有回复,请前往安阳政务服务官网(https://zwfw.anyang.gov.cn)登录后查看办结结果并对办理情况进行评价,或者拨打12345市长热线来电咨询,谢谢!";
18187
-                                    string mag = "";
18188
-                                    bool n = SMSController.AddSmS(0, mag, count, modelT_Bus_WorkOrder.F_CusPhone, "289715", "", modelT_Bus_WorkOrder.F_WorkOrderId);
18311
+                                    if (modelT_Bus_WorkOrder.F_InfoSource ==1|| modelT_Bus_WorkOrder.F_InfoSource ==2501 )
18312
+                                    {
18313
+                                        string count = "您反映的诉求已有回复,请前往安阳政务服务官网(https://zwfw.anyang.gov.cn)登录后查看办结结果并对办理情况进行评价,或者拨打12345市长热线来电咨询,谢谢!";
18314
+                                        string mag = "";
18315
+                                        bool n = SMSController.AddSmS(0, mag, count, modelT_Bus_WorkOrder.F_CusPhone, "289715", "", modelT_Bus_WorkOrder.F_WorkOrderId);
18316
+                                    }
18317
+                                 
18189
                                 }
18318
                                 }
18190
                                 #region 重办
18319
                                 #region 重办
18191
                                 else if (nexttype == 1)
18320
                                 else if (nexttype == 1)
18325
                                 oper.F_CreateTime = DateTime.Now;
18454
                                 oper.F_CreateTime = DateTime.Now;
18326
                                 oper.F_IsDelete = 0;
18455
                                 oper.F_IsDelete = 0;
18327
 
18456
 
18328
-                                operBLL.Add(oper);
18457
+                               int o= operBLL.Add(oper);
18329
                                 Task.Run(() =>
18458
                                 Task.Run(() =>
18330
                                 {
18459
                                 {
18331
-                                    process_info(oper.F_Id, "case_process_info", "审核工单");
18460
+                                    process_info(o , "case_process_info", "审核工单");
18332
                                 }).ContinueWith(p => {
18461
                                 }).ContinueWith(p => {
18333
                                     System.Diagnostics.Debug.WriteLine(DateTime.Now);
18462
                                     System.Diagnostics.Debug.WriteLine(DateTime.Now);
18334
                                 });
18463
                                 });
20152
                         }
20281
                         }
20153
                         if (issms > 0)
20282
                         if (issms > 0)
20154
                         {
20283
                         {
20155
-                            string count = "您反映的诉求已有回复,请前往安阳政务服务官网(https://zwfw.anyang.gov.cn)登录后查看办结结果并对办理情况进行评价,或者拨打12345市长热线来电咨询,谢谢!";
20156
-                            string mag = "";
20157
-                            bool n = SMSController.AddSmS(0, mag, count, modelT_Bus_WorkOrder.F_CusPhone, "289715", "", modelT_Bus_WorkOrder.F_WorkOrderId);
20284
+                            if (modelT_Bus_WorkOrder.F_InfoSource == 1 || modelT_Bus_WorkOrder.F_InfoSource == 2501)
20285
+                            {
20286
+                                string count = "您反映的诉求已有回复,请前往安阳政务服务官网(https://zwfw.anyang.gov.cn)登录后查看办结结果并对办理情况进行评价,或者拨打12345市长热线来电咨询,谢谢!";
20287
+                                string mag = "";
20288
+                                bool n = SMSController.AddSmS(0, mag, count, modelT_Bus_WorkOrder.F_CusPhone, "289715", "", modelT_Bus_WorkOrder.F_WorkOrderId);
20289
+                            }
20290
+                          
20158
                         }
20291
                         }
20159
                         oper.F_CreateUser = User.F_UserCode;
20292
                         oper.F_CreateUser = User.F_UserCode;
20160
                         oper.F_CreateTime = DateTime.Now;
20293
                         oper.F_CreateTime = DateTime.Now;
21291
 
21424
 
21292
             return dt;
21425
             return dt;
21293
         }
21426
         }
21427
+
21428
+        /// <summary>
21429
+        /// 添加人民网回复
21430
+        /// </summary>
21431
+        /// <returns></returns>
21432
+        public ActionResult Reply(string workorderid, string content, string organization)
21433
+        {
21434
+
21435
+            var mdoel = new BLL.T_Bus_WorkOrder().GetModelList("F_WorkOrderId='" + workorderid + "' and F_IsDelete=0");
21436
+            if (mdoel != null && mdoel.Count > 0)
21437
+            {
21438
+                var modelPeople = new BLL.T_Bus_People().GetModelList("F_WorkOrderId='" + mdoel.First().F_WorkOrderId + "' ");
21439
+                var prople = new Model.T_Bus_People();
21440
+                if (modelPeople != null && modelPeople.Count > 0)
21441
+                {
21442
+                    prople = modelPeople.FirstOrDefault();
21443
+                }
21444
+                else
21445
+                {
21446
+                    return Error("此工单非从网站抓取工单");
21447
+                }
21448
+                if (content.Length < 20)
21449
+                {
21450
+                    return Error("回复内容应在20字以上");
21451
+                }
21452
+                string token = Login();
21453
+                Dictionary<string, object> LY = new Dictionary<string, object>();
21454
+                LY.Add("tid", prople.tid);
21455
+                LY.Add("asContent", content);
21456
+                LY.Add("organization", organization);
21457
+                Dictionary<string, object> ParamMap = new Dictionary<string, object>();
21458
+                ParamMap.Add("answer", LY);
21459
+                if (prople.state == 1)
21460
+                {
21461
+                    //序列化参数
21462
+                    // 发送请求
21463
+                    var request = (HttpWebRequest)WebRequest.Create(rmwurl+"/v1/org/addExplainOne");
21464
+                    request.Method = "POST";
21465
+                    request.ContentType = "application/json;charset=UTF-8";
21466
+                    var byteData = Encoding.UTF8.GetBytes(createParamMap("/v1/org/addExplainOne", ParamMap.ToJson(), token).ToJson());
21467
+                    var length = byteData.Length;
21468
+                    request.ContentLength = length;
21469
+                    var writer = request.GetRequestStream();
21470
+                    writer.Write(byteData, 0, length);
21471
+                    writer.Close();
21472
+                    //接收数据
21473
+                    var response = (HttpWebResponse)request.GetResponse();
21474
+                    var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8")).ReadToEnd();
21475
+
21476
+                    try
21477
+                    {
21478
+                        JObject paras = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(responseString);
21479
+                        var txnBodyCom = paras["result"].ToString();
21480
+                        var result = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(txnBodyCom);
21481
+                        if (result["code"].ToString() == "0")
21482
+                        {
21483
+                            prople.state = 3;
21484
+                            bool n = new BLL.T_Bus_People().Update(prople);
21485
+                            #region 插入操作记录
21486
+                            Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
21487
+                            oper.F_WorkOrderId = mdoel.First().F_WorkOrderId;
21488
+                            // oper.F_AssignedId = modelT_Bus_AssignedInfo.F_Id;
21489
+                            oper.F_State = mdoel.First().F_WorkState;
21490
+                            string userinfo = User.depname + "(" + User.F_UserCode + ")";
21491
+                            oper.F_Message = userinfo + " " + "回复" + "了工单";
21492
+                            oper.F_CreateUser = User.F_UserCode;
21493
+                            oper.F_CreateTime = DateTime.Now;
21494
+                            oper.F_IsDelete = 0;
21495
+                            operBLL.Add(oper);
21496
+                            #endregion
21497
+                            return Success("回复成功");
21498
+                        }
21499
+                        else
21500
+                        {
21501
+                            return Error(result["msgDesc"].ToString());
21502
+                        }
21503
+
21504
+                    }
21505
+                    catch
21506
+                    {
21507
+                        return Error("回复失败");
21508
+                    }
21509
+
21510
+                }
21511
+                else if (prople.state == 2)
21512
+                {
21513
+
21514
+                    //序列化参数
21515
+                    // 发送请求
21516
+                    var request = (HttpWebRequest)WebRequest.Create(rmwurl+"/v1/org/addExplainTwo");
21517
+                    request.Method = "POST";
21518
+                    request.ContentType = "application/json;charset=UTF-8";
21519
+                    var byteData = Encoding.UTF8.GetBytes(createParamMap("/v1/org/addExplainTwo", ParamMap.ToJson(), token).ToJson());
21520
+                    var length = byteData.Length;
21521
+                    request.ContentLength = length;
21522
+                    var writer = request.GetRequestStream();
21523
+                    writer.Write(byteData, 0, length);
21524
+                    writer.Close();
21525
+                    //接收数据
21526
+                    var response = (HttpWebResponse)request.GetResponse();
21527
+                    var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8")).ReadToEnd();
21528
+
21529
+
21530
+                    try
21531
+                    {
21532
+                        JObject paras = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(responseString);
21533
+                        var txnBodyCom = paras["result"].ToString();
21534
+                        var result = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(txnBodyCom);
21535
+                        if (result["code"].ToString() == "0")
21536
+                        {
21537
+                            prople.state = 3;
21538
+                            bool n = new BLL.T_Bus_People().Update(prople);
21539
+                            #region 插入操作记录
21540
+                            Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
21541
+                            oper.F_WorkOrderId = mdoel.First().F_WorkOrderId;
21542
+                            // oper.F_AssignedId = modelT_Bus_AssignedInfo.F_Id;
21543
+                            oper.F_State = mdoel.First().F_WorkState;
21544
+                            string userinfo = User.depname + "(" + User.F_UserCode + ")";
21545
+                            oper.F_Message = userinfo + " " + "回复" + "了工单";
21546
+                            oper.F_CreateUser = User.F_UserCode;
21547
+                            oper.F_CreateTime = DateTime.Now;
21548
+                            oper.F_IsDelete = 0;
21549
+                            operBLL.Add(oper);
21550
+                            #endregion
21551
+                            return Success("回复成功");
21552
+                        }
21553
+                        else
21554
+                        {
21555
+                            return Error(result["msgDesc"].ToString());
21556
+                        }
21557
+
21558
+                    }
21559
+                    catch
21560
+                    {
21561
+                        return Error("回复失败");
21562
+                    }
21563
+                }
21564
+                else
21565
+                {  //序列化参数
21566
+                    // 发送请求
21567
+                    var request = (HttpWebRequest)WebRequest.Create(rmwurl+"/v1/org/addAnswerOne");
21568
+                    request.Method = "POST";
21569
+                    request.ContentType = "application/json;charset=UTF-8";
21570
+                    var byteData = Encoding.UTF8.GetBytes(createParamMap("/v1/org/addAnswerOne", ParamMap.ToJson(), token).ToJson());
21571
+                    var length = byteData.Length;
21572
+                    request.ContentLength = length;
21573
+                    var writer = request.GetRequestStream();
21574
+                    writer.Write(byteData, 0, length);
21575
+                    writer.Close();
21576
+                    //接收数据
21577
+                    var response = (HttpWebResponse)request.GetResponse();
21578
+                    var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8")).ReadToEnd();
21579
+                    try
21580
+                    {
21581
+                        JObject paras = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(responseString);
21582
+                        var txnBodyCom = paras["result"].ToString();
21583
+                        var result = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(txnBodyCom);
21584
+                        if (result["code"].ToString() == "0")
21585
+                        {
21586
+                            prople.state = 3;
21587
+                            bool n = new BLL.T_Bus_People().Update(prople);
21588
+                            #region 插入操作记录
21589
+                            Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
21590
+                            oper.F_WorkOrderId = mdoel.First().F_WorkOrderId;
21591
+                            // oper.F_AssignedId = modelT_Bus_AssignedInfo.F_Id;
21592
+                            oper.F_State = mdoel.First().F_WorkState;
21593
+                            string userinfo = User.depname + "(" + User.F_UserCode + ")";
21594
+                            oper.F_Message = userinfo + " " + "回复" + "了工单";
21595
+                            oper.F_CreateUser = User.F_UserCode;
21596
+                            oper.F_CreateTime = DateTime.Now;
21597
+                            oper.F_IsDelete = 0;
21598
+                            operBLL.Add(oper);
21599
+                            #endregion
21600
+                            return Success("回复成功");
21601
+                        }
21602
+                        else
21603
+                        {
21604
+                            return Error(result["msgDesc"].ToString());
21605
+                        }
21606
+
21607
+                    }
21608
+                    catch
21609
+                    {
21610
+                        return Error("回复失败");
21611
+                    }
21612
+
21613
+                }
21614
+               
21615
+
21616
+            }
21617
+            else
21618
+            {
21619
+                return Error("工单不存在");
21620
+            }
21621
+
21622
+
21623
+        }
21624
+        public string Login()
21625
+        {
21626
+            Dictionary<string, string> login = new Dictionary<string, string>();
21627
+            login.Add("loginName", "ayszxx");
21628
+            login.Add("password", "5116008");
21629
+            //序列化参数
21630
+
21631
+            // 发送请求
21632
+            //序列化参数
21633
+
21634
+            // 发送请求
21635
+            var request = (HttpWebRequest)WebRequest.Create(rmwurl+"/v1/user/login");
21636
+            request.Method = "POST";
21637
+            request.ContentType = "application/json;charset=UTF-8";
21638
+
21639
+            var byteData = Encoding.UTF8.GetBytes(createParamMap("/v1/user/login", login.ToJson()).ToJson());
21640
+            var length = byteData.Length;
21641
+            request.ContentLength = length;
21642
+            var writer = request.GetRequestStream();
21643
+            writer.Write(byteData, 0, length);
21644
+            writer.Close();
21645
+            //接收数据
21646
+            var response = (HttpWebResponse)request.GetResponse();
21647
+            var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8")).ReadToEnd();
21648
+            JObject paras = null;
21649
+            paras = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(responseString);
21650
+            var txnBodyCom = paras["resultData"].ToString();
21651
+            var result = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(txnBodyCom);
21652
+            //  token = jo["token"].ToString();
21653
+            // string result = SmsNewHelper.Send(mobiles, Content);
21654
+
21655
+            return result["token"].ToString();
21656
+        }
21657
+        private string APP_CODE =Configs .GetValue ("APP_CODE");
21658
+        private string APP_SECRET = Configs.GetValue("APP_SECRET");
21659
+        private string rmwurl = Configs.GetValue("Rmwurl");
21660
+        // private string APP_CODE = "d377d97d7e9346e7831351ee5b62a418";
21661
+        //  private string APP_SECRET = "ff24bb32f2e14ea595dcd1748feceabd";
21662
+        //  private string rmwurl = "http://api-qa-dfbbs.peopletech.cn/pro-dfbbs-api";
21663
+        //private string APP_CODE = "314f185e71e74dd8879ab154746f7681";
21664
+        //private string APP_SECRET = "900a640b37e84a8c88ffc83d6f3500f6";
21665
+        //private string rmwurl = "http://liuyan-api.people.com.cn/api";
21666
+        public Dictionary<string, string> createParamMap(string url, string param)
21667
+        {
21668
+            Dictionary<string, string> parame = new Dictionary<string, string>();
21669
+            parame.Add("appCode", APP_CODE);
21670
+            parame.Add("param", param);
21671
+            parame.Add("signature", Md5(url + param + APP_SECRET));
21672
+            return parame;
21673
+        }
21674
+
21675
+        public Dictionary<string, string> createParamMap(string url, string param, string token)
21676
+        {
21677
+            Dictionary<string, string> parame = new Dictionary<string, string>();
21678
+            parame.Add("token", token);
21679
+            parame.Add("appCode", APP_CODE);
21680
+            parame.Add("param", param);
21681
+            parame.Add("signature", Md5(url + param + APP_SECRET + token));
21682
+            return parame;
21683
+        }
21684
+        /// <summary>
21685
+        /// MD5加密
21686
+        /// </summary>
21687
+        /// <param name="txt"></param>
21688
+        /// <returns></returns>
21689
+        public static string Md5(string txt)
21690
+        {
21691
+            byte[] sor = Encoding.UTF8.GetBytes(txt);
21692
+            MD5 md5 = MD5.Create();
21693
+            byte[] result = md5.ComputeHash(sor);
21694
+            StringBuilder strbul = new StringBuilder(40);
21695
+            for (int i = 0; i < result.Length; i++)
21696
+            {
21697
+                //加密结果"x2"结果为32位,"x3"结果为48位,"x4"结果为64位
21698
+                strbul.Append(result[i].ToString("x2"));
21699
+            }
21700
+            return strbul.ToString().ToLower(); ;
21701
+        }
21702
+
21294
         /// <summary>
21703
         /// <summary>
21295
         /// 绑定追问回复附件信息
21704
         /// 绑定追问回复附件信息
21296
         /// </summary>
21705
         /// </summary>
22095
             oper.F_CreateTime = DateTime.Now;
22504
             oper.F_CreateTime = DateTime.Now;
22096
             oper.F_IsDelete = 0;
22505
             oper.F_IsDelete = 0;
22097
             oper.F_Type = type;
22506
             oper.F_Type = type;
22098
-            operBLL.Add(oper);
22507
+           int n=  operBLL.Add(oper);
22099
             if (isjb==1)
22508
             if (isjb==1)
22100
             {
22509
             {
22101
                 Task.Run(() =>
22510
                 Task.Run(() =>
22102
                 {
22511
                 {
22103
-                    process_info(oper.F_Id, "case_process_info", "交办工单");
22512
+                    process_info(n, "case_process_info", "交办工单");
22104
                 }).ContinueWith(p => {
22513
                 }).ContinueWith(p => {
22105
                     System.Diagnostics.Debug.WriteLine(DateTime.Now);
22514
                     System.Diagnostics.Debug.WriteLine(DateTime.Now);
22106
                 });
22515
                 });

+ 6 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Global.asax.cs

22
             RouteConfig.RegisterRoutes(RouteTable.Routes);
22
             RouteConfig.RegisterRoutes(RouteTable.Routes);
23
             //clq 增加异常日志记录 自定义 HandleErrorAttribute
23
             //clq 增加异常日志记录 自定义 HandleErrorAttribute
24
             FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
24
             FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
25
-
26
             _worker = new QuartzWorker();
25
             _worker = new QuartzWorker();
27
            var satisfactionClose = new SatisfactionClose();
26
            var satisfactionClose = new SatisfactionClose();
28
             _worker.AddWork(satisfactionClose);
27
             _worker.AddWork(satisfactionClose);
30
            var ZhengWuDuiJie = new ZhengWuDuiJie();
29
            var ZhengWuDuiJie = new ZhengWuDuiJie();
31
            _worker.AddWork(ZhengWuDuiJie);
30
            _worker.AddWork(ZhengWuDuiJie);
32
            _worker.Start();
31
            _worker.Start();
32
+           var Peoplewebsite = new Peoplewebsite();
33
+           _worker.AddWork(Peoplewebsite);
34
+           _worker.Start();
35
+            var PushWorkorder = new PushWorkorder();
36
+            _worker.AddWork(PushWorkorder);
37
+            _worker.Start();
33
         }
38
         }
34
         protected void Application_End()
39
         protected void Application_End()
35
         {
40
         {

+ 5 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Common/ButtonGroup.cs

220
         {
220
         {
221
             return new button(55, "审核不通过");
221
             return new button(55, "审核不通过");
222
         }
222
         }
223
+        public static button Explain()
224
+       {
225
+           return new button(56, "解释");
226
+        }
223
         /// <summary>
227
         /// <summary>
224
         /// 审核员退回
228
         /// 审核员退回
225
         /// </summary>
229
         /// </summary>
634
 
638
 
635
                     }
639
                     }
636
                     //调度专员 中心领导管理员 管理员
640
                     //调度专员 中心领导管理员 管理员
637
-                    if (code == "ZXLD" || code == "YSZY" || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG" || code == "MTDD")
641
+                    if (code == "ZXLD" || code == "YSZY"   || code == "ZXLDGLYGLY" || code == "GLY" || code == "DDZG" || code == "MTDD")
638
                     {
642
                     {
639
                         buttons.Add(edit());
643
                         buttons.Add(edit());
640
                         buttons.Add(takeback());
644
                         buttons.Add(takeback());

+ 211 - 0
CallCenterApi/CallCenterApi.Model/T_Bus_People.cs

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace CallCenterApi.Model
8
+{
9
+    /// <summary>
10
+    /// T_Bus_People:实体类(属性说明自动提取数据库字段的描述信息)
11
+    /// </summary>
12
+    [Serializable]
13
+    public partial class T_Bus_People
14
+    {
15
+        public T_Bus_People()
16
+        { }
17
+        #region Model
18
+        private int _f_id;
19
+        private decimal? _tid;
20
+        private string _forumname;
21
+        private string _subject;
22
+        private string _nickname;
23
+        private string _typename;
24
+        private string _domainname;
25
+        private string _stateinfo;
26
+        private DateTime? _dateline;
27
+        private string _videoimgurl;
28
+        private string _videourl;
29
+        private int? _videoduration;
30
+        private string _content;
31
+        private DateTime? _threadschecktime;
32
+        private string _realname;
33
+        private string _phone;
34
+        private string _remark;
35
+        private string _aid;
36
+        private int? _attachment;
37
+        private string _topicmaintitle;
38
+        private string _f_workorderid;
39
+        /// <summary>
40
+        /// 
41
+        /// </summary>
42
+        public int F_ID
43
+        {
44
+            set { _f_id = value; }
45
+            get { return _f_id; }
46
+        }
47
+        /// <summary>
48
+        /// 
49
+        /// </summary>
50
+        public decimal? tid
51
+        {
52
+            set { _tid = value; }
53
+            get { return _tid; }
54
+        }
55
+        /// <summary>
56
+        /// 
57
+        /// </summary>
58
+        public string forumName
59
+        {
60
+            set { _forumname = value; }
61
+            get { return _forumname; }
62
+        }
63
+        /// <summary>
64
+        /// 
65
+        /// </summary>
66
+        public string subject
67
+        {
68
+            set { _subject = value; }
69
+            get { return _subject; }
70
+        }
71
+        /// <summary>
72
+        /// 
73
+        /// </summary>
74
+        public string nickName
75
+        {
76
+            set { _nickname = value; }
77
+            get { return _nickname; }
78
+        }
79
+        /// <summary>
80
+        /// 
81
+        /// </summary>
82
+        public string typeName
83
+        {
84
+            set { _typename = value; }
85
+            get { return _typename; }
86
+        }
87
+        /// <summary>
88
+        /// 
89
+        /// </summary>
90
+        public string domainName
91
+        {
92
+            set { _domainname = value; }
93
+            get { return _domainname; }
94
+        }
95
+        /// <summary>
96
+        /// 
97
+        /// </summary>
98
+        public string stateInfo
99
+        {
100
+            set { _stateinfo = value; }
101
+            get { return _stateinfo; }
102
+        }
103
+        /// <summary>
104
+        /// 
105
+        /// </summary>
106
+        public DateTime? dateline
107
+        {
108
+            set { _dateline = value; }
109
+            get { return _dateline; }
110
+        }
111
+        /// <summary>
112
+        /// 
113
+        /// </summary>
114
+        public string videoImgUrl
115
+        {
116
+            set { _videoimgurl = value; }
117
+            get { return _videoimgurl; }
118
+        }
119
+        /// <summary>
120
+        /// 
121
+        /// </summary>
122
+        public string videoUrl
123
+        {
124
+            set { _videourl = value; }
125
+            get { return _videourl; }
126
+        }
127
+        /// <summary>
128
+        /// 
129
+        /// </summary>
130
+        public int? videoDuration
131
+        {
132
+            set { _videoduration = value; }
133
+            get { return _videoduration; }
134
+        }
135
+        /// <summary>
136
+        /// 
137
+        /// </summary>
138
+        public string content
139
+        {
140
+            set { _content = value; }
141
+            get { return _content; }
142
+        }
143
+        /// <summary>
144
+        /// 
145
+        /// </summary>
146
+        public DateTime? threadsCheckTime
147
+        {
148
+            set { _threadschecktime = value; }
149
+            get { return _threadschecktime; }
150
+        }
151
+        /// <summary>
152
+        /// 
153
+        /// </summary>
154
+        public string realName
155
+        {
156
+            set { _realname = value; }
157
+            get { return _realname; }
158
+        }
159
+        /// <summary>
160
+        /// 
161
+        /// </summary>
162
+        public string phone
163
+        {
164
+            set { _phone = value; }
165
+            get { return _phone; }
166
+        }
167
+        /// <summary>
168
+        /// 
169
+        /// </summary>
170
+        public string remark
171
+        {
172
+            set { _remark = value; }
173
+            get { return _remark; }
174
+        }
175
+        /// <summary>
176
+        /// 
177
+        /// </summary>
178
+        public string aid
179
+        {
180
+            set { _aid = value; }
181
+            get { return _aid; }
182
+        }
183
+        /// <summary>
184
+        /// 
185
+        /// </summary>
186
+        public int? attachment
187
+        {
188
+            set { _attachment = value; }
189
+            get { return _attachment; }
190
+        }
191
+        /// <summary>
192
+        /// 
193
+        /// </summary>
194
+        public string topicMainTitle
195
+        {
196
+            set { _topicmaintitle = value; }
197
+            get { return _topicmaintitle; }
198
+        }
199
+        /// <summary>
200
+        /// 
201
+        /// </summary>
202
+        public string F_WorkOrderId
203
+        {
204
+            set { _f_workorderid = value; }
205
+            get { return _f_workorderid; }
206
+        }
207
+        public int state { set; get; }
208
+        #endregion Model
209
+
210
+    }
211
+}

+ 5 - 0
CallCenterCommon/CallCenter.QuartzService/CallCenter.QuartzService.csproj

56
   </ItemGroup>
56
   </ItemGroup>
57
   <ItemGroup>
57
   <ItemGroup>
58
     <Compile Include="CallPlanWork.cs" />
58
     <Compile Include="CallPlanWork.cs" />
59
+    <Compile Include="Peoplewebsite.cs" />
59
     <Compile Include="Properties\AssemblyInfo.cs" />
60
     <Compile Include="Properties\AssemblyInfo.cs" />
61
+    <Compile Include="PushWorkorder.cs" />
60
     <Compile Include="QuartzJob.cs" />
62
     <Compile Include="QuartzJob.cs" />
61
     <Compile Include="QuartzWorker.cs" />
63
     <Compile Include="QuartzWorker.cs" />
62
     <Compile Include="SatisfactionClose.cs" />
64
     <Compile Include="SatisfactionClose.cs" />
86
       <Name>CallCenter.Utility</Name>
88
       <Name>CallCenter.Utility</Name>
87
     </ProjectReference>
89
     </ProjectReference>
88
   </ItemGroup>
90
   </ItemGroup>
91
+  <ItemGroup>
92
+    <Folder Include="BLL\" />
93
+  </ItemGroup>
89
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
94
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
90
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
95
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
91
        Other similar extension points exist, see Microsoft.Common.targets.
96
        Other similar extension points exist, see Microsoft.Common.targets.

+ 44 - 0
CallCenterCommon/CallCenter.QuartzService/Peoplewebsite.cs

1
+using CallCenter.Utility;
2
+using Newtonsoft.Json;
3
+using Newtonsoft.Json.Linq;
4
+using System;
5
+using System.Collections.Generic;
6
+using System.IO;
7
+using System.Linq;
8
+using System.Net;
9
+using System.Security.Cryptography;
10
+using System.Text;
11
+using System.Threading.Tasks;
12
+
13
+namespace CallCenter.QuartzService
14
+{
15
+   public    class Peoplewebsite : QuartzJob
16
+    {
17
+
18
+        public Peoplewebsite()
19
+        {
20
+            CronExpression = "0 0/30 * * * ?";
21
+            DoWork += GetLY;
22
+        }
23
+      
24
+        public void GetLY(object sender, EventArgs e)
25
+        {
26
+         if (Configs .GetValue ("APP_CODE")== "314f185e71e74dd8879ab154746f7681")
27
+            {
28
+                WebClient web = new WebClient();
29
+                web.Encoding = Encoding.UTF8;
30
+                string Dataurl = web.DownloadString("http://docking.zwfw.anyang.gov.cn:9998/APPS/GetLY" + "?display=1&searchState=wait_to_answer");
31
+                if (!string.IsNullOrEmpty(Dataurl))
32
+                {
33
+                    string Dataur2 = web.DownloadString("http://docking.zwfw.anyang.gov.cn:9998/APPS/GetLY" + "?display=2&searchState=wait_to_first_explain");
34
+                    if (!string.IsNullOrEmpty(Dataur2))
35
+                    {
36
+                        string Dataur3 = web.DownloadString("http://docking.zwfw.anyang.gov.cn:9998/APPS/GetLY" + "?display=2&searchState=wait_to_second_explain");
37
+                    }
38
+                }
39
+            }
40
+           
41
+        }
42
+       
43
+    }
44
+}

File diff suppressed because it is too large
+ 1602 - 0
CallCenterCommon/CallCenter.QuartzService/PushWorkorder.cs


File diff suppressed because it is too large
+ 1 - 1
CallCenterCommon/CallCenter.QuartzService/SatisfactionClose.cs


+ 8 - 4
CallCenterCommon/CallCenter.QuartzService/ZhengWuDuiJie.cs

5
 using System;
5
 using System;
6
 using System.Collections.Generic;
6
 using System.Collections.Generic;
7
 using System.Data;
7
 using System.Data;
8
+using System.IO;
8
 using System.Linq;
9
 using System.Linq;
9
 using System.Text;
10
 using System.Text;
10
 using System.Threading.Tasks;
11
 using System.Threading.Tasks;
58
         private void submit_dept_crnt_status(object sender, EventArgs e)
59
         private void submit_dept_crnt_status(object sender, EventArgs e)
59
 
60
 
60
         {
61
         {
62
+
61
             string token = GetToken();
63
             string token = GetToken();
62
            
64
            
63
             paras paras = new paras();
65
             paras paras = new paras();
114
             //var jsonParam = JsonConvert.SerializeObject(values);
116
             //var jsonParam = JsonConvert.SerializeObject(values);
115
             //序列化参数
117
             //序列化参数
116
             string jsonParam = "access_token=" + token + "&paras=" + paras.ToJson();
118
             string jsonParam = "access_token=" + token + "&paras=" + paras.ToJson();
117
-            var responseString = HttpMethods.HttpPost("http://59.227.104.19:8000/share/submit_dept_crnt_status", jsonParam);
119
+           var responseString = HttpMethods.HttpPost("http://59.227.104.19:8000/share/submit_dept_crnt_status", jsonParam);
120
+
118
             //Push jo =JsonConvert.DeserializeObject<Push>(responseString);
121
             //Push jo =JsonConvert.DeserializeObject<Push>(responseString);
119
             // if (jo .code =="0")
122
             // if (jo .code =="0")
120
             //{
123
             //{
146
             //        string strSql = string.Format(@"INSERT INTO T_Sys_PushMsg ( [WorkOrderId], [Conent], [CreatTime], [Code], [Message], [Title], [ErrorObjs], [Remarks]) 
149
             //        string strSql = string.Format(@"INSERT INTO T_Sys_PushMsg ( [WorkOrderId], [Conent], [CreatTime], [Code], [Message], [Title], [ErrorObjs], [Remarks]) 
147
             //       values   ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}') ;select @@IDENTITY ", "", jsonParam, DateTime.Now, jo.code, jo.message, "实时服务信息上报接口", error, "");
150
             //       values   ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}') ;select @@IDENTITY ", "", jsonParam, DateTime.Now, jo.code, jo.message, "实时服务信息上报接口", error, "");
148
             //    object objres = DbHelperSQL.GetSingle(strSql);
151
             //    object objres = DbHelperSQL.GetSingle(strSql);
149
-                
150
-            //}
151
-          
152
+
153
+                //}
154
+
152
         }
155
         }
156
+   
153
         private string GetToken()
157
         private string GetToken()
154
         {
158
         {
155
 
159
 

+ 2 - 2
CallCenterCommon/CallCenter.Utility/FileUp.cs

116
         //byte[] by = GetBinaryFile("E:\\Hello.txt");
116
         //byte[] by = GetBinaryFile("E:\\Hello.txt");
117
         //this.SaveFile(by,"Hello",".txt");
117
         //this.SaveFile(by,"Hello",".txt");
118
         //---------------------------------------------
118
         //---------------------------------------------
119
-        public void SaveFile(byte[] binData, string SavePath, string fileName, string fileType)
119
+        public void SaveFile(byte[] binData, string SavePath, string fileName)
120
         {
120
         {
121
             FileStream fileStream = null;
121
             FileStream fileStream = null;
122
             MemoryStream m = new MemoryStream(binData);
122
             MemoryStream m = new MemoryStream(binData);
127
                 {
127
                 {
128
                     Directory.CreateDirectory(savePath);
128
                     Directory.CreateDirectory(savePath);
129
                 }
129
                 }
130
-                string File = savePath + fileName + fileType;
130
+                string File = savePath + fileName ;
131
                 fileStream = new FileStream(File, FileMode.Create);
131
                 fileStream = new FileStream(File, FileMode.Create);
132
                 m.WriteTo(fileStream);
132
                 m.WriteTo(fileStream);
133
             }
133
             }

+ 1 - 1
CallCenterCommon/CallCenter.Utility/ImageUpload.cs

814
             }
814
             }
815
             catch (Exception ex)
815
             catch (Exception ex)
816
             {
816
             {
817
-                return ex.Message;
817
+                return ex.ToString ();
818
             }
818
             }
819
         }
819
         }
820
         #endregion
820
         #endregion

+ 11 - 1
CallCenterCommon/CallCenter.Utility/Time/DateTimeConvert.cs

142
             var time = new DateTime(StartedDateTime.Ticks + timetag*10000);
142
             var time = new DateTime(StartedDateTime.Ticks + timetag*10000);
143
             return toLocalTime ? time.ToLocalTime() : time;
143
             return toLocalTime ? time.ToLocalTime() : time;
144
         }
144
         }
145
-
145
+        /// <summary>
146
+        /// 将时间戳转换为DateTime类型
147
+        /// </summary>
148
+        /// <param name="timetag"></param>
149
+        /// <param name="toLocalTime"></param>
150
+        /// <returns></returns>
151
+        public static DateTime FromSendTimetag(long timetag, bool toLocalTime = true)
152
+        {
153
+            var time = new DateTime(StartedDateTime.Ticks + timetag * 10000000);
154
+            return toLocalTime ? time.ToLocalTime() : time;
155
+        }
146
         /// <summary>
156
         /// <summary>
147
         /// 将Datetime类型转换为时间戳
157
         /// 将Datetime类型转换为时间戳
148
         /// </summary>
158
         /// </summary>

二進制
文档/材料/C5106-2019国家“互联网 监管”系统监管数据标准V4.1.docx


二進制
文档/材料/安阳12345向数据平台数据推送(1).docx


二進制
文档/材料/安阳12345服务器资源0728.xlsx


二進制
文档/材料/承办网络系统使用操作手册.docx


二進制
文档/材料/经分助手消息API文档.pdf