|
|
@@ -102,7 +102,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
102
|
102
|
string Result = HttpUtility.UrlDecode(RequestString.GetQueryString("Result"));
|
|
103
|
103
|
int isopen = RequestString.GetInt("isopen", -1);//是否公开
|
|
104
|
104
|
int jianhang = RequestString.GetInt("jianhang", -1);//省平台工单
|
|
105
|
|
- int orderSign = RequestString.GetInt("orderSign", -1);
|
|
106
|
105
|
if (jianhang==4)
|
|
107
|
106
|
{
|
|
108
|
107
|
sql += " and F_InfoSource = '2580'";
|
|
|
@@ -855,6 +854,14 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
855
|
854
|
if (butt == null)
|
|
856
|
855
|
buttons.Add(ButtonGroup.turnsee());
|
|
857
|
856
|
}
|
|
|
857
|
+ if (User .F_RoleCode =="GLY")
|
|
|
858
|
+ {
|
|
|
859
|
+ var butEdit = buttons.Find(c => c.key == ButtonGroup.edit().key);
|
|
|
860
|
+ if (butEdit == null)
|
|
|
861
|
+ buttons.Add (ButtonGroup.edit());
|
|
|
862
|
+ }
|
|
|
863
|
+
|
|
|
864
|
+
|
|
858
|
865
|
|
|
859
|
866
|
dr["Buttons"] = buttons;
|
|
860
|
867
|
}
|
|
|
@@ -927,7 +934,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
927
|
934
|
int isopen = RequestString.GetInt("isopen", -1);//是否公开
|
|
928
|
935
|
if (isopen > -1)
|
|
929
|
936
|
sql += " and isnull(F_IsOpen,0) =" + isopen;
|
|
|
937
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
938
|
+ if (IsReturn > -1)
|
|
|
939
|
+ {
|
|
|
940
|
+ if (strstate == "0")
|
|
|
941
|
+ {
|
|
|
942
|
+ if (IsReturn == 1)
|
|
|
943
|
+ {
|
|
|
944
|
+ sql += " and F_IsReturn=1";
|
|
|
945
|
+ }
|
|
|
946
|
+ else
|
|
|
947
|
+ {
|
|
|
948
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
949
|
+ }
|
|
930
|
950
|
|
|
|
951
|
+ }
|
|
|
952
|
+ }
|
|
931
|
953
|
string strworkorderid = HttpUtility.UrlDecode(RequestString.GetQueryString("strworkorderid"));
|
|
932
|
954
|
if (strworkorderid.Trim() != "" && strworkorderid != "undefined")
|
|
933
|
955
|
{
|
|
|
@@ -1523,7 +1545,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1523
|
1545
|
int pageindex = 1;
|
|
1524
|
1546
|
string strpagesize = RequestString.GetQueryString("pagesize");
|
|
1525
|
1547
|
int pagesize = 10;
|
|
1526
|
|
-
|
|
|
1548
|
+
|
|
1527
|
1549
|
#region sql 语句相关处理
|
|
1528
|
1550
|
int dbtype = RequestString.GetInt("dbtype", 0);
|
|
1529
|
1551
|
if (dbdata > 0)
|
|
|
@@ -1828,7 +1850,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1828
|
1850
|
int isopen = RequestString.GetInt("isopen", -1);
|
|
1829
|
1851
|
if (isopen > -1)
|
|
1830
|
1852
|
sql += " and isnull(F_IsOpen,0) =" + isopen;
|
|
|
1853
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
1854
|
+ if (IsReturn > -1)
|
|
|
1855
|
+ {
|
|
|
1856
|
+ if (strstate == "0")
|
|
|
1857
|
+ {
|
|
|
1858
|
+ if (IsReturn == 1)
|
|
|
1859
|
+ {
|
|
|
1860
|
+ sql += " and F_IsReturn=1";
|
|
|
1861
|
+ }
|
|
|
1862
|
+ else
|
|
|
1863
|
+ {
|
|
|
1864
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
1865
|
+ }
|
|
1831
|
1866
|
|
|
|
1867
|
+ }
|
|
|
1868
|
+ }
|
|
1832
|
1869
|
|
|
1833
|
1870
|
if (dealstarttime.Trim() != "" && dealstarttime != "undefined")
|
|
1834
|
1871
|
{
|
|
|
@@ -2279,7 +2316,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2279
|
2316
|
|
|
2280
|
2317
|
string visitstarttime = HttpUtility.UrlDecode(RequestString.GetQueryString("visitstarttime"));//回访开始时间
|
|
2281
|
2318
|
string visitstrendtime = HttpUtility.UrlDecode(RequestString.GetQueryString("visitstrendtime"));//回访结束时间
|
|
|
2319
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
2320
|
+ if (IsReturn > -1)
|
|
|
2321
|
+ {
|
|
|
2322
|
+ if (strstate == "0")
|
|
|
2323
|
+ {
|
|
|
2324
|
+ if (IsReturn == 1)
|
|
|
2325
|
+ {
|
|
|
2326
|
+ sql += " and F_IsReturn=1";
|
|
|
2327
|
+ }
|
|
|
2328
|
+ else
|
|
|
2329
|
+ {
|
|
|
2330
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
2331
|
+ }
|
|
2282
|
2332
|
|
|
|
2333
|
+ }
|
|
|
2334
|
+ }
|
|
2283
|
2335
|
if (dealstarttime.Trim() != "" && dealstarttime != "undefined")
|
|
2284
|
2336
|
{
|
|
2285
|
2337
|
if (dealstrendtime.Trim() != "" && dealstrendtime != "undefined")
|
|
|
@@ -2968,7 +3020,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2968
|
3020
|
int db = RequestString.GetInt("db", 0);
|
|
2969
|
3021
|
int isopen = RequestString.GetInt("isopen", -1);
|
|
2970
|
3022
|
int identification = RequestString.GetInt("identification", -1);
|
|
|
3023
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
3024
|
+ if (IsReturn > -1)
|
|
|
3025
|
+ {
|
|
|
3026
|
+ if (strstate == "0")
|
|
|
3027
|
+ {
|
|
|
3028
|
+ if (IsReturn == 1)
|
|
|
3029
|
+ {
|
|
|
3030
|
+ sql += " and F_IsReturn=1";
|
|
|
3031
|
+ }
|
|
|
3032
|
+ else
|
|
|
3033
|
+ {
|
|
|
3034
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
3035
|
+ }
|
|
2971
|
3036
|
|
|
|
3037
|
+ }
|
|
|
3038
|
+ }
|
|
2972
|
3039
|
if (identification > -1)
|
|
2973
|
3040
|
{
|
|
2974
|
3041
|
sql += "and F_Identification='" + identification + "'";
|
|
|
@@ -3826,7 +3893,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3826
|
3893
|
string strpagesize = RequestString.GetQueryString("pagesize");
|
|
3827
|
3894
|
int pagesize = 10;
|
|
3828
|
3895
|
string order = "ORDER BY a.F_LimitTime";
|
|
|
3896
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
3897
|
+ if (IsReturn > -1)
|
|
|
3898
|
+ {
|
|
|
3899
|
+ if (strstate == "0")
|
|
|
3900
|
+ {
|
|
|
3901
|
+ if (IsReturn == 1)
|
|
|
3902
|
+ {
|
|
|
3903
|
+ sql += " and F_IsReturn=1";
|
|
|
3904
|
+ }
|
|
|
3905
|
+ else
|
|
|
3906
|
+ {
|
|
|
3907
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
3908
|
+ }
|
|
3829
|
3909
|
|
|
|
3910
|
+ }
|
|
|
3911
|
+ }
|
|
3830
|
3912
|
#region 模块
|
|
3831
|
3913
|
switch (strtab)
|
|
3832
|
3914
|
{
|
|
|
@@ -4755,7 +4837,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4755
|
4837
|
int pageindex = 1;
|
|
4756
|
4838
|
string strpagesize = RequestString.GetQueryString("pagesize");
|
|
4757
|
4839
|
int pagesize = 10;
|
|
|
4840
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
4841
|
+ if (IsReturn > -1)
|
|
|
4842
|
+ {
|
|
|
4843
|
+ if (strstate == "0")
|
|
|
4844
|
+ {
|
|
|
4845
|
+ if (IsReturn == 1)
|
|
|
4846
|
+ {
|
|
|
4847
|
+ sql += " and F_IsReturn=1";
|
|
|
4848
|
+ }
|
|
|
4849
|
+ else
|
|
|
4850
|
+ {
|
|
|
4851
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
4852
|
+ }
|
|
4758
|
4853
|
|
|
|
4854
|
+ }
|
|
|
4855
|
+ }
|
|
4759
|
4856
|
switch (strtab)
|
|
4760
|
4857
|
{
|
|
4761
|
4858
|
case "0"://待处理工单
|
|
|
@@ -5620,7 +5717,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5620
|
5717
|
int pageindex = 1;
|
|
5621
|
5718
|
string strpagesize = RequestString.GetQueryString("pagesize");
|
|
5622
|
5719
|
int pagesize = 10;
|
|
|
5720
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
5721
|
+ if (IsReturn > -1)
|
|
|
5722
|
+ {
|
|
|
5723
|
+ if (strstate == "0")
|
|
|
5724
|
+ {
|
|
|
5725
|
+ if (IsReturn == 1)
|
|
|
5726
|
+ {
|
|
|
5727
|
+ sql += " and F_IsReturn=1";
|
|
|
5728
|
+ }
|
|
|
5729
|
+ else
|
|
|
5730
|
+ {
|
|
|
5731
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
5732
|
+ }
|
|
5623
|
5733
|
|
|
|
5734
|
+ }
|
|
|
5735
|
+ }
|
|
5624
|
5736
|
#region 模块
|
|
5625
|
5737
|
switch (strtab)
|
|
5626
|
5738
|
{
|
|
|
@@ -7026,7 +7138,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
7026
|
7138
|
int pageindex = 1;
|
|
7027
|
7139
|
string strpagesize = RequestString.GetQueryString("pagesize");
|
|
7028
|
7140
|
int pagesize = 10;
|
|
|
7141
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
7142
|
+ if (IsReturn > -1)
|
|
|
7143
|
+ {
|
|
|
7144
|
+ if (strstate == "0")
|
|
|
7145
|
+ {
|
|
|
7146
|
+ if (IsReturn == 1)
|
|
|
7147
|
+ {
|
|
|
7148
|
+ sql += " and F_IsReturn=1";
|
|
|
7149
|
+ }
|
|
|
7150
|
+ else
|
|
|
7151
|
+ {
|
|
|
7152
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
7153
|
+ }
|
|
7029
|
7154
|
|
|
|
7155
|
+ }
|
|
|
7156
|
+ }
|
|
7030
|
7157
|
#region 坐席&调度员
|
|
7031
|
7158
|
string splituser = HttpUtility.UrlDecode(RequestString.GetQueryString("splituser"));
|
|
7032
|
7159
|
if (splituser.Trim() != "" && splituser != "undefined")
|
|
|
@@ -8376,7 +8503,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
8376
|
8503
|
|
|
8377
|
8504
|
|
|
8378
|
8505
|
int isRelease = RequestString.GetInt("isRelease", 0);
|
|
|
8506
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
8507
|
+ if (IsReturn > -1)
|
|
|
8508
|
+ {
|
|
|
8509
|
+ if (strstate == "0")
|
|
|
8510
|
+ {
|
|
|
8511
|
+ if (IsReturn == 1)
|
|
|
8512
|
+ {
|
|
|
8513
|
+ sql += " and F_IsReturn=1";
|
|
|
8514
|
+ }
|
|
|
8515
|
+ else
|
|
|
8516
|
+ {
|
|
|
8517
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
8518
|
+ }
|
|
8379
|
8519
|
|
|
|
8520
|
+ }
|
|
|
8521
|
+ }
|
|
8380
|
8522
|
if (keyid != 0)
|
|
8381
|
8523
|
{
|
|
8382
|
8524
|
sql += "and a.F_Key in(select F_ValueId from dbo.GetValueId(" + keyid + ")) ";
|
|
|
@@ -9878,11 +10020,38 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
9878
|
10020
|
|
|
9879
|
10021
|
#region 操作按钮
|
|
9880
|
10022
|
var btns = new List<ButtonGroup.button>();
|
|
9881
|
|
- string sqljb = "SELECT TOP 1 * FROM T_Bus_AssignedInfo WITH(NOLOCK) WHERE F_WorkOrderId='" + dt.Rows[0]["F_WorkOrderId"].ToString() + "' and F_State=1 and F_IsDelete=0 and F_IsSure<>3 ORDER BY F_Id DESC";
|
|
|
10023
|
+ var btnpc= new List<ButtonGroup.button>();
|
|
|
10024
|
+ string sqljb = "SELECT TOP 1 * FROM T_Bus_AssignedInfo WITH(NOLOCK) WHERE F_WorkOrderId='"
|
|
|
10025
|
+ + dt.Rows[0]["F_WorkOrderId"].ToString() + "' and F_State=1 and F_IsDelete=0 and F_IsSure<>3 ORDER BY F_Id DESC";
|
|
9882
|
10026
|
var dtjb = DbHelperSQL.Query(sqljb).Tables[0];
|
|
9883
|
10027
|
string ispd = "";
|
|
9884
|
10028
|
if (dtjb != null && dtjb.Rows.Count > 0)
|
|
|
10029
|
+ {
|
|
|
10030
|
+ var jbzx = dtjb.Rows[0];
|
|
9885
|
10031
|
ispd = dtjb.Rows[0]["F_IsNext"].ToString();
|
|
|
10032
|
+ string iszbdw = "0";
|
|
|
10033
|
+ string fmd = jbzx["F_MainDeptId"].ToString();
|
|
|
10034
|
+ string fod = jbzx["F_OtherDeptIds"] == null ? "" : jbzx["F_OtherDeptIds"].ToString();
|
|
|
10035
|
+ if (fmd == User.F_DeptId.ToString())
|
|
|
10036
|
+ { iszbdw = "1"; }
|
|
|
10037
|
+
|
|
|
10038
|
+ else if (fod != "" && fod.Split(',').Contains(User.F_DeptId.ToString()))
|
|
|
10039
|
+ {
|
|
|
10040
|
+ iszbdw = "2";
|
|
|
10041
|
+ }
|
|
|
10042
|
+ if (!(User.F_RoleCode == "WLDW" && iszbdw == "0"))
|
|
|
10043
|
+ {
|
|
|
10044
|
+ btnpc = ButtonGroup.GetButtons(dt.Rows[0]["F_WorkState"].ToString(), User.F_RoleCode.ToUpper(),
|
|
|
10045
|
+ dt.Rows[0]["F_IsResult"].ToString(), iszbdw, ispd, 0);
|
|
|
10046
|
+ }
|
|
|
10047
|
+ }
|
|
|
10048
|
+ else
|
|
|
10049
|
+ {
|
|
|
10050
|
+ btnpc = ButtonGroup.GetButtons(dt.Rows[0]["F_WorkState"].ToString(),
|
|
|
10051
|
+ User.F_RoleCode.ToUpper(), dt.Rows[0]["F_IsResult"].ToString(), "0", "", 0);
|
|
|
10052
|
+ }
|
|
|
10053
|
+
|
|
|
10054
|
+
|
|
9886
|
10055
|
if (User.F_RoleCode == "EJWLDW")
|
|
9887
|
10056
|
{
|
|
9888
|
10057
|
string sqlejjb = "SELECT TOP 1 * FROM T_Bus_AssignedInfo_Next WITH(NOLOCK) WHERE F_WorkOrderId='" + strworkorderid + "' and F_IsDelete=0 and F_MainDeptId='" + User.F_DeptId + "' order by F_Id desc";
|
|
|
@@ -9893,8 +10062,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
9893
|
10062
|
}
|
|
9894
|
10063
|
|
|
9895
|
10064
|
}
|
|
9896
|
|
- btns = ButtonGroup.GetAPPButtons(dt.Rows[0]["F_WorkState"].ToString(), User.F_RoleCode.ToUpper(), dt.Rows[0]["F_IsProResult"].ToString(), dt.Rows[0]["F_InfoSource"].ToString(), ispd);
|
|
|
10065
|
+ btns = ButtonGroup.GetAPPButtons
|
|
|
10066
|
+ (dt.Rows[0]["F_WorkState"].ToString(), User.F_RoleCode.ToUpper(), dt.Rows[0]["F_IsProResult"].ToString(),
|
|
|
10067
|
+ dt.Rows[0]["F_InfoSource"].ToString(), ispd);
|
|
|
10068
|
+
|
|
|
10069
|
+
|
|
9897
|
10070
|
|
|
|
10071
|
+
|
|
|
10072
|
+
|
|
|
10073
|
+
|
|
|
10074
|
+
|
|
9898
|
10075
|
|
|
9899
|
10076
|
|
|
9900
|
10077
|
#endregion
|
|
|
@@ -9929,7 +10106,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
9929
|
10106
|
issend,
|
|
9930
|
10107
|
isedit,
|
|
9931
|
10108
|
isnotice,
|
|
9932
|
|
- btndata = btns
|
|
|
10109
|
+ btndata = btns,
|
|
|
10110
|
+ btnpc
|
|
9933
|
10111
|
};
|
|
9934
|
10112
|
return Success("获取成功", obj);
|
|
9935
|
10113
|
}
|
|
|
@@ -10783,6 +10961,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
10783
|
10961
|
{
|
|
10784
|
10962
|
return Error("请选择反映类别");
|
|
10785
|
10963
|
}
|
|
|
10964
|
+ if(type ==0)
|
|
|
10965
|
+ return Error("请选择来电类型");
|
|
|
10966
|
+
|
|
10786
|
10967
|
if (isAutoSendOrder == "1")
|
|
10787
|
10968
|
{
|
|
10788
|
10969
|
|
|
|
@@ -10906,6 +11087,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
10906
|
11087
|
//如果选择即刻答复:是,即为直办,工单结束
|
|
10907
|
11088
|
if (isresult == 1)
|
|
10908
|
11089
|
{
|
|
|
11090
|
+ if (string.IsNullOrEmpty(result))
|
|
|
11091
|
+ return Error("请输入办结内容");
|
|
10909
|
11092
|
modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
|
|
10910
|
11093
|
modelT_Bus_WorkOrder.F_DealDeptId = User.F_DeptId;
|
|
10911
|
11094
|
modelT_Bus_WorkOrder.F_DealUser = User.F_UserCode;
|
|
|
@@ -11455,6 +11638,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
11455
|
11638
|
//如果选择即刻答复:是,即为直办,工单结束
|
|
11456
|
11639
|
if (isresult == 1)
|
|
11457
|
11640
|
{
|
|
|
11641
|
+ if (string.IsNullOrEmpty(result))
|
|
|
11642
|
+ return Error("请输入办结内容");
|
|
11458
|
11643
|
modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
|
|
11459
|
11644
|
modelT_Bus_WorkOrder.F_DealUser = User.F_UserCode;
|
|
11460
|
11645
|
modelT_Bus_WorkOrder.F_DealTime = DateTime.Now;
|
|
|
@@ -11669,7 +11854,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
11669
|
11854
|
string workcontent = RequestString.GetFormString("workcontent");
|
|
11670
|
11855
|
string maindeptids = RequestString.GetFormString("maindeptids");
|
|
11671
|
11856
|
int limittimes = RequestString.GetInt("limittimes", 0);
|
|
11672
|
|
-
|
|
|
11857
|
+ if (type == 0)
|
|
|
11858
|
+ return Error("请选择来电类型");
|
|
11673
|
11859
|
//领导批示
|
|
11674
|
11860
|
string superOpinion = RequestString.GetFormString("superOpinion");
|
|
11675
|
11861
|
lock (_MyLock)
|
|
|
@@ -11712,6 +11898,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
11712
|
11898
|
// modelT_Bus_WorkOrder.F_ComTitle = title;//标题
|
|
11713
|
11899
|
keyValuePairs.Add("F_ComContent", content);
|
|
11714
|
11900
|
// modelT_Bus_WorkOrder.F_ComContent = content;//情况摘要(投诉内容)
|
|
|
11901
|
+ if(!string .IsNullOrEmpty (files))
|
|
11715
|
11902
|
keyValuePairs.Add("F_File", files);
|
|
11716
|
11903
|
// modelT_Bus_WorkOrder.F_File = files;//附件
|
|
11717
|
11904
|
keyValuePairs.Add("F_IsProtect", isprotect);
|
|
|
@@ -11777,6 +11964,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
11777
|
11964
|
|
|
11778
|
11965
|
if (isresult == 1)
|
|
11779
|
11966
|
{
|
|
|
11967
|
+ if (string.IsNullOrEmpty(result))
|
|
|
11968
|
+ return Error("请输入办结内容");
|
|
11780
|
11969
|
keyValuePairs.Add("F_WorkState", 9);
|
|
11781
|
11970
|
modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
|
|
11782
|
11971
|
keyValuePairs.Add("F_DealDeptId", User.F_DeptId);
|
|
|
@@ -12009,7 +12198,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
12009
|
12198
|
|
|
12010
|
12199
|
#endregion
|
|
12011
|
12200
|
#region 插入操作记录
|
|
12012
|
|
- Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
|
|
|
12201
|
+ int edit = 0;
|
|
|
12202
|
+ if (modelT_Bus_WorkOrder.F_ComTitle != title || modelT_Bus_WorkOrder.F_ComContent != content)
|
|
|
12203
|
+ {
|
|
|
12204
|
+ edit = 1;
|
|
|
12205
|
+ }
|
|
|
12206
|
+ if (issubmit ==1)
|
|
|
12207
|
+ {
|
|
|
12208
|
+ edit = 1;
|
|
|
12209
|
+ }
|
|
|
12210
|
+
|
|
|
12211
|
+ Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
|
|
12013
|
12212
|
oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
12014
|
12213
|
oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
|
|
12015
|
12214
|
oper.F_CallRecordId = modelT_Bus_WorkOrder.F_CallRecordId;
|
|
|
@@ -12021,12 +12220,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
12021
|
12220
|
{
|
|
12022
|
12221
|
oper.F_Message = userinfo + " 修改并提交了工单";
|
|
12023
|
12222
|
}
|
|
12024
|
|
- if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.resubmit)//1)
|
|
|
12223
|
+ else if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.resubmit)//1)
|
|
12025
|
12224
|
{
|
|
12026
|
12225
|
oper.F_Message = userinfo + " 修改了重办工单";
|
|
12027
|
12226
|
}
|
|
12028
|
|
- if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.finish)//9)
|
|
|
12227
|
+ else if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.finish)//9)
|
|
12029
|
12228
|
{
|
|
|
12229
|
+ edit = 1;
|
|
12030
|
12230
|
oper.F_Message = userinfo + " 修改并结案了工单";
|
|
12031
|
12231
|
Task.Run(() =>
|
|
12032
|
12232
|
{
|
|
|
@@ -12039,26 +12239,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
12039
|
12239
|
{
|
|
12040
|
12240
|
System.Diagnostics.Debug.WriteLine(DateTime.Now);
|
|
12041
|
12241
|
});
|
|
12042
|
|
-
|
|
12043
|
|
- try
|
|
12044
|
|
- {
|
|
12045
|
|
- if (modelT_Bus_WorkOrder.F_InfoSource == 4606)
|
|
12046
|
|
- {
|
|
12047
|
|
- CommonHelper.pushresult(modelT_Bus_WorkOrder.F_WorkOrderId);
|
|
12048
|
|
- }
|
|
12049
|
|
- }
|
|
12050
|
|
- catch (Exception ex)
|
|
12051
|
|
- {
|
|
12052
|
|
-
|
|
12053
|
|
- // FileLog.Error("结案110工单:" + ex.ToJson()); ;
|
|
12054
|
|
- }
|
|
12055
|
12242
|
}
|
|
12056
|
12243
|
|
|
12057
|
12244
|
oper.F_CreateUser = User.F_UserCode;
|
|
12058
|
12245
|
oper.F_CreateTime = DateTime.Now;
|
|
12059
|
12246
|
oper.F_IsDelete = 0;
|
|
12060
|
|
-
|
|
|
12247
|
+ if (edit ==1)
|
|
12061
|
12248
|
operBLL.Add(oper);
|
|
|
12249
|
+ else
|
|
|
12250
|
+ LogFactory.GetLogger("修改了信息").Warn(User.F_UserCode + " 修改工单信息");
|
|
12062
|
12251
|
//Task.Run(() =>
|
|
12063
|
12252
|
//{//推送消息表
|
|
12064
|
12253
|
// if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.submit)//1)
|
|
|
@@ -12127,7 +12316,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
12127
|
12316
|
int isprotect = RequestString.GetInt("isprotect", 0);
|
|
12128
|
12317
|
int level = RequestString.GetInt("level", 0);
|
|
12129
|
12318
|
int issubmit = RequestString.GetInt("issubmit", 0);
|
|
12130
|
|
-
|
|
|
12319
|
+ if (type == 0)
|
|
|
12320
|
+ return Error("请选择来电类型");
|
|
12131
|
12321
|
Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
|
|
12132
|
12322
|
if (modelT_Bus_WorkOrder != null)
|
|
12133
|
12323
|
{
|
|
|
@@ -12170,7 +12360,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
12170
|
12360
|
// modelT_Bus_WorkOrder.F_ComTitle = title;//标题
|
|
12171
|
12361
|
keyValuePairs.Add("F_ComContent", content);
|
|
12172
|
12362
|
// modelT_Bus_WorkOrder.F_ComContent = content;//情况摘要(投诉内容)
|
|
12173
|
|
- keyValuePairs.Add("F_File", files);
|
|
|
12363
|
+ if (!string.IsNullOrEmpty(files))
|
|
|
12364
|
+ keyValuePairs.Add("F_File", files);
|
|
12174
|
12365
|
// modelT_Bus_WorkOrder.F_File = files;//附件
|
|
12175
|
12366
|
keyValuePairs.Add("F_IsProtect", isprotect);
|
|
12176
|
12367
|
// modelT_Bus_WorkOrder.F_IsProtect = isprotect;//保密方式0否1是
|
|
|
@@ -12191,6 +12382,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
12191
|
12382
|
//如果选择即刻答复:是,即为直办,工单结束
|
|
12192
|
12383
|
if (isresult == 1)
|
|
12193
|
12384
|
{
|
|
|
12385
|
+ if (string.IsNullOrEmpty(result))
|
|
|
12386
|
+ return Error("请输入办结内容");
|
|
12194
|
12387
|
keyValuePairs.Add("F_WorkState", 9);
|
|
12195
|
12388
|
modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
|
|
12196
|
12389
|
keyValuePairs.Add("F_DealDeptId", User.F_DeptId);
|
|
|
@@ -13001,6 +13194,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
13001
|
13194
|
|
|
13002
|
13195
|
|
|
13003
|
13196
|
Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
|
|
|
13197
|
+ if(modelT_Bus_WorkOrder.F_WorkState ==0&& modelT_Bus_WorkOrder.F_IsReturn ==1)
|
|
|
13198
|
+ {
|
|
|
13199
|
+ return Error("工单已回退,不能交办");
|
|
|
13200
|
+ }
|
|
13004
|
13201
|
var premodeldept = new Model.T_Sys_Department();
|
|
13005
|
13202
|
if (ispd > 0)
|
|
13006
|
13203
|
{
|
|
|
@@ -19828,8 +20025,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
19828
|
20025
|
int issatisfie = RequestString.GetInt("issatisfie", -1);//0不满意 1满意2基本满意
|
|
19829
|
20026
|
int state = RequestString.GetInt("state", 1);//0保存 1保存并下一步
|
|
19830
|
20027
|
int visitid = RequestString.GetInt("visitid", 0);
|
|
19831
|
|
-
|
|
19832
|
|
-
|
|
|
20028
|
+ int limittimes = RequestString.GetInt("limittimes", 6);
|
|
|
20029
|
+
|
|
19833
|
20030
|
string result = RequestString.GetFormString("result");//回访情况
|
|
19834
|
20031
|
int nexttype = RequestString.GetInt("nexttype", 0);//1重办 2退回重办3仅回访4已办未果
|
|
19835
|
20032
|
string cbreason = RequestString.GetFormString("cbreason");//重办原因
|
|
|
@@ -20060,12 +20257,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
20060
|
20257
|
newmodelT_Bus_AssignedInfo.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
20061
|
20258
|
|
|
20062
|
20259
|
|
|
20063
|
|
- DataTable dt = DbHelperSQL.Query("select top 6 F_OffDate from T_Sys_WorkOFFDays where F_OffState = 1 and " +
|
|
|
20260
|
+ DataTable dt = DbHelperSQL.Query("select top "+ limittimes + " F_OffDate from T_Sys_WorkOFFDays where F_OffState = 1 and " +
|
|
20064
|
20261
|
"F_OffDate> (select top 1 F_OffDate from T_Sys_WorkOFFDays where F_OffDate >= '" + DateTime .Now + "' and F_OffState = 1 order by F_OffDate asc) order by F_OffDate ").Tables[0];
|
|
20065
|
20262
|
var resdatetime = dt.Rows[5]["F_OffDate"].ToString();
|
|
20066
|
20263
|
if (!string.IsNullOrEmpty(resdatetime))
|
|
20067
|
20264
|
{
|
|
20068
|
|
- resdatetime = GetLimittime(6);
|
|
|
20265
|
+ resdatetime = GetLimittime(limittimes);
|
|
20069
|
20266
|
// resdatetime = resdatetime.Split(' ')[0] + " " + DateTime.Now.ToString("HH:mm:ss");
|
|
20070
|
20267
|
// var datatime = DateTime.Now.AddDays(6);
|
|
20071
|
20268
|
// if (Convert.ToDateTime(resdatetime) > datatime)
|
|
|
@@ -22522,6 +22719,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
22522
|
22719
|
return Error("操作失败");
|
|
22523
|
22720
|
}
|
|
22524
|
22721
|
}
|
|
|
22722
|
+ if (string.IsNullOrEmpty(result))
|
|
|
22723
|
+ return Error("请输入办结内容");
|
|
22525
|
22724
|
using (TransactionScope trans = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0, 10, 0)))
|
|
22526
|
22725
|
{
|
|
22527
|
22726
|
#region 修改工单记录
|
|
|
@@ -23875,7 +24074,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
23875
|
24074
|
|
|
23876
|
24075
|
int isprotect = RequestString.GetInt("isprotect", 0);
|
|
23877
|
24076
|
int level = RequestString.GetInt("level", 0);
|
|
23878
|
|
-
|
|
|
24077
|
+ if (type == 0)
|
|
|
24078
|
+ return Error("请选择来电类型");
|
|
23879
|
24079
|
Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
|
|
23880
|
24080
|
if (modelT_Bus_WorkOrder != null)
|
|
23881
|
24081
|
{
|
|
|
@@ -23917,7 +24117,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
23917
|
24117
|
// modelT_Bus_WorkOrder.F_ComTitle = title;//标题
|
|
23918
|
24118
|
keyValuePairs.Add("F_ComContent", content);
|
|
23919
|
24119
|
// modelT_Bus_WorkOrder.F_ComContent = content;//情况摘要(投诉内容)
|
|
23920
|
|
- keyValuePairs.Add("F_File", files);
|
|
|
24120
|
+ if (!string.IsNullOrEmpty(files))
|
|
|
24121
|
+ keyValuePairs.Add("F_File", files);
|
|
23921
|
24122
|
// modelT_Bus_WorkOrder.F_File = files;//附件
|
|
23922
|
24123
|
keyValuePairs.Add("F_File", isprotect);
|
|
23923
|
24124
|
// modelT_Bus_WorkOrder.F_IsProtect = isprotect;//保密方式0否1是
|
|
|
@@ -23935,19 +24136,27 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
23935
|
24136
|
#endregion
|
|
23936
|
24137
|
|
|
23937
|
24138
|
#region 插入操作记录
|
|
23938
|
|
- Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
|
|
23939
|
|
- oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
23940
|
|
- oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
|
|
23941
|
|
- oper.F_CallRecordId = modelT_Bus_WorkOrder.F_CallRecordId;
|
|
23942
|
|
- oper.F_File = modelT_Bus_WorkOrder.F_File;
|
|
|
24139
|
+ if (modelT_Bus_WorkOrder.F_ComTitle !=title || modelT_Bus_WorkOrder.F_ComContent !=content )
|
|
|
24140
|
+ {
|
|
|
24141
|
+ Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
|
|
|
24142
|
+ oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
|
24143
|
+ oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
|
|
|
24144
|
+ oper.F_CallRecordId = modelT_Bus_WorkOrder.F_CallRecordId;
|
|
|
24145
|
+ oper.F_File = modelT_Bus_WorkOrder.F_File;
|
|
23943
|
24146
|
|
|
23944
|
|
- string userinfo = User.depname + "(" + User.F_UserCode + ")";
|
|
23945
|
|
- oper.F_Message = userinfo + " 修改了工单基本信息";
|
|
23946
|
|
- oper.F_CreateUser = User.F_UserCode;
|
|
23947
|
|
- oper.F_CreateTime = DateTime.Now;
|
|
23948
|
|
- oper.F_IsDelete = 0;
|
|
|
24147
|
+ string userinfo = User.depname + "(" + User.F_UserCode + ")";
|
|
|
24148
|
+ oper.F_Message = userinfo + " 修改了工单基本信息";
|
|
|
24149
|
+ oper.F_CreateUser = User.F_UserCode;
|
|
|
24150
|
+ oper.F_CreateTime = DateTime.Now;
|
|
|
24151
|
+ oper.F_IsDelete = 0;
|
|
23949
|
24152
|
|
|
23950
|
|
- operBLL.Add(oper);
|
|
|
24153
|
+ operBLL.Add(oper);
|
|
|
24154
|
+ }
|
|
|
24155
|
+ else
|
|
|
24156
|
+ {
|
|
|
24157
|
+ LogFactory.GetLogger("修改了信息").Warn(User.F_UserCode + " 修改工单信息");
|
|
|
24158
|
+ }
|
|
|
24159
|
+
|
|
23951
|
24160
|
#endregion
|
|
23952
|
24161
|
|
|
23953
|
24162
|
trans.Complete();
|