From 9caa1b7835c9326e6281a260cd87030602667e58 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 30 十一月 2021 17:22:49 +0800
Subject: [PATCH] 提交
---
zhengcaioa/Services/SysCodeService.cs | 26 +++++++++++++++++++++-----
1 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/zhengcaioa/Services/SysCodeService.cs b/zhengcaioa/Services/SysCodeService.cs
index 527653b..59459b6 100644
--- a/zhengcaioa/Services/SysCodeService.cs
+++ b/zhengcaioa/Services/SysCodeService.cs
@@ -33,11 +33,11 @@
(searchEntity.Comments == "" ? true : s.Comments.Contains(searchEntity.Comments)) &&
(searchEntity.RecStatus == "" ? s.RecStatus == "A" : s.RecStatus == searchEntity.RecStatus)
).ToList();
- if (searchEntity.totalrows == 0)
- {
+ //if (searchEntity.totalrows == 0)
+ //{
//鑾峰彇鎬绘暟
searchEntity.totalrows = listCode.Count;
- }
+ //}
var list = listCode.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
var listSysCode = new List<SysCodeEntity>();
if (list.Count > 0)
@@ -406,11 +406,16 @@
select a
).OrderBy(x=>x.Sort).ToList();
- if (searchEntity.totalrows == 0)
+ if (!string.IsNullOrEmpty(searchEntity.Sort))
{
+ listCode = listCode.OrderBy(x => x.CodeSn).ToList();
+ }
+
+ //if (searchEntity.totalrows == 0)
+ //{
//鑾峰彇鎬绘暟
searchEntity.totalrows = listCode.Count;
- }
+ //}
var list = listCode.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
var listSysCode = new List<SysCodeDtlEntity>();
@@ -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))
{
--
Gitblit v1.9.1