From 3262eb334953a1b208aa4a50584442a3804912d9 Mon Sep 17 00:00:00 2001
From: LR-20210131IOQH\Administrator <jackcold@163.com>
Date: 星期日, 27 六月 2021 13:09:43 +0800
Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/zhengcaioa
---
zhengcaioa/Services/ProjectService.cs | 49 +++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 43 insertions(+), 6 deletions(-)
diff --git a/zhengcaioa/Services/ProjectService.cs b/zhengcaioa/Services/ProjectService.cs
index 765ddb6..4097033 100644
--- a/zhengcaioa/Services/ProjectService.cs
+++ b/zhengcaioa/Services/ProjectService.cs
@@ -301,8 +301,30 @@
sql.Append(" )");
}
-
- if (!string.IsNullOrWhiteSpace(searchEntity.fblx))
+
+ if (!string.IsNullOrWhiteSpace(searchEntity.Reasonname))
+ {
+ sql.Append(" and exists (select b.[ProjectId] from [Projectreason] b where a.[Id]=b.[ProjectId] and b.[reasonname] like '%" + searchEntity.Reasonname + "%') ");
+
+ }
+
+ if (!string.IsNullOrWhiteSpace(searchEntity.ShiFouyReasonname))
+ {
+ if (searchEntity.ShiFouyReasonname == "A")
+ {
+ sql.Append(" and exists (select b.[ProjectId] from [Projectreason] b where a.[Id]=b.[ProjectId] ) ");
+
+ }
+ else
+ {
+ sql.Append(" and not exists (select b.[ProjectId] from [Projectreason] b where a.[Id]=b.[ProjectId] ) ");
+ }
+
+
+ }
+
+
+ if (!string.IsNullOrWhiteSpace(searchEntity.fblx))
{
if (searchEntity.fblx == "A")
{
@@ -316,16 +338,31 @@
}
+ DateTime StartTimestarstart = DateTime.Now;
+ DateTime StartTimestarend = DateTime.Now;
if (!string.IsNullOrWhiteSpace(searchEntity.StartTimestar))
{
- sql.Append(" and a.start_time >='"+ searchEntity.StartTimestar.Trim().Replace("'","''") + "'");
-
+ string[] StartTimestars = searchEntity.StartTimestar.Split("|");
+ DateTime.TryParse(StartTimestars[0], out StartTimestarstart);
+ DateTime.TryParse(StartTimestars[1], out StartTimestarend);
+ //Createtimeend = Createtimeend.AddDays(1);
}
- if (!string.IsNullOrWhiteSpace(searchEntity.StartTimeend))
+
+
+ if (!string.IsNullOrWhiteSpace(searchEntity.StartTimestar))
{
- sql.Append(" and a.start_time <='" + DateTime.Parse(searchEntity.StartTimeend.Trim().Replace("'", "''")).AddDays(1).ToString("yyyy-MM-dd") + "'"); ;
+ sql.Append(" and a.start_time >='" + StartTimestarstart.ToString("yyyy-MM-dd") + "'");
}
+ if (!string.IsNullOrWhiteSpace(searchEntity.StartTimestar))
+ {
+ sql.Append(" and a.start_time <='" + StartTimestarend.AddDays(1).ToString("yyyy-MM-dd") + "'");
+
+ }
+
+
+
+
if (!string.IsNullOrWhiteSpace(searchEntity.Sheng))
{
--
Gitblit v1.9.1