|
|
@@ -28,7 +28,7 @@ class CalcConsole extends BaseBusiness
|
|
|
->asArray()->one();
|
|
|
//用户选择是否自动执行
|
|
|
$autoExec = $businessPeriod['AUTO_EXEC'] > 0;
|
|
|
- $businessIsCalculated = $businessPeriod['IS_CALCULATED'] > 0;
|
|
|
+ $businessIsCalculated = $businessPeriod['IS_CALCULATED'] == 1;
|
|
|
|
|
|
if (2 == $period['IS_PREPARE'] && 1 == $period['IS_PERFED'] && $autoExec) {
|
|
|
//拉取期业绩
|
|
|
@@ -65,7 +65,7 @@ class CalcConsole extends BaseBusiness
|
|
|
if (200 == $res['code']) {
|
|
|
CalcRecord::record($period['PERIOD_NUM'], '第' . $period['PERIOD_NUM'] . '期的奖金数据已全部拉取');
|
|
|
//待拉取完成后再将计算完成标识改为已完成
|
|
|
- \Yii::$app->$db->createCommand()->update('AR_PERIOD', ['IS_CALCULATED' => 1], 'PERIOD_NUM=' . $period['PERIOD_NUM'])->execute();
|
|
|
+ \Yii::$app->db->createCommand()->update('AR_PERIOD', ['IS_CALCULATED' => 1], 'PERIOD_NUM=' . $period['PERIOD_NUM'])->execute();
|
|
|
//自动执行完成 更新对应字段
|
|
|
//计算结束
|
|
|
Period::updatePeriodIsProcessing($period['PERIOD_NUM'], Period::NOT_PROCESSING);
|