fixed-2023-12-29-1

This commit is contained in:
weiz 2023-12-29 10:17:18 +08:00
parent ce3a1385d1
commit 217b710231
4 changed files with 21 additions and 6 deletions

View File

@ -16,8 +16,10 @@ namespace app\adminapi\lists\bid;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\bid\BidBuyBiddingDocument;
use app\common\model\bid\BidDocumentExamination;
use app\common\lists\ListsSearchInterface;
use app\common\model\project\Project;
/**
@ -57,7 +59,15 @@ class BidDocumentExaminationLists extends BaseAdminDataLists implements ListsSea
return BidDocumentExamination::where($this->searchWhere)
->field(['*'])->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()
->select()->each(function($item){
$bidBuy = BidBuyBiddingDocument::field('bid_document_no,bid_date,project_id')->where('id',$item['buy_bidding_document_id'])->findOrEmpty();
$project = Project::field('name,project_code')->where('id',$bidBuy['project_id'])->findOrEmpty();
$item['project_name'] = $project['name'];
$item['project_code'] = $project['project_code'];
$item['bid_document_no'] = $bidBuy['bid_document_no'];
$item['bid_date'] = $bidBuy['bid_date'];
return $item;
})
->toArray();
}

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\custom_follow;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\custom\Custom;
use app\common\model\custom_follow\CustomFollow;
use app\common\lists\ListsSearchInterface;
@ -58,7 +59,11 @@ class CustomFollowLists extends BaseAdminDataLists implements ListsSearchInterfa
->field(['*'])
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()
->select()->each(function($item){
$custom = Custom::field('name')->where('id',$item['custom_id'])->findOrEmpty();
$item['custom_name'] = $custom['name'];
return $item;
})
->toArray();
}

View File

@ -37,12 +37,12 @@ class BidBuyBiddingDocument extends BaseModel
public function getBidDateAttr($value)
{
return empty($value) ? '' : date('Y-m-d H:i:s', $value);
return empty($value) ? '' : date('Y-m-d', $value);
}
public function getBuyDateAttr($value)
{
return empty($value) ? '' : date('Y-m-d H:i:s', $value);
return empty($value) ? '' : date('Y-m-d', $value);
}
}

View File

@ -37,12 +37,12 @@ class BidDocumentExamination extends BaseModel
public function getBidOpeningDateAttr($value)
{
return empty($value) ? '' : date('Y-m-d H:i:s', $value);
return empty($value) ? '' : date('Y-m-d', $value);
}
public function getDepositRefundTimeAttr($value)
{
return empty($value) ? '' : date('Y-m-d H:i:s', $value);
return empty($value) ? '' : date('Y-m-d', $value);
}
}