From 0f5218bb8ed4ad8fa9b8b2f089efd624dc6e9f07 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期一, 21 六月 2021 08:56:25 +0800 Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/zhengcaioa --- zhengcaioa/Services/ProjectService.cs | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/zhengcaioa/Services/ProjectService.cs b/zhengcaioa/Services/ProjectService.cs index e57e271..765ddb6 100644 --- a/zhengcaioa/Services/ProjectService.cs +++ b/zhengcaioa/Services/ProjectService.cs @@ -27,6 +27,16 @@ ResultEntity resultEntity = new ResultEntity(); try { + var checkUserSn = _context.Projects.Where(x => x.Name == projectDTO.Name && x.RecStatus == "A" && x.Id != projectDTO.Id).FirstOrDefault(); + if (checkUserSn != null && (string.IsNullOrWhiteSpace(projectDTO.Id) || (!string.IsNullOrWhiteSpace(projectDTO.Id) && checkUserSn.Id != projectDTO.Id))) + { + resultEntity.Result = false; + resultEntity.Message = "椤圭洰閲嶅"; + return resultEntity; + } + + + var project = _mapper.Map<Project>(projectDTO); // var ZhuanjiaList = projectDTO.ZhuanjiaList; //if(ZhuanjiaList!=null&& ZhuanjiaList.Length > 0) @@ -291,6 +301,20 @@ sql.Append(" )"); } + + if (!string.IsNullOrWhiteSpace(searchEntity.fblx)) + { + if (searchEntity.fblx == "A") + { + sql.Append(" and a.fblx is not null "); + } + else + { + sql.Append(" and a.fblx is null "); + } + + + } if (!string.IsNullOrWhiteSpace(searchEntity.StartTimestar)) { -- Gitblit v1.9.1