1550076451 2 yıl önce
ebeveyn
işleme
e7ff37fa42

Dosya farkı çok büyük olduğundan ihmal edildi
+ 16898 - 16898
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/BusPushWorkorderController.cs


+ 2 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs

98
             dt = BLL.PagerBLL.GetListPager(
98
             dt = BLL.PagerBLL.GetListPager(
99
                 "T_RepositoryInformation a",
99
                 "T_RepositoryInformation a",
100
                 "F_RepositoryId",
100
                 "F_RepositoryId",
101
-                "*,(select F_CategoryName   from T_RepositoryCategory  where F_CategoryId =a.F_CategoryId  )as CategoryName ",
101
+                "*,(select F_CategoryName   from T_RepositoryCategory  where F_CategoryId =a.F_CategoryId  )as CategoryName" +
102
+                ",dbo.GetDeptName(CONVERT (int ,(select F_DeptId  from T_Sys_UserAccount  where F_UserCode = a.F_CreateBy)) ) DeptName ",
102
                 sql,
103
                 sql,
103
                 "ORDER BY F_RepositoryId desc",
104
                 "ORDER BY F_RepositoryId desc",
104
                 pagesize,
105
                 pagesize,

+ 263 - 26
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

102
             string Result = HttpUtility.UrlDecode(RequestString.GetQueryString("Result"));
102
             string Result = HttpUtility.UrlDecode(RequestString.GetQueryString("Result"));
103
             int isopen = RequestString.GetInt("isopen", -1);//是否公开
103
             int isopen = RequestString.GetInt("isopen", -1);//是否公开
104
             int jianhang = RequestString.GetInt("jianhang", -1);//省平台工单
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
             if (jianhang==4)
121
             if (jianhang==4)
106
             {
122
             {
107
                 sql += " and F_InfoSource = '2580'";
123
                 sql += " and F_InfoSource = '2580'";
852
                     if (butt == null)
868
                     if (butt == null)
853
                         buttons.Add(ButtonGroup.turnsee());
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
                 dr["Buttons"] = buttons;
880
                 dr["Buttons"] = buttons;
857
             }
881
             }
924
             int isopen = RequestString.GetInt("isopen", -1);//是否公开
948
             int isopen = RequestString.GetInt("isopen", -1);//是否公开
925
             if (isopen > -1)
949
             if (isopen > -1)
926
                 sql += " and isnull(F_IsOpen,0) =" + isopen;
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
             string strworkorderid = HttpUtility.UrlDecode(RequestString.GetQueryString("strworkorderid"));
967
             string strworkorderid = HttpUtility.UrlDecode(RequestString.GetQueryString("strworkorderid"));
929
             if (strworkorderid.Trim() != "" && strworkorderid != "undefined")
968
             if (strworkorderid.Trim() != "" && strworkorderid != "undefined")
930
             {
969
             {
1520
             int pageindex = 1;
1559
             int pageindex = 1;
1521
             string strpagesize = RequestString.GetQueryString("pagesize");
1560
             string strpagesize = RequestString.GetQueryString("pagesize");
1522
             int pagesize = 10;
1561
             int pagesize = 10;
1523
-
1562
+           
1524
             #region sql 语句相关处理
1563
             #region sql 语句相关处理
1525
             int dbtype = RequestString.GetInt("dbtype", 0);
1564
             int dbtype = RequestString.GetInt("dbtype", 0);
1526
             if (dbdata > 0)
1565
             if (dbdata > 0)
1825
             int isopen = RequestString.GetInt("isopen", -1);
1864
             int isopen = RequestString.GetInt("isopen", -1);
1826
             if (isopen > -1)
1865
             if (isopen > -1)
1827
                 sql += " and isnull(F_IsOpen,0) =" + isopen;
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
             if (dealstarttime.Trim() != "" && dealstarttime != "undefined")
1884
             if (dealstarttime.Trim() != "" && dealstarttime != "undefined")
1831
             {
1885
             {
2276
 
2330
 
2277
             string visitstarttime = HttpUtility.UrlDecode(RequestString.GetQueryString("visitstarttime"));//回访开始时间
2331
             string visitstarttime = HttpUtility.UrlDecode(RequestString.GetQueryString("visitstarttime"));//回访开始时间
2278
             string visitstrendtime = HttpUtility.UrlDecode(RequestString.GetQueryString("visitstrendtime"));//回访结束时间
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
             if (dealstarttime.Trim() != "" && dealstarttime != "undefined")
2349
             if (dealstarttime.Trim() != "" && dealstarttime != "undefined")
2281
             {
2350
             {
2282
                 if (dealstrendtime.Trim() != "" && dealstrendtime != "undefined")
2351
                 if (dealstrendtime.Trim() != "" && dealstrendtime != "undefined")
2965
             int db = RequestString.GetInt("db", 0);
3034
             int db = RequestString.GetInt("db", 0);
2966
             int isopen = RequestString.GetInt("isopen", -1);
3035
             int isopen = RequestString.GetInt("isopen", -1);
2967
             int identification = RequestString.GetInt("identification", -1);
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
             if (identification > -1)
3053
             if (identification > -1)
2970
             {
3054
             {
2971
                 sql += "and F_Identification='" + identification + "'";
3055
                 sql += "and F_Identification='" + identification + "'";
3823
             string strpagesize = RequestString.GetQueryString("pagesize");
3907
             string strpagesize = RequestString.GetQueryString("pagesize");
3824
             int pagesize = 10;
3908
             int pagesize = 10;
3825
             string order = "ORDER BY a.F_LimitTime";
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
             #region 模块
3926
             #region 模块
3828
             switch (strtab)
3927
             switch (strtab)
3829
             {
3928
             {
4752
             int pageindex = 1;
4851
             int pageindex = 1;
4753
             string strpagesize = RequestString.GetQueryString("pagesize");
4852
             string strpagesize = RequestString.GetQueryString("pagesize");
4754
             int pagesize = 10;
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
             switch (strtab)
4870
             switch (strtab)
4757
             {
4871
             {
4758
                 case "0"://待处理工单
4872
                 case "0"://待处理工单
5617
             int pageindex = 1;
5731
             int pageindex = 1;
5618
             string strpagesize = RequestString.GetQueryString("pagesize");
5732
             string strpagesize = RequestString.GetQueryString("pagesize");
5619
             int pagesize = 10;
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
             #region 模块
5750
             #region 模块
5622
             switch (strtab)
5751
             switch (strtab)
5623
             {
5752
             {
7023
             int pageindex = 1;
7152
             int pageindex = 1;
7024
             string strpagesize = RequestString.GetQueryString("pagesize");
7153
             string strpagesize = RequestString.GetQueryString("pagesize");
7025
             int pagesize = 10;
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
             #region  坐席&调度员
7171
             #region  坐席&调度员
7028
             string splituser = HttpUtility.UrlDecode(RequestString.GetQueryString("splituser"));
7172
             string splituser = HttpUtility.UrlDecode(RequestString.GetQueryString("splituser"));
7029
             if (splituser.Trim() != "" && splituser != "undefined")
7173
             if (splituser.Trim() != "" && splituser != "undefined")
8373
 
8517
 
8374
 
8518
 
8375
             int isRelease = RequestString.GetInt("isRelease", 0);
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
             if (keyid != 0)
8536
             if (keyid != 0)
8378
             {
8537
             {
8379
                 sql += "and a.F_Key in(select F_ValueId  from  dbo.GetValueId(" + keyid + ")) ";
8538
                 sql += "and a.F_Key in(select F_ValueId  from  dbo.GetValueId(" + keyid + ")) ";
9874
 
10033
 
9875
                             #region 操作按钮
10034
                             #region 操作按钮
9876
                             var btns = new List<ButtonGroup.button>();
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
                             var dtjb = DbHelperSQL.Query(sqljb).Tables[0];
10039
                             var dtjb = DbHelperSQL.Query(sqljb).Tables[0];
9879
                             string ispd = "";
10040
                             string ispd = "";
9880
                             if (dtjb != null && dtjb.Rows.Count > 0)
10041
                             if (dtjb != null && dtjb.Rows.Count > 0)
10042
+                            {
10043
+                                var jbzx = dtjb.Rows[0];
9881
                                 ispd = dtjb.Rows[0]["F_IsNext"].ToString();
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
                             if (User.F_RoleCode == "EJWLDW")
10068
                             if (User.F_RoleCode == "EJWLDW")
9883
                             {
10069
                             {
9884
                                 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";
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
                                 }
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
                             #endregion
10090
                             #endregion
9897
 
10091
 
9898
                             #region 其他权限
10092
                             #region 其他权限
9925
                                 issend,
10119
                                 issend,
9926
                                 isedit,
10120
                                 isedit,
9927
                                 isnotice,
10121
                                 isnotice,
9928
-                                btndata = btns
10122
+                                btndata = btns,
10123
+                                btnpc
9929
                             };
10124
                             };
9930
                             return Success("获取成功", obj);
10125
                             return Success("获取成功", obj);
9931
                         }
10126
                         }
10779
                 {
10974
                 {
10780
                     return Error("请选择反映类别");
10975
                     return Error("请选择反映类别");
10781
                 }
10976
                 }
10977
+                if(type ==0)
10978
+                    return Error("请选择来电类型");
10979
+
10782
                 if (isAutoSendOrder == "1")
10980
                 if (isAutoSendOrder == "1")
10783
                 {
10981
                 {
10784
 
10982
 
10902
                     //如果选择即刻答复:是,即为直办,工单结束
11100
                     //如果选择即刻答复:是,即为直办,工单结束
10903
                     if (isresult == 1)
11101
                     if (isresult == 1)
10904
                     {
11102
                     {
11103
+                        if (string.IsNullOrEmpty(result))
11104
+                            return Error("请输入办结内容");
10905
                         modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
11105
                         modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
10906
                         modelT_Bus_WorkOrder.F_DealDeptId = User.F_DeptId;
11106
                         modelT_Bus_WorkOrder.F_DealDeptId = User.F_DeptId;
10907
                         modelT_Bus_WorkOrder.F_DealUser = User.F_UserCode;
11107
                         modelT_Bus_WorkOrder.F_DealUser = User.F_UserCode;
11436
                     //如果选择即刻答复:是,即为直办,工单结束
11636
                     //如果选择即刻答复:是,即为直办,工单结束
11437
                     if (isresult == 1)
11637
                     if (isresult == 1)
11438
                     {
11638
                     {
11639
+                        if (string.IsNullOrEmpty(result))
11640
+                            return Error("请输入办结内容");
11439
                         modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
11641
                         modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
11440
                         modelT_Bus_WorkOrder.F_DealUser = User.F_UserCode;
11642
                         modelT_Bus_WorkOrder.F_DealUser = User.F_UserCode;
11441
                         modelT_Bus_WorkOrder.F_DealTime = DateTime.Now;
11643
                         modelT_Bus_WorkOrder.F_DealTime = DateTime.Now;
11650
                 string workcontent = RequestString.GetFormString("workcontent");
11852
                 string workcontent = RequestString.GetFormString("workcontent");
11651
                 string maindeptids = RequestString.GetFormString("maindeptids");
11853
                 string maindeptids = RequestString.GetFormString("maindeptids");
11652
                 int limittimes = RequestString.GetInt("limittimes", 0);
11854
                 int limittimes = RequestString.GetInt("limittimes", 0);
11653
-
11855
+                if (type == 0)
11856
+                    return Error("请选择来电类型");
11654
                 //领导批示
11857
                 //领导批示
11655
                 string superOpinion = RequestString.GetFormString("superOpinion");
11858
                 string superOpinion = RequestString.GetFormString("superOpinion");
11656
                 lock (_MyLock)
11859
                 lock (_MyLock)
11759
 
11962
 
11760
                     if (isresult == 1)
11963
                     if (isresult == 1)
11761
                     {
11964
                     {
11965
+                        if (string.IsNullOrEmpty(result))
11966
+                            return Error("请输入办结内容");
11762
                         keyValuePairs.Add("F_WorkState", 9);
11967
                         keyValuePairs.Add("F_WorkState", 9);
11763
                         modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
11968
                         modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
11764
                         keyValuePairs.Add("F_DealDeptId", User.F_DeptId);
11969
                         keyValuePairs.Add("F_DealDeptId", User.F_DeptId);
11991
 
12196
 
11992
                     #endregion
12197
                     #endregion
11993
                     #region 插入操作记录
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
                     oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
12210
                     oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
11996
                     oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
12211
                     oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
11997
                     oper.F_CallRecordId = modelT_Bus_WorkOrder.F_CallRecordId;
12212
                     oper.F_CallRecordId = modelT_Bus_WorkOrder.F_CallRecordId;
12003
                     {
12218
                     {
12004
                         oper.F_Message = userinfo + " 修改并提交了工单";
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
                         oper.F_Message = userinfo + " 修改了重办工单";
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
                         oper.F_Message = userinfo + " 修改并结案了工单";
12228
                         oper.F_Message = userinfo + " 修改并结案了工单";
12013
                         Task.Run(() =>
12229
                         Task.Run(() =>
12014
                         {
12230
                         {
12022
                             System.Diagnostics.Debug.WriteLine(DateTime.Now);
12238
                             System.Diagnostics.Debug.WriteLine(DateTime.Now);
12023
                         });
12239
                         });
12024
                     }
12240
                     }
12241
+                   
12025
 
12242
 
12026
                     oper.F_CreateUser = User.F_UserCode;
12243
                     oper.F_CreateUser = User.F_UserCode;
12027
                     oper.F_CreateTime = DateTime.Now;
12244
                     oper.F_CreateTime = DateTime.Now;
12028
                     oper.F_IsDelete = 0;
12245
                     oper.F_IsDelete = 0;
12029
-
12246
+                    if (edit ==1)
12030
                     operBLL.Add(oper);
12247
                     operBLL.Add(oper);
12248
+                    else
12249
+                        LogFactory.GetLogger("修改了信息").Warn(User.F_UserCode + " 修改工单信息");
12031
                     //Task.Run(() =>
12250
                     //Task.Run(() =>
12032
                     //{//推送消息表
12251
                     //{//推送消息表
12033
                     //        if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.submit)//1)
12252
                     //        if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.submit)//1)
12096
                 int isprotect = RequestString.GetInt("isprotect", 0);
12315
                 int isprotect = RequestString.GetInt("isprotect", 0);
12097
                 int level = RequestString.GetInt("level", 0);
12316
                 int level = RequestString.GetInt("level", 0);
12098
                 int issubmit = RequestString.GetInt("issubmit", 0);
12317
                 int issubmit = RequestString.GetInt("issubmit", 0);
12099
-
12318
+                if (type == 0)
12319
+                    return Error("请选择来电类型");
12100
                 Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
12320
                 Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
12101
                 if (modelT_Bus_WorkOrder != null)
12321
                 if (modelT_Bus_WorkOrder != null)
12102
                 {
12322
                 {
12161
                                                                //如果选择即刻答复:是,即为直办,工单结束
12381
                                                                //如果选择即刻答复:是,即为直办,工单结束
12162
                         if (isresult == 1)
12382
                         if (isresult == 1)
12163
                         {
12383
                         {
12384
+                            if (string.IsNullOrEmpty(result))
12385
+                                return Error("请输入办结内容");
12164
                             keyValuePairs.Add("F_WorkState", 9);
12386
                             keyValuePairs.Add("F_WorkState", 9);
12165
                             modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
12387
                             modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.finish;// 9;//已结案
12166
                             keyValuePairs.Add("F_DealDeptId", User.F_DeptId);
12388
                             keyValuePairs.Add("F_DealDeptId", User.F_DeptId);
12971
 
13193
 
12972
 
13194
 
12973
                 Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
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
                 var premodeldept = new Model.T_Sys_Department();
13200
                 var premodeldept = new Model.T_Sys_Department();
12975
                 if (ispd > 0)
13201
                 if (ispd > 0)
12976
                 {
13202
                 {
19784
                 int issatisfie = RequestString.GetInt("issatisfie", -1);//0不满意 1满意2基本满意
20010
                 int issatisfie = RequestString.GetInt("issatisfie", -1);//0不满意 1满意2基本满意
19785
                 int state = RequestString.GetInt("state", 1);//0保存 1保存并下一步
20011
                 int state = RequestString.GetInt("state", 1);//0保存 1保存并下一步
19786
                 int visitid = RequestString.GetInt("visitid", 0);
20012
                 int visitid = RequestString.GetInt("visitid", 0);
19787
-                
19788
-                
20013
+                int limittimes = RequestString.GetInt("limittimes", 6);
20014
+
19789
                 string result = RequestString.GetFormString("result");//回访情况
20015
                 string result = RequestString.GetFormString("result");//回访情况
19790
                 int nexttype = RequestString.GetInt("nexttype", 0);//1重办 2退回重办3仅回访4已办未果
20016
                 int nexttype = RequestString.GetInt("nexttype", 0);//1重办 2退回重办3仅回访4已办未果
19791
                 string cbreason = RequestString.GetFormString("cbreason");//重办原因
20017
                 string cbreason = RequestString.GetFormString("cbreason");//重办原因
20002
                                             newmodelT_Bus_AssignedInfo.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
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
                                                 "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];
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
                                             var resdatetime = dt.Rows[5]["F_OffDate"].ToString();
20233
                                             var resdatetime = dt.Rows[5]["F_OffDate"].ToString();
20008
                                             if (!string.IsNullOrEmpty(resdatetime))
20234
                                             if (!string.IsNullOrEmpty(resdatetime))
20009
                                             {
20235
                                             {
20010
-                                                 resdatetime = GetLimittime(6);
20236
+                                                 resdatetime = GetLimittime(limittimes);
20011
                             //                    resdatetime = resdatetime.Split(' ')[0] + " " + DateTime.Now.ToString("HH:mm:ss");
20237
                             //                    resdatetime = resdatetime.Split(' ')[0] + " " + DateTime.Now.ToString("HH:mm:ss");
20012
                             //                    var datatime = DateTime.Now.AddDays(6);
20238
                             //                    var datatime = DateTime.Now.AddDays(6);
20013
                             //                    if (Convert.ToDateTime(resdatetime) > datatime)
20239
                             //                    if (Convert.ToDateTime(resdatetime) > datatime)
22372
                             return Error("操作失败");
22598
                             return Error("操作失败");
22373
                         }
22599
                         }
22374
                     }
22600
                     }
22601
+                    if (string.IsNullOrEmpty(result))
22602
+                        return Error("请输入办结内容");
22375
                     using (TransactionScope trans = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0, 10, 0)))
22603
                     using (TransactionScope trans = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0, 10, 0)))
22376
                     {
22604
                     {
22377
                         #region 修改工单记录
22605
                         #region 修改工单记录
23712
 
23940
 
23713
                 int isprotect = RequestString.GetInt("isprotect", 0);
23941
                 int isprotect = RequestString.GetInt("isprotect", 0);
23714
                 int level = RequestString.GetInt("level", 0);
23942
                 int level = RequestString.GetInt("level", 0);
23715
-
23943
+                if (type == 0)
23944
+                    return Error("请选择来电类型");
23716
                 Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
23945
                 Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
23717
                 if (modelT_Bus_WorkOrder != null)
23946
                 if (modelT_Bus_WorkOrder != null)
23718
                 {
23947
                 {
23773
                         #endregion
24002
                         #endregion
23774
 
24003
 
23775
                         #region 插入操作记录
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
                         #endregion
24026
                         #endregion
23790
 
24027
 
23791
                         trans.Complete();
24028
                         trans.Complete();

+ 2 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/hb_affairsController.cs

144
                     else if (type == "35")
144
                     else if (type == "35")
145
                         modelT_Bus_WorkOrder.F_InfoType = 13;
145
                         modelT_Bus_WorkOrder.F_InfoType = 13;
146
                     else
146
                     else
147
-                        modelT_Bus_WorkOrder.F_InfoType = 14;
147
+                        modelT_Bus_WorkOrder.F_InfoType = 90;
148
                 }
148
                 }
149
                 else
149
                 else
150
-                    modelT_Bus_WorkOrder.F_InfoType = 14;
150
+                    modelT_Bus_WorkOrder.F_InfoType = 90;
151
                 modelT_Bus_WorkOrder.F_SourceAddress = result["CASE_ADDRESS"] == null ? "" : result["CASE_ADDRESS"].ToString();
151
                 modelT_Bus_WorkOrder.F_SourceAddress = result["CASE_ADDRESS"] == null ? "" : result["CASE_ADDRESS"].ToString();
152
                 modelT_Bus_WorkOrder.F_CusName = result["APPLICANT_NAME"] == null ? "" : result["APPLICANT_NAME"].ToString();
152
                 modelT_Bus_WorkOrder.F_CusName = result["APPLICANT_NAME"] == null ? "" : result["APPLICANT_NAME"].ToString();
153
                 if (string.IsNullOrEmpty(result["APPLICANT_NAME"].ToString()))
153
                 if (string.IsNullOrEmpty(result["APPLICANT_NAME"].ToString()))