更新获取项目客户信息

This commit is contained in:
yaooo 2023-12-13 17:51:33 +08:00
parent 90f856ff91
commit 9c702abc84
6 changed files with 30 additions and 0 deletions

View File

@ -16,6 +16,7 @@ namespace app\adminapi\logic\bid;
use app\common\model\bid\BidBiddingDecision;
use app\common\model\custom\Custom;
use app\common\logic\BaseLogic;
use think\facade\Db;
@ -134,6 +135,10 @@ class BidBiddingDecisionLogic extends BaseLogic
public static function detail($params): array
{
$bidBiddingDecision = BidBiddingDecision::findOrEmpty($params['id']);
$bidBiddingDecision->custom = null;
if (!empty($bidBiddingDecision->project->custom_id)) {
$bidBiddingDecision->custom = Custom::findOrEmpty($bidBiddingDecision->project->custom_id);
}
$bidBiddingDecision->project = $bidBiddingDecision->project;
return $bidBiddingDecision->toArray();
}

View File

@ -16,6 +16,7 @@ namespace app\adminapi\logic\bid;
use app\common\model\bid\BidBuyBiddingDocument;
use app\common\model\custom\Custom;
use app\common\logic\BaseLogic;
use think\facade\Db;
@ -133,6 +134,10 @@ class BidBuyBiddingDocumentLogic extends BaseLogic
public static function detail($params): array
{
$bidBuyBiddingDocument = BidBuyBiddingDocument::findOrEmpty($params['id']);
$bidBuyBiddingDocument->custom = null;
if (!empty($bidBuyBiddingDocument->project->custom_id)) {
$bidBuyBiddingDocument->custom = Custom::findOrEmpty($bidBuyBiddingDocument->project->custom_id);
}
$bidBuyBiddingDocument->project = $bidBuyBiddingDocument->project;
return $bidBuyBiddingDocument->toArray();
}

View File

@ -16,6 +16,7 @@ namespace app\adminapi\logic\bid;
use app\common\model\bid\BidResult;
use app\common\model\custom\Custom;
use app\common\logic\BaseLogic;
use think\facade\Db;
@ -116,6 +117,10 @@ class BidResultLogic extends BaseLogic
public static function detail($params): array
{
$bidResult = BidResult::findOrEmpty($params['id']);
$bidResult->custom = null;
if (!empty($bidResult->project->custom_id)) {
$bidResult->custom = Custom::findOrEmpty($bidResult->project->custom_id);
}
$bidResult->project = $bidResult->project;
$bidResult->examination = $bidResult->examination;
return $bidResult->toArray();

View File

@ -17,6 +17,7 @@ namespace app\adminapi\logic\contract;
use app\common\model\contract\ProcurementContractChange;
use app\common\model\contract\ProcurementContractDetail;
use app\common\model\custom\Custom;
use app\common\logic\BaseLogic;
use think\facade\Db;
@ -159,6 +160,10 @@ class ProcurementContractChangeLogic extends BaseLogic
public static function detail($params): array
{
$procurementContractChange = ProcurementContractChange::findOrEmpty($params['id']);
$procurementContractChange->custom = null;
if (!empty($procurementContractChange->project->custom_id)) {
$procurementContractChange->custom = Custom::findOrEmpty($procurementContractChange->project->custom_id);
}
$procurementContractChange->project = $procurementContractChange->project;
$procurementContractChange->material = $procurementContractChange->material;
return $procurementContractChange->toArray();

View File

@ -17,6 +17,7 @@ namespace app\adminapi\logic\contract;
use app\common\model\contract\ProcurementContract;
use app\common\model\contract\ProcurementContractDetail;
use app\common\model\custom\Custom;
use app\common\logic\BaseLogic;
use think\facade\Db;
@ -158,6 +159,10 @@ class ProcurementContractLogic extends BaseLogic
public static function detail($params): array
{
$procurementContract = ProcurementContract::findOrEmpty($params['id']);
$procurementContract->custom = null;
if (!empty($procurementContract->project->custom_id)) {
$procurementContract->custom = Custom::findOrEmpty($procurementContract->project->custom_id);
}
$procurementContract->project = $procurementContract->project;
$procurementContract->material = $procurementContract->material;
return $procurementContract->toArray();

View File

@ -17,6 +17,7 @@ namespace app\adminapi\logic\contract;
use app\common\model\contract\SubcontractingContract;
use app\common\model\contract\SubcontractingContractDetail;
use app\common\model\custom\Custom;
use app\common\logic\BaseLogic;
use think\facade\Db;
@ -161,6 +162,10 @@ class SubcontractingContractLogic extends BaseLogic
public static function detail($params): array
{
$subcontractingContract = SubcontractingContract::findOrEmpty($params['id']);
$subcontractingContract->custom = null;
if (!empty($subcontractingContract->project->custom_id)) {
$subcontractingContract->custom = Custom::findOrEmpty($subcontractingContract->project->custom_id);
}
$subcontractingContract->project = $subcontractingContract->project;
$subcontractingContract->work = $subcontractingContract->work;
return $subcontractingContract->toArray();