update
This commit is contained in:
parent
24576688bb
commit
c648cb667f
@ -17,6 +17,7 @@ namespace app\adminapi\lists\project_process_management;
|
|||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
use app\common\lists\ListsExcelInterface;
|
use app\common\lists\ListsExcelInterface;
|
||||||
|
use app\common\model\cost_project\CostApprovedProject;
|
||||||
use app\common\model\project_process_management\ApplyWithSeal;
|
use app\common\model\project_process_management\ApplyWithSeal;
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
|
||||||
@ -59,7 +60,10 @@ class ApplyWithSealLists extends BaseAdminDataLists implements ListsSearchInterf
|
|||||||
return ApplyWithSeal::with(['projectInfo', 'dept'])->where($this->searchWhere)
|
return ApplyWithSeal::with(['projectInfo', 'dept'])->where($this->searchWhere)
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()->each(function($data){
|
||||||
|
$contract = CostApprovedProject::field('project_director')->where('id',$data['projectInfo']['contract_id'])->findOrEmpty();
|
||||||
|
$data['project_director'] = $contract['project_director'];
|
||||||
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
namespace app\adminapi\logic\project_process_management;
|
namespace app\adminapi\logic\project_process_management;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\model\cost_project\CostApprovedProject;
|
||||||
use app\common\model\project_process_management\ApplyWithSeal;
|
use app\common\model\project_process_management\ApplyWithSeal;
|
||||||
use app\common\logic\BaseLogic;
|
use app\common\logic\BaseLogic;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
@ -144,6 +145,8 @@ class ApplyWithSealLogic extends BaseLogic
|
|||||||
public static function detail($params): array
|
public static function detail($params): array
|
||||||
{
|
{
|
||||||
$data = ApplyWithSeal::with(['projectInfo'])->findOrEmpty($params['id'])->toArray();
|
$data = ApplyWithSeal::with(['projectInfo'])->findOrEmpty($params['id'])->toArray();
|
||||||
|
$contract = CostApprovedProject::field('project_director')->where('id',$data['projectInfo']['contract_id'])->findOrEmpty();
|
||||||
|
$data['project_director'] = $contract['project_director'];
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user