优化实时修改

master
chenzhi 3 years ago
parent 3459e20313
commit a1fa0afee5

@ -353,7 +353,7 @@ class StatementWarningController extends AdminController
private function getMonthLastUpdate($year,$month)
{
$lastUpdate = $this->statementWarningModel->where([
$lastUpdate = $this->statementWarningInfoModel->where([
'count_year'=>$year,
'count_month'=>$month,
])->field("MAX(create_time) create_time")->find();
@ -403,9 +403,11 @@ class StatementWarningController extends AdminController
$poolname = 'up_statement';
}
$preMonth = explode('-',date('Y-m',mktime(0,0,0,$info['count_month'],1,$info['count_year'])-1));
$this->statementWarningModel->where([
'count_year'=>$info['count_year'],
'count_month'=>$info['count_month'],
'count_year'=>$preMonth[0],
'count_month'=>$preMonth[1],
'name'=>$poolname,
])->setDec('money',$diffMoney);
}

@ -241,8 +241,8 @@
layer.msg('要重算的月份必须小于当前时间');
return false;
}
if(subtimeArr[0] == year && subtimeArr[1] > month){
layer.msg('要重算的月份必须小于当前时间');
if(subtimeArr[0] == year && subtimeArr[1] >= month){
layer.msg('要重算的月份必须小于当前月份');
return false;
}

Loading…
Cancel
Save