From f33ece65bdfd7b8354bd5046d4b9d2d600643b0f Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期六, 09 十月 2021 13:24:51 +0800 Subject: [PATCH] tijiao --- zhengcaioa/zhengcaioa/Controllers/admin/CustomerWithdrawalController.cs | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 105 insertions(+), 1 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/CustomerWithdrawalController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/CustomerWithdrawalController.cs index b3cdab9..7c3e077 100644 --- a/zhengcaioa/zhengcaioa/Controllers/admin/CustomerWithdrawalController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/admin/CustomerWithdrawalController.cs @@ -113,7 +113,28 @@ returnMsg.count = 0; return new JsonResult(returnMsg); } - + if (string.IsNullOrWhiteSpace(data.BankAcount)) + { + returnMsg.code = 2; + returnMsg.error = "娌℃湁閾惰璐︽埛锛�"; + returnMsg.count = 0; + return new JsonResult(returnMsg); + } + if (string.IsNullOrWhiteSpace(data.BankName)) + { + returnMsg.code = 2; + returnMsg.error = "娌℃湁閾惰鍚嶇О锛�"; + returnMsg.count = 0; + return new JsonResult(returnMsg); + } + if (string.IsNullOrWhiteSpace(data.Username)) + { + returnMsg.code = 2; + returnMsg.error = "娌℃湁鏀舵浜哄鍚嶏紒"; + returnMsg.count = 0; + return new JsonResult(returnMsg); + } + ResultEntity resultEntity = new ResultEntity(); using (TransactionScope scope = new TransactionScope()) { @@ -180,5 +201,88 @@ } return new JsonResult(returnMsg); } + + + + + + /// <summary> + /// 浼氬憳鎻愮幇鐢宠锛屽鎵圭粨鏋� + /// </summary> + /// <param name="data"></param> + /// <returns></returns> + public IActionResult GetCustomerWithdrawal(string OrderNo) + { + ReturnMsg<AdmCustomerWithdrawalDTO> returnMsg = new ReturnMsg<AdmCustomerWithdrawalDTO>(); + returnMsg.code = 2; + try + { + //楠岃瘉鏁版嵁瀹屾暣鎬� + if (string.IsNullOrWhiteSpace(OrderNo)) + { + returnMsg.code = 2; + returnMsg.error = "娌℃湁璁㈠崟鍙凤紒"; + returnMsg.count = 0; + return new JsonResult(returnMsg); + } + + + ResultEntity resultEntity = new ResultEntity(); + + var customerWithdrawalDTO = _askService.GetCustomerWithdrawalList(OrderNo).FirstOrDefault(); + + + //楠岃瘉鏄惁閲嶅鍙戣捣 + if (customerWithdrawalDTO == null) + { + returnMsg.code = 2; + returnMsg.error = "娌℃湁鏌ユ壘鍒板鎵规祦绋嬶紒"; + returnMsg.count = 0; + return new JsonResult(returnMsg); + } + + + + var sysCodeDtls = _liaotianService.GetSYScode("wf_run_process", "shenpi_status"); + var sysCodeDtl = sysCodeDtls.Where(x => x.CodeSn == customerWithdrawalDTO.ShenpiStatus).FirstOrDefault(); + if (sysCodeDtl != null) + { + customerWithdrawalDTO.ShenpiStatusName = sysCodeDtl.Comments; + } + var wfRunProcessDTO = _wfRunProcessService.GetList(customerWithdrawalDTO.Id, "20").FirstOrDefault(); + + if (wfRunProcessDTO == null) + { + returnMsg.code = 2; + returnMsg.error = "娌℃湁鏌ユ壘鍒板鎵规祦绋嬶紒"; + returnMsg.count = 0; + return new JsonResult(returnMsg); + } + + var lishiyijian = _wfHistoryService.GetListshenpi(wfRunProcessDTO.Id).LastOrDefault() ; + if (lishiyijian == null) + { + returnMsg.code = 2; + returnMsg.error = "娌℃湁鏌ユ壘鍒板鎵规祦绋嬶紒"; + returnMsg.count = 0; + return new JsonResult(returnMsg); + } + customerWithdrawalDTO.Content = lishiyijian.Content; + customerWithdrawalDTO.Step = wfRunProcessDTO.Step; + + returnMsg.code = 1; + returnMsg.returnObj = customerWithdrawalDTO; + returnMsg.count = 1; + + } + catch (Exception ex) + { + returnMsg.code = 2; + returnMsg.error = "娌℃湁鑾峰彇鍒皌oken"; + returnMsg.count = 0; + + } + return new JsonResult(returnMsg); + } } } -- Gitblit v1.9.1