<?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\lists\ListsExcelInterface;
use app\common\model\TaskHandlingThreeLevelReview;
use app\common\lists\ListsSearchInterface;


/**
 * TaskHandlingThreeLevelReview列表
 * Class TaskHandlingThreeLevelReviewLists
 * @package app\adminapi\lists
 */
class TaskHandlingThreeLevelReviewLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{


    /**
     * @notes 设置搜索条件
     * @return \string[][]
     * @author likeadmin
     * @date 2024/02/22 17:18
     */
    public function setSearch(): array
    {
        return [
            
        ];
    }


    /**
     * @notes 获取列表
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     * @author likeadmin
     * @date 2024/02/22 17:18
     */
    public function lists(): array
    {
        return TaskHandlingThreeLevelReview::where($this->searchWhere)
            ->with(['projectInfo'])
            ->limit($this->limitOffset, $this->limitLength)
            ->order(['id' => 'desc'])
            ->select()
            ->toArray();
    }


    /**
     * @notes 获取数量
     * @return int
     * @author likeadmin
     * @date 2024/02/22 17:18
     */
    public function count(): int
    {
        return TaskHandlingThreeLevelReview::where($this->searchWhere)->count();
    }

    public function setFileName(): string
    {
        return '任务办理与三级审核';
    }

    /**
     * @notes 导出字段
     * @return string[]
     * @author 段誉
     * @date 2022/11/24 16:17
     */
    public function setExcelFields(): array
    {
        return [
            'id' => 'id',
            'num' => '单据编号',
            'project_id' => '项目id',
            'task' => '任务名称',
            'processes' => '工序',
            'rtype' => '任务类型',
            'zType' => '专业类型',
            'engineer' => '工程师',
            'head' => '项目负责人',
            'examine' => '审核流程',
            'one' => '一级审核人',
            'two' => '二级审核人',
            'three' => '三级审核人',
            'apptime' => '登记日期',
            'level' => '任务级次',
            'area' => '建筑面积',
            'type' => '建筑结构类型',
            'use' => '建筑用途',
            'construction' => '施工单位',
            'ask' => '编制要求',
            'according' => '造价依据',
            'clbc' => '材料补差',
            'ssje' => '送审金额',
            'gcshd' => '工程师核定价',
            'hzhj' => '核增/核减金额',
            'rg' => '人工单价',
            'xmhd' => '项目负责人核定价',
            'bmhd' => '部门负责人核定价',
            'shbhd' => '审核部核定价',
            'kaigong' => '开工日期',
            'jungong' => '竣工日期',
            'bz' => '备注',
        ];
    }

}