From 1c5d7b4b5b9d7fab7d10be4775ea5ba4420aeecc Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 03 八月 2021 13:40:11 +0800
Subject: [PATCH] 今日开发   会员提现申请发起接口,会员提现申请审批

---
 zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs |  120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 119 insertions(+), 1 deletions(-)

diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
index 61d4363..3b23945 100644
--- a/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
@@ -1162,7 +1162,7 @@
 
 
         /// <summary>
-        /// 淇濆瓨閿�鍞垂鐢ㄧ敵璇�
+        /// 淇濆瓨鎷滆鐢宠
         /// </summary>
         /// <param name="data"></param>
         /// <returns></returns>
@@ -1203,5 +1203,123 @@
             }
             return new JsonResult(resultEntity);
         }
+
+
+        public IActionResult CustomerWithdrawal(string id = "")
+        {
+            AdmCustomerWithdrawalDTO dto = new AdmCustomerWithdrawalDTO();
+            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+
+
+            //娴佺▼鐩稿叧
+            string shifoubiaoji = "A";
+            string sifoudangqian = "A";
+            string dangqianbuzhou = "鎻愪氦";
+            var lishiyijian = new List<WfHistoryDTO>();
+
+            if (string.IsNullOrEmpty(id))
+            {
+                dto.CreaterName = curentuser.UserName;
+                dto.Tittle = "浼氬憳鎻愮幇鐢宠锛�" + curentuser.UserName + "锛�";
+            }
+            else if (dto != null)
+            {
+                dto = _askService.GetCustomerWithdrawal(id);
+                dto.ShenqingtimeName = dto.Shenqingtime.ToString("yyyy-MM-dd");
+                dto.JineName = dto.Jine.Value.ToString("F2");
+
+                var wfRunProcessDTO = _wfRunProcessService.GetList(dto.Id, "20").FirstOrDefault();
+                if (wfRunProcessDTO == null)
+                {
+                    shifoubiaoji = "D";
+                    sifoudangqian = "D";
+                }
+                else
+                {
+                    dangqianbuzhou = wfRunProcessDTO.Step;
+                    //鏌ヨ瀹℃壒杩涘害
+                    lishiyijian = _wfHistoryService.GetListshenpi(wfRunProcessDTO.Id);
+                    if (wfRunProcessDTO.Step != "鎻愪氦")
+                    {
+                        shifoubiaoji = "D";
+                    }
+
+                    //鏌ヨ寰呭姙
+                    var chaxundaiban = _wfNeeddeelService.GetListTracking(wfRunProcessDTO.Id, wfRunProcessDTO.Step).Where(x => x.DeelUserId == curentuser.Id).ToList();
+                    if (chaxundaiban != null && chaxundaiban.Count > 0)
+                    {
+                        sifoudangqian = "A";
+                    }
+                    else
+                    {
+                        sifoudangqian = "D";
+                    }
+
+                }
+
+
+
+
+            }
+
+            ViewBag.shifoubiaoji = shifoubiaoji;
+            ViewBag.sifoudangqian = sifoudangqian;
+            ViewBag.lishiyijian = lishiyijian;
+            ViewBag.dangqianbuzhou = dangqianbuzhou;
+
+            //ViewBag.jtype = _liaotianService.GetSYScode("CooperVisit", "jtype");
+            //ViewBag.visType = _liaotianService.GetSYScode("CooperVisit", "visType");
+            //var cooperatecustomCustomerDTOs = _cooperatecustomCustomerService.GetList();
+            //var intentionCustomerDTOs = _intentionCustomerService.GetList();
+
+            //ViewBag.CooperatecustomCustomerDTOs = 
+
+            ViewData.Model = dto;
+            return View();
+        }
+
+
+        /// <summary>
+        /// 浼氬憳鎻愮幇鐢宠
+        /// </summary>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult SaveCustomerWithdrawal(AdmCustomerWithdrawalDTO data)
+        {
+            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+            ResultEntity resultEntity = new ResultEntity();
+            using (TransactionScope scope = new TransactionScope())
+            {
+                if (data.Step == "鎻愪氦")
+                {
+
+                    data.ShenpiStatus = "D";
+                    data.RecStatus = "A";
+                    data.Creater = curentuser.Id;
+                    data.Createtime = DateTime.Now;
+                    data.Modifier = data.Creater;
+                    data.Modifytime = data.Createtime;
+
+                    resultEntity = _askService.SaveCustomerWithdrawal(data);
+                    if (!resultEntity.Result)
+                    {
+                        return new JsonResult(resultEntity);
+                    }
+                }
+
+
+
+                //鍙戣捣娴佺▼鐩稿叧
+
+                resultEntity = _wfRunProcessService.WfCustomerWithdrawal(data.Id, data.Step, data.Tongguojujue, curentuser.Id, data.Content, data.Tittle, "v1");
+                if (!resultEntity.Result)
+                {
+                    return new JsonResult(resultEntity);
+                }
+                scope.Complete();
+            }
+            return new JsonResult(resultEntity);
+        }
     }
 }

--
Gitblit v1.9.1