Merge pull request 'zhangwei' (#166) from zhangwei into dev
Reviewed-on: #166
This commit is contained in:
commit
bff6a65ae7
@ -44,7 +44,8 @@ class BuildPlanLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['zy_code', 'plan_start_date', 'plan_end_date', 'work_user'],
|
'=' => ['project_id', 'plan_start_date', 'plan_end_date'],
|
||||||
|
'%like%' => ['zy_code','work_user']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,14 @@ class BuildReportDetailLists extends BaseAdminDataLists implements ListsSearchIn
|
|||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return BuildReportDetail::where($this->searchWhere)
|
$params = $this->request->get(['project_id']);
|
||||||
|
$where = [];
|
||||||
|
if(isset($params['project_id']) && $params['project_id'] != 0){
|
||||||
|
$plan_ids = BuildPlan::where('project_id',$params['project_id'])->column('id');
|
||||||
|
$report_ids = BuildReport::where('plan_id','in',$plan_ids)->column('id');
|
||||||
|
$where[] = ['report_id','in',$report_ids];
|
||||||
|
}
|
||||||
|
return BuildReportDetail::where($this->searchWhere)->where($where)
|
||||||
->field(['id', 'report_id', 'person_id', 'work_num', 'remark'])
|
->field(['id', 'report_id', 'person_id', 'work_num', 'remark'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
@ -92,7 +99,14 @@ class BuildReportDetailLists extends BaseAdminDataLists implements ListsSearchIn
|
|||||||
*/
|
*/
|
||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
return BuildReportDetail::where($this->searchWhere)->count();
|
$params = $this->request->get(['project_id']);
|
||||||
|
$where = [];
|
||||||
|
if(isset($params['project_id']) && $params['project_id'] != 0){
|
||||||
|
$plan_ids = BuildPlan::where('project_id',$params['project_id'])->column('id');
|
||||||
|
$report_ids = BuildReport::where('plan_id','in',$plan_ids)->column('id');
|
||||||
|
$where[] = ['report_id','in',$report_ids];
|
||||||
|
}
|
||||||
|
return BuildReportDetail::where($this->searchWhere)->where($where)->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -44,9 +44,7 @@ class BuildReportLists extends BaseAdminDataLists implements ListsSearchInterfac
|
|||||||
*/
|
*/
|
||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [];
|
||||||
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -61,7 +59,13 @@ class BuildReportLists extends BaseAdminDataLists implements ListsSearchInterfac
|
|||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return BuildReport::where($this->searchWhere)
|
$params = $this->request->get(['project_id']);
|
||||||
|
$where = [];
|
||||||
|
if(isset($params['project_id']) && $params['project_id'] != 0){
|
||||||
|
$plan_ids = BuildPlan::where('project_id',$params['project_id'])->column('id');
|
||||||
|
$where[] = ['plan_id','in',$plan_ids];
|
||||||
|
}
|
||||||
|
return BuildReport::where($this->searchWhere)->where($where)
|
||||||
->field(['id', 'report_code', 'plan_id', 'scene_file', 'report_workload', 'report_amount', 'remark', 'add_user'])
|
->field(['id', 'report_code', 'plan_id', 'scene_file', 'report_workload', 'report_amount', 'remark', 'add_user'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
@ -103,7 +107,13 @@ class BuildReportLists extends BaseAdminDataLists implements ListsSearchInterfac
|
|||||||
*/
|
*/
|
||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
return BuildReport::where($this->searchWhere)->count();
|
$params = $this->request->get(['project_id']);
|
||||||
|
$where = [];
|
||||||
|
if(isset($params['project_id']) && $params['project_id'] != 0){
|
||||||
|
$plan_ids = BuildPlan::where('project_id',$params['project_id'])->column('id');
|
||||||
|
$where[] = ['plan_id','in',$plan_ids];
|
||||||
|
}
|
||||||
|
return BuildReport::where($this->searchWhere)->where($where)->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -40,6 +40,7 @@ class ProjectDocumentLists extends BaseAdminDataLists implements ListsSearchInte
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
'=' => ['project_id'],
|
||||||
'%like%' => ['code', 'name'],
|
'%like%' => ['code', 'name'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@ class ProjectSettlementLists extends BaseAdminDataLists implements ListsSearchIn
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
'=' => ['project_id'],
|
||||||
'%like%' => ['settlement_code'],
|
'%like%' => ['settlement_code'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,8 @@ class ProjectSubcontractSettlementLists extends BaseAdminDataLists implements Li
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['settlement_code'],
|
'=' => ['project_id'],
|
||||||
|
'%like%' => ['settlement_code'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user