コード例 #1
0
ファイル: AutoController.php プロジェクト: didwjdgks/yii2-i2
 /**
  * 유찰 처리
  */
 private function suc_f($workload)
 {
     $bidkey = BidKey::findOne($workload['bidid']);
     if ($bidkey === null) {
         return;
     }
     $out[] = "[i2] [{$bidkey->bidid}] %g{$bidkey->notinum}%n {$bidkey->constnm}";
     $bidres = BidRes::findOne($bidkey->bidid);
     if ($bidres === null) {
         $bidres = new BidRes(['bidid' => $bidkey->bidid]);
     }
     $bidres->yega = 0;
     $bidres->selms = '';
     $bidres->multispare = '';
     $bidres->officenm1 = '유찰';
     $bidres->reswdt = date('Y-m-d H:i:s');
     $bidres->save();
     $bidcontent = BidContent::findOne($workload['bidid']);
     if ($bidcontent !== null) {
         $bidcontent->nbidcomment = $workload['nbidcomment'];
     }
     $bidcontent->save();
     if (($bidkey->opt & pow(2, 5)) == 0) {
         $bidkey->opt += pow(2, 5);
     }
     if ($workload['constnm'] !== null) {
         if (strpos($workload['constnm'], '//') !== false) {
             $bidkey->constnm = $workload['constnm'] . '(유찰)';
         } else {
             if ($bidkey->constnm !== null) {
                 $bidkey->constnm = $workload['constnm'] . '//' . '(유찰)';
             }
         }
     }
     $bidkey->bidproc = 'F';
     $bidkey->resdt = date('Y-m-d H:i:s');
     $bidkey->editdt = date('Y-m-d H:i:s');
     $bidkey->save();
     $out[] = "%y유찰%n";
     $this->stdout(Console::renderColoredString(join(' ', $out)) . "\n");
 }
コード例 #2
0
ファイル: BidKey.php プロジェクト: didwjdgks/yii2-i2
 public function getBidContent()
 {
     return $this->hasOne(BidContent::className(), ['bidid' => 'bidid']);
 }