From 533f1bb4c63b45f06f977c860481db02a49dbd01 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期一, 02 八月 2021 15:36:59 +0800 Subject: [PATCH] 今日开发 开发和会员系统接口:订单业务类型列表接口、根据会员id和时间段查询已经付款的订单 --- zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs | 8 ++++ zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs | 63 ++++++++++++++++++++++++++++++- zhengcaioa/DTO/FiOrderrecievemoneyDTO.cs | 6 +++ zhengcaioa/Services/FiOrderrecievemoneyService.cs | 24 ++++++++++-- 4 files changed, 95 insertions(+), 6 deletions(-) diff --git a/zhengcaioa/DTO/FiOrderrecievemoneyDTO.cs b/zhengcaioa/DTO/FiOrderrecievemoneyDTO.cs index e010bb8..5d34850 100644 --- a/zhengcaioa/DTO/FiOrderrecievemoneyDTO.cs +++ b/zhengcaioa/DTO/FiOrderrecievemoneyDTO.cs @@ -23,12 +23,14 @@ public string KhdwName { get; set; } public string OrderType { get; set; } public string OrderTypeName { get; set; } + public string OrderTypeName1 { get; set; } public decimal Money { get; set; } public decimal YishouMoney { get; set; } public decimal WeishouMoney { get; set; } public string OrderStatus { get; set; } public string Caozuo { get; set; } public string XdTimeName { get; set; } + public DateTime XdTime { get; set; } public string SubjectId { get; set; } @@ -43,6 +45,10 @@ public string OrderType { get; set; } public string Fkzt { get; set; } public string OrderNo { get; set; } + public string HuiyuanId { get; set; } + public string StartTime { get; set; } + public string EndTime { get; set; } + } } diff --git a/zhengcaioa/Services/FiOrderrecievemoneyService.cs b/zhengcaioa/Services/FiOrderrecievemoneyService.cs index 773918e..9532878 100644 --- a/zhengcaioa/Services/FiOrderrecievemoneyService.cs +++ b/zhengcaioa/Services/FiOrderrecievemoneyService.cs @@ -181,11 +181,25 @@ into ksssss from kkk in ksssss.DefaultIfEmpty() + + join n in _context.FiBooks + on a.OrderType1 equals n.Id + into nsssss + from nnn in nsssss.DefaultIfEmpty() + + join m in _context.FiMembers + on a.OrderType1 equals m.Id + into msssss + from mmm in msssss.DefaultIfEmpty() + + where a.RecStatus == "A" && a.ChedanStatus == "D" && (string.IsNullOrWhiteSpace(searchEntity.XdTime) || (a.XdTime >= XdTimestart && a.XdTime <= XdTimeend)) && (string.IsNullOrWhiteSpace(searchEntity.OrderType) || a.OrderType == searchEntity.OrderType.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.OrderNo) || a.OrderNo.Contains(searchEntity.OrderNo.Trim())) - + && (string.IsNullOrWhiteSpace(searchEntity.HuiyuanId) || ggg.HuiyuanId == searchEntity.HuiyuanId.Trim()) + && (string.IsNullOrWhiteSpace(searchEntity.StartTime) || a.XdTime >= DateTime.Parse(searchEntity.StartTime) ) + && (string.IsNullOrWhiteSpace(searchEntity.EndTime) || a.XdTime <= DateTime.Parse(searchEntity.EndTime).AddSeconds(1)) @@ -196,16 +210,18 @@ { Id = a.Id, OrderId = a.Id, - XdTimeName = a.XdTime.ToString("yyyy-MM-dd"), + XdTime = a.XdTime, + XdTimeName = a.XdTime.ToString("yyyy-MM-dd HH:mm:ss"), OrderNo = a.OrderNo, OrderNum = a.OrderNum, Khdw = a.Khdw, KhdwName = ggg.Name, OrderType = a.OrderType, OrderTypeName = fff.Comments, - Money = (a.Money ?? 0) - (a.Youhui ?? 0), + OrderTypeName1 = fff.Comments +"-"+ (string.IsNullOrEmpty(nnn.BookName) ? string.IsNullOrEmpty(mmm.MemberType) ? a.OrderType1 : mmm.MemberType : nnn.BookName) + (string.IsNullOrEmpty(a.OrderType2)?"":"-"+ a.OrderType2), + Money = (a.Money ?? 0)/* - (a.Youhui ?? 0)*/, YishouMoney = lll.YishouMoney??0, - WeishouMoney = (a.Money ?? 0) - (a.Youhui ?? 0) - (lll.YishouMoney??0), + WeishouMoney = (a.Money ?? 0) /*- (a.Youhui ?? 0)*/ - (lll.YishouMoney??0), diff --git a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs index 4a0a6b5..5d7e7ab 100644 --- a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs @@ -28,15 +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; - _orderBanciOrderService = orderBanciOrderService; + _fiOrderrecievemoneyService = fiOrderrecievemoneyService; } [CheckLogin] @@ -261,5 +263,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 = 1; + 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); + } + } } diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs index a6068ba..46efb73 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs @@ -106,6 +106,14 @@ { dto = _intentionVisitService.Get(id); + //dto.Viscustomer = Viscustomer; + IntentionVisitDTOSearch searchEntity = new IntentionVisitDTOSearch(); + searchEntity.page = 1; + searchEntity.rows = 1000; + searchEntity.Viscustomer = dto.Viscustomer; + var resultDataEntity = _intentionVisitService.SearchByPaging(searchEntity); + ViewData["visitlishi"] = resultDataEntity.DataList; + } else { -- Gitblit v1.9.1