|
|
@@ -140,15 +140,14 @@ class Period extends \common\components\ActiveRecord
|
|
|
* @return array|null|\yii\db\ActiveRecord
|
|
|
*/
|
|
|
public function setPeriodNum($periodNum = null){
|
|
|
- LoggerTool::debug(['Calc-0-3', $periodNum]);
|
|
|
if($periodNum === 0 || $periodNum === null || $periodNum === ''){
|
|
|
//if($this->nowPeriodArr === null){
|
|
|
$this->nowPeriodArr = static::find()->where('IS_CLOSED=0')->orderBy('PERIOD_NUM ASC')->asArray()->one();
|
|
|
+ LoggerTool::debug(['Calc-0-3', $this->nowPeriodArr]);
|
|
|
//}
|
|
|
$this->periodArr = $this->nowPeriodArr;
|
|
|
$periodNum = $this->nowPeriodArr['PERIOD_NUM'];
|
|
|
} else {
|
|
|
- LoggerTool::debug(['Calc-0-4', $periodNum, $this->periodNum]);
|
|
|
if($periodNum !== $this->periodNum){
|
|
|
$this->periodArr = static::findOneAsArray(['PERIOD_NUM'=>$periodNum]);
|
|
|
}
|
|
|
@@ -942,7 +941,6 @@ class Period extends \common\components\ActiveRecord
|
|
|
)
|
|
|
->asArray()
|
|
|
->one();
|
|
|
- LoggerTool::debug(['Calc-1-1', $result]);
|
|
|
if (isset($result['IS_PERFED']) && $result['IS_PERFED'] == 1) {
|
|
|
return true;
|
|
|
}
|