|
|
@@ -102,6 +102,22 @@ 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 IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
106
|
+ if (IsReturn > -1)
|
|
|
107
|
+ {
|
|
|
108
|
+ if (strstate == "0")
|
|
|
109
|
+ {
|
|
|
110
|
+ if (IsReturn == 1)
|
|
|
111
|
+ {
|
|
|
112
|
+ sql += " and F_IsReturn=1";
|
|
|
113
|
+ }
|
|
|
114
|
+ else
|
|
|
115
|
+ {
|
|
|
116
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
117
|
+ }
|
|
|
118
|
+
|
|
|
119
|
+ }
|
|
|
120
|
+ }
|
|
105
|
121
|
if (jianhang==4)
|
|
106
|
122
|
{
|
|
107
|
123
|
sql += " and F_InfoSource = '2580'";
|
|
|
@@ -852,6 +868,14 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
852
|
868
|
if (butt == null)
|
|
853
|
869
|
buttons.Add(ButtonGroup.turnsee());
|
|
854
|
870
|
}
|
|
|
871
|
+ if (User .F_RoleCode =="GLY")
|
|
|
872
|
+ {
|
|
|
873
|
+ var butEdit = buttons.Find(c => c.key == ButtonGroup.edit().key);
|
|
|
874
|
+ if (butEdit == null)
|
|
|
875
|
+ buttons.Add (ButtonGroup.edit());
|
|
|
876
|
+ }
|
|
|
877
|
+
|
|
|
878
|
+
|
|
855
|
879
|
|
|
856
|
880
|
dr["Buttons"] = buttons;
|
|
857
|
881
|
}
|
|
|
@@ -924,7 +948,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
924
|
948
|
int isopen = RequestString.GetInt("isopen", -1);//是否公开
|
|
925
|
949
|
if (isopen > -1)
|
|
926
|
950
|
sql += " and isnull(F_IsOpen,0) =" + isopen;
|
|
|
951
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
952
|
+ if (IsReturn > -1)
|
|
|
953
|
+ {
|
|
|
954
|
+ if (strstate == "0")
|
|
|
955
|
+ {
|
|
|
956
|
+ if (IsReturn == 1)
|
|
|
957
|
+ {
|
|
|
958
|
+ sql += " and F_IsReturn=1";
|
|
|
959
|
+ }
|
|
|
960
|
+ else
|
|
|
961
|
+ {
|
|
|
962
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
963
|
+ }
|
|
927
|
964
|
|
|
|
965
|
+ }
|
|
|
966
|
+ }
|
|
928
|
967
|
string strworkorderid = HttpUtility.UrlDecode(RequestString.GetQueryString("strworkorderid"));
|
|
929
|
968
|
if (strworkorderid.Trim() != "" && strworkorderid != "undefined")
|
|
930
|
969
|
{
|
|
|
@@ -1520,7 +1559,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1520
|
1559
|
int pageindex = 1;
|
|
1521
|
1560
|
string strpagesize = RequestString.GetQueryString("pagesize");
|
|
1522
|
1561
|
int pagesize = 10;
|
|
1523
|
|
-
|
|
|
1562
|
+
|
|
1524
|
1563
|
#region sql 语句相关处理
|
|
1525
|
1564
|
int dbtype = RequestString.GetInt("dbtype", 0);
|
|
1526
|
1565
|
if (dbdata > 0)
|
|
|
@@ -1825,7 +1864,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1825
|
1864
|
int isopen = RequestString.GetInt("isopen", -1);
|
|
1826
|
1865
|
if (isopen > -1)
|
|
1827
|
1866
|
sql += " and isnull(F_IsOpen,0) =" + isopen;
|
|
|
1867
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
1868
|
+ if (IsReturn > -1)
|
|
|
1869
|
+ {
|
|
|
1870
|
+ if (strstate == "0")
|
|
|
1871
|
+ {
|
|
|
1872
|
+ if (IsReturn == 1)
|
|
|
1873
|
+ {
|
|
|
1874
|
+ sql += " and F_IsReturn=1";
|
|
|
1875
|
+ }
|
|
|
1876
|
+ else
|
|
|
1877
|
+ {
|
|
|
1878
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
1879
|
+ }
|
|
1828
|
1880
|
|
|
|
1881
|
+ }
|
|
|
1882
|
+ }
|
|
1829
|
1883
|
|
|
1830
|
1884
|
if (dealstarttime.Trim() != "" && dealstarttime != "undefined")
|
|
1831
|
1885
|
{
|
|
|
@@ -2276,7 +2330,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2276
|
2330
|
|
|
2277
|
2331
|
string visitstarttime = HttpUtility.UrlDecode(RequestString.GetQueryString("visitstarttime"));//回访开始时间
|
|
2278
|
2332
|
string visitstrendtime = HttpUtility.UrlDecode(RequestString.GetQueryString("visitstrendtime"));//回访结束时间
|
|
|
2333
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
2334
|
+ if (IsReturn > -1)
|
|
|
2335
|
+ {
|
|
|
2336
|
+ if (strstate == "0")
|
|
|
2337
|
+ {
|
|
|
2338
|
+ if (IsReturn == 1)
|
|
|
2339
|
+ {
|
|
|
2340
|
+ sql += " and F_IsReturn=1";
|
|
|
2341
|
+ }
|
|
|
2342
|
+ else
|
|
|
2343
|
+ {
|
|
|
2344
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
2345
|
+ }
|
|
2279
|
2346
|
|
|
|
2347
|
+ }
|
|
|
2348
|
+ }
|
|
2280
|
2349
|
if (dealstarttime.Trim() != "" && dealstarttime != "undefined")
|
|
2281
|
2350
|
{
|
|
2282
|
2351
|
if (dealstrendtime.Trim() != "" && dealstrendtime != "undefined")
|
|
|
@@ -2965,7 +3034,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2965
|
3034
|
int db = RequestString.GetInt("db", 0);
|
|
2966
|
3035
|
int isopen = RequestString.GetInt("isopen", -1);
|
|
2967
|
3036
|
int identification = RequestString.GetInt("identification", -1);
|
|
|
3037
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
3038
|
+ if (IsReturn > -1)
|
|
|
3039
|
+ {
|
|
|
3040
|
+ if (strstate == "0")
|
|
|
3041
|
+ {
|
|
|
3042
|
+ if (IsReturn == 1)
|
|
|
3043
|
+ {
|
|
|
3044
|
+ sql += " and F_IsReturn=1";
|
|
|
3045
|
+ }
|
|
|
3046
|
+ else
|
|
|
3047
|
+ {
|
|
|
3048
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
3049
|
+ }
|
|
2968
|
3050
|
|
|
|
3051
|
+ }
|
|
|
3052
|
+ }
|
|
2969
|
3053
|
if (identification > -1)
|
|
2970
|
3054
|
{
|
|
2971
|
3055
|
sql += "and F_Identification='" + identification + "'";
|
|
|
@@ -3823,7 +3907,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3823
|
3907
|
string strpagesize = RequestString.GetQueryString("pagesize");
|
|
3824
|
3908
|
int pagesize = 10;
|
|
3825
|
3909
|
string order = "ORDER BY a.F_LimitTime";
|
|
|
3910
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
3911
|
+ if (IsReturn > -1)
|
|
|
3912
|
+ {
|
|
|
3913
|
+ if (strstate == "0")
|
|
|
3914
|
+ {
|
|
|
3915
|
+ if (IsReturn == 1)
|
|
|
3916
|
+ {
|
|
|
3917
|
+ sql += " and F_IsReturn=1";
|
|
|
3918
|
+ }
|
|
|
3919
|
+ else
|
|
|
3920
|
+ {
|
|
|
3921
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
3922
|
+ }
|
|
3826
|
3923
|
|
|
|
3924
|
+ }
|
|
|
3925
|
+ }
|
|
3827
|
3926
|
#region 模块
|
|
3828
|
3927
|
switch (strtab)
|
|
3829
|
3928
|
{
|
|
|
@@ -4752,7 +4851,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4752
|
4851
|
int pageindex = 1;
|
|
4753
|
4852
|
string strpagesize = RequestString.GetQueryString("pagesize");
|
|
4754
|
4853
|
int pagesize = 10;
|
|
|
4854
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
4855
|
+ if (IsReturn > -1)
|
|
|
4856
|
+ {
|
|
|
4857
|
+ if (strstate == "0")
|
|
|
4858
|
+ {
|
|
|
4859
|
+ if (IsReturn == 1)
|
|
|
4860
|
+ {
|
|
|
4861
|
+ sql += " and F_IsReturn=1";
|
|
|
4862
|
+ }
|
|
|
4863
|
+ else
|
|
|
4864
|
+ {
|
|
|
4865
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
4866
|
+ }
|
|
4755
|
4867
|
|
|
|
4868
|
+ }
|
|
|
4869
|
+ }
|
|
4756
|
4870
|
switch (strtab)
|
|
4757
|
4871
|
{
|
|
4758
|
4872
|
case "0"://待处理工单
|
|
|
@@ -5617,7 +5731,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5617
|
5731
|
int pageindex = 1;
|
|
5618
|
5732
|
string strpagesize = RequestString.GetQueryString("pagesize");
|
|
5619
|
5733
|
int pagesize = 10;
|
|
|
5734
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
5735
|
+ if (IsReturn > -1)
|
|
|
5736
|
+ {
|
|
|
5737
|
+ if (strstate == "0")
|
|
|
5738
|
+ {
|
|
|
5739
|
+ if (IsReturn == 1)
|
|
|
5740
|
+ {
|
|
|
5741
|
+ sql += " and F_IsReturn=1";
|
|
|
5742
|
+ }
|
|
|
5743
|
+ else
|
|
|
5744
|
+ {
|
|
|
5745
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
5746
|
+ }
|
|
5620
|
5747
|
|
|
|
5748
|
+ }
|
|
|
5749
|
+ }
|
|
5621
|
5750
|
#region 模块
|
|
5622
|
5751
|
switch (strtab)
|
|
5623
|
5752
|
{
|
|
|
@@ -7023,7 +7152,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
7023
|
7152
|
int pageindex = 1;
|
|
7024
|
7153
|
string strpagesize = RequestString.GetQueryString("pagesize");
|
|
7025
|
7154
|
int pagesize = 10;
|
|
|
7155
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
7156
|
+ if (IsReturn > -1)
|
|
|
7157
|
+ {
|
|
|
7158
|
+ if (strstate == "0")
|
|
|
7159
|
+ {
|
|
|
7160
|
+ if (IsReturn == 1)
|
|
|
7161
|
+ {
|
|
|
7162
|
+ sql += " and F_IsReturn=1";
|
|
|
7163
|
+ }
|
|
|
7164
|
+ else
|
|
|
7165
|
+ {
|
|
|
7166
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
7167
|
+ }
|
|
7026
|
7168
|
|
|
|
7169
|
+ }
|
|
|
7170
|
+ }
|
|
7027
|
7171
|
#region 坐席&调度员
|
|
7028
|
7172
|
string splituser = HttpUtility.UrlDecode(RequestString.GetQueryString("splituser"));
|
|
7029
|
7173
|
if (splituser.Trim() != "" && splituser != "undefined")
|
|
|
@@ -8373,7 +8517,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
8373
|
8517
|
|
|
8374
|
8518
|
|
|
8375
|
8519
|
int isRelease = RequestString.GetInt("isRelease", 0);
|
|
|
8520
|
+ int IsReturn = RequestString.GetInt("IsReturn", -1);
|
|
|
8521
|
+ if (IsReturn > -1)
|
|
|
8522
|
+ {
|
|
|
8523
|
+ if (strstate == "0")
|
|
|
8524
|
+ {
|
|
|
8525
|
+ if (IsReturn == 1)
|
|
|
8526
|
+ {
|
|
|
8527
|
+ sql += " and F_IsReturn=1";
|
|
|
8528
|
+ }
|
|
|
8529
|
+ else
|
|
|
8530
|
+ {
|
|
|
8531
|
+ sql += " and (F_IsReturn is null or F_IsReturn !=1)";
|
|
|
8532
|
+ }
|
|
8376
|
8533
|
|
|
|
8534
|
+ }
|
|
|
8535
|
+ }
|
|
8377
|
8536
|
if (keyid != 0)
|
|
8378
|
8537
|
{
|
|
8379
|
8538
|
sql += "and a.F_Key in(select F_ValueId from dbo.GetValueId(" + keyid + ")) ";
|
|
|
@@ -9874,11 +10033,38 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
9874
|
10033
|
|
|
9875
|
10034
|
#region 操作按钮
|
|
9876
|
10035
|
var btns = new List<ButtonGroup.button>();
|
|
9877
|
|
- 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";
|
|
|
10036
|
+ var btnpc= new List<ButtonGroup.button>();
|
|
|
10037
|
+ string sqljb = "SELECT TOP 1 * FROM T_Bus_AssignedInfo WITH(NOLOCK) WHERE F_WorkOrderId='"
|
|
|
10038
|
+ + dt.Rows[0]["F_WorkOrderId"].ToString() + "' and F_State=1 and F_IsDelete=0 and F_IsSure<>3 ORDER BY F_Id DESC";
|
|
9878
|
10039
|
var dtjb = DbHelperSQL.Query(sqljb).Tables[0];
|
|
9879
|
10040
|
string ispd = "";
|
|
9880
|
10041
|
if (dtjb != null && dtjb.Rows.Count > 0)
|
|
|
10042
|
+ {
|
|
|
10043
|
+ var jbzx = dtjb.Rows[0];
|
|
9881
|
10044
|
ispd = dtjb.Rows[0]["F_IsNext"].ToString();
|
|
|
10045
|
+ string iszbdw = "0";
|
|
|
10046
|
+ string fmd = jbzx["F_MainDeptId"].ToString();
|
|
|
10047
|
+ string fod = jbzx["F_OtherDeptIds"] == null ? "" : jbzx["F_OtherDeptIds"].ToString();
|
|
|
10048
|
+ if (fmd == User.F_DeptId.ToString())
|
|
|
10049
|
+ { iszbdw = "1"; }
|
|
|
10050
|
+
|
|
|
10051
|
+ else if (fod != "" && fod.Split(',').Contains(User.F_DeptId.ToString()))
|
|
|
10052
|
+ {
|
|
|
10053
|
+ iszbdw = "2";
|
|
|
10054
|
+ }
|
|
|
10055
|
+ if (!(User.F_RoleCode == "WLDW" && iszbdw == "0"))
|
|
|
10056
|
+ {
|
|
|
10057
|
+ btnpc = ButtonGroup.GetButtons(dt.Rows[0]["F_WorkState"].ToString(), User.F_RoleCode.ToUpper(),
|
|
|
10058
|
+ dt.Rows[0]["F_IsResult"].ToString(), iszbdw, ispd, 0);
|
|
|
10059
|
+ }
|
|
|
10060
|
+ }
|
|
|
10061
|
+ else
|
|
|
10062
|
+ {
|
|
|
10063
|
+ btnpc = ButtonGroup.GetButtons(dt.Rows[0]["F_WorkState"].ToString(),
|
|
|
10064
|
+ User.F_RoleCode.ToUpper(), dt.Rows[0]["F_IsResult"].ToString(), "0", "", 0);
|
|
|
10065
|
+ }
|
|
|
10066
|
+
|
|
|
10067
|
+
|
|
9882
|
10068
|
if (User.F_RoleCode == "EJWLDW")
|
|
9883
|
10069
|
{
|
|
9884
|
10070
|
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";
|
|
|
@@ -9889,10 +10075,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
9889
|
10075
|
}
|
|
9890
|
10076
|
|
|
9891
|
10077
|
}
|
|
9892
|
|
- 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);
|
|
|
10078
|
+ btns = ButtonGroup.GetAPPButtons
|
|
|
10079
|
+ (dt.Rows[0]["F_WorkState"].ToString(), User.F_RoleCode.ToUpper(), dt.Rows[0]["F_IsProResult"].ToString(),
|
|
|
10080
|
+ dt.Rows[0]["F_InfoSource"].ToString(), ispd);
|
|
9893
|
10081
|
|
|
9894
|
10082
|
|
|
9895
|
10083
|
|
|
|
10084
|
+
|
|
|
10085
|
+
|
|
|
10086
|
+
|
|
|
10087
|
+
|
|
|
10088
|
+
|
|
|
10089
|
+
|
|
9896
|
10090
|
#endregion
|
|
9897
|
10091
|
|
|
9898
|
10092
|
#region 其他权限
|
|
|
@@ -9925,7 +10119,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
9925
|
10119
|
issend,
|
|
9926
|
10120
|
isedit,
|
|
9927
|
10121
|
isnotice,
|
|
9928
|
|
- btndata = btns
|
|
|
10122
|
+ btndata = btns,
|
|
|
10123
|
+ btnpc
|
|
9929
|
10124
|
};
|
|
9930
|
10125
|
return Success("获取成功", obj);
|
|
9931
|
10126
|
}
|
|
|
@@ -10779,6 +10974,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
10779
|
10974
|
{
|
|
10780
|
10975
|
return Error("请选择反映类别");
|
|
10781
|
10976
|
}
|
|
|
10977
|
+ if(type ==0)
|
|
|
10978
|
+ return Error("请选择来电类型");
|
|
|
10979
|
+
|
|
10782
|
10980
|
if (isAutoSendOrder == "1")
|
|
10783
|
10981
|
{
|
|
10784
|
10982
|
|
|
|
@@ -10902,6 +11100,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
10902
|
11100
|
//如果选择即刻答复:是,即为直办,工单结束
|
|
10903
|
11101
|
if (isresult == 1)
|
|
10904
|
11102
|
{
|
|
|
11103
|
+ if (string.IsNullOrEmpty(result))
|
|
|
11104
|
+ return Error("请输入办结内容");
|
|
10905
|
11105
|
modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
|
|
10906
|
11106
|
modelT_Bus_WorkOrder.F_DealDeptId = User.F_DeptId;
|
|
10907
|
11107
|
modelT_Bus_WorkOrder.F_DealUser = User.F_UserCode;
|
|
|
@@ -11436,6 +11636,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
11436
|
11636
|
//如果选择即刻答复:是,即为直办,工单结束
|
|
11437
|
11637
|
if (isresult == 1)
|
|
11438
|
11638
|
{
|
|
|
11639
|
+ if (string.IsNullOrEmpty(result))
|
|
|
11640
|
+ return Error("请输入办结内容");
|
|
11439
|
11641
|
modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
|
|
11440
|
11642
|
modelT_Bus_WorkOrder.F_DealUser = User.F_UserCode;
|
|
11441
|
11643
|
modelT_Bus_WorkOrder.F_DealTime = DateTime.Now;
|
|
|
@@ -11650,7 +11852,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
11650
|
11852
|
string workcontent = RequestString.GetFormString("workcontent");
|
|
11651
|
11853
|
string maindeptids = RequestString.GetFormString("maindeptids");
|
|
11652
|
11854
|
int limittimes = RequestString.GetInt("limittimes", 0);
|
|
11653
|
|
-
|
|
|
11855
|
+ if (type == 0)
|
|
|
11856
|
+ return Error("请选择来电类型");
|
|
11654
|
11857
|
//领导批示
|
|
11655
|
11858
|
string superOpinion = RequestString.GetFormString("superOpinion");
|
|
11656
|
11859
|
lock (_MyLock)
|
|
|
@@ -11759,6 +11962,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
11759
|
11962
|
|
|
11760
|
11963
|
if (isresult == 1)
|
|
11761
|
11964
|
{
|
|
|
11965
|
+ if (string.IsNullOrEmpty(result))
|
|
|
11966
|
+ return Error("请输入办结内容");
|
|
11762
|
11967
|
keyValuePairs.Add("F_WorkState", 9);
|
|
11763
|
11968
|
modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
|
|
11764
|
11969
|
keyValuePairs.Add("F_DealDeptId", User.F_DeptId);
|
|
|
@@ -11991,7 +12196,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
11991
|
12196
|
|
|
11992
|
12197
|
#endregion
|
|
11993
|
12198
|
#region 插入操作记录
|
|
11994
|
|
- Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
|
|
|
12199
|
+ int edit = 0;
|
|
|
12200
|
+ if (modelT_Bus_WorkOrder.F_ComTitle != title || modelT_Bus_WorkOrder.F_ComContent != content)
|
|
|
12201
|
+ {
|
|
|
12202
|
+ edit = 1;
|
|
|
12203
|
+ }
|
|
|
12204
|
+ if (issubmit ==1)
|
|
|
12205
|
+ {
|
|
|
12206
|
+ edit = 1;
|
|
|
12207
|
+ }
|
|
|
12208
|
+
|
|
|
12209
|
+ Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
|
|
11995
|
12210
|
oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
11996
|
12211
|
oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
|
|
11997
|
12212
|
oper.F_CallRecordId = modelT_Bus_WorkOrder.F_CallRecordId;
|
|
|
@@ -12003,12 +12218,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
12003
|
12218
|
{
|
|
12004
|
12219
|
oper.F_Message = userinfo + " 修改并提交了工单";
|
|
12005
|
12220
|
}
|
|
12006
|
|
- if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.resubmit)//1)
|
|
|
12221
|
+ else if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.resubmit)//1)
|
|
12007
|
12222
|
{
|
|
12008
|
12223
|
oper.F_Message = userinfo + " 修改了重办工单";
|
|
12009
|
12224
|
}
|
|
12010
|
|
- if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.finish)//9)
|
|
|
12225
|
+ else if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.finish)//9)
|
|
12011
|
12226
|
{
|
|
|
12227
|
+ edit = 1;
|
|
12012
|
12228
|
oper.F_Message = userinfo + " 修改并结案了工单";
|
|
12013
|
12229
|
Task.Run(() =>
|
|
12014
|
12230
|
{
|
|
|
@@ -12022,12 +12238,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
12022
|
12238
|
System.Diagnostics.Debug.WriteLine(DateTime.Now);
|
|
12023
|
12239
|
});
|
|
12024
|
12240
|
}
|
|
|
12241
|
+
|
|
12025
|
12242
|
|
|
12026
|
12243
|
oper.F_CreateUser = User.F_UserCode;
|
|
12027
|
12244
|
oper.F_CreateTime = DateTime.Now;
|
|
12028
|
12245
|
oper.F_IsDelete = 0;
|
|
12029
|
|
-
|
|
|
12246
|
+ if (edit ==1)
|
|
12030
|
12247
|
operBLL.Add(oper);
|
|
|
12248
|
+ else
|
|
|
12249
|
+ LogFactory.GetLogger("修改了信息").Warn(User.F_UserCode + " 修改工单信息");
|
|
12031
|
12250
|
//Task.Run(() =>
|
|
12032
|
12251
|
//{//推送消息表
|
|
12033
|
12252
|
// if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.submit)//1)
|
|
|
@@ -12096,7 +12315,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
12096
|
12315
|
int isprotect = RequestString.GetInt("isprotect", 0);
|
|
12097
|
12316
|
int level = RequestString.GetInt("level", 0);
|
|
12098
|
12317
|
int issubmit = RequestString.GetInt("issubmit", 0);
|
|
12099
|
|
-
|
|
|
12318
|
+ if (type == 0)
|
|
|
12319
|
+ return Error("请选择来电类型");
|
|
12100
|
12320
|
Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
|
|
12101
|
12321
|
if (modelT_Bus_WorkOrder != null)
|
|
12102
|
12322
|
{
|
|
|
@@ -12161,6 +12381,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
12161
|
12381
|
//如果选择即刻答复:是,即为直办,工单结束
|
|
12162
|
12382
|
if (isresult == 1)
|
|
12163
|
12383
|
{
|
|
|
12384
|
+ if (string.IsNullOrEmpty(result))
|
|
|
12385
|
+ return Error("请输入办结内容");
|
|
12164
|
12386
|
keyValuePairs.Add("F_WorkState", 9);
|
|
12165
|
12387
|
modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
|
|
12166
|
12388
|
keyValuePairs.Add("F_DealDeptId", User.F_DeptId);
|
|
|
@@ -12971,6 +13193,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
12971
|
13193
|
|
|
12972
|
13194
|
|
|
12973
|
13195
|
Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
|
|
|
13196
|
+ if(modelT_Bus_WorkOrder.F_WorkState ==0&& modelT_Bus_WorkOrder.F_IsReturn ==1)
|
|
|
13197
|
+ {
|
|
|
13198
|
+ return Error("工单已回退,不能交办");
|
|
|
13199
|
+ }
|
|
12974
|
13200
|
var premodeldept = new Model.T_Sys_Department();
|
|
12975
|
13201
|
if (ispd > 0)
|
|
12976
|
13202
|
{
|
|
|
@@ -19784,8 +20010,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
19784
|
20010
|
int issatisfie = RequestString.GetInt("issatisfie", -1);//0不满意 1满意2基本满意
|
|
19785
|
20011
|
int state = RequestString.GetInt("state", 1);//0保存 1保存并下一步
|
|
19786
|
20012
|
int visitid = RequestString.GetInt("visitid", 0);
|
|
19787
|
|
-
|
|
19788
|
|
-
|
|
|
20013
|
+ int limittimes = RequestString.GetInt("limittimes", 6);
|
|
|
20014
|
+
|
|
19789
|
20015
|
string result = RequestString.GetFormString("result");//回访情况
|
|
19790
|
20016
|
int nexttype = RequestString.GetInt("nexttype", 0);//1重办 2退回重办3仅回访4已办未果
|
|
19791
|
20017
|
string cbreason = RequestString.GetFormString("cbreason");//重办原因
|
|
|
@@ -20002,12 +20228,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
20002
|
20228
|
newmodelT_Bus_AssignedInfo.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
20003
|
20229
|
|
|
20004
|
20230
|
|
|
20005
|
|
- DataTable dt = DbHelperSQL.Query("select top 6 F_OffDate from T_Sys_WorkOFFDays where F_OffState = 1 and " +
|
|
|
20231
|
+ DataTable dt = DbHelperSQL.Query("select top "+ limittimes + " F_OffDate from T_Sys_WorkOFFDays where F_OffState = 1 and " +
|
|
20006
|
20232
|
"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];
|
|
20007
|
20233
|
var resdatetime = dt.Rows[5]["F_OffDate"].ToString();
|
|
20008
|
20234
|
if (!string.IsNullOrEmpty(resdatetime))
|
|
20009
|
20235
|
{
|
|
20010
|
|
- resdatetime = GetLimittime(6);
|
|
|
20236
|
+ resdatetime = GetLimittime(limittimes);
|
|
20011
|
20237
|
// resdatetime = resdatetime.Split(' ')[0] + " " + DateTime.Now.ToString("HH:mm:ss");
|
|
20012
|
20238
|
// var datatime = DateTime.Now.AddDays(6);
|
|
20013
|
20239
|
// if (Convert.ToDateTime(resdatetime) > datatime)
|
|
|
@@ -22372,6 +22598,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
22372
|
22598
|
return Error("操作失败");
|
|
22373
|
22599
|
}
|
|
22374
|
22600
|
}
|
|
|
22601
|
+ if (string.IsNullOrEmpty(result))
|
|
|
22602
|
+ return Error("请输入办结内容");
|
|
22375
|
22603
|
using (TransactionScope trans = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0, 10, 0)))
|
|
22376
|
22604
|
{
|
|
22377
|
22605
|
#region 修改工单记录
|
|
|
@@ -23712,7 +23940,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
23712
|
23940
|
|
|
23713
|
23941
|
int isprotect = RequestString.GetInt("isprotect", 0);
|
|
23714
|
23942
|
int level = RequestString.GetInt("level", 0);
|
|
23715
|
|
-
|
|
|
23943
|
+ if (type == 0)
|
|
|
23944
|
+ return Error("请选择来电类型");
|
|
23716
|
23945
|
Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
|
|
23717
|
23946
|
if (modelT_Bus_WorkOrder != null)
|
|
23718
|
23947
|
{
|
|
|
@@ -23773,19 +24002,27 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
23773
|
24002
|
#endregion
|
|
23774
|
24003
|
|
|
23775
|
24004
|
#region 插入操作记录
|
|
23776
|
|
- Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
|
|
23777
|
|
- oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
23778
|
|
- oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
|
|
23779
|
|
- oper.F_CallRecordId = modelT_Bus_WorkOrder.F_CallRecordId;
|
|
23780
|
|
- oper.F_File = modelT_Bus_WorkOrder.F_File;
|
|
|
24005
|
+ if (modelT_Bus_WorkOrder.F_ComTitle !=title || modelT_Bus_WorkOrder.F_ComContent !=content )
|
|
|
24006
|
+ {
|
|
|
24007
|
+ Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
|
|
|
24008
|
+ oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
|
24009
|
+ oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
|
|
|
24010
|
+ oper.F_CallRecordId = modelT_Bus_WorkOrder.F_CallRecordId;
|
|
|
24011
|
+ oper.F_File = modelT_Bus_WorkOrder.F_File;
|
|
23781
|
24012
|
|
|
23782
|
|
- string userinfo = User.depname + "(" + User.F_UserCode + ")";
|
|
23783
|
|
- oper.F_Message = userinfo + " 修改了工单基本信息";
|
|
23784
|
|
- oper.F_CreateUser = User.F_UserCode;
|
|
23785
|
|
- oper.F_CreateTime = DateTime.Now;
|
|
23786
|
|
- oper.F_IsDelete = 0;
|
|
|
24013
|
+ string userinfo = User.depname + "(" + User.F_UserCode + ")";
|
|
|
24014
|
+ oper.F_Message = userinfo + " 修改了工单基本信息";
|
|
|
24015
|
+ oper.F_CreateUser = User.F_UserCode;
|
|
|
24016
|
+ oper.F_CreateTime = DateTime.Now;
|
|
|
24017
|
+ oper.F_IsDelete = 0;
|
|
23787
|
24018
|
|
|
23788
|
|
- operBLL.Add(oper);
|
|
|
24019
|
+ operBLL.Add(oper);
|
|
|
24020
|
+ }
|
|
|
24021
|
+ else
|
|
|
24022
|
+ {
|
|
|
24023
|
+ LogFactory.GetLogger("修改了信息").Warn(User.F_UserCode + " 修改工单信息");
|
|
|
24024
|
+ }
|
|
|
24025
|
+
|
|
23789
|
24026
|
#endregion
|
|
23790
|
24027
|
|
|
23791
|
24028
|
trans.Complete();
|