| | |
| | | select a |
| | | ).OrderBy(x=>x.Sort).ToList(); |
| | | |
| | | if (!string.IsNullOrEmpty(searchEntity.Sort)) |
| | | { |
| | | listCode = listCode.OrderBy(x => x.CodeSn).ToList(); |
| | | } |
| | | |
| | | //if (searchEntity.totalrows == 0) |
| | | //{ |
| | | //获取总数 |
| | |
| | | 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)) |
| | | { |