From 283f3e33e15409f657c152881620103c95811768 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期五, 15 七月 2022 15:29:15 +0800 Subject: [PATCH] 提交修改 --- zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs | 152 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 149 insertions(+), 3 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs index f953040..617b2c6 100644 --- a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs @@ -47,6 +47,7 @@ private readonly IFiOrderrecievemoneyService _fiOrderrecievemoneyService; private readonly IFiAccountService _fiAccountService; private readonly IFiAccountRecordService _iFiAccountRecordService; + private readonly ISysAttachmentService _sysAttachmentService; public CooperOrderController(ILogger<CooperOrderController> logger, ILiaotianService liaotianService, IUserService userService, ICooperOrderService cooperOrderService @@ -60,6 +61,7 @@ , IFiOrderrecievemoneyService fiOrderrecievemoneyService , IFiAccountService fiAccountService , IFiAccountRecordService iFiAccountRecordService + , ISysAttachmentService sysAttachmentService ) { _logger = logger; @@ -80,6 +82,7 @@ _fiOrderrecievemoneyService = fiOrderrecievemoneyService; _fiAccountService = fiAccountService; _iFiAccountRecordService = iFiAccountRecordService; + _sysAttachmentService = sysAttachmentService; } [CheckLogin] @@ -1017,7 +1020,13 @@ ResultEntity resultEntity = new ResultEntity(); resultEntity.Result = false; - using (TransactionScope scope = new TransactionScope()) + using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, + new TransactionOptions + { + IsolationLevel = IsolationLevel.ReadCommitted, + Timeout = TransactionManager.MaximumTimeout + } + )) { CooperOrderDTO dto = _cooperOrderService.Get(id); @@ -1084,6 +1093,59 @@ } + if(dto.Money<=0 && dto.OrderType == "05") + { + var cooperatecustomCustomerDTO = _cooperatecustomCustomerService.Get(dto.Khdw); + var fiMemberDTO = _fiMemberService.Get(dto.OrderType1); + //寮�閫氫細鍛� + string huiyuanurl = _configuration.GetSection("huiyuanurl").Value; + string OAWriteChangeAsync = _configuration.GetSection("OAWriteChangeAsync").Value; + + Uri postUrl2 = new Uri(huiyuanurl + OAWriteChangeAsync); + JObject questions2 = new JObject(); + questions2.Add("UserID", cooperatecustomCustomerDTO.HuiyuanId); + questions2.Add("PhoneNumber", cooperatecustomCustomerDTO.Tel); + questions2.Add("VIPName", fiMemberDTO.MemberType); + questions2.Add("FromName", "OA"); + questions2.Add("UserName", cooperatecustomCustomerDTO.Name); + + + + + + string requestJson2 = questions2.ToString(); + string result2 = string.Empty; + + using (HttpContent httpContent = new StringContent(requestJson2)) + { + httpContent.Headers.ContentType = new MediaTypeHeaderValue("application/json"); + + using (HttpClient httpClient = new HttpClient()) + { + httpClient.Timeout = new TimeSpan(0, 0, 10); + HttpResponseMessage responseMessage = httpClient.PostAsync(postUrl2, httpContent).Result; + result2 = responseMessage.Content.ReadAsStringAsync().Result; + } + + } + + _logger.LogInformation("result2:" + result2); + JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); + + if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") + { + cooperatecustomCustomerDTO.HuiyuanId = jobjectresult["UserID"].ToString(); + _cooperatecustomCustomerService.save(cooperatecustomCustomerDTO); + resultEntity.Result = true; + } + else + { + resultEntity.Result = false; + resultEntity.Message = "鍐欏叆浼氬憳鏉冮檺澶辫触"; + return new JsonResult(resultEntity); + } + + } dto.Shoulier = curentuser.Id; dto.Shoulitime = DateTime.Now; @@ -1140,9 +1202,10 @@ ResultEntity resultEntity = new ResultEntity(); resultEntity.Result = false; + using (TransactionScope scope = new TransactionScope()) { - + CooperOrderDTO dto = _cooperOrderService.Get(Chedanid); if (dto.ShouliStatus != "2") { @@ -2200,10 +2263,53 @@ //ViewBag.law = sysCodeDtls1;//娉曞緥渚濇嵁 + var cooperOrderDTO = _cooperOrderService.Get(id); + var cooperatecustomCustomerDTO = _cooperatecustomCustomerService.Get(cooperOrderDTO.Khdw); + if (cooperatecustomCustomerDTO.Name.IndexOf("鑲′唤鏈夐檺鍏徃") >= 0) + { + cooperatecustomCustomerDTO.Zhiwu = "钁d簨闀�"; + } + else if (cooperatecustomCustomerDTO.Name.IndexOf("鏈夐檺鍏徃") >= 0 || cooperatecustomCustomerDTO.Name.IndexOf("鏈夐檺璐d换鍏徃") >= 0) + { + cooperatecustomCustomerDTO.Zhiwu = "鎵ц钁d簨"; + } + else if (cooperatecustomCustomerDTO.Name.IndexOf("鍗忎細") >= 0) + { + cooperatecustomCustomerDTO.Zhiwu = "浼氶暱"; + } + else + { + cooperatecustomCustomerDTO.Zhiwu = "鎬荤粡鐞�"; + } + ResultDataEntity<SysAttachmentDTO> resultsyinyezhizhao = new ResultDataEntity<SysAttachmentDTO>(); + + SysAttachmentDTOSearch searchEntity = new SysAttachmentDTOSearch(); + searchEntity.page = 1; + searchEntity.rows = 1000; + searchEntity.AttObj = "Cooperyinyezhizhao"; + searchEntity.AttObjid = cooperOrderDTO.Khdw; + resultsyinyezhizhao = _sysAttachmentService.SearchByPaging(searchEntity); + + ViewBag.yinyezhizhao = resultsyinyezhizhao; + + + ResultDataEntity<SysAttachmentDTO> resultshenfenzheng = new ResultDataEntity<SysAttachmentDTO>(); + + SysAttachmentDTOSearch searchEntity1 = new SysAttachmentDTOSearch(); + searchEntity1.page = 1; + searchEntity1.rows = 1000; + searchEntity1.AttObj = "Cooperashenfenzheng"; + searchEntity1.AttObjid = cooperOrderDTO.Khdw; + resultshenfenzheng = _sysAttachmentService.SearchByPaging(searchEntity1); + ViewBag.shenfenzheng = resultshenfenzheng; + + ViewBag.cooperatecustomCustomerDTO = cooperatecustomCustomerDTO; ViewData.Model = challengeletterDTO; + + return View(); } @@ -2731,10 +2837,50 @@ } - + + var cooperOrderDTO = _cooperOrderService.Get(id); + var cooperatecustomCustomerDTO = _cooperatecustomCustomerService.Get(cooperOrderDTO.Khdw); + if (cooperatecustomCustomerDTO.Name.IndexOf("鑲′唤鏈夐檺鍏徃") >= 0) + { + cooperatecustomCustomerDTO.Zhiwu = "钁d簨闀�"; + } + else if (cooperatecustomCustomerDTO.Name.IndexOf("鏈夐檺鍏徃") >= 0 || cooperatecustomCustomerDTO.Name.IndexOf("鏈夐檺璐d换鍏徃") >= 0) + { + cooperatecustomCustomerDTO.Zhiwu = "鎵ц钁d簨"; + } + else if (cooperatecustomCustomerDTO.Name.IndexOf("鍗忎細") >= 0) + { + cooperatecustomCustomerDTO.Zhiwu = "浼氶暱"; + } + else + { + cooperatecustomCustomerDTO.Zhiwu = "鎬荤粡鐞�"; + } + ResultDataEntity<SysAttachmentDTO> resultsyinyezhizhao = new ResultDataEntity<SysAttachmentDTO>(); + SysAttachmentDTOSearch searchEntity = new SysAttachmentDTOSearch(); + searchEntity.page = 1; + searchEntity.rows = 1000; + searchEntity.AttObj = "Cooperyinyezhizhao"; + searchEntity.AttObjid = cooperOrderDTO.Khdw; + resultsyinyezhizhao = _sysAttachmentService.SearchByPaging(searchEntity); + + ViewBag.yinyezhizhao = resultsyinyezhizhao; + + + ResultDataEntity<SysAttachmentDTO> resultshenfenzheng = new ResultDataEntity<SysAttachmentDTO>(); + + SysAttachmentDTOSearch searchEntity1 = new SysAttachmentDTOSearch(); + searchEntity1.page = 1; + searchEntity1.rows = 1000; + searchEntity1.AttObj = "Cooperashenfenzheng"; + searchEntity1.AttObjid = cooperOrderDTO.Khdw; + resultshenfenzheng = _sysAttachmentService.SearchByPaging(searchEntity1); + ViewBag.shenfenzheng = resultshenfenzheng; + + ViewBag.cooperatecustomCustomerDTO = cooperatecustomCustomerDTO; ViewData.Model = complaintletterDTO; -- Gitblit v1.9.1