clq1010 лет назад: 8
Родитель
Сommit
ed04cff3d6

+ 7 - 7
codegit/CallCenterApi/CallCenterApi.DAL/T_Call_CallRecords.cs

@@ -414,7 +414,7 @@ namespace CallCenterApi.DAL
414 414
         {
415 415
 
416 416
             StringBuilder strSql = new StringBuilder();
417
-            strSql.Append("select  top 1 * from T_Call_CallRecords  WHTH(NOLOCK)");
417
+            strSql.Append("select  top 1 * from T_Call_CallRecords  WITH(NOLOCK)");
418 418
             strSql.Append(" where CallRecordsId=@CallRecordsId");
419 419
             SqlParameter[] parameters = {
420 420
                     new SqlParameter("@CallRecordsId", SqlDbType.Int,4)
@@ -672,7 +672,7 @@ namespace CallCenterApi.DAL
672 672
         {
673 673
             StringBuilder strSql = new StringBuilder();
674 674
             strSql.Append("select * ");
675
-            strSql.Append(" FROM T_Call_CallRecords  WHTH(NOLOCK)");
675
+            strSql.Append(" FROM T_Call_CallRecords  WITH(NOLOCK)");
676 676
             if (strWhere.Trim() != "")
677 677
             {
678 678
                 strSql.Append(" where " + strWhere);
@@ -692,7 +692,7 @@ namespace CallCenterApi.DAL
692 692
                 strSql.Append(" top " + Top.ToString());
693 693
             }
694 694
             strSql.Append(" * ");
695
-            strSql.Append(" FROM T_Call_CallRecords  WHTH(NOLOCK)");
695
+            strSql.Append(" FROM T_Call_CallRecords  WITH(NOLOCK)");
696 696
             if (strWhere.Trim() != "")
697 697
             {
698 698
                 strSql.Append(" where " + strWhere);
@@ -707,7 +707,7 @@ namespace CallCenterApi.DAL
707 707
         public int GetRecordCount(string strWhere)
708 708
         {
709 709
             StringBuilder strSql = new StringBuilder();
710
-            strSql.Append("select count(1) FROM T_Call_CallRecords  WHTH(NOLOCK)");
710
+            strSql.Append("select count(1) FROM T_Call_CallRecords  WITH(NOLOCK)");
711 711
             if (strWhere.Trim() != "")
712 712
             {
713 713
                 strSql.Append(" where " + strWhere);
@@ -913,7 +913,7 @@ namespace CallCenterApi.DAL
913 913
         public Model.T_Call_CallRecords GetModelByTelphone(string CallNumber)
914 914
         {
915 915
             StringBuilder strSql = new StringBuilder();
916
-            strSql.Append("select  top 1 * from T_Call_CallRecords  WHTH(NOLOCK)");
916
+            strSql.Append("select  top 1 * from T_Call_CallRecords  WITH(NOLOCK)");
917 917
             strSql.Append(" where CallNumber=@CallNumber order by BeginTime desc");
918 918
             SqlParameter[] parameters = {
919 919
                     new SqlParameter("@CallNumber", SqlDbType.VarChar,100)
@@ -937,7 +937,7 @@ namespace CallCenterApi.DAL
937 937
         public Model.T_Call_CallRecords GetModelByCallId(string CallId)
938 938
         {
939 939
             StringBuilder strSql = new StringBuilder();
940
-            strSql.Append("select  top 1 * from T_Call_CallRecords  WHTH(NOLOCK)");
940
+            strSql.Append("select  top 1 * from T_Call_CallRecords  WITH(NOLOCK)");
941 941
             strSql.Append(" where CallId=@CallId order by BeginTime desc");
942 942
             SqlParameter[] parameters = {
943 943
                     new SqlParameter("@CallId", SqlDbType.VarChar,50)
@@ -958,7 +958,7 @@ namespace CallCenterApi.DAL
958 958
         public Model.T_Call_CallRecords GetModelByRecordId(string CallId)
959 959
         {
960 960
             StringBuilder strSql = new StringBuilder();
961
-            strSql.Append("select  top 1 * from T_Call_CallRecords  WHTH(NOLOCK)");
961
+            strSql.Append("select  top 1 * from T_Call_CallRecords  WITH(NOLOCK)");
962 962
             strSql.Append(" where CallRecordsId=@CallRecordsId order by BeginTime desc");
963 963
             SqlParameter[] parameters = {
964 964
                     new SqlParameter("@CallRecordsId", SqlDbType.Int)

+ 4 - 4
codegit/CallCenterApi/CallCenterApi.DAL/T_Call_CallRecords_QC.cs

@@ -417,7 +417,7 @@ namespace CallCenterApi.DAL
417 417
         {
418 418
 
419 419
             StringBuilder strSql = new StringBuilder();
420
-            strSql.Append("select  top 1 * from T_Call_CallRecords  WHTH(NOLOCK)");
420
+            strSql.Append("select  top 1 * from T_Call_CallRecords  WITH(NOLOCK)");
421 421
             strSql.Append(" where CallRecordsId=@CallRecordsId");
422 422
             SqlParameter[] parameters = {
423 423
                     new SqlParameter("@CallRecordsId", SqlDbType.Int,4)
@@ -642,7 +642,7 @@ namespace CallCenterApi.DAL
642 642
         {
643 643
             StringBuilder strSql = new StringBuilder();
644 644
             strSql.Append("select * ");
645
-            strSql.Append(" FROM T_Call_CallRecords  WHTH(NOLOCK)");
645
+            strSql.Append(" FROM T_Call_CallRecords  WITH(NOLOCK)");
646 646
             if (strWhere.Trim() != "")
647 647
             {
648 648
                 strSql.Append(" where " + strWhere);
@@ -662,7 +662,7 @@ namespace CallCenterApi.DAL
662 662
                 strSql.Append(" top " + Top.ToString());
663 663
             }
664 664
             strSql.Append(" * ");
665
-            strSql.Append(" FROM T_Call_CallRecords  WHTH(NOLOCK)");
665
+            strSql.Append(" FROM T_Call_CallRecords  WITH(NOLOCK)");
666 666
             if (strWhere.Trim() != "")
667 667
             {
668 668
                 strSql.Append(" where " + strWhere);
@@ -677,7 +677,7 @@ namespace CallCenterApi.DAL
677 677
         public int GetRecordCount(string strWhere)
678 678
         {
679 679
             StringBuilder strSql = new StringBuilder();
680
-            strSql.Append("select count(1) FROM T_Call_CallRecords  WHTH(NOLOCK)");
680
+            strSql.Append("select count(1) FROM T_Call_CallRecords  WITH(NOLOCK)");
681 681
             if (strWhere.Trim() != "")
682 682
             {
683 683
                 strSql.Append(" where " + strWhere);

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrder.cs

@@ -546,7 +546,7 @@ namespace CallCenterApi.DAL
546 546
         {
547 547
             StringBuilder strSql = new StringBuilder();
548 548
             strSql.Append("select ID,WorkOrderID,Type,TypeClass,Title,Detail,Files,ResponDept,ResponUser,CallID,CustomerID,Customer,CustomerTel,Province,City,County,Address,Source,Answer,State,LastDealUser,LastDealTime,IsReturn,LimitTime,IsReturnBak,ReturnBakTime,IsTimeOut,IsUserSend,IsAdminSend,CreateUser,CreateTime,IsDel,DelUser,DelTime,IsAudit,AuditState,AuditUser,AuditTime,AuditCont,AppointTime,Clcontent ");
549
-            strSql.Append(" FROM T_Wo_WorkOrder  WHTH(NOLOCK)");
549
+            strSql.Append(" FROM T_Wo_WorkOrder  WITH(NOLOCK)");
550 550
             if (strWhere.Trim() != "")
551 551
             {
552 552
                 strSql.Append(" where " + strWhere);

+ 9 - 9
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/InfoController.cs

@@ -177,9 +177,9 @@ namespace CallCenterApi.Interface.Controllers
177 177
         private object GetHWLSS()
178 178
         {
179 179
             //接通量
180
-            DataTable dt = DbHelperSQL.Query(" select datepart(hh,BeginTime) hor, count(1) con from T_Call_CallRecords  WHTH(NOLOCK) where CallState=1 and datediff(day, BeginTime, getdate()) = 0 group by datepart(hh,BeginTime) ").Tables[0];
180
+            DataTable dt = DbHelperSQL.Query(" select datepart(hh,BeginTime) hor, count(1) con from T_Call_CallRecords  WITH(NOLOCK) where CallState=1 and datediff(day, BeginTime, getdate()) = 0 group by datepart(hh,BeginTime) ").Tables[0];
181 181
             //来电量
182
-            DataTable dt1 = DbHelperSQL.Query(" select datepart(hh,BeginTime) hor, count(1) con from T_Call_CallRecords  WHTH(NOLOCK) where CallType=0 and datediff(day, BeginTime, getdate()) = 0 group by datepart(hh,BeginTime) ").Tables[0];
182
+            DataTable dt1 = DbHelperSQL.Query(" select datepart(hh,BeginTime) hor, count(1) con from T_Call_CallRecords  WITH(NOLOCK) where CallType=0 and datediff(day, BeginTime, getdate()) = 0 group by datepart(hh,BeginTime) ").Tables[0];
183 183
 
184 184
             int[] times = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 };
185 185
             var query3 = times.Select(x => {
@@ -252,7 +252,7 @@ namespace CallCenterApi.Interface.Controllers
252 252
         private object GetHWZL()
253 253
         {
254 254
             //话务量
255
-            DataTable dt = DbHelperSQL.Query(" select count(1) con from T_Call_CallRecords  WHTH(NOLOCK) where datediff(day, BeginTime, getdate()) = 0 ").Tables[0];
255
+            DataTable dt = DbHelperSQL.Query(" select count(1) con from T_Call_CallRecords  WITH(NOLOCK) where datediff(day, BeginTime, getdate()) = 0 ").Tables[0];
256 256
 
257 257
             var hwcon = dt.Rows[0]["con"].ToString();//话务量
258 258
             if (string.IsNullOrEmpty(hwcon))
@@ -260,7 +260,7 @@ namespace CallCenterApi.Interface.Controllers
260 260
                 hwcon = "0";
261 261
             }
262 262
             //来话量
263
-            DataTable dt1 = DbHelperSQL.Query(" select count(1) con from T_Call_CallRecords  WHTH(NOLOCK) where CallType=0 and datediff(day, BeginTime, getdate()) = 0 ").Tables[0];
263
+            DataTable dt1 = DbHelperSQL.Query(" select count(1) con from T_Call_CallRecords  WITH(NOLOCK) where CallType=0 and datediff(day, BeginTime, getdate()) = 0 ").Tables[0];
264 264
             var lhcon = dt1.Rows[0]["con"].ToString();//话务量
265 265
             if (string.IsNullOrEmpty(lhcon))
266 266
             {
@@ -268,7 +268,7 @@ namespace CallCenterApi.Interface.Controllers
268 268
             }
269 269
 
270 270
             //接通量,通话时长
271
-            DataTable dt2 = DbHelperSQL.Query(" select count(1) con,sum(TalkLongTime) tltimes from T_Call_CallRecords  WHTH(NOLOCK) where CallState=1 and datediff(day, BeginTime, getdate()) = 0 ").Tables[0];
271
+            DataTable dt2 = DbHelperSQL.Query(" select count(1) con,sum(TalkLongTime) tltimes from T_Call_CallRecords  WITH(NOLOCK) where CallState=1 and datediff(day, BeginTime, getdate()) = 0 ").Tables[0];
272 272
             var jtcon = dt2.Rows[0]["con"].ToString();//接通量
273 273
             var thtimes = dt2.Rows[0]["tltimes"].ToString();//通话时长
274 274
             if (string.IsNullOrEmpty(jtcon))
@@ -309,7 +309,7 @@ namespace CallCenterApi.Interface.Controllers
309 309
         private object GetHWL()
310 310
         {
311 311
             //话务量
312
-            DataTable dt = DbHelperSQL.Query(" select datepart(hh,BeginTime) hor,count(1) con from T_Call_CallRecords  WHTH(NOLOCK) where datediff(day, BeginTime, getdate()) = 0 group by datepart(hh,BeginTime) ").Tables[0];
312
+            DataTable dt = DbHelperSQL.Query(" select datepart(hh,BeginTime) hor,count(1) con from T_Call_CallRecords  WITH(NOLOCK) where datediff(day, BeginTime, getdate()) = 0 group by datepart(hh,BeginTime) ").Tables[0];
313 313
             
314 314
             int[] times = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 };
315 315
             var query3 = times.Select(x =>
@@ -332,10 +332,10 @@ namespace CallCenterApi.Interface.Controllers
332 332
         private object GetJTL()
333 333
         {
334 334
             //话务量
335
-            DataTable dt = DbHelperSQL.Query(" select datepart(hh,BeginTime) hor,count(1) con from T_Call_CallRecords  WHTH(NOLOCK) where datediff(day, BeginTime, getdate()) = 0 group by datepart(hh,BeginTime) ").Tables[0];
335
+            DataTable dt = DbHelperSQL.Query(" select datepart(hh,BeginTime) hor,count(1) con from T_Call_CallRecords  WITH(NOLOCK) where datediff(day, BeginTime, getdate()) = 0 group by datepart(hh,BeginTime) ").Tables[0];
336 336
             
337 337
             //接通量,通话时长
338
-            DataTable dt2 = DbHelperSQL.Query(" select datepart(hh,BeginTime) hor,count(1) con from T_Call_CallRecords  WHTH(NOLOCK) where CallState=1 and datediff(day, BeginTime, getdate()) = 0 group by datepart(hh,BeginTime) ").Tables[0];
338
+            DataTable dt2 = DbHelperSQL.Query(" select datepart(hh,BeginTime) hor,count(1) con from T_Call_CallRecords  WITH(NOLOCK) where CallState=1 and datediff(day, BeginTime, getdate()) = 0 group by datepart(hh,BeginTime) ").Tables[0];
339 339
             
340 340
             int[] times = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 };
341 341
             var query3 = times.Select(x =>
@@ -361,7 +361,7 @@ namespace CallCenterApi.Interface.Controllers
361 361
         private object GetPjthsc()
362 362
         {
363 363
             //接通量,通话时长
364
-            DataTable dt = DbHelperSQL.Query(" select datepart(hh,BeginTime) hor,count(1) con,sum(TalkLongTime) tltimes from T_Call_CallRecords  WHTH(NOLOCK) where CallState=1 and datediff(day, BeginTime, getdate()) = 0 group by datepart(hh,BeginTime) ").Tables[0];
364
+            DataTable dt = DbHelperSQL.Query(" select datepart(hh,BeginTime) hor,count(1) con,sum(TalkLongTime) tltimes from T_Call_CallRecords  WITH(NOLOCK) where CallState=1 and datediff(day, BeginTime, getdate()) = 0 group by datepart(hh,BeginTime) ").Tables[0];
365 365
 
366 366
             int[] times = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 };
367 367
             var query3 = times.Select(x => {