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 {