修改创建下级子商户bug问题

This commit is contained in:
Hinse 2022-05-16 16:49:30 +08:00
parent c800ccb046
commit 581e5aa852
4 changed files with 2 additions and 3 deletions

View File

@ -321,8 +321,7 @@ namespace Waste.Application
parentid = currentUser.BusinessId; parentid = currentUser.BusinessId;
var bcode = currentUser.BusinessCode; var bcode = currentUser.BusinessCode;
var len = bcode.Length; var len = bcode.Length;
var maxcode = await dbClient.Queryable<W_Business>().Where(x => SqlFunc.StartsWith(x.Code, code) && SqlFunc.Length(x.Code) > len).MaxAsync(x => x.Code); int cnt = await dbClient.Queryable<W_Business>().Where(x => x.ParentId == parentid).CountAsync();
var cnt = maxcode.Substring(maxcode.Length - 4).ToInt();
code = GenCode(bcode, cnt); code = GenCode(bcode, cnt);
} }
else else

File diff suppressed because one or more lines are too long