From a247547df86f0fad8f03aebb91de68d3f2bc7918 Mon Sep 17 00:00:00 2001 From: 移动系统liao <liaoxujun@qq.com> Date: 星期四, 01 五月 2025 10:16:52 +0800 Subject: [PATCH] 修正sugsql导航更新加配置的bug --- cylsg/cylsg.Application/Transfer/UserTransfer.cs | 94 ++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 88 insertions(+), 6 deletions(-) diff --git a/cylsg/cylsg.Application/Transfer/UserTransfer.cs b/cylsg/cylsg.Application/Transfer/UserTransfer.cs index 759b681..60a5fad 100644 --- a/cylsg/cylsg.Application/Transfer/UserTransfer.cs +++ b/cylsg/cylsg.Application/Transfer/UserTransfer.cs @@ -1,6 +1,7 @@ 锘縰sing cylsg.Core; using cylsg.Model.TransferOrder; using cylsg.Model.UserModel; +using cylsg.Model.utilityViewModel; using cylsg.utility; using cylsg.utility.Extend; using Cylsg.Filter; @@ -19,6 +20,7 @@ using System.Text; using System.Threading.Tasks; using TencentCloud.Ame.V20190916.Models; +using TencentCloud.Domain.V20180808.Models; using static SKIT.FlurlHttpClient.Wechat.Api.Models.ChannelsLeadsGetLeadsInfoByComponentIdResponse.Types; namespace cylsg.Application.Transfer @@ -285,7 +287,7 @@ SearchList = SearchList.And(x =>x.IsSetOK==param.IsSetOK); } if (param.HasSendOk == false) - SearchList= SearchList.And(x => x.FailNum >0||x.BatchStatus!= "FINISHED"); + SearchList= SearchList.And(x =>( x.FailNum >0||x.BatchStatus!= "FINISHED")||(x.BatchStatus==null&&x.ErrorCode== "NOT_ENOUGH")||x.FailAmount>0); //NOT_ENOUGH 鏄处鎴锋病鏈夐挶 else //鏈変竴绗斿ぇ浣�0 鐨勮涓哄け璐� SearchList= SearchList.And(x => x.FailNum ==0&&x.BatchStatus=="FINISHED"); @@ -358,7 +360,7 @@ { throw Oops.Oh("宸茬粡澶勭悊涓嶅啀澶勭悊"); } - if(!((TOrder.ErrorCode== "INVALID_REQUEST"&&TOrder.ErrorMsg== "瀵瑰簲鍗曞彿宸茶秴鍑洪噸璇曟湡,璇锋煡鍗曠‘璁ゅ悗鍐冲畾鏄惁鎹㈠崟璇锋眰")|| (TOrder.ErrorCode == "NOTENOUGH" ))) + if(!((TOrder.ErrorCode== "INVALID_REQUEST"&&TOrder.ErrorMsg== "瀵瑰簲鍗曞彿宸茶秴鍑洪噸璇曟湡,璇锋煡鍗曠‘璁ゅ悗鍐冲畾鏄惁鎹㈠崟璇锋眰")|| (TOrder.ErrorCode == "NOT_ENOUGH")||(TOrder.FailAmount>0))) { //涓嶆弧瓒冲啿娲楁敮浠樿姹� throw Oops.Oh("涓嶆弧瓒抽噸鏂版敮浠樿姹�"); @@ -367,13 +369,23 @@ var rs = new BaseRepository<UserWorker>(); var userid = TOrder.UserID; decimal Money = 0; - if (TOrder.FailAmount==null&&TOrder.BatchId==null) + + if (TOrder.FailAmount==null) { + decimal overTotal = 0; + if (TOrder.BatchId == null) + { + overTotal = 0;//娌℃湁鏀粯鍗曪紝璇佹槑娌℃湁鏀粯 + } + else + overTotal = (TOrder.SuccessAmount??0)/100m; + + //杩欎釜鏄病鏈夊垱寤烘彁浜ゅ崟 鎸夊師浠烽噸鏂版敮浠� - Money = (TOrder.TotalAmount??0)/100m; + Money = ((TOrder.TotalAmount??0)/100m)-overTotal; + } else - Money = (TOrder.FailAmount??0)/100m; if(Money<0.03m) { @@ -873,9 +885,76 @@ } + /// <summary> + /// 鑾峰彇鍒楄〃璇︽儏 + /// </summary> + /// <returns></returns> + [HttpPost] + [AllowAnonymous] + public async Task<RetPageData<WeChatTransferOrder>> GetTransferOrder(SSPageByWhereOrder Param) + { + if (Param.Page == null) + throw Oops.Oh("鍙傛暟閿欒"); + + Expression<Func<WeChatTransferOrder, bool>> where = null; + + + if (!string.IsNullOrEmpty( Param.Where as string)) + { + //where = CommonHelper.FormatWhereExpression<WeChatTransferOrder>(Param.Where); + where = CommonHelper.FormatWhereExpression<WeChatTransferOrder>(Param.Where as string); + + } + Expression<Func<WeChatTransferOrder, object>> order = null; + if (Param.Order?.Name!=null) + { + order = CommonHelper.FormatPropertyExpression<WeChatTransferOrder>(Param.Order.Name); + + } + RefAsync<int> title = 0; + var BR = new BaseRepository<WeChatTransferOrder>(); + var data= await BR.AsQueryable().Includes(x=>x.user,u=>u.Worek).Select(x=>new WeChatTransferOrder + { + UserIDCode= x.user.Worek.IdCode, + UserName=x.user.Worek.name, + TotalAmount=x.TotalAmount, + TotalNum=x.TotalNum, + BatchId=x.BatchId, + SuccessNum=x.SuccessNum, + OutBatchNumber=x.OutBatchNumber, + BatchName = x.BatchName, + BatchStatus=x.BatchStatus, + UserID= x.UserID, + UpDataTime=x.UpDataTime, + YiTiXianGz=x.user.Worek.YiTiXianJine, + ZhongGz=x.user.Worek.TiXianZonge, + ItCode=x.user.ItCode, + SuccessAmount= x.SuccessAmount, + FailAmount=x.FailAmount + + + + + + + + }).MergeTable().WhereIF(where != null, where).OrderByIF(order!=null,order,Param.Order?.Des?? OrderByType.Asc).ToPageListAsync(Param.Page.PageIndex,Param.Page.PageSize, title); + + + + Param.Page.TotalCount = title; + + return new RetPageData<WeChatTransferOrder>() + { + data= data, + Page=Param.Page, + }; +; } + + } /// <summary> - /// + /// 鏀剁储 /// </summary> public class SearchTransferOder { @@ -951,4 +1030,7 @@ } + + + } -- Gitblit v1.9.1