diff --git a/dao/ap/implments/ArticleDemand.dao.impl.go b/dao/ap/implments/ArticleDemand.dao.impl.go index 2a61677..f5f9c20 100644 --- a/dao/ap/implments/ArticleDemand.dao.impl.go +++ b/dao/ap/implments/ArticleDemand.dao.impl.go @@ -406,8 +406,8 @@ func (impl *ArticleDemandDAOImplement) RefreshArticleDemand() ([]model.ArticleDe ******************************************************************************/ func (impl *ArticleDemandDAOImplement) SelectTop() (*model.ArticleDemand, error) { - parameters := []interface{}{impl.plantNr} - where := fmt.Sprintf("%s = ?", meta.ArticleDemand_PlantNr.ColumnName) + parameters := []interface{}{impl.plantNr, 2} + where := fmt.Sprintf("%s = ? and %s = ?", meta.ArticleDemand_PlantNr.ColumnName, meta.ArticleDemand_Status.ColumnName) session := impl.session.Table(impl.meta.TableName).Where(where, parameters...) session = session.OrderBy(meta.ArticleDemand_PlantNr.ColumnName) diff --git a/task/k3cloud.go b/task/k3cloud.go index ff49cca..fadb927 100644 --- a/task/k3cloud.go +++ b/task/k3cloud.go @@ -52,14 +52,14 @@ func TaskInit() { //erp.PublishPlan(100, "admin") i = false } - time.Sleep(time.Minute * 30) + time.Sleep(time.Minute * 5) } } //1天任务 func oneTask(_date time.Time) { //需要定时登录erp - utils.K3configTestInit() + utils.K3configInit() //if DaysBetweenDates(lastTime.OneTime, _date) >= 1 {