From 8e5d569d8362b0bc25b45a8003f8be6be65a8104 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期三, 15 十二月 2021 14:31:58 +0800
Subject: [PATCH] 提交

---
 zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs |  137 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 132 insertions(+), 5 deletions(-)

diff --git a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs
index 4a0a6b5..3c940aa 100644
--- a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs
@@ -28,14 +28,17 @@
         private readonly IOrderBanciService _orderBanciService;
         private readonly IOrderBanciDtlService _orderBanciDtlService;
         private readonly IOrderBanciOrderService _orderBanciOrderService;
+        private readonly IFiOrderrecievemoneyService _fiOrderrecievemoneyService;
 
         public OrderBanciOrderController(ILogger<OrderBanciOrderController> logger, ILiaotianService liaotianService, IOrderBanciService orderBanciService, IOrderBanciDtlService orderBanciDtlService
-            ,IOrderBanciOrderService orderBanciOrderService)
+            ,IOrderBanciOrderService orderBanciOrderService
+            , IFiOrderrecievemoneyService fiOrderrecievemoneyService)
         {
             _logger = logger;
             _liaotianService = liaotianService;
             _orderBanciService = orderBanciService;
             _orderBanciDtlService = orderBanciDtlService;
+            _fiOrderrecievemoneyService = fiOrderrecievemoneyService;
             _orderBanciOrderService = orderBanciOrderService;
         }
 
@@ -78,9 +81,10 @@
 
             ViewData["ActionInfo"] = actionlist;
 
-            ViewBag.kechengleixing = _liaotianService.GetSYScode("order_banci_order", "kechengleixing_id").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+            ViewBag.kechengleixing = _liaotianService.GetSYScode("order_banci_order", "kechengleixing_id").Where(x=>x.CodeSn=="3").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
 
-
+            ViewBag.Baomingtimebegin = DateTime.Now.AddYears(-1).ToString("yyyy-MM-dd");
+            ViewBag.Baomingtimeend = DateTime.Now.ToString("yyyy-MM-dd");
 
             return View();
 
@@ -92,7 +96,53 @@
             return new JsonResult(_orderBanciOrderService.SearchByPaging(search));
         }
 
+        [CheckLogin]
+        public IActionResult Indexzhuanjia()
+        {
+            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+            ViewData["curentuser"] = curentuser;
+            List<ActionEntity> actionlist = new List<ActionEntity>();
+            ActionEntity actionEntity = new ActionEntity();
+            actionEntity.OpenType = 0;
+            actionEntity.ActionUrl = "";
+            actionEntity.ActionFun = "Search";
+            actionEntity.PageIco = "fa fa-search";
+            actionEntity.ActionName = "鏌ヨ";
+            actionlist.Add(actionEntity);
+            //ActionEntity actionEntity1 = new ActionEntity();
+            //actionEntity1.OpenType = 0;
+            //actionEntity1.ActionUrl = "";
+            //actionEntity1.ActionFun = "Add";
+            //actionEntity1.PageIco = "fa fa-plus";
+            //actionEntity1.ActionName = "鏂板";
+            //actionlist.Add(actionEntity1);
+            ActionEntity actionEntity3 = new ActionEntity();
+            actionEntity3.OpenType = 0;
+            actionEntity3.ActionUrl = "";
+            actionEntity3.ActionFun = "Print";
+            actionEntity3.PageIco = "fa fa-print";
+            actionEntity3.ActionName = "鎵撳嵃";
+            actionlist.Add(actionEntity3);
 
+
+            ActionEntity actionEntity4 = new ActionEntity();
+            actionEntity4.OpenType = 0;
+            actionEntity4.ActionUrl = "";
+            actionEntity4.ActionFun = "Duanxin";
+            actionEntity4.PageIco = "";
+            actionEntity4.ActionName = "鍙戦�佺煭淇�";
+            actionlist.Add(actionEntity4);
+
+            ViewData["ActionInfo"] = actionlist;
+
+            ViewBag.kechengleixing = _liaotianService.GetSYScode("order_banci_order", "kechengleixing_id").Where(x => x.CodeSn != "3").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+
+            ViewBag.Baomingtimebegin = DateTime.Now.AddYears(-1).ToString("yyyy-MM-dd");
+            ViewBag.Baomingtimeend = DateTime.Now.ToString("yyyy-MM-dd");
+
+            return View();
+
+        }
 
         [CheckLogin]
         public IActionResult print(OrderBanciOrderDTOSearch search)
@@ -157,7 +207,7 @@
                 resultEntity.Message = "鏃犺仈绯讳汉";
             }
 
-            string sss = SMSHelper.PushWToUserMES(number.ToString(), neirong);
+            string sss = SMSHelper.PushWToUserMES(number.ToString(),  neirong );
             if (int.Parse(sss) <= 0)
             {
                 resultEntity.Result = false;
@@ -204,8 +254,28 @@
                     search.BanciId = data.BanciId;
                     ResultDataEntity<OrderBanciOrderDTO> resultDataEntity = _orderBanciOrderService.SearchByPaging(search);
 
+                    if (data.Baomingrenshu.HasValue)
+                    {
+                        //if (resultDataEntity.DataList.Count > 0)
+                        //{
+                        //  var orderBanciOrderDTO =   resultDataEntity.DataList.OrderByDescending(x => x.Baomingrenshu).FirstOrDefault();
 
-                    data.Baomingrenshu = search.totalrows + 1;
+                        //    data.Baomingrenshu += orderBanciOrderDTO.Baomingrenshu;
+                        //}
+                    }
+                    else
+                    {
+                        //if (resultDataEntity.DataList.Count > 0)
+                        //{
+                        //    var orderBanciOrderDTO = resultDataEntity.DataList.OrderByDescending(x => x.Baomingrenshu).FirstOrDefault();
+
+                        //    data.Baomingrenshu = orderBanciOrderDTO.Baomingrenshu+1;
+                        //}
+                        //else
+                        //{
+                            data.Baomingrenshu =  1;
+                        //}   
+                    }
                     data.Jine = resultDataEntity.DataList.Sum(x => x.Xuefei);
                     data.Jine += data.Xuefei;
                     ResultEntity resultEntity = _orderBanciOrderService.save(data);
@@ -261,5 +331,62 @@
             }
             return new JsonResult(returnMsg);
         }
+
+
+        //鑾峰彇褰撳墠鐨勪笟鍔$被鍨�
+        public IActionResult GetBusinessType()
+        {
+            ReturnMsg<List<SysCodeDtl>> returnMsg = new ReturnMsg<List<SysCodeDtl>>();
+            returnMsg.code = 2;
+            try
+            {
+              var sysCodeDtls  = _liaotianService.GetSYScode("CooperVisit", "jtype");
+
+              
+
+                returnMsg.code = 1;
+                returnMsg.count = sysCodeDtls.Count;
+                returnMsg.returnObj = sysCodeDtls;
+
+            }
+            catch (Exception ex)
+            {
+                returnMsg.code = 2;
+                returnMsg.error = "娌℃湁鑾峰彇鍒皌oken";
+                returnMsg.count = 0;
+
+            }
+            return new JsonResult(returnMsg);
+        }
+
+
+        //鑾峰彇浼氬憳璁㈠崟淇℃伅锛屾敮浠樺畬鎴愮殑
+        public IActionResult GetOrderByHuiyuanId([FromBody] FiOrderrecievemoneyDTOSearch search)
+        {
+            ReturnMsg<List<FiOrderrecievemoneyDTO>> returnMsg = new ReturnMsg<List<FiOrderrecievemoneyDTO>>();
+            returnMsg.code = 2;
+            try
+            {
+
+                search.page = 1;
+                search.rows = 10000;
+                search.Fkzt = "03";
+                ResultDataEntity<FiOrderrecievemoneyDTO> resultDataEntity = _fiOrderrecievemoneyService.SearchByPaging(search);
+
+                returnMsg.code = 1;
+                returnMsg.count = search.totalrows;
+                returnMsg.returnObj = resultDataEntity.DataList;
+
+            }
+            catch (Exception ex)
+            {
+                returnMsg.code = 2;
+                returnMsg.error = "娌℃湁鑾峰彇鍒皌oken";
+                returnMsg.count = 0;
+
+            }
+            return new JsonResult(returnMsg);
+        }
+
     }
 }

--
Gitblit v1.9.1