Przeglądaj źródła

前端传参到时分秒

liyuanyuan 4 lat temu
rodzic
commit
d460ce61ed

+ 20 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/SMSController.cs

@@ -671,7 +671,7 @@ namespace CallCenterApi.Interface.Controllers
671 671
         /// <param name="stime"></param>
672 672
         /// <param name="endtime"></param>
673 673
         /// <returns></returns>
674
-        public ActionResult ExitTypelist(string name, string phone, string creatname, int SendWay=-1, int IsSend=-1)
674
+        public ActionResult ExitTypelist(string name, string phone,string starttime, string endtime , string creatname, int SendWay=-1, int IsSend=-1)
675 675
         {
676 676
             DataTable dt = new DataTable();
677 677
             string sql = $"   F_IsDelete=0";
@@ -689,6 +689,13 @@ namespace CallCenterApi.Interface.Controllers
689 689
                 sql += " and SendWay=" + SendWay;
690 690
             if (IsSend >= 0)
691 691
                 sql += " and IsSend=" + IsSend;
692
+
693
+            if (!string.IsNullOrEmpty(starttime))
694
+                sql += " and SendTime >'" + starttime.Trim() + "'";
695
+
696
+            if (!string.IsNullOrEmpty(endtime))
697
+                sql += " and SendTime <='" + endtime.Trim() + "'";
698
+
692 699
             if (!string.IsNullOrEmpty(creatname))
693 700
                 sql += $"  and ( MID like '%" + creatname.Trim() + "%'or MName like '%" + creatname.Trim() + "%') ";
694 701
             dt.Columns.Add("编号");
@@ -791,7 +798,7 @@ namespace CallCenterApi.Interface.Controllers
791 798
         /// 获取短信记录列表
792 799
         /// </summary>
793 800
         /// <returns></returns>
794
-        public ActionResult GetSMSList(string name, string phone, string creatname ,int SendWay=-1, int IsSend=-1, int page = 1, int pagesize = 10)
801
+        public ActionResult GetSMSList(string name, string phone, string creatname, string starttime, string endtime, int SendWay = -1, int IsSend=-1, int page = 1, int pagesize = 10)
795 802
         {
796 803
             DataTable dt = new DataTable();
797 804
             int userId = CurrentUser.UserData.F_UserId;
@@ -813,8 +820,19 @@ namespace CallCenterApi.Interface.Controllers
813 820
                     sql += " and SendWay=" + SendWay;
814 821
                 if (IsSend >= 0)
815 822
                     sql += " and IsSend=" + IsSend;
823
+
824
+
825
+                if (!string.IsNullOrEmpty(starttime))
826
+                    sql += " and SendTime >'" + starttime.Trim() + "'";
827
+
828
+                if (!string.IsNullOrEmpty(endtime))
829
+                    sql += " and SendTime <='" + endtime.Trim() + "'";
830
+
816 831
                 if (!string.IsNullOrEmpty(creatname))
817 832
                     sql += $"  and ( MID like '%" + creatname.Trim() + "%'or MName like '%" + creatname.Trim() + "%') ";
833
+
834
+
835
+
818 836
                 int recordCount = 0;
819 837
                 if (!string.IsNullOrWhiteSpace(sql))
820 838
                 {

+ 8 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

@@ -294,13 +294,17 @@ namespace CallCenterApi.Interface.Controllers.tel
294 294
                         //}
295 295
                         if (strstarttime.Trim() != "" && strstarttime != "undefined")
296 296
                         {
297
-                            sql += " and datediff(day,BeginTime,'" + strstarttime + "')<=0 ";
298
-                            sqlcount += " and datediff(day,BeginTime,'" + strstarttime + "')<=0 ";
297
+                            sql += " and  BeginTime  >'"+ strstarttime + "' ";
298
+                            sqlcount += " and  BeginTime  >'" + strstarttime + "' ";
299
+                            //sql += " and datediff(day,BeginTime,'" + strstarttime + "')<=0 ";
300
+                            //sqlcount += " and datediff(day,BeginTime,'" + strstarttime + "')<=0 ";
299 301
                         }
300 302
                         if (strendtime.Trim() != "" && strendtime != "undefined")
301 303
                         {
302
-                            sql += " and datediff(day,BeginTime,'" + strendtime + "')>=0   ";
303
-                            sqlcount += " and datediff(day,BeginTime,'" + strendtime + "')>=0   ";
304
+                            sql += " and  BeginTime  <='" + strendtime + "' ";
305
+                            sqlcount += " and  BeginTime  <='" + strendtime + "' ";
306
+                            //sql += " and datediff(day,BeginTime,'" + strendtime + "')>=0   ";
307
+                            //sqlcount += " and datediff(day,BeginTime,'" + strendtime + "')>=0   ";
304 308
                         }
305 309
 
306 310
                         if (strpageindex.Trim() != "")

+ 4 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

@@ -157,11 +157,13 @@ namespace CallCenterApi.Interface.Controllers.tel
157 157
             }
158 158
             if (starttime.Trim() != "")
159 159
             {
160
-                sql += " and datediff(day,BeginTime,'" + starttime + "')<=0 ";
160
+                // sql += " and datediff(day,BeginTime,'" + starttime + "')<=0 ";
161
+                sql += " and  BeginTime>'" + starttime + "' ";
161 162
             }
162 163
             if (endtime.Trim() != "")
163 164
             {
164
-                sql += " and datediff(day,BeginTime,'" + endtime + "')>=0 ";
165
+                //sql += " and datediff(day,BeginTime,'" + endtime + "')>=0 ";
166
+                sql += " and  BeginTime<= '" + endtime + "'  ";
165 167
             }
166 168
            
167 169
 

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

@@ -37,11 +37,11 @@ namespace CallCenterApi.Interface.Controllers.tel
37 37
                 }
38 38
                 if (strbtime.Trim() != "" && strbtime != "undefined")
39 39
                 {
40
-                    sql += " and T_Call_ZBDH.F_CreateTime >= '" + Convert.ToDateTime(strbtime.Trim() + " 00:00:00") + "' ";
40
+                    sql += " and T_Call_ZBDH.F_CreateTime >= '" + Convert.ToDateTime(strbtime.Trim()) + "' ";
41 41
                 }
42 42
                 if (stretime.Trim() != "" && stretime != "undefined")
43 43
                 {
44
-                    sql += " and T_Call_ZBDH.F_CreateTime <= '" + Convert.ToDateTime(stretime.Trim() + " 23:59:59") + "' ";
44
+                    sql += " and T_Call_ZBDH.F_CreateTime <= '" + Convert.ToDateTime(stretime.Trim()) + "' ";
45 45
                 }
46 46
                 if (zxzid != 0)
47 47
                 {

+ 5 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -71,9 +71,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
71 71
                         sql += "and  CustomerTel like'%" + customerTel+"%'";
72 72
                     }
73 73
                     if (!string.IsNullOrEmpty(starttime))
74
-                        sql += " and datediff(day,CreateTime,'" + starttime + "')<=0 ";
74
+                        // sql += " and datediff(day,CreateTime,'" + starttime + "')<=0 ";
75
+
76
+                        sql += " and  CreateTime>'" + starttime + "' ";
75 77
                     if (!string.IsNullOrEmpty(endtime))
76
-                        sql += " and datediff(day,CreateTime,'" + endtime + "')>=0   ";
78
+                        //   sql += " and datediff(day,CreateTime,'" + endtime + "')>=0   ";
79
+                        sql += " and  CreateTime<='" + endtime + "' ";
77 80
                     if (strpageindex.Trim() != "")
78 81
                     {
79 82
                         pageindex = Convert.ToInt32(strpageindex);