aa
This commit is contained in:
@@ -18,7 +18,7 @@ func SimFlowDaySettle() (err error) {
|
||||
db = globals.GetDB()
|
||||
now = time.Now()
|
||||
monthBegin = utils.Str2Time(utils.Int2Str(now.Year()) + "-" + utils.Int2Str(int(now.Month())) + "-01 00:00:00")
|
||||
monthEnd = monthBegin.AddDate(0, 0, -1).AddDate(0, 1, 0)
|
||||
monthEnd = monthBegin.AddDate(0, 1, 0).AddDate(0, 0, -1)
|
||||
)
|
||||
globals.SugarLogger.Debugf("SimFlowDaySettle Begin monthBegin %v, monthEnd %v", monthBegin, monthEnd)
|
||||
//月末好像不用算超不超了
|
||||
@@ -64,8 +64,8 @@ func SimFlowDaySettle() (err error) {
|
||||
sumIncome, _ := dao.GetSimFlowIncomeSum(db, v.IccID, monthBegin, monthEnd)
|
||||
sumExpend, _ := dao.GetSimFlowExpendSum(db, v.IccID, monthBegin, monthEnd)
|
||||
if sumExpend.Flow-sumIncome.Flow <= 0 {
|
||||
v.Status = model.PrinterStatusOverFlow
|
||||
dao.Update(db, v, "Status")
|
||||
v.FlowFlag = 1
|
||||
dao.Update(db, v, "flow_flag")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user