mirror of http://gitlab.batiao8.com/yic/film.git
amount
This commit is contained in:
parent
cef4bac1f9
commit
eb1823486b
|
@ -7,4 +7,5 @@ type Nowcar struct {
|
||||||
Workstation string
|
Workstation string
|
||||||
StartTime int64
|
StartTime int64
|
||||||
EndTime int64
|
EndTime int64
|
||||||
|
Amount int64
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,6 +88,8 @@ func getInfo(devId string) ([]string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
m2.EndTime = time.Now().Unix()
|
m2.EndTime = time.Now().Unix()
|
||||||
|
m2.Amount = goutil.If(m2.EndTime-m2.StartTime <= 600, 660,
|
||||||
|
60*(m2.EndTime-m2.StartTime-600)+660)
|
||||||
err = dao.NewNowCarDao().Update(m2)
|
err = dao.NewNowCarDao().Update(m2)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("db error :%s", err.Error())
|
log.Errorf("db error :%s", err.Error())
|
||||||
|
|
Loading…
Reference in New Issue