| | |
| | | using cylsg.Core; |
| | | using cylsg.Model.TransferOrder; |
| | | using cylsg.Model.UserModel; |
| | | using cylsg.Model.utilityViewModel; |
| | | using cylsg.utility; |
| | | using cylsg.utility.Extend; |
| | | using Cylsg.Filter; |
| | |
| | | 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 |
| | |
| | | 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"); |
| | |
| | | { |
| | | throw Oops.Oh("已经处理不再处理"); |
| | | } |
| | | if(!(TOrder.ErrorCode== "INVALID_REQUEST"&&TOrder.ErrorMsg== "对应单号已超出重试期,请查单确认后决定是否换单请求")) |
| | | if(!((TOrder.ErrorCode== "INVALID_REQUEST"&&TOrder.ErrorMsg== "对应单号已超出重试期,请查单确认后决定是否换单请求")|| (TOrder.ErrorCode == "NOT_ENOUGH")||(TOrder.FailAmount>0))) |
| | | { |
| | | //不满足冲洗支付要求 |
| | | throw Oops.Oh("不满足重新支付要求"); |
| | |
| | | |
| | | var rs = new BaseRepository<UserWorker>(); |
| | | var userid = TOrder.UserID; |
| | | var Money = (TOrder.FailAmount??0)/100m; |
| | | decimal Money = 0; |
| | | |
| | | if (TOrder.FailAmount==null) |
| | | { |
| | | decimal overTotal = 0; |
| | | if (TOrder.BatchId == null) |
| | | { |
| | | overTotal = 0;//没有支付单,证明没有支付 |
| | | } |
| | | else |
| | | overTotal = (TOrder.SuccessAmount??0)/100m; |
| | | |
| | | |
| | | //这个是没有创建提交单 按原价重新支付 |
| | | Money = ((TOrder.TotalAmount??0)/100m)-overTotal; |
| | | |
| | | } |
| | | else |
| | | Money = (TOrder.FailAmount??0)/100m; |
| | | if(Money<0.03m) |
| | | { |
| | | throw Oops.Oh("失败金额不足0.3元不能再次发起支付"); |
| | |
| | | } |
| | | |
| | | |
| | | /// <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 |
| | | { |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |