From 80bae1d3cbf42919d7983a09a4520eb6a724ad9b Mon Sep 17 00:00:00 2001 From: louwenzhi Date: Tue, 10 Aug 2021 13:20:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E7=85=A7=E5=AE=9E=E9=99=85=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=94=9F=E4=BA=A7=E5=B7=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task/task.go | 6 +++--- web/models/pm_wo_model.go | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/task/task.go b/task/task.go index 500615a..afdb37f 100644 --- a/task/task.go +++ b/task/task.go @@ -125,7 +125,7 @@ func doSth(ctx context.Context) { } //判断是否添加了服务 - t2now, _ := utils.TimeParse(tem.Schedbegtime) + t2now, _ := utils.TimeParse(tem.Actbegtime) endtime := t2now.AddDate(0, 0, timeunit) //先把时间字符串格式化成相同的时间类型 nowtime, _ := utils.TimeParseyyyyMMdd(t1) @@ -241,7 +241,7 @@ func doSth(ctx context.Context) { continue } glog.InfoExtln("维护工单B", "tem:", tem) - time2, _ := utils.TimeParse(tem.Schedbegtime) + time2, _ := utils.TimeParse(tem.Actbegtime) time1, _ := utils.TimeParse(t1) timelen := int(time1.Unix()) - int(time2.Unix()) timeunit := task.PmService.Duehourinterval @@ -517,7 +517,7 @@ func doSth(ctx context.Context) { if err != nil { continue } - time2, _ := utils.TimeParse(tem.Schedbegtime) + time2, _ := utils.TimeParse(tem.Actbegtime) time1, _ := utils.TimeParseyyyyMMdd(today) timelen := int(time1.Unix()) - int(time2.Unix()) if err != nil { diff --git a/web/models/pm_wo_model.go b/web/models/pm_wo_model.go index 8e58987..387ac51 100644 --- a/web/models/pm_wo_model.go +++ b/web/models/pm_wo_model.go @@ -320,10 +320,10 @@ func (t *PmWo) GetPage(pageSize int, pageIndex int, searchtime string, mainttype if !utils.ValueIsEmpty(searchtime) { searchtimes := strings.Split(searchtime, "-") - table = table.And("pm_wo.credatuz >= ?", searchtimes[0]) - table = table.And("pm_wo.credatuz <= ?", searchtimes[1]) - where += " and pm_wo.credatuz >= ? " - where += " and pm_wo.credatuz <= ? " + table = table.And("pm_wo.actbegtime >= ?", searchtimes[0]) + table = table.And("pm_wo.actbegtime <= ?", searchtimes[1]) + where += " and pm_wo.actbegtime >= ? " + where += " and pm_wo.actbegtime <= ? " parameters = append(parameters, searchtimes[0], searchtimes[1]) } if t.Assetid > 0 {