mengjie 6 yıl önce
ebeveyn
işleme
144741f922

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/IndexController.cs

250
                         }
250
                         }
251
 
251
 
252
                         BLL.T_Wo_WorkOrder bll = new BLL.T_Wo_WorkOrder();
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];
253
+                        var list1 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and (State =" + (int)EnumWorkOrderState.finish + " or State =" + (int)EnumWorkOrderState.evaluate  + ") 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];
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];
255
+                        var list3 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and (State =" + (int)EnumWorkOrderState.finish + "or State =" + (int)EnumWorkOrderState.evaluate + ") 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];
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
257
                         #region
258
                         //var list1 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State =2 and IsDel=0 ").Tables[0];
258
                         //var list1 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State =2 and IsDel=0 ").Tables[0];

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

125
                 }
125
                 }
126
                 if (!string.IsNullOrWhiteSpace(userCode))
126
                 if (!string.IsNullOrWhiteSpace(userCode))
127
                 {
127
                 {
128
-                    sql += " and F_UserCode=" + userCode;
128
+                    sql += " and F_UserCode='" + userCode+"'";
129
                 }
129
                 }
130
                 if (string.IsNullOrWhiteSpace(sql))
130
                 if (string.IsNullOrWhiteSpace(sql))
131
                     return Error("获取失败");
131
                     return Error("获取失败");

+ 9 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/YearContrastController.cs

20
             ActionResult res = NoToken("未知错误,请重新登录");
20
             ActionResult res = NoToken("未知错误,请重新登录");
21
          
21
          
22
                 ArrayList arrlist = new ArrayList();
22
                 ArrayList arrlist = new ArrayList();
23
-                
23
+            if (!string.IsNullOrEmpty(beginyear) && beginyear == endyear)
24
+            {
25
+                return Error("请选择不同的年份");
26
+            }
24
                 if (beginyear != null && beginyear.Trim() != "")
27
                 if (beginyear != null && beginyear.Trim() != "")
25
                 {
28
                 {
26
                     //var data = new
29
                     //var data = new
83
         public ActionResult ExptList(string beginyear, string endyear)
86
         public ActionResult ExptList(string beginyear, string endyear)
84
         {
87
         {
85
             ActionResult res = NoToken("未知错误,请重新登录");
88
             ActionResult res = NoToken("未知错误,请重新登录");
89
+            if (!string.IsNullOrEmpty(beginyear) && beginyear == endyear)
90
+            {
91
+                return Error("请选择不同的年份");
92
+            }
86
             //if (Request.IsAuthenticated)
93
             //if (Request.IsAuthenticated)
87
-            if(1==1)
94
+            if (1==1)
88
             {
95
             {
89
                 NPOIHelper npoi = new NPOIHelper();
96
                 NPOIHelper npoi = new NPOIHelper();
90
                 DataTable dt = GetData(beginyear, endyear);
97
                 DataTable dt = GetData(beginyear, endyear);

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

33
 
33
 
34
                     if (strtelnum != null && strtelnum.Trim() != "")
34
                     if (strtelnum != null && strtelnum.Trim() != "")
35
                     {
35
                     {
36
-                        sql += " and F_Phone like'" + strtelnum.Trim() + "%' ";
36
+                        sql += " and F_Phone like'%" + strtelnum.Trim() + "%' ";
37
                     }
37
                     }
38
                     if (strsettime.Trim() != "" && strsettime != "undefined")
38
                     if (strsettime.Trim() != "" && strsettime != "undefined")
39
                     {
39
                     {

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/WorkcalendarController.cs

418
 
418
 
419
                         if (stime.Trim() != "" && stime != "undefined")
419
                         if (stime.Trim() != "" && stime != "undefined")
420
                         {
420
                         {
421
-                            sql += " and F_Date > '" + Convert.ToDateTime(stime.Trim()) + "' ";
421
+                            sql += " and F_Date >= '" + Convert.ToDateTime(stime.Trim()+" 00:00:00") + "' ";
422
                         }
422
                         }
423
                         if (etime.Trim() != "" && etime != "undefined")
423
                         if (etime.Trim() != "" && etime != "undefined")
424
                         {
424
                         {
425
-                            sql += " and F_Date < '" + Convert.ToDateTime(etime.Trim()) + "' ";
425
+                            sql += " and F_Date <= '" + Convert.ToDateTime(etime.Trim()+" 23:59:59") + "' ";
426
                         }
426
                         }
427
                         sql += " and F_CreateUser='" + usercode + "' ";
427
                         sql += " and F_CreateUser='" + usercode + "' ";
428
                         if (strpageindex.Trim() != "")
428
                         if (strpageindex.Trim() != "")

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

63
                     }
63
                     }
64
                     if (customerTel.Trim() != "" && customerTel != "undefined")
64
                     if (customerTel.Trim() != "" && customerTel != "undefined")
65
                     {
65
                     {
66
-                        sql += "and  CustomerTel=" + customerTel;
66
+                        sql += "and  CustomerTel='" + customerTel+"'";
67
                     }
67
                     }
68
                     if (strpageindex.Trim() != "")
68
                     if (strpageindex.Trim() != "")
69
                     {
69
                     {