duhongyu месяцев назад: 6
Родитель
Сommit
816eb213c2

Разница между файлами не показана из-за своего большого размера
+ 19 - 16
codegit/CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs


+ 20 - 9
codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_EquipmentNumber.cs

@@ -27,9 +27,9 @@ namespace CallCenterApi.DAL
27 27
         {
28 28
             StringBuilder strSql = new StringBuilder();
29 29
             strSql.Append("insert into T_Sys_EquipmentNumber(");
30
-            strSql.Append("F_Production,F_FactoryCode,F_LigatureMachineCode,F_StretchFilmCode,F_QCStaffCode,F_CreationTime,F_CreatUser,F_IsDelete)");
30
+            strSql.Append("F_Production,F_FactoryCode,F_LigatureMachineCode,F_StretchFilmCode,F_QCStaffCode,F_CreationTime,F_CreatUser,F_IsDelete,F_Manager)");
31 31
             strSql.Append(" values (");
32
-            strSql.Append("@F_Production,@F_FactoryCode,@F_LigatureMachineCode,@F_StretchFilmCode,@F_QCStaffCode,@F_CreationTime,@F_CreatUser,@F_IsDelete)");
32
+            strSql.Append("@F_Production,@F_FactoryCode,@F_LigatureMachineCode,@F_StretchFilmCode,@F_QCStaffCode,@F_CreationTime,@F_CreatUser,@F_IsDelete,@F_Manager)");
33 33
             strSql.Append(";select @@IDENTITY");
34 34
             SqlParameter[] parameters = {
35 35
                     new SqlParameter("@F_Production", SqlDbType.NVarChar,100),
@@ -39,7 +39,9 @@ namespace CallCenterApi.DAL
39 39
                     new SqlParameter("@F_QCStaffCode", SqlDbType.NVarChar,100),
40 40
                     new SqlParameter("@F_CreationTime", SqlDbType.DateTime),
41 41
                     new SqlParameter("@F_CreatUser", SqlDbType.NVarChar,50),
42
-                    new SqlParameter("@F_IsDelete", SqlDbType.BigInt,8)};
42
+                    new SqlParameter("@F_IsDelete", SqlDbType.BigInt,8),
43
+                    new SqlParameter("@F_Manager", SqlDbType.NVarChar,50)
44
+            };
43 45
             parameters[0].Value = model.F_Production;
44 46
             parameters[1].Value = model.F_FactoryCode;
45 47
             parameters[2].Value = model.F_LigatureMachineCode;
@@ -48,7 +50,8 @@ namespace CallCenterApi.DAL
48 50
             parameters[5].Value = model.F_CreationTime;
49 51
             parameters[6].Value = model.F_CreatUser;
50 52
             parameters[7].Value = model.F_IsDelete;
51
-
53
+            parameters[8].Value = model.F_Manager;
54
+            
52 55
             object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
53 56
             if (obj == null)
54 57
             {
@@ -73,6 +76,7 @@ namespace CallCenterApi.DAL
73 76
             strSql.Append("F_QCStaffCode=@F_QCStaffCode,");
74 77
             strSql.Append("F_CreationTime=@F_CreationTime,");
75 78
             strSql.Append("F_CreatUser=@F_CreatUser,");
79
+            strSql.Append("F_Manager=@F_Manager,");
76 80
             strSql.Append("F_IsDelete=@F_IsDelete");
77 81
             strSql.Append(" where F_ID=@F_ID");
78 82
             SqlParameter[] parameters = {
@@ -83,6 +87,7 @@ namespace CallCenterApi.DAL
83 87
                     new SqlParameter("@F_QCStaffCode", SqlDbType.NVarChar,100),
84 88
                     new SqlParameter("@F_CreationTime", SqlDbType.DateTime),
85 89
                     new SqlParameter("@F_CreatUser", SqlDbType.NVarChar,50),
90
+                    new SqlParameter("@F_Manager", SqlDbType.NVarChar,50),
86 91
                     new SqlParameter("@F_IsDelete", SqlDbType.BigInt,8),
87 92
                     new SqlParameter("@F_ID", SqlDbType.Int,4)};
88 93
             parameters[0].Value = model.F_Production;
@@ -92,8 +97,9 @@ namespace CallCenterApi.DAL
92 97
             parameters[4].Value = model.F_QCStaffCode;
93 98
             parameters[5].Value = model.F_CreationTime;
94 99
             parameters[6].Value = model.F_CreatUser;
95
-            parameters[7].Value = model.F_IsDelete;
96
-            parameters[8].Value = model.F_ID;
100
+            parameters[7].Value = model.F_Manager;
101
+            parameters[8].Value = model.F_IsDelete;
102
+            parameters[9].Value = model.F_ID;
97 103
 
98 104
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
99 105
             if (rows > 0)
@@ -157,7 +163,7 @@ namespace CallCenterApi.DAL
157 163
         {
158 164
 
159 165
             StringBuilder strSql = new StringBuilder();
160
-            strSql.Append("select  top 1 F_ID,F_Production,F_FactoryCode,F_LigatureMachineCode,F_StretchFilmCode,F_QCStaffCode,F_CreationTime,F_CreatUser,F_IsDelete from T_Sys_EquipmentNumber ");
166
+            strSql.Append("select  top 1 F_ID,F_Production,F_FactoryCode,F_LigatureMachineCode,F_StretchFilmCode,F_QCStaffCode,F_CreationTime,F_CreatUser,F_IsDelete,F_Manager from T_Sys_EquipmentNumber ");
161 167
             strSql.Append(" where F_ID=@F_ID");
162 168
             SqlParameter[] parameters = {
163 169
                     new SqlParameter("@F_ID", SqlDbType.Int,4)
@@ -221,6 +227,11 @@ namespace CallCenterApi.DAL
221 227
                 {
222 228
                     model.F_IsDelete = long.Parse(row["F_IsDelete"].ToString());
223 229
                 }
230
+                if (row["F_Manager"] != null)
231
+                {
232
+                    model.F_Manager = row["F_Manager"].ToString();
233
+                }
234
+                
224 235
             }
225 236
             return model;
226 237
         }
@@ -231,7 +242,7 @@ namespace CallCenterApi.DAL
231 242
         public DataSet GetList(string strWhere)
232 243
         {
233 244
             StringBuilder strSql = new StringBuilder();
234
-            strSql.Append("select F_ID,F_Production,F_FactoryCode,F_LigatureMachineCode,F_StretchFilmCode,F_QCStaffCode,F_CreationTime,F_CreatUser,F_IsDelete ");
245
+            strSql.Append("select F_ID,F_Production,F_FactoryCode,F_LigatureMachineCode,F_StretchFilmCode,F_QCStaffCode,F_CreationTime,F_CreatUser,F_IsDelete,F_Manager ");
235 246
             strSql.Append(" FROM T_Sys_EquipmentNumber ");
236 247
             if (strWhere.Trim() != "")
237 248
             {
@@ -251,7 +262,7 @@ namespace CallCenterApi.DAL
251 262
             {
252 263
                 strSql.Append(" top " + Top.ToString());
253 264
             }
254
-            strSql.Append(" F_ID,F_Production,F_FactoryCode,F_LigatureMachineCode,F_StretchFilmCode,F_QCStaffCode,F_CreationTime,F_CreatUser,F_IsDelete ");
265
+            strSql.Append(" F_ID,F_Production,F_FactoryCode,F_LigatureMachineCode,F_StretchFilmCode,F_QCStaffCode,F_CreationTime,F_CreatUser,F_IsDelete,F_Manager ");
255 266
             strSql.Append(" FROM T_Sys_EquipmentNumber ");
256 267
             if (strWhere.Trim() != "")
257 268
             {

+ 12 - 16
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/EquipmentNumberController.cs

@@ -24,6 +24,8 @@ namespace CallCenterApi.Interface.Controllers
24 24
             public string F_LigatureMachineCode { get; set; }//结扎机编号
25 25
             public string F_StretchFilmCode { get; set; }//拉伸膜包装机编号
26 26
             public string F_QCStaffCode { get; set; }//品管员代码
27
+            public string F_Manager { get; set; }//负责人
28
+            
27 29
         }
28 30
         /// <summary>
29 31
         /// 添加设备编号
@@ -46,6 +48,7 @@ namespace CallCenterApi.Interface.Controllers
46 48
                 dModel.F_LigatureMachineCode = input.F_LigatureMachineCode;
47 49
                 dModel.F_StretchFilmCode = input.F_StretchFilmCode;
48 50
                 dModel.F_QCStaffCode = input.F_QCStaffCode;
51
+                dModel.F_Manager = input.F_Manager;
49 52
                 dModel.F_CreationTime = DateTime.Now;
50 53
                 if (userModel != null)
51 54
                     dModel.F_CreatUser = userModel.F_UserCode;
@@ -153,6 +156,7 @@ namespace CallCenterApi.Interface.Controllers
153 156
                 dModel.F_LigatureMachineCode = input.F_LigatureMachineCode;
154 157
                 dModel.F_StretchFilmCode = input.F_StretchFilmCode;
155 158
                 dModel.F_QCStaffCode = input.F_QCStaffCode;
159
+                dModel.F_Manager = input.F_Manager;
156 160
                 dModel.F_IsDelete = 0;
157 161
                 bool  id = EquipmentBLL.Update(dModel);
158 162
                 if (id)
@@ -207,7 +211,7 @@ namespace CallCenterApi.Interface.Controllers
207 211
                 dt = BLL.PagerBLL.GetListPager(
208 212
                     "T_Sys_EquipmentNumber",
209 213
                     "F_ID",
210
-                    "*",
214
+                    "*,dbo.GetUserName(F_Manager) ManagerName ",
211 215
                     sql,
212 216
                     "ORDER BY T_Sys_EquipmentNumber.F_ID desc",
213 217
                     pagesize,
@@ -215,24 +219,16 @@ namespace CallCenterApi.Interface.Controllers
215 219
                     true,
216 220
                     out recordCount);
217 221
             }
218
-            List<Model.T_Sys_EquipmentNumber> modlelist = new BLL.T_Sys_EquipmentNumber().DataTableToList(dt);
219
-            if (modlelist.Count > 0)
220
-            {
221
-                var obj = new
222
-                {
223
-                    state = "success",
224
-                    message = "成功",
225
-                    rows = modlelist,
226
-                    total = recordCount
227
-                };
228 222
 
229
-                return Content(obj.ToJson()); ;
230
-            }
231
-            else
223
+            var obj = new
232 224
             {
225
+                state = "success",
226
+                message = "成功",
227
+                rows = dt,
228
+                total = recordCount
229
+            };
233 230
 
234
-                return Success("暂无数据"); ;
235
-            }
231
+            return Content(obj.ToJson()); ;
236 232
         }
237 233
         /// <summary>
238 234
         /// 查询设备详情

+ 1 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/PushMessageController.cs

@@ -270,6 +270,7 @@ namespace CallCenterApi.Interface.Controllers
270 270
             var res = itembll.Update(itemlist);
271 271
             return res;
272 272
         }
273
+        [Authority]
273 274
         public ActionResult  PutAppClientIdAsync(string clientid, int apptype = 1)
274 275
         {
275 276
             int userId = CurrentUser.UserData.F_UserId;

+ 19 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -382,6 +382,15 @@ namespace CallCenterApi.Interface.Controllers
382 382
 
383 383
                     }
384 384
                 }
385
+                 if (!string .IsNullOrEmpty(filter.code))
386
+                {
387
+                    var role = new BLL.T_Sys_RoleInfo().GetModelList($"F_RoleCode='{filter.code}'");
388
+                    if (role!=null&& role.Count>0)
389
+                    {
390
+                        sql += $"and F_RoleId = {role.FirstOrDefault().F_RoleId}";
391
+                    }
392
+                    
393
+                }
385 394
                 if (filter.dptid > 0)
386 395
                 {
387 396
                     Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(filter.dptid);
@@ -520,7 +529,7 @@ namespace CallCenterApi.Interface.Controllers
520 529
         //获取用户信息
521 530
         public ActionResult GetUser(int userId = 0, string userCode = "")
522 531
         {
523
-            if (Request.IsAuthenticated)
532
+           if (Request.IsAuthenticated)
524 533
             {
525 534
                 string sql = "";
526 535
                 if (userId > 0)
@@ -529,7 +538,7 @@ namespace CallCenterApi.Interface.Controllers
529 538
                 }
530 539
                 if (!string.IsNullOrWhiteSpace(userCode))
531 540
                 {
532
-                    sql += " and F_UserCode=" + userCode;
541
+                    sql += " and F_UserCode='" + userCode+"'";
533 542
                 }
534 543
                 if (string.IsNullOrWhiteSpace(sql))
535 544
                     return Error("获取失败");
@@ -682,6 +691,10 @@ namespace CallCenterApi.Interface.Controllers
682 691
                     {
683 692
                         userAccountModel.F_See = "3";
684 693
                     }
694
+                    else if (ro.F_RoleCode == "GCFZR")
695
+                    {
696
+                        userAccountModel.F_See = "6";
697
+                    }
685 698
                     else if (input.RoleId>=68& input.RoleId < 74)
686 699
                     {
687 700
                         userAccountModel.F_See = "2";
@@ -866,6 +879,10 @@ namespace CallCenterApi.Interface.Controllers
866 879
                     {
867 880
                         userAccountModel.F_See = "3";
868 881
                     }
882
+                    else if (ro.F_RoleCode == "GCFZR")
883
+                    {
884
+                        userAccountModel.F_See = "6";
885
+                    }
869 886
                     else if (input.RoleId >= 68 & input.RoleId < 74)
870 887
                     {
871 888
                         userAccountModel.F_See = "2";

+ 26 - 16
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

@@ -596,33 +596,43 @@ namespace CallCenterApi.Interface.Controllers.tel
596 596
         /// 录音事件
597 597
         /// </summary>
598 598
         /// <returns></returns>
599
-        public ActionResult UpdateLY()
599
+        public ActionResult UpdateLY(string callid)
600 600
         {
601 601
             
602 602
             if (Request.IsAuthenticated)
603 603
             {
604
-
605
-                Model.T_Call_CallRecords model = new Model.T_Call_CallRecords();
606
-                model.CallId = RequestString.GetFormString("callid");
607
-                model.CallState = 1;
608
-                model.DealType = 6;
609
-                //model.FilePath = RequestString.GetFormString("path");
610
-                bool bl = new BLL.T_Call_CallRecords().UpdateCallInPathTelRecord(model);
611
-                if (bl)
604
+                Model.T_Call_CallRecords vmodel = new BLL.T_Call_CallRecords().GetModelByCallId(callid);
605
+                if (vmodel!=null)
612 606
                 {
613
-                    Model.T_Call_CallRecords vmodel = new BLL.T_Call_CallRecords().GetModelByCallId(model.CallId);
614 607
                     string type = vmodel.OperateType.ToString();
615 608
                     if (type == "7")
616 609
                     {
617 610
                         new BLL.T_Call_TaskTelNum().UpdateYJ(Convert.ToInt32(vmodel.OperateObject.ToString()), 1);
618
-                    }
619 611
 
620
-                    return Success("更新挂机状态成功");
621
-                }
622
-                else
623
-                {
624
-                    return Success("更新挂机状态失败");
612
+                    }
625 613
                 }
614
+                return Success("更新挂机状态成功");
615
+                //Model.T_Call_CallRecords model = new Model.T_Call_CallRecords();
616
+                //model.CallId = RequestString.GetFormString("callid");
617
+                //model.CallState = 1;
618
+                //model.DealType = 6;
619
+                ////model.FilePath = RequestString.GetFormString("path");
620
+                //bool bl = new BLL.T_Call_CallRecords().UpdateCallInPathTelRecord(model);
621
+                //if (bl)
622
+                //{
623
+                //    Model.T_Call_CallRecords vmodel = new BLL.T_Call_CallRecords().GetModelByCallId(model.CallId);
624
+                //    string type = vmodel.OperateType.ToString();
625
+                //    if (type == "7")
626
+                //    {
627
+                //        new BLL.T_Call_TaskTelNum().UpdateYJ(Convert.ToInt32(vmodel.OperateObject.ToString()), 1);
628
+                //    }
629
+
630
+                //    return Success("更新挂机状态成功");
631
+                //}
632
+                //else
633
+                //{
634
+                //    return Success("更新挂机状态失败");
635
+                //}
626 636
 
627 637
             }
628 638
             return NoToken("未知错误,请重新登录");

+ 96 - 10
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -85,7 +85,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
85 85
             string productName,string producttypes,string complaintType,string notifications,string keywords, string dealTimely,string ywy,int IsReduction=-1, 
86 86
             int CJ=0,int duplicate=-1, int see = 0, int source = 0, int type = 0, int state = -1, int pageindex = 1,
87 87
             int pagesize = 10,int isdc=0,int istime=-1 , int reminder=-1, int incomplete = -1,int isdealfile=-1,
88
-            int isreductions=0,int comprehensive=-1)
88
+            int isreductions=0,int comprehensive=-1,int isManager=0)
89 89
         {
90 90
            int userId = CurrentUser.UserData.F_UserId; ;
91 91
             if (userId != 0)
@@ -124,8 +124,32 @@ namespace CallCenterApi.Interface.Controllers.workorder
124 124
                 {
125 125
                     sql += $" and c.F_ComplaintType='{complaintType}'";
126 126
                 }
127
-                
127
+                if (isManager>0)
128
+                {
129
+                    var eqipment = new BLL.T_Sys_EquipmentNumber().GetModelList($"F_Manager='{ua.F_UserCode}' and F_IsDelete=0 ");
130
+                    if (eqipment!=null&& eqipment.Count>0)
131
+                    {
132
+                        string eqipmentstr = "";
133
+                        foreach(var it in eqipment)
134
+                        {
135
+                            eqipmentstr += ",'" + it.F_Production+"'";
136
+                        }
137
+                        sql += $" and c.F_Manufacturer in ({eqipmentstr.TrimStart(',')})";
138
+                    }
139
+                    else
140
+                    {
141
+                        var obj = new
142
+                        {
143
+                            state = "success",
144
+                            message = "成功",
145
+                            rows = "",
146
+                            total = 0
147
+                        };
128 148
 
149
+                        return Content(obj.ToJson()); ;
150
+                    }
151
+                    
152
+                }
129 153
 
130 154
                 if (CJ == 1)
131 155
                 {
@@ -306,12 +330,23 @@ namespace CallCenterApi.Interface.Controllers.workorder
306 330
                         {
307 331
                             sql+= " and (F_Notifications ='"+ user .F_UserCode + "' or  F_ReceivingPerson='" + user.F_UserCode + "')";
308 332
                      
333
+                      }
334
+                      else
335
+                      {
336
+                         if (isisAllDigits(keywords)&& (keywords.Trim().Length==10|| keywords.Trim().Length == 11))
337
+                         {
338
+                            sql += $"  and (F_CusPhone like '%{keywords.Trim()}' or F_CusPhone like '{keywords.Trim()}%'   )";
339
+                         }
340
+                         else
341
+                        {
342
+                            sql += $"  and (c.F_CusPhone like '%" + keywords.Trim() + "%' or c.F_QualityProblem like '%" + keywords.Trim() + "%'or F_Samplingtype like '%" + keywords.Trim() + "%'or F_Salesroom like '%" + keywords.Trim()
343
+                          + "%'or c.F_Samplingproducts like '%" + keywords.Trim() + "%'or c.F_Factories like '%"
344
+                          + keywords.Trim() + "%'or c.F_DealResult like '%" + keywords.Trim() + "%'or c.F_AddRess like '%"
345
+                          + keywords.Trim() + "%'or c.F_Remark like '%" + keywords.Trim() + "%'or c.F_Content like '%" + keywords.Trim() + "%' ) ";
346
+                        }
347
+                       
309 348
                     }
310
-                        else
311
-                        sql += $"  and (c.F_CusPhone like '%" + keywords.Trim() + "%' or c.F_QualityProblem like '%" + keywords.Trim() + "%'or F_Samplingtype like '%" + keywords.Trim() + "%'or F_Salesroom like '%" + keywords.Trim() 
312
-                            + "%'or c.F_Samplingproducts like '%" + keywords.Trim() + "%'or c.F_Factories like '%"
313
-                            + keywords.Trim() + "%'or c.F_DealResult like '%" + keywords.Trim() + "%'or c.F_AddRess like '%"
314
-                            + keywords.Trim() + "%'or c.F_Remark like '%" + keywords.Trim() + "%'or c.F_Content like '%" + keywords.Trim() + "%' ) ";
349
+                       
315 350
                 }
316 351
                 
317 352
                 if (!string.IsNullOrWhiteSpace(code))//工单编号
@@ -662,6 +697,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
662 697
 
663 698
             #endregion
664 699
         }
700
+        private bool isisAllDigits(string str)
701
+        {
702
+            return System.Text.RegularExpressions.Regex.IsMatch(str, @"^\d+$");
703
+        }
665 704
         /// <summary>
666 705
         /// 获取电商工单列表
667 706
         /// </summary>
@@ -1441,7 +1480,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
1441 1480
             if (model != null)
1442 1481
             {
1443 1482
                 list.Add(model);
1444
-                var itemlasts = itembll.GetModelList("  F_WoID=" + +model.F_Id + "or (F_WoID=" + model.F_Id + "and  F_ItemType =12 AND F_OptType=12)"); 
1483
+                //var itemlasts = itembll.GetModelList("  F_WoID=" + +model.F_Id + "or (F_WoID=" + model.F_Id + "and  F_ItemType =12 AND F_OptType=12)");
1484
+                var itemlasts = itembll.GetModelList("  F_WoID=" + +model.F_Id );
1445 1485
                 var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
1446 1486
                 var FileUrl = GetFileData(model.F_DealFile.ToString(), configfj.F_ParamValue);
1447 1487
                 if (list.Count > 0)
@@ -1488,7 +1528,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
1488 1528
                 if (model != null)
1489 1529
                 {
1490 1530
                     list.Add(model);
1491
-                    var  item  = itembll.GetModelList("  F_WoID=" + +model.F_Id + "or (F_WoID="  +model.F_Id + "and  F_ItemType =12 AND F_OptType=12)");
1531
+                    //var  item  = itembll.GetModelList("  F_WoID=" + +model.F_Id + "or (F_WoID="  +model.F_Id + "and  F_ItemType =12 AND F_OptType=12)");
1532
+                    var item = itembll.GetModelList("  F_WoID=" + +model.F_Id );
1492 1533
                     List <BusOpt> itemlasts = GetOpt(item);
1493 1534
                     var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
1494 1535
                     var FileUrl = GetFileData(model.F_DealFile.ToString(), configfj.F_ParamValue);
@@ -1695,7 +1736,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1695 1736
                 var model = workorderBLL.GetModel(id);
1696 1737
                 if (model != null)
1697 1738
                     list.Add(model);
1698
-                var item = itembll.GetModelList("  F_WoID=" + +id + "and  (F_ItemType=12 AND F_OptType=12)");
1739
+                var item = itembll.GetModelList("  F_WoID=" + +id + "and  F_ItemType=12 AND F_OptType=12");
1699 1740
                 List<BusOpt> itemlasts = GetOpt(item);
1700 1741
                 var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
1701 1742
                 var FileUrl = GetFileData(model.F_DealFile.ToString(), configfj.F_ParamValue);
@@ -2075,6 +2116,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2075 2116
                                 model.F_Duplicate = model.F_Type;
2076 2117
                             }
2077 2118
                             model.F_Type = 3;
2119
+                            model.F_RepeatCreateTime = DateTime.Now;
2078 2120
                             var res = workorderBLL.Update(model);
2079 2121
                             if (res)
2080 2122
                             {
@@ -3237,6 +3279,24 @@ namespace CallCenterApi.Interface.Controllers.workorder
3237 3279
                 {
3238 3280
                     model.F_ProcessingTime = DateTime.Now;
3239 3281
                 }
3282
+                else
3283
+                {
3284
+                    if(!string .IsNullOrEmpty(model.F_Manufacturer))
3285
+                    {
3286
+                        var eqipment = new BLL.T_Sys_EquipmentNumber().GetModelList($"F_Production='{model.F_Manufacturer}' and F_IsDelete=0 ");
3287
+                        if (eqipment!=null&& eqipment.Count>0)
3288
+                        {
3289
+                            if (!string .IsNullOrEmpty(eqipment.FirstOrDefault().F_Manager))
3290
+                            {
3291
+                                new PushMessageController().
3292
+                      PushFeiShui(model, "工单处理提醒", "您负责的工厂工单已处理", eqipment.FirstOrDefault().F_Manager, model.F_Id);
3293
+                            }
3294
+                         
3295
+                        }
3296
+                     
3297
+                    }
3298
+                    
3299
+                }
3240 3300
                 //处理内容
3241 3301
                 if (!string.IsNullOrEmpty(model.F_DealResult))
3242 3302
                     model.F_DealResult +=";" +cont ;
@@ -3712,6 +3772,32 @@ namespace CallCenterApi.Interface.Controllers.workorder
3712 3772
             itemModel.F_IsUsed = F_IsUsed;
3713 3773
             itemModel.F_CreateTime = DateTime.Now;
3714 3774
             itemModel.F_CreateUser = nowUser.F_UserCode;
3775
+            if ((wostate == 4|| wostate == 10)&&(opttype == 4 || opttype == 10))
3776
+            {
3777
+                try
3778
+                {
3779
+                    var count = DbHelperSQL.GetSingle("select count(1) " +
3780
+                                    "from T_Bus_Result where  F_WoID=" + woid);
3781
+                    if (int.Parse(count.ToString()) > 0)
3782
+                    {
3783
+                        string sql = " update T_Bus_Result " +
3784
+                            $" set F_DealResult='; {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} {content}' where F_WoID={woid}";
3785
+                        DbHelperSQL.GetSingle(sql);
3786
+                    }
3787
+                    else
3788
+                    {
3789
+                        string Sql = string.Format(@"INSERT INTO T_Bus_Result ( [F_WoID], [F_DealResult]) 
3790
+                   values   ('{0}','{1}') ;select @@IDENTITY ",
3791
+                    woid, content);
3792
+                       DbHelperSQL.GetSingle(Sql);
3793
+                    }
3794
+                }
3795
+                catch(Exception E)
3796
+                {
3797
+                    LogFactory.GetLogger("T_Bus_Result").Error(E.ToJson());
3798
+                }
3799
+             
3800
+            }
3715 3801
             var res = itembll.Add(itemModel);
3716 3802
             return res;
3717 3803
         }

Разница между файлами не показана из-за своего большого размера
+ 103 - 9
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs


+ 2 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Filter/FilterUserAccount.cs

@@ -14,6 +14,8 @@ namespace CallCenterApi.Interface.Models.Filter
14 14
         }
15 15
         public int dptid { get; set; } = 0;
16 16
         public string Key { get; set; } = "";
17
+        public string code { get; set; } = "";
18
+        
17 19
         public int type { get; set; } = 0;
18 20
     }
19 21
 }

+ 2 - 1
codegit/CallCenterApi/CallCenterApi.Model/T_Bus_WorkOrder.cs

@@ -600,10 +600,11 @@ namespace CallCenterApi.Model
600 600
             set { _f_deletetime = value; }
601 601
             get { return _f_deletetime; }
602 602
         }
603
+        public DateTime? F_RepeatCreateTime { get; set; }
603 604
        /// <summary>
604 605
        /// 产品类型
605 606
        /// </summary>
606
-       public string F_ProductTypes { set; get; }
607
+        public string F_ProductTypes { set; get; }
607 608
         /// <summary>
608 609
         /// 投诉类型
609 610
         /// </summary>

+ 5 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Sys_EquipmentNumber.cs

@@ -91,6 +91,11 @@ namespace CallCenterApi.Model
91 91
             set { _f_isdelete = value; }
92 92
             get { return _f_isdelete; }
93 93
         }
94
+
95
+        public string F_Manager
96
+        {
97
+            get;set;
98
+        }
94 99
         #endregion Model
95 100
 
96 101
     }