From 80c8e74c7428329f06d1aa3b70b95b46da732b0a Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 27 六月 2024 20:09:03 +0800
Subject: [PATCH] 保存库存结算时间点重启定时任务

---
 service/input_history_search.go |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/service/input_history_search.go b/service/input_history_search.go
index 68b61f9..c2d96bb 100644
--- a/service/input_history_search.go
+++ b/service/input_history_search.go
@@ -97,12 +97,13 @@
 func SearchHistoryReport(keyword string, operationType constvar.BaseOperationType, page, pageSize int) (recordIds []int, total uint64, err error) {
 	var ids []string
 	from := (page - 1) * pageSize
-	t, err := parseDateString(keyword)
+	t, err := time.ParseInLocation("20060102", keyword, time.Local)
+	//t, err := parseDateString(keyword)
 	m := make(map[string]interface{})
 	if operationType > 0 {
 		m["baseOperationType"] = operationType
 	}
-	if err != nil && t.IsZero() {
+	if err != nil || t.IsZero() {
 		ids, total, err = blevex.ComplexSearch(HistoryReportIndexName, keyword, m, from, pageSize)
 	} else {
 		ids, total, err = blevex.TimeSearch(HistoryReportIndexName, t, m, from, pageSize)

--
Gitblit v1.8.0