| | |
| | | using CoreCms.Net.Model.Entities.baifenbingfa.Promote.OffLineDistributor; |
| | | using CoreCms.Net.Model.ViewModels.Basics; |
| | | using CoreCms.Net.Model.ViewModels.UI; |
| | | using NPOI.POIFS.Macros; |
| | | using SqlSugar; |
| | | |
| | | |
| | |
| | | /// <returns></returns> |
| | | public async Task<AdminUiCallBack> UserInsertAsync(OfflineDistributor entity) |
| | | { |
| | | var b= await _unitOfWork.GetDbClient().Queryable<OfflineDistributor>().Where(x=>x.CollectionTime==entity.CollectionTime&&x.DealerName==entity.DealerName&&x.Adder==entity.Adder).CountAsync(); |
| | | if(b>0) |
| | | return new AdminUiCallBack() |
| | | { |
| | | code = 1, |
| | | msg = "请勿重复提交数据" |
| | | |
| | | }; |
| | | |
| | | entity.createTime = DateTime.Now; |
| | | entity.createBy = $"{_contextUser.Name}"; |
| | | var bol = await _unitOfWork.GetDbClient().InsertNav(entity).Include(x => x.meetings).ExecuteCommandAsync(); |