duhongyu лет назад: 5
Родитель
Сommit
e6c5aeb526

+ 5 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerNewController.cs

@@ -446,7 +446,7 @@ namespace CallCenterApi.Interface.Controllers.customer
446 446
                 if (getunique(0, input.F_CustomerCode))
447 447
                     return Error("编号已被占用,请重新输入!");
448 448
             }
449
-            if (string.IsNullOrEmpty(input.F_LegalPhone.Trim()))
449
+            if (string.IsNullOrEmpty(input.F_LegalPhone))
450 450
                 return Error("请输入客户电话");
451 451
             if (getunphone(0, input.F_LegalPhone.Trim()))
452 452
                 return Error("已存在该客户请勿重复添加");
@@ -502,8 +502,11 @@ namespace CallCenterApi.Interface.Controllers.customer
502 502
             #region 添加验证判断
503 503
             if (input.F_CustomerId <= 0)
504 504
                 return Error("参数错误!");
505
+             if (string.IsNullOrEmpty(input.F_LegalPhone))
506
+                return Error("请输入客户电话");
505 507
             if (getunique(input.F_CustomerId, input.F_CustomerCode))
506 508
                 return Error("编号已被占用,请重新输入!");
509
+
507 510
             if (!string.IsNullOrEmpty(input.F_SalesPhone))
508 511
             {
509 512
                 if (!IsNumeric(input.F_SalesPhone))
@@ -664,7 +667,7 @@ namespace CallCenterApi.Interface.Controllers.customer
664 667
             model.F_Channel = input.F_Channel;// 渠道类型:总经销、二级商、种田大户、农户、化工客户、公司员工
665 668
             model.F_Credit = input.F_Credit;//信用等级:一星、二星、三星、四星、五星、空
666 669
             model.F_Legal = input.F_Legal;//法人 
667
-            model.F_LegalPhone = input.F_LegalPhone.Trim();//法人电话
670
+            model.F_LegalPhone = input.F_LegalPhone;//法人电话
668 671
             model.F_AddressProvince = input.F_AddressProvince;//省
669 672
             model.F_AddressCity = input.F_AddressCity;//市
670 673
             model.F_AddressCountry = input.F_AddressCountry;//县

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

@@ -2,11 +2,12 @@
2 2
 using CallCenterApi.DB;
3 3
 using CallCenterApi.Interface.App_Start;
4 4
 using CallCenterApi.Interface.Controllers.Base;
5
-using CallCenterApi.Interface.Controllers.workorder;
6 5
 using CallCenterApi.Interface.Models.Enum;
7 6
 using CallCenterApi.Interface.Models.Input;
8 7
 using CallCenterAPI.WechatSDK;
9 8
 using CallCenterAPI.WechatSDK.Models;
9
+using Newtonsoft.Json;
10
+using Newtonsoft.Json.Linq;
10 11
 using qcloudsms_csharp;
11 12
 using System;
12 13
 using System.Collections.Generic;
@@ -427,15 +428,16 @@ namespace CallCenterApi.Interface.Controllers.weixin
427 428
             var length = NonceStrings.Length;
428 429
 
429 430
             //生成15位数的随机字符串,当然也可以通过控制对应字符串大小生成,但是至多不超过32位
430
-            for (int i = 0; i < 15; i++)
431
+            for (int i = 0; i < 16; i++)
431 432
             {
432 433
                 sb.Append(NonceStrings[random.Next(length - 1)]);//通过random获得的随机索引到,NonceStrings数组中获取对应数组值
433 434
             }
434 435
             return sb.ToString();
435 436
         }
436
-        public ActionResult  GetJsSdk(string url)
437
+       
438
+        public ActionResult GetJsSdk(string url)
437 439
         {
438
-            var  timestamp = GetCurrentUinxTime();
440
+            var timestamp = GetCurrentUinxTime();
439 441
             var nonceStr = CreateNonceStr();
440 442
             var obj = new
441 443
             {
@@ -444,24 +446,96 @@ namespace CallCenterApi.Interface.Controllers.weixin
444 446
                 appId = AppId,
445 447
                 timestamp = timestamp,
446 448
                 nonceStr = nonceStr,
447
-                signature= GetSignature(sig(), nonceStr, timestamp, url)
449
+                token = GetToken(),
450
+                ticket= Getticket(GetToken()),
451
+                url,
452
+                signature = GetSignature(Getticket(GetToken()), nonceStr, timestamp, url)
448 453
             };
449 454
             return Content(obj.ToJson()); ;
450 455
         }
451
-        private void PrepareArg()
452
-        {
453
-            //  return;
454
-            var url = Request.Url.ToString();
455
-            var timestamp = GetCurrentUinxTime();
456
-            var nonceStr = CreateNonceStr();
457
-          var signature = sig();
458
-            ViewBag.timestamp = timestamp;
459
-            ViewBag.nonceStr = nonceStr;
460
-            ViewBag.signature = signature;
461
-        }
456
+      
462 457
        string     AppId = Configs.GetValue("WechatAppid");
463 458
         string   AppSecret = Configs.GetValue("WechatAppsecret");
464
-      public ActionResult Getsig()
459
+        public class Token
460
+        {
461
+            public string token;
462
+            public DateTime time;
463
+        }
464
+       
465
+        public class AssedToken
466
+        {
467
+          
468
+            public string access_token { get; set; }
469
+          
470
+            public int expires_in { get; set; }
471
+          
472
+          
473
+        }
474
+        public string  GetToken()
475
+        {
476
+            WebClient web = new WebClient();
477
+            web.Encoding = Encoding.UTF8;
478
+            string msg = "";
479
+            var model = new BLL.T_Sys_AssToken().GetModelList("F_IsDelete=0 order by F_ID desc").FirstOrDefault();
480
+            if (model!=null )
481
+            {
482
+                System.TimeSpan id = DateTime.Now - DateTime.Parse(model.F_CreatTime .ToString());
483
+                if (id.TotalMinutes>=120)
484
+                {
485
+                    string url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + AppId + "&secret=" + AppSecret;
486
+                    string Dataaa = web.DownloadString(url);//这一句话就能请求到数据了
487
+                    JObject jo = (JObject)JsonConvert.DeserializeObject(Dataaa);
488
+                    string access_token = jo["access_token"].ToString();
489
+                   
490
+                    var asser = new Model.T_Sys_AssToken();
491
+                    asser.F_CreatTime = DateTime.Now;
492
+                    asser.F_IsDelete = 0;
493
+                    asser.F_Token = access_token;
494
+                    int a = new BLL.T_Sys_AssToken().Add(asser);
495
+                    if (a >0)
496
+                    {
497
+                        msg = access_token;
498
+                    }
499
+                }
500
+                else
501
+                {
502
+                    msg = model.F_Token ;
503
+                }
504
+            }
505
+            else
506
+            {
507
+                string url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + AppId + "&secret=" + AppSecret;
508
+                string Dataaa = web.DownloadString(url);//这一句话就能请求到数据了
509
+                JObject jo = (JObject)JsonConvert.DeserializeObject(Dataaa);
510
+                string access_token = jo["access_token"].ToString();
511
+                var asser = new Model.T_Sys_AssToken();
512
+                asser.F_CreatTime = DateTime.Now;
513
+                asser.F_IsDelete = 0;
514
+                asser.F_Token = access_token;
515
+                int a = new BLL.T_Sys_AssToken().Add(asser);
516
+                if (a > 0)
517
+                {
518
+                    msg = access_token;
519
+                }
520
+            }
521
+            
522
+            return msg;
523
+        }
524
+       
525
+        public string  Getticket(string token)
526
+        {
527
+            WebClient web = new WebClient();
528
+            web.Encoding = Encoding.UTF8;
529
+            string msg = "";
530
+            string urltoken = " https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=" + token + "&type=jsapi";
531
+            string Dataaasig = web.DownloadString(urltoken);//这一句话就能请求到数据了
532
+            JObject jo = (JObject)JsonConvert.DeserializeObject(Dataaasig);
533
+            string ticket = jo["ticket"].ToString();
534
+            string errmsg = jo["errmsg"].ToString();
535
+           
536
+            return ticket;
537
+        }
538
+        public ActionResult Getsig()
465 539
         {
466 540
             WebClient web = new WebClient();
467 541
             web.Encoding = Encoding.UTF8;
@@ -582,16 +656,30 @@ namespace CallCenterApi.Interface.Controllers.weixin
582 656
                           .Append("timestamp=").Append(timestamp).Append("&")
583 657
                           .Append("url=").Append(url.IndexOf("#") >= 0 ? url.Substring(0, url.IndexOf("#")) : url);
584 658
 
585
-            return Sha1(string1Builder.ToString(), Encoding.UTF8);
659
+            return Sha1Sign(string1Builder.ToString());
586 660
         }
587 661
 
588
-        /// <summary>
589
-        /// 签名加密,使用SHA加密所得
590
-        /// </summary>
591
-        /// <param name="content">签名加密参数</param>
592
-        /// <param name="encode">编码UTF-8</param>
593
-        /// <returns></returns>
594
-        public static string Sha1(string content, Encoding encode)
662
+        public static string Sha1Sign(string data)
663
+        {
664
+            byte[] temp1 = Encoding.UTF8.GetBytes(data);
665
+            SHA1CryptoServiceProvider sha = new SHA1CryptoServiceProvider();
666
+            byte[] temp2 = sha.ComputeHash(temp1);
667
+            sha.Clear();
668
+            // 注意, 不能用这个
669
+            // string output = Convert.ToBase64String(temp2);// 不能直接转换成base64string
670
+            var output = BitConverter.ToString(temp2);
671
+            output = output.Replace("-", "");
672
+            output = output.ToLower();
673
+            return output;
674
+        }
675
+
676
+            /// <summary>
677
+            /// 签名加密,使用SHA加密所得
678
+            /// </summary>
679
+            /// <param name="content">签名加密参数</param>
680
+            /// <param name="encode">编码UTF-8</param>
681
+            /// <returns></returns>
682
+            public static string Sha1(string content, Encoding encode)
595 683
         {
596 684
             try
597 685
             {
@@ -609,6 +697,29 @@ namespace CallCenterApi.Interface.Controllers.weixin
609 697
             }
610 698
         }
611 699
         /// <summary>
700
+        /// SHA1加密
701
+        /// </summary>
702
+        /// <param name="content">待加密的字符串</param>
703
+        /// <param name="encode">编码方式</param>
704
+        /// <returns></returns>
705
+        public static string  Sha1Sign(String content, Encoding encode)
706
+        {
707
+            try
708
+            {
709
+                SHA1 sha1 = new SHA1CryptoServiceProvider();//创建SHA1对象
710
+                byte[] bytes_in = encode.GetBytes(content);//将待加密字符串转为byte类型
711
+                byte[] bytes_out = sha1.ComputeHash(bytes_in);//Hash运算
712
+                sha1.Dispose();//释放当前实例使用的所有资源
713
+                string  result = BitConverter.ToString(bytes_out);//将运算结果转为string类型
714
+                return result;
715
+            }
716
+            catch (Exception ex)
717
+            {
718
+                return ex.Message;
719
+            }
720
+        }
721
+
722
+        /// <summary>
612 723
         /// 获取当前时间戳
613 724
         /// </summary>
614 725
         /// <returns></returns>
@@ -616,8 +727,12 @@ namespace CallCenterApi.Interface.Controllers.weixin
616 727
         {
617 728
             DateTime currentDate = DateTime.Now;//当前时间
618 729
             //转化为时间戳
619
-            DateTime localTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
620
-            return long.Parse((currentDate - localTime).TotalSeconds.ToString().Split('.')[0]);
730
+          DateTime localTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
731
+           return long.Parse((currentDate - localTime).TotalSeconds.ToString().Split('.')[0]);
732
+           // var ticks = currentDate.ToUniversalTime().Ticks - new DateTime(1970, 1, 1, 0, 0, 0, //DateTimeKind.Utc).Ticks;
733
+           // var timeSpan = ticks / TimeSpan.TicksPerSecond;
734
+            //return timeSpan;
735
+
621 736
         }
622 737
         /// <summary>
623 738
         /// 获取微信openid
@@ -941,9 +1056,9 @@ namespace CallCenterApi.Interface.Controllers.weixin
941 1056
                             }
942 1057
                             break;
943 1058
                         case 4://待完成的(待处理)
944
-                            if (GetDWCWorkOrderID(ua.F_UserCode) != null)
1059
+                            if (GetDWCWorkOrderID(ua.F_UserCode,ua .F_DeptId ) != null)
945 1060
                             {
946
-                                sql += " and F_State in(" + (int)EnumWorkOrderState.dealing + "," + (int)EnumWorkOrderState.receive + "," + (int)EnumWorkOrderState.reback  + ") and T_Wo_WorkOrder.F_ID in ( " + GetDWCWorkOrderID(ua.F_UserCode) + ") ";
1061
+                                sql += " and F_State in(" + (int)EnumWorkOrderState.dealing + "," + (int)EnumWorkOrderState.receive + "," + (int)EnumWorkOrderState.reback  + ") and T_Wo_WorkOrder.F_ID in ( " + GetDWCWorkOrderID(ua.F_UserCode, ua.F_DeptId) + ") ";
947 1062
 
948 1063
                             }
949 1064
                             else
@@ -952,7 +1067,11 @@ namespace CallCenterApi.Interface.Controllers.weixin
952 1067
                             }
953 1068
                             break;
954 1069
                         case 10://已完成的
955
-                            sql += " and F_State in(10,11) and F_DealBy = '" + ua.F_UserCode + "' ";
1070
+                            if (GetDeptUserCode(ua.F_DeptId) != "")
1071
+                            {
1072
+                                sql += " and F_State in(10,11) and F_DealBy in(" + GetDeptUserCode(ua.F_DeptId) + ") ";
1073
+                            }
1074
+                          //  sql += " and F_State in(10,11) and F_DealBy = '" + ua.F_UserCode + "' ";
956 1075
                             break;
957 1076
                         case 3://我参与的
958 1077
                             if (GetParticipateID(ua.F_UserCode) != "")
@@ -1111,8 +1230,24 @@ namespace CallCenterApi.Interface.Controllers.weixin
1111 1230
             }
1112 1231
             else
1113 1232
             {
1114
-                return Error("无操作权限!");
1233
+                return Success("暂无工单"); ;
1234
+            }
1235
+        }
1236
+        public string GetDeptUserCode(int deptid)
1237
+        {
1238
+            string deptuser = string.Empty;
1239
+            var dept = userAccountBLL .GetModelList("F_DeptId=" + deptid);
1240
+            if (dept != null)
1241
+            {
1242
+                foreach (var it in dept)
1243
+                {
1244
+                    if (deptuser != "")
1245
+                        deptuser += "," + it.F_UserCode;
1246
+                    else
1247
+                        deptuser += it.F_UserCode;
1248
+                }
1115 1249
             }
1250
+            return deptuser;
1116 1251
         }
1117 1252
         /// <summary>
1118 1253
         ///综合查询列表
@@ -1381,14 +1516,14 @@ namespace CallCenterApi.Interface.Controllers.weixin
1381 1516
         /// 获取待完成的工单编号
1382 1517
         /// </summary>
1383 1518
         /// <returns></returns>
1384
-        public string GetDWCWorkOrderID(string user)
1519
+        public string GetDWCWorkOrderID(string user,int deptid)
1385 1520
         {
1386 1521
             string str = string.Empty;
1387 1522
 
1388 1523
             str = "select F_WoID from T_Wo_WorkOrderItem_New where F_ItemType=" + (int)EnumItemType.deal
1389 1524
                 + " and ("
1390
-                    + "(F_WoState in(" + (int)EnumWorkOrderState.dealing + "," + (int)EnumWorkOrderState.receive + ") and F_CreateUser='" + user + "') "//办理中和接单状态的操作人
1391
-                    + " or (F_WoState in(" + (int)EnumWorkOrderState.reback + "," + (int)EnumWorkOrderState.receive + ") and F_NextUser='" + user + "')"//退回下一步操作人
1525
+                    + "(F_WoState in(" + (int)EnumWorkOrderState.dealing + "," + (int)EnumWorkOrderState.receive + ") and F_NextDept='" + deptid + "') "//办理中和接单状态的操作人
1526
+                    + " or (F_WoState in(" + (int)EnumWorkOrderState.reback + "," + (int)EnumWorkOrderState.receive + ") and F_NextDept='" + deptid + "')"//退回下一步操作人
1392 1527
                 + ")"
1393 1528
                 + " and isnull(F_IsUsed,'0')='0' ";
1394 1529
 
@@ -1492,9 +1627,9 @@ namespace CallCenterApi.Interface.Controllers.weixin
1492 1627
                         case 1://待完成的(待处理)
1493 1628
                             sql = "";
1494 1629
                             sql += $"  F_IsDelete=0";
1495
-                            if (GetDWCWorkOrderID(ua.F_UserCode) != null)
1630
+                            if (GetDWCWorkOrderID(ua.F_UserCode,ua .F_DeptId ) != null)
1496 1631
                             {
1497
-                                sql += " and F_State in(" + (int)EnumWorkOrderState.dealing + "," + (int)EnumWorkOrderState.reassign + "," + (int)EnumWorkOrderState.receive + "," + (int)EnumWorkOrderState.reback + ") and T_Wo_WorkOrder.F_ID in ( " + GetDWCWorkOrderID(ua.F_UserCode) + ") ";
1632
+                                sql += " and F_State in(" + (int)EnumWorkOrderState.dealing + "," + (int)EnumWorkOrderState.reassign + "," + (int)EnumWorkOrderState.receive + "," + (int)EnumWorkOrderState.reback + ") and T_Wo_WorkOrder.F_ID in ( " + GetDWCWorkOrderID(ua.F_UserCode, ua.F_DeptId) + ") ";
1498 1633
                             }
1499 1634
                             else
1500 1635
                             {
@@ -1507,8 +1642,12 @@ namespace CallCenterApi.Interface.Controllers.weixin
1507 1642
                         case 2://已完成的
1508 1643
                             sql = "";
1509 1644
                             sql += $"  F_IsDelete=0";
1510
-                            sql += " and F_State in(10,11) and F_DealBy = '" + ua.F_UserCode + "' ";
1511
-                            YCL = new BLL.T_Wo_WorkOrder().GetModelList(sql).Count;//已完成的
1645
+                        if (GetDeptUserCode(ua.F_DeptId) != "")
1646
+                        {
1647
+                            sql += " and F_State in(10,11) and F_DealBy in(" + GetDeptUserCode(ua.F_DeptId) + ") ";
1648
+                        }
1649
+                        //sql += " and F_State in(10,11) and F_DealBy = '" + ua.F_UserCode + "' ";
1650
+                        YCL = new BLL.T_Wo_WorkOrder().GetModelList(sql).Count;//已完成的
1512 1651
                             break;
1513 1652
                        
1514 1653
                         case 3://待审批
@@ -1717,11 +1856,11 @@ namespace CallCenterApi.Interface.Controllers.weixin
1717 1856
                     {
1718 1857
                         if (string.IsNullOrEmpty(model.F_Annotation))
1719 1858
                         {
1720
-                            model.F_Annotation = cont;
1859
+                            model.F_Annotation = cont+"-"+ ua.F_UserCode +"("+ua .F_WorkNumber +")";
1721 1860
                         }
1722 1861
                         else
1723 1862
                         {
1724
-                            model.F_Annotation = model.F_Annotation + "。" + cont;
1863
+                            model.F_Annotation = model.F_Annotation + "。" + cont + "-" + ua.F_UserCode + "(" + ua.F_WorkNumber + ")";
1725 1864
                         }
1726 1865
                         var res = woBLL.Update(model);
1727 1866
                         if (res)
@@ -2354,7 +2493,16 @@ namespace CallCenterApi.Interface.Controllers.weixin
2354 2493
                     {
2355 2494
                         if (!string.IsNullOrEmpty(cuModel.F_AreaID))
2356 2495
                         {
2357
-                            Model.T_Sys_Department pdModel = departmentBLL.GetModel(int.Parse(cuModel.F_AreaID));//通过公司id获取部门
2496
+                            Model.T_Sys_Department pdModel = new Model.T_Sys_Department();
2497
+                            try
2498
+                            {
2499
+                                pdModel = departmentBLL.GetModel(int.Parse(cuModel.F_AreaID));//通过公司id获取部门
2500
+                            }
2501
+                            catch
2502
+                            {
2503
+                                pdModel = departmentBLL.GetModel(cuModel.F_AreaID);//通过公司id获取部门
2504
+                            }
2505
+
2358 2506
                             if (pdModel != null)
2359 2507
                             {
2360 2508
                                 model.F_AreaName = pdModel.F_DeptName;
@@ -2362,7 +2510,15 @@ namespace CallCenterApi.Interface.Controllers.weixin
2362 2510
                         }
2363 2511
                         if (!string.IsNullOrEmpty(cuModel.F_BranchID))
2364 2512
                         {
2365
-                            Model.T_Sys_Department pdModel1 = departmentBLL.GetModel(int.Parse(cuModel.F_BranchID));
2513
+                            Model.T_Sys_Department pdModel1 = new Model.T_Sys_Department();
2514
+                            try
2515
+                            {
2516
+                                pdModel1 = departmentBLL.GetModel(int.Parse(cuModel.F_BranchID));//通过公司id获取部门
2517
+                            }
2518
+                            catch
2519
+                            {
2520
+                                pdModel1 = departmentBLL.GetModel(cuModel.F_BranchID);//通过公司id获取部门
2521
+                            }
2366 2522
                             if (pdModel1 != null)
2367 2523
                             {
2368 2524
                                 model.F_BranchName = pdModel1.F_DeptName;
@@ -2528,13 +2684,15 @@ namespace CallCenterApi.Interface.Controllers.weixin
2528 2684
                             if (manage != null)
2529 2685
                             {
2530 2686
                                 model.F_QuestionType = manage.F_QuestionName;
2687
+                                model.F_QuestionTypeid = manage.F_Id;
2531 2688
                                 if (manage.F_Label == "3")
2532 2689
                                 {
2533 2690
                                     Model.T_Wo_QuestionManage Manage1 = quesBLL.GetModel(int.Parse(manage.F_ParentId.ToString()));//获取问题类别
2534 2691
                                     Model.T_Wo_QuestionManage Manage2 = quesBLL.GetModel(int.Parse(Manage1.F_ParentId.ToString()));//获取问题类别
2535 2692
                                     model.F_QuestionTypeone = Manage2.F_QuestionName;//问题类别1
2693
+                                    model.F_QuestionTypeoneid = Manage2.F_Id;//问题类别1
2536 2694
                                     model.F_QuestionTypetwo = Manage1.F_QuestionName;//问题类别2
2537
-
2695
+                                    model.F_QuestionTypetwoid = Manage1.F_Id;//问题类别1
2538 2696
                                 }
2539 2697
                             }
2540 2698
 
@@ -2549,7 +2707,12 @@ namespace CallCenterApi.Interface.Controllers.weixin
2549 2707
                     model.F_BatchNumber = model1[i].F_BatchNumber;//生产批次号
2550 2708
                     model.F_TS_Formula = model1[i].F_TS_Formula;// 投诉-配方
2551 2709
                     model.F_TS_Category = model1[i].F_TS_Category;//投诉-产品种类:化肥、化工、其他
2552
-                    model.F_TS_Quantity = model1[i].F_TS_Quantity;//投诉-问题数量(吨)
2710
+                    if (!string.IsNullOrEmpty(model1[i].F_TS_Quantity))
2711
+                    {
2712
+                        model.F_TS_Quantity = model1[i].F_TS_Quantity ;//投诉-问题数量(吨)
2713
+                    }
2714
+                    else
2715
+                        model.F_TS_Quantity = "";
2553 2716
                     model.F_TS_Level = model1[i].F_TS_Level;//投诉-重要级别:轻微、一般、较大、重大
2554 2717
                     #endregion
2555 2718
                     #region 咨询类
@@ -3034,7 +3197,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
3034 3197
         public string GetParticipateID(string user)
3035 3198
         {
3036 3199
             string str = string.Empty;
3037
-            str = "select F_WoID from T_Wo_WorkOrderItem_New where F_CreateUser in(" + user + ") and F_OptType in( 1,7 )";
3200
+            str = "select F_WoID from T_Wo_WorkOrderItem_New where F_CreateUser in(" + user + ") and F_OptType in( 0,1,7 )";
3038 3201
 
3039 3202
             ;
3040 3203
             return str;
@@ -3373,7 +3536,9 @@ namespace CallCenterApi.Interface.Controllers.weixin
3373 3536
             model.F_CJ_Tonnage = input.F_CJ_Tonnage;//抽检-抽检吨数
3374 3537
             model.F_CJ_BagNo = input.F_CJ_BagNo;//抽检-抽检袋数
3375 3538
             model.F_CJ_Outlay = input.F_CJ_Outlay;//抽检-公关费用金额:单位元】
3376
-            model.F_WxOpenId = input.F_WxOpenId;                                    //     model.F_VisitRemarks = input.F_VisitRemarks;//回访备注
3539
+            model.F_WxOpenId = input.F_WxOpenId;
3540
+           
3541
+            //     model.F_VisitRemarks = input.F_VisitRemarks;//回访备注
3377 3542
             //if (!string.IsNullOrEmpty(input.F_BatchNumber))
3378 3543
             //{
3379 3544
             //    if (type == 1)
@@ -3467,10 +3632,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
3467 3632
         /// <returns></returns>
3468 3633
         public ActionResult CustomAdd(WorkOrderNewInput input, int overtime = 0, int sms = 0)
3469 3634
         {
3470
-                if ( input.F_Source != 4)
3471
-                {
3472
-                    return Error("无操作权限!");
3473
-                }
3635
+                
3474 3636
                 if (string.IsNullOrEmpty(input.F_CusName))
3475 3637
                     return Error("请输入客户姓名!");
3476 3638
                 if (string.IsNullOrEmpty(input.F_CusPhone))

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


+ 21 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/WorkOrderNewInput.cs

@@ -302,6 +302,13 @@ namespace CallCenterApi.Interface.Models.Input
302 302
             get; set;
303 303
         }
304 304
         /// <summary>
305
+        /// 问题类别1
306
+        /// </summary>
307
+        public int  F_QuestionTypeoneid
308
+        {
309
+            get; set;
310
+        }
311
+        /// <summary>
305 312
         /// 问题类别2
306 313
         /// </summary>
307 314
         public string F_QuestionTypetwo
@@ -309,13 +316,26 @@ namespace CallCenterApi.Interface.Models.Input
309 316
             get; set;
310 317
         }
311 318
         /// <summary>
319
+        /// 问题类别2
320
+        /// </summary>
321
+        public int  F_QuestionTypetwoid
322
+        {
323
+            get; set;
324
+        }
325
+        /// <summary>
312 326
         /// 问题类别
313 327
         /// </summary>
314 328
         public string F_QuestionType
315 329
         {
316 330
             get; set;
317 331
         }
318
-  
332
+        /// <summary>
333
+        /// 问题类别
334
+        /// </summary>
335
+        public int  F_QuestionTypeid
336
+        {
337
+            get; set;
338
+        }
319 339
         /// <summary>
320 340
         /// 生产批次号
321 341
         /// </summary>