From b3b54f994b5f17b850413c6398e63e25744635e9 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 26 十一月 2021 08:51:37 +0800
Subject: [PATCH] 提交

---
 zhengcaioa/Services/SysCodeService.cs |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/zhengcaioa/Services/SysCodeService.cs b/zhengcaioa/Services/SysCodeService.cs
index c838a9f..59459b6 100644
--- a/zhengcaioa/Services/SysCodeService.cs
+++ b/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))
                 {

--
Gitblit v1.9.1