|
|
@@ -1319,7 +1319,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1319
|
1319
|
else
|
|
1320
|
1320
|
{
|
|
1321
|
1321
|
Model.T_Sys_RoleInfo ro = rolebll.GetModel(nowUser.F_RoleId);
|
|
1322
|
|
- if (ro.F_RoleCode == "DQJL")
|
|
|
1322
|
+ if (ro.F_RoleCode == "DQJL" || ro.F_RoleCode == "FGSJL")
|
|
1323
|
1323
|
{
|
|
1324
|
1324
|
var itemlast = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.audit + " and F_OptType=" + (int)EnumItemOpt.audit + " and F_WoID='" + model.F_ID + "' and F_NextUser='" + nowUser.F_UserCode + "' order by F_ID desc").FirstOrDefault();
|
|
1325
|
1325
|
if (itemlast != null)
|
|
|
@@ -1473,44 +1473,45 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1473
|
1473
|
deptname = deptmodel1.F_DeptName;
|
|
1474
|
1474
|
}
|
|
1475
|
1475
|
int isbl = 0;
|
|
1476
|
|
- if (dapt != 0)
|
|
1477
|
|
- {
|
|
1478
|
|
- if (dapt == 11)
|
|
|
1476
|
+ Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
|
|
|
1477
|
+ //if (dapt != 0)
|
|
|
1478
|
+ //{
|
|
|
1479
|
+ if (CirculMarket(ua.F_DeptId, 11))
|
|
1479
|
1480
|
{
|
|
1480
|
1481
|
isbl = 1;
|
|
1481
|
1482
|
nextda = 37;
|
|
1482
|
1483
|
opt = "流转市场管理科";
|
|
1483
|
1484
|
}
|
|
1484
|
|
- else if (dapt == 14)
|
|
|
1485
|
+ else if (CirculMarket(ua.F_DeptId, 14))
|
|
1485
|
1486
|
{
|
|
1486
|
1487
|
isbl = 1;
|
|
1487
|
1488
|
nextda = 57;
|
|
1488
|
1489
|
opt = "流转营销管理处";
|
|
1489
|
1490
|
}
|
|
1490
|
|
- else if (dapt == 15)
|
|
|
1491
|
+ else if (CirculMarket(ua.F_DeptId, 15))
|
|
1491
|
1492
|
{
|
|
1492
|
1493
|
isbl = 1;
|
|
1493
|
1494
|
nextda = 74;
|
|
1494
|
1495
|
opt = "流转策划推广";
|
|
1495
|
1496
|
}
|
|
1496
|
|
- else if (dapt == 16)
|
|
|
1497
|
+ else if (CirculMarket(ua.F_DeptId, 16))
|
|
1497
|
1498
|
{
|
|
1498
|
1499
|
isbl = 1;
|
|
1499
|
1500
|
nextda = 88;
|
|
1500
|
1501
|
opt = "流转销售部";
|
|
1501
|
1502
|
}
|
|
1502
|
|
- else if (dapt == 18)
|
|
|
1503
|
+ else if (CirculMarket(ua.F_DeptId, 18))
|
|
1503
|
1504
|
{
|
|
1504
|
1505
|
nextda = 268;
|
|
1505
|
1506
|
opt = "流转车用尿素";
|
|
1506
|
1507
|
|
|
1507
|
1508
|
}
|
|
1508
|
|
- else if (dapt == 20)
|
|
|
1509
|
+ else if (CirculMarket(ua.F_DeptId, 20))
|
|
1509
|
1510
|
{
|
|
1510
|
1511
|
nextda = 295;
|
|
1511
|
1512
|
opt = "流转新乡黑科质检";
|
|
1512
|
1513
|
}
|
|
1513
|
|
- else if (dapt == 332)
|
|
|
1514
|
+ else if (CirculMarket(ua.F_DeptId, 332))
|
|
1514
|
1515
|
{
|
|
1515
|
1516
|
nextda = 339;
|
|
1516
|
1517
|
opt = "流转营销管理处";
|
|
|
@@ -1521,7 +1522,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1521
|
1522
|
isbl = 1;
|
|
1522
|
1523
|
nextda = ua.F_DeptId;
|
|
1523
|
1524
|
opt = "流转" + deptname;
|
|
1524
|
|
- }
|
|
|
1525
|
+ //}
|
|
1525
|
1526
|
//else
|
|
1526
|
1527
|
//{
|
|
1527
|
1528
|
// nextda = ua.F_DeptId;
|
|
|
@@ -1531,11 +1532,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1531
|
1532
|
}
|
|
1532
|
1533
|
if (istrue)
|
|
1533
|
1534
|
{
|
|
1534
|
|
- cont = "大区经理已审批:"+ AuditCont+"," + opt;
|
|
|
1535
|
+ if (ro.F_RoleCode == "DQJL")
|
|
|
1536
|
+ {
|
|
|
1537
|
+ cont = "大区经理已审批:" + AuditCont + "," + opt;
|
|
|
1538
|
+ }
|
|
|
1539
|
+ else cont = "分公司经理已审批:" + AuditCont + "," + opt;
|
|
1535
|
1540
|
}
|
|
1536
|
1541
|
else
|
|
1537
|
1542
|
{
|
|
1538
|
|
- cont = "大区经理未审批" + opt;
|
|
|
1543
|
+ if (ro.F_RoleCode == "DQJL")
|
|
|
1544
|
+ {
|
|
|
1545
|
+ cont = "大区经理未审批" + opt;
|
|
|
1546
|
+ }
|
|
|
1547
|
+ else
|
|
|
1548
|
+ cont = "分公司经理未审批" + opt;
|
|
1539
|
1549
|
}
|
|
1540
|
1550
|
if (nextda != 0)
|
|
1541
|
1551
|
{
|
|
|
@@ -1570,7 +1580,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1570
|
1580
|
overtime = int.Parse(it.F_LimitTime);
|
|
1571
|
1581
|
}
|
|
1572
|
1582
|
int sms = int.Parse(it.F_IsSMS.ToString());
|
|
1573
|
|
- if (F_RoleCode == "DQJL")
|
|
|
1583
|
+ if (F_RoleCode == "DQJL" || F_RoleCode == "FGSJL")
|
|
1574
|
1584
|
{
|
|
1575
|
1585
|
if (hours >= 24)
|
|
1576
|
1586
|
{
|
|
|
@@ -1584,29 +1594,40 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1584
|
1594
|
}
|
|
1585
|
1595
|
else
|
|
1586
|
1596
|
{
|
|
1587
|
|
- var user = GetUser(ua);
|
|
1588
|
|
- string deptname = "";
|
|
1589
|
|
- string deptmodelsname = "";
|
|
1590
|
|
- var deptmodel = departmentBLL.GetModel(user.F_DeptId);
|
|
1591
|
|
- var deptmodels = departmentBLL.GetModel(ua.F_DeptId);
|
|
1592
|
|
- if (deptmodel != null)
|
|
1593
|
|
- {
|
|
1594
|
|
- deptname = deptmodel.F_DeptName + "-";
|
|
1595
|
|
- }
|
|
1596
|
|
- if (deptmodels != null)
|
|
1597
|
|
- {
|
|
1598
|
|
- deptmodelsname = deptmodels.F_DeptName + "-";
|
|
1599
|
|
- }
|
|
1600
|
1597
|
if (hours >= 24)
|
|
1601
|
1598
|
{
|
|
|
1599
|
+ var user = GetUser(ua);
|
|
|
1600
|
+ string deptname = "";
|
|
|
1601
|
+ string deptmodelsname = "";
|
|
|
1602
|
+ string namestr = "";
|
|
|
1603
|
+ Model.T_Sys_RoleInfo ro = rolebll.GetModel(user.F_RoleId);
|
|
|
1604
|
+ if (ro.F_RoleCode == "DQJL")
|
|
|
1605
|
+ {
|
|
|
1606
|
+ namestr = "大区经理";
|
|
|
1607
|
+ }
|
|
|
1608
|
+ else
|
|
|
1609
|
+ {
|
|
|
1610
|
+ namestr = "分公司经理";
|
|
|
1611
|
+ }
|
|
|
1612
|
+ var deptmodel = departmentBLL.GetModel(user.F_DeptId);
|
|
|
1613
|
+ var deptmodels = departmentBLL.GetModel(ua.F_DeptId);
|
|
|
1614
|
+ if (deptmodel != null)
|
|
|
1615
|
+ {
|
|
|
1616
|
+ deptname = deptmodel.F_DeptName + "-";
|
|
|
1617
|
+ }
|
|
|
1618
|
+ if (deptmodels != null)
|
|
|
1619
|
+ {
|
|
|
1620
|
+ deptmodelsname = deptmodels.F_DeptName + "-";
|
|
|
1621
|
+ }
|
|
1602
|
1622
|
DateTime time = DateTime.Parse(it.F_CreateTime.ToString()).AddHours(24);
|
|
1603
|
|
- Model.T_Wo_WorkOrder model = workOrder .GetModel(it.F_WoID);
|
|
1604
|
|
- AddLog(model.F_ID, model.F_State.Value, deptmodelsname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "未审批流转大区经理", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
|
|
|
1623
|
+ Model.T_Wo_WorkOrder model = workOrder.GetModel(it.F_WoID);
|
|
|
1624
|
+ AddLog(model.F_ID, model.F_State.Value, deptmodelsname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "未审批流转"+ namestr + "", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
|
|
1605
|
1625
|
AddLog(model.F_ID, model.F_State.Value, deptname + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, user, overtime, sms);
|
|
1606
|
1626
|
}
|
|
1607
|
1627
|
else if (hours >= 48)
|
|
1608
|
1628
|
{
|
|
1609
|
|
- GetDaQucirCulation("",user, it.F_CreateTime.ToString(), it.F_WoID, false);
|
|
|
1629
|
+ var user = GetUser(ua);
|
|
|
1630
|
+ GetDaQucirCulation("", user, it.F_CreateTime.ToString(), it.F_WoID, false);
|
|
1610
|
1631
|
}
|
|
1611
|
1632
|
else
|
|
1612
|
1633
|
{
|
|
|
@@ -2230,33 +2251,43 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2230
|
2251
|
/// 获取问题类别
|
|
2231
|
2252
|
/// </summary>
|
|
2232
|
2253
|
/// <returns></returns>
|
|
2233
|
|
- public string GetComplaint(string msg)
|
|
|
2254
|
+ public string GetComplaint(string msg, int type = 0)
|
|
2234
|
2255
|
{
|
|
2235
|
2256
|
string str = "";
|
|
2236
|
|
- string str1 = " select F_Id from T_Wo_QuestionManage where F_QuestionName in(" + msg + ")";
|
|
2237
|
|
- string str3 = " select F_Id from T_Wo_QuestionManage where F_ParentId in(" + str1 + ")";
|
|
2238
|
|
- var dept = quesBLL.GetModelList("F_ParentId in(" + str3 + ")");
|
|
|
2257
|
+ string str1 = "";
|
|
|
2258
|
+ string str3 = "";
|
|
|
2259
|
+ if (type == 0)
|
|
|
2260
|
+ {
|
|
|
2261
|
+ str1 = " select F_Id from T_Wo_QuestionManage where F_QuestionName in(" + msg + ")";
|
|
|
2262
|
+ str3 = " select F_Id from T_Wo_QuestionManage where F_ParentId in(" + str1 + ")";
|
|
|
2263
|
+ }
|
|
|
2264
|
+ else if (type == 1)
|
|
|
2265
|
+ {
|
|
|
2266
|
+ str3 = " select F_Id from T_Wo_QuestionManage where F_QuestionName in(" + msg + ")";
|
|
|
2267
|
+ }
|
|
|
2268
|
+ var dept = quesBLL.GetModelList("F_ParentId in(" + str3 + ")");
|
|
2239
|
2269
|
if (dept != null)
|
|
2240
|
|
- {
|
|
|
2270
|
+ {
|
|
2241
|
2271
|
foreach (var it in dept)
|
|
2242
|
|
- {
|
|
|
2272
|
+ {
|
|
2243
|
2273
|
|
|
2244
|
2274
|
if (str != "")
|
|
2245
|
|
- str += "','" + it.F_Id;
|
|
2246
|
|
- else
|
|
2247
|
|
- str += it.F_Id;
|
|
2248
|
|
-
|
|
|
2275
|
+ str += "','" + it.F_Id;
|
|
|
2276
|
+ else
|
|
|
2277
|
+ str += it.F_Id;
|
|
|
2278
|
+
|
|
2249
|
2279
|
}
|
|
2250
|
|
- }
|
|
2251
|
|
- // string str4 = " select F_Id from T_Wo_QuestionManage where F_ParentId in(" + str3 + ")";
|
|
|
2280
|
+ }
|
|
|
2281
|
+ // string str4 = " select F_Id from T_Wo_QuestionManage where F_ParentId in(" + str3 + ")";
|
|
2252
|
2282
|
return str;
|
|
2253
|
2283
|
}
|
|
2254
|
2284
|
|
|
|
2285
|
+
|
|
2255
|
2286
|
/// <summary>
|
|
2256
|
2287
|
///综合查询列表
|
|
2257
|
2288
|
/// </summary>
|
|
2258
|
2289
|
public ActionResult GetComprehensive(string description,string code, string cusname,string createby, string starttime, string endtime, string keywords, string cusphone, string companyname, string province, string city,
|
|
2259
|
|
- string country, string township,string category,string salebase, string touser,string visitby, string visitresult, string question,int isdc=0,int source = 0,int state=-1, int type = 0, int pageindex = 1, int pagesize = 10)
|
|
|
2290
|
+ string country, string township,string category,string salebase, string touser,string visitby, string visitresult, string question,int isdc=0,int source = 0,int state=-1, int type = 0, int pageindex = 1, int pagesize = 10, string question1="",string question2="")
|
|
2260
|
2291
|
{
|
|
2261
|
2292
|
int userId = CurrentUser.UserData.F_UserId;
|
|
2262
|
2293
|
if (userId != 0)
|
|
|
@@ -2299,12 +2330,34 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2299
|
2330
|
{
|
|
2300
|
2331
|
if (QuestionManage.F_Type == EnumWOType.Complaint.ToString())
|
|
2301
|
2332
|
{
|
|
2302
|
|
- sql += $" and T_Wo_WorkOrder.F_QuestionType in ('" + GetComplaint("'"+ question+"'") + "')"; ;
|
|
|
2333
|
+ sql += $" and T_Wo_WorkOrder.F_QuestionType in ('" + GetComplaint("'"+ question+"'",0) + "')"; ;
|
|
2303
|
2334
|
}
|
|
2304
|
2335
|
else
|
|
2305
|
2336
|
sql += $" and T_Wo_WorkOrder.F_QuestionType ='"+QuestionManage .F_Id +"'"; ;
|
|
2306
|
2337
|
}
|
|
2307
|
|
- //
|
|
|
2338
|
+ }
|
|
|
2339
|
+ if (!string.IsNullOrEmpty(question1))
|
|
|
2340
|
+ {
|
|
|
2341
|
+ var QuestionManage = quesBLL.GetModelList("F_QuestionName='" + question1 + "'").FirstOrDefault();
|
|
|
2342
|
+ if (QuestionManage != null)
|
|
|
2343
|
+ {
|
|
|
2344
|
+ if (QuestionManage.F_Type == EnumWOType.Complaint.ToString())
|
|
|
2345
|
+ {
|
|
|
2346
|
+ sql += $" and T_Wo_WorkOrder.F_QuestionType in ('" + GetComplaint("'" + question + "'",1) + "')"; ;
|
|
|
2347
|
+ }
|
|
|
2348
|
+ }
|
|
|
2349
|
+ }
|
|
|
2350
|
+ if (!string.IsNullOrEmpty(question2))
|
|
|
2351
|
+ {
|
|
|
2352
|
+ var QuestionManage = quesBLL.GetModelList("F_QuestionName='" + question2 + "'").FirstOrDefault();
|
|
|
2353
|
+ if (QuestionManage != null)
|
|
|
2354
|
+ {
|
|
|
2355
|
+ if (QuestionManage.F_Type == EnumWOType.Complaint.ToString())
|
|
|
2356
|
+ {
|
|
|
2357
|
+ sql += $" and T_Wo_WorkOrder.F_QuestionType ='" + QuestionManage.F_Id + "'"; ;
|
|
|
2358
|
+ }
|
|
|
2359
|
+ }
|
|
|
2360
|
+ //
|
|
2308
|
2361
|
}
|
|
2309
|
2362
|
if (source > 0)//工单来源
|
|
2310
|
2363
|
{
|
|
|
@@ -4214,26 +4267,34 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4214
|
4267
|
{
|
|
4215
|
4268
|
if (deptmodel != null)
|
|
4216
|
4269
|
{
|
|
4217
|
|
- if (deptmodel.F_Layer == 2)
|
|
4218
|
|
- {
|
|
4219
|
|
- Model.T_Sys_UserAccount userModel = sysUserAccountBll .GetModelList(" F_DeptId=" + deptmodel.F_DeptId + " and F_RoleId=60 ").FirstOrDefault();
|
|
4220
|
|
- if (userModel != null)
|
|
4221
|
|
- return userModel;
|
|
4222
|
|
- else
|
|
4223
|
|
- {
|
|
4224
|
|
- var dept = departmentBLL.GetModel(deptmodel.F_ParentId);
|
|
4225
|
|
- if (dept != null)
|
|
4226
|
|
- {
|
|
4227
|
|
- Model.T_Sys_UserAccount userModel1 = sysUserAccountBll.GetModelList(" F_DeptId=" + dept.F_DeptId + " and F_RoleId=62 ").FirstOrDefault();
|
|
4228
|
|
- return userModel1;
|
|
4229
|
|
- }
|
|
4230
|
|
- }
|
|
4231
|
|
- }
|
|
4232
|
|
- if (deptmodel.F_Layer == 1)
|
|
4233
|
|
- {
|
|
4234
|
|
- Model.T_Sys_UserAccount userModel = sysUserAccountBll.GetModelList(" F_DeptId=" + deptmodel.F_DeptId + " and F_RoleId=62 ").FirstOrDefault();
|
|
|
4270
|
+ Model.T_Sys_UserAccount userModel = sysUserAccountBll.GetModelList(" F_DeptId=" + deptmodel.F_DeptId + " and F_RoleId=60 ").FirstOrDefault();
|
|
|
4271
|
+ if (userModel != null)
|
|
4235
|
4272
|
return userModel;
|
|
|
4273
|
+ else
|
|
|
4274
|
+ {
|
|
|
4275
|
+ Model.T_Sys_UserAccount userModel1 = sysUserAccountBll.GetModelList(" F_DeptId=" + deptmodel.F_DeptId + " and F_RoleId=62 ").FirstOrDefault();
|
|
|
4276
|
+ return userModel1;
|
|
4236
|
4277
|
}
|
|
|
4278
|
+ //if (deptmodel.F_Layer == 2)
|
|
|
4279
|
+ //{
|
|
|
4280
|
+ // Model.T_Sys_UserAccount userModel = sysUserAccountBll.GetModelList(" F_DeptId=" + deptmodel.F_DeptId + " and F_RoleId=60 ").FirstOrDefault();
|
|
|
4281
|
+ // if (userModel != null)
|
|
|
4282
|
+ // return userModel;
|
|
|
4283
|
+ // else
|
|
|
4284
|
+ // {
|
|
|
4285
|
+ // var dept = departmentBLL.GetModel(deptmodel.F_ParentId);
|
|
|
4286
|
+ // if (dept != null)
|
|
|
4287
|
+ // {
|
|
|
4288
|
+ // Model.T_Sys_UserAccount userModel1 = sysUserAccountBll.GetModelList(" F_DeptId=" + dept.F_DeptId + " and F_RoleId=62 ").FirstOrDefault();
|
|
|
4289
|
+ // return userModel1;
|
|
|
4290
|
+ // }
|
|
|
4291
|
+ // }
|
|
|
4292
|
+ //}
|
|
|
4293
|
+ //if (deptmodel.F_Layer == 1)
|
|
|
4294
|
+ //{
|
|
|
4295
|
+ // Model.T_Sys_UserAccount userModel = sysUserAccountBll.GetModelList(" F_DeptId=" + deptmodel.F_DeptId + " and F_RoleId=62 ").FirstOrDefault();
|
|
|
4296
|
+ // return userModel;
|
|
|
4297
|
+ //}
|
|
4237
|
4298
|
}
|
|
4238
|
4299
|
else
|
|
4239
|
4300
|
{
|
|
|
@@ -4419,41 +4480,41 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4419
|
4480
|
AddLog(modlelist.F_ID, 0, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, overtime, sms);
|
|
4420
|
4481
|
string opt = "";
|
|
4421
|
4482
|
|
|
4422
|
|
- if (dapt != 0)
|
|
4423
|
|
- {
|
|
4424
|
|
- if (dapt == 11)
|
|
|
4483
|
+ //if (dapt != 0)
|
|
|
4484
|
+ //{
|
|
|
4485
|
+ if (CirculMarket(ua.F_DeptId,11))
|
|
4425
|
4486
|
{
|
|
4426
|
4487
|
nextda = 37;
|
|
4427
|
4488
|
opt = "流转市场管理科";
|
|
4428
|
4489
|
}
|
|
4429
|
|
- else if (dapt == 14)
|
|
|
4490
|
+ else if (CirculMarket(ua.F_DeptId, 14))
|
|
4430
|
4491
|
{
|
|
4431
|
4492
|
nextda = 57;
|
|
4432
|
4493
|
opt = "流转营销管理处";
|
|
4433
|
4494
|
}
|
|
4434
|
|
- else if (dapt == 15)
|
|
|
4495
|
+ else if (CirculMarket(ua.F_DeptId, 15))
|
|
4435
|
4496
|
{
|
|
4436
|
4497
|
nextda = 74;
|
|
4437
|
4498
|
opt = "流转策划推广";
|
|
4438
|
4499
|
}
|
|
4439
|
|
- else if (dapt == 16)
|
|
|
4500
|
+ else if (CirculMarket(ua.F_DeptId, 16))
|
|
4440
|
4501
|
{
|
|
4441
|
4502
|
nextda = 88;
|
|
4442
|
4503
|
opt = "流转销售部";
|
|
4443
|
4504
|
}
|
|
4444
|
|
- else if (dapt == 18)
|
|
|
4505
|
+ else if (CirculMarket(ua.F_DeptId, 18))
|
|
4445
|
4506
|
{
|
|
4446
|
4507
|
nextda = 268;
|
|
4447
|
4508
|
opt = "流转车用尿素";
|
|
4448
|
4509
|
|
|
4449
|
4510
|
}
|
|
4450
|
4511
|
|
|
4451
|
|
- else if (dapt == 20)
|
|
|
4512
|
+ else if (CirculMarket(ua.F_DeptId, 20))
|
|
4452
|
4513
|
{
|
|
4453
|
4514
|
nextda = 295;
|
|
4454
|
4515
|
opt = "流转新乡黑科质检";
|
|
4455
|
4516
|
}
|
|
4456
|
|
- else if (dapt == 332)
|
|
|
4517
|
+ else if (CirculMarket(ua.F_DeptId, 332))
|
|
4457
|
4518
|
{
|
|
4458
|
4519
|
nextda = 339;
|
|
4459
|
4520
|
opt = "流转营销管理处";
|
|
|
@@ -4465,7 +4526,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4465
|
4526
|
nextda = ua.F_DeptId;
|
|
4466
|
4527
|
opt = "流转" + deptname;
|
|
4467
|
4528
|
}
|
|
4468
|
|
- }
|
|
|
4529
|
+ //}
|
|
4469
|
4530
|
if (nextda != 0)
|
|
4470
|
4531
|
{
|
|
4471
|
4532
|
var res = AssignWO(ua, modlelist, input, opt, "", nextda, 0, 0, 0, 0, 0, 0, "", 1);
|
|
|
@@ -4495,6 +4556,24 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4495
|
4556
|
return Error("无操作权限!");
|
|
4496
|
4557
|
}
|
|
4497
|
4558
|
}
|
|
|
4559
|
+
|
|
|
4560
|
+ /// <summary>
|
|
|
4561
|
+ /// 判断市场管理科
|
|
|
4562
|
+ /// </summary>
|
|
|
4563
|
+ /// <param name="deptid"></param>
|
|
|
4564
|
+ /// <param name="pdeptid"></param>
|
|
|
4565
|
+ /// <returns></returns>
|
|
|
4566
|
+ public bool CirculMarket(int deptid, int pdeptid)
|
|
|
4567
|
+ {
|
|
|
4568
|
+ string sql = " F_State=1 ";
|
|
|
4569
|
+ string dptcode = departmentBLL.GetModel(pdeptid).F_DeptCode;
|
|
|
4570
|
+ string arrsql = " select F_DeptCode from T_Sys_Department where F_DeptCode LIKE '" + dptcode + "%' ";
|
|
|
4571
|
+ sql += $" and F_DeptCode in ({arrsql}) and F_DeptId=" + deptid;
|
|
|
4572
|
+ var modellist = departmentBLL.GetModelList(sql);
|
|
|
4573
|
+ if (modellist.Count > 0)
|
|
|
4574
|
+ return true;
|
|
|
4575
|
+ else return false;
|
|
|
4576
|
+ }
|
|
4498
|
4577
|
/// <summary>
|
|
4499
|
4578
|
/// 添加客户
|
|
4500
|
4579
|
/// </summary>
|
|
|
@@ -4800,54 +4879,52 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4800
|
4879
|
deptname1 = deptmodel1.F_DeptName ;
|
|
4801
|
4880
|
dapt = deptmodel1.F_ParentId;
|
|
4802
|
4881
|
}
|
|
4803
|
|
- if (dapt != 0)
|
|
4804
|
|
- {
|
|
4805
|
|
- if (dapt == 11)
|
|
|
4882
|
+ //if (dapt != 0)
|
|
|
4883
|
+ //{
|
|
|
4884
|
+ if (CirculMarket(ua.F_DeptId, 11))
|
|
4806
|
4885
|
{
|
|
4807
|
4886
|
nextda = 37;
|
|
4808
|
4887
|
opt = "流转市场管理科";
|
|
4809
|
4888
|
}
|
|
4810
|
|
- else if (dapt == 14)
|
|
|
4889
|
+ else if (CirculMarket(ua.F_DeptId, 14))
|
|
4811
|
4890
|
{
|
|
4812
|
4891
|
nextda = 57;
|
|
4813
|
4892
|
opt = "流转营销管理处";
|
|
4814
|
4893
|
}
|
|
4815
|
|
- else if (dapt == 15)
|
|
|
4894
|
+ else if (CirculMarket(ua.F_DeptId, 15))
|
|
4816
|
4895
|
{
|
|
4817
|
4896
|
nextda = 74;
|
|
4818
|
4897
|
opt = "流转策划推广";
|
|
4819
|
4898
|
}
|
|
4820
|
|
- else if (dapt == 16)
|
|
|
4899
|
+ else if (CirculMarket(ua.F_DeptId, 16))
|
|
4821
|
4900
|
{
|
|
4822
|
4901
|
nextda = 88;
|
|
4823
|
4902
|
opt = "流转销售部";
|
|
4824
|
4903
|
}
|
|
4825
|
|
- else if (dapt == 18)
|
|
|
4904
|
+ else if (CirculMarket(ua.F_DeptId, 18))
|
|
4826
|
4905
|
{
|
|
4827
|
4906
|
nextda = 268;
|
|
4828
|
4907
|
opt = "流转车用尿素";
|
|
4829
|
4908
|
|
|
4830
|
4909
|
}
|
|
4831
|
4910
|
|
|
4832
|
|
- else if (dapt == 20)
|
|
|
4911
|
+ else if (CirculMarket(ua.F_DeptId, 20))
|
|
4833
|
4912
|
{
|
|
4834
|
4913
|
nextda = 295;
|
|
4835
|
4914
|
opt = "流转新乡黑科质检";
|
|
4836
|
4915
|
}
|
|
4837
|
|
- else if (dapt == 332)
|
|
|
4916
|
+ else if (CirculMarket(ua.F_DeptId, 332))
|
|
4838
|
4917
|
{
|
|
4839
|
4918
|
nextda = 339;
|
|
4840
|
4919
|
opt = "流转营销管理处";
|
|
4841
|
4920
|
|
|
4842
|
|
-
|
|
4843
|
4921
|
}
|
|
4844
|
4922
|
else if (ua.F_DeptId == 17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
|
|
4845
|
4923
|
{
|
|
4846
|
4924
|
nextda = ua.F_DeptId;
|
|
4847
|
4925
|
opt = "流转" + deptname1;
|
|
4848
|
4926
|
}
|
|
4849
|
|
-
|
|
4850
|
|
- }
|
|
|
4927
|
+ //}
|
|
4851
|
4928
|
if (nextda != 0)
|
|
4852
|
4929
|
{
|
|
4853
|
4930
|
var res = AssignWO(ua, model, input, opt, "", nextda, 0, model.F_limit, 0,0,0,0,"",1);
|
|
|
@@ -6066,7 +6143,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
6066
|
6143
|
else if (deptmodel.F_DeptId == 12)
|
|
6067
|
6144
|
{
|
|
6068
|
6145
|
inputs.F_IsVisit = isvisit.ToString();
|
|
6069
|
|
- inputs.F_ZL_CJ_IsRecord = deptment.IsRecord;//质量管理科-抽检-未备案、已备案
|
|
|
6146
|
+ inputs.F_ZL_CJ_IsRecord = deptment.IsRecord;//质量管理科-抽检-未备案、已备案
|
|
6070
|
6147
|
inputs.F_ZL_ClaimAmount = deptment.ClaimAmount;// 质量管理科-索赔金额(单位元,对应责任单位)
|
|
6071
|
6148
|
}
|
|
6072
|
6149
|
}
|
|
|
@@ -7640,8 +7717,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
7640
|
7717
|
/// </summary>
|
|
7641
|
7718
|
public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, string F_Files, int clbm = 0, int clid = 0, int overtime = 0, int sms = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0, string creat = "",int isbl=0)
|
|
7642
|
7719
|
{
|
|
7643
|
|
- if (model.F_limit > 0)
|
|
7644
|
|
- overtime = model.F_limit;
|
|
|
7720
|
+ #region 系统升级派单时限可修改2021/12/24
|
|
|
7721
|
+ //if (model.F_limit > 0)
|
|
|
7722
|
+ // overtime = model.F_limit;
|
|
|
7723
|
+ #endregion
|
|
7645
|
7724
|
string smscont = "";
|
|
7646
|
7725
|
if (model.F_Type == "1")
|
|
7647
|
7726
|
{
|