|
|
@@ -572,10 +572,18 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
572
|
572
|
StringBuilder sb = new StringBuilder();
|
|
573
|
573
|
|
|
574
|
574
|
sb.Append(" and F_FPState=0 and F_DeleteFlag=0 ");
|
|
|
575
|
+ var sql = "";
|
|
575
|
576
|
if (!string.IsNullOrWhiteSpace(key))
|
|
576
|
577
|
{
|
|
577
|
|
- sb.Append(" and F_Taskid in (select F_TaskID from T_Call_OutTask where F_TaskName like '%" + key + "%' or F_TaskRemark like '%" + key + "%' and F_IsStart=1 and F_DeleteFlag=0 ) ");
|
|
|
578
|
+ sql += " and F_Phone='" + key + "' or F_TaskName like '%" + key + "%' or F_TaskRemark like '%" + key + "%'";
|
|
578
|
579
|
}
|
|
|
580
|
+ sb.Append(" and F_Taskid in (select F_TaskID from T_Call_OutTask where F_IsStart=1 and F_DeleteFlag=0 " + sql + " ) ");
|
|
|
581
|
+ #region 20180612 zhengbingbing 需要调整部分语句必须执行
|
|
|
582
|
+ //if (!string.IsNullOrWhiteSpace(key))
|
|
|
583
|
+ //{
|
|
|
584
|
+ // sb.Append(" and F_Taskid in (select F_TaskID from T_Call_OutTask where F_TaskName like '%" + key + "%' or F_TaskRemark like '%" + key + "%' and F_IsStart=1 and F_DeleteFlag=0 ) ");
|
|
|
585
|
+ //}
|
|
|
586
|
+ #endregion
|
|
579
|
587
|
int userid = CurrentUser.UserData.F_UserId;
|
|
580
|
588
|
string username = CurrentUser.UserData.F_UserName;
|
|
581
|
589
|
#region 按数量平均分配
|
|
|
@@ -763,7 +771,7 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
763
|
771
|
return Success("获取成功", obj);
|
|
764
|
772
|
}
|
|
765
|
773
|
//获取我的任务列表
|
|
766
|
|
- public ActionResult GetMyTaskList(string key, int pagesize = 10, int pageindex = 1)
|
|
|
774
|
+ public ActionResult GetMyTaskList(string key, string sdate, string edate, int pagesize = 10, int pageindex = 1)
|
|
767
|
775
|
{
|
|
768
|
776
|
StringBuilder sb = new StringBuilder();
|
|
769
|
777
|
int userid = CurrentUser.UserData.F_UserId;
|
|
|
@@ -778,6 +786,16 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
778
|
786
|
{
|
|
779
|
787
|
sb.Append(" and F_Phone like '%" + key.Trim() + "%'");
|
|
780
|
788
|
}
|
|
|
789
|
+ #region 增加时间搜索
|
|
|
790
|
+ if (!string.IsNullOrWhiteSpace(sdate))
|
|
|
791
|
+ {
|
|
|
792
|
+ sb.Append(" and datediff(day,ExpandDatField1,'" + sdate.Trim() + "')<=0");
|
|
|
793
|
+ }
|
|
|
794
|
+ if (!string.IsNullOrWhiteSpace(edate))
|
|
|
795
|
+ {
|
|
|
796
|
+ sb.Append(" and datediff(day,ExpandDatField1,'" + edate.Trim() + "')>=0");
|
|
|
797
|
+ }
|
|
|
798
|
+ #endregion
|
|
781
|
799
|
//string sqlwhere = "";
|
|
782
|
800
|
//if (!string.IsNullOrWhiteSpace(key))
|
|
783
|
801
|
//{
|
|
|
@@ -805,7 +823,7 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
805
|
823
|
return Content(obj.ToJson());
|
|
806
|
824
|
}
|
|
807
|
825
|
//获取我的任务结果
|
|
808
|
|
- public ActionResult GetMyResultList(string key, int hjjgid = 0, int yhfkid = 0, int pagesize = 10, int pageindex = 1)
|
|
|
826
|
+ public ActionResult GetMyResultList(string key, string sdate, string edate, int hjjgid = 0, int yhfkid = 0, int pagesize = 10, int pageindex = 1)
|
|
809
|
827
|
{
|
|
810
|
828
|
StringBuilder sb = new StringBuilder();
|
|
811
|
829
|
int userid = CurrentUser.UserData.F_UserId;
|
|
|
@@ -828,6 +846,16 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
828
|
846
|
{
|
|
829
|
847
|
sb.Append(" and F_Phone like '%" + key.Trim() + "%'");
|
|
830
|
848
|
}
|
|
|
849
|
+ #region 增加时间搜索
|
|
|
850
|
+ if (!string.IsNullOrWhiteSpace(sdate))
|
|
|
851
|
+ {
|
|
|
852
|
+ sb.Append(" and datediff(day,ExpandDatField1,'" + sdate.Trim() + "')<=0");
|
|
|
853
|
+ }
|
|
|
854
|
+ if (!string.IsNullOrWhiteSpace(edate))
|
|
|
855
|
+ {
|
|
|
856
|
+ sb.Append(" and datediff(day,ExpandDatField1,'" + edate.Trim() + "')>=0");
|
|
|
857
|
+ }
|
|
|
858
|
+ #endregion
|
|
831
|
859
|
//string sqlwhere = "";
|
|
832
|
860
|
//if (!string.IsNullOrWhiteSpace(key))
|
|
833
|
861
|
//{
|
|
|
@@ -867,7 +895,7 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
867
|
895
|
return Content(obj.ToJson());
|
|
868
|
896
|
}
|
|
869
|
897
|
//获取总体任务结果
|
|
870
|
|
- public ActionResult GetResultList(string key, int userid = 0, int hjjgid = 0, int yhfkid = 0, int pagesize = 10, int pageindex = 1)
|
|
|
898
|
+ public ActionResult GetResultList(string key, string sdate, string edate, int userid = 0, int hjjgid = 0, int yhfkid = 0, int pagesize = 10, int pageindex = 1)
|
|
871
|
899
|
{
|
|
872
|
900
|
StringBuilder sb = new StringBuilder();
|
|
873
|
901
|
#region 查询条件
|
|
|
@@ -892,6 +920,16 @@ namespace CallCenterApi.Interface.Controllers.callout
|
|
892
|
920
|
{
|
|
893
|
921
|
sb.Append(" and F_Phone like '%" + key.Trim() + "%'");
|
|
894
|
922
|
}
|
|
|
923
|
+ #region 增加时间搜索
|
|
|
924
|
+ if (!string.IsNullOrWhiteSpace(sdate))
|
|
|
925
|
+ {
|
|
|
926
|
+ sb.Append(" and datediff(day,ExpandDatField1,'" + sdate.Trim() + "')<=0");
|
|
|
927
|
+ }
|
|
|
928
|
+ if (!string.IsNullOrWhiteSpace(edate))
|
|
|
929
|
+ {
|
|
|
930
|
+ sb.Append(" and datediff(day,ExpandDatField1,'" + edate.Trim() + "')>=0");
|
|
|
931
|
+ }
|
|
|
932
|
+ #endregion
|
|
895
|
933
|
//string sqlwhere = "";
|
|
896
|
934
|
//if (!string.IsNullOrWhiteSpace(key))
|
|
897
|
935
|
//{
|