Browse Source

提交分支

zhupei 3 years ago
parent
commit
ed46887c14

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

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

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

20
         // GET: Home
20
         // GET: Home
21
         public ActionResult Index()
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
             return Success("成功");
25
             return Success("成功");
24
         }
26
         }
25
         [Authorize]
27
         [Authorize]

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

20
 using System.Security.Cryptography;
20
 using System.Security.Cryptography;
21
 using System.Text;
21
 using System.Text;
22
 using System.Text.RegularExpressions;
22
 using System.Text.RegularExpressions;
23
+using System.Threading.Tasks;
23
 using System.Web;
24
 using System.Web;
24
 using System.Web.Mvc;
25
 using System.Web.Mvc;
25
 using System.Web.Script.Serialization;
26
 using System.Web.Script.Serialization;
1851
                 Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
1852
                 Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
1852
                 string uwhere = " ";
1853
                 string uwhere = " ";
1853
                 string sql = "";
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
                 for (int i = 0; i <= 9; i++)
1861
                 for (int i = 0; i <= 9; i++)
1860
                 {
1862
                 {
1861
                
1863
                
5204
         /// <returns></returns>
5206
         /// <returns></returns>
5205
         [WechatActionFilter]
5207
         [WechatActionFilter]
5206
         public ActionResult AssignWorkOrder(string OpenId, long orderid, string cont, WorkOrdeDeptment deptment, string F_Files, int isvisit = 1,
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
             if (!string.IsNullOrEmpty(OpenId))
5212
             if (!string.IsNullOrEmpty(OpenId))
5271
                     {
5273
                     {
5272
                         return Error("请选择接收部门");
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
                     if (markdepts.Contains(ua.F_DeptId.ToString()) && model.F_Flag == 9)
5282
                     if (markdepts.Contains(ua.F_DeptId.ToString()) && model.F_Flag == 9)
5275
                     {
5283
                     {
5276
                         if (markdepts.Contains(ua.F_DeptId.ToString()))
5284
                         if (markdepts.Contains(ua.F_DeptId.ToString()))
5296
                                 return Error("请选择接收部门");
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
                             var res1 = AssignWO(ua, model, input, cont, F_Files, clbm2, clid2, overtime, sms, isApprovalp, hclbm, hclid, "", 0, 2, flag);
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
                             {
5314
                             {
5307
                                 return Error("请选择接收部门");
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
                             Overorder(ua, model, 1);
5318
                             Overorder(ua, model, 1);
5311
                         }
5319
                         }
5312
                         else
5320
                         else
5315
                             {
5323
                             {
5316
                                 return Error("请选择接收部门");
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
                             Overorder(ua, model, 2);
5327
                             Overorder(ua, model, 2);
5320
                         }
5328
                         }
5321
                         return Success("转派成功");
5329
                         return Success("转派成功");
5490
                             if (modeldpts != null)
5498
                             if (modeldpts != null)
5491
                                 return Error("不允许同一个部门出现在两条线内,请重新指派!");
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
                         if (res)
5502
                         if (res)
5495
                         {
5503
                         {
5496
                             return Success("转派成功");
5504
                             return Success("转派成功");
5566
         /// <summary>
5574
         /// <summary>
5567
         /// 转派工单
5575
         /// 转派工单
5568
         /// </summary>
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
             if (model.F_limit > 0)
5580
             if (model.F_limit > 0)
5742
                     {
5750
                     {
5743
                         model.F_DealContent += cont + ";";
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
                 InToworkModel(model, input);
5771
                 InToworkModel(model, input);
5746
 
5772
 
5747
                 if (!string.IsNullOrEmpty(F_Files))
5773
                 if (!string.IsNullOrEmpty(F_Files))
5825
                {
5851
                {
5826
                 return Success("你的账号已在别处登录,你确定要再次登录吗?");
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
                 string sql = $" and F_IsDelete=0";
5859
                 string sql = $" and F_IsDelete=0";
5833
               //  sql += "and F_Type !=3";
5860
               //  sql += "and F_Type !=3";
5834
                 DataTable dt = new DataTable();
5861
                 DataTable dt = new DataTable();
7079
                     }
7106
                     }
7080
                     if (flag == 1 || ((model.F_Flag == null || model.F_Flag == 0) && flag == 3))
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
                     else if (flag == 2)
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
                     //model.F_SuperiorOpinion = string.IsNullOrEmpty(model.F_SuperiorOpinion) ? cont : model.F_SuperiorOpinion + "; " + cont;
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
                 sql += " and F_Type='" + EnumWOType.ConsultingNeeds.ToString() + "'";
163
                 sql += " and F_Type='" + EnumWOType.ConsultingNeeds.ToString() + "'";
164
             if (type == (int)EnumWOType.SpotCheck)//抽检
164
             if (type == (int)EnumWOType.SpotCheck)//抽检
165
                 sql += " and F_Type='" + EnumWOType.SpotCheck.ToString() + "'";
165
                 sql += " and F_Type='" + EnumWOType.SpotCheck.ToString() + "'";
166
+            if (type == (int)EnumWOType.Cooperation)//业务协办
167
+                sql += " and F_Type='" + EnumWOType.Cooperation.ToString() + "'";
166
             int recordCount = 0;
168
             int recordCount = 0;
167
 
169
 
168
          
170
          
238
                 sql += " and F_Type='" + EnumWOType.ConsultingNeeds.ToString() + "'";
240
                 sql += " and F_Type='" + EnumWOType.ConsultingNeeds.ToString() + "'";
239
             if (type == (int)EnumWOType.SpotCheck)//抽检
241
             if (type == (int)EnumWOType.SpotCheck)//抽检
240
                 sql += " and F_Type='" + EnumWOType.SpotCheck.ToString() + "'";
242
                 sql += " and F_Type='" + EnumWOType.SpotCheck.ToString() + "'";
243
+            if (type == (int)EnumWOType.Cooperation)//业务协办
244
+                sql += " and F_Type='" + EnumWOType.Cooperation.ToString() + "'";
241
             int recordCount = 0;
245
             int recordCount = 0;
242
             if (pid == 0 && type == (int)EnumWOType.Complaint)
246
             if (pid == 0 && type == (int)EnumWOType.Complaint)
243
             {
247
             {

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

15
 using System.IO;
15
 using System.IO;
16
 using System.Linq;
16
 using System.Linq;
17
 using System.Text.RegularExpressions;
17
 using System.Text.RegularExpressions;
18
+using System.Threading.Tasks;
18
 using System.Web;
19
 using System.Web;
19
 using System.Web.Mvc;
20
 using System.Web.Mvc;
20
 using System.Web.Script.Serialization;
21
 using System.Web.Script.Serialization;
661
                 Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
662
                 Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
662
                 string uwhere = " ";
663
                 string uwhere = " ";
663
                 string sql = "";
664
                 string sql = "";
664
-                if (!Refresh())
665
-                {
666
-                    return Error("查询失败");
667
-                }
665
+                //if (!Refresh())
666
+                //{
667
+                //    return Error("查询失败");
668
+                //}
669
+                Task.Run(() => Refresh());
668
                 int DZP = 0, YCD = 0, DJD = 0, DCL = 0, YQGD = 0, YZP = 0, DSP = 0, YCL = 0, GCDBL = 0, YBL = 0, WSP =
670
                 int DZP = 0, YCD = 0, DJD = 0, DCL = 0, YQGD = 0, YZP = 0, DSP = 0, YCL = 0, GCDBL = 0, YBL = 0, WSP =
669
                     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; ;
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
                 for (int i = 0; i <= 21; i++)
672
                 for (int i = 0; i <= 21; i++)
3326
                             dt.Columns.Add("问题数量");
3328
                             dt.Columns.Add("问题数量");
3327
                             dt.Columns.Add("销售基地");                                       
3329
                             dt.Columns.Add("销售基地");                                       
3328
                             dt.Columns.Add("生产批次号");
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
                             dt.Columns.Add("重要级别");
3341
                             dt.Columns.Add("重要级别");
3333
                             dt.Columns.Add("品牌");
3342
                             dt.Columns.Add("品牌");
3334
                             dt.Columns.Add("客户编号");
3343
                             dt.Columns.Add("客户编号");
3641
                                         Model.T_Wo_QuestionManage manage = quesBLL.GetModel(b);
3650
                                         Model.T_Wo_QuestionManage manage = quesBLL.GetModel(b);
3642
                                         if (manage != null)
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
                                     catch (Exception)
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
                                 drNew["重要级别"] = it.F_TS_Level;
3682
                                 drNew["重要级别"] = it.F_TS_Level;
3947
             int userId = CurrentUser.UserData.F_UserId;
3970
             int userId = CurrentUser.UserData.F_UserId;
3948
             if (userId != 0)
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
                 string sql = $" and F_IsDelete=0";
3978
                 string sql = $" and F_IsDelete=0";
3955
                 //   sql += "and F_Type !=3";
3979
                 //   sql += "and F_Type !=3";
3956
                 DataTable dt = new DataTable();
3980
                 DataTable dt = new DataTable();
4104
                             dt.Columns.Add("问题数量");
4128
                             dt.Columns.Add("问题数量");
4105
                             dt.Columns.Add("销售基地");
4129
                             dt.Columns.Add("销售基地");
4106
                             dt.Columns.Add("生产批次号");
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
                             dt.Columns.Add("重要级别");
4141
                             dt.Columns.Add("重要级别");
4111
                             dt.Columns.Add("品牌");
4142
                             dt.Columns.Add("品牌");
4112
                             dt.Columns.Add("客户编号");
4143
                             dt.Columns.Add("客户编号");
4398
                                         Model.T_Wo_QuestionManage manage = quesBLL.GetModel(b);
4429
                                         Model.T_Wo_QuestionManage manage = quesBLL.GetModel(b);
4399
                                         if (manage != null)
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
                                     catch (Exception)
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
                                 drNew["重要级别"] = it.F_TS_Level;
4461
                                 drNew["重要级别"] = it.F_TS_Level;
6578
                     model.F_DealType = model1[i].F_DealType;//处理方式:当即办理、电话转接、网络转办(点选)
6623
                     model.F_DealType = model1[i].F_DealType;//处理方式:当即办理、电话转接、网络转办(点选)
6579
                     model.F_WorkerBrand = model1[i].F_Brand;//工单品牌
6624
                     model.F_WorkerBrand = model1[i].F_Brand;//工单品牌
6580
                     //model.SuperiorOpinion = AssCont(model1[i].F_ID);//上级处理意见
6625
                     //model.SuperiorOpinion = AssCont(model1[i].F_ID);//上级处理意见
6581
-                    model.SuperiorOpinion = model1[i].F_SuperiorOpinion;//处理结果-外线
6626
+                    model.SuperiorOpinion = model1[i].F_SuperiorOpinion;
6582
                     model.SuperiorOpinion2 = model1[i].F_SuperiorOpinion2;//处理结果-内线
6627
                     model.SuperiorOpinion2 = model1[i].F_SuperiorOpinion2;//处理结果-内线
6583
                     #endregion
6628
                     #endregion
6584
                     if (!string.IsNullOrEmpty(model1[i].F_QuestionType))
6629
                     if (!string.IsNullOrEmpty(model1[i].F_QuestionType))
8371
         /// <returns></returns>
8416
         /// <returns></returns>
8372
         [Authority]
8417
         [Authority]
8373
         public ActionResult AssignWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment, string F_Files,
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
             int userId = CurrentUser.UserData.F_UserId;
8421
             int userId = CurrentUser.UserData.F_UserId;
8377
             string usercode = CurrentUser.UserData.F_UserCode;
8422
             string usercode = CurrentUser.UserData.F_UserCode;
8455
                 {
8500
                 {
8456
                     return Error("请选择接收部门");
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
                 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))
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
                     if (markdepts.Contains(ua.F_DeptId.ToString()))
8511
                     if (markdepts.Contains(ua.F_DeptId.ToString()))
8480
                             return Error("请选择接收部门");
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
                         var res1 = AssignWO(ua, model, input, cont, F_Files, clbm2, clid2, overtime, sms, isApprovalp, hclbm, hclid, "", 0, 2,flag);
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
                         {
8541
                         {
8491
                             return Error("请选择接收部门");
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
                         Overorder(ua, model,2,1);
8545
                         Overorder(ua, model,2,1);
8495
                         //DealWO(ua, model, input, "", "", 1, "", 1, "",flag);
8546
                         //DealWO(ua, model, input, "", "", 1, "", 1, "",flag);
8496
                     }
8547
                     }
8500
                         {
8551
                         {
8501
                             return Error("请选择接收部门");
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
                         Overorder(ua, model,2,2);
8555
                         Overorder(ua, model,2,2);
8505
                         //DealWO(ua, model, input, "", "", 1, "", 2, "",flag);
8556
                         //DealWO(ua, model, input, "", "", 1, "", 2, "",flag);
8506
                     }
8557
                     }
8694
                     }
8745
                     }
8695
                     //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();
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
                     if (res)
8749
                     if (res)
8699
                     {
8750
                     {
8700
                         return Success("转派成功");
8751
                         return Success("转派成功");
9902
             if (flag == 1)
9953
             if (flag == 1)
9903
             {
9954
             {
9904
                 model.F_State = wostate;//外线关闭
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
             else if (flag == 2)
9958
             else if (flag == 2)
9908
             {
9959
             {
9909
                 model.F_State2 = wostate;//内线关闭
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
             else
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
                 model.F_State = wostate;
9966
                 model.F_State = wostate;
9916
                 model.F_State2 = wostate;
9967
                 model.F_State2 = wostate;
9917
             }
9968
             }
10068
                     }
10119
                     }
10069
                     if (flag == 1 || ((model.F_Flag == null || model.F_Flag == 0) && flag == 3))
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
                     else if (flag == 2)
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
                 //if (!string.IsNullOrEmpty(eventreason))
10135
                 //if (!string.IsNullOrEmpty(eventreason))
10359
         /// <summary>
10416
         /// <summary>
10360
         /// 转派工单
10417
         /// 转派工单
10361
         /// </summary>
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
             #region 系统升级派单时限可修改2021/12/24
10421
             #region 系统升级派单时限可修改2021/12/24
10365
             //if (model.F_limit > 0)
10422
             //if (model.F_limit > 0)
10538
                     {
10595
                     {
10539
                         model.F_DealContent += cont + ";";
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
                 InToworkModel(model, input);
10616
                 InToworkModel(model, input);
10542
 
10617
 
10543
                 if (!string.IsNullOrEmpty(F_Files))
10618
                 if (!string.IsNullOrEmpty(F_Files))

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

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