username@email.com
2021-11-26 b3b54f994b5f17b850413c6398e63e25744635e9
zhengcaioa/Services/SysCodeService.cs
@@ -406,6 +406,11 @@
                            select a
                             ).OrderBy(x=>x.Sort).ToList();
            if (!string.IsNullOrEmpty(searchEntity.Sort))
            {
                listCode = listCode.OrderBy(x => x.CodeSn).ToList();
            }
            //if (searchEntity.totalrows == 0)
            //{
                //获取总数
@@ -504,6 +509,17 @@
            resultEntity.Result = true;
            try
            {
                if (!string.IsNullOrEmpty(Entity.CodeSn))
                {
                    var list = _context.SysCodeDtls.Where(e => e.CodeSn == Entity.CodeSn && e.RecStatus == "A" && e.Id != Entity.Id && e.CodeId == Entity.CodeId).ToList();
                    if (list.Count > 0)
                    {
                        resultEntity.Result = false;
                        resultEntity.Message = "该编码已经存在";
                        return resultEntity;
                    }
                }
                if (!string.IsNullOrEmpty(Entity.Id))
                {