瀏覽代碼

更新售后操作规则

zhangkun 5 年之前
父節點
當前提交
d0f166d617

+ 306 - 113
代码/TVShoppingCallCenter_ZLJ/Controllers/Order/AfterSaleController.cs

@@ -329,27 +329,27 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
329 329
 
330 330
                 List<T_Bus_OrderDetail> modelOldDetailList = new List<T_Bus_OrderDetail>();
331 331
 
332
-                //更新售后流程的退货商品
332
+                #region 退回商品展示 更新售后流程的退货商品
333 333
                 if (string.IsNullOrEmpty(modelAfterSale.F_OldDetailList))
334 334
                 {
335
-                    #region 退回商品展示
335
+
336 336
 
337 337
                     foreach (string product in modelAfterSale.F_OldDetailList.Split('|'))
338 338
                     {
339 339
                         string productid = product.Split(',')[0];
340
-
340
+                        int count = product.Split(',')[1].ObjToInt();
341 341
                         T_Bus_OrderDetail modelDetail = await bus_OrderDetailRepository.GetSingle(q => q.F_OrderId == modeOrder.F_Id && q.F_ProductId == productid);
342
-                        if (modelDetail.F_State >= 1)
342
+                        if (count > (modelDetail.F_Count - modelDetail.F_State))
343 343
                         {
344
-                            return Error("此商品已参加售后:" + modelDetail.F_ProductName);
344
+                            return Error("此商品部分已参加售后:" + modelDetail.F_ProductName);
345 345
                         }
346
-                        modelDetail.F_State = 1;
346
+                        modelDetail.F_State = count;
347 347
                         modelOldDetailList.Add(modelDetail);
348 348
                     }
349 349
 
350
-                    #endregion
351
-                }
352 350
 
351
+                }
352
+                #endregion
353 353
                 if (input.F_Type == 4)
354 354
                 {
355 355
                     if (input.F_CheckStateSH == 1)
@@ -421,11 +421,44 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
421 421
                     //物流状态0 未发出 1物流运送中2签收3改代收4拒收
422 422
                     return Error("订单状态不符合售后");
423 423
                 }
424
+
424 425
                 T_Bus_AfterSale modelAfterSale = await busAfterSaleRepository.GetSingle(q => q.F_Id == input.F_Id);
425 426
                 if (modelAfterSale.F_CheckStateSH == 1)
426 427
                 {
427 428
                     return Error("不能重复审核提交");
428 429
                 }
430
+
431
+                List<T_Bus_OrderDetail> modelOldDetailList = new List<T_Bus_OrderDetail>();
432
+
433
+                #region 退回商品展示 更新售后流程的退货商品
434
+                if (string.IsNullOrEmpty(input.F_OldDetailList))
435
+                {
436
+
437
+                    foreach (string product in input.F_OldDetailList.Split('|'))
438
+                    {
439
+                        string productid = product.Split(',')[0];
440
+                        int count = product.Split(',')[1].ObjToInt();
441
+                        T_Bus_OrderDetail modelDetail = await bus_OrderDetailRepository.GetSingle(q => q.F_OrderId == modeOrder.F_Id && q.F_ProductId == productid);
442
+                        foreach (string productold in modelAfterSale.F_OldDetailList.Split('|'))
443
+                        {
444
+                            string productidold = product.Split(',')[0];
445
+                            if (productidold == productid)
446
+                            {
447
+                                int countold = product.Split(',')[1].ObjToInt();
448
+                                count = count - countold;
449
+                            }
450
+                        }
451
+                        if (count > (modelDetail.F_Count - modelDetail.F_State))
452
+                        {
453
+                            return Error("此商品部分已参加售后:" + modelDetail.F_ProductName);
454
+                        }
455
+                        modelDetail.F_State = modelDetail.F_State + count;
456
+                        modelOldDetailList.Add(modelDetail);
457
+                    }
458
+
459
+
460
+                }
461
+                #endregion
429 462
                 modelAfterSale.F_CheckTimeSH = DateTime.Now;
430 463
                 modelAfterSale.F_CheckStateSH = input.F_State;
431 464
                 modelAfterSale.F_CheckUserSH = UserLogin.UserId.ObjToInt();
@@ -434,6 +467,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
434 467
                 modelAfterSale.F_CheckUserXS = modeOrder.F_AddUser;
435 468
 
436 469
                 modelAfterSale.F_DetailList = input.F_DetailList;
470
+                modelAfterSale.F_OldDetailList = input.F_OldDetailList;
437 471
                 modelAfterSale.F_Type = input.F_Type;
438 472
                 modelAfterSale.F_Money = input.F_Money;
439 473
 
@@ -459,6 +493,11 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
459 493
                         }
460 494
                     }
461 495
                 }
496
+                if (modelOldDetailList != null && modelOldDetailList.Count > 0)
497
+                {
498
+                    //批量更新状态 为售后中
499
+                    await bus_OrderDetailRepository.UpdateList(modelOldDetailList);
500
+                }
462 501
                 if (await busAfterSaleRepository.AddReturnCount(modelAfterSale))
463 502
                 {
464 503
                     if (input.F_CheckStateSH == 0)
@@ -543,6 +582,260 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
543 582
 
544 583
         }
545 584
 
585
+
586
+
587
+        /// <summary>
588
+        /// 获取订单分页列表 售后
589
+        /// </summary>
590
+        /// <param name="input"></param>
591
+        /// <returns></returns>
592
+        [HttpPost("getorderlistbyshpage")]
593
+        public async Task<IActionResult> GetSHOrderListByPage(OrderInput input)
594
+        {
595
+
596
+            List<IConditionalModel> conModels = new List<IConditionalModel>();
597
+            #region 条件筛选
598
+
599
+
600
+            conModels.Add(new ConditionalModel() { FieldName = "F_State", ConditionalType = ConditionalType.GreaterThanOrEqual, FieldValue = "0" });
601
+
602
+            //状态
603
+            if (input.F_State > -2)
604
+            {
605
+                conModels.Add(new ConditionalModel() { FieldName = "F_State", ConditionalType = ConditionalType.Equal, FieldValue = input.F_State.ToString() });
606
+            }
607
+            //根据角色展示列表
608
+            if (UserLogin.RoleCode == "SH")
609
+            {
610
+                conModels.Add(new ConditionalModel() { FieldName = "F_AddUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId });
611
+            }
612
+            else if (UserLogin.RoleCode == "KF" && input.F_State != 1)
613
+            {
614
+                conModels.Add(new ConditionalModel() { FieldName = "F_CheckUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId });
615
+            }
616
+            else if (UserLogin.RoleCode == "KG" && input.F_State != 3)
617
+            {
618
+                conModels.Add(new ConditionalModel() { FieldName = "F_StockUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId });
619
+                //OR  conModels.Add(new ConditionalModel() { FieldName = "F_SendUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId });
620
+            }
621
+            if (!string.IsNullOrEmpty(input.F_ADFrom))
622
+            {
623
+                conModels.Add(new ConditionalModel() { FieldName = "F_ADFrom", ConditionalType = ConditionalType.Equal, FieldValue = input.F_ADFrom });
624
+            }
625
+            if (!string.IsNullOrEmpty(input.F_Type))
626
+            {
627
+                conModels.Add(new ConditionalModel() { FieldName = "F_Type", ConditionalType = ConditionalType.Equal, FieldValue = input.F_Type });
628
+            }
629
+            if (!string.IsNullOrEmpty(input.F_Id))
630
+            {
631
+                conModels.Add(new ConditionalModel() { FieldName = "F_Id", ConditionalType = ConditionalType.Equal, FieldValue = input.F_Id });
632
+            }
633
+            if (!string.IsNullOrEmpty(input.F_Customer))
634
+            {
635
+                conModels.Add(new ConditionalModel() { FieldName = "F_Customer", ConditionalType = ConditionalType.Equal, FieldValue = input.F_Customer });
636
+            }
637
+            if (!string.IsNullOrEmpty(input.F_CustomerPhone))
638
+            {
639
+                conModels.Add(new ConditionalModel() { FieldName = "F_CustomerPhone", ConditionalType = ConditionalType.Equal, FieldValue = input.F_CustomerPhone });
640
+            }
641
+            if (!string.IsNullOrEmpty(input.F_TrackingNo))
642
+            {
643
+                conModels.Add(new ConditionalModel() { FieldName = "F_TrackingNo", ConditionalType = ConditionalType.Equal, FieldValue = input.F_TrackingNo });
644
+            }
645
+            if (!string.IsNullOrEmpty(input.F_AddProvince))
646
+            {
647
+                conModels.Add(new ConditionalModel() { FieldName = "F_AddProvince", ConditionalType = ConditionalType.Equal, FieldValue = input.F_AddProvince });
648
+            }
649
+            if (!string.IsNullOrEmpty(input.F_AddCity))
650
+            {
651
+                conModels.Add(new ConditionalModel() { FieldName = "F_AddCity", ConditionalType = ConditionalType.Equal, FieldValue = input.F_AddCity });
652
+            }
653
+            if (!string.IsNullOrEmpty(input.F_AddArea))
654
+            {
655
+                conModels.Add(new ConditionalModel() { FieldName = "F_AddArea", ConditionalType = ConditionalType.Equal, FieldValue = input.F_AddArea });
656
+            }
657
+            if (!string.IsNullOrEmpty(input.F_AddTown))
658
+            {
659
+                conModels.Add(new ConditionalModel() { FieldName = "F_AddTown", ConditionalType = ConditionalType.Equal, FieldValue = input.F_AddTown });
660
+            }
661
+            if (!string.IsNullOrEmpty(input.F_Express))
662
+            {
663
+                conModels.Add(new ConditionalModel() { FieldName = "F_Express", ConditionalType = ConditionalType.Equal, FieldValue = input.F_Express });
664
+            }
665
+            if (!string.IsNullOrEmpty(input.F_PayType))
666
+            {
667
+                conModels.Add(new ConditionalModel() { FieldName = "F_PayType", ConditionalType = ConditionalType.Equal, FieldValue = input.F_PayType });
668
+            }
669
+            if (!string.IsNullOrEmpty(input.F_Stock))
670
+            {
671
+                conModels.Add(new ConditionalModel() { FieldName = "F_Stock", ConditionalType = ConditionalType.Equal, FieldValue = input.F_Stock });
672
+            }
673
+            if (input.F_PayState > -1)
674
+            {
675
+                conModels.Add(new ConditionalModel() { FieldName = "F_PayState", ConditionalType = ConditionalType.Equal, FieldValue = input.F_PayState.ToString() });
676
+            }
677
+            if (input.SearchEndTime != null)
678
+            {
679
+                conModels.Add(new ConditionalModel() { FieldName = "F_AddTime", ConditionalType = ConditionalType.LessThan, FieldValue = input.SearchEndTime.GetValueOrDefault().ToString("yyyy-MM-dd 23:59:59") });
680
+            }
681
+            if (input.SearchStartTime != null)
682
+            {
683
+                conModels.Add(new ConditionalModel() { FieldName = "F_AddTime", ConditionalType = ConditionalType.GreaterThan, FieldValue = input.SearchStartTime.GetValueOrDefault().ToString("yyyy-MM-dd 00:00:01") });
684
+            }
685
+
686
+
687
+
688
+
689
+            #endregion
690
+            RefAsync<int> recordCount = 0;
691
+            PageData<T_Bus_Order> list = await bus_OrderRepository.GetListByPage(conModels, new MyPageModel() { PageIndex = input.pageindex, PageSize = input.pagesize, PageCount = recordCount }, " F_AddTime DESC");
692
+            PageData<OrderInput> returnobj = new PageData<OrderInput>() { Totals = list.Totals };
693
+            List<OrderInput> returnlist = new List<OrderInput>();
694
+            foreach (T_Bus_Order t in list.Rows)
695
+            {
696
+                OrderInput m = new OrderInput();
697
+                ModelConvertHelper<OrderInput, T_Bus_Order>.ModeToModel(m, t);
698
+
699
+                List<OrderDetailInput> orderDetailInputs = new List<OrderDetailInput>();
700
+                #region 遍历订单商品
701
+                List<T_Bus_OrderDetail> orderDetails = await bus_OrderDetailRepository.GetListALL(q => q.F_OrderId == t.F_Id);
702
+                if (orderDetails != null)
703
+                {
704
+                    foreach (T_Bus_OrderDetail t1 in orderDetails)
705
+                    {
706
+                        OrderDetailInput m1 = new OrderDetailInput();
707
+                        ModelConvertHelper<OrderDetailInput, T_Bus_OrderDetail>.ModeToModel(m1, t1);
708
+                        orderDetailInputs.Add(m1);
709
+                    }
710
+                }
711
+                #endregion
712
+                m.OrderDetailList = orderDetailInputs;
713
+
714
+                returnlist.Add(m);
715
+            }
716
+            returnobj.Rows = returnlist;
717
+
718
+            return Success("成功", returnobj);
719
+
720
+
721
+        }
722
+
723
+
724
+        /// <summary>
725
+        /// 修改订单 
726
+        /// </summary>
727
+        /// <param name="input"></param>
728
+        /// <returns></returns>
729
+        [HttpPost("editorder")]
730
+        public async Task<IActionResult> EditOrder([FromBody]OrderInput input)
731
+        {
732
+            T_Cus_VipInfo modelvip = new T_Cus_VipInfo();
733
+            #region 验证参数 必填项  
734
+
735
+            if (string.IsNullOrEmpty(input.F_ADFrom))
736
+                return Error("请输入选择广告来源");
737
+            if (string.IsNullOrEmpty(input.F_Type))
738
+                return Error("请输入选择订单类型");
739
+            if (string.IsNullOrEmpty(input.F_Id))
740
+                return Error("请输入订单编号");
741
+            if (string.IsNullOrEmpty(input.F_Customer))
742
+                return Error("请输入客户姓名");
743
+            if (string.IsNullOrEmpty(input.F_CustomerPhone))
744
+                return Error("请输入客户电话");
745
+            #endregion
746
+
747
+
748
+            T_Bus_Order modelOrder = await bus_OrderRepository.GetSingle(q => q.F_Id == input.F_Id);
749
+            if (modelOrder == null)
750
+            {
751
+                return Error("此订单号不存在");
752
+            }
753
+            //保存 审退回 仓退回
754
+            if (!(new int[] { 0, 2 }.Contains(modelOrder.F_State)))
755
+            {
756
+                return Error("已提交订单不允许修改,先撤回订单");
757
+            }
758
+            #region 数据绑定
759
+            //必填
760
+            modelOrder.F_ADFrom = input.F_ADFrom;
761
+            modelOrder.F_Type = input.F_Type;
762
+            modelOrder.F_Id = input.F_Id;
763
+
764
+            modelOrder.F_Customer = input.F_Customer;
765
+            modelOrder.F_CustomerPhone = input.F_CustomerPhone;
766
+            //选填 快递属性
767
+            modelOrder.F_TrackingNo = input.F_TrackingNo;
768
+            modelOrder.F_Addressee = input.F_Addressee;
769
+            modelOrder.F_AddPhone = input.F_AddPhone;
770
+            modelOrder.F_AddProvince = input.F_AddProvince;
771
+            modelOrder.F_AddCity = input.F_AddCity;
772
+            modelOrder.F_AddArea = input.F_AddArea;
773
+            modelOrder.F_AddTown = input.F_AddTown;
774
+            modelOrder.F_AddDes = input.F_AddDes;
775
+            modelOrder.F_Address = input.F_Address;
776
+            modelOrder.F_PostalCode = input.F_PostalCode;
777
+            modelOrder.F_Express = input.F_Express;
778
+
779
+            modelOrder.F_PayType = input.F_PayType;
780
+            modelOrder.F_Stock = input.F_Stock;
781
+            modelOrder.F_Remark = input.F_Remark;
782
+
783
+            modelOrder.F_RealPrice = input.F_RealPrice;
784
+            modelOrder.F_UseScore = input.F_UseScore;
785
+            //选填 关联属性
786
+            modelOrder.F_VipId = input.F_VipId;
787
+
788
+
789
+
790
+            modelOrder.F_State = input.F_State;
791
+            modelOrder.F_Status = 0;
792
+
793
+
794
+            //必须属性 系统生成
795
+            modelOrder.F_AddTime = DateTime.Now;
796
+            modelOrder.F_AddUser = UserLogin.UserId.ObjToInt();
797
+            modelOrder.F_AddUserName = UserLogin.UserName;
798
+
799
+            #endregion
800
+
801
+
802
+            List<T_Bus_OrderDetail> modelDetailList = new List<T_Bus_OrderDetail>();
803
+
804
+
805
+
806
+            //直接提交  锁库存
807
+
808
+            #region 提交 更改状态   库存  积分
809
+
810
+
811
+            if (input.F_State == 1)
812
+            {
813
+                if (string.IsNullOrEmpty(input.F_Stock))
814
+                {
815
+                    return Error("请选择货仓");
816
+                }
817
+                modelOrder.F_FlowNum = Guid.NewGuid().ToString().Replace("-", "");
818
+                string strStock = await orderController.ChangeStockOne(modelOrder, 1, modelDetailList);
819
+                if (strStock != "1")
820
+                { return Error(strStock); }
821
+                modelOrder.F_SubmitTime = DateTime.Now;
822
+
823
+            }
824
+            #endregion
825
+
826
+
827
+
828
+            if (await bus_OrderRepository.Update(modelOrder))
829
+            {
830
+                 return Success("成功"); 
831
+            }
832
+
833
+            return Error("失败,请重试!");
834
+
835
+
836
+        }
837
+
838
+
546 839
         #endregion
547 840
 
548 841
         #region 仓库操作
@@ -588,23 +881,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
588 881
                 //1收到货(根据状态自动创建订单)2货物不符3未收到货
589 882
                 if (modelAfterSale.F_CheckStateKG == 1)
590 883
                 {
591
-                    #region 更新用户快递商品
592
-                    if (string.IsNullOrEmpty(modelAfterSale.F_OldDetailList))
593
-                    {
594
-                        foreach (string product in modelAfterSale.F_DetailList.Split('|'))
595
-                        {
596
-                            string productid = product.Split(',')[0];
597 884
 
598
-                            T_Bus_OrderDetail modelDetail = await bus_OrderDetailRepository.GetSingle(q => q.F_OrderId == modeOrder.F_Id && q.F_ProductId == productid);
599
-                            if (modelDetail.F_State == 2)
600
-                            {
601
-                                return Error("此商品已参加过售后:" + modelDetail.F_ProductName);
602
-                            }
603
-                            modelDetail.F_State = 2;
604
-                            modelOldDetailList.Add(modelDetail);
605
-                        }
606
-                    }
607
-                    #endregion
608 885
                     if (modelAfterSale.F_Type == 4)
609 886
                     {
610 887
 
@@ -638,13 +915,10 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
638 915
                             foreach (string product in modelAfterSale.F_DetailList.Split('|'))
639 916
                             {
640 917
                                 string productid = product.Split(',')[0];
641
-
918
+                                int count = product.Split(',')[1].ObjToInt();
642 919
                                 T_Bus_OrderDetail modelDetail = await bus_OrderDetailRepository.GetSingle(q => q.F_OrderId == modeOrder.F_Id && q.F_ProductId == productid);
643
-                                if (modelDetail.F_State == 2)
644
-                                {
645
-                                    return Error("此商品已参加过售后:" + modelDetail.F_ProductName);
646
-                                }
647
-                                modelDetail.F_State = 0;
920
+
921
+                                modelDetail.F_State = modelDetail.F_State- count;
648 922
                                 modelOldDetailList.Add(modelDetail);
649 923
                             }
650 924
                         }
@@ -873,91 +1147,10 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
873 1147
         {
874 1148
             if (string.IsNullOrEmpty(orderid))
875 1149
                 return Error("请输入订单号");
876
-            T_Bus_Order modelOrder = await bus_OrderRepository.GetSingle(q => q.F_Id == orderid);
877
-            OrderInput modelreturn = new OrderInput();
878
-            if (modelOrder != null)
879
-            {
880
-                modelreturn.F_ADFrom = modelOrder.F_ADFrom;
881
-                modelreturn.F_Type = modelOrder.F_Type;
882
-                modelreturn.F_Id = modelOrder.F_Id;
883
-
884
-                modelreturn.F_Customer = modelOrder.F_Customer;
885
-                modelreturn.F_CustomerPhone = modelOrder.F_CustomerPhone;
886
-                //选填 快递属性
887
-                modelreturn.F_TrackingNo = modelOrder.F_TrackingNo;
888
-                modelreturn.F_Addressee = modelOrder.F_Addressee;
889
-                modelreturn.F_AddPhone = modelOrder.F_AddPhone;
890
-                modelreturn.F_AddProvince = modelOrder.F_AddProvince;
891
-                modelreturn.F_AddCity = modelOrder.F_AddCity;
892
-                modelreturn.F_AddArea = modelOrder.F_AddArea;
893
-                modelreturn.F_AddTown = modelOrder.F_AddTown;
894
-                modelreturn.F_AddDes = modelOrder.F_AddDes;
895
-                modelreturn.F_Address = modelOrder.F_Address;
896
-                modelreturn.F_PostalCode = modelOrder.F_PostalCode;
897
-                modelreturn.F_Express = modelOrder.F_Express;
898
-
899
-                modelreturn.F_PayType = modelOrder.F_PayType;
900
-                modelreturn.F_PayState = modelOrder.F_PayState;
901
-                modelreturn.F_Stock = modelOrder.F_Stock;
902
-                modelreturn.F_Remark = modelOrder.F_Remark;
903
-
904
-                modelreturn.F_RealPrice = modelOrder.F_RealPrice;
905
-
906
-                //选填 关联属性
907
-                modelreturn.F_VipId = modelOrder.F_VipId;
908
-                modelreturn.F_UseScore = modelOrder.F_UseScore;
909
-                modelreturn.F_Score = modelOrder.F_Score;
910
-
911
-                modelreturn.F_State = modelOrder.F_State;
912
-                modelreturn.F_Status = modelOrder.F_Status;
913
-
914
-
915
-                //必须属性 系统生成
916
-                modelreturn.F_AddTime = modelOrder.F_AddTime;
917
-                modelreturn.F_AddUser = modelOrder.F_AddUser;
918
-                modelreturn.F_AddUserName = modelOrder.F_AddUserName;
919
-
920
-
921
-                modelreturn.F_TotlePrice = modelOrder.F_TotlePrice;
922
-                modelreturn.F_ShouldPrice = modelOrder.F_ShouldPrice;
923
-                modelreturn.F_ActivityMoney = modelOrder.F_ActivityMoney;
924
-                modelreturn.F_UseActivity = modelOrder.F_UseActivity;
925
-
926
-                List<OrderDetailInput> modeldetailreturn = new List<OrderDetailInput>();
927
-                List<T_Bus_OrderDetail> detaillist = await bus_OrderDetailRepository.GetListALL(q => q.F_OrderId == modelOrder.F_Id, o => o.F_Sort, OrderByType.Asc);
928
-                if (detaillist != null)
929
-                {
930
-                    foreach (T_Bus_OrderDetail m in detaillist)
931
-                    {
932
-                        OrderDetailInput model = new OrderDetailInput();
933
-                        model.F_ProductName = m.F_ProductName;
934
-                        model.F_ProductId = m.F_ProductId;
935
-                        model.F_Id = m.F_Id;
936
-                        model.F_OrderId = m.F_OrderId;
937
-                        model.F_Count = m.F_Count;
938
-                        model.F_Price = m.F_Price;
939
-
940
-                        model.F_DealPrice = m.F_DealPrice;
941
-                        model.F_Sort = m.F_Sort;
942
-                        model.F_AddTime = m.F_AddTime;
943
-                        model.F_Remark = m.F_Remark;
944
-                        model.F_AddUser = m.F_AddUser;
945
-                        model.F_AddUserName = m.F_ProductName;
946
-                        model.F_TotlePrice = m.F_TotlePrice;
947
-                        model.F_Activity = m.F_Activity;
948
-                        modeldetailreturn.Add(model);
949
-                    }
950
-                }
951
-                modelreturn.OrderDetailList = modeldetailreturn;
952
-
953
-                modelreturn.UseActList = null;
954
-
955
-            }
956
-
957
-
958
-            return Success("成功", modelreturn);
959 1150
 
1151
+            List<T_Bus_OrderDetail> detaillist = await bus_OrderDetailRepository.GetListALL(q => q.F_OrderId == orderid && q.F_State == 0, o => o.F_Sort, OrderByType.Asc);
960 1152
 
1153
+            return Success("成功", detaillist);
961 1154
         }
962 1155
         #endregion
963 1156
 

+ 31 - 6
代码/TVShoppingCallCenter_ZLJ/Controllers/Order/OrderController.cs

@@ -875,7 +875,15 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
875 875
             //根据角色展示列表
876 876
             if (UserLogin.RoleCode == "ZX")
877 877
             {
878
-                conModels.Add(new ConditionalModel() { FieldName = "F_AddUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId });
878
+                conModels.Add(new ConditionalCollections()
879
+                {
880
+                    ConditionalList = new List<KeyValuePair<WhereType, ConditionalModel>>()
881
+                    {
882
+                        new  KeyValuePair<WhereType, ConditionalModel>( WhereType.And , new ConditionalModel() { FieldName = "F_AddUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId }),
883
+                        new  KeyValuePair<WhereType, ConditionalModel>( WhereType.Or, new ConditionalModel() { FieldName = "F_Belong", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId })
884
+                     }
885
+                } );
886
+
879 887
             }
880 888
             else if (UserLogin.RoleCode == "KF" && input.F_State != 1)
881 889
             {
@@ -1151,14 +1159,31 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
1151 1159
             {
1152 1160
                 conModels.Add(new ConditionalModel() { FieldName = "F_AddUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId });
1153 1161
             }
1154
-            else if (UserLogin.RoleCode == "KF" && input.F_State != 1)
1162
+            else if (UserLogin.RoleCode == "KF")
1155 1163
             {
1156
-                conModels.Add(new ConditionalModel() { FieldName = "F_CheckUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId });
1164
+                conModels.Add(new ConditionalCollections()
1165
+                {
1166
+                    ConditionalList = new List<KeyValuePair<WhereType, ConditionalModel>>()
1167
+                    {
1168
+                        new  KeyValuePair<WhereType, ConditionalModel>( WhereType.And , new ConditionalModel() { FieldName = "F_CheckUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId }),
1169
+                        new  KeyValuePair<WhereType, ConditionalModel>( WhereType.Or, new ConditionalModel() { FieldName = "F_State", ConditionalType = ConditionalType.Equal, FieldValue = "1" })
1170
+                     }
1171
+                });
1172
+               // conModels.Add(new ConditionalModel() { FieldName = "", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId });
1157 1173
             }
1158
-            else if (UserLogin.RoleCode == "KG" && input.F_State != 3)
1174
+            else if (UserLogin.RoleCode == "KG")
1159 1175
             {
1160
-                conModels.Add(new ConditionalModel() { FieldName = "F_StockUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId });
1161
-                //OR  conModels.Add(new ConditionalModel() { FieldName = "F_SendUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId });
1176
+                //conModels.Add(new ConditionalModel() { FieldName = "F_StockUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId });
1177
+                
1178
+                conModels.Add(new ConditionalCollections()
1179
+                {
1180
+                    ConditionalList = new List<KeyValuePair<WhereType, ConditionalModel>>()
1181
+                    {
1182
+                        new  KeyValuePair<WhereType, ConditionalModel>( WhereType.And , new ConditionalModel() { FieldName = "F_StockUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId }),
1183
+                        new  KeyValuePair<WhereType, ConditionalModel>( WhereType.Or , new ConditionalModel() { FieldName = "F_SendUser", ConditionalType = ConditionalType.Equal, FieldValue = UserLogin.UserId }),
1184
+                        new  KeyValuePair<WhereType, ConditionalModel>( WhereType.Or, new ConditionalModel() { FieldName = "F_State", ConditionalType = ConditionalType.Equal, FieldValue = "3" })
1185
+                     }
1186
+                });
1162 1187
             }
1163 1188
             if (!string.IsNullOrEmpty(input.F_ADFrom))
1164 1189
             {

+ 1 - 1
代码/TVShoppingCallCenter_ZLJ/appsettings.json

@@ -8,7 +8,7 @@
8 8
     "stock1": "WLZZ0001"
9 9
   },
10 10
   "ConnectionStrings": {
11
-    "DefaultConnection": "Data Source=192.168.8.3;User ID=sa;pwd=800100;Initial Catalog=TVCallCenter_ZLJ;MultipleActiveResultSets=true;"
11
+    "DefaultConnection": "Data Source=192.168.8.3;User ID=sa;pwd=800100;Initial Catalog=TVCallCenter_ZLJ;MultipleActiveResultSets=true;Pooling=true;Min Pool Size=15;Max Pool Size=100;"
12 12
   },
13 13
   "Jwt": {
14 14
     "Issuer": "HnjySignToken",