public void CreateGenerateHtml() { //生成首页 Da.Add <Guid, GenerateHtml>(new GenerateHtml() { GenerateHtmlId = SeqGuid.NewGuid(), GenerateHtmlUrl = $"{Config.Domain}/Home/Index?ver={DateTime.Now.Ticks}&allow=true", GenerateHtmlPath = $"{AppDomain.CurrentDomain.BaseDirectory}index.html", IsGenerate = false, IsSuccess = false }); Task.Run(() => GenerateHtml()); }
/// <summary> /// 添加款项 /// </summary> /// <param name="userModel"></param> /// <param name="request"></param> /// <param name="msg"></param> /// <returns></returns> public bool AddSaleOrderReceive(UserModel userModel, SaleReceive request, out string msg) { var order = Da.Get <SaleOrder>(request.SaleOrderId); var b1 = CheckAuthOrder(userModel, order, out msg); if (!b1) { return(false); } if (order.Status == (int)SaleOrderStatusEnum.Draft || order.Status == (int)SaleOrderStatusEnum.ShipedPay) { msg = "添加失败"; return(false); } var currency = Da.Get <Currency>(request.CurrencyId); var b2 = CheckAuthCurrency(userModel, currency, out msg); if (!b2) { return(false); } var accout = Da.Get <Account>(request.AccountId); var b3 = CheckAuthAccount(userModel, accout, out msg); if (!b3) { return(false); } var m = new SaleReceive() { SaleReceiveId = SeqGuid.NewGuid(), SaleOrderId = order.SaleOrderId, AccountInfo = $"{accout.AccountBank}[{accout.AccountNumber}]", Amount = request.Amount, CurrencySymbol = currency.CurrencySymbol, CurrencyRate = currency.CurrencyRate, Remark = null, CreateName = userModel.UserNickName, CreateDate = DateTime.Now, }; Da.Add <Guid, SaleReceive>(m); return(true); }