|
|
@@ -15,489 +15,493 @@ namespace CallCenterApi.Interface.Controllers.quality
|
|
15
|
15
|
//获取未质检列表
|
|
16
|
16
|
public ActionResult GetList()
|
|
17
|
17
|
{
|
|
18
|
|
- ActionResult res = NoToken("未知错误,请重新登录");
|
|
19
|
|
- string sql = " 1=1 ";
|
|
20
|
|
- DataTable dt = new DataTable();
|
|
21
|
|
-
|
|
22
|
|
- string phone = HttpUtility.UrlDecode(RequestString.GetQueryString("phone"));
|
|
23
|
|
- string usercode = HttpUtility.UrlDecode(RequestString.GetQueryString("usercode"));
|
|
24
|
|
- string calltype = HttpUtility.UrlDecode(RequestString.GetQueryString("calltype"));
|
|
25
|
|
- string starttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
|
|
26
|
|
- string endtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
|
|
27
|
|
- string startl = HttpUtility.UrlDecode(RequestString.GetQueryString("startl"));
|
|
28
|
|
- string endl = HttpUtility.UrlDecode(RequestString.GetQueryString("endl"));
|
|
29
|
|
- string optid = HttpUtility.UrlDecode(RequestString.GetQueryString("optid"));
|
|
30
|
|
-
|
|
31
|
|
- string strpageindex = RequestString.GetQueryString("page");
|
|
32
|
|
- int pageindex = 1;
|
|
33
|
|
- string strpagesize = RequestString.GetQueryString("pagesize");
|
|
34
|
|
- int pagesize = 10;
|
|
35
|
|
-
|
|
36
|
|
- sql += " and CallState='1' and F_QCState<>1 ";
|
|
37
|
|
-
|
|
38
|
|
- if (phone.Trim() != "")
|
|
|
18
|
+ if (Request.IsAuthenticated)
|
|
39
|
19
|
{
|
|
40
|
|
- sql += " and CallNumber='" + phone + "'";
|
|
41
|
|
- }
|
|
42
|
|
- if (usercode.Trim() != "")
|
|
43
|
|
- {
|
|
44
|
|
- sql += " and UserCode='" + usercode + "'";
|
|
45
|
|
- }
|
|
46
|
|
- if (calltype.Trim() != "")
|
|
47
|
|
- {
|
|
48
|
|
- sql += " and CallType='" + calltype + "'";
|
|
49
|
|
- }
|
|
50
|
|
- if (starttime.Trim() == "" && endtime.Trim() == "")
|
|
51
|
|
- {
|
|
52
|
|
- sql += " and DATEDIFF(week, BeginTime,getdate())=1 ";//默认显示上周记录
|
|
53
|
|
- }
|
|
54
|
|
- else
|
|
55
|
|
- {
|
|
56
|
|
- if (starttime.Trim() != "")
|
|
|
20
|
+ int userId = CurrentUser.UserData.F_UserId;
|
|
|
21
|
+ Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
|
|
|
22
|
+
|
|
|
23
|
+ string sql = " 1=1 ";
|
|
|
24
|
+ DataTable dt = new DataTable();
|
|
|
25
|
+
|
|
|
26
|
+ if (!string.IsNullOrEmpty(userModel.groupcode))
|
|
57
|
27
|
{
|
|
58
|
|
- sql += " and BeginTime>='" + starttime + "'";
|
|
|
28
|
+ sql += " and F_GroupCode = '" + userModel.groupcode + "' ";
|
|
59
|
29
|
}
|
|
60
|
|
- if (endtime.Trim() != "")
|
|
|
30
|
+
|
|
|
31
|
+ string phone = HttpUtility.UrlDecode(RequestString.GetQueryString("phone"));
|
|
|
32
|
+ string usercode = HttpUtility.UrlDecode(RequestString.GetQueryString("usercode"));
|
|
|
33
|
+ string calltype = HttpUtility.UrlDecode(RequestString.GetQueryString("calltype"));
|
|
|
34
|
+ string starttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
|
|
|
35
|
+ string endtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
|
|
|
36
|
+ string startl = HttpUtility.UrlDecode(RequestString.GetQueryString("startl"));
|
|
|
37
|
+ string endl = HttpUtility.UrlDecode(RequestString.GetQueryString("endl"));
|
|
|
38
|
+ string optid = HttpUtility.UrlDecode(RequestString.GetQueryString("optid"));
|
|
|
39
|
+
|
|
|
40
|
+ string strpageindex = RequestString.GetQueryString("page");
|
|
|
41
|
+ int pageindex = 1;
|
|
|
42
|
+ string strpagesize = RequestString.GetQueryString("pagesize");
|
|
|
43
|
+ int pagesize = 10;
|
|
|
44
|
+
|
|
|
45
|
+ sql += " and CallState='1' and F_QCState<>1 ";
|
|
|
46
|
+
|
|
|
47
|
+ if (phone.Trim() != "")
|
|
61
|
48
|
{
|
|
62
|
|
- sql += " and BeginTime<='" + endtime + "'";
|
|
|
49
|
+ sql += " and CallNumber='" + phone + "'";
|
|
|
50
|
+ }
|
|
|
51
|
+ if (usercode.Trim() != "")
|
|
|
52
|
+ {
|
|
|
53
|
+ sql += " and UserCode='" + usercode + "'";
|
|
|
54
|
+ }
|
|
|
55
|
+ if (calltype.Trim() != "")
|
|
|
56
|
+ {
|
|
|
57
|
+ sql += " and CallType='" + calltype + "'";
|
|
|
58
|
+ }
|
|
|
59
|
+ if (starttime.Trim() == "" && endtime.Trim() == "")
|
|
|
60
|
+ {
|
|
|
61
|
+ sql += " and DATEDIFF(week, BeginTime,getdate())=1 ";//默认显示上周记录
|
|
|
62
|
+ }
|
|
|
63
|
+ else
|
|
|
64
|
+ {
|
|
|
65
|
+ if (starttime.Trim() != "")
|
|
|
66
|
+ {
|
|
|
67
|
+ sql += " and BeginTime>='" + starttime + "'";
|
|
|
68
|
+ }
|
|
|
69
|
+ if (endtime.Trim() != "")
|
|
|
70
|
+ {
|
|
|
71
|
+ sql += " and BeginTime<='" + endtime + "'";
|
|
|
72
|
+ }
|
|
|
73
|
+ }
|
|
|
74
|
+ if (startl.Trim() != "")
|
|
|
75
|
+ {
|
|
|
76
|
+ sql += " and TalkLongTime>=" + startl + " ";
|
|
|
77
|
+ }
|
|
|
78
|
+ if (endl.Trim() != "")
|
|
|
79
|
+ {
|
|
|
80
|
+ sql += " and TalkLongTime<=" + endl + " ";
|
|
63
|
81
|
}
|
|
64
|
|
- }
|
|
65
|
|
- if (startl.Trim() != "")
|
|
66
|
|
- {
|
|
67
|
|
- sql += " and TalkLongTime>=" + startl + " ";
|
|
68
|
|
- }
|
|
69
|
|
- if (endl.Trim() != "")
|
|
70
|
|
- {
|
|
71
|
|
- sql += " and TalkLongTime<=" + endl + " ";
|
|
72
|
|
- }
|
|
73
|
82
|
|
|
74
|
|
- if (strpageindex.Trim() != "")
|
|
75
|
|
- {
|
|
76
|
|
- pageindex = Convert.ToInt32(strpageindex);
|
|
77
|
|
- }
|
|
|
83
|
+ if (strpageindex.Trim() != "")
|
|
|
84
|
+ {
|
|
|
85
|
+ pageindex = Convert.ToInt32(strpageindex);
|
|
|
86
|
+ }
|
|
78
|
87
|
|
|
79
|
|
- if (strpagesize.Trim() != "")
|
|
80
|
|
- {
|
|
81
|
|
- pagesize = Convert.ToInt32(strpagesize);
|
|
82
|
|
- }
|
|
|
88
|
+ if (strpagesize.Trim() != "")
|
|
|
89
|
+ {
|
|
|
90
|
+ pagesize = Convert.ToInt32(strpagesize);
|
|
|
91
|
+ }
|
|
83
|
92
|
|
|
84
|
|
- List<Model.T_Call_CallRecords_QC> Plist = new BLL.T_Call_CallRecords_QC().GetModelList(sql);//.GetListV1(sql);
|
|
85
|
|
- List<Model.T_Call_CallRecordsLD> ldList = new BLL.T_Call_CallRecordsLD().GetModelList("");
|
|
86
|
|
- Model.PageData<object> pageData = new Model.PageData<object>();
|
|
87
|
|
- var list = Plist.Select(d => {
|
|
88
|
|
- int lc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsListen == true).Count();
|
|
89
|
|
- int dc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsDownload == true).Count();
|
|
90
|
|
- return new
|
|
|
93
|
+ List<Model.T_Call_CallRecords_QC> Plist = new BLL.T_Call_CallRecords_QC().GetModelList(sql);//.GetListV1(sql);
|
|
|
94
|
+ List<Model.T_Call_CallRecordsLD> ldList = new BLL.T_Call_CallRecordsLD().GetModelList("");
|
|
|
95
|
+ Model.PageData<object> pageData = new Model.PageData<object>();
|
|
|
96
|
+ var list = Plist.Select(d =>
|
|
|
97
|
+ {
|
|
|
98
|
+ int lc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsListen == true).Count();
|
|
|
99
|
+ int dc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsDownload == true).Count();
|
|
|
100
|
+ return new
|
|
|
101
|
+ {
|
|
|
102
|
+ _callnumber = d.CallNumber,
|
|
|
103
|
+ _filepath = d.FilePath,
|
|
|
104
|
+ _f_qcstate = d.F_QCState,
|
|
|
105
|
+ _f_qcscore = d.F_QCScore,
|
|
|
106
|
+ _f_qcquestion = d.F_QCQuestion,
|
|
|
107
|
+ _f_qcadvise = d.F_QCAdvise,
|
|
|
108
|
+ _calltype = d.CallType,
|
|
|
109
|
+ _callstate = d.CallState,
|
|
|
110
|
+ _usercode = d.UserCode,
|
|
|
111
|
+ _username = d.UserName,
|
|
|
112
|
+ _talkstarttime = d.TalkStartTime,
|
|
|
113
|
+ _talkendtime = d.TalkEndTime,
|
|
|
114
|
+ _talklongtime = d.TalkLongTime,
|
|
|
115
|
+ _businesstype = d.BusinessType,
|
|
|
116
|
+ _f_qclc = lc,
|
|
|
117
|
+ _f_qcdc = dc,
|
|
|
118
|
+ _callrecordsid = d.CallRecordsId
|
|
|
119
|
+ };
|
|
|
120
|
+ }).ToList<object>();
|
|
|
121
|
+ //pageData.Rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList();
|
|
|
122
|
+ //pageData.Total = list.Count;
|
|
|
123
|
+
|
|
|
124
|
+ var obj = new
|
|
91
|
125
|
{
|
|
92
|
|
- _callnumber = d.CallNumber,
|
|
93
|
|
- _filepath = d.FilePath,
|
|
94
|
|
- _f_qcstate = d.F_QCState,
|
|
95
|
|
- _f_qcscore = d.F_QCScore,
|
|
96
|
|
- _f_qcquestion = d.F_QCQuestion,
|
|
97
|
|
- _f_qcadvise = d.F_QCAdvise,
|
|
98
|
|
- _calltype = d.CallType,
|
|
99
|
|
- _callstate = d.CallState,
|
|
100
|
|
- _usercode = d.UserCode,
|
|
101
|
|
- _username = d.UserName,
|
|
102
|
|
- _talkstarttime = d.TalkStartTime,
|
|
103
|
|
- _talkendtime = d.TalkEndTime,
|
|
104
|
|
- _talklongtime = d.TalkLongTime,
|
|
105
|
|
- _businesstype = d.BusinessType,
|
|
106
|
|
- _f_qclc = lc,
|
|
107
|
|
- _f_qcdc = dc,
|
|
108
|
|
- _callrecordsid = d.CallRecordsId
|
|
|
126
|
+ rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList(),
|
|
|
127
|
+ total = list.Count
|
|
109
|
128
|
};
|
|
110
|
|
- }).ToList<object>();
|
|
111
|
|
- //pageData.Rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList();
|
|
112
|
|
- //pageData.Total = list.Count;
|
|
113
|
129
|
|
|
114
|
|
- var obj = new
|
|
115
|
|
- {
|
|
116
|
|
- rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList(),
|
|
117
|
|
- total = list.Count
|
|
118
|
|
- };
|
|
119
|
|
-
|
|
120
|
|
- res = Content(obj.ToJson());
|
|
121
|
|
-
|
|
122
|
|
- //if (pageData.Total > 0)
|
|
123
|
|
- //{
|
|
124
|
|
- // res = Success("未质检列表加载成功", pageData);
|
|
125
|
|
- //}
|
|
126
|
|
- //else
|
|
127
|
|
- //{
|
|
128
|
|
- // res = Error("未质检列表暂无数据");
|
|
129
|
|
- //}
|
|
130
|
|
-
|
|
131
|
|
- return res;
|
|
|
130
|
+ return Content(obj.ToJson());
|
|
|
131
|
+ }
|
|
|
132
|
+ return NoToken("未知错误,请重新登录");
|
|
132
|
133
|
}
|
|
133
|
134
|
|
|
134
|
135
|
//获取已质检列表
|
|
135
|
136
|
public ActionResult GetYZJList()
|
|
136
|
137
|
{
|
|
137
|
|
- ActionResult res = NoToken("未知错误,请重新登录");
|
|
138
|
|
- string sql = " 1=1 ";
|
|
139
|
|
- DataTable dt = new DataTable();
|
|
140
|
|
-
|
|
141
|
|
- string phone = HttpUtility.UrlDecode(RequestString.GetQueryString("phone"));
|
|
142
|
|
- string usercode = HttpUtility.UrlDecode(RequestString.GetQueryString("usercode"));
|
|
143
|
|
- string calltype = HttpUtility.UrlDecode(RequestString.GetQueryString("calltype"));
|
|
144
|
|
- string starttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
|
|
145
|
|
- string endtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
|
|
146
|
|
- string startl = HttpUtility.UrlDecode(RequestString.GetQueryString("startl"));
|
|
147
|
|
- string endl = HttpUtility.UrlDecode(RequestString.GetQueryString("endl"));
|
|
148
|
|
- string optid = HttpUtility.UrlDecode(RequestString.GetQueryString("optid"));
|
|
149
|
|
-
|
|
150
|
|
- string strpageindex = RequestString.GetQueryString("page");
|
|
151
|
|
- int pageindex = 1;
|
|
152
|
|
- string strpagesize = RequestString.GetQueryString("pagesize");
|
|
153
|
|
- int pagesize = 10;
|
|
154
|
|
-
|
|
155
|
|
- //已接通,已质检
|
|
156
|
|
- sql += " and CallState='1' and F_QCState=1 ";
|
|
157
|
|
-
|
|
158
|
|
- if (phone.Trim() != "")
|
|
159
|
|
- {
|
|
160
|
|
- sql += " and CallNumber='" + phone + "'";
|
|
161
|
|
- }
|
|
162
|
|
- if (usercode.Trim() != "")
|
|
163
|
|
- {
|
|
164
|
|
- sql += " and UserCode='" + usercode + "'";
|
|
165
|
|
- }
|
|
166
|
|
- if (calltype.Trim() != "")
|
|
167
|
|
- {
|
|
168
|
|
- sql += " and CallType='" + calltype + "'";
|
|
169
|
|
- }
|
|
170
|
|
- if (starttime.Trim() != "")
|
|
|
138
|
+ if (Request.IsAuthenticated)
|
|
171
|
139
|
{
|
|
172
|
|
- sql += " and BeginTime>='" + starttime + "'";
|
|
173
|
|
- }
|
|
174
|
|
- if (endtime.Trim() != "")
|
|
175
|
|
- {
|
|
176
|
|
- sql += " and BeginTime<='" + endtime + "'";
|
|
177
|
|
- }
|
|
178
|
|
- if (startl.Trim() != "")
|
|
179
|
|
- {
|
|
180
|
|
- sql += " and TalkLongTime>=" + startl + " ";
|
|
181
|
|
- }
|
|
182
|
|
- if (endl.Trim() != "")
|
|
183
|
|
- {
|
|
184
|
|
- sql += " and TalkLongTime<=" + endl + " ";
|
|
185
|
|
- }
|
|
186
|
140
|
|
|
187
|
|
- if (strpageindex.Trim() != "")
|
|
188
|
|
- {
|
|
189
|
|
- pageindex = Convert.ToInt32(strpageindex);
|
|
190
|
|
- }
|
|
|
141
|
+ int userId = CurrentUser.UserData.F_UserId;
|
|
|
142
|
+ Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
|
|
191
|
143
|
|
|
192
|
|
- if (strpagesize.Trim() != "")
|
|
193
|
|
- {
|
|
194
|
|
- pagesize = Convert.ToInt32(strpagesize);
|
|
195
|
|
- }
|
|
|
144
|
+ string sql = " 1=1 ";
|
|
|
145
|
+ DataTable dt = new DataTable();
|
|
196
|
146
|
|
|
197
|
|
- List<Model.T_Call_CallRecords_QC> Plist = new BLL.T_Call_CallRecords_QC().GetModelList(sql);//.GetListV1(sql);
|
|
198
|
|
- List<Model.T_Call_CallRecordsLD> ldList = new BLL.T_Call_CallRecordsLD().GetModelList("");
|
|
199
|
|
- Model.PageData<object> pageData = new Model.PageData<object>();
|
|
200
|
|
- var list = Plist.Select(d => {
|
|
201
|
|
- int lc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsListen == true).Count();
|
|
202
|
|
- int dc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsDownload == true).Count();
|
|
203
|
|
- return new
|
|
|
147
|
+
|
|
|
148
|
+ if (!string.IsNullOrEmpty(userModel.groupcode))
|
|
204
|
149
|
{
|
|
205
|
|
- _callnumber = d.CallNumber,
|
|
206
|
|
- _filepath = d.FilePath,
|
|
207
|
|
- _f_qcstate = d.F_QCState,
|
|
208
|
|
- _f_qcscore = d.F_QCScore,
|
|
209
|
|
- _f_qcquestion = d.F_QCQuestion,
|
|
210
|
|
- _f_qcadvise = d.F_QCAdvise,
|
|
211
|
|
- _calltype = d.CallType,
|
|
212
|
|
- _callstate = d.CallState,
|
|
213
|
|
- _usercode = d.UserCode,
|
|
214
|
|
- _username = d.UserName,
|
|
215
|
|
- _talkstarttime = d.TalkStartTime,
|
|
216
|
|
- _talkendtime = d.TalkEndTime,
|
|
217
|
|
- _talklongtime = d.TalkLongTime,
|
|
218
|
|
- _businesstype = d.BusinessType,
|
|
219
|
|
- _f_qclc = lc,
|
|
220
|
|
- _f_qcdc = dc,
|
|
221
|
|
- _callrecordsid = d.CallRecordsId
|
|
222
|
|
- };
|
|
223
|
|
- }).ToList<object>();
|
|
|
150
|
+ sql += " and F_GroupCode = '" + userModel.groupcode + "' ";
|
|
|
151
|
+ }
|
|
224
|
152
|
|
|
225
|
|
- var obj = new
|
|
226
|
|
- {
|
|
227
|
|
- rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList(),
|
|
228
|
|
- total = list.Count
|
|
229
|
|
- };
|
|
|
153
|
+ string phone = HttpUtility.UrlDecode(RequestString.GetQueryString("phone"));
|
|
|
154
|
+ string usercode = HttpUtility.UrlDecode(RequestString.GetQueryString("usercode"));
|
|
|
155
|
+ string calltype = HttpUtility.UrlDecode(RequestString.GetQueryString("calltype"));
|
|
|
156
|
+ string starttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
|
|
|
157
|
+ string endtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
|
|
|
158
|
+ string startl = HttpUtility.UrlDecode(RequestString.GetQueryString("startl"));
|
|
|
159
|
+ string endl = HttpUtility.UrlDecode(RequestString.GetQueryString("endl"));
|
|
|
160
|
+ string optid = HttpUtility.UrlDecode(RequestString.GetQueryString("optid"));
|
|
|
161
|
+
|
|
|
162
|
+ string strpageindex = RequestString.GetQueryString("page");
|
|
|
163
|
+ int pageindex = 1;
|
|
|
164
|
+ string strpagesize = RequestString.GetQueryString("pagesize");
|
|
|
165
|
+ int pagesize = 10;
|
|
|
166
|
+
|
|
|
167
|
+ //已接通,已质检
|
|
|
168
|
+ sql += " and CallState='1' and F_QCState=1 ";
|
|
|
169
|
+
|
|
|
170
|
+ if (phone.Trim() != "")
|
|
|
171
|
+ {
|
|
|
172
|
+ sql += " and CallNumber='" + phone + "'";
|
|
|
173
|
+ }
|
|
|
174
|
+ if (usercode.Trim() != "")
|
|
|
175
|
+ {
|
|
|
176
|
+ sql += " and UserCode='" + usercode + "'";
|
|
|
177
|
+ }
|
|
|
178
|
+ if (calltype.Trim() != "")
|
|
|
179
|
+ {
|
|
|
180
|
+ sql += " and CallType='" + calltype + "'";
|
|
|
181
|
+ }
|
|
|
182
|
+ if (starttime.Trim() != "")
|
|
|
183
|
+ {
|
|
|
184
|
+ sql += " and BeginTime>='" + starttime + "'";
|
|
|
185
|
+ }
|
|
|
186
|
+ if (endtime.Trim() != "")
|
|
|
187
|
+ {
|
|
|
188
|
+ sql += " and BeginTime<='" + endtime + "'";
|
|
|
189
|
+ }
|
|
|
190
|
+ if (startl.Trim() != "")
|
|
|
191
|
+ {
|
|
|
192
|
+ sql += " and TalkLongTime>=" + startl + " ";
|
|
|
193
|
+ }
|
|
|
194
|
+ if (endl.Trim() != "")
|
|
|
195
|
+ {
|
|
|
196
|
+ sql += " and TalkLongTime<=" + endl + " ";
|
|
|
197
|
+ }
|
|
230
|
198
|
|
|
231
|
|
- res = Content(obj.ToJson());
|
|
|
199
|
+ if (strpageindex.Trim() != "")
|
|
|
200
|
+ {
|
|
|
201
|
+ pageindex = Convert.ToInt32(strpageindex);
|
|
|
202
|
+ }
|
|
|
203
|
+
|
|
|
204
|
+ if (strpagesize.Trim() != "")
|
|
|
205
|
+ {
|
|
|
206
|
+ pagesize = Convert.ToInt32(strpagesize);
|
|
|
207
|
+ }
|
|
232
|
208
|
|
|
233
|
|
- //pageData.Rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList();
|
|
234
|
|
- //pageData.Total = list.Count;
|
|
|
209
|
+ List<Model.T_Call_CallRecords_QC> Plist = new BLL.T_Call_CallRecords_QC().GetModelList(sql);//.GetListV1(sql);
|
|
|
210
|
+ List<Model.T_Call_CallRecordsLD> ldList = new BLL.T_Call_CallRecordsLD().GetModelList("");
|
|
|
211
|
+ Model.PageData<object> pageData = new Model.PageData<object>();
|
|
|
212
|
+ var list = Plist.Select(d =>
|
|
|
213
|
+ {
|
|
|
214
|
+ int lc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsListen == true).Count();
|
|
|
215
|
+ int dc = ldList.Where(l => l.F_CallRecordsID == d.CallRecordsId && l.F_OptID == int.Parse(optid) && l.F_IsDownload == true).Count();
|
|
|
216
|
+ return new
|
|
|
217
|
+ {
|
|
|
218
|
+ _callnumber = d.CallNumber,
|
|
|
219
|
+ _filepath = d.FilePath,
|
|
|
220
|
+ _f_qcstate = d.F_QCState,
|
|
|
221
|
+ _f_qcscore = d.F_QCScore,
|
|
|
222
|
+ _f_qcquestion = d.F_QCQuestion,
|
|
|
223
|
+ _f_qcadvise = d.F_QCAdvise,
|
|
|
224
|
+ _calltype = d.CallType,
|
|
|
225
|
+ _callstate = d.CallState,
|
|
|
226
|
+ _usercode = d.UserCode,
|
|
|
227
|
+ _username = d.UserName,
|
|
|
228
|
+ _talkstarttime = d.TalkStartTime,
|
|
|
229
|
+ _talkendtime = d.TalkEndTime,
|
|
|
230
|
+ _talklongtime = d.TalkLongTime,
|
|
|
231
|
+ _businesstype = d.BusinessType,
|
|
|
232
|
+ _f_qclc = lc,
|
|
|
233
|
+ _f_qcdc = dc,
|
|
|
234
|
+ _callrecordsid = d.CallRecordsId
|
|
|
235
|
+ };
|
|
|
236
|
+ }).ToList<object>();
|
|
|
237
|
+
|
|
|
238
|
+ var obj = new
|
|
|
239
|
+ {
|
|
|
240
|
+ rows = list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList(),
|
|
|
241
|
+ total = list.Count
|
|
|
242
|
+ };
|
|
235
|
243
|
|
|
236
|
|
- //if (pageData.Total > 0)
|
|
237
|
|
- //{
|
|
238
|
|
- // res = Success("已质检列表加载成功", pageData);
|
|
239
|
|
- //}
|
|
240
|
|
- //else
|
|
241
|
|
- //{
|
|
242
|
|
- // res = Error("已质检列表暂无数据");
|
|
243
|
|
- //}
|
|
|
244
|
+ return Content(obj.ToJson());
|
|
244
|
245
|
|
|
245
|
|
- return res;
|
|
|
246
|
+ }
|
|
|
247
|
+ return NoToken("未知错误,请重新登录");
|
|
246
|
248
|
}
|
|
247
|
249
|
|
|
248
|
250
|
//获取质检详情
|
|
249
|
251
|
public ActionResult GetIndexList(string id)
|
|
250
|
252
|
{
|
|
251
|
|
- ActionResult res = NoToken("未知错误,请重新登录");
|
|
252
|
|
- DataTable dt = new DataTable();
|
|
253
|
|
- DataTable dtindex = new DataTable();
|
|
254
|
|
- DataTable dtres = new DataTable();
|
|
255
|
|
-
|
|
256
|
|
- dt = new BLL.T_QC_IndexCategory().GetList(" F_DeleteFlag=0 order by F_Sort ,F_CategoryId").Tables[0];
|
|
257
|
|
- dtindex = new BLL.T_QC_IndexBase().GetList(" F_DeleteFlag=0 order by F_Sort ,F_CategoryId").Tables[0];
|
|
258
|
|
- dtres = new BLL.T_QC_IndexRes().GetList(" CallRecordsId=" + id + " ").Tables[0];
|
|
259
|
|
- int i = 0;
|
|
260
|
|
- int m = 0;
|
|
261
|
|
- int indexcount = 0;
|
|
262
|
|
- int allscore = 0;
|
|
263
|
|
- int childscore = 0;
|
|
264
|
|
- int childpf = 0;
|
|
265
|
|
- int allpf = 0;
|
|
266
|
|
- List<Model.QCModel> qclist = new List<Model.QCModel>();
|
|
267
|
|
- object obj = null;
|
|
268
|
|
-
|
|
269
|
|
- foreach (DataRow dr in dt.Select("F_ParentId=0"))
|
|
|
253
|
+ if (Request.IsAuthenticated)
|
|
270
|
254
|
{
|
|
271
|
|
- Model.QCModel qcml = new Model.QCModel();
|
|
272
|
|
- List<Model.QCModel> qcclist = new List<Model.QCModel>();
|
|
|
255
|
+ DataTable dt = new DataTable();
|
|
|
256
|
+ DataTable dtindex = new DataTable();
|
|
|
257
|
+ DataTable dtres = new DataTable();
|
|
|
258
|
+
|
|
|
259
|
+ dt = new BLL.T_QC_IndexCategory().GetList(" F_DeleteFlag=0 order by F_Sort ,F_CategoryId").Tables[0];
|
|
|
260
|
+ dtindex = new BLL.T_QC_IndexBase().GetList(" F_DeleteFlag=0 order by F_Sort ,F_CategoryId").Tables[0];
|
|
|
261
|
+ dtres = new BLL.T_QC_IndexRes().GetList(" CallRecordsId=" + id + " ").Tables[0];
|
|
|
262
|
+ int i = 0;
|
|
|
263
|
+ int m = 0;
|
|
|
264
|
+ int indexcount = 0;
|
|
|
265
|
+ int allscore = 0;
|
|
|
266
|
+ int childscore = 0;
|
|
|
267
|
+ int childpf = 0;
|
|
|
268
|
+ int allpf = 0;
|
|
|
269
|
+ List<Model.QCModel> qclist = new List<Model.QCModel>();
|
|
|
270
|
+ object obj = null;
|
|
|
271
|
+
|
|
|
272
|
+ foreach (DataRow dr in dt.Select("F_ParentId=0"))
|
|
|
273
|
+ {
|
|
|
274
|
+ Model.QCModel qcml = new Model.QCModel();
|
|
|
275
|
+ List<Model.QCModel> qcclist = new List<Model.QCModel>();
|
|
273
|
276
|
|
|
274
|
|
- i = 0;
|
|
275
|
|
- indexcount = 0;
|
|
276
|
|
- childscore = 0;
|
|
277
|
|
- childpf = 0;
|
|
|
277
|
+ i = 0;
|
|
|
278
|
+ indexcount = 0;
|
|
|
279
|
+ childscore = 0;
|
|
|
280
|
+ childpf = 0;
|
|
278
|
281
|
|
|
279
|
|
- string categoryid = dr["F_CategoryId"].ToString().Trim();
|
|
|
282
|
+ string categoryid = dr["F_CategoryId"].ToString().Trim();
|
|
280
|
283
|
|
|
281
|
|
- qcml.Qcid = categoryid;
|
|
282
|
|
- qcml.Qcname = dr["F_CategoryName"].ToString().Trim();
|
|
|
284
|
+ qcml.Qcid = categoryid;
|
|
|
285
|
+ qcml.Qcname = dr["F_CategoryName"].ToString().Trim();
|
|
283
|
286
|
|
|
284
|
|
- obj = DbHelperSQL.GetSingle("select count(*) from T_QC_IndexBase where F_CategoryId in(select F_CategoryId from T_QC_IndexCategory where F_ParentId=" + dr["F_CategoryId"] + ")");
|
|
285
|
|
- qcml.Rowspan = obj.ToString();
|
|
286
|
|
- foreach (DataRow childdr in dt.Select("F_ParentId=" + categoryid + ""))
|
|
287
|
|
- {
|
|
288
|
|
- Model.QCModel qcmlc = new Model.QCModel();
|
|
289
|
|
- List<Model.QCModel> qccrlist = new List<Model.QCModel>();
|
|
290
|
|
- m = 0;
|
|
291
|
|
- #region 子分类
|
|
292
|
|
- string childcategoryid = childdr["F_CategoryId"].ToString().Trim();
|
|
293
|
|
- DataRow[] arrchild = dtindex.Select("F_CategoryId=" + childcategoryid + "");
|
|
294
|
|
- indexcount += arrchild.Length;
|
|
295
|
|
-
|
|
296
|
|
- //加载项
|
|
297
|
|
- qcmlc.Qcid = categoryid + "-" + childcategoryid;
|
|
298
|
|
- qcmlc.Qcname = childdr["F_CategoryName"].ToString().Trim();
|
|
299
|
|
- obj = DbHelperSQL.GetSingle("select count(*) from T_QC_IndexBase where F_CategoryId=" + childdr["F_CategoryId"]);
|
|
300
|
|
- qcmlc.Rowspan = obj.ToString();
|
|
301
|
|
- #endregion
|
|
302
|
|
- foreach (DataRow indexdr in arrchild)
|
|
|
287
|
+ obj = DbHelperSQL.GetSingle("select count(*) from T_QC_IndexBase where F_CategoryId in(select F_CategoryId from T_QC_IndexCategory where F_ParentId=" + dr["F_CategoryId"] + ")");
|
|
|
288
|
+ qcml.Rowspan = obj.ToString();
|
|
|
289
|
+ foreach (DataRow childdr in dt.Select("F_ParentId=" + categoryid + ""))
|
|
303
|
290
|
{
|
|
304
|
|
- Model.QCModel qcmlcr = new Model.QCModel();
|
|
305
|
|
- string indexid = indexdr["F_IndexId"].ToString().Trim();
|
|
306
|
|
- string pf = "0";
|
|
307
|
|
- try
|
|
308
|
|
- {
|
|
309
|
|
- //分类分数合计
|
|
310
|
|
- childscore += Convert.ToInt32(indexdr["F_Score"].ToString().Trim());
|
|
311
|
|
- //总计合计
|
|
312
|
|
- allscore += Convert.ToInt32(indexdr["F_Score"].ToString().Trim());
|
|
313
|
|
- }
|
|
314
|
|
- catch
|
|
315
|
|
- { }
|
|
316
|
|
- try
|
|
317
|
|
- {
|
|
318
|
|
- pf = dtres.Select("F_IndexId=" + indexid + "")[0]["F_QCScore"].ToString().Trim();
|
|
319
|
|
- childpf += Convert.ToInt32(pf);//分类评分合计
|
|
320
|
|
- allpf += Convert.ToInt32(pf);//评分总计
|
|
321
|
|
- }
|
|
322
|
|
- catch
|
|
323
|
|
- {
|
|
324
|
|
- }
|
|
325
|
|
-
|
|
326
|
|
- #region 指标
|
|
327
|
|
- //加载指标
|
|
328
|
|
- qcmlcr.Qcid = categoryid + "-" + childcategoryid + "-" + indexid;
|
|
329
|
|
- qcmlcr.Qcname = indexdr["F_Title"].ToString().Trim();
|
|
330
|
|
- qcmlcr.Qcscore = indexdr["F_Score"].ToString().Trim();
|
|
331
|
|
- qcmlcr.Qcpf = pf;
|
|
332
|
|
- qcmlcr.Rowspan = "0";
|
|
333
|
|
- qcmlcr.Colspan = "0";
|
|
|
291
|
+ Model.QCModel qcmlc = new Model.QCModel();
|
|
|
292
|
+ List<Model.QCModel> qccrlist = new List<Model.QCModel>();
|
|
|
293
|
+ m = 0;
|
|
|
294
|
+ #region 子分类
|
|
|
295
|
+ string childcategoryid = childdr["F_CategoryId"].ToString().Trim();
|
|
|
296
|
+ DataRow[] arrchild = dtindex.Select("F_CategoryId=" + childcategoryid + "");
|
|
|
297
|
+ indexcount += arrchild.Length;
|
|
|
298
|
+
|
|
|
299
|
+ //加载项
|
|
|
300
|
+ qcmlc.Qcid = categoryid + "-" + childcategoryid;
|
|
|
301
|
+ qcmlc.Qcname = childdr["F_CategoryName"].ToString().Trim();
|
|
|
302
|
+ obj = DbHelperSQL.GetSingle("select count(*) from T_QC_IndexBase where F_CategoryId=" + childdr["F_CategoryId"]);
|
|
|
303
|
+ qcmlc.Rowspan = obj.ToString();
|
|
334
|
304
|
#endregion
|
|
335
|
|
- m++;
|
|
336
|
|
-
|
|
337
|
|
- qccrlist.Add(qcmlcr);
|
|
|
305
|
+ foreach (DataRow indexdr in arrchild)
|
|
|
306
|
+ {
|
|
|
307
|
+ Model.QCModel qcmlcr = new Model.QCModel();
|
|
|
308
|
+ string indexid = indexdr["F_IndexId"].ToString().Trim();
|
|
|
309
|
+ string pf = "0";
|
|
|
310
|
+ try
|
|
|
311
|
+ {
|
|
|
312
|
+ //分类分数合计
|
|
|
313
|
+ childscore += Convert.ToInt32(indexdr["F_Score"].ToString().Trim());
|
|
|
314
|
+ //总计合计
|
|
|
315
|
+ allscore += Convert.ToInt32(indexdr["F_Score"].ToString().Trim());
|
|
|
316
|
+ }
|
|
|
317
|
+ catch
|
|
|
318
|
+ { }
|
|
|
319
|
+ try
|
|
|
320
|
+ {
|
|
|
321
|
+ pf = dtres.Select("F_IndexId=" + indexid + "")[0]["F_QCScore"].ToString().Trim();
|
|
|
322
|
+ childpf += Convert.ToInt32(pf);//分类评分合计
|
|
|
323
|
+ allpf += Convert.ToInt32(pf);//评分总计
|
|
|
324
|
+ }
|
|
|
325
|
+ catch
|
|
|
326
|
+ {
|
|
|
327
|
+ }
|
|
|
328
|
+
|
|
|
329
|
+ #region 指标
|
|
|
330
|
+ //加载指标
|
|
|
331
|
+ qcmlcr.Qcid = categoryid + "-" + childcategoryid + "-" + indexid;
|
|
|
332
|
+ qcmlcr.Qcname = indexdr["F_Title"].ToString().Trim();
|
|
|
333
|
+ qcmlcr.Qcscore = indexdr["F_Score"].ToString().Trim();
|
|
|
334
|
+ qcmlcr.Qcpf = pf;
|
|
|
335
|
+ qcmlcr.Rowspan = "0";
|
|
|
336
|
+ qcmlcr.Colspan = "0";
|
|
|
337
|
+ #endregion
|
|
|
338
|
+ m++;
|
|
|
339
|
+
|
|
|
340
|
+ qccrlist.Add(qcmlcr);
|
|
338
|
341
|
|
|
|
342
|
+ }
|
|
|
343
|
+ i++;
|
|
|
344
|
+ qcmlc.Qclist = qccrlist;
|
|
|
345
|
+ qcclist.Add(qcmlc);
|
|
339
|
346
|
}
|
|
340
|
|
- i++;
|
|
341
|
|
- qcmlc.Qclist = qccrlist;
|
|
342
|
|
- qcclist.Add(qcmlc);
|
|
|
347
|
+ //合计
|
|
|
348
|
+ qcml.Qcscore = childscore.ToString().Trim();
|
|
|
349
|
+ qcml.Qcpf = childpf.ToString().Trim();
|
|
|
350
|
+ qcml.Qclist = qcclist;
|
|
|
351
|
+ qcml.Colspan = "2";
|
|
|
352
|
+ qclist.Add(qcml);
|
|
343
|
353
|
}
|
|
344
|
|
- //合计
|
|
345
|
|
- qcml.Qcscore = childscore.ToString().Trim();
|
|
346
|
|
- qcml.Qcpf = childpf.ToString().Trim();
|
|
347
|
|
- qcml.Qclist = qcclist;
|
|
348
|
|
- qcml.Colspan = "2";
|
|
349
|
|
- qclist.Add(qcml);
|
|
350
|
|
- }
|
|
351
|
|
- Model.QCModel qcmlhj = new Model.QCModel();
|
|
352
|
|
- qcmlhj.Qcid = "0";
|
|
353
|
|
- qcmlhj.Qcname = "总计";
|
|
354
|
|
- qcmlhj.Qcscore = allscore.ToString().Trim();
|
|
355
|
|
- qcmlhj.Qcpf = allpf.ToString().Trim();
|
|
356
|
|
- qcmlhj.Qclist = qclist;
|
|
357
|
|
- qcmlhj.Colspan = "3";
|
|
|
354
|
+ Model.QCModel qcmlhj = new Model.QCModel();
|
|
|
355
|
+ qcmlhj.Qcid = "0";
|
|
|
356
|
+ qcmlhj.Qcname = "总计";
|
|
|
357
|
+ qcmlhj.Qcscore = allscore.ToString().Trim();
|
|
|
358
|
+ qcmlhj.Qcpf = allpf.ToString().Trim();
|
|
|
359
|
+ qcmlhj.Qclist = qclist;
|
|
|
360
|
+ qcmlhj.Colspan = "3";
|
|
|
361
|
+
|
|
|
362
|
+
|
|
|
363
|
+ dtres.Clear();
|
|
|
364
|
+ dtres.Dispose();
|
|
|
365
|
+ dtindex.Clear();
|
|
|
366
|
+ dtindex.Dispose();
|
|
|
367
|
+ dt.Clear();
|
|
|
368
|
+ dt.Dispose();
|
|
358
|
369
|
|
|
359
|
|
- res = Success("质检部分加载成功", qcmlhj);
|
|
|
370
|
+ return Success("质检部分加载成功", qcmlhj);
|
|
360
|
371
|
|
|
361
|
372
|
|
|
362
|
|
- dtres.Clear();
|
|
363
|
|
- dtres.Dispose();
|
|
364
|
|
- dtindex.Clear();
|
|
365
|
|
- dtindex.Dispose();
|
|
366
|
|
- dt.Clear();
|
|
367
|
|
- dt.Dispose();
|
|
368
|
373
|
|
|
369
|
|
- return res;
|
|
|
374
|
+ }
|
|
|
375
|
+ return NoToken("未知错误,请重新登录");
|
|
370
|
376
|
}
|
|
371
|
377
|
|
|
372
|
378
|
|
|
373
|
379
|
//保存质检得分
|
|
374
|
380
|
public ActionResult SaveData(string id, string xmlinfo)
|
|
375
|
381
|
{
|
|
376
|
|
- ActionResult res = NoToken("未知错误,请重新登录");
|
|
377
|
|
- DataTable dt = new DataTable();
|
|
378
|
|
-
|
|
379
|
|
- //string id = HttpUtility.UrlDecode(RequestString.GetQueryString("id"));
|
|
380
|
|
- //string userid = HttpUtility.UrlDecode(RequestString.GetQueryString("userid"));
|
|
381
|
|
- //string username = HttpUtility.UrlDecode(RequestString.GetQueryString("username"));
|
|
382
|
|
- //string xmlinfo = HttpUtility.UrlDecode(RequestString.GetQueryString("xmlinfo"));
|
|
383
|
|
- //string question = HttpUtility.UrlDecode(RequestString.GetQueryString("question"));
|
|
384
|
|
- //string advise = HttpUtility.UrlDecode(RequestString.GetQueryString("advise"));
|
|
385
|
|
- dt = new BLL.T_QC_IndexRes().GetList(" CallRecordsId=" + id + " ").Tables[0];
|
|
386
|
|
- int allscore = 0;
|
|
387
|
|
- foreach (string scoreinfo in xmlinfo.Trim(';').Split(';'))
|
|
|
382
|
+ if (Request.IsAuthenticated)
|
|
388
|
383
|
{
|
|
389
|
|
- //判断存在该指标评估则修改,无则添加
|
|
390
|
|
- string idsss = scoreinfo.Split(':')[0];
|
|
391
|
|
- string indexid = idsss.Split('-')[2];
|
|
392
|
|
- if (dt.Select(" F_IndexId=" + indexid + " ").Length > 0)
|
|
|
384
|
+ DataTable dt = new DataTable();
|
|
|
385
|
+
|
|
|
386
|
+ //string id = HttpUtility.UrlDecode(RequestString.GetQueryString("id"));
|
|
|
387
|
+ //string userid = HttpUtility.UrlDecode(RequestString.GetQueryString("userid"));
|
|
|
388
|
+ //string username = HttpUtility.UrlDecode(RequestString.GetQueryString("username"));
|
|
|
389
|
+ //string xmlinfo = HttpUtility.UrlDecode(RequestString.GetQueryString("xmlinfo"));
|
|
|
390
|
+ //string question = HttpUtility.UrlDecode(RequestString.GetQueryString("question"));
|
|
|
391
|
+ //string advise = HttpUtility.UrlDecode(RequestString.GetQueryString("advise"));
|
|
|
392
|
+ dt = new BLL.T_QC_IndexRes().GetList(" CallRecordsId=" + id + " ").Tables[0];
|
|
|
393
|
+ int allscore = 0;
|
|
|
394
|
+ foreach (string scoreinfo in xmlinfo.Trim(';').Split(';'))
|
|
393
|
395
|
{
|
|
394
|
|
- Model.T_QC_IndexRes model = new Model.T_QC_IndexRes();
|
|
395
|
|
- model.F_Id = Convert.ToInt32(dt.Select(" F_IndexId=" + indexid + " ")[0]["F_Id"].ToString());
|
|
396
|
|
- model.CallRecordsId = Convert.ToInt32(id);
|
|
397
|
|
- try
|
|
|
396
|
+ //判断存在该指标评估则修改,无则添加
|
|
|
397
|
+ string idsss = scoreinfo.Split(':')[0];
|
|
|
398
|
+ string indexid = idsss.Split('-')[2];
|
|
|
399
|
+ if (dt.Select(" F_IndexId=" + indexid + " ").Length > 0)
|
|
398
|
400
|
{
|
|
399
|
|
- model.F_IndexId = Convert.ToInt32(indexid);
|
|
|
401
|
+ Model.T_QC_IndexRes model = new Model.T_QC_IndexRes();
|
|
|
402
|
+ model.F_Id = Convert.ToInt32(dt.Select(" F_IndexId=" + indexid + " ")[0]["F_Id"].ToString());
|
|
|
403
|
+ model.CallRecordsId = Convert.ToInt32(id);
|
|
|
404
|
+ try
|
|
|
405
|
+ {
|
|
|
406
|
+ model.F_IndexId = Convert.ToInt32(indexid);
|
|
|
407
|
+ }
|
|
|
408
|
+ catch
|
|
|
409
|
+ { }
|
|
|
410
|
+ try
|
|
|
411
|
+ {
|
|
|
412
|
+ model.F_QCScore = Convert.ToInt32(scoreinfo.Split(':')[1]);
|
|
|
413
|
+ allscore += Convert.ToInt32(scoreinfo.Split(':')[1]);
|
|
|
414
|
+ }
|
|
|
415
|
+ catch
|
|
|
416
|
+ { }
|
|
|
417
|
+ new BLL.T_QC_IndexRes().Update(model);
|
|
400
|
418
|
}
|
|
401
|
|
- catch
|
|
402
|
|
- { }
|
|
403
|
|
- try
|
|
|
419
|
+ else
|
|
404
|
420
|
{
|
|
405
|
|
- model.F_QCScore = Convert.ToInt32(scoreinfo.Split(':')[1]);
|
|
406
|
|
- allscore += Convert.ToInt32(scoreinfo.Split(':')[1]);
|
|
|
421
|
+ Model.T_QC_IndexRes model = new Model.T_QC_IndexRes();
|
|
|
422
|
+ model.CallRecordsId = Convert.ToInt32(id);
|
|
|
423
|
+ try
|
|
|
424
|
+ {
|
|
|
425
|
+ model.F_IndexId = Convert.ToInt32(indexid);
|
|
|
426
|
+ }
|
|
|
427
|
+ catch
|
|
|
428
|
+ { }
|
|
|
429
|
+ try
|
|
|
430
|
+ {
|
|
|
431
|
+ model.F_QCScore = Convert.ToInt32(scoreinfo.Split(':')[1]);
|
|
|
432
|
+ allscore += Convert.ToInt32(scoreinfo.Split(':')[1]);
|
|
|
433
|
+ }
|
|
|
434
|
+ catch
|
|
|
435
|
+ { }
|
|
|
436
|
+ new BLL.T_QC_IndexRes().Add(model);
|
|
407
|
437
|
}
|
|
408
|
|
- catch
|
|
409
|
|
- { }
|
|
410
|
|
- new BLL.T_QC_IndexRes().Update(model);
|
|
|
438
|
+ }
|
|
|
439
|
+
|
|
|
440
|
+ Model.T_Call_CallRecords_QC callmodel = new Model.T_Call_CallRecords_QC();
|
|
|
441
|
+ callmodel.CallRecordsId = Convert.ToInt32(id);
|
|
|
442
|
+ callmodel.F_QCState = 1;
|
|
|
443
|
+ callmodel.F_QCScore = allscore;
|
|
|
444
|
+ callmodel.F_QCUserId = CurrentUser.UserData.F_UserId;
|
|
|
445
|
+ callmodel.F_QCUserName = CurrentUser.UserData.F_UserName;
|
|
|
446
|
+ callmodel.F_QCTime = DateTime.Now;
|
|
|
447
|
+ callmodel.F_QCIsSelect = 0;
|
|
|
448
|
+ callmodel.F_QCRemark = "";
|
|
|
449
|
+ //callmodel.F_QCQuestion = question;
|
|
|
450
|
+ //callmodel.F_QCAdvise = advise;
|
|
|
451
|
+
|
|
|
452
|
+
|
|
|
453
|
+ dt.Clear();
|
|
|
454
|
+ dt.Dispose();
|
|
|
455
|
+
|
|
|
456
|
+ if (new BLL.T_Call_CallRecords_QC().UpdateQC(callmodel))
|
|
|
457
|
+ {
|
|
|
458
|
+ return Success("保存成功");
|
|
411
|
459
|
}
|
|
412
|
460
|
else
|
|
413
|
461
|
{
|
|
414
|
|
- Model.T_QC_IndexRes model = new Model.T_QC_IndexRes();
|
|
415
|
|
- model.CallRecordsId = Convert.ToInt32(id);
|
|
416
|
|
- try
|
|
417
|
|
- {
|
|
418
|
|
- model.F_IndexId = Convert.ToInt32(indexid);
|
|
419
|
|
- }
|
|
420
|
|
- catch
|
|
421
|
|
- { }
|
|
422
|
|
- try
|
|
423
|
|
- {
|
|
424
|
|
- model.F_QCScore = Convert.ToInt32(scoreinfo.Split(':')[1]);
|
|
425
|
|
- allscore += Convert.ToInt32(scoreinfo.Split(':')[1]);
|
|
426
|
|
- }
|
|
427
|
|
- catch
|
|
428
|
|
- { }
|
|
429
|
|
- new BLL.T_QC_IndexRes().Add(model);
|
|
|
462
|
+ return Error("保存质检评分信息失败");
|
|
430
|
463
|
}
|
|
431
|
|
- }
|
|
432
|
464
|
|
|
433
|
|
- Model.T_Call_CallRecords_QC callmodel = new Model.T_Call_CallRecords_QC();
|
|
434
|
|
- callmodel.CallRecordsId = Convert.ToInt32(id);
|
|
435
|
|
- callmodel.F_QCState = 1;
|
|
436
|
|
- callmodel.F_QCScore = allscore;
|
|
437
|
|
- callmodel.F_QCUserId = CurrentUser.UserData.F_UserId;
|
|
438
|
|
- callmodel.F_QCUserName = CurrentUser.UserData.F_UserName;
|
|
439
|
|
- callmodel.F_QCTime = DateTime.Now;
|
|
440
|
|
- callmodel.F_QCIsSelect = 0;
|
|
441
|
|
- callmodel.F_QCRemark = "";
|
|
442
|
|
- //callmodel.F_QCQuestion = question;
|
|
443
|
|
- //callmodel.F_QCAdvise = advise;
|
|
444
|
|
- if (new BLL.T_Call_CallRecords_QC().UpdateQC(callmodel))
|
|
445
|
|
- {
|
|
446
|
|
- res = Success("保存成功");
|
|
447
|
|
- }
|
|
448
|
|
- else
|
|
449
|
|
- {
|
|
450
|
|
- res = Error("保存质检评分信息失败");
|
|
451
|
|
- }
|
|
452
|
465
|
|
|
453
|
|
- dt.Clear();
|
|
454
|
|
- dt.Dispose();
|
|
455
|
|
-
|
|
456
|
|
- return res;
|
|
|
466
|
+ }
|
|
|
467
|
+ return NoToken("未知错误,请重新登录");
|
|
457
|
468
|
}
|
|
458
|
469
|
|
|
459
|
470
|
//添加日志
|
|
460
|
471
|
public ActionResult AddLogs()
|
|
461
|
472
|
{
|
|
462
|
|
- ActionResult res = NoToken("未知错误,请重新登录");
|
|
|
473
|
+ if (Request.IsAuthenticated)
|
|
|
474
|
+ {
|
|
463
|
475
|
|
|
464
|
|
- string id = HttpUtility.UrlDecode(RequestString.GetQueryString("id"));
|
|
465
|
|
- //string optid = HttpUtility.UrlDecode(RequestString.GetQueryString("optid"));
|
|
466
|
|
- //string optby = HttpUtility.UrlDecode(RequestString.GetQueryString("optby"));
|
|
467
|
|
- string type = HttpUtility.UrlDecode(RequestString.GetQueryString("type"));
|
|
|
476
|
+ string id = HttpUtility.UrlDecode(RequestString.GetQueryString("id"));
|
|
|
477
|
+ //string optid = HttpUtility.UrlDecode(RequestString.GetQueryString("optid"));
|
|
|
478
|
+ //string optby = HttpUtility.UrlDecode(RequestString.GetQueryString("optby"));
|
|
|
479
|
+ string type = HttpUtility.UrlDecode(RequestString.GetQueryString("type"));
|
|
468
|
480
|
|
|
469
|
|
- bool r = addldlog(int.Parse(id), CurrentUser.UserData.F_UserId, CurrentUser.UserData.F_UserName, int.Parse(type));
|
|
470
|
|
- if (r)
|
|
471
|
|
- {
|
|
472
|
|
- res = Success("添加日志成功");
|
|
473
|
|
- }
|
|
474
|
|
- else
|
|
475
|
|
- {
|
|
476
|
|
- res = Error("添加日志失败");
|
|
|
481
|
+ bool r = addldlog(int.Parse(id), CurrentUser.UserData.F_UserId, CurrentUser.UserData.F_UserName, int.Parse(type));
|
|
|
482
|
+ if (r)
|
|
|
483
|
+ {
|
|
|
484
|
+ return Success("添加日志成功");
|
|
|
485
|
+ }
|
|
|
486
|
+ else
|
|
|
487
|
+ {
|
|
|
488
|
+ return Error("添加日志失败");
|
|
|
489
|
+ }
|
|
477
|
490
|
}
|
|
478
|
|
-
|
|
479
|
|
- return res;
|
|
|
491
|
+ return NoToken("未知错误,请重新登录");
|
|
480
|
492
|
}
|
|
481
|
493
|
private bool addldlog(int id, int optid, string optby, int type)
|
|
482
|
494
|
{
|
|
483
|
|
- bool res = false;
|
|
484
|
|
- try
|
|
485
|
|
- {
|
|
486
|
|
- Model.T_Call_CallRecordsLD ldmodel = new Model.T_Call_CallRecordsLD();
|
|
487
|
|
- ldmodel.F_CallRecordsID = id;
|
|
488
|
|
- if (type == 0)
|
|
489
|
|
- ldmodel.F_IsListen = true;
|
|
490
|
|
- else if (type == 1)
|
|
491
|
|
- ldmodel.F_IsDownload = true;
|
|
492
|
|
- ldmodel.F_OptID = optid;
|
|
493
|
|
- ldmodel.F_OptBy = optby;
|
|
494
|
|
- ldmodel.F_OptDate = DateTime.Now;
|
|
495
|
|
- res = new BLL.T_Call_CallRecordsLD().Add(ldmodel) > 1;
|
|
496
|
|
- }
|
|
497
|
|
- catch (Exception ex)
|
|
498
|
|
- {
|
|
499
|
|
- }
|
|
500
|
|
- return res;
|
|
|
495
|
+ Model.T_Call_CallRecordsLD ldmodel = new Model.T_Call_CallRecordsLD();
|
|
|
496
|
+ ldmodel.F_CallRecordsID = id;
|
|
|
497
|
+ if (type == 0)
|
|
|
498
|
+ ldmodel.F_IsListen = true;
|
|
|
499
|
+ else if (type == 1)
|
|
|
500
|
+ ldmodel.F_IsDownload = true;
|
|
|
501
|
+ ldmodel.F_OptID = optid;
|
|
|
502
|
+ ldmodel.F_OptBy = optby;
|
|
|
503
|
+ ldmodel.F_OptDate = DateTime.Now;
|
|
|
504
|
+ return new BLL.T_Call_CallRecordsLD().Add(ldmodel) > 1;
|
|
501
|
505
|
}
|
|
502
|
506
|
|
|
503
|
507
|
}
|