update
This commit is contained in:
parent
98de7b1676
commit
c66db094c7
@ -39,8 +39,8 @@ class ApprovalIssuanceAchievementDocumentsLists extends BaseAdminDataLists imple
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['project', 'project_num'],
|
'=' => ['project_id'],
|
||||||
|
'%like%' => ['task','num']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,8 +39,8 @@ class DataReceptionLists extends BaseAdminDataLists implements ListsSearchInterf
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['num', 'project', 'project_num'],
|
'=' => ['project_id'],
|
||||||
|
'%like%' => ['num','person']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,77 +1,77 @@
|
|||||||
<?php
|
<?php
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||||
// | 开源版本可自由商用,可去除界面版权logo
|
// | 开源版本可自由商用,可去除界面版权logo
|
||||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||||
// | 访问官网:https://www.likeadmin.cn
|
// | 访问官网:https://www.likeadmin.cn
|
||||||
// | likeadmin团队 版权所有 拥有最终解释权
|
// | likeadmin团队 版权所有 拥有最终解释权
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | author: likeadminTeam
|
// | author: likeadminTeam
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\adminapi\lists;
|
namespace app\adminapi\lists;
|
||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
use app\common\model\ProjectCommissionDetail;
|
use app\common\model\ProjectCommissionDetail;
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ProjectCommissionDetail列表
|
* ProjectCommissionDetail列表
|
||||||
* Class ProjectCommissionDetailLists
|
* Class ProjectCommissionDetailLists
|
||||||
* @package app\adminapi\lists
|
* @package app\adminapi\lists
|
||||||
*/
|
*/
|
||||||
class ProjectCommissionDetailLists extends BaseAdminDataLists implements ListsSearchInterface
|
class ProjectCommissionDetailLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 设置搜索条件
|
* @notes 设置搜索条件
|
||||||
* @return \string[][]
|
* @return \string[][]
|
||||||
* @author likeadmin
|
* @author likeadmin
|
||||||
* @date 2024/02/23 09:48
|
* @date 2024/02/23 09:48
|
||||||
*/
|
*/
|
||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['engineer', 'task_name'],
|
'%like%' => ['engineer', 'task_name'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 获取列表
|
* @notes 获取列表
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
* @author likeadmin
|
* @author likeadmin
|
||||||
* @date 2024/02/23 09:48
|
* @date 2024/02/23 09:48
|
||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return ProjectCommissionDetail::where($this->searchWhere)
|
return ProjectCommissionDetail::where($this->searchWhere)
|
||||||
->field(['id', 'engineer', 'engineer_id', 'task_name', 'task_type', 'professional_type', 'zj_amount', 'sk_amount', 'tc_rate', 'tc_amount', 'pay_amount'])
|
->field(['id', 'engineer', 'engineer_id', 'task_name', 'task_type', 'professional_type', 'zj_amount', 'sk_amount', 'tc_rate', 'tc_amount', 'pay_amount'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 获取数量
|
* @notes 获取数量
|
||||||
* @return int
|
* @return int
|
||||||
* @author likeadmin
|
* @author likeadmin
|
||||||
* @date 2024/02/23 09:48
|
* @date 2024/02/23 09:48
|
||||||
*/
|
*/
|
||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
return ProjectCommissionDetail::where($this->searchWhere)->count();
|
return ProjectCommissionDetail::where($this->searchWhere)->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -40,8 +40,8 @@ class ProjectCommissionLists extends BaseAdminDataLists implements ListsSearchIn
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['num', 'project', 'project_num'],
|
'=' => ['project_id'],
|
||||||
|
'%like%' => ['num']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,16 @@ class TaskHandlingThreeLevelReviewLists extends BaseAdminDataLists implements Li
|
|||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
|
$params = $this->request->get();
|
||||||
return TaskHandlingThreeLevelReview::where($this->searchWhere)
|
return TaskHandlingThreeLevelReview::where($this->searchWhere)
|
||||||
|
->where(function ($query) use($params) {
|
||||||
|
if (!empty($params['kg_start_time']) && !empty($params['kg_end_time'])) {
|
||||||
|
$query->whereBetweenTime('kaigong', $params['kg_start_time'], $params['kg_end_time']);
|
||||||
|
}
|
||||||
|
if (!empty($params['jg_start_time']) && !empty($params['jg_end_time'])) {
|
||||||
|
$query->whereBetweenTime('jungong', $params['jg_start_time'], $params['jg_end_time']);
|
||||||
|
}
|
||||||
|
})
|
||||||
->with(['projectInfo'])
|
->with(['projectInfo'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
|
@ -39,7 +39,7 @@ class TaskAllocationLists extends BaseAdminDataLists implements ListsSearchInter
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['project'],
|
'=' => ['cost_project_id'],
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -71,8 +71,8 @@ class TaskHandlingThreeLevelReviewLogic extends BaseLogic
|
|||||||
'xmhd' => $params['xmhd'],
|
'xmhd' => $params['xmhd'],
|
||||||
'bmhd' => $params['bmhd'],
|
'bmhd' => $params['bmhd'],
|
||||||
'shbhd' => $params['shbhd'],
|
'shbhd' => $params['shbhd'],
|
||||||
'kaigong' => $params['kaigong'],
|
'kaigong' => !empty($params['kaigong']) ? strtotime($params['kaigong']) : 0,
|
||||||
'jungong' => $params['jungong'],
|
'jungong' => !empty($params['jungong']) ? strtotime($params['jungong']) : 0,
|
||||||
'bz' => $params['bz'],
|
'bz' => $params['bz'],
|
||||||
'result_file' => $params['result_file'] ? json_encode($params['result_file']) : null,
|
'result_file' => $params['result_file'] ? json_encode($params['result_file']) : null,
|
||||||
'master_annex' => $params['master_annex'] ? json_encode($params['master_annex']) : null,
|
'master_annex' => $params['master_annex'] ? json_encode($params['master_annex']) : null,
|
||||||
@ -129,8 +129,8 @@ class TaskHandlingThreeLevelReviewLogic extends BaseLogic
|
|||||||
'xmhd' => $params['xmhd'],
|
'xmhd' => $params['xmhd'],
|
||||||
'bmhd' => $params['bmhd'],
|
'bmhd' => $params['bmhd'],
|
||||||
'shbhd' => $params['shbhd'],
|
'shbhd' => $params['shbhd'],
|
||||||
'kaigong' => $params['kaigong'],
|
'kaigong' => !empty($params['kaigong']) ? strtotime($params['kaigong']) : 0,
|
||||||
'jungong' => $params['jungong'],
|
'jungong' => !empty($params['jungong']) ? strtotime($params['jungong']) : 0,
|
||||||
'bz' => $params['bz'],
|
'bz' => $params['bz'],
|
||||||
'result_file' => $params['result_file'] ? json_encode($params['result_file']) : null,
|
'result_file' => $params['result_file'] ? json_encode($params['result_file']) : null,
|
||||||
'master_annex' => $params['master_annex'] ? json_encode($params['master_annex']) : null,
|
'master_annex' => $params['master_annex'] ? json_encode($params['master_annex']) : null,
|
||||||
|
@ -35,4 +35,14 @@ class TaskHandlingThreeLevelReview extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->hasOne(CostProject::class, 'id', 'project_id');
|
return $this->hasOne(CostProject::class, 'id', 'project_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getKaigongAttr($value): string
|
||||||
|
{
|
||||||
|
return !empty($value) ? date('Y-m-d',$value) : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getJungongAttr($value): string
|
||||||
|
{
|
||||||
|
return !empty($value) ? date('Y-m-d',$value) : '';
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user