|
|
@@ -228,56 +228,56 @@ namespace CallCenterApi.Interface.Controllers
|
|
228
|
228
|
Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
|
|
229
|
229
|
if (ua != null)
|
|
230
|
230
|
{
|
|
231
|
|
- //var date = DateTime.Now;//DateTime.Parse("2015-04-14"); //
|
|
232
|
|
- //string strDate = date.ToString("yyyy-MM-dd");
|
|
233
|
|
- //string strMonth = date.ToString("yyyy-MM");
|
|
234
|
|
-
|
|
235
|
|
- ////BLL.T_Wo_WorkOrderBase bll = new BLL.T_Wo_WorkOrderBase();
|
|
236
|
|
- ////var list1 = bll.GetList(" F_USERID='" + userId + "' and CONVERT(varchar(10),F_CREATEDATE, 23)='" + strDate + "' and F_WORKORDERSTATEID in (0,8) ").Tables[0];
|
|
237
|
|
- ////var list2 = bll.GetList(" F_USERID='" + userId + "' and CONVERT(varchar(10),F_CREATEDATE, 23)='" + strDate + "' and F_WORKORDERSTATEID in (4,5,6,7,9,12,13) ").Tables[0];
|
|
238
|
|
- ////var list3 = bll.GetList(" F_USERID='" + userId + "' and CONVERT(char(7),F_CREATEDATE,20)='" + strMonth + "' and F_WORKORDERSTATEID in (0,8) ").Tables[0];
|
|
239
|
|
- ////var list4 = bll.GetList(" F_USERID='" + userId + "' and CONVERT(char(7),F_CREATEDATE,20)='" + strMonth + "' and F_WORKORDERSTATEID in (4,5,6,7,9,12,13) ").Tables[0];
|
|
240
|
|
- ////部门信息
|
|
241
|
|
- //var modelDep = new BLL.T_Sys_Department().GetModel(deptid);
|
|
242
|
|
- //int depType = 0;
|
|
243
|
|
- //if (modelDep != null)
|
|
244
|
|
- // depType = modelDep.F_Type ?? 0; //部门操作权限:1接待部,2办理人员,3区域客服,4监管
|
|
245
|
|
-
|
|
246
|
|
- //string uwhere = " 1=1 ";
|
|
247
|
|
- //if (ua.F_RoleId != 17 && depType != 1 && depType != 3)
|
|
248
|
|
- //{
|
|
249
|
|
- // uwhere += " and CreateUser='" + ua.F_UserCode + "' ";
|
|
250
|
|
- //}
|
|
|
231
|
+ var date = DateTime.Now;//DateTime.Parse("2015-04-14"); //
|
|
|
232
|
+ string strDate = date.ToString("yyyy-MM-dd");
|
|
|
233
|
+ string strMonth = date.ToString("yyyy-MM");
|
|
|
234
|
+
|
|
|
235
|
+ //BLL.T_Wo_WorkOrderBase bll = new BLL.T_Wo_WorkOrderBase();
|
|
|
236
|
+ //var list1 = bll.GetList(" F_USERID='" + userId + "' and CONVERT(varchar(10),F_CREATEDATE, 23)='" + strDate + "' and F_WORKORDERSTATEID in (0,8) ").Tables[0];
|
|
|
237
|
+ //var list2 = bll.GetList(" F_USERID='" + userId + "' and CONVERT(varchar(10),F_CREATEDATE, 23)='" + strDate + "' and F_WORKORDERSTATEID in (4,5,6,7,9,12,13) ").Tables[0];
|
|
|
238
|
+ //var list3 = bll.GetList(" F_USERID='" + userId + "' and CONVERT(char(7),F_CREATEDATE,20)='" + strMonth + "' and F_WORKORDERSTATEID in (0,8) ").Tables[0];
|
|
|
239
|
+ //var list4 = bll.GetList(" F_USERID='" + userId + "' and CONVERT(char(7),F_CREATEDATE,20)='" + strMonth + "' and F_WORKORDERSTATEID in (4,5,6,7,9,12,13) ").Tables[0];
|
|
|
240
|
+ //部门信息
|
|
|
241
|
+ var modelDep = new BLL.T_Sys_Department().GetModel(deptid);
|
|
|
242
|
+ int depType = 0;
|
|
|
243
|
+ if (modelDep != null)
|
|
|
244
|
+ depType = modelDep.F_Type ?? 0; //部门操作权限:1接待部,2办理人员,3区域客服,4监管
|
|
|
245
|
+
|
|
|
246
|
+ string uwhere = " 1=1 ";
|
|
|
247
|
+ if (ua.F_RoleId != 17 && depType != 1 && depType != 3)
|
|
|
248
|
+ {
|
|
|
249
|
+ uwhere += " and F_CreateBy='" + ua.F_UserCode + "' ";
|
|
|
250
|
+ }
|
|
251
|
251
|
|
|
252
|
|
- //BLL.T_Wo_WorkOrder bll = new BLL.T_Wo_WorkOrder();
|
|
253
|
|
- //var list1 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State =" + (int)EnumWorkOrderState.finish + " and IsDel=0 ").Tables[0];
|
|
254
|
|
- //var list2 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State <" + (int)EnumWorkOrderState.finish + " and IsDel=0 ").Tables[0];
|
|
255
|
|
- //var list3 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State =" + (int)EnumWorkOrderState.finish + " and IsDel=0 ").Tables[0];
|
|
256
|
|
- //var list4 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State <" + (int)EnumWorkOrderState.finish + " and IsDel=0 ").Tables[0];
|
|
257
|
|
- //#region
|
|
258
|
|
- ////var list1 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State =2 and IsDel=0 ").Tables[0];
|
|
259
|
|
- ////var list2 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State in (0,1) and IsDel=0 ").Tables[0];
|
|
260
|
|
- ////var list3 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State =2 and IsDel=0 ").Tables[0];
|
|
261
|
|
- ////var list4 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State in (0,1) and IsDel=0 ").Tables[0];
|
|
262
|
|
-
|
|
263
|
|
- //////日已完成
|
|
264
|
|
- ////var list1 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State =1 and IsDel=0 ").Tables[0];
|
|
265
|
|
- //////日未完成
|
|
266
|
|
- ////var list2 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State=0 and IsDel=0 ").Tables[0];
|
|
267
|
|
- //////月已完成
|
|
268
|
|
- ////var list3 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State =1 and IsDel=0 ").Tables[0];
|
|
269
|
|
- //////月未完成
|
|
270
|
|
- ////var list4 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State=0 and IsDel=0 ").Tables[0];
|
|
271
|
|
- //#endregion
|
|
272
|
|
- //var obj = new
|
|
273
|
|
- //{
|
|
274
|
|
- // daywc = list1.Rows.Count,
|
|
275
|
|
- // daywwc = list2.Rows.Count,
|
|
276
|
|
- // monwc = list3.Rows.Count,
|
|
277
|
|
- // monwwc = list4.Rows.Count
|
|
278
|
|
- //};
|
|
279
|
|
- //res = Success("成功", obj);
|
|
280
|
|
- res = Success("成功");
|
|
|
252
|
+ BLL.T_Wo_WorkOrder bll = new BLL.T_Wo_WorkOrder();
|
|
|
253
|
+ var list1 = bll.GetList(uwhere + " and CONVERT(varchar(10),F_CreateOn, 23)='" + strDate + "' and F_State in(" + (int)EnumWorkOrderState.finish +","+(int)EnumWorkOrderState.evaluate + ") and F_IsDelete=0 ").Tables[0];
|
|
|
254
|
+ var list2 = bll.GetList(uwhere + " and CONVERT(varchar(10),F_CreateOn, 23)='" + strDate + "' and F_State in (0,1,2,3,4,5,6,7,12,14,16) and F_IsDelete=0 ").Tables[0];
|
|
|
255
|
+ var list3 = bll.GetList(uwhere + " and CONVERT(char(7),F_CreateOn,20)='" + strMonth + "' and F_State in(" + (int)EnumWorkOrderState.finish + "," + (int)EnumWorkOrderState.evaluate+ ") and F_IsDelete=0 ").Tables[0];
|
|
|
256
|
+ var list4 = bll.GetList(uwhere + " and CONVERT(char(7),F_CreateOn,20)='" + strMonth + "' and F_State in (0,1,2,3,4,5,6,7,12,14,16) and F_IsDelete=0 ").Tables[0];
|
|
|
257
|
+ #region
|
|
|
258
|
+ //var list1 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State =2 and IsDel=0 ").Tables[0];
|
|
|
259
|
+ //var list2 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State in (0,1) and IsDel=0 ").Tables[0];
|
|
|
260
|
+ //var list3 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State =2 and IsDel=0 ").Tables[0];
|
|
|
261
|
+ //var list4 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State in (0,1) and IsDel=0 ").Tables[0];
|
|
|
262
|
+
|
|
|
263
|
+ ////日已完成
|
|
|
264
|
+ //var list1 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State =1 and IsDel=0 ").Tables[0];
|
|
|
265
|
+ ////日未完成
|
|
|
266
|
+ //var list2 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State=0 and IsDel=0 ").Tables[0];
|
|
|
267
|
+ ////月已完成
|
|
|
268
|
+ //var list3 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State =1 and IsDel=0 ").Tables[0];
|
|
|
269
|
+ ////月未完成
|
|
|
270
|
+ //var list4 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State=0 and IsDel=0 ").Tables[0];
|
|
|
271
|
+ #endregion
|
|
|
272
|
+ var obj = new
|
|
|
273
|
+ {
|
|
|
274
|
+ daywc = list1.Rows.Count,
|
|
|
275
|
+ daywwc = list2.Rows.Count,
|
|
|
276
|
+ monwc = list3.Rows.Count,
|
|
|
277
|
+ monwwc = list4.Rows.Count
|
|
|
278
|
+ };
|
|
|
279
|
+ res = Success("成功", obj);
|
|
|
280
|
+ // res = Success("成功");
|
|
281
|
281
|
}
|
|
282
|
282
|
}
|
|
283
|
283
|
}
|