|
|
@@ -37,8 +37,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
37
|
37
|
/// 获取工单列表
|
|
38
|
38
|
/// </summary>
|
|
39
|
39
|
/// <returns></returns>
|
|
40
|
|
- public ActionResult GetList(string code, string cusname, string cusphone,string createby, string starttime, string endtime, string keywords, string companyname, string province, string city,
|
|
41
|
|
- string country,string telephone, string township, string touser,string strvisit,string endvisit, int source=0,int type = 0, int state=-1, int pageindex = 1,int pagesize = 10)
|
|
|
40
|
+ public ActionResult GetList(string code, string cusname, string cusphone, string createby, string starttime, string endtime, string keywords, string companyname, string province, string city,
|
|
|
41
|
+ string country, string telephone, string township, string touser, string strvisit, string endvisit, int source = 0, int type = 0, int status = 0, int state=-1, int pageindex = 1,int pagesize = 10)
|
|
42
|
42
|
{
|
|
43
|
43
|
|
|
44
|
44
|
int userId = CurrentUser.UserData.F_UserId;
|
|
|
@@ -195,18 +195,26 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
195
|
195
|
sql += " and F_State =" + (int)EnumWorkOrderState.finish + " and F_DealBy = '" + ua.F_UserCode + "' ";
|
|
196
|
196
|
break;
|
|
197
|
197
|
case 3://我参与的
|
|
|
198
|
+ if (status>0)
|
|
|
199
|
+ {
|
|
|
200
|
+ sql += $" and F_State ="+ status;
|
|
|
201
|
+ }
|
|
|
202
|
+ else
|
|
|
203
|
+ {
|
|
|
204
|
+ sql += $" and F_State in(1,2,3,4)";
|
|
|
205
|
+ }
|
|
198
|
206
|
if (ro.F_RoleCode == "XTGLY")
|
|
199
|
207
|
{
|
|
200
|
208
|
if (GetParticipateID() != "")
|
|
201
|
209
|
{
|
|
202
|
210
|
sql += " and T_Wo_WorkOrder.F_ID in ( " + GetParticipateID() + ") ";
|
|
203
|
|
- sql += " and F_State =" + (int)EnumWorkOrderState.assign;
|
|
204
|
211
|
}
|
|
205
|
212
|
}
|
|
206
|
213
|
else
|
|
207
|
214
|
{
|
|
208
|
215
|
if (GetParticipateID(ua.F_UserCode) != "")
|
|
209
|
216
|
{
|
|
|
217
|
+
|
|
210
|
218
|
sql += " and T_Wo_WorkOrder.F_ID in ( " + GetParticipateID(ua.F_UserCode) + ") ";
|
|
211
|
219
|
}
|
|
212
|
220
|
else
|
|
|
@@ -214,6 +222,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
214
|
222
|
return Error("暂无工单");
|
|
215
|
223
|
}
|
|
216
|
224
|
}
|
|
|
225
|
+
|
|
217
|
226
|
break;
|
|
218
|
227
|
case 4://待回访
|
|
219
|
228
|
if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBZZX" || ro.F_RoleCode == "XTGLY")
|
|
|
@@ -663,12 +672,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
663
|
672
|
case 3://客服已分配
|
|
664
|
673
|
sql = "";
|
|
665
|
674
|
sql += $" F_IsDelete=0";
|
|
|
675
|
+ sql += $" and F_State in(1,2,3,4)";
|
|
666
|
676
|
if (ro.F_RoleCode == "XTGLY")
|
|
667
|
677
|
{
|
|
668
|
678
|
if (GetParticipateID() != "")
|
|
669
|
679
|
{
|
|
670
|
680
|
sql += " and T_Wo_WorkOrder.F_ID in ( " + GetParticipateID() + ") ";
|
|
671
|
|
- sql += " and F_State =" + (int)EnumWorkOrderState.assign;
|
|
|
681
|
+
|
|
672
|
682
|
}
|
|
673
|
683
|
else
|
|
674
|
684
|
{
|
|
|
@@ -848,7 +858,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
848
|
858
|
sql += $" F_IsDelete=0";
|
|
849
|
859
|
if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBZZX" || ro.F_RoleCode == "XTGLY")
|
|
850
|
860
|
{
|
|
851
|
|
- sql += $" and F_ID in(" + GetDelay() + ")";
|
|
|
861
|
+
|
|
852
|
862
|
}
|
|
853
|
863
|
else
|
|
854
|
864
|
{
|
|
|
@@ -931,7 +941,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
931
|
941
|
sql = "";
|
|
932
|
942
|
sql += $" F_IsDelete=0";
|
|
933
|
943
|
sql += $" and F_IsOver=" + 1;
|
|
934
|
|
- if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "YWY" || ro.F_RoleCode == "BLRY")
|
|
|
944
|
+ sql += $" and F_State !=" + 11;
|
|
|
945
|
+ if ( ro.F_RoleCode == "YWY" || ro.F_RoleCode == "BLRY")
|
|
935
|
946
|
{
|
|
936
|
947
|
sql += $" and F_DealBy like '%" + ua.F_UserCode.Trim() + "%'";
|
|
937
|
948
|
}
|
|
|
@@ -984,10 +995,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
984
|
995
|
break; ;
|
|
985
|
996
|
}
|
|
986
|
997
|
}
|
|
987
|
|
- else if (ro.F_RoleCode == "JDYBZZX")
|
|
988
|
|
- {
|
|
989
|
|
- sql += $" and F_CreateBy like '%" + ua.F_UserCode.Trim() + "%'";
|
|
990
|
|
- }
|
|
|
998
|
+
|
|
991
|
999
|
else if (ro.F_RoleCode == "QTJS")
|
|
992
|
1000
|
{
|
|
993
|
1001
|
CQGD = 0;
|
|
|
@@ -998,6 +1006,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
998
|
1006
|
case 18://催办
|
|
999
|
1007
|
sql = "";
|
|
1000
|
1008
|
sql += $" F_IsDelete=0";
|
|
|
1009
|
+ sql += $" and F_State !=" + 10;
|
|
|
1010
|
+ sql += $" and F_State !=" + 11;
|
|
1001
|
1011
|
var list = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.urge);
|
|
1002
|
1012
|
string str = "";
|
|
1003
|
1013
|
foreach (var it in list)
|
|
|
@@ -2147,11 +2157,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2147
|
2157
|
public string GetParticipateID(string user)
|
|
2148
|
2158
|
{
|
|
2149
|
2159
|
string str = string.Empty;
|
|
2150
|
|
- str = "select F_WoID from T_Wo_WorkOrderItem_New where F_CreateUser in(" + user + ") and F_OptType in( 1,7)";
|
|
|
2160
|
+ str = "select F_WoID from T_Wo_WorkOrderItem_New where F_CreateUser in(" + user + ") and F_OptType in( 1)";
|
|
2151
|
2161
|
|
|
2152
|
2162
|
;
|
|
2153
|
2163
|
return str;
|
|
2154
|
2164
|
}
|
|
|
2165
|
+
|
|
2155
|
2166
|
/// <summary>
|
|
2156
|
2167
|
/// 获取部门待接单的工单编号
|
|
2157
|
2168
|
/// </summary>
|
|
|
@@ -2475,6 +2486,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2475
|
2486
|
{
|
|
2476
|
2487
|
sql += $" and F_State in (11)";
|
|
2477
|
2488
|
sql += $" and F_IsVisit=" + 1; ;
|
|
|
2489
|
+ sql += $"and F_DealType != '当即办理' and F_VisitBy != ''";
|
|
2478
|
2490
|
}
|
|
2479
|
2491
|
else if (state == 10)
|
|
2480
|
2492
|
{
|
|
|
@@ -2485,10 +2497,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2485
|
2497
|
sql += $" and F_State=" + state;
|
|
2486
|
2498
|
}
|
|
2487
|
2499
|
}
|
|
2488
|
|
-
|
|
2489
|
2500
|
if (source > 0)//工单来源
|
|
2490
|
2501
|
sql += $" and F_Source=" + source;
|
|
2491
|
|
-
|
|
2492
|
2502
|
if (!string.IsNullOrWhiteSpace(createby))//创建人
|
|
2493
|
2503
|
{
|
|
2494
|
2504
|
string F_WorkNumber = "";
|
|
|
@@ -2666,7 +2676,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2666
|
2676
|
/// 查询超时工单列表
|
|
2667
|
2677
|
/// </summary>
|
|
2668
|
2678
|
public ActionResult GetOvertime(string code,string keywords, string cusname, string cusphone, string companyname, string province, string city,
|
|
2669
|
|
- string country, string township, string touser, int source = 0, int type = 0,int pageindex = 1, int pagesize = 10)
|
|
|
2679
|
+ string starttime, string salesBase, string endtime, string country, string township, string touser, string product,int source = 0,int state=0, int type = 0,int pageindex = 1, int pagesize = 10)
|
|
2670
|
2680
|
{
|
|
2671
|
2681
|
int userId = CurrentUser.UserData.F_UserId;
|
|
2672
|
2682
|
if (userId != 0)
|
|
|
@@ -2688,6 +2698,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2688
|
2698
|
sql += $" and F_WorkOrderCode like '%" + code.Trim() + "%'";
|
|
2689
|
2699
|
if (!string.IsNullOrWhiteSpace(keywords))//关键字搜索
|
|
2690
|
2700
|
sql += $" and ( F_CusName like '%" + keywords.Trim() + "%'or F_CusPhone like '%" + keywords.Trim() + "%' ) ";
|
|
|
2701
|
+ if (!string.IsNullOrEmpty(starttime))
|
|
|
2702
|
+ sql += " and datediff(day,F_CreateOn,'" + starttime + "')<=0 ";
|
|
|
2703
|
+ if (!string.IsNullOrEmpty(endtime))
|
|
|
2704
|
+ sql += " and datediff(day,F_CreateOn,'" + endtime + "')>=0 ";
|
|
|
2705
|
+ if (!string.IsNullOrWhiteSpace(salesBase))//销售基地
|
|
|
2706
|
+ sql += $" and F_SalesBase like '%" + salesBase.Trim() + "%'";
|
|
2691
|
2707
|
if (!string.IsNullOrWhiteSpace(cusname))//客户姓名
|
|
2692
|
2708
|
sql += $" and F_CusName like '%" + cusname.Trim() + "%'";
|
|
2693
|
2709
|
if (!string.IsNullOrWhiteSpace(cusphone))//客户电话
|
|
|
@@ -2702,11 +2718,19 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2702
|
2718
|
sql += $" and F_IncidentCountry like '%" + country.Trim() + "%'";
|
|
2703
|
2719
|
if (!string.IsNullOrWhiteSpace(province))//乡
|
|
2704
|
2720
|
sql += $" and F_IncidentTownship like '%" + township.Trim() + "%'";
|
|
2705
|
|
-
|
|
|
2721
|
+ if (!string.IsNullOrEmpty(product))
|
|
|
2722
|
+ {
|
|
|
2723
|
+ sql += $" and F_TS_Category='" + product.Trim() + "'";
|
|
|
2724
|
+ }
|
|
|
2725
|
+ if (state>0)
|
|
|
2726
|
+ {
|
|
|
2727
|
+ sql += $" and F_State =" + state;
|
|
|
2728
|
+ }
|
|
2706
|
2729
|
sql += $" and F_IsOver=" + 1;
|
|
|
2730
|
+ sql += $" and F_State !=" + 11;
|
|
2707
|
2731
|
Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(userId);
|
|
2708
|
2732
|
Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
|
|
2709
|
|
- if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "YWY" || ro.F_RoleCode == "BLRY")
|
|
|
2733
|
+ if ( ro.F_RoleCode == "YWY" || ro.F_RoleCode == "BLRY")
|
|
2710
|
2734
|
{
|
|
2711
|
2735
|
sql += $" and F_DealBy like '%" + ua.F_UserCode.Trim() + "%'";
|
|
2712
|
2736
|
}
|
|
|
@@ -2757,10 +2781,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2757
|
2781
|
return Error("加载失败");
|
|
2758
|
2782
|
}
|
|
2759
|
2783
|
}
|
|
2760
|
|
- else if (ro.F_RoleCode == "JDYBZZX")
|
|
2761
|
|
- {
|
|
2762
|
|
- sql += $" and F_CreateBy like '%" + ua.F_UserCode.Trim() + "%'";
|
|
2763
|
|
- }
|
|
2764
|
2784
|
else if (ro.F_RoleCode == "QTJS")
|
|
2765
|
2785
|
{
|
|
2766
|
2786
|
return Error("无操作权限!");
|
|
|
@@ -3357,6 +3377,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3357
|
3377
|
sql += $" and F_IncidentCountry like '%" + country.Trim() + "%'";
|
|
3358
|
3378
|
if (!string.IsNullOrWhiteSpace(province))//乡
|
|
3359
|
3379
|
sql += $" and F_IncidentTownship like '%" + township.Trim() + "%'";
|
|
|
3380
|
+ sql += $" and F_State !=" + 10;
|
|
|
3381
|
+ sql += $" and F_State !=" + 11;
|
|
3360
|
3382
|
#endregion
|
|
3361
|
3383
|
int recordCount = 0;
|
|
3362
|
3384
|
var list = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.urge);
|
|
|
@@ -4036,7 +4058,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4036
|
4058
|
{
|
|
4037
|
4059
|
if (!string.IsNullOrEmpty(cuModel.F_AreaID))
|
|
4038
|
4060
|
{
|
|
4039
|
|
- Model.T_Sys_Department pdModel = departmentBLL.GetModel(int.Parse(cuModel.F_AreaID));//通过公司id获取部门
|
|
|
4061
|
+ Model.T_Sys_Department pdModel = new T_Sys_Department();
|
|
|
4062
|
+ try
|
|
|
4063
|
+ {
|
|
|
4064
|
+ pdModel = departmentBLL.GetModel(int.Parse(cuModel.F_AreaID));//通过公司id获取部门
|
|
|
4065
|
+ }
|
|
|
4066
|
+ catch
|
|
|
4067
|
+ {
|
|
|
4068
|
+ pdModel = departmentBLL.GetModel(cuModel.F_AreaID);//通过公司id获取部门
|
|
|
4069
|
+ }
|
|
|
4070
|
+
|
|
4040
|
4071
|
if (pdModel != null)
|
|
4041
|
4072
|
{
|
|
4042
|
4073
|
model.F_AreaName = pdModel.F_DeptName;
|
|
|
@@ -4044,7 +4075,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4044
|
4075
|
}
|
|
4045
|
4076
|
if (!string.IsNullOrEmpty(cuModel.F_BranchID))
|
|
4046
|
4077
|
{
|
|
4047
|
|
- Model.T_Sys_Department pdModel1 = departmentBLL.GetModel(int.Parse(cuModel.F_BranchID));
|
|
|
4078
|
+ Model.T_Sys_Department pdModel1 = new T_Sys_Department();
|
|
|
4079
|
+ try
|
|
|
4080
|
+ {
|
|
|
4081
|
+ pdModel1 = departmentBLL.GetModel(int.Parse(cuModel.F_BranchID));//通过公司id获取部门
|
|
|
4082
|
+ }
|
|
|
4083
|
+ catch
|
|
|
4084
|
+ {
|
|
|
4085
|
+ pdModel1 = departmentBLL.GetModel(cuModel.F_BranchID);//通过公司id获取部门
|
|
|
4086
|
+ }
|
|
4048
|
4087
|
if (pdModel1 != null)
|
|
4049
|
4088
|
{
|
|
4050
|
4089
|
model.F_BranchName = pdModel1.F_DeptName;
|
|
|
@@ -4175,7 +4214,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4175
|
4214
|
}
|
|
4176
|
4215
|
else if (model1[i].F_State == 11)
|
|
4177
|
4216
|
{
|
|
4178
|
|
- model.F_StateName = "已评价";
|
|
|
4217
|
+ model.F_StateName = "已回访";
|
|
4179
|
4218
|
}
|
|
4180
|
4219
|
else if (model1[i].F_State == 12)
|
|
4181
|
4220
|
{
|
|
|
@@ -4593,39 +4632,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4593
|
4632
|
}
|
|
4594
|
4633
|
return true;
|
|
4595
|
4634
|
}
|
|
4596
|
|
- private bool IsMaterial(WorkOrderNewInput input)
|
|
4597
|
|
- {
|
|
4598
|
|
- bool n= false;
|
|
4599
|
|
- if (!string .IsNullOrEmpty (input.F_MaterialID)|| !string.IsNullOrEmpty(input.F_MaterialName)
|
|
4600
|
|
- || !string.IsNullOrEmpty(input.F_Model) || !string.IsNullOrEmpty(input.F_Specs)
|
|
4601
|
|
- || !string.IsNullOrEmpty(input.F_Level1) || !string.IsNullOrEmpty(input.F_Level2)
|
|
4602
|
|
- || !string.IsNullOrEmpty(input.F_Level3) || !string.IsNullOrEmpty(input.F_Brand)
|
|
4603
|
|
- || !string.IsNullOrEmpty(input.F_MaterialEffect) || !string.IsNullOrEmpty(input.F_Craft)
|
|
4604
|
|
- || !string.IsNullOrEmpty(input.F_Pipeline))
|
|
4605
|
|
- {
|
|
4606
|
|
- n = true;
|
|
4607
|
|
- }
|
|
4608
|
|
- return n;
|
|
4609
|
|
- }
|
|
4610
|
|
- private void AddMait(WorkOrderNewInput input,string usercode)
|
|
4611
|
|
- {
|
|
4612
|
|
- Model.T_Wo_MaterialManage dModel = new Model.T_Wo_MaterialManage();
|
|
4613
|
|
- dModel.F_MaterialCode = input.F_MaterialID.ToString();//物料编号
|
|
4614
|
|
- dModel.F_MaterialName = input.F_MaterialName;//物料名称
|
|
4615
|
|
- dModel.F_Model = input.F_Model;//型号
|
|
4616
|
|
- dModel.F_Specs = input.F_Specs;//规格
|
|
4617
|
|
- dModel.F_Level1 = input.F_Level1;//一级分类
|
|
4618
|
|
- dModel.F_Level2 = input.F_Level2;//二级分类
|
|
4619
|
|
- dModel.F_Level3 = input.F_Level3;//三级分类
|
|
4620
|
|
- dModel.F_Brand = input.F_Brand;//品牌
|
|
4621
|
|
- dModel.F_MaterialEffect = input.F_MaterialEffect;//复合肥肥效
|
|
4622
|
|
- dModel.F_Craft = input.F_Craft;//工艺
|
|
4623
|
|
- dModel.F_Pipeline = input.F_Pipeline;//产品线
|
|
4624
|
|
- dModel.F_IsDelete = 0;
|
|
4625
|
|
- dModel.F_CreateOn = DateTime.Now;
|
|
4626
|
|
- dModel.F_CreateBy = usercode;
|
|
4627
|
|
- int f = mmBLL.Add(dModel);
|
|
4628
|
|
- }
|
|
|
4635
|
+
|
|
|
4636
|
+
|
|
4629
|
4637
|
|
|
4630
|
4638
|
/// <summary>
|
|
4631
|
4639
|
/// 根据传入的对象和input的内容返回对象(添加修改使用)
|
|
|
@@ -4655,8 +4663,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4655
|
4663
|
model.F_Source = model.F_Source.ToString();//工单来源
|
|
4656
|
4664
|
}
|
|
4657
|
4665
|
#region 基本字段
|
|
4658
|
|
-
|
|
4659
|
|
-
|
|
4660
|
4666
|
if (input.F_Type == 2 || input.F_Type == 3)
|
|
4661
|
4667
|
{
|
|
4662
|
4668
|
if (string.IsNullOrEmpty(input.F_CustomerID))
|
|
|
@@ -4670,15 +4676,40 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4670
|
4676
|
Customer.F_Salesman = input.F_Salesman;
|
|
4671
|
4677
|
if (!string.IsNullOrEmpty(input.F_SalesPhone))
|
|
4672
|
4678
|
Customer.F_SalesPhone = input.F_SalesPhone;
|
|
4673
|
|
- if (!string.IsNullOrEmpty(input.F_Brands))
|
|
4674
|
|
- Customer.F_Brands = input.F_Brands;
|
|
4675
|
|
- if (!string.IsNullOrEmpty(input.F_AreaName))
|
|
4676
|
|
- Customer.F_AreaID = input.F_AreaName.Trim();
|
|
|
4679
|
+
|
|
|
4680
|
+
|
|
|
4681
|
+ if (!string.IsNullOrEmpty(input.F_Brands))
|
|
|
4682
|
+ Customer.F_SalesPhone = input.F_Brands;
|
|
|
4683
|
+ if (!string.IsNullOrEmpty(input.F_AreaName))
|
|
|
4684
|
+ {
|
|
|
4685
|
+ Model.T_Sys_Department pdModel = new T_Sys_Department();
|
|
|
4686
|
+ try
|
|
|
4687
|
+ {
|
|
|
4688
|
+ pdModel = departmentBLL.GetModel(int.Parse(input.F_AreaName));
|
|
|
4689
|
+ }
|
|
|
4690
|
+ catch
|
|
|
4691
|
+ {
|
|
|
4692
|
+ pdModel = departmentBLL.GetModel(input.F_AreaName);
|
|
|
4693
|
+ }
|
|
|
4694
|
+ Customer.F_AreaID = pdModel.F_DeptId.ToString();
|
|
|
4695
|
+ }
|
|
|
4696
|
+
|
|
4677
|
4697
|
if (!string.IsNullOrEmpty(input.F_BranchName))
|
|
4678
|
|
- Customer.F_BranchID = input.F_BranchName.Trim();
|
|
|
4698
|
+ {
|
|
|
4699
|
+ Model.T_Sys_Department pdModel = new T_Sys_Department();
|
|
|
4700
|
+ try
|
|
|
4701
|
+ {
|
|
|
4702
|
+ pdModel = departmentBLL.GetModel(int.Parse(input.F_BranchName));
|
|
|
4703
|
+ }
|
|
|
4704
|
+ catch
|
|
|
4705
|
+ {
|
|
|
4706
|
+ pdModel = departmentBLL.GetModel(input.F_BranchName);
|
|
|
4707
|
+ }
|
|
|
4708
|
+ Customer.F_BranchID = pdModel.F_DeptId.ToString();
|
|
|
4709
|
+ }
|
|
|
4710
|
+
|
|
4679
|
4711
|
cusbll.Update(Customer);
|
|
4680
|
4712
|
}
|
|
4681
|
|
-
|
|
4682
|
4713
|
|
|
4683
|
4714
|
}
|
|
4684
|
4715
|
else
|
|
|
@@ -4691,39 +4722,41 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4691
|
4722
|
if (!string.IsNullOrEmpty(input.F_SalesPhone))
|
|
4692
|
4723
|
Customer.F_SalesPhone = input.F_SalesPhone;
|
|
4693
|
4724
|
if (!string.IsNullOrEmpty(input.F_Brands))
|
|
4694
|
|
- Customer.F_Brands = input.F_Brands;
|
|
4695
|
|
- if (!string.IsNullOrEmpty(input.F_AreaName))
|
|
4696
|
|
- Customer.F_AreaID = input.F_AreaName.Trim();
|
|
4697
|
|
- if (!string.IsNullOrEmpty(input.F_BranchName))
|
|
4698
|
|
- Customer.F_BranchID = input.F_BranchName.Trim();
|
|
4699
|
|
- cusbll.Update(Customer);
|
|
4700
|
|
- }
|
|
4701
|
|
-
|
|
4702
|
|
- }
|
|
4703
|
|
- if ( IsMaterial(input))
|
|
4704
|
|
- {
|
|
4705
|
|
- if (string.IsNullOrEmpty(input.F_MaterialID))
|
|
|
4725
|
+ Customer.F_Brands = input.F_Brands;
|
|
|
4726
|
+ if (!string.IsNullOrEmpty(input.F_AreaName))
|
|
4706
|
4727
|
{
|
|
4707
|
|
- while (true)
|
|
|
4728
|
+ Model.T_Sys_Department pdModel = new T_Sys_Department();
|
|
|
4729
|
+ try
|
|
4708
|
4730
|
{
|
|
4709
|
|
- if (!gematerque(0, GetIntCode()))
|
|
4710
|
|
- {
|
|
4711
|
|
- input.F_MaterialID = GetIntCode();
|
|
4712
|
|
- AddMait(input, usercode);
|
|
4713
|
|
- break;
|
|
4714
|
|
- }
|
|
|
4731
|
+ pdModel = departmentBLL.GetModel(int.Parse(input.F_AreaName));
|
|
|
4732
|
+ }
|
|
|
4733
|
+ catch
|
|
|
4734
|
+ {
|
|
|
4735
|
+ pdModel = departmentBLL.GetModel(input.F_AreaName);
|
|
4715
|
4736
|
}
|
|
|
4737
|
+ Customer.F_AreaID = pdModel.F_DeptId.ToString();
|
|
4716
|
4738
|
}
|
|
4717
|
|
- else
|
|
|
4739
|
+
|
|
|
4740
|
+ if (!string.IsNullOrEmpty(input.F_BranchName))
|
|
4718
|
4741
|
{
|
|
4719
|
|
- if (!gematerque(0, input.F_MaterialID))
|
|
4720
|
4742
|
{
|
|
4721
|
|
- AddMait(input, usercode);
|
|
|
4743
|
+ Model.T_Sys_Department pdModel = new T_Sys_Department();
|
|
|
4744
|
+ try
|
|
|
4745
|
+ {
|
|
|
4746
|
+ pdModel = departmentBLL.GetModel(int.Parse(input.F_BranchName));
|
|
|
4747
|
+ }
|
|
|
4748
|
+ catch
|
|
|
4749
|
+ {
|
|
|
4750
|
+ pdModel = departmentBLL.GetModel(input.F_BranchName);
|
|
|
4751
|
+ }
|
|
|
4752
|
+ Customer.F_BranchID = pdModel.F_DeptId.ToString();
|
|
4722
|
4753
|
}
|
|
4723
|
4754
|
}
|
|
|
4755
|
+
|
|
|
4756
|
+ cusbll.Update(Customer);
|
|
|
4757
|
+ }
|
|
4724
|
4758
|
}
|
|
4725
|
4759
|
}
|
|
4726
|
|
-
|
|
4727
|
4760
|
#endregion
|
|
4728
|
4761
|
model.F_Canal = input.F_Canal;//生产批次号
|
|
4729
|
4762
|
model.F_Type = input.F_Type.ToString();//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
|
|
|
@@ -5865,7 +5898,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5865
|
5898
|
{
|
|
5866
|
5899
|
if (!string.IsNullOrEmpty(model.F_CusPhone.Trim () ))
|
|
5867
|
5900
|
{
|
|
5868
|
|
- SmsSingleSenderResult result = new SMSController().SMSSingleshot(model.F_CusPhone.Trim(), smscont);
|
|
|
5901
|
+ string msg = "【心连心客服中心】为更好的为你提供服务,请你对我们的服务进行评价,满意请按1,一般请按2,不满意请按3.";
|
|
|
5902
|
+ SmsSingleSenderResult result = new SMSController().SMSSingleshot(model.F_CusPhone.Trim(), msg);
|
|
|
5903
|
+ bool n = new SMSController().AddSmS(model.F_CusPhone, smscont, nowUser.F_UserId);
|
|
5869
|
5904
|
if (result !=null )
|
|
5870
|
5905
|
{
|
|
5871
|
5906
|
sid = result.sid.Trim ();
|
|
|
@@ -6230,21 +6265,21 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
6230
|
6265
|
string smscont = "";
|
|
6231
|
6266
|
if (model.F_Type == "1")
|
|
6232
|
6267
|
{
|
|
6233
|
|
- smscont = "您有一条新的咨询工单,请及时处理";
|
|
|
6268
|
+ smscont = "咨询";
|
|
6234
|
6269
|
}
|
|
6235
|
6270
|
else if (model.F_Type == "2")
|
|
6236
|
6271
|
{
|
|
6237
|
|
- smscont = "您有一条新的投诉工单,请及时处理";
|
|
|
6272
|
+ smscont = "投诉";
|
|
6238
|
6273
|
}
|
|
6239
|
6274
|
else if (model.F_Type == "3")
|
|
6240
|
6275
|
{
|
|
6241
|
|
- smscont = "您有一条新的抽检工单,请及时处理";
|
|
|
6276
|
+ smscont = "抽检";
|
|
6242
|
6277
|
}
|
|
6243
|
6278
|
else
|
|
6244
|
6279
|
{
|
|
6245
|
|
- smscont = "您有一条新的建议工单,请及时处理";
|
|
|
6280
|
+ smscont = "建议";
|
|
6246
|
6281
|
}
|
|
6247
|
|
-
|
|
|
6282
|
+ string[] mag = { smscont };
|
|
6248
|
6283
|
string touser = ""; string tousername = "";
|
|
6249
|
6284
|
|
|
6250
|
6285
|
int deptid = 0;
|
|
|
@@ -6262,7 +6297,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
6262
|
6297
|
{
|
|
6263
|
6298
|
if (!string .IsNullOrEmpty (clus.F_Mobile.Trim ()))
|
|
6264
|
6299
|
{
|
|
6265
|
|
- SmsSingleSenderResult result = new SMSController().SMSSingleshot(clus.F_Mobile.Trim(), smscont);
|
|
|
6300
|
+
|
|
|
6301
|
+ SmsSingleSenderResult result = new SMSController().SMSSingleshot(395191, mag, clus.F_Mobile.Trim());
|
|
|
6302
|
+ bool n = new SMSController().AddSmS(clus.F_Mobile.Trim(), smscont, nowUser.F_UserId);
|
|
6266
|
6303
|
}
|
|
6267
|
6304
|
|
|
6268
|
6305
|
}
|
|
|
@@ -6290,7 +6327,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
6290
|
6327
|
{
|
|
6291
|
6328
|
if (!string.IsNullOrEmpty(l.F_Mobile.Trim ()))
|
|
6292
|
6329
|
{
|
|
6293
|
|
- SmsSingleSenderResult result = new SMSController().SMSSingleshot(l.F_Mobile.Trim(), smscont);
|
|
|
6330
|
+ SmsSingleSenderResult result = new SMSController().SMSSingleshot(395191, mag,l.F_Mobile.Trim());
|
|
|
6331
|
+ bool n = new SMSController().AddSmS(l.F_Mobile.Trim(), smscont, nowUser.F_UserId);
|
|
6294
|
6332
|
}
|
|
6295
|
6333
|
|
|
6296
|
6334
|
}
|