| New file |
| | |
| | | using cylsg.Core; |
| | | using cylsg.Model.ECTEModel; |
| | | using EzCoreNet.Redis; |
| | | using EzInitqMessageDef; |
| | | using EzWechat; |
| | | using Furion; |
| | | using Furion.FriendlyException; |
| | | using InitQ.Abstractions; |
| | | using InitQ.Attributes; |
| | | using MapsterMapper; |
| | | using Models; |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | using StackExchange.Profiling.Internal; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace EzInitQ |
| | | { |
| | | /// <summary> |
| | | /// 川印 消息队列处理函数 |
| | | /// </summary> |
| | | public class CY_MessageServiser: IRedisSubscribe |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 川印厂商ID |
| | | /// </summary> |
| | | public Guid firmId => new Guid("88B49967-D590-452C-93C6-0049A75FA5FF"); |
| | | /// <summary> |
| | | /// 司机问题反馈 分发问题 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | [Subscribe(InitQMessages.CYOSDeiverWentiFankuai)] |
| | | public async void CYOSDeiverWentiFanKui(string msg) |
| | | { |
| | | |
| | | ISqlSugarClient _OAsqlSugarClient = App.GetService<ISqlSugarClient>().AsTenant().GetConnection("ECTESTOADB"); |
| | | |
| | | |
| | | var userdata = JsonConvert.DeserializeObject<CY_OSDeiverWentiFankuaiModes>(msg); |
| | | |
| | | if(userdata ==null) |
| | | throw Oops.Oh($"队列CYOSDeiverWentiFankuai 处理失败,请检查消息格式++++++++{msg}"); |
| | | if(userdata.OA_DeliverPlanPaicheID==null) |
| | | throw Oops.Oh($"队列CYOSDeiverWentiFankuai 处理失败,没有获取到派车ID+++++++++{msg}"); |
| | | |
| | | //var DbC = new BaseRepository<OA_DeliverPlanPaiche>(); |
| | | var data= await _OAsqlSugarClient.Queryable<OA_DeliverPlanPaiche>().Includes(x=>x.Driver).Where(x=>x.Keyid==userdata.OA_DeliverPlanPaicheID).FirstAsync(); |
| | | if(data==null) |
| | | throw Oops.Oh($"队列CYOSDeiverWentiFankuai 处理失败,没有获取到派车信息+++++++++{msg}"); |
| | | |
| | | if(data.Driver==null) |
| | | { |
| | | throw Oops.Oh($"队列CYOSDeiverWentiFankuai 处理失败,没有获取到司机信息+++++++++{msg}"); |
| | | |
| | | } |
| | | |
| | | //var WorkReminderDb = new BaseRepository<OA_WorkReminder>(); |
| | | //订单ID |
| | | var SellerOrderId = await _OAsqlSugarClient.Queryable<OA_DeliverPlan>().Where(x => x.DeliverPlanPaicheid == data.Keyid).Select(x=>x.SellerOrderId).FirstAsync(); |
| | | string? orderDocumentName = null; |
| | | if (SellerOrderId != null) |
| | | orderDocumentName = await _OAsqlSugarClient.Queryable<EC_OrderBasic>().Where(x => x.SellerOrderId == SellerOrderId).Select(x => x.DocumentName).FirstAsync(); |
| | | |
| | | //创建人 |
| | | var creerter = await _OAsqlSugarClient.Queryable<OaStaff>().Where(x => x.MemberId == data.Creater).Select(x => x.Name).FirstAsync(); |
| | | if(creerter!=null) |
| | | { |
| | | await _OAsqlSugarClient.Insertable(new OA_WorkReminder |
| | | { |
| | | Content = $" 派送:{data.CompanyName} 地址:{data.Dizhi}, {data.Remark??""} {orderDocumentName??""}。 送货反馈:{userdata.WenTi}", |
| | | RemenderObject = creerter, |
| | | Remender = data.Driver.Name, |
| | | RemenderTime= userdata.CreateTime |
| | | |
| | | }).ExecuteCommandAsync(); |
| | | } |
| | | |
| | | //派车任务 |
| | | var PaiCheRenwu= await _OAsqlSugarClient.Queryable<OA_DeliverTixing>().Includes(x=>x.SentStaff).Where(x=>x.DeliverPlanPaicheId==data.Keyid).FirstAsync(); |
| | | if(PaiCheRenwu!=null) |
| | | { |
| | | await _OAsqlSugarClient.Insertable(new OA_WorkReminder |
| | | { |
| | | Content = $" 派送:{data.CompanyName} 地址:{data.Dizhi}, {data.Remark ?? ""} {orderDocumentName ?? ""}。 送货反馈:{userdata.WenTi}", |
| | | Remender = data.Driver.Name , |
| | | RemenderObject = PaiCheRenwu?.SentStaff?.Name??"", |
| | | RemenderTime = userdata.CreateTime |
| | | |
| | | }).ExecuteCommandAsync(); |
| | | } |
| | | |
| | | if (data.Zerenren!=null) |
| | | { |
| | | //var zherenrenDb = new BaseRepository<OaStaff>(); |
| | | var zherenren = await _OAsqlSugarClient.Queryable<OaStaff>().Where(x=>x.Keyid==data.Zerenren&&x.FirmId== firmId).Select(x=>x.Name).FirstAsync(); |
| | | if(zherenren!=null) |
| | | { |
| | | await _OAsqlSugarClient.Insertable(new OA_WorkReminder |
| | | { |
| | | Content = $" 派送:{data.CompanyName} 地址:{data.Dizhi}, {data.Remark ?? ""} {orderDocumentName ?? ""}。 送货反馈:{userdata.WenTi}", |
| | | RemenderObject = zherenren, |
| | | Remender = data.Driver.Name, |
| | | RemenderTime = userdata.CreateTime |
| | | |
| | | }).ExecuteCommandAsync(); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | // 发起支付 |
| | | var requit = _mapper.Map<CreateTransferBatchRequest>(TransferOrder); |
| | | requit.AppId = App.Configuration["WechatAPP:AppId"]; |
| | | requit.BatchName = "小镇临时工工资转账"; |
| | | requit.BatchName = "川印临时工工资转账"; |
| | | requit.BatchRemark = $"{TransferOrder.user.ItCode}{userWk.name?.Substring(0, 2)}{userWk.IdCode}"; |
| | | |
| | | var ret = await _wecharPayServicecs.Transfer(requit); |
| | |
| | | |
| | | requit.BatchName = msg; |
| | | requit.AppId = App.Configuration["WechatAPP:AppId"]; |
| | | requit.BatchName = "小镇临时工工资转账"; |
| | | requit.BatchName = "川印临时工工资转账"; |
| | | requit.BatchRemark = $"{TransferOrder.user.ItCode}{userWk.name?.Substring(0,2)}{userWk.IdCode}"; |
| | | |
| | | var ret = await _wecharPayServicecs.Transfer(requit); |
| | |
| | | m.SuspendTime = 1000; |
| | | m.IntervalTime = 1000; |
| | | m.ConnectionString = App.Configuration["InitQRedisConfig:ConnectionString"]; |
| | | m.ListSubscribe = new List<Type>() { typeof(PayServiceMessageQ) }; |
| | | m.ListSubscribe = new List<Type>() { typeof(PayServiceMessageQ),typeof(CY_MessageServiser) }; |
| | | m.ShowLog = false; |
| | | |
| | | }); |
| | |
| | | ///重新支付 |
| | | /// </summary> |
| | | public const string WxTransferAg = "WxTransferAg"; |
| | | |
| | | /// <summary> |
| | | /// 川印反馈 |
| | | /// </summary> |
| | | public const string CYOSDeiverWentiFankuai = "CYOSDeiverWentiFankuai"; |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 向堆栈中压入一个消息 |
| | | /// </summary> |
| | |
| | | public class WxTransferMsqModels |
| | | { |
| | | /// <summary> |
| | | /// 体现金额 |
| | | /// 提现金额 |
| | | /// </summary> |
| | | public decimal money { get; set; } |
| | | |
| | |
| | | /// </summary> |
| | | public int UserID { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// 川印问题反馈模型 |
| | | /// </summary> |
| | | public class CY_OSDeiverWentiFankuaiModes |
| | | { |
| | | /// <summary> |
| | | /// 订单模型 |
| | | /// </summary> |
| | | public Guid? OA_DeliverPlanPaicheID { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 问题 |
| | | /// </summary> |
| | | public string WenTi { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 发起时间 |
| | | /// </summary> |
| | | public DateTime CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 操作方式 |
| | | /// </summary> |
| | | public WentiFankuaiOpEmun op { get; set; }= WentiFankuaiOpEmun.add; |
| | | |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 问题反馈状态 |
| | | /// </summary> |
| | | public enum WentiFankuaiOpEmun |
| | | { |
| | | /// <summary> |
| | | /// 增加 |
| | | /// </summary> |
| | | add, |
| | | /// <summary> |
| | | /// 取消 |
| | | /// </summary> |
| | | move |
| | | |
| | | } |
| | | } |
| | |
| | | using cylsg.Model.utilityViewModel; |
| | | using ECTESTOA; |
| | | using EzCoreNet.Redis; |
| | | using EzInitqMessageDef; |
| | | using Furion.LinqBuilder; |
| | | using Microsoft.AspNetCore.Http.HttpResults; |
| | | using Models; |
| | |
| | | if(Param.Deliveredstatus== DeliveredType.Delivered) |
| | | a.DeliveredTime = DateTime.Now; |
| | | a.Wentifankui = Param.Wentifankui; |
| | | if( !string.IsNullOrEmpty( Param.Wentifankui)) |
| | | { |
| | | |
| | | //问题反馈不为空,则插入反馈信息 |
| | | |
| | | await InitQMessages.SendMessageAsync<CY_OSDeiverWentiFankuaiModes>(InitQMessages.CYOSDeiverWentiFankuai, new CY_OSDeiverWentiFankuaiModes |
| | | { |
| | | CreateTime = DateTime.Now, |
| | | OA_DeliverPlanPaicheID = a.Keyid, |
| | | WenTi = Param.Wentifankui, |
| | | }); |
| | | } |
| | | a.Deliveredstatus= Param.Deliveredstatus; |
| | | a.Attachments = Param.Attachments; |
| | | |
| | |
| | | OA_DeliverTixing? tixing=null; |
| | | if(Param.DeliverTixingId>0) |
| | | { |
| | | //是提醒订单,需要执行提醒单 状态干煸 |
| | | //是提醒订单,需要执行提醒单 状态 |
| | | tixing = await _client.Queryable<OA_DeliverTixing>().Where(x => x.Keyid == Param.DeliverTixingId).FirstAsync(); |
| | | if(tixing == null) |
| | | { |
| | |
| | | Dianhua = Param.Dianhua, |
| | | Dizhi = Param.Dizhi, |
| | | Remark = Param.Remark, |
| | | BusinessManagerId = cor == null ? 0 : cor.BusinessManagerId, |
| | | BusinessManagerId = cor == null ? 0 : cor.BusinessManagerId, |
| | | Biddingcompany = cor == null ? 0 : (cor.Biddingcompany ?? 0), |
| | | ShifouDelivery = 1, |
| | | Lianxiren = Param.Lianxiren, |
| | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 是否半固定 |
| | | /// </summary> |
| | | public bool? IsGuding { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 历史工价 |
| | | /// </summary> |
| | | public List<OrderBiddingWorkPrice> orderBiddingWorkPrices { get; set; } |
| | |
| | | /// </summary> |
| | | public int OrderBiddingId { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 是否固定 |
| | | /// </summary> |
| | | public bool? IsGuding { get; set; } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | /// 是否收藏 |
| | | /// </summary> |
| | | public bool IsCollect { get; set; } |
| | | |
| | | } |
| | | |
| | | |
| | | public class BangudingDto |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 招工明细OrderBiddingId |
| | | /// </summary> |
| | | public int OrderBiddingId { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 是否固定 |
| | | /// </summary> |
| | | public bool IsGuding { get; set; } |
| | | |
| | | } |
| | | |
| | |
| | | /// 招工公司名称 |
| | | /// </summary> |
| | | public string Suppliername { get; set; } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 是否灵活用工 |
| | | /// </summary> |
| | | public bool? IsGuding { get; set; } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | orderBidding.Selectedtime = DateTime.Now; |
| | | orderBidding.UpDataBy = NickName; |
| | | orderBidding.UpDataTime = DateTime.Now; |
| | | |
| | | //是否是半固定临时工 |
| | | orderBidding.IsGuding = queRenDto.IsGuding; |
| | | |
| | | res = await orderBiddingRes.UpdateAsync(orderBidding); |
| | | |
| | |
| | | orderBiddingWorkPrice.CreateBy = NickName; |
| | | orderBiddingWorkPrice.CreateTime = DateTime.Now; |
| | | res = await orderBiddingWorkPriceRes.InsertAsync(orderBiddingWorkPrice); |
| | | |
| | | return res; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 设置员工是半固定临时工是否是 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpPost] |
| | | public async Task<bool> GudingGongren(BangudingDto bangudingDto) |
| | | { |
| | | |
| | | var UserID = App.User?.FindFirstValue("UserID"); |
| | | int userid = 0; |
| | | string NickName = App.User?.FindFirstValue("NickName"); |
| | | if (!string.IsNullOrEmpty(UserID)) |
| | | { |
| | | userid = int.Parse(UserID); |
| | | } |
| | | |
| | | var orderBiddingRes = new BaseRepository<OrderBidding>(); |
| | | |
| | | var orderBidding = await orderBiddingRes.GetByIdAsync(bangudingDto.OrderBiddingId); |
| | | if (orderBidding == null || orderBidding.IsEn != true || orderBidding.IsDeleted == true) |
| | | { |
| | | throw Oops.Oh("该投递已经无效!"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | bool res; |
| | | |
| | | orderBidding.IsGuding = bangudingDto.IsGuding; |
| | | |
| | | orderBidding.UpDataBy = NickName; |
| | | orderBidding.UpDataTime = DateTime.Now; |
| | | |
| | | |
| | | res = await orderBiddingRes.UpdateAsync(orderBidding); |
| | | |
| | | |
| | | |
| | | return res; |
| | | } |
| | |
| | | var orderBiddingWorkPriceRepository = new BaseRepository<OrderBiddingWorkPrice>(); |
| | | var orderBiddingDetailCheckRepository = new BaseRepository<OrderBiddingDetailCheck>(); |
| | | var userWorkerRes = new BaseRepository<UserWorker>(); |
| | | var orderBiddingRes = new BaseRepository<OrderBidding>(); |
| | | |
| | | var data = await orderRepository.Context.Queryable<Order, OrderBidding, OrderBiddingDetail, UserWorker>((a, b, c, d) => |
| | | new JoinQueryInfos(JoinType.Inner, a.Id == b.OrderId, |
| | | JoinType.Inner, b.Id == c.OrderBiddingId, |
| | |
| | | WorkerUserId = b.WorkerUserId, |
| | | WorkerUserName = d.name, |
| | | OrderBiddingId = c.OrderBiddingId, |
| | | IsGuding = b.IsGuding, |
| | | }) |
| | | |
| | | .ToPageListAsync(page.PageIndex, page.PageSize, total); |
| | |
| | | { |
| | | int hours = 0; |
| | | int minutes = 0; |
| | | |
| | | int jiabanhours = 0; |
| | | int jiabanminutes = 0; |
| | | |
| | | var orderBiddingDetailChecks = await orderBiddingDetailCheckRepository.GetListAsync(x => x.OrderBiddingDetailId == dakaDto.OrderBiddingDetailId && x.IsEn == true && x.IsDeleted == false); |
| | | string DakaMingxi = ""; |
| | | for (int i = 0; i < orderBiddingDetailChecks.Count; i++) |
| | |
| | | hours += timeDifference.Hours; |
| | | minutes += timeDifference.Minutes; |
| | | |
| | | |
| | | // 获取当前时间 |
| | | DateTime now = DateTime.Now; |
| | | |
| | | // 创建一个表示晚上8点的时间(假定今天) |
| | | DateTime eveningTime = new DateTime(now.Year, now.Month, now.Day, 20, 0, 0); // 20:00:0 |
| | | //计算是否为晚上8点后的加班时间 |
| | | if (orderBiddingDetailChecks[i].Checktime.Value > eveningTime ) |
| | | { |
| | | var timeDifferencejiaban = orderBiddingDetailChecks[i].Checktime.Value - eveningTime; |
| | | jiabanhours += timeDifferencejiaban.Hours; |
| | | jiabanminutes += timeDifferencejiaban.Minutes; |
| | | } |
| | | |
| | | } |
| | | } |
| | | var orderBidding = await orderBiddingRes.GetByIdAsync(dakaDto.OrderBiddingId); |
| | | //当前有效的工价 |
| | | var orderBiddingWorkPrices = await orderBiddingWorkPriceRepository.GetListAsync(x => x.OrderBiddingId == dakaDto.OrderBiddingId && x.IsEn == true && x.IsDeleted == false && x.EffectTime <= dakaDto.WorkDate); |
| | | var orderBiddingWorkPrice = orderBiddingWorkPrices.OrderByDescending(x => x.Id).FirstOrDefault(); |
| | | if (orderBiddingWorkPrice != null) |
| | | { |
| | | dakaDto.WorkPrice = orderBiddingWorkPrice.WorkPrice; |
| | | //如果为半固定的临时工,工价固定11块 |
| | | if (orderBidding != null && orderBidding.IsGuding.HasValue && orderBidding.IsGuding.Value == true) |
| | | { |
| | | dakaDto.WorkPrice = 11; |
| | | } |
| | | else |
| | | { |
| | | dakaDto.WorkPrice = orderBiddingWorkPrice.WorkPrice; |
| | | } |
| | | } |
| | | //如果当天还没有填写申请,则计算工作时间和工资 |
| | | if (dakaDto.IsShenPi == 0) |
| | |
| | | if (dakaDto.WorkerType == 0) |
| | | { |
| | | dakaDto.TodaySalary = dakaDto.WorkTime * dakaDto.WorkPrice; |
| | | |
| | | //如果为半固定的临时工,加班每个小时增加4块钱 |
| | | if (orderBidding != null && orderBidding.IsGuding.HasValue && orderBidding.IsGuding.Value == true) |
| | | { |
| | | var jiabanshijian = jiabanhours + (jiabanminutes / 60); |
| | | dakaDto.TodaySalary += (jiabanshijian * 4); |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | RefAsync<int> total = 0; |
| | | |
| | | |
| | | var orderBiddingDetailCheckRepository = new BaseRepository<OrderBiddingDetailCheck>(); |
| | | var orderBiddingWorkPriceRepository = new BaseRepository<OrderBiddingWorkPrice>(); |
| | | var orderBiddingRes = new BaseRepository<OrderBidding>(); |
| | | |
| | | var data = await orderRepository.Context.Queryable<Order, OrderBidding, OrderBiddingDetail ,UserCompany>((a, b ,c ,d) => |
| | | new JoinQueryInfos(JoinType.Inner, a.Id == b.OrderId , |
| | | JoinType.Inner, b.Id == c.OrderBiddingId , |
| | |
| | | WorkCount = c.WorkCount, |
| | | Suppliername = d.Suppliername, |
| | | OrderBiddingId = c.OrderBiddingId, |
| | | IsGuding = b.IsGuding, |
| | | }) |
| | | |
| | | .ToPageListAsync(page.PageIndex, page.PageSize, total); |
| | |
| | | string DakaMingxi = ""; |
| | | int hours = 0; |
| | | int minutes = 0; |
| | | |
| | | int jiabanhours = 0; |
| | | int jiabanminutes = 0; |
| | | |
| | | for (int i = 0; i < orderBiddingDetailChecks.Count; i++) |
| | | { |
| | | |
| | |
| | | hours += timeDifference.Hours; |
| | | minutes += timeDifference.Minutes; |
| | | |
| | | // 获取当前时间 |
| | | DateTime now = DateTime.Now; |
| | | |
| | | // 创建一个表示晚上8点的时间(假定今天) |
| | | DateTime eveningTime = new DateTime(now.Year, now.Month, now.Day, 20, 0, 0); // 20:00:0 |
| | | //计算是否为晚上8点后的加班时间 |
| | | if (orderBiddingDetailChecks[i].Checktime.Value > eveningTime) |
| | | { |
| | | var timeDifferencejiaban = orderBiddingDetailChecks[i].Checktime.Value - eveningTime; |
| | | jiabanhours += timeDifferencejiaban.Hours; |
| | | jiabanminutes += timeDifferencejiaban.Minutes; |
| | | } |
| | | } |
| | | } |
| | | //如果当天还没有填写申请,则计算工作时间和工资 |
| | | if(dakaDto.IsShenPi == 0) |
| | | { |
| | | var orderBidding = await orderBiddingRes.GetByIdAsync(dakaDto.OrderBiddingId); |
| | | //当前有效的工价 |
| | | var orderBiddingWorkPrice = (await orderBiddingWorkPriceRepository.GetListAsync(x => x.OrderBiddingId == dakaDto.OrderBiddingId && x.IsEn == true && x.IsDeleted == false && x.EffectTime <= dakaDto.WorkDate)).OrderByDescending(x => x.Id).FirstOrDefault(); |
| | | if (orderBiddingWorkPrice != null) |
| | | { |
| | | dakaDto.WorkPrice = orderBiddingWorkPrice.WorkPrice; |
| | | //如果为半固定的临时工,工价固定11块 |
| | | if (orderBidding != null && orderBidding.IsGuding.HasValue && orderBidding.IsGuding.Value == true) |
| | | { |
| | | dakaDto.WorkPrice = 11; |
| | | } |
| | | else |
| | | { |
| | | dakaDto.WorkPrice = orderBiddingWorkPrice.WorkPrice; |
| | | } |
| | | } |
| | | dakaDto.WorkTime = hours+(minutes/60); |
| | | if(dakaDto.WorkerType == 0) |
| | | { |
| | | dakaDto.TodaySalary = dakaDto.WorkTime * dakaDto.WorkPrice; |
| | | |
| | | //如果为半固定的临时工,加班每个小时增加4块钱 |
| | | if (orderBidding != null && orderBidding.IsGuding.HasValue && orderBidding.IsGuding.Value == true) |
| | | { |
| | | var jiabanshijian = jiabanhours + (jiabanminutes / 60); |
| | | dakaDto.TodaySalary += (jiabanshijian * 4); |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | using cylsg.Core; |
| | | using cylsg.Model.OrderModel; |
| | | using cylsg.Model.TransferOrder; |
| | | using cylsg.Model.UserModel; |
| | | using cylsg.Model.utilityViewModel; |
| | |
| | | { |
| | | throw Oops.Oh("该用户没有收入"); |
| | | } |
| | | if ((uw.TiXianZonge - uw.YiTiXianJine) < Money) |
| | | |
| | | bool IsGuDing = false; |
| | | var bdct = new BaseRepository<OrderBidding>(); |
| | | if (bdct != null) |
| | | { |
| | | var userBd= await bdct.GetFirstAsync(x=>x.WorkerUserId==userid&&x.IsGuding==true); |
| | | if(userBd != null) |
| | | { |
| | | IsGuDing = true; |
| | | } |
| | | } |
| | | |
| | | if (((uw.TiXianZonge??0) - (uw.YiTiXianJine??0)-(IsGuDing?300:0)) < Money) |
| | | { |
| | | if(IsGuDing) |
| | | { |
| | | throw Oops.Oh("用户余额不足,灵活用工宿舍押金300元"); |
| | | } |
| | | else |
| | | throw Oops.Oh("用户余额不足"); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取为支付列表 |
| | | /// 获取为未付列表 |
| | | /// </summary> |
| | | [AllowAnonymous] |
| | | [HttpPost] |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 重新创建新的支付单 |
| | | /// 创建新的支付单 |
| | | /// </summary> |
| | | /// <param name="ids"></param> |
| | | /// <returns></returns> |
| | |
| | | [ApiExplorerSettings(IgnoreApi = true)] |
| | | public async Task<WeChatTransferOrder> CreateTransferOder(CreatTransferOderIN Param) |
| | | { |
| | | |
| | | if(Param.Key!= DateTime.Now.ToString("yyyy-MM-dd:HH")+"CreatTransfer") |
| | | { |
| | | //key 错误 |
| | |
| | | { |
| | | throw Oops.Oh("一天转账金额必须小于2000"); |
| | | } |
| | | |
| | | |
| | | var totle = _redisService.Get<decimal>(StaticStringDef.TransferMoneyManKey + Param.UserID.ToString()); |
| | | if (totle + Param.Money > 2000) |
| | | { |
| | |
| | | /// </summary> |
| | | public string Resume { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否是灵活用工 |
| | | /// </summary> |
| | | public bool IsLingHuoYongGong { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 可用余额 |
| | | /// </summary> |
| | | public decimal AvailableBalance { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 余额 |
| | | /// </summary> |
| | | public decimal Balance { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 提现总额 |
| | | /// </summary> |
| | |
| | | /// 已提现金额 |
| | | /// </summary> |
| | | public decimal? YiTiXianJine { get; set; } |
| | | |
| | | |
| | | } |
| | | |
| | | public class UserCompanyDto |
| | |
| | | using System.Runtime.Intrinsics.Arm; |
| | | using MapsterMapper; |
| | | using ECTESTOA; |
| | | using cylsg.Model.OrderModel; |
| | | |
| | | |
| | | namespace cylsg.Application.Users |
| | |
| | | { |
| | | userDto.userWorker = _mapper.Map<UserWorkerDto>(userWorker); |
| | | } |
| | | |
| | | bool IsGuDing = false; |
| | | var bdct = new BaseRepository<OrderBidding>(); |
| | | if (bdct != null) |
| | | { |
| | | var userBd = await bdct.GetFirstAsync(x => x.WorkerUserId == userid&& x.IsGuding==true); |
| | | if (userBd != null) |
| | | { |
| | | IsGuDing = true; |
| | | } |
| | | } |
| | | userDto.userWorker.IsLingHuoYongGong = IsGuDing; |
| | | decimal ab = (userDto.userWorker.TiXianZonge ?? 0) - (userDto.userWorker.YiTiXianJine ?? 0 ); |
| | | userDto.userWorker.Balance =ab < 0 ? 0 : ab; |
| | | if (IsGuDing) |
| | | { |
| | | |
| | | userDto.userWorker.AvailableBalance = (ab-300)<0 ? 0 : (ab - 300); |
| | | |
| | | } |
| | | else |
| | | |
| | | userDto.userWorker.AvailableBalance = userDto.userWorker.Balance; |
| | | |
| | | |
| | | |
| | | |
| | | var userCompany = await userCompanyRes.GetFirstAsync(p => p.UserId == userid); |
| | | if (userCompany != null) |
| | | { |
| | |
| | | { |
| | | userDto.userWorker = _mapper.Map<UserWorkerDto>(userWorker); |
| | | } |
| | | bool IsGuDing = false; |
| | | var bdct = new BaseRepository<OrderBidding>(); |
| | | if (bdct != null) |
| | | { |
| | | var userBd = await bdct.GetFirstAsync(x => x.WorkerUserId == userid && x.IsGuding == true); |
| | | if (userBd != null) |
| | | { |
| | | IsGuDing = true; |
| | | } |
| | | } |
| | | userDto.userWorker.IsLingHuoYongGong = IsGuDing; |
| | | |
| | | decimal ab = (userDto.userWorker.TiXianZonge ?? 0) - (userDto.userWorker.YiTiXianJine ?? 0); |
| | | userDto.userWorker.Balance = ab < 0 ? 0 : ab; |
| | | if (IsGuDing) |
| | | { |
| | | |
| | | userDto.userWorker.AvailableBalance = (ab - 300) < 0 ? 0 : (ab - 300); |
| | | |
| | | } |
| | | else |
| | | |
| | | userDto.userWorker.AvailableBalance = userDto.userWorker.Balance; |
| | | |
| | | |
| | | |
| | | |
| | | var userCompany = await userCompanyRes.GetFirstAsync(p => p.UserId == userid); |
| New file |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace cylsg.Model.ECTEModel |
| | | { |
| | | |
| | | /// <summary> |
| | | /// |
| | | ///</summary> |
| | | [SugarTable("OA_WorkReminder")] |
| | | public class OA_WorkReminder |
| | | { |
| | | |
| | | |
| | | /// <summary> |
| | | /// 备 注: |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "Keyid", IsPrimaryKey = true, IsIdentity = true)] |
| | | public int Keyid { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 备 注: |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "FirmId")] |
| | | public Guid FirmId { get; set; } = new Guid("88B49967-D590-452C-93C6-0049A75FA5FF"); |
| | | |
| | | /// <summary> |
| | | /// 备 注: |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "Content")] |
| | | public string Content { get; set; } = null!; |
| | | |
| | | /// <summary> |
| | | /// 备 注: |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "Remender")] |
| | | public string? Remender { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 备 注: |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "RemenderObject")] |
| | | public string? RemenderObject { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 备 注: |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "RemenderType")] |
| | | public int? RemenderType { get; set; } = 0; |
| | | |
| | | /// <summary> |
| | | /// 备 注: |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "RemenderDept")] |
| | | public string? RemenderDept { get; set; } = ""; |
| | | |
| | | /// <summary> |
| | | /// 备 注:反馈时间 |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "RemenderTime")] |
| | | public DateTime? RemenderTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 备 注: |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "Remark")] |
| | | public string? Remark { get; set; } = ""; |
| | | |
| | | /// <summary> |
| | | /// 备 注: |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "RemenderDelState")] |
| | | public int? RemenderDelState { get; set; } = 0; |
| | | |
| | | /// <summary> |
| | | /// 备 注: |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "RemenderObjectDelState")] |
| | | public int? RemenderObjectDelState { get; set; } = 0; |
| | | |
| | | /// <summary> |
| | | /// 备 注: |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "IsFinish")] |
| | | public int? IsFinish { get; set; } = 0; |
| | | |
| | | /// <summary> |
| | | /// 备 注: |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "FeedBackContent")] |
| | | public string? FeedBackContent { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 备 注: |
| | | /// 默认值: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "RemindState")] |
| | | public int? RemindState { get; set; } = 0; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "是否收藏", IsNullable = true)] |
| | | public bool? IsCollect { get; set; } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 是否固定 晚上8点之后15块 早八点到晚八点11块 |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "是否固定", IsNullable = true)] |
| | | public bool? IsGuding { get; set; } |
| | | } |
| | | } |
| | |
| | | "ValidateAudience": true, // 是否验证签收方,bool 类型,默认true |
| | | "ValidAudience": "www.51zhengcai.com", // 签收方,string 类型 |
| | | "ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true |
| | | "ExpiredTime": 10, // 过期时间,long 类型,单位分钟,默认20分钟 |
| | | "ExpiredTime": 1000000, // 过期时间,long 类型,单位分钟,默认20分钟 |
| | | "ClockSkew": 5, // 过期时间容错值,long 类型,单位秒,默认 5秒 |
| | | "Algorithm": "HS256", // 加密算法,string 类型,默认 HS256 |
| | | "RefreshTokenExpires": 1 //分钟 1天 1440分钟 |
| | | "RefreshTokenExpires": 100000 //分钟 1天 1440分钟 |
| | | } |
| | | } |