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