Merge branch 'dev' of https://gitea.lihaink.cn/mkm/engineering into dev
This commit is contained in:
commit
0fe251ad2a
76
app/adminapi/controller/build/BuildReportController.php
Normal file
76
app/adminapi/controller/build/BuildReportController.php
Normal file
@ -0,0 +1,76 @@
|
||||
<?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\controller\build;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\build\BuildReportLists;
|
||||
use app\adminapi\logic\build\BuildReportLogic;
|
||||
use app\adminapi\validate\build\BuildReportValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 施工汇报控制器
|
||||
* Class BuildReportController
|
||||
* @package app\adminapi\controller\build
|
||||
*/
|
||||
class BuildReportController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取施工汇报列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:08
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new BuildReportLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加施工汇报
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:08
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new BuildReportValidate())->post()->goCheck('add');
|
||||
$result = BuildReportLogic::add($params,$this->adminId);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(BuildReportLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取施工汇报详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:08
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new BuildReportValidate())->goCheck('detail');
|
||||
$result = BuildReportLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
<?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\controller\build;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\build\BuildReportDetailLists;
|
||||
|
||||
|
||||
/**
|
||||
* 人工明细控制器
|
||||
* Class BuildReportDetailController
|
||||
* @package app\adminapi\controller\build
|
||||
*/
|
||||
class BuildReportDetailController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取人工明细列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:10
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new BuildReportDetailLists());
|
||||
}
|
||||
|
||||
}
|
98
app/adminapi/lists/build/BuildReportDetailLists.php
Normal file
98
app/adminapi/lists/build/BuildReportDetailLists.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?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\build;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\build\BuildDivision;
|
||||
use app\common\model\build\BuildPlan;
|
||||
use app\common\model\build\BuildProcessSettings;
|
||||
use app\common\model\build\BuildReport;
|
||||
use app\common\model\build\BuildReportDetail;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\project\Project;
|
||||
use app\common\model\project\ProjectPersonnel;
|
||||
|
||||
|
||||
/**
|
||||
* 人工明细列表
|
||||
* Class BuildReportDetailLists
|
||||
* @package app\adminapi\listsbuild
|
||||
*/
|
||||
class BuildReportDetailLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:10
|
||||
*/
|
||||
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 2023/12/22 16:10
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return BuildReportDetail::where($this->searchWhere)
|
||||
->field(['id', 'report_id', 'person_id', 'work_num', 'remark'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($item){
|
||||
$report = BuildReport::field('plan_id')->where('id',$item['report_id'])->findOrEmpty();
|
||||
$plan = BuildPlan::field('project_id,process_id,zy_code,price')->where('id',$report['plan_id'])->findOrEmpty();
|
||||
$project = Project::field('name')->where('id',$plan['project_id'])->findOrEmpty();
|
||||
$process = BuildProcessSettings::field('division_id,process_step_no,process_step')->where('id',$plan['process_id'])->findOrEmpty();
|
||||
$division = BuildDivision::field('subentry_engineering')->where('id',$process['division_id'])->findOrEmpty();
|
||||
$person = ProjectPersonnel::field('name,idcard,work_type')->where('id',$item['person_id'])->findOrEmpty();
|
||||
$item['zy_code'] = $plan['zy_code'];
|
||||
$item['project_name'] = $project['name'];
|
||||
$item['subentry_engineering'] = $division['subentry_engineering'];
|
||||
$item['process_step_no'] = $process['process_step_no'];
|
||||
$item['process_step'] = $process['process_step'];
|
||||
$item['user_name'] = $person['name'];
|
||||
$item['user_idcard'] = $person['idcard'];
|
||||
$item['user_work_type'] = $person->work_type_text;
|
||||
$item['price'] = $plan['price'];
|
||||
$item['amount'] = $plan['price']*$item['work_num'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取人工明细数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:10
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return BuildReportDetail::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
110
app/adminapi/lists/build/BuildReportLists.php
Normal file
110
app/adminapi/lists/build/BuildReportLists.php
Normal file
@ -0,0 +1,110 @@
|
||||
<?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\build;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\build\BuildDivision;
|
||||
use app\common\model\build\BuildPlan;
|
||||
use app\common\model\build\BuildProcessSettings;
|
||||
use app\common\model\build\BuildReport;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\build\BuildReportDetail;
|
||||
use app\common\model\project\Project;
|
||||
use app\common\model\project\ProjectMember;
|
||||
|
||||
|
||||
/**
|
||||
* 施工汇报列表
|
||||
* Class BuildReportLists
|
||||
* @package app\adminapi\listsbuild
|
||||
*/
|
||||
class BuildReportLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:08
|
||||
*/
|
||||
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 2023/12/22 16:08
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return BuildReport::where($this->searchWhere)
|
||||
->field(['id', 'plan_id', 'file', 'remark', 'add_user'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$plan = BuildPlan::where('id',$data['plan_id'])->findOrEmpty();
|
||||
$project = Project::field('name')->where('id',$plan['project_id'])->findOrEmpty();
|
||||
$process = BuildProcessSettings::field('division_id,process_step_no,process_step,quality_control_points,file')->where('id',$plan['process_id'])->findOrEmpty();
|
||||
$division = BuildDivision::field('subentry_engineering')->where('id',$process['division_id'])->findOrEmpty();
|
||||
$projectMember = ProjectMember::field('admin_id')->where('id',$plan['project_member_id'])->findOrEmpty();
|
||||
$admin = Admin::field('name')->where('id','in',[$projectMember['admin_id'],$data['add_user']])->column('name','id');
|
||||
$data['zy_code'] = $plan['zy_code'];
|
||||
$data['project_name'] = $project['name'];
|
||||
$data['subentry_engineering'] = $division['subentry_engineering'];
|
||||
$data['process_step'] = $process['process_step'];
|
||||
$data['process_step_no'] = $process['process_step_no'];
|
||||
$data['quality_control_points'] = $process['quality_control_points'];
|
||||
$data['process_file'] = $process['file'];
|
||||
$data['project_member_name'] = $admin[$projectMember['admin_id']];
|
||||
$data['work_user'] = $plan['work_user'];
|
||||
$data['work_content'] = $plan['work_content'];
|
||||
$data['plan_start_date'] = $plan['plan_start_date'];
|
||||
$data['plan_end_date'] = $plan['plan_end_date'];
|
||||
$data['unit'] = $plan['unit'];
|
||||
$data['workload'] = $plan['workload'];
|
||||
$data['price'] = $plan['price'];
|
||||
$data['amount'] = $plan['amount'];
|
||||
$data['today_workload'] = BuildReportDetail::where('report_id',$data['id'])->sum('work_num');
|
||||
$data['residue_workload'] = $data['workload'] - $data['today_workload'];
|
||||
$data['add_user_name'] = $admin[$data['add_user']];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取施工汇报数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:08
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return BuildReport::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
112
app/adminapi/logic/build/BuildReportLogic.php
Normal file
112
app/adminapi/logic/build/BuildReportLogic.php
Normal file
@ -0,0 +1,112 @@
|
||||
<?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\logic\build;
|
||||
|
||||
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\build\BuildDivision;
|
||||
use app\common\model\build\BuildPlan;
|
||||
use app\common\model\build\BuildProcessSettings;
|
||||
use app\common\model\build\BuildReport;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\build\BuildReportDetail;
|
||||
use app\common\model\project\Project;
|
||||
use app\common\model\project\ProjectMember;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 施工汇报逻辑
|
||||
* Class BuildReportLogic
|
||||
* @package app\adminapi\logic\build
|
||||
*/
|
||||
class BuildReportLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加施工汇报
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:08
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
$detail = json_decode($params['person_detail'],true);
|
||||
$reportRes = BuildReport::create([
|
||||
'plan_id' => $params['plan_id'],
|
||||
'file' => $params['file'],
|
||||
'remark' => $params['remark'],
|
||||
'add_user' => $admin_id,
|
||||
]);
|
||||
foreach($detail as $v){
|
||||
BuildReportDetail::create([
|
||||
'report_id' => $reportRes->id,
|
||||
'person_id' => $v['person_id'],
|
||||
'work_num' => $v['work_num'],
|
||||
'remark' => $v['remark']??''
|
||||
]);
|
||||
}
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取施工汇报详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:08
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = BuildReport::findOrEmpty($params['id'])->toArray();
|
||||
if(empty($data)) return [];
|
||||
$plan = BuildPlan::where('id',$data['plan_id'])->findOrEmpty();
|
||||
$project = Project::field('name')->where('id',$plan['project_id'])->findOrEmpty();
|
||||
$process = BuildProcessSettings::field('division_id,process_step_no,process_step,quality_control_points,file')->where('id',$plan['process_id'])->findOrEmpty();
|
||||
$division = BuildDivision::field('subentry_engineering')->where('id',$process['division_id'])->findOrEmpty();
|
||||
$projectMember = ProjectMember::field('admin_id')->where('id',$plan['project_member_id'])->findOrEmpty();
|
||||
$admin = Admin::field('name')->where('id','in',[$projectMember['admin_id'],$data['add_user']])->column('name','id');
|
||||
$data['zy_code'] = $plan['zy_code'];
|
||||
$data['project_name'] = $project['name'];
|
||||
$data['subentry_engineering'] = $division['subentry_engineering'];
|
||||
$data['process_step'] = $process['process_step'];
|
||||
$data['process_step_no'] = $process['process_step_no'];
|
||||
$data['quality_control_points'] = $process['quality_control_points'];
|
||||
$data['process_file'] = $process['file'];
|
||||
$data['project_member_name'] = $admin[$projectMember['admin_id']];
|
||||
$data['work_user'] = $plan['work_user'];
|
||||
$data['work_content'] = $plan['work_content'];
|
||||
$data['plan_start_date'] = $plan['plan_start_date'];
|
||||
$data['plan_end_date'] = $plan['plan_end_date'];
|
||||
$data['unit'] = $plan['unit'];
|
||||
$data['workload'] = $plan['workload'];
|
||||
$data['price'] = $plan['price'];
|
||||
$data['amount'] = $plan['amount'];
|
||||
$data['today_workload'] = BuildReportDetail::where('report_id',$data['id'])->sum('work_num');
|
||||
$data['residue_workload'] = $data['workload'] - $data['today_workload'];
|
||||
$data['add_user_name'] = $admin[$data['add_user']];
|
||||
return $data;
|
||||
}
|
||||
}
|
126
app/adminapi/validate/build/BuildReportValidate.php
Normal file
126
app/adminapi/validate/build/BuildReportValidate.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?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\validate\build;
|
||||
|
||||
|
||||
use app\common\model\build\BuildPlan;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 施工汇报验证器
|
||||
* Class BuildReportValidate
|
||||
* @package app\adminapi\validate\build
|
||||
*/
|
||||
class BuildReportValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
'plan_id' => 'require|checkPlan',
|
||||
'person_detail' => 'require|checkDetail',
|
||||
'file' => 'require|checkFile',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'id.require' => '缺少必要参数',
|
||||
'plan_id.require' => '请选择施工计划',
|
||||
'person_detail.require' => '请填写人工明细',
|
||||
'file.require' => '请上传现场照片',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return BuildReportValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:08
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->remove('id',true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return BuildReportValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:08
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return BuildReportValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:08
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return BuildReportValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/12/22 16:08
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkPlan($value): bool|string
|
||||
{
|
||||
$data = BuildPlan::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '施工计划不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkFile($value): bool|string
|
||||
{
|
||||
$file = json_decode($value,true);
|
||||
if(empty($file)){
|
||||
return '附件必须是json数组';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDetail($value): bool|string
|
||||
{
|
||||
$person_detail = json_decode($value,true);
|
||||
if(empty($person_detail) || !is_array($person_detail)){
|
||||
return '人工明细数据格式错误';
|
||||
}
|
||||
foreach($person_detail as $v) {
|
||||
if(empty($v['person_id']) || empty($v['work_num'])){
|
||||
return '人工明细缺少必要参数';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
37
app/common/model/build/BuildReport.php
Normal file
37
app/common/model/build/BuildReport.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?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\common\model\build;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 施工汇报模型
|
||||
* Class BuildReport
|
||||
* @package app\common\model\build
|
||||
*/
|
||||
class BuildReport extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'build_report';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getFileAttr($value)
|
||||
{
|
||||
return json_decode($value,true);
|
||||
}
|
||||
}
|
34
app/common/model/build/BuildReportDetail.php
Normal file
34
app/common/model/build/BuildReportDetail.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?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\common\model\build;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 人工明细模型
|
||||
* Class BuildReportDetail
|
||||
* @package app\common\model\build
|
||||
*/
|
||||
class BuildReportDetail extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'build_report_detail';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user