|
|
@@ -16,8 +16,8 @@ namespace CallCenterApi.Interface.Controllers.tel
|
|
16
|
16
|
public ActionResult GetCalendarList(string strdate)
|
|
17
|
17
|
{
|
|
18
|
18
|
|
|
19
|
|
- if (Request.IsAuthenticated)
|
|
20
|
|
- {
|
|
|
19
|
+ // if (Request.IsAuthenticated)
|
|
|
20
|
+ // {
|
|
21
|
21
|
string sql = "";
|
|
22
|
22
|
try
|
|
23
|
23
|
{
|
|
|
@@ -44,16 +44,16 @@ namespace CallCenterApi.Interface.Controllers.tel
|
|
44
|
44
|
{
|
|
45
|
45
|
return Error("获取日历失败,错误:" + ex.Message);
|
|
46
|
46
|
}
|
|
47
|
|
- }
|
|
48
|
|
- return NoToken("未知错误,请重新登录");
|
|
|
47
|
+ // }
|
|
|
48
|
+ // return NoToken("未知错误,请重新登录");
|
|
49
|
49
|
}
|
|
50
|
50
|
|
|
51
|
51
|
//设置(非)工作日
|
|
52
|
52
|
public ActionResult Setworkingday(string date)
|
|
53
|
53
|
{
|
|
54
|
54
|
|
|
55
|
|
- if (Request.IsAuthenticated)
|
|
56
|
|
- {
|
|
|
55
|
+ // if (Request.IsAuthenticated)
|
|
|
56
|
+ // {
|
|
57
|
57
|
|
|
58
|
58
|
if (date != null && date != "")
|
|
59
|
59
|
{
|
|
|
@@ -112,18 +112,19 @@ namespace CallCenterApi.Interface.Controllers.tel
|
|
112
|
112
|
return Error("获取参数失败");
|
|
113
|
113
|
}
|
|
114
|
114
|
|
|
115
|
|
- }
|
|
116
|
|
- return NoToken("未知错误,请重新登录");
|
|
|
115
|
+ // }
|
|
|
116
|
+ // }
|
|
|
117
|
+ // return NoToken("未知错误,请重新登录");
|
|
117
|
118
|
}
|
|
118
|
119
|
|
|
119
|
120
|
//获取上班时间段
|
|
120
|
121
|
public ActionResult GetTimesList()
|
|
121
|
122
|
{
|
|
122
|
123
|
|
|
123
|
|
- if (Request.IsAuthenticated)
|
|
124
|
|
- {
|
|
125
|
|
- int userId = CurrentUser.UserData.F_UserId;
|
|
126
|
|
- Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
|
|
|
124
|
+ // if (Request.IsAuthenticated)
|
|
|
125
|
+ // {
|
|
|
126
|
+ // int userId = CurrentUser.UserData.F_UserId;
|
|
|
127
|
+ // Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
|
|
127
|
128
|
|
|
128
|
129
|
string sql = "";
|
|
129
|
130
|
DataTable dt = new DataTable();
|
|
|
@@ -176,16 +177,16 @@ namespace CallCenterApi.Interface.Controllers.tel
|
|
176
|
177
|
|
|
177
|
178
|
return Content(obj.ToJson());
|
|
178
|
179
|
|
|
179
|
|
- }
|
|
180
|
|
- return NoToken("未知错误,请重新登录");
|
|
|
180
|
+ // }
|
|
|
181
|
+ // return NoToken("未知错误,请重新登录");
|
|
181
|
182
|
}
|
|
182
|
183
|
|
|
183
|
184
|
//获取某一条时间段信息
|
|
184
|
185
|
public ActionResult GetTimes(string id)
|
|
185
|
186
|
{
|
|
186
|
187
|
|
|
187
|
|
- if (Request.IsAuthenticated)
|
|
188
|
|
- {
|
|
|
188
|
+ // if (Request.IsAuthenticated)
|
|
|
189
|
+ // {
|
|
189
|
190
|
|
|
190
|
191
|
if (id != null && id.Trim() != "")
|
|
191
|
192
|
{
|
|
|
@@ -204,24 +205,24 @@ namespace CallCenterApi.Interface.Controllers.tel
|
|
204
|
205
|
{
|
|
205
|
206
|
return Error("获取参数失败");
|
|
206
|
207
|
}
|
|
207
|
|
- }
|
|
208
|
|
- return NoToken("未知错误,请重新登录");
|
|
|
208
|
+ // }
|
|
|
209
|
+ // return NoToken("未知错误,请重新登录");
|
|
209
|
210
|
}
|
|
210
|
211
|
|
|
211
|
212
|
//添加/修改上班时间段
|
|
212
|
213
|
public ActionResult AddTimes(string workid, string workstart, string workend, string timename, string remark)
|
|
213
|
214
|
{
|
|
214
|
215
|
|
|
215
|
|
- if (Request.IsAuthenticated)
|
|
216
|
|
- {
|
|
|
216
|
+ // if (Request.IsAuthenticated)
|
|
|
217
|
+ // {
|
|
217
|
218
|
|
|
218
|
|
- int userId = CurrentUser.UserData.F_UserId;
|
|
219
|
|
- Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
|
|
220
|
|
- if (userId != 0)
|
|
221
|
|
- {
|
|
222
|
|
- Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
|
|
223
|
|
- if (ua != null)
|
|
224
|
|
- {
|
|
|
219
|
+ // int userId = CurrentUser.UserData.F_UserId;
|
|
|
220
|
+ // Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
|
|
|
221
|
+ // if (userId != 0)
|
|
|
222
|
+ // {
|
|
|
223
|
+ // Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
|
|
|
224
|
+ // if (ua != null)
|
|
|
225
|
+ // {
|
|
225
|
226
|
if (workid != null && workid != "")
|
|
226
|
227
|
{
|
|
227
|
228
|
int id = 0;
|
|
|
@@ -255,8 +256,8 @@ namespace CallCenterApi.Interface.Controllers.tel
|
|
255
|
256
|
_model.F_EndDate = workend;
|
|
256
|
257
|
_model.F_Name = timename.Trim();
|
|
257
|
258
|
_model.F_Remark = remark.Trim();
|
|
258
|
|
- _model.F_GroupCode = ua.groupcode;
|
|
259
|
|
- _model.F_CreateUser = ua.F_UserCode;
|
|
|
259
|
+ // _model.F_GroupCode = ua.groupcode;
|
|
|
260
|
+ // _model.F_CreateUser = ua.F_UserCode;
|
|
260
|
261
|
_model.F_CreateTime = DateTime.Now;
|
|
261
|
262
|
|
|
262
|
263
|
int b = new BLL.T_Sys_WorkTimes().Add(_model);
|
|
|
@@ -269,19 +270,20 @@ namespace CallCenterApi.Interface.Controllers.tel
|
|
269
|
270
|
return Error("添加失败");
|
|
270
|
271
|
}
|
|
271
|
272
|
}
|
|
272
|
|
- }
|
|
273
|
|
- }
|
|
|
273
|
+ return Error("编辑失败");
|
|
|
274
|
+ // }
|
|
|
275
|
+ // }
|
|
274
|
276
|
|
|
275
|
|
- }
|
|
276
|
|
- return NoToken("未知错误,请重新登录");
|
|
|
277
|
+ // }
|
|
|
278
|
+ // return NoToken("未知错误,请重新登录");
|
|
277
|
279
|
}
|
|
278
|
280
|
|
|
279
|
281
|
//删除上班时间段
|
|
280
|
282
|
public ActionResult DelTimes(string[] ids)
|
|
281
|
283
|
{
|
|
282
|
284
|
|
|
283
|
|
- if (Request.IsAuthenticated)
|
|
284
|
|
- {
|
|
|
285
|
+ // if (Request.IsAuthenticated)
|
|
|
286
|
+ // {
|
|
285
|
287
|
|
|
286
|
288
|
if (ids != null && ids.Length > 0)
|
|
287
|
289
|
{
|
|
|
@@ -302,8 +304,8 @@ namespace CallCenterApi.Interface.Controllers.tel
|
|
302
|
304
|
return Error("请选择要删除的记录");
|
|
303
|
305
|
}
|
|
304
|
306
|
|
|
305
|
|
- }
|
|
306
|
|
- return NoToken("未知错误,请重新登录");
|
|
|
307
|
+ // }
|
|
|
308
|
+ // return NoToken("未知错误,请重新登录");
|
|
307
|
309
|
}
|
|
308
|
310
|
}
|
|
309
|
311
|
}
|