duhongyu 4 anos atrás
pai
commit
d11c3af327

+ 31 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -2243,10 +2243,17 @@ namespace CallCenterApi.Interface.Controllers.weixin
2243 2243
                     opt = "流转车用尿素";
2244 2244
 
2245 2245
                 }
2246
+
2246 2247
                 else if (dapt == 20)
2247 2248
                 {
2248 2249
                     nextda = 295;
2249 2250
                     opt = "流转新乡黑科质检";
2251
+                }
2252
+                else if (dapt == 332)
2253
+                {
2254
+                    nextda = 339;
2255
+                    opt = "流转营销管理处";
2256
+
2250 2257
 
2251 2258
                 }
2252 2259
                 else if (ua.F_DeptId == 17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
@@ -2849,6 +2856,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2849 2856
                     model.F_CJ_Tonnage = model1[i].F_CJ_Tonnage;//抽检-抽检吨数
2850 2857
                     model.F_CJ_BagNo = model1[i].F_CJ_BagNo;//抽检-抽检袋数
2851 2858
                     model.F_CJ_Outlay = model1[i].F_CJ_Outlay;//抽检-公关费用金额:单位元
2859
+                    model.F_Production = model1[i].F_Production;
2852 2860
                     model.F_WorkerBrand = model1[i].F_Brand;//工单品牌
2853 2861
                     model.F_DealBy = model1[i].F_DealBy;//处理人
2854 2862
                     model.F_DealTime = model1[i].F_DealTime;//处理时间
@@ -3682,6 +3690,8 @@ namespace CallCenterApi.Interface.Controllers.weixin
3682 3690
             model.F_Source = input.F_Source.ToString();//工单来源
3683 3691
           
3684 3692
             model.F_Type = input.F_Type.ToString();//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
3693
+            model.F_Production = input.F_Production;//生产单位
3694
+            LogFactory.GetLogger("123").Debug(input.F_Production);
3685 3695
             model.F_CusName = input.F_CusName;//客户姓名
3686 3696
             model.F_CusPhone = input.F_CusPhone;//客户电话
3687 3697
             model.F_CompanyName = input.F_CompanyName;//公司名称
@@ -3955,6 +3965,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
3955 3965
                 var model = new Model.T_Wo_WorkOrder();
3956 3966
                 #region 保存客户基本信息
3957 3967
                 model = inputtoobj(ua, model, input, 2);
3968
+                LogFactory.GetLogger("635").Debug("添加中。。。。");
3958 3969
                 if (model.F_Source == "3")
3959 3970
                 {
3960 3971
                     model.F_State = (int)EnumWorkOrderState.customers;
@@ -4038,16 +4049,23 @@ namespace CallCenterApi.Interface.Controllers.weixin
4038 4049
                                         opt = "流转车用尿素";
4039 4050
 
4040 4051
                                     }
4052
+
4041 4053
                                     else if (dapt == 20)
4042 4054
                                     {
4043 4055
                                         nextda = 295;
4044 4056
                                         opt = "流转新乡黑科质检";
4057
+                                    }
4058
+                                    else if (dapt == 332)
4059
+                                    {
4060
+                                        nextda = 339;
4061
+                                        opt = "流转营销管理处";
4062
+
4045 4063
 
4046 4064
                                     }
4047 4065
                                     else if (ua.F_DeptId == 17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
4048 4066
                                     {
4049 4067
                                         nextda = ua.F_DeptId;
4050
-                                        opt = "流转" + deptment ;
4068
+                                        opt = "流转" + deptment;
4051 4069
                                     }
4052 4070
                                 }
4053 4071
                                 if (nextda != 0)
@@ -4068,6 +4086,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
4068 4086
                         else
4069 4087
                         {
4070 4088
                             AddLog(modlelist.F_ID, 0, "客户" + "创建工单", (int)EnumItemType.deal, (int)EnumItemOpt.create, "", 0, null, overtime, sms);
4089
+                            LogFactory.GetLogger("456").Debug("添加成功");
4071 4090
                             return Success("添加成功");
4072 4091
                         }
4073 4092
 
@@ -4079,6 +4098,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
4079 4098
                     return Error("添加失败!");
4080 4099
 
4081 4100
 
4101
+
4082 4102
             }
4083 4103
             else
4084 4104
             {
@@ -5608,19 +5628,26 @@ namespace CallCenterApi.Interface.Controllers.weixin
5608 5628
                             else if (dapt == 18)
5609 5629
                             {
5610 5630
                                 nextda = 268;
5611
-                               opt = "流转车用尿素" ;
5631
+                                opt = "流转车用尿素";
5612 5632
 
5613 5633
                             }
5634
+
5614 5635
                             else if (dapt == 20)
5615 5636
                             {
5616 5637
                                 nextda = 295;
5617 5638
                                 opt = "流转新乡黑科质检";
5639
+                            }
5640
+                            else if (dapt == 332)
5641
+                            {
5642
+                                nextda = 339;
5643
+                                opt = "流转营销管理处";
5644
+
5618 5645
 
5619 5646
                             }
5620
-                            else if (ua.F_DeptId == 17  || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
5647
+                            else if (ua.F_DeptId == 17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
5621 5648
                             {
5622 5649
                                 nextda = ua.F_DeptId;
5623
-                                opt = "流转" + deptname1 ;
5650
+                                opt = "流转" + deptname1;
5624 5651
                             }
5625 5652
                         }
5626 5653
                         if (nextda != 0)

+ 60 - 41
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -545,7 +545,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
545 545
                 List<Model.T_Wo_WorkOrder> modlelist = new BLL.T_Wo_WorkOrder().DataTableToList(dt);
546 546
                 if (modlelist.Count > 0)
547 547
                 {
548
-                    List<WorkOrderNewInput> Input = modeltooip(modlelist);
548
+                    List<WorkOrderNewInput> Input =modeltooip (modlelist);
549 549
                     var obj = new
550 550
                     {
551 551
                         state = "success",
@@ -1509,13 +1509,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
1509 1509
                 {
1510 1510
                     nextda = 295;
1511 1511
                     opt = "流转新乡黑科质检";
1512
+                }
1513
+                else if (dapt == 332)
1514
+                {
1515
+                    nextda = 339;
1516
+                    opt = "流转营销管理处";
1512 1517
 
1513 1518
                 }
1514
-                else if (ua.F_DeptId==17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
1519
+                else if (ua.F_DeptId == 17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
1515 1520
                 {
1516 1521
                     isbl = 1;
1517
-                      nextda = ua.F_DeptId;
1518
-                      opt = "流转"+ deptname;
1522
+                    nextda = ua.F_DeptId;
1523
+                    opt = "流转" + deptname;
1519 1524
                 }
1520 1525
                 //else
1521 1526
                 //{
@@ -2075,7 +2080,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2075 2080
                  var   model = workOrder.GetModel(id);
2076 2081
                 if (model != null)
2077 2082
                     list.Add(model);
2078
-                 var itemlasts = itembll.GetModelList("  F_WoID=" + +id + " ");
2083
+                 var itemlasts = itembll.GetModelList("  F_WoID=" + id + " ");
2079 2084
 ;                var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
2080 2085
                 FileUrl = GetFileData(model.F_Files , configfj.F_ParamValue);
2081 2086
                 if (list.Count > 0)
@@ -4282,7 +4287,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4282 4287
             /// 添加工单
4283 4288
             /// </summary>
4284 4289
             /// <returns></returns>
4285
-            public ActionResult Add(WorkOrderNewInput input, int overtime = 0,int sms = 0)
4290
+       public ActionResult Add(WorkOrderNewInput input, int overtime = 0,int sms = 0)
4286 4291
         {
4287 4292
             int userId = CurrentUser.UserData.F_UserId;
4288 4293
             if (userId != 0)
@@ -4291,9 +4296,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
4291 4296
                 Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(userId);
4292 4297
 
4293 4298
                 #region 添加验证判断
4294
-                if (!(input.F_Type> 0 && input.F_Type < 5))
4299
+                if (!(input.F_Type > 0 && input.F_Type < 5))
4295 4300
                     return Error("工单类型错误!");
4296
-                if(string .IsNullOrEmpty (input.F_CusName))
4301
+                if (string.IsNullOrEmpty(input.F_CusName))
4297 4302
                     return Error("请输入客户姓名!");
4298 4303
                 if (input.F_Type == 2)
4299 4304
                 {
@@ -4302,7 +4307,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4302 4307
                     if (string.IsNullOrEmpty(input.F_QuestionType))
4303 4308
                         return Error("请选择问题类别!");
4304 4309
                 }
4305
-                
4310
+
4306 4311
                 if (string.IsNullOrEmpty(input.F_CusPhone))
4307 4312
                     return Error("请输入客户电话!");
4308 4313
                 //if (!string.IsNullOrEmpty(input.F_BatchNumber) && !vaBatchNumber(input.F_BatchNumber.Trim()))
@@ -4332,7 +4337,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4332 4337
                 if (!string.IsNullOrEmpty(input.F_CustomerID) && !valcode(input.F_CustomerID.ToString(), 10))
4333 4338
                     return Error("客户编号为10为纯数字!");
4334 4339
 
4335
-                if (!string.IsNullOrEmpty (input.F_MaterialID)  && !valcode(input.F_MaterialID.ToString(), 11))
4340
+                if (!string.IsNullOrEmpty(input.F_MaterialID) && !valcode(input.F_MaterialID.ToString(), 11))
4336 4341
                     return Error("物料编码为11为纯数字!");
4337 4342
                 if (!string.IsNullOrEmpty(input.F_CustomerID))
4338 4343
                 {
@@ -4353,8 +4358,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
4353 4358
                     if (string.IsNullOrEmpty(input.F_CJ_Time.ToString()))
4354 4359
                         return Error("请选择抽检时间");
4355 4360
                 }
4356
-                if (!string .IsNullOrEmpty (input .F_SalesPhone))
4357
-                  {
4361
+                if (!string.IsNullOrEmpty(input.F_SalesPhone))
4362
+                {
4358 4363
                     if (!IsNumeric(input.F_SalesPhone))
4359 4364
                         return Error("请输入正确的业务员电话");
4360 4365
                 }
@@ -4378,31 +4383,31 @@ namespace CallCenterApi.Interface.Controllers.workorder
4378 4383
                     {
4379 4384
                         deptname = deptmodel.F_DeptName + "-";
4380 4385
                     }
4381
-                    Model.T_Wo_WorkOrder  modlelist = new BLL.T_Wo_WorkOrder().GetModel(n);
4382
-                      
4383
-                        if (ro.F_RoleCode == "DQJL" || ro.F_RoleCode == "FGSJL" || ro.F_RoleCode == "YWY")
4384
-                        {
4386
+                    Model.T_Wo_WorkOrder modlelist = new BLL.T_Wo_WorkOrder().GetModel(n);
4385 4387
 
4386
-                            if (GetUser(ua) != null)
4388
+                    if (ro.F_RoleCode == "DQJL" || ro.F_RoleCode == "FGSJL" || ro.F_RoleCode == "YWY")
4389
+                    {
4390
+
4391
+                        if (GetUser(ua) != null)
4392
+                        {
4393
+                            var user = GetUser(ua);
4394
+                            string deptname1 = "";
4395
+                            var deptmodel1 = departmentBLL.GetModel(user.F_DeptId);
4396
+                            if (deptmodel1 != null)
4387 4397
                             {
4388
-                                var user = GetUser(ua);
4389
-                                string deptname1 = "";
4390
-                                var deptmodel1 = departmentBLL.GetModel(user.F_DeptId);
4391
-                                if (deptmodel1 != null)
4392
-                                {
4393
-                                    deptname1 = deptmodel1.F_DeptName + "-";
4394
-                                }
4398
+                                deptname1 = deptmodel1.F_DeptName + "-";
4399
+                            }
4395 4400
 
4396
-                                AddLog(modlelist.F_ID, 0, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
4397
-                                AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname1 + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
4401
+                            AddLog(modlelist.F_ID, 0, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
4402
+                            AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname1 + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
4398 4403
                             if (sms == 1 && !string.IsNullOrEmpty(user.F_Mobile))
4399 4404
                             {
4400 4405
                                 SendSms(model.F_Type, user.F_Mobile, ua.F_UserId);
4401 4406
                             }
4402 4407
                         }
4403
-                            else
4404
-                            {
4405
-                          
4408
+                        else
4409
+                        {
4410
+
4406 4411
                             int dapt = 0, nextda = 0;
4407 4412
                             var deptmodel1 = departmentBLL.GetModel(ua.F_DeptId);
4408 4413
                             string deptneme = "";
@@ -4413,7 +4418,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4413 4418
                             }
4414 4419
                             AddLog(modlelist.F_ID, 0, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, overtime, sms);
4415 4420
                             string opt = "";
4416
-                        
4421
+
4417 4422
                             if (dapt != 0)
4418 4423
                             {
4419 4424
                                 if (dapt == 11)
@@ -4442,10 +4447,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
4442 4447
                                     opt = "流转车用尿素";
4443 4448
 
4444 4449
                                 }
4450
+
4445 4451
                                 else if (dapt == 20)
4446 4452
                                 {
4447 4453
                                     nextda = 295;
4448 4454
                                     opt = "流转新乡黑科质检";
4455
+                                }
4456
+                                else if (dapt == 332)
4457
+                                {
4458
+                                    nextda = 339;
4459
+                                    opt = "流转营销管理处";
4460
+
4449 4461
 
4450 4462
                                 }
4451 4463
                                 else if (ua.F_DeptId == 17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
@@ -4456,7 +4468,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4456 4468
                             }
4457 4469
                             if (nextda != 0)
4458 4470
                             {
4459
-                                var res = AssignWO(ua, modlelist, input, opt, "", nextda, 0, 0, 0,0,0,0,"",1);
4471
+                                var res = AssignWO(ua, modlelist, input, opt, "", nextda, 0, 0, 0, 0, 0, 0, "", 1);
4460 4472
                                 if (res)
4461 4473
                                     return Success("添加成功");
4462 4474
                                 else
@@ -4466,12 +4478,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
4466 4478
                             {
4467 4479
                                 return Error("流转失败!");
4468 4480
                             }
4469
-                            }
4470
-                        }
4471
-                        else
4472
-                        {
4473
-                            AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, overtime, sms);
4474 4481
                         }
4482
+                    }
4483
+                    else
4484
+                    {
4485
+                        AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, overtime, sms);
4486
+                    }
4475 4487
                     return Success("添加成功!");
4476 4488
 
4477 4489
                 }
@@ -4816,16 +4828,23 @@ namespace CallCenterApi.Interface.Controllers.workorder
4816 4828
                                         opt = "流转车用尿素";
4817 4829
 
4818 4830
                                     }
4831
+
4819 4832
                                     else if (dapt == 20)
4820 4833
                                     {
4821 4834
                                         nextda = 295;
4822 4835
                                         opt = "流转新乡黑科质检";
4836
+                                    }
4837
+                                    else if (dapt == 332)
4838
+                                    {
4839
+                                        nextda = 339;
4840
+                                        opt = "流转营销管理处";
4841
+
4823 4842
 
4824 4843
                                     }
4825
-                                    else if (ua.F_DeptId == 17  || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
4844
+                                    else if (ua.F_DeptId == 17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
4826 4845
                                     {
4827 4846
                                         nextda = ua.F_DeptId;
4828
-                                        opt = "流转" + deptname1 ;
4847
+                                        opt = "流转" + deptname1;
4829 4848
                                     }
4830 4849
 
4831 4850
                                 }
@@ -5737,7 +5756,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
5737 5756
             model.F_Canal = input.F_Canal;//生产批次号
5738 5757
             model.F_Type = input.F_Type.ToString();//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
5739 5758
             model.F_Production = input.F_Production;//生产单位
5740
-        model.F_CusName = input.F_CusName;//客户姓名
5759
+            model.F_CusName = input.F_CusName;//客户姓名
5741 5760
             model.F_CusPhone = input.F_CusPhone;//客户电话
5742 5761
             model.F_CompanyName = input.F_CompanyName;//公司名称
5743 5762
             model.F_IncidentProvince = input.F_IncidentProvince;//事发地-省
@@ -6396,7 +6415,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
6396 6415
         public ActionResult AssignWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment, string F_Files, int isvisit = 1,
6397 6416
             int overtime = 0, int sms = 0, int clbm = 0, int clid = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0)
6398 6417
         {
6399
-            int userId = CurrentUser.UserData.F_UserId;
6418
+             int userId = CurrentUser.UserData.F_UserId;
6400 6419
             string usercode = CurrentUser.UserData.F_UserCode;
6401 6420
             if (userId != 0)
6402 6421
             {
@@ -6632,7 +6651,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
6632 6651
         /// </summary>
6633 6652
         /// <returns></returns>
6634 6653
         [Authority]
6635
-        public ActionResult DealWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment,
6654
+       public ActionResult DealWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment,
6636 6655
      string F_Files, string uncont = "",
6637 6656
           int isvisit = 1, int isover = 0)
6638 6657
         {