浏览代码

Merge branch 'master' of http://192.168.1.222:3000/lihai/PingAnYeXianSZCG_API

zhengbingbing 8 年之前
父节点
当前提交
aee7699c8f

+ 7 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs

@@ -165,7 +165,14 @@ namespace CallCenterApi.Interface.Controllers
165 165
 
166 166
                 if (modelList != null) {
167 167
                     if (modelList.Count > 0)
168
+                    {
169
+                        modelList.Insert(0, new Model.TreeModel
170
+                        {
171
+                            id = "-1",
172
+                            text = "全部"
173
+                        });
168 174
                         return Success("加载成功", modelList);
175
+                    }
169 176
                 }
170 177
                 return Error("加载失败");
171 178
             }

+ 20 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Question/QuestionnaireController.cs

@@ -1214,6 +1214,11 @@ namespace CallCenterApi.Interface.Controllers.Question
1214 1214
             string enddate = HttpUtility.UrlDecode(RequestString.GetQueryString("enddate"))+ " 23:59:59";
1215 1215
             //startdate = "2017-11-12 00:00:00";
1216 1216
             //enddate = "2017-11-14 23:59:59";
1217
+            if (HttpUtility.UrlDecode(RequestString.GetQueryString("startdate")) == null || HttpUtility.UrlDecode(RequestString.GetQueryString("startdate")) == "")
1218
+            {
1219
+                startdate = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00";
1220
+                enddate = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59";
1221
+            }
1217 1222
             DataTable dtnew = new DataTable();
1218 1223
             dtnew.Columns.Add("xiangzhen",Type.GetType("System.String"));
1219 1224
             dtnew.Columns.Add("zongshu", Type.GetType("System.Int32"));
@@ -1274,6 +1279,11 @@ namespace CallCenterApi.Interface.Controllers.Question
1274 1279
             ActionResult res = NoToken("未知错误,请重新登录");
1275 1280
             string startdate = HttpUtility.UrlDecode(RequestString.GetQueryString("startdate")) + " 00:00:00";
1276 1281
             string enddate = HttpUtility.UrlDecode(RequestString.GetQueryString("enddate")) + " 23:59:59";
1282
+            if (HttpUtility.UrlDecode(RequestString.GetQueryString("startdate")) == null || HttpUtility.UrlDecode(RequestString.GetQueryString("startdate")) == "")
1283
+            {
1284
+                startdate = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00";
1285
+                enddate = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59";
1286
+            }
1277 1287
             //startdate = "2017-11-12 00:00:00";
1278 1288
             //enddate = "2017-11-14 23:59:59";
1279 1289
             DataTable dtnew = new DataTable();
@@ -1345,6 +1355,11 @@ namespace CallCenterApi.Interface.Controllers.Question
1345 1355
             ActionResult res = NoToken("未知错误,请重新登录");
1346 1356
             string startdate = HttpUtility.UrlDecode(RequestString.GetQueryString("startdate")) + " 00:00:00";
1347 1357
             string enddate = HttpUtility.UrlDecode(RequestString.GetQueryString("enddate")) + " 23:59:59";
1358
+            if (HttpUtility.UrlDecode(RequestString.GetQueryString("startdate")) == null || HttpUtility.UrlDecode(RequestString.GetQueryString("startdate")) == "")
1359
+            {
1360
+                startdate = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00";
1361
+                enddate = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59";
1362
+            }
1348 1363
             //startdate = "2017-11-12 00:00:00";
1349 1364
             //enddate = "2017-11-14 23:59:59";
1350 1365
             DataTable dtnew = new DataTable();
@@ -1418,6 +1433,11 @@ namespace CallCenterApi.Interface.Controllers.Question
1418 1433
             ActionResult res = NoToken("未知错误,请重新登录");
1419 1434
             string startdate = HttpUtility.UrlDecode(RequestString.GetQueryString("startdate")) + " 00:00:00";
1420 1435
             string enddate = HttpUtility.UrlDecode(RequestString.GetQueryString("enddate")) + " 23:59:59";
1436
+            if (HttpUtility.UrlDecode(RequestString.GetQueryString("startdate")) == null || HttpUtility.UrlDecode(RequestString.GetQueryString("startdate")) == "")
1437
+            {
1438
+                startdate = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00";
1439
+                enddate = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59";
1440
+            }
1421 1441
             //startdate = "2017-11-12 00:00:00";
1422 1442
             //enddate = "2017-11-14 23:59:59";
1423 1443
             DataTable dtnew = new DataTable();

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

@@ -75,7 +75,7 @@ namespace CallCenterApi.Interface.Controllers.tel
75 75
                 {
76 76
                     sql += " and UserCode='" + usercode + "'";
77 77
                 }
78
-                if (dept != null && dept.Trim() != "")
78
+                if (dept != null && dept.Trim() != "" && Convert.ToInt32(dept) >= 0)
79 79
                 {
80 80
                     sql += " and UserCode in (select F_UserCode from T_Sys_UserAccount where F_DeptId=" + dept.Trim() + ")";
81 81
                 }