|
|
@@ -545,7 +545,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
545
|
545
|
List<Model.T_Wo_WorkOrder> modlelist = new BLL.T_Wo_WorkOrder().DataTableToList(dt);
|
|
546
|
546
|
if (modlelist.Count > 0)
|
|
547
|
547
|
{
|
|
548
|
|
- List<WorkOrderNewInput> Input = modeltooip(modlelist);
|
|
|
548
|
+ List<WorkOrderNewInput> Input =modeltooip (modlelist);
|
|
549
|
549
|
var obj = new
|
|
550
|
550
|
{
|
|
551
|
551
|
state = "success",
|
|
|
@@ -1509,13 +1509,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1509
|
1509
|
{
|
|
1510
|
1510
|
nextda = 295;
|
|
1511
|
1511
|
opt = "流转新乡黑科质检";
|
|
|
1512
|
+ }
|
|
|
1513
|
+ else if (dapt == 332)
|
|
|
1514
|
+ {
|
|
|
1515
|
+ nextda = 339;
|
|
|
1516
|
+ opt = "流转营销管理处";
|
|
1512
|
1517
|
|
|
1513
|
1518
|
}
|
|
1514
|
|
- else if (ua.F_DeptId==17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
|
|
|
1519
|
+ else if (ua.F_DeptId == 17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
|
|
1515
|
1520
|
{
|
|
1516
|
1521
|
isbl = 1;
|
|
1517
|
|
- nextda = ua.F_DeptId;
|
|
1518
|
|
- opt = "流转"+ deptname;
|
|
|
1522
|
+ nextda = ua.F_DeptId;
|
|
|
1523
|
+ opt = "流转" + deptname;
|
|
1519
|
1524
|
}
|
|
1520
|
1525
|
//else
|
|
1521
|
1526
|
//{
|
|
|
@@ -2075,7 +2080,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2075
|
2080
|
var model = workOrder.GetModel(id);
|
|
2076
|
2081
|
if (model != null)
|
|
2077
|
2082
|
list.Add(model);
|
|
2078
|
|
- var itemlasts = itembll.GetModelList(" F_WoID=" + +id + " ");
|
|
|
2083
|
+ var itemlasts = itembll.GetModelList(" F_WoID=" + id + " ");
|
|
2079
|
2084
|
; var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
|
|
2080
|
2085
|
FileUrl = GetFileData(model.F_Files , configfj.F_ParamValue);
|
|
2081
|
2086
|
if (list.Count > 0)
|
|
|
@@ -4282,7 +4287,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4282
|
4287
|
/// 添加工单
|
|
4283
|
4288
|
/// </summary>
|
|
4284
|
4289
|
/// <returns></returns>
|
|
4285
|
|
- public ActionResult Add(WorkOrderNewInput input, int overtime = 0,int sms = 0)
|
|
|
4290
|
+ public ActionResult Add(WorkOrderNewInput input, int overtime = 0,int sms = 0)
|
|
4286
|
4291
|
{
|
|
4287
|
4292
|
int userId = CurrentUser.UserData.F_UserId;
|
|
4288
|
4293
|
if (userId != 0)
|
|
|
@@ -4291,9 +4296,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4291
|
4296
|
Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(userId);
|
|
4292
|
4297
|
|
|
4293
|
4298
|
#region 添加验证判断
|
|
4294
|
|
- if (!(input.F_Type> 0 && input.F_Type < 5))
|
|
|
4299
|
+ if (!(input.F_Type > 0 && input.F_Type < 5))
|
|
4295
|
4300
|
return Error("工单类型错误!");
|
|
4296
|
|
- if(string .IsNullOrEmpty (input.F_CusName))
|
|
|
4301
|
+ if (string.IsNullOrEmpty(input.F_CusName))
|
|
4297
|
4302
|
return Error("请输入客户姓名!");
|
|
4298
|
4303
|
if (input.F_Type == 2)
|
|
4299
|
4304
|
{
|
|
|
@@ -4302,7 +4307,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4302
|
4307
|
if (string.IsNullOrEmpty(input.F_QuestionType))
|
|
4303
|
4308
|
return Error("请选择问题类别!");
|
|
4304
|
4309
|
}
|
|
4305
|
|
-
|
|
|
4310
|
+
|
|
4306
|
4311
|
if (string.IsNullOrEmpty(input.F_CusPhone))
|
|
4307
|
4312
|
return Error("请输入客户电话!");
|
|
4308
|
4313
|
//if (!string.IsNullOrEmpty(input.F_BatchNumber) && !vaBatchNumber(input.F_BatchNumber.Trim()))
|
|
|
@@ -4332,7 +4337,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4332
|
4337
|
if (!string.IsNullOrEmpty(input.F_CustomerID) && !valcode(input.F_CustomerID.ToString(), 10))
|
|
4333
|
4338
|
return Error("客户编号为10为纯数字!");
|
|
4334
|
4339
|
|
|
4335
|
|
- if (!string.IsNullOrEmpty (input.F_MaterialID) && !valcode(input.F_MaterialID.ToString(), 11))
|
|
|
4340
|
+ if (!string.IsNullOrEmpty(input.F_MaterialID) && !valcode(input.F_MaterialID.ToString(), 11))
|
|
4336
|
4341
|
return Error("物料编码为11为纯数字!");
|
|
4337
|
4342
|
if (!string.IsNullOrEmpty(input.F_CustomerID))
|
|
4338
|
4343
|
{
|
|
|
@@ -4353,8 +4358,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4353
|
4358
|
if (string.IsNullOrEmpty(input.F_CJ_Time.ToString()))
|
|
4354
|
4359
|
return Error("请选择抽检时间");
|
|
4355
|
4360
|
}
|
|
4356
|
|
- if (!string .IsNullOrEmpty (input .F_SalesPhone))
|
|
4357
|
|
- {
|
|
|
4361
|
+ if (!string.IsNullOrEmpty(input.F_SalesPhone))
|
|
|
4362
|
+ {
|
|
4358
|
4363
|
if (!IsNumeric(input.F_SalesPhone))
|
|
4359
|
4364
|
return Error("请输入正确的业务员电话");
|
|
4360
|
4365
|
}
|
|
|
@@ -4378,31 +4383,31 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4378
|
4383
|
{
|
|
4379
|
4384
|
deptname = deptmodel.F_DeptName + "-";
|
|
4380
|
4385
|
}
|
|
4381
|
|
- Model.T_Wo_WorkOrder modlelist = new BLL.T_Wo_WorkOrder().GetModel(n);
|
|
4382
|
|
-
|
|
4383
|
|
- if (ro.F_RoleCode == "DQJL" || ro.F_RoleCode == "FGSJL" || ro.F_RoleCode == "YWY")
|
|
4384
|
|
- {
|
|
|
4386
|
+ Model.T_Wo_WorkOrder modlelist = new BLL.T_Wo_WorkOrder().GetModel(n);
|
|
4385
|
4387
|
|
|
4386
|
|
- if (GetUser(ua) != null)
|
|
|
4388
|
+ if (ro.F_RoleCode == "DQJL" || ro.F_RoleCode == "FGSJL" || ro.F_RoleCode == "YWY")
|
|
|
4389
|
+ {
|
|
|
4390
|
+
|
|
|
4391
|
+ if (GetUser(ua) != null)
|
|
|
4392
|
+ {
|
|
|
4393
|
+ var user = GetUser(ua);
|
|
|
4394
|
+ string deptname1 = "";
|
|
|
4395
|
+ var deptmodel1 = departmentBLL.GetModel(user.F_DeptId);
|
|
|
4396
|
+ if (deptmodel1 != null)
|
|
4387
|
4397
|
{
|
|
4388
|
|
- var user = GetUser(ua);
|
|
4389
|
|
- string deptname1 = "";
|
|
4390
|
|
- var deptmodel1 = departmentBLL.GetModel(user.F_DeptId);
|
|
4391
|
|
- if (deptmodel1 != null)
|
|
4392
|
|
- {
|
|
4393
|
|
- deptname1 = deptmodel1.F_DeptName + "-";
|
|
4394
|
|
- }
|
|
|
4398
|
+ deptname1 = deptmodel1.F_DeptName + "-";
|
|
|
4399
|
+ }
|
|
4395
|
4400
|
|
|
4396
|
|
- AddLog(modlelist.F_ID, 0, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
|
|
4397
|
|
- AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname1 + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
|
|
|
4401
|
+ AddLog(modlelist.F_ID, 0, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
|
|
|
4402
|
+ AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname1 + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
|
|
4398
|
4403
|
if (sms == 1 && !string.IsNullOrEmpty(user.F_Mobile))
|
|
4399
|
4404
|
{
|
|
4400
|
4405
|
SendSms(model.F_Type, user.F_Mobile, ua.F_UserId);
|
|
4401
|
4406
|
}
|
|
4402
|
4407
|
}
|
|
4403
|
|
- else
|
|
4404
|
|
- {
|
|
4405
|
|
-
|
|
|
4408
|
+ else
|
|
|
4409
|
+ {
|
|
|
4410
|
+
|
|
4406
|
4411
|
int dapt = 0, nextda = 0;
|
|
4407
|
4412
|
var deptmodel1 = departmentBLL.GetModel(ua.F_DeptId);
|
|
4408
|
4413
|
string deptneme = "";
|
|
|
@@ -4413,7 +4418,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4413
|
4418
|
}
|
|
4414
|
4419
|
AddLog(modlelist.F_ID, 0, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, overtime, sms);
|
|
4415
|
4420
|
string opt = "";
|
|
4416
|
|
-
|
|
|
4421
|
+
|
|
4417
|
4422
|
if (dapt != 0)
|
|
4418
|
4423
|
{
|
|
4419
|
4424
|
if (dapt == 11)
|
|
|
@@ -4442,10 +4447,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4442
|
4447
|
opt = "流转车用尿素";
|
|
4443
|
4448
|
|
|
4444
|
4449
|
}
|
|
|
4450
|
+
|
|
4445
|
4451
|
else if (dapt == 20)
|
|
4446
|
4452
|
{
|
|
4447
|
4453
|
nextda = 295;
|
|
4448
|
4454
|
opt = "流转新乡黑科质检";
|
|
|
4455
|
+ }
|
|
|
4456
|
+ else if (dapt == 332)
|
|
|
4457
|
+ {
|
|
|
4458
|
+ nextda = 339;
|
|
|
4459
|
+ opt = "流转营销管理处";
|
|
|
4460
|
+
|
|
4449
|
4461
|
|
|
4450
|
4462
|
}
|
|
4451
|
4463
|
else if (ua.F_DeptId == 17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
|
|
|
@@ -4456,7 +4468,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4456
|
4468
|
}
|
|
4457
|
4469
|
if (nextda != 0)
|
|
4458
|
4470
|
{
|
|
4459
|
|
- var res = AssignWO(ua, modlelist, input, opt, "", nextda, 0, 0, 0,0,0,0,"",1);
|
|
|
4471
|
+ var res = AssignWO(ua, modlelist, input, opt, "", nextda, 0, 0, 0, 0, 0, 0, "", 1);
|
|
4460
|
4472
|
if (res)
|
|
4461
|
4473
|
return Success("添加成功");
|
|
4462
|
4474
|
else
|
|
|
@@ -4466,12 +4478,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4466
|
4478
|
{
|
|
4467
|
4479
|
return Error("流转失败!");
|
|
4468
|
4480
|
}
|
|
4469
|
|
- }
|
|
4470
|
|
- }
|
|
4471
|
|
- else
|
|
4472
|
|
- {
|
|
4473
|
|
- AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, overtime, sms);
|
|
4474
|
4481
|
}
|
|
|
4482
|
+ }
|
|
|
4483
|
+ else
|
|
|
4484
|
+ {
|
|
|
4485
|
+ AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, overtime, sms);
|
|
|
4486
|
+ }
|
|
4475
|
4487
|
return Success("添加成功!");
|
|
4476
|
4488
|
|
|
4477
|
4489
|
}
|
|
|
@@ -4816,16 +4828,23 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4816
|
4828
|
opt = "流转车用尿素";
|
|
4817
|
4829
|
|
|
4818
|
4830
|
}
|
|
|
4831
|
+
|
|
4819
|
4832
|
else if (dapt == 20)
|
|
4820
|
4833
|
{
|
|
4821
|
4834
|
nextda = 295;
|
|
4822
|
4835
|
opt = "流转新乡黑科质检";
|
|
|
4836
|
+ }
|
|
|
4837
|
+ else if (dapt == 332)
|
|
|
4838
|
+ {
|
|
|
4839
|
+ nextda = 339;
|
|
|
4840
|
+ opt = "流转营销管理处";
|
|
|
4841
|
+
|
|
4823
|
4842
|
|
|
4824
|
4843
|
}
|
|
4825
|
|
- else if (ua.F_DeptId == 17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
|
|
|
4844
|
+ else if (ua.F_DeptId == 17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
|
|
4826
|
4845
|
{
|
|
4827
|
4846
|
nextda = ua.F_DeptId;
|
|
4828
|
|
- opt = "流转" + deptname1 ;
|
|
|
4847
|
+ opt = "流转" + deptname1;
|
|
4829
|
4848
|
}
|
|
4830
|
4849
|
|
|
4831
|
4850
|
}
|
|
|
@@ -5737,7 +5756,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5737
|
5756
|
model.F_Canal = input.F_Canal;//生产批次号
|
|
5738
|
5757
|
model.F_Type = input.F_Type.ToString();//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
|
|
5739
|
5758
|
model.F_Production = input.F_Production;//生产单位
|
|
5740
|
|
- model.F_CusName = input.F_CusName;//客户姓名
|
|
|
5759
|
+ model.F_CusName = input.F_CusName;//客户姓名
|
|
5741
|
5760
|
model.F_CusPhone = input.F_CusPhone;//客户电话
|
|
5742
|
5761
|
model.F_CompanyName = input.F_CompanyName;//公司名称
|
|
5743
|
5762
|
model.F_IncidentProvince = input.F_IncidentProvince;//事发地-省
|
|
|
@@ -6396,7 +6415,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
6396
|
6415
|
public ActionResult AssignWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment, string F_Files, int isvisit = 1,
|
|
6397
|
6416
|
int overtime = 0, int sms = 0, int clbm = 0, int clid = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0)
|
|
6398
|
6417
|
{
|
|
6399
|
|
- int userId = CurrentUser.UserData.F_UserId;
|
|
|
6418
|
+ int userId = CurrentUser.UserData.F_UserId;
|
|
6400
|
6419
|
string usercode = CurrentUser.UserData.F_UserCode;
|
|
6401
|
6420
|
if (userId != 0)
|
|
6402
|
6421
|
{
|
|
|
@@ -6632,7 +6651,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
6632
|
6651
|
/// </summary>
|
|
6633
|
6652
|
/// <returns></returns>
|
|
6634
|
6653
|
[Authority]
|
|
6635
|
|
- public ActionResult DealWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment,
|
|
|
6654
|
+ public ActionResult DealWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment,
|
|
6636
|
6655
|
string F_Files, string uncont = "",
|
|
6637
|
6656
|
int isvisit = 1, int isover = 0)
|
|
6638
|
6657
|
{
|