Ver Fonte

update find exam

zhouj1203@hotmail.com há 1 ano atrás
pai
commit
60aa34ba0f
1 ficheiros alterados com 17 adições e 0 exclusões
  1. 17 0
      TEAMModelOS/Controllers/Common/ExamController.cs

+ 17 - 0
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -499,6 +499,23 @@ namespace TEAMModelOS.Controllers
                     string ss = string.Join(" or ", strs);
                     stringBuilder.Append($" and {ss}");
                 };
+                //开始时间,
+                if (request.TryGetProperty("stime", out JsonElement stime))
+                {
+                    if (long.TryParse($"{stime}", out long data))
+                    {
+                        stringBuilder.Append($" and  c.createTime >= {data} ");
+
+                    };
+                };
+                //默认当前时间
+                if (request.TryGetProperty("etime", out JsonElement etime))
+                {
+                    if (long.TryParse($"{etime}", out long data))
+                    {
+                        stringBuilder.Append($" and  c.createTime <= {data} ");
+                    };
+                };
                 if (request.TryGetProperty("period", out JsonElement period) && !string.IsNullOrWhiteSpace($"{period}"))
                 {
                     stringBuilder.Append($" and c.period.id = '{period}' ");