|
|
@@ -1507,7 +1507,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
|
|
1507
|
1507
|
///综合查询列表
|
|
1508
|
1508
|
/// </summary>
|
|
1509
|
1509
|
public ActionResult GetComprehensive(string description,string OpenId, string code, string createby, string createtel, string cusname, string keywords, string cusphone, string companyname, string province, string city,
|
|
1510
|
|
- string country, string township, string category, string salebase, string touser, int source = 0, int state = -1, int type = 0, int pageindex = 1, int pagesize = 10)
|
|
|
1510
|
+ string country, string township, string category, string salebase, string touser,string question,string question1,string question2, int source = 0, int state = -1, int type = 0, int pageindex = 1, int pagesize = 10)
|
|
1511
|
1511
|
{
|
|
1512
|
1512
|
|
|
1513
|
1513
|
if (!string.IsNullOrEmpty(OpenId))
|
|
|
@@ -1572,6 +1572,44 @@ namespace CallCenterApi.Interface.Controllers.weixin
|
|
1572
|
1572
|
sql += $" and F_DealBy like '%" + touser.Trim() + "%'";
|
|
1573
|
1573
|
if (!string.IsNullOrWhiteSpace(code))//工单编号
|
|
1574
|
1574
|
sql += $" and F_WorkOrderCode like '%" + code.Trim() + "%'";
|
|
|
1575
|
+ if (!string.IsNullOrEmpty(question2))
|
|
|
1576
|
+ {
|
|
|
1577
|
+ string squsdf = string.Format("'{0}'", question2.Replace(",", "','"));
|
|
|
1578
|
+ var QuestionManage = quesBLL.GetModelList("F_QuestionName in (" + squsdf + ")");
|
|
|
1579
|
+ if (QuestionManage != null)
|
|
|
1580
|
+ {
|
|
|
1581
|
+ if (QuestionManage.FirstOrDefault().F_Type == EnumWOType.Complaint.ToString())
|
|
|
1582
|
+ {
|
|
|
1583
|
+ string queststrs = string.Format("'{0}'", string.Join(",", QuestionManage.Select(T => T.F_Id)).Replace(",", "','"));
|
|
|
1584
|
+ sql += $" and T_Wo_WorkOrder.F_QuestionType in (" + queststrs + ")"; ;
|
|
|
1585
|
+ }
|
|
|
1586
|
+ }
|
|
|
1587
|
+ //
|
|
|
1588
|
+ }
|
|
|
1589
|
+ else if (!string.IsNullOrEmpty(question1))
|
|
|
1590
|
+ {
|
|
|
1591
|
+ var QuestionManage = quesBLL.GetModelList("F_QuestionName='" + question1 + "'").FirstOrDefault();
|
|
|
1592
|
+ if (QuestionManage != null)
|
|
|
1593
|
+ {
|
|
|
1594
|
+ if (QuestionManage.F_Type == EnumWOType.Complaint.ToString())
|
|
|
1595
|
+ {
|
|
|
1596
|
+ sql += $" and T_Wo_WorkOrder.F_QuestionType in ('" + GetComplaint("'" + question1 + "'", 1) + "')"; ;
|
|
|
1597
|
+ }
|
|
|
1598
|
+ }
|
|
|
1599
|
+ }
|
|
|
1600
|
+ else if (!string.IsNullOrEmpty(question))
|
|
|
1601
|
+ {
|
|
|
1602
|
+ var QuestionManage = quesBLL.GetModelList("F_QuestionName='" + question + "'").FirstOrDefault();
|
|
|
1603
|
+ if (QuestionManage != null)
|
|
|
1604
|
+ {
|
|
|
1605
|
+ if (QuestionManage.F_Type == EnumWOType.Complaint.ToString())
|
|
|
1606
|
+ {
|
|
|
1607
|
+ sql += $" and T_Wo_WorkOrder.F_QuestionType in ('" + GetComplaint("'" + question + "'", 0) + "')"; ;
|
|
|
1608
|
+ }
|
|
|
1609
|
+ else
|
|
|
1610
|
+ sql += $" and (T_Wo_WorkOrder.F_QuestionType ='{ QuestionManage.F_Id }' or T_Wo_WorkOrder.F_QuestionType='{question}')"; ;
|
|
|
1611
|
+ }
|
|
|
1612
|
+ }
|
|
1575
|
1613
|
if (!string.IsNullOrWhiteSpace(keywords))//关键字搜索
|
|
1576
|
1614
|
{
|
|
1577
|
1615
|
|
|
|
@@ -3035,6 +3073,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
|
|
3035
|
3073
|
}
|
|
3036
|
3074
|
}
|
|
3037
|
3075
|
}
|
|
|
3076
|
+ int n = DbHelperSQL.ExecuteSql(" update T_Msg_List set State=1 where ToID ='" + model.F_ID + "' and IsDel=0 and State=0");
|
|
3038
|
3077
|
//var itemlasts = itembll.GetModelList(" F_WoID=" + +id + " ");
|
|
3039
|
3078
|
if (list.Count > 0)
|
|
3040
|
3079
|
{
|
|
|
@@ -3554,7 +3593,17 @@ namespace CallCenterApi.Interface.Controllers.weixin
|
|
3554
|
3593
|
model.F_CompanyName = cuModel.F_CompanyName;//公司名称
|
|
3555
|
3594
|
model.F_CustomerID = cuModel.F_CustomerCode;//客户编码
|
|
3556
|
3595
|
model.F_Salesman = cuModel.F_Salesman;
|
|
3557
|
|
- model.F_SalesPhone = cuModel.F_SalesPhone;
|
|
|
3596
|
+ if (string.IsNullOrEmpty(cuModel.F_SalesPhone) && !string.IsNullOrEmpty(cuModel.F_Salesman))
|
|
|
3597
|
+ {
|
|
|
3598
|
+ var modellist = new BLL.T_Sys_UserAccount().
|
|
|
3599
|
+ GetModelList("F_UserName ='" + cuModel.F_Salesman + "' and F_DeleteFlag =0");
|
|
|
3600
|
+ if (modellist != null && modellist.Count > 0)
|
|
|
3601
|
+ {
|
|
|
3602
|
+ model.F_SalesPhone = modellist.FirstOrDefault().F_Mobile;
|
|
|
3603
|
+ }
|
|
|
3604
|
+ }
|
|
|
3605
|
+ else
|
|
|
3606
|
+ model.F_SalesPhone = cuModel.F_SalesPhone;
|
|
3558
|
3607
|
model.F_Legal = cuModel.F_Legal;
|
|
3559
|
3608
|
model.F_LegalPhone = cuModel.F_LegalPhone;
|
|
3560
|
3609
|
model.F_AddressProvince = cuModel.F_AddressProvince;
|
|
|
@@ -5051,12 +5100,13 @@ namespace CallCenterApi.Interface.Controllers.weixin
|
|
5051
|
5100
|
}
|
|
5052
|
5101
|
|
|
5053
|
5102
|
#region 暂存数据删除
|
|
5054
|
|
- if (tempid > 0)
|
|
5055
|
|
- {
|
|
5056
|
|
- var tempmodel = new BLL.T_Wo_TempStorage().GetModel(tempid);
|
|
5057
|
|
- if (tempmodel != null)
|
|
5058
|
|
- new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
|
|
5059
|
|
- }
|
|
|
5103
|
+ new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
|
|
|
5104
|
+ //if (tempid > 0)
|
|
|
5105
|
+ //{
|
|
|
5106
|
+ // var tempmodel = new BLL.T_Wo_TempStorage().GetModel(tempid);
|
|
|
5107
|
+ // if (tempmodel != null)
|
|
|
5108
|
+ // new BLL.T_Wo_TempStorage().DelteByWhere($"F_CreateBy={ua.F_UserCode}");
|
|
|
5109
|
+ //}
|
|
5060
|
5110
|
#endregion
|
|
5061
|
5111
|
|
|
5062
|
5112
|
var model = new Model.T_Wo_WorkOrder();
|