|
|
@@ -1441,7 +1441,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1441
|
1441
|
/// </summary>
|
|
1442
|
1442
|
public bool Approval(long orderid, string AuditCont, Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, float overtime = 0, int sms = -1, int IsAudit = 0, int AuditState = 0)
|
|
1443
|
1443
|
{
|
|
1444
|
|
- bool res = true;
|
|
|
1444
|
+ int res = 1;
|
|
1445
|
1445
|
string touser = ""; string tousername = "";
|
|
1446
|
1446
|
string opt = "审核";
|
|
1447
|
1447
|
string deptname = "";
|
|
|
@@ -1495,7 +1495,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1495
|
1495
|
var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:同意上报" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.reaudit, user.F_UserCode, user.F_DeptId, nowUser, overtime, sms);
|
|
1496
|
1496
|
var uaid = 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, nowUser, overtime, sms);
|
|
1497
|
1497
|
if (userid <= 0 || uaid <= 0)
|
|
1498
|
|
- res = false;
|
|
|
1498
|
+ res = 0;
|
|
1499
|
1499
|
else
|
|
1500
|
1500
|
{
|
|
1501
|
1501
|
if (sms == 1 && !string.IsNullOrEmpty(user.F_Mobile))
|
|
|
@@ -1509,7 +1509,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1509
|
1509
|
opt = "驳回修订";
|
|
1510
|
1510
|
var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:驳回修订" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.reback, toussers, 0, nowUser, overtime, sms);
|
|
1511
|
1511
|
if (userid <= 0)
|
|
1512
|
|
- res = false;
|
|
|
1512
|
+ res = 0;
|
|
1513
|
1513
|
}
|
|
1514
|
1514
|
else
|
|
1515
|
1515
|
{
|
|
|
@@ -1517,7 +1517,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1517
|
1517
|
wostate = 11;
|
|
1518
|
1518
|
var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:强制结案" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.visit, "", 0, nowUser, overtime, sms);
|
|
1519
|
1519
|
if (userid <= 0)
|
|
1520
|
|
- res = false;
|
|
|
1520
|
+ res = 0;
|
|
1521
|
1521
|
}
|
|
1522
|
1522
|
}
|
|
1523
|
1523
|
else
|
|
|
@@ -1546,8 +1546,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1546
|
1546
|
opt = "同意上报";
|
|
1547
|
1547
|
var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:同意上报" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.reaudit, "", 0, nowUser, overtime, sms);
|
|
1548
|
1548
|
res = GetDaQucirCulation(AuditCont, nowUser, DateTime.Now.ToString(), model.F_ID, true);
|
|
1549
|
|
- if (userid <= 0 || !res)
|
|
1550
|
|
- res = false;
|
|
|
1549
|
+ if (userid <= 0 || res==0)
|
|
|
1550
|
+ res = 0;
|
|
1551
|
1551
|
wostate = 1;
|
|
1552
|
1552
|
woflag = 9;
|
|
1553
|
1553
|
}
|
|
|
@@ -1556,7 +1556,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1556
|
1556
|
opt = "驳回修订";
|
|
1557
|
1557
|
var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:驳回修订" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.reback, toussers, 0, nowUser, overtime, sms);
|
|
1558
|
1558
|
if (userid <= 0)
|
|
1559
|
|
- res = false;
|
|
|
1559
|
+ res = 0;
|
|
1560
|
1560
|
wostate = 16;
|
|
1561
|
1561
|
}
|
|
1562
|
1562
|
else
|
|
|
@@ -1564,30 +1564,40 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1564
|
1564
|
opt = "强制结案";
|
|
1565
|
1565
|
var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:强制结案" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.visit, "", 0, nowUser, overtime, sms);
|
|
1566
|
1566
|
if (userid <= 0)
|
|
1567
|
|
- res = false;
|
|
|
1567
|
+ res = 0;
|
|
1568
|
1568
|
wostate = 11;
|
|
1569
|
1569
|
}
|
|
1570
|
1570
|
|
|
1571
|
1571
|
}
|
|
1572
|
1572
|
else
|
|
1573
|
1573
|
{
|
|
1574
|
|
- res = false;
|
|
|
1574
|
+ res = 0;
|
|
1575
|
1575
|
}
|
|
1576
|
1576
|
}
|
|
1577
|
1577
|
}
|
|
1578
|
1578
|
#endregion
|
|
1579
|
|
- if (res)
|
|
|
1579
|
+ if (res>0)
|
|
1580
|
1580
|
{
|
|
1581
|
|
- model.F_State = wostate;
|
|
1582
|
|
- if (woflag == 9)
|
|
|
1581
|
+ if (res == 1)
|
|
1583
|
1582
|
{
|
|
1584
|
|
- model.F_State2 = 0;
|
|
|
1583
|
+ model.F_State = wostate;
|
|
|
1584
|
+ //if (woflag == 9)
|
|
|
1585
|
+ //{
|
|
|
1586
|
+ // model.F_State2 = 0;
|
|
|
1587
|
+ //}
|
|
|
1588
|
+ //else
|
|
|
1589
|
+ //{
|
|
|
1590
|
+ // model.F_State2 = wostate;
|
|
|
1591
|
+ //}
|
|
|
1592
|
+ model.F_State2 = wostate;
|
|
|
1593
|
+ model.F_Flag = woflag;
|
|
1585
|
1594
|
}
|
|
1586
|
|
- else
|
|
|
1595
|
+ else if (res == 2)
|
|
1587
|
1596
|
{
|
|
|
1597
|
+ model.F_State = wostate;
|
|
1588
|
1598
|
model.F_State2 = wostate;
|
|
|
1599
|
+ model.F_Flag = 3;
|
|
1589
|
1600
|
}
|
|
1590
|
|
- model.F_Flag = woflag;
|
|
1591
|
1601
|
//处理内容
|
|
1592
|
1602
|
if (!string.IsNullOrEmpty(AuditCont))
|
|
1593
|
1603
|
model.F_AuditCont += AuditCont + ";";
|
|
|
@@ -1667,7 +1677,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1667
|
1677
|
/// <param name="ua"></param>
|
|
1668
|
1678
|
/// <param name="time"></param>
|
|
1669
|
1679
|
/// <param name="id"></param>
|
|
1670
|
|
- public bool GetDaQucirCulation(string AuditCont, Model.T_Sys_UserAccount ua, string time, long id, bool istrue)
|
|
|
1680
|
+ public int GetDaQucirCulation(string AuditCont, Model.T_Sys_UserAccount ua, string time, long id, bool istrue)
|
|
1671
|
1681
|
{
|
|
1672
|
1682
|
DateTime times = DateTime.Parse(time).AddHours(24);
|
|
1673
|
1683
|
Model.T_Wo_WorkOrder model = workOrder.GetModel(id);
|
|
|
@@ -1730,8 +1740,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1730
|
1740
|
{
|
|
1731
|
1741
|
nextda = 422;
|
|
1732
|
1742
|
opt = "流转营销中心市场科";
|
|
1733
|
|
- //nextda = 295;
|
|
1734
|
|
- //opt = "流转新乡黑科质检";
|
|
|
1743
|
+ nextda2 = 295;
|
|
|
1744
|
+ opt2 = "流转新乡黑科质检";
|
|
1735
|
1745
|
|
|
1736
|
1746
|
|
|
1737
|
1747
|
}
|
|
|
@@ -1759,18 +1769,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1759
|
1769
|
if (ro.F_RoleCode == "DQJL")
|
|
1760
|
1770
|
{
|
|
1761
|
1771
|
cont = "大区经理已审批:" + AuditCont + "," + opt;
|
|
1762
|
|
- //if (!string.IsNullOrEmpty(opt2))
|
|
1763
|
|
- //{
|
|
1764
|
|
- // cont2 = "大区经理已审批: " + AuditCont + "," + opt2;
|
|
1765
|
|
- //}
|
|
|
1772
|
+ if (!string.IsNullOrEmpty(opt2))
|
|
|
1773
|
+ {
|
|
|
1774
|
+ cont2 = "大区经理已审批: " + AuditCont + "," + opt2;
|
|
|
1775
|
+ }
|
|
1766
|
1776
|
}
|
|
1767
|
1777
|
else
|
|
1768
|
1778
|
{
|
|
1769
|
1779
|
cont = "分公司经理已审批:" + AuditCont + "," + opt;
|
|
1770
|
|
- //if (!string.IsNullOrEmpty(opt2))
|
|
1771
|
|
- //{
|
|
1772
|
|
- // cont2 = "分公司经理已审批: " + AuditCont + "," + opt2;
|
|
1773
|
|
- //}
|
|
|
1780
|
+ if (!string.IsNullOrEmpty(opt2))
|
|
|
1781
|
+ {
|
|
|
1782
|
+ cont2 = "分公司经理已审批: " + AuditCont + "," + opt2;
|
|
|
1783
|
+ }
|
|
1774
|
1784
|
}
|
|
1775
|
1785
|
}
|
|
1776
|
1786
|
else
|
|
|
@@ -1778,18 +1788,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1778
|
1788
|
if (ro.F_RoleCode == "DQJL")
|
|
1779
|
1789
|
{
|
|
1780
|
1790
|
cont = "大区经理未审批" + opt;
|
|
1781
|
|
- //if (!string.IsNullOrEmpty(opt2))
|
|
1782
|
|
- //{
|
|
1783
|
|
- // cont2 = "大区经理未审批" + opt2;
|
|
1784
|
|
- //}
|
|
|
1791
|
+ if (!string.IsNullOrEmpty(opt2))
|
|
|
1792
|
+ {
|
|
|
1793
|
+ cont2 = "大区经理未审批" + opt2;
|
|
|
1794
|
+ }
|
|
1785
|
1795
|
}
|
|
1786
|
1796
|
else
|
|
1787
|
1797
|
{
|
|
1788
|
1798
|
cont = "分公司经理未审批" + opt;
|
|
1789
|
|
- //if (!string.IsNullOrEmpty(opt2))
|
|
1790
|
|
- //{
|
|
1791
|
|
- // cont2 = "分公司经理未审批" + opt2;
|
|
1792
|
|
- //}
|
|
|
1799
|
+ if (!string.IsNullOrEmpty(opt2))
|
|
|
1800
|
+ {
|
|
|
1801
|
+ cont2 = "分公司经理未审批" + opt2;
|
|
|
1802
|
+ }
|
|
1793
|
1803
|
}
|
|
1794
|
1804
|
}
|
|
1795
|
1805
|
if (nextda != 0)
|
|
|
@@ -1799,18 +1809,25 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1799
|
1809
|
// model.F_State2 = (int)EnumWorkOrderState.finish;
|
|
1800
|
1810
|
// model.F_Flag = 1;
|
|
1801
|
1811
|
//}
|
|
1802
|
|
- model.F_Flag = 9;
|
|
1803
|
|
- var res = AssignWO(ua, model, Input[0], cont, "", nextda, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl,3,9);
|
|
1804
|
|
- //if (nextda2 != 0)
|
|
1805
|
|
- //{
|
|
1806
|
|
- // model.F_Flag = 3;
|
|
1807
|
|
- // var res2 = AssignWO(ua, model, Input[0], cont2, "", nextda2, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl, 2);
|
|
1808
|
|
- //}
|
|
1809
|
|
- return res;
|
|
|
1812
|
+
|
|
|
1813
|
+ if (nextda2 != 0)
|
|
|
1814
|
+ {
|
|
|
1815
|
+ model.F_Flag = 3;
|
|
|
1816
|
+ var res= AssignWO(ua, model, Input[0], cont, "", nextda, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl, 1, 3);
|
|
|
1817
|
+ var res2 = AssignWO(ua, model, Input[0], cont2, "", nextda2, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl, 2);
|
|
|
1818
|
+ return 2;
|
|
|
1819
|
+ }
|
|
|
1820
|
+ else
|
|
|
1821
|
+ {
|
|
|
1822
|
+ model.F_Flag = 9;
|
|
|
1823
|
+ var res = AssignWO(ua, model, Input[0], cont, "", nextda, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl, 3, 9);
|
|
|
1824
|
+ return 1;
|
|
|
1825
|
+ }
|
|
|
1826
|
+
|
|
1810
|
1827
|
}
|
|
1811
|
1828
|
else
|
|
1812
|
1829
|
{
|
|
1813
|
|
- return false;
|
|
|
1830
|
+ return 0;
|
|
1814
|
1831
|
}
|
|
1815
|
1832
|
|
|
1816
|
1833
|
}
|
|
|
@@ -2617,7 +2634,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2617
|
2634
|
{
|
|
2618
|
2635
|
foreach (var item in itemnext2)
|
|
2619
|
2636
|
{
|
|
2620
|
|
- if (item.F_WoState != 10)
|
|
|
2637
|
+ if (item.F_WoState != 11)
|
|
2621
|
2638
|
flag = item.F_Type;
|
|
2622
|
2639
|
}
|
|
2623
|
2640
|
}
|
|
|
@@ -5726,7 +5743,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5726
|
5743
|
else
|
|
5727
|
5744
|
{
|
|
5728
|
5745
|
|
|
5729
|
|
- int dapt = 0, nextda = 0;
|
|
|
5746
|
+ int dapt = 0, nextda = 0, nextda2=0;
|
|
5730
|
5747
|
var deptmodel1 = departmentBLL.GetModel(ua.F_DeptId);
|
|
5731
|
5748
|
string deptneme = "";
|
|
5732
|
5749
|
if (deptmodel1 != null)
|
|
|
@@ -5735,7 +5752,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5735
|
5752
|
deptneme = deptmodel1.F_DeptName;
|
|
5736
|
5753
|
}
|
|
5737
|
5754
|
AddLog(modlelist.F_ID, 0, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, overtime, sms);
|
|
5738
|
|
- string opt = "";
|
|
|
5755
|
+ string opt = "",opt2="";
|
|
5739
|
5756
|
|
|
5740
|
5757
|
//if (dapt != 0)
|
|
5741
|
5758
|
//{
|
|
|
@@ -5770,8 +5787,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5770
|
5787
|
{
|
|
5771
|
5788
|
nextda = 422;
|
|
5772
|
5789
|
opt = "流转营销中心市场科";
|
|
5773
|
|
- //nextda = 295;
|
|
5774
|
|
- //opt = "流转新乡黑科质检";
|
|
|
5790
|
+ nextda2 = 295;
|
|
|
5791
|
+ opt2 = "流转新乡黑科质检";
|
|
5775
|
5792
|
}
|
|
5776
|
5793
|
else if (CirculMarket(ua.F_DeptId, 332))
|
|
5777
|
5794
|
{
|
|
|
@@ -5788,14 +5805,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5788
|
5805
|
//}
|
|
5789
|
5806
|
if (nextda != 0)
|
|
5790
|
5807
|
{
|
|
5791
|
|
- modlelist.F_Flag = 9;
|
|
5792
|
|
- modlelist.F_State = 1;
|
|
5793
|
|
- modlelist.F_State2 = 0;
|
|
5794
|
|
- var res = AssignWO(ua, modlelist, input, opt, "", nextda, 0, 0, 0, 0, 0, 0, "", 1,3,9);
|
|
5795
|
|
- if (res)
|
|
5796
|
|
- return Success("添加成功");
|
|
|
5808
|
+ if (nextda2 != 0)
|
|
|
5809
|
+ {
|
|
|
5810
|
+ modlelist.F_Flag = 3;
|
|
|
5811
|
+ AssignWO(ua, modlelist, input, opt, "", nextda, 0, 0, 0, 0, 0, 0, "", 1, 1, 3);
|
|
|
5812
|
+ var res2 = AssignWO(ua, modlelist, input, opt2, "", nextda2, 0, 0, 0, 0, 0, 0, "", 1, 2,3);
|
|
|
5813
|
+ }
|
|
5797
|
5814
|
else
|
|
5798
|
|
- return Error("流转失败!");
|
|
|
5815
|
+ {
|
|
|
5816
|
+ modlelist.F_Flag = 9;
|
|
|
5817
|
+ modlelist.F_State = 1;
|
|
|
5818
|
+ modlelist.F_State2 = 1;
|
|
|
5819
|
+ var res = AssignWO(ua, modlelist, input, opt, "", nextda, 0, 0, 0, 0, 0, 0, "", 1, 3, 9);
|
|
|
5820
|
+ }
|
|
|
5821
|
+ return Success("添加成功");
|
|
5799
|
5822
|
}
|
|
5800
|
5823
|
else
|
|
5801
|
5824
|
{
|
|
|
@@ -6051,7 +6074,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
6051
|
6074
|
if (model == null)
|
|
6052
|
6075
|
return Error("查询不到此工单!");
|
|
6053
|
6076
|
|
|
6054
|
|
- if (ua.F_UserCode != "8000" & ua.F_UserCode != "9000" & ua.F_UserCode != "8003" & ua.F_UserCode != "8002" & ua.F_WorkNumber!= "9000")
|
|
|
6077
|
+ if (ua.F_UserCode != "8000" & ua.F_UserCode != "9000" & ua.F_UserCode != "8003" & ua.F_UserCode != "8002" & ua.F_WorkNumber != "9000")
|
|
6055
|
6078
|
{
|
|
6056
|
6079
|
|
|
6057
|
6080
|
if (ro != null)
|
|
|
@@ -6064,16 +6087,30 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
6064
|
6087
|
}
|
|
6065
|
6088
|
}
|
|
6066
|
6089
|
}
|
|
6067
|
|
- if (model.F_State == 2)
|
|
|
6090
|
+ if ((model.F_Type == "2" || model.F_Type == "5") && (input.F_Type == 2 || input.F_Type == 5))
|
|
6068
|
6091
|
{
|
|
6069
|
|
- return Error("此工单已接单不能修改!");
|
|
6070
|
6092
|
}
|
|
6071
|
|
- else if (model.F_State == 11 || model.F_State == 10)
|
|
|
6093
|
+ else
|
|
6072
|
6094
|
{
|
|
6073
|
|
- return Error("此工单已处理不能修改!");
|
|
|
6095
|
+ if (model.F_State == 2)
|
|
|
6096
|
+ {
|
|
|
6097
|
+ return Error("此工单已接单不能修改!");
|
|
|
6098
|
+ }
|
|
|
6099
|
+ else if (model.F_State == 11 || model.F_State == 10)
|
|
|
6100
|
+ {
|
|
|
6101
|
+ return Error("此工单已处理不能修改!");
|
|
|
6102
|
+ }
|
|
6074
|
6103
|
}
|
|
6075
|
6104
|
}
|
|
6076
|
6105
|
|
|
|
6106
|
+ if ((model.F_Type == "2" || model.F_Type == "5") && (input.F_Type == 2 || input.F_Type == 5))
|
|
|
6107
|
+ {
|
|
|
6108
|
+ }
|
|
|
6109
|
+ else
|
|
|
6110
|
+ {
|
|
|
6111
|
+ return Error("此工单类型不能修改!");
|
|
|
6112
|
+ }
|
|
|
6113
|
+
|
|
6077
|
6114
|
if (!string.IsNullOrEmpty(input.F_CustomerID))
|
|
6078
|
6115
|
{
|
|
6079
|
6116
|
var Customer = cusbll.GetModel(input.F_CustomerID.Trim());
|
|
|
@@ -6134,7 +6171,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
6134
|
6171
|
else
|
|
6135
|
6172
|
{
|
|
6136
|
6173
|
string deptname1 = "";
|
|
6137
|
|
- int dapt = 0, nextda = 0; string opt = "";
|
|
|
6174
|
+ int dapt = 0, nextda = 0, nextda2 = 0; string opt = "", opt2 = "";
|
|
6138
|
6175
|
var deptmodel1 = departmentBLL.GetModel(ua.F_DeptId);
|
|
6139
|
6176
|
if (deptmodel1 != null)
|
|
6140
|
6177
|
{
|
|
|
@@ -6174,8 +6211,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
6174
|
6211
|
{
|
|
6175
|
6212
|
nextda = 422;
|
|
6176
|
6213
|
opt = "流转营销中心市场科";
|
|
6177
|
|
- //nextda = 295;
|
|
6178
|
|
- //opt = "流转新乡黑科质检";
|
|
|
6214
|
+ nextda2 = 295;
|
|
|
6215
|
+ opt2 = "流转新乡黑科质检";
|
|
6179
|
6216
|
}
|
|
6180
|
6217
|
else if (CirculMarket(ua.F_DeptId, 332))
|
|
6181
|
6218
|
{
|
|
|
@@ -6191,11 +6228,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
6191
|
6228
|
//}
|
|
6192
|
6229
|
if (nextda != 0)
|
|
6193
|
6230
|
{
|
|
6194
|
|
- var res = AssignWO(ua, model, input, opt, "", nextda, 0, model.F_limit, 0, 0, 0, 0, "",1,1,9);
|
|
6195
|
|
- if (res)
|
|
6196
|
|
- return Success("保存成功");
|
|
|
6231
|
+ if (nextda2 != 0)
|
|
|
6232
|
+ {
|
|
|
6233
|
+ model.F_Flag = 3;
|
|
|
6234
|
+ AssignWO(ua, model, input, opt, "", nextda, 0, model.F_limit, 0, 0, 0, 0, "", 1, 1, 3);
|
|
|
6235
|
+ var res2 = AssignWO(ua, model, input, opt2, "", nextda2, 0, 0, 0, 0, 0, 0, "", 1, 2, 3);
|
|
|
6236
|
+ }
|
|
6197
|
6237
|
else
|
|
6198
|
|
- return Error("流转失败!");
|
|
|
6238
|
+ {
|
|
|
6239
|
+ model.F_State = 1;
|
|
|
6240
|
+ model.F_State2 = 1;
|
|
|
6241
|
+ model.F_Flag = 9;
|
|
|
6242
|
+ var res = AssignWO(ua, model, input, opt, "", nextda, 0, model.F_limit, 0, 0, 0, 0, "", 1, 3, 9);
|
|
|
6243
|
+ }
|
|
|
6244
|
+ return Success("保存成功");
|
|
6199
|
6245
|
}
|
|
6200
|
6246
|
else
|
|
6201
|
6247
|
{
|
|
|
@@ -8054,16 +8100,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
8054
|
8100
|
{
|
|
8055
|
8101
|
#region 工单处理
|
|
8056
|
8102
|
int sms = 0;
|
|
8057
|
|
- int? woflag = model.F_Flag;
|
|
8058
|
|
- string strsql = "";
|
|
8059
|
|
- if (woflag == 1)
|
|
8060
|
|
- {
|
|
8061
|
|
- strsql = $" and F_Type in(1,3)";
|
|
8062
|
|
- }
|
|
8063
|
|
- else if (woflag == 2)
|
|
8064
|
|
- {
|
|
8065
|
|
- strsql = $" and F_Type in(2,3)";
|
|
8066
|
|
- }
|
|
|
8103
|
+ int woflag = 0;
|
|
|
8104
|
+ //string strsql = "";
|
|
|
8105
|
+ //if (woflag == 1)
|
|
|
8106
|
+ //{
|
|
|
8107
|
+ // strsql = $" and F_Type in(1,3)";
|
|
|
8108
|
+ //}
|
|
|
8109
|
+ //else if (woflag == 2)
|
|
|
8110
|
+ //{
|
|
|
8111
|
+ // strsql = $" and F_Type in(2,3)";
|
|
|
8112
|
+ //}
|
|
8067
|
8113
|
var itemlasts = itembll.GetModelList($"F_ItemType={(int)EnumItemType.deal} and F_WoID={model.F_ID}");
|
|
8068
|
8114
|
string creatuser1 = "";
|
|
8069
|
8115
|
string creatuser2 = "";
|
|
|
@@ -8071,11 +8117,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
8071
|
8117
|
{
|
|
8072
|
8118
|
foreach (var it in itemlasts)
|
|
8073
|
8119
|
{
|
|
8074
|
|
- if (it.F_WoState == 10 && it.F_Type == 1 && (it.F_Flag == 1 || it.F_Flag == 3))
|
|
|
8120
|
+ if (it.F_WoState == 10)
|
|
8075
|
8121
|
{
|
|
8076
|
8122
|
creatuser1 = it.F_CreateUser;
|
|
|
8123
|
+ woflag = Convert.ToInt32(it.F_Type);
|
|
8077
|
8124
|
}
|
|
8078
|
|
- if (it.F_WoState == 10 && it.F_Type==2 && (it.F_Flag == 2 || it.F_Flag == 3))
|
|
|
8125
|
+ if (it.F_WoState == 10 && it.F_Type==2 )
|
|
8079
|
8126
|
{
|
|
8080
|
8127
|
creatuser2 = it.F_CreateUser;
|
|
8081
|
8128
|
}
|
|
|
@@ -8105,7 +8152,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
8105
|
8152
|
string smscont = "";
|
|
8106
|
8153
|
|
|
8107
|
8154
|
if (deptid1 > 0)
|
|
8108
|
|
- AddLog((int)model.F_ID, 3, content, (int)EnumItemType.deal, 4, creatuser1, deptid1, nowUser, model.F_limit, sms, "", 0, 1);
|
|
|
8155
|
+ AddLog((int)model.F_ID, 3, content, (int)EnumItemType.deal, 4, creatuser1, deptid1, nowUser, model.F_limit, sms, "", 0, woflag);
|
|
8109
|
8156
|
if (deptid2 > 0)
|
|
8110
|
8157
|
AddLog((int)model.F_ID, 3, content, (int)EnumItemType.deal, 4, creatuser2, deptid2, nowUser, model.F_limit, sms, "", 0, 2);
|
|
8111
|
8158
|
//if (itemid > 0)
|
|
|
@@ -8835,10 +8882,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
8835
|
8882
|
//if (modellist.F_NextUser != ua.F_UserCode)
|
|
8836
|
8883
|
return Error("非接单人不可操作工单");
|
|
8837
|
8884
|
}
|
|
8838
|
|
- if (model.F_Flag == 9)
|
|
8839
|
|
- {
|
|
8840
|
|
- return Error("操作失败!");
|
|
8841
|
|
- }
|
|
|
8885
|
+ //if (model.F_Flag == 9)
|
|
|
8886
|
+ //{
|
|
|
8887
|
+ // return Error("操作失败!");
|
|
|
8888
|
+ //}
|
|
8842
|
8889
|
if (markdepts.Contains(ua.F_DeptId.ToString()) || qualdepts.Contains(ua.F_DeptId.ToString()))
|
|
8843
|
8890
|
{
|
|
8844
|
8891
|
input.F_ZL_ResponsibleUnit = deptment.ResponsibleUnit;// 责任单位
|
|
|
@@ -8899,13 +8946,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
8899
|
8946
|
//}
|
|
8900
|
8947
|
#endregion
|
|
8901
|
8948
|
int? zflag = 0;
|
|
8902
|
|
- if (inoutflag != 0)
|
|
|
8949
|
+ if (model.F_Flag == 9)
|
|
8903
|
8950
|
{
|
|
8904
|
|
- zflag = inoutflag;
|
|
|
8951
|
+ model.F_Flag = 1;//默认外线操作
|
|
|
8952
|
+ zflag = 1;
|
|
|
8953
|
+ Overorder(ua, model, 2, 2);
|
|
8905
|
8954
|
}
|
|
8906
|
8955
|
else
|
|
8907
|
8956
|
{
|
|
8908
|
|
- zflag = modellist.F_Type;
|
|
|
8957
|
+ if (inoutflag != 0)
|
|
|
8958
|
+ {
|
|
|
8959
|
+ zflag = inoutflag;
|
|
|
8960
|
+ }
|
|
|
8961
|
+ else
|
|
|
8962
|
+ {
|
|
|
8963
|
+ zflag = modellist.F_Type;
|
|
|
8964
|
+ }
|
|
8909
|
8965
|
}
|
|
8910
|
8966
|
var modellast = new BLL.T_Wo_WorkOrderItem_New().GetModelList($"F_WoID={ model.F_ID }and F_IsUsed=0 and (F_CreateUser={ua.F_UserCode} or F_NextUser like '%{ua.F_UserCode}%') order by F_ID desc ").FirstOrDefault();
|
|
8911
|
8967
|
if (model.F_State == 10 && model.F_State2 == 10)
|
|
|
@@ -9903,13 +9959,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
9903
|
9959
|
#region 向上一级操作人员推送消息
|
|
9904
|
9960
|
if (!string.IsNullOrWhiteSpace(touser) && touser != nowUser.F_UserCode)
|
|
9905
|
9961
|
{//排除上一级指派人是自己
|
|
9906
|
|
- sendsysmsg(model, nowUser, touser, 0, opt);
|
|
9907
|
|
- // var lastUser = sysUserAccountBll.GetModel(touser);
|
|
9908
|
|
- //if (lastUser != null && !string.IsNullOrEmpty(lastUser.F_WxOpenId))
|
|
9909
|
|
- // sendwxmsg(model, lastUser.F_WxOpenId, nowUser, opt);
|
|
|
9962
|
+ sendsysmsg(model, nowUser, touser, 0, opt);
|
|
9910
|
9963
|
}
|
|
9911
|
|
- // if (!string.IsNullOrEmpty(model.F_WxOpenId))
|
|
9912
|
|
- // sendwxmsg(model, model.F_WxOpenId, nowUser, model.F_DealContent );
|
|
|
9964
|
+
|
|
9913
|
9965
|
#endregion
|
|
9914
|
9966
|
#endregion
|
|
9915
|
9967
|
return true;
|