瀏覽代碼

提交分支

zhupei 3 年之前
父節點
當前提交
ed46887c14

+ 4 - 4
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrder.cs

@@ -157,7 +157,7 @@ namespace CallCenterApi.DAL
157 157
                     new SqlParameter("@F_MaterialFee", SqlDbType.Decimal,9),
158 158
                     new SqlParameter("@F_Formula", SqlDbType.NVarChar,200),
159 159
                     new SqlParameter("@F_ReturnQuantity", SqlDbType.Int,4),
160
-                    new SqlParameter("@F_EventReason", SqlDbType.NVarChar,200),
160
+                    new SqlParameter("@F_EventReason", SqlDbType.NText),
161 161
                     new SqlParameter("@F_MailingNumber", SqlDbType.VarChar,20),
162 162
                     new SqlParameter("@F_ExpressName", SqlDbType.NVarChar,200),
163 163
                     new SqlParameter("@F_DealContent2", SqlDbType.NText),
@@ -175,7 +175,7 @@ namespace CallCenterApi.DAL
175 175
                     new SqlParameter("@F_SuperiorOpinion", SqlDbType.NVarChar,200),
176 176
                     new SqlParameter("@F_DrivePhone", SqlDbType.VarChar,20),
177 177
                     new SqlParameter("@F_SuperiorOpinion2", SqlDbType.NVarChar,200),
178
-                    new SqlParameter("@F_EventReason2", SqlDbType.NVarChar,200),
178
+                    new SqlParameter("@F_EventReason2", SqlDbType.NText),
179 179
                     new SqlParameter("@F_Flag", SqlDbType.Int,4)
180 180
             };
181 181
             parameters[0].Value = model.F_WorkOrderCode;
@@ -532,7 +532,7 @@ namespace CallCenterApi.DAL
532 532
                     new SqlParameter("@F_MaterialFee", SqlDbType.Decimal,9),
533 533
                     new SqlParameter("@F_Formula", SqlDbType.NVarChar,200),
534 534
                     new SqlParameter("@F_ReturnQuantity", SqlDbType.Int,4),
535
-                    new SqlParameter("@F_EventReason", SqlDbType.NVarChar,200),
535
+                    new SqlParameter("@F_EventReason", SqlDbType.NText),
536 536
                     new SqlParameter("@F_MailingNumber", SqlDbType.VarChar,20),
537 537
                     new SqlParameter("@F_ExpressName", SqlDbType.NVarChar,200),
538 538
                     new SqlParameter("@F_DealContent2", SqlDbType.NText),
@@ -550,7 +550,7 @@ namespace CallCenterApi.DAL
550 550
                     new SqlParameter("@F_SuperiorOpinion", SqlDbType.NVarChar,200),
551 551
                     new SqlParameter("@F_DrivePhone", SqlDbType.VarChar,20),
552 552
                     new SqlParameter("@F_SuperiorOpinion2", SqlDbType.NVarChar,200),
553
-                    new SqlParameter("@F_EventReason2", SqlDbType.NVarChar,200),
553
+                    new SqlParameter("@F_EventReason2", SqlDbType.NText),
554 554
                     new SqlParameter("@F_Flag", SqlDbType.Int,4),
555 555
                     new SqlParameter("@F_ID", SqlDbType.Int,4)};
556 556
             parameters[0].Value = model.F_WorkOrderCode;

+ 2 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/HomeController.cs

@@ -20,6 +20,8 @@ namespace CallCenterApi.Interface.Controllers
20 20
         // GET: Home
21 21
         public ActionResult Index()
22 22
         {
23
+            //string str = "羽羽(111111) 2022-07-19 10:52:51  外线结果";
24
+            //string sql = str.Substring(str.IndexOf(":") + 6);
23 25
             return Success("成功");
24 26
         }
25 27
         [Authorize]

+ 50 - 17
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -20,6 +20,7 @@ using System.Net;
20 20
 using System.Security.Cryptography;
21 21
 using System.Text;
22 22
 using System.Text.RegularExpressions;
23
+using System.Threading.Tasks;
23 24
 using System.Web;
24 25
 using System.Web.Mvc;
25 26
 using System.Web.Script.Serialization;
@@ -1851,11 +1852,12 @@ namespace CallCenterApi.Interface.Controllers.weixin
1851 1852
                 Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
1852 1853
                 string uwhere = " ";
1853 1854
                 string sql = "";
1854
-                if (!Refresh() || !Refresh2())
1855
-                {
1856
-                    return Error("查询失败");
1857
-                }
1858
-                int  YCD = 0, DJD = 0, DCL = 0, DSP = 0, YCL = 0, GCDBL = 0, YBL = 0, CQGD = 0,  TD = 0,YFP=0, ZHCX = 0, CSGD=0;
1855
+            //if (!Refresh())
1856
+            //{
1857
+            //    return Error("查询失败");
1858
+            //}
1859
+            Task.Run(() => Refresh());
1860
+            int  YCD = 0, DJD = 0, DCL = 0, DSP = 0, YCL = 0, GCDBL = 0, YBL = 0, CQGD = 0,  TD = 0,YFP=0, ZHCX = 0, CSGD=0;
1859 1861
                 for (int i = 0; i <= 9; i++)
1860 1862
                 {
1861 1863
                
@@ -5204,7 +5206,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
5204 5206
         /// <returns></returns>
5205 5207
         [WechatActionFilter]
5206 5208
         public ActionResult AssignWorkOrder(string OpenId, long orderid, string cont, WorkOrdeDeptment deptment, string F_Files, int isvisit = 1,
5207
-            int overtime = 0, int sms = -1, int clbm = 0, int clid = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0, int clbm2 = 0, int clid2 = 0,string jsonstr="", int flag = 1,int inoutflag = 0)
5209
+            int overtime = 0, int sms = -1, int clbm = 0, int clid = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0, int clbm2 = 0, int clid2 = 0,string jsonstr="", int flag = 1,int inoutflag = 0, string Supercont = "")
5208 5210
         {
5209 5211
 
5210 5212
             if (!string.IsNullOrEmpty(OpenId))
@@ -5271,6 +5273,12 @@ namespace CallCenterApi.Interface.Controllers.weixin
5271 5273
                     {
5272 5274
                         return Error("请选择接收部门");
5273 5275
                     }
5276
+                    #region 五要素
5277
+                    input.F_ZL_ResponsibleUnit = deptment.ResponsibleUnit;// 责任单位
5278
+                    input.F_EventReason = deptment.EventReason;// 事件原因
5279
+                    input.F_ZL_ImprovementRequirements = deptment.ImprovementRequirements;// 改进要求
5280
+                    input.F_TS_Level = deptment.TS_Level;//投诉-重要级别:轻微、一般、较大、重大
5281
+                    #endregion
5274 5282
                     if (markdepts.Contains(ua.F_DeptId.ToString()) && model.F_Flag == 9)
5275 5283
                     {
5276 5284
                         if (markdepts.Contains(ua.F_DeptId.ToString()))
@@ -5296,7 +5304,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
5296 5304
                                 return Error("请选择接收部门");
5297 5305
 
5298 5306
                             }
5299
-                            var res = AssignWO(ua, model, input, cont, F_Files, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid, "", 0, 1, flag);
5307
+                            var res = AssignWO(ua, model, input, cont, F_Files, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid, "", 0, 1, flag,Supercont);
5300 5308
                             var res1 = AssignWO(ua, model, input, cont, F_Files, clbm2, clid2, overtime, sms, isApprovalp, hclbm, hclid, "", 0, 2, flag);
5301 5309
 
5302 5310
                         }
@@ -5306,7 +5314,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
5306 5314
                             {
5307 5315
                                 return Error("请选择接收部门");
5308 5316
                             }
5309
-                            var res1 = AssignWO(ua, model, input, cont, F_Files, clbm2, clid2, overtime, sms, isApprovalp, hclbm, hclid, "", 0, 2, flag);
5317
+                            var res1 = AssignWO(ua, model, input, cont, F_Files, clbm2, clid2, overtime, sms, isApprovalp, hclbm, hclid, "", 0, 2, flag,Supercont);
5310 5318
                             Overorder(ua, model, 1);
5311 5319
                         }
5312 5320
                         else
@@ -5315,7 +5323,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
5315 5323
                             {
5316 5324
                                 return Error("请选择接收部门");
5317 5325
                             }
5318
-                            var res = AssignWO(ua, model, input, cont, F_Files, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid, "", 0, 1, flag);
5326
+                            var res = AssignWO(ua, model, input, cont, F_Files, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid, "", 0, 1, flag, Supercont);
5319 5327
                             Overorder(ua, model, 2);
5320 5328
                         }
5321 5329
                         return Success("转派成功");
@@ -5490,7 +5498,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
5490 5498
                             if (modeldpts != null)
5491 5499
                                 return Error("不允许同一个部门出现在两条线内,请重新指派!");
5492 5500
                         }
5493
-                        var res = AssignWO(ua, model, input, cont, F_Files, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid, "", 0, Convert.ToInt32(zflag));
5501
+                        var res = AssignWO(ua, model, input, cont, F_Files, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid, "", 0, Convert.ToInt32(zflag),0, Supercont);
5494 5502
                         if (res)
5495 5503
                         {
5496 5504
                             return Success("转派成功");
@@ -5566,7 +5574,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
5566 5574
         /// <summary>
5567 5575
         /// 转派工单
5568 5576
         /// </summary>
5569
-        public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, string F_Files, int clbm = 0, int clid = 0, int overtime = 0, int sms = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0, string creat = "",int  isbl=0, int flag = 1, int flagstate = 0)
5577
+        public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, string F_Files, int clbm = 0, int clid = 0, int overtime = 0, int sms = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0, string creat = "",int  isbl=0, int flag = 1, int flagstate = 0, string Supercont = "")
5570 5578
         {
5571 5579
 
5572 5580
             if (model.F_limit > 0)
@@ -5742,6 +5750,24 @@ namespace CallCenterApi.Interface.Controllers.weixin
5742 5750
                     {
5743 5751
                         model.F_DealContent += cont + ";";
5744 5752
                     }
5753
+                if (!string.IsNullOrEmpty(Supercont))
5754
+                {
5755
+                    if (flag == 1 || ((model.F_Flag == null || model.F_Flag == 0) && flag == 3))
5756
+                    {
5757
+                        if (model.F_SuperiorOpinion.Trim() != Supercont.Trim())
5758
+                        {
5759
+                            model.F_SuperiorOpinion = nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ") " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + Supercont;
5760
+                        }
5761
+                    }
5762
+                    else if (flag == 2)
5763
+                    {
5764
+                        if (model.F_SuperiorOpinion2.Trim() != Supercont.Trim())
5765
+                        {
5766
+                            model.F_SuperiorOpinion2 = nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ") " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + Supercont;
5767
+                        }
5768
+                    }
5769
+
5770
+                }
5745 5771
                 InToworkModel(model, input);
5746 5772
 
5747 5773
                 if (!string.IsNullOrEmpty(F_Files))
@@ -5825,10 +5851,11 @@ namespace CallCenterApi.Interface.Controllers.weixin
5825 5851
                {
5826 5852
                 return Success("你的账号已在别处登录,你确定要再次登录吗?");
5827 5853
             }
5828
-                if (!Refresh() || !Refresh2())
5829
-                {
5830
-                    return Error("查询失败");
5831
-                }
5854
+                //if (!Refresh())
5855
+                //{
5856
+                //    return Error("查询失败");
5857
+                //}
5858
+                Task.Run(() => Refresh());
5832 5859
                 string sql = $" and F_IsDelete=0";
5833 5860
               //  sql += "and F_Type !=3";
5834 5861
                 DataTable dt = new DataTable();
@@ -7079,11 +7106,17 @@ namespace CallCenterApi.Interface.Controllers.weixin
7079 7106
                     }
7080 7107
                     if (flag == 1 || ((model.F_Flag == null || model.F_Flag == 0) && flag == 3))
7081 7108
                     {
7082
-                        model.F_SuperiorOpinion = cont;
7109
+                        if (model.F_SuperiorOpinion.Trim() != cont.Trim())
7110
+                        {
7111
+                            model.F_SuperiorOpinion = nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ") " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + cont;
7112
+                        }
7083 7113
                     }
7084 7114
                     else if (flag == 2)
7085 7115
                     {
7086
-                        model.F_SuperiorOpinion2 = cont;
7116
+                        if (model.F_SuperiorOpinion2.Trim() != cont.Trim())
7117
+                        {
7118
+                            model.F_SuperiorOpinion2 = nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ") " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + cont;
7119
+                        }
7087 7120
                     }
7088 7121
                     //model.F_SuperiorOpinion = string.IsNullOrEmpty(model.F_SuperiorOpinion) ? cont : model.F_SuperiorOpinion + "; " + cont;
7089 7122
                 }

+ 4 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -163,6 +163,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
163 163
                 sql += " and F_Type='" + EnumWOType.ConsultingNeeds.ToString() + "'";
164 164
             if (type == (int)EnumWOType.SpotCheck)//抽检
165 165
                 sql += " and F_Type='" + EnumWOType.SpotCheck.ToString() + "'";
166
+            if (type == (int)EnumWOType.Cooperation)//业务协办
167
+                sql += " and F_Type='" + EnumWOType.Cooperation.ToString() + "'";
166 168
             int recordCount = 0;
167 169
 
168 170
          
@@ -238,6 +240,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
238 240
                 sql += " and F_Type='" + EnumWOType.ConsultingNeeds.ToString() + "'";
239 241
             if (type == (int)EnumWOType.SpotCheck)//抽检
240 242
                 sql += " and F_Type='" + EnumWOType.SpotCheck.ToString() + "'";
243
+            if (type == (int)EnumWOType.Cooperation)//业务协办
244
+                sql += " and F_Type='" + EnumWOType.Cooperation.ToString() + "'";
241 245
             int recordCount = 0;
242 246
             if (pid == 0 && type == (int)EnumWOType.Complaint)
243 247
             {

+ 115 - 40
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -15,6 +15,7 @@ using System.Globalization;
15 15
 using System.IO;
16 16
 using System.Linq;
17 17
 using System.Text.RegularExpressions;
18
+using System.Threading.Tasks;
18 19
 using System.Web;
19 20
 using System.Web.Mvc;
20 21
 using System.Web.Script.Serialization;
@@ -661,10 +662,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
661 662
                 Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
662 663
                 string uwhere = " ";
663 664
                 string sql = "";
664
-                if (!Refresh())
665
-                {
666
-                    return Error("查询失败");
667
-                }
665
+                //if (!Refresh())
666
+                //{
667
+                //    return Error("查询失败");
668
+                //}
669
+                Task.Run(() => Refresh());
668 670
                 int DZP = 0, YCD = 0, DJD = 0, DCL = 0, YQGD = 0, YZP = 0, DSP = 0, YCL = 0, GCDBL = 0, YBL = 0, WSP =
669 671
                     0, YGGD = 0, KHFK = 0, CQGD = 0, CBGD = 0, TD = 0, ZHCX = 0, RV_awaitVist = 0, RV_haveVisit = 0, RV_resultVisit = 0, DWJ = 0, ZHHF = 0,CSGD=0; ;
670 672
                 for (int i = 0; i <= 21; i++)
@@ -3326,9 +3328,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
3326 3328
                             dt.Columns.Add("问题数量");
3327 3329
                             dt.Columns.Add("销售基地");                                       
3328 3330
                             dt.Columns.Add("生产批次号");
3329
-                            dt.Columns.Add("问题类别1");
3330
-                            dt.Columns.Add("问题类别2");
3331
-                            dt.Columns.Add("问题类别3");
3331
+                            if (type == 5)
3332
+                            {
3333
+                                dt.Columns.Add("问题类别");
3334
+                            }
3335
+                            else
3336
+                            {
3337
+                                dt.Columns.Add("问题类别1");
3338
+                                dt.Columns.Add("问题类别2");
3339
+                                dt.Columns.Add("问题类别3");
3340
+                            }
3332 3341
                             dt.Columns.Add("重要级别");
3333 3342
                             dt.Columns.Add("品牌");
3334 3343
                             dt.Columns.Add("客户编号");
@@ -3641,19 +3650,33 @@ namespace CallCenterApi.Interface.Controllers.workorder
3641 3650
                                         Model.T_Wo_QuestionManage manage = quesBLL.GetModel(b);
3642 3651
                                         if (manage != null)
3643 3652
                                         {
3644
-                                            drNew["问题类别3"] = manage.F_QuestionName;
3645
-                                            if (manage.F_Label == "3")
3653
+                                            if (type == 5)
3646 3654
                                             {
3647
-                                                Model.T_Wo_QuestionManage Manage1 = quesBLL.GetModel(int.Parse(manage.F_ParentId.ToString()));//获取问题类别
3648
-                                                Model.T_Wo_QuestionManage Manage2 = quesBLL.GetModel(int.Parse(Manage1.F_ParentId.ToString()));//获取问题类别
3649
-                                                drNew["问题类别1"] = Manage2.F_QuestionName;//问题类别1
3650
-                                                drNew["问题类别2"] = Manage1.F_QuestionName;//问题类别2
3655
+                                                drNew["问题类别"] = manage.F_QuestionName;
3656
+                                            }
3657
+                                            else
3658
+                                            {
3659
+                                                drNew["问题类别3"] = manage.F_QuestionName;
3660
+                                                if (manage.F_Label == "3")
3661
+                                                {
3662
+                                                    Model.T_Wo_QuestionManage Manage1 = quesBLL.GetModel(int.Parse(manage.F_ParentId.ToString()));//获取问题类别
3663
+                                                    Model.T_Wo_QuestionManage Manage2 = quesBLL.GetModel(int.Parse(Manage1.F_ParentId.ToString()));//获取问题类别
3664
+                                                    drNew["问题类别1"] = Manage2.F_QuestionName;//问题类别1
3665
+                                                    drNew["问题类别2"] = Manage1.F_QuestionName;//问题类别2
3666
+                                                }
3651 3667
                                             }
3652 3668
                                         }
3653 3669
                                     }
3654 3670
                                     catch (Exception)
3655 3671
                                     {
3656
-                                        drNew["问题类别3"] = it.F_QuestionType; //问题类别(投诉抽捡和咨询类别不一样)
3672
+                                        if (type == 5)
3673
+                                        {
3674
+                                            drNew["问题类别"] = it.F_QuestionType;
3675
+                                        }
3676
+                                        else
3677
+                                        {
3678
+                                            drNew["问题类别3"] = it.F_QuestionType; //问题类别(投诉抽捡和咨询类别不一样)
3679
+                                        }
3657 3680
                                     }
3658 3681
                                 }
3659 3682
                                 drNew["重要级别"] = it.F_TS_Level;
@@ -3947,10 +3970,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
3947 3970
             int userId = CurrentUser.UserData.F_UserId;
3948 3971
             if (userId != 0)
3949 3972
             {
3950
-                if (!Refresh())
3951
-                {
3952
-                    return Error("查询失败");
3953
-                }
3973
+                //if (!Refresh())
3974
+                //{
3975
+                //    return Error("查询失败");
3976
+                //}
3977
+                Task.Run(() => Refresh());
3954 3978
                 string sql = $" and F_IsDelete=0";
3955 3979
                 //   sql += "and F_Type !=3";
3956 3980
                 DataTable dt = new DataTable();
@@ -4104,9 +4128,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
4104 4128
                             dt.Columns.Add("问题数量");
4105 4129
                             dt.Columns.Add("销售基地");
4106 4130
                             dt.Columns.Add("生产批次号");
4107
-                            dt.Columns.Add("问题类别1");
4108
-                            dt.Columns.Add("问题类别2");
4109
-                            dt.Columns.Add("问题类别3");
4131
+                            if (type == 5)
4132
+                            {
4133
+                                dt.Columns.Add("问题类别");
4134
+                            }
4135
+                            else
4136
+                            {
4137
+                                dt.Columns.Add("问题类别1");
4138
+                                dt.Columns.Add("问题类别2");
4139
+                                dt.Columns.Add("问题类别3");
4140
+                            }
4110 4141
                             dt.Columns.Add("重要级别");
4111 4142
                             dt.Columns.Add("品牌");
4112 4143
                             dt.Columns.Add("客户编号");
@@ -4398,19 +4429,33 @@ namespace CallCenterApi.Interface.Controllers.workorder
4398 4429
                                         Model.T_Wo_QuestionManage manage = quesBLL.GetModel(b);
4399 4430
                                         if (manage != null)
4400 4431
                                         {
4401
-                                            drNew["问题类别3"] = manage.F_QuestionName;
4402
-                                            if (manage.F_Label == "3")
4432
+                                            if (type == 5)
4403 4433
                                             {
4404
-                                                Model.T_Wo_QuestionManage Manage1 = quesBLL.GetModel(int.Parse(manage.F_ParentId.ToString()));//获取问题类别
4405
-                                                Model.T_Wo_QuestionManage Manage2 = quesBLL.GetModel(int.Parse(Manage1.F_ParentId.ToString()));//获取问题类别
4406
-                                                drNew["问题类别1"] = Manage2.F_QuestionName;//问题类别1
4407
-                                                drNew["问题类别2"] = Manage1.F_QuestionName;//问题类别2
4434
+                                                drNew["问题类别"] = manage.F_QuestionName;
4435
+                                            }
4436
+                                            else
4437
+                                            {
4438
+                                                drNew["问题类别3"] = manage.F_QuestionName;
4439
+                                                if (manage.F_Label == "3")
4440
+                                                {
4441
+                                                    Model.T_Wo_QuestionManage Manage1 = quesBLL.GetModel(int.Parse(manage.F_ParentId.ToString()));//获取问题类别
4442
+                                                    Model.T_Wo_QuestionManage Manage2 = quesBLL.GetModel(int.Parse(Manage1.F_ParentId.ToString()));//获取问题类别
4443
+                                                    drNew["问题类别1"] = Manage2.F_QuestionName;//问题类别1
4444
+                                                    drNew["问题类别2"] = Manage1.F_QuestionName;//问题类别2
4445
+                                                }
4408 4446
                                             }
4409 4447
                                         }
4410 4448
                                     }
4411 4449
                                     catch (Exception)
4412 4450
                                     {
4413
-                                        drNew["问题类别3"] = it.F_QuestionType; //问题类别(投诉抽捡和咨询类别不一样)
4451
+                                        if (type == 5)
4452
+                                        {
4453
+                                            drNew["问题类别"] = it.F_QuestionType;
4454
+                                        }
4455
+                                        else
4456
+                                        {
4457
+                                            drNew["问题类别3"] = it.F_QuestionType; //问题类别(投诉抽捡和咨询类别不一样)
4458
+                                        }
4414 4459
                                     }
4415 4460
                                 }
4416 4461
                                 drNew["重要级别"] = it.F_TS_Level;
@@ -6578,7 +6623,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
6578 6623
                     model.F_DealType = model1[i].F_DealType;//处理方式:当即办理、电话转接、网络转办(点选)
6579 6624
                     model.F_WorkerBrand = model1[i].F_Brand;//工单品牌
6580 6625
                     //model.SuperiorOpinion = AssCont(model1[i].F_ID);//上级处理意见
6581
-                    model.SuperiorOpinion = model1[i].F_SuperiorOpinion;//处理结果-外线
6626
+                    model.SuperiorOpinion = model1[i].F_SuperiorOpinion;
6582 6627
                     model.SuperiorOpinion2 = model1[i].F_SuperiorOpinion2;//处理结果-内线
6583 6628
                     #endregion
6584 6629
                     if (!string.IsNullOrEmpty(model1[i].F_QuestionType))
@@ -8371,7 +8416,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
8371 8416
         /// <returns></returns>
8372 8417
         [Authority]
8373 8418
         public ActionResult AssignWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment, string F_Files,
8374
-            int overtime = 0, int sms = 0, int clbm = 0, int clid = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0, int clbm2 = 0, int clid2 = 0,string jsonstr="",int flag=1,int inoutflag = 0)
8419
+            int overtime = 0, int sms = 0, int clbm = 0, int clid = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0, int clbm2 = 0, int clid2 = 0,string jsonstr="",int flag=1,int inoutflag = 0,string Supercont="")
8375 8420
         {
8376 8421
             int userId = CurrentUser.UserData.F_UserId;
8377 8422
             string usercode = CurrentUser.UserData.F_UserCode;
@@ -8455,6 +8500,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
8455 8500
                 {
8456 8501
                     return Error("请选择接收部门");
8457 8502
                 }
8503
+                #region 五要素
8504
+                input.F_ZL_ResponsibleUnit = deptment.ResponsibleUnit;// 责任单位
8505
+                input.F_EventReason = deptment.EventReason;// 事件原因
8506
+                input.F_ZL_ImprovementRequirements = deptment.ImprovementRequirements;// 改进要求
8507
+                input.F_TS_Level = deptment.TS_Level;//投诉-重要级别:轻微、一般、较大、重大
8508
+                #endregion
8458 8509
                 if ((model.F_State==17 & model.F_State2==17)|| (model.F_State == 0 & model.F_State2 == 0)||(model.F_State == 3 & model.F_State2 == 3) || (markdepts.Contains(ua.F_DeptId.ToString()) && model.F_Flag==9))
8459 8510
                 {
8460 8511
                     if (markdepts.Contains(ua.F_DeptId.ToString()))
@@ -8480,7 +8531,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
8480 8531
                             return Error("请选择接收部门");
8481 8532
 
8482 8533
                         }
8483
-                        var res = AssignWO(ua, model, input, cont, F_Files, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid,"",0,1,flag);
8534
+                        var res = AssignWO(ua, model, input, cont, F_Files, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid,"",0,1,flag,Supercont);
8484 8535
                         var res1 = AssignWO(ua, model, input, cont, F_Files, clbm2, clid2, overtime, sms, isApprovalp, hclbm, hclid, "", 0, 2,flag);
8485 8536
 
8486 8537
                     }
@@ -8490,7 +8541,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
8490 8541
                         {
8491 8542
                             return Error("请选择接收部门");
8492 8543
                         }
8493
-                        var res1 = AssignWO(ua, model, input, cont, F_Files, clbm2, clid2, overtime, sms, isApprovalp, hclbm, hclid, "", 0, 2,flag);
8544
+                        var res1 = AssignWO(ua, model, input, cont, F_Files, clbm2, clid2, overtime, sms, isApprovalp, hclbm, hclid, "", 0, 2,flag,Supercont);
8494 8545
                         Overorder(ua, model,2,1);
8495 8546
                         //DealWO(ua, model, input, "", "", 1, "", 1, "",flag);
8496 8547
                     }
@@ -8500,7 +8551,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
8500 8551
                         {
8501 8552
                             return Error("请选择接收部门");
8502 8553
                         }
8503
-                        var res = AssignWO(ua, model, input, cont, F_Files, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid,"",0,1,flag);
8554
+                        var res = AssignWO(ua, model, input, cont, F_Files, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid,"",0,1,flag,Supercont);
8504 8555
                         Overorder(ua, model,2,2);
8505 8556
                         //DealWO(ua, model, input, "", "", 1, "", 2, "",flag);
8506 8557
                     }
@@ -8694,7 +8745,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
8694 8745
                     }
8695 8746
                     //var itemlast = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and F_IsUsed=0 and F_WoState =2 and  F_WoID='" + model.F_ID + "'and F_NextUser like '%" + ua.F_UserCode + "%' order by F_ID desc").FirstOrDefault();
8696 8747
 
8697
-                    var res = AssignWO(ua, model, input, cont, F_Files, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid, "", 0, Convert.ToInt32(zflag));
8748
+                    var res = AssignWO(ua, model, input, cont, F_Files, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid, "", 0, Convert.ToInt32(zflag),0,Supercont);
8698 8749
                     if (res)
8699 8750
                     {
8700 8751
                         return Success("转派成功");
@@ -9902,16 +9953,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
9902 9953
             if (flag == 1)
9903 9954
             {
9904 9955
                 model.F_State = wostate;//外线关闭
9905
-                AddLog((int)model.F_ID, wostate, content, (int)EnumItemType.deal, optbut, touser, 0, nowUser, model.F_limit, sms, "", 0, 1);
9956
+                AddLog((int)model.F_ID, wostate, content, (int)EnumItemType.deal, optbut, "", 0, nowUser, model.F_limit, sms, "", 0, 1);
9906 9957
             }
9907 9958
             else if (flag == 2)
9908 9959
             {
9909 9960
                 model.F_State2 = wostate;//内线关闭
9910
-                AddLog((int)model.F_ID, wostate, content, (int)EnumItemType.deal, optbut, touser, 0, nowUser, model.F_limit, sms, "", 0, 2);
9961
+                AddLog((int)model.F_ID, wostate, content, (int)EnumItemType.deal, optbut, "", 0, nowUser, model.F_limit, sms, "", 0, 2);
9911 9962
             }
9912 9963
             else
9913 9964
             {
9914
-                AddLog((int)model.F_ID, wostate, content, (int)EnumItemType.deal, optbut, touser, 0, nowUser, model.F_limit, sms);
9965
+                AddLog((int)model.F_ID, wostate, content, (int)EnumItemType.deal, optbut, "", 0, nowUser, model.F_limit, sms);
9915 9966
                 model.F_State = wostate;
9916 9967
                 model.F_State2 = wostate;
9917 9968
             }
@@ -10068,11 +10119,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
10068 10119
                     }
10069 10120
                     if (flag == 1 || ((model.F_Flag == null || model.F_Flag == 0) && flag == 3))
10070 10121
                     {
10071
-                        model.F_SuperiorOpinion = cont;
10122
+                        if (model.F_SuperiorOpinion.Trim() != cont.Trim())
10123
+                        {
10124
+                            model.F_SuperiorOpinion = nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ") " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + cont;
10125
+                        }
10072 10126
                     }
10073 10127
                     else if (flag == 2)
10074 10128
                     {
10075
-                        model.F_SuperiorOpinion2= cont;
10129
+                        if (model.F_SuperiorOpinion2.Trim() != cont.Trim())
10130
+                        {
10131
+                            model.F_SuperiorOpinion2 = nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ") " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + cont;
10132
+                        }
10076 10133
                     }                 
10077 10134
                 }
10078 10135
                 //if (!string.IsNullOrEmpty(eventreason))
@@ -10359,7 +10416,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
10359 10416
         /// <summary>
10360 10417
         /// 转派工单
10361 10418
         /// </summary>
10362
-        public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, string F_Files, int clbm = 0, int clid = 0, int overtime = 0, int sms = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0, string creat = "", int isbl = 0, int flag = 1,int flagstate=0)
10419
+        public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, string F_Files, int clbm = 0, int clid = 0, int overtime = 0, int sms = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0, string creat = "", int isbl = 0, int flag = 1,int flagstate=0,string Supercont="")
10363 10420
         {
10364 10421
             #region 系统升级派单时限可修改2021/12/24
10365 10422
             //if (model.F_limit > 0)
@@ -10538,6 +10595,24 @@ namespace CallCenterApi.Interface.Controllers.workorder
10538 10595
                     {
10539 10596
                         model.F_DealContent += cont + ";";
10540 10597
                     }
10598
+                if (!string.IsNullOrEmpty(Supercont))
10599
+                {
10600
+                    if (flag == 1 || ((model.F_Flag == null || model.F_Flag == 0) && flag == 3))
10601
+                    {
10602
+                        if (model.F_SuperiorOpinion.Trim() != Supercont.Trim())
10603
+                        {
10604
+                            model.F_SuperiorOpinion = nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ") " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + Supercont;
10605
+                        }
10606
+                    }
10607
+                    else if (flag == 2)
10608
+                    {
10609
+                        if (model.F_SuperiorOpinion2.Trim() != Supercont.Trim())
10610
+                        {
10611
+                            model.F_SuperiorOpinion2 = nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ") " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + Supercont;
10612
+                        }
10613
+                    }
10614
+
10615
+                }
10541 10616
                 InToworkModel(model, input);
10542 10617
 
10543 10618
                 if (!string.IsNullOrEmpty(F_Files))

+ 6 - 1
codegit/CallCenterApi/CallCenterApi.Model/T_Wo_WorkOrder.cs

@@ -1093,7 +1093,12 @@ namespace CallCenterApi.Model
1093 1093
         /// 其他
1094 1094
         /// </summary>
1095 1095
         [Description("其他")]
1096
-        Other
1096
+        Other,
1097
+        /// <summary>
1098
+        /// 业务协办
1099
+        /// </summary>    
1100
+        [Description("业务协办")]
1101
+        Cooperation
1097 1102
     }
1098 1103
 }
1099 1104