update
This commit is contained in:
parent
b5530b1177
commit
cdbc08e784
app/adminapi
@ -12,22 +12,22 @@
|
|||||||
// | author: likeadminTeam
|
// | author: likeadminTeam
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\adminapi\lists;
|
namespace app\adminapi\lists;
|
||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\common\lists\ListsExcelInterface;
|
||||||
use app\common\lists\ListsExcelInterface;
|
use app\common\lists\ListsSearchInterface;
|
||||||
use app\common\model\DataReception;
|
use app\common\model\auth\Admin;
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\model\DataReception;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DataReception列表
|
* DataReception列表
|
||||||
* Class DataReceptionLists
|
* Class DataReceptionLists
|
||||||
* @package app\adminapi\lists
|
* @package app\adminapi\lists
|
||||||
*/
|
*/
|
||||||
class DataReceptionLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
|
class DataReceptionLists extends BaseAdminDataLists implements ListsSearchInterface, ListsExcelInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,7 +40,7 @@ class DataReceptionLists extends BaseAdminDataLists implements ListsSearchInterf
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['project_id'],
|
'=' => ['project_id'],
|
||||||
'%like%' => ['num','person']
|
'%like%' => ['num', 'person']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +60,10 @@ class DataReceptionLists extends BaseAdminDataLists implements ListsSearchInterf
|
|||||||
->with(['projectInfo'])
|
->with(['projectInfo'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()->each(function ($data) {
|
||||||
|
$head = Admin::field('name')->where('id', $data['person'])->findOrEmpty();
|
||||||
|
$data['person_name'] = $head?->name;
|
||||||
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,4 +103,4 @@ class DataReceptionLists extends BaseAdminDataLists implements ListsSearchInterf
|
|||||||
'tips' => '说明',
|
'tips' => '说明',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -67,6 +67,8 @@
|
|||||||
$project = CostProject::field('project_name,project_num,contract_id,industry,principal')->where('id', $data['project_id'])->findOrEmpty();
|
$project = CostProject::field('project_name,project_num,contract_id,industry,principal')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$contract = MarketingContract::field('contract_name')->where('id', $project['contract_id'])->findOrEmpty();
|
$contract = MarketingContract::field('contract_name')->where('id', $project['contract_id'])->findOrEmpty();
|
||||||
$admin = Admin::field('name')->where('id', $project['principal'])->findOrEmpty();
|
$admin = Admin::field('name')->where('id', $project['principal'])->findOrEmpty();
|
||||||
|
$djr = Admin::field('name')->where('id', $data['djr'])->findOrEmpty();
|
||||||
|
$data['djr_name'] = $djr?->name;
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['project_num'] = $project['project_num'];
|
$data['project_num'] = $project['project_num'];
|
||||||
$data['contract_name'] = $contract['contract_name'];
|
$data['contract_name'] = $contract['contract_name'];
|
||||||
|
@ -12,23 +12,24 @@
|
|||||||
// | author: likeadminTeam
|
// | author: likeadminTeam
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\adminapi\lists\project_process_management;
|
namespace app\adminapi\lists\project_process_management;
|
||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
use app\common\lists\ListsExcelInterface;
|
use app\common\lists\ListsExcelInterface;
|
||||||
use app\common\model\project_process_management\ProjectChangeVisa;
|
use app\common\lists\ListsSearchInterface;
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\project_process_management\ProjectChangeVisaContent;
|
use app\common\model\project_process_management\ProjectChangeVisa;
|
||||||
|
use app\common\model\project_process_management\ProjectChangeVisaContent;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ProjectChangeVisa列表
|
* ProjectChangeVisa列表
|
||||||
* Class ProjectChangeVisaLists
|
* Class ProjectChangeVisaLists
|
||||||
* @package app\adminapi\listsproject_process_management
|
* @package app\adminapi\listsproject_process_management
|
||||||
*/
|
*/
|
||||||
class ProjectChangeVisaLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
|
class ProjectChangeVisaLists extends BaseAdminDataLists implements ListsSearchInterface, ListsExcelInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -62,11 +63,14 @@ class ProjectChangeVisaLists extends BaseAdminDataLists implements ListsSearchIn
|
|||||||
->where($this->searchWhere)
|
->where($this->searchWhere)
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->withAttr('children', function ($value, $data){
|
->withAttr('children', function ($value, $data) {
|
||||||
$details = ProjectChangeVisaContent::where('project_change_visa_id', $data['id'])->select();
|
$details = ProjectChangeVisaContent::where('project_change_visa_id', $data['id'])->select();
|
||||||
return $details;
|
return $details;
|
||||||
})
|
})
|
||||||
->select()
|
->select()->each(function ($data) {
|
||||||
|
$djr = Admin::field('name')->where('id', $data['djr'])->findOrEmpty();
|
||||||
|
$data['djr_name'] = $djr?->name;
|
||||||
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,4 +108,4 @@ class ProjectChangeVisaLists extends BaseAdminDataLists implements ListsSearchIn
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -12,22 +12,23 @@
|
|||||||
// | author: likeadminTeam
|
// | author: likeadminTeam
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\adminapi\lists\project_process_management;
|
namespace app\adminapi\lists\project_process_management;
|
||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
use app\common\lists\ListsExcelInterface;
|
use app\common\lists\ListsExcelInterface;
|
||||||
use app\common\model\project_process_management\ProjectRectification;
|
use app\common\lists\ListsSearchInterface;
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\model\auth\Admin;
|
||||||
|
use app\common\model\project_process_management\ProjectRectification;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ProjectRectification列表
|
* ProjectRectification列表
|
||||||
* Class ProjectRectificationLists
|
* Class ProjectRectificationLists
|
||||||
* @package app\adminapi\listsproject_process_management
|
* @package app\adminapi\listsproject_process_management
|
||||||
*/
|
*/
|
||||||
class ProjectRectificationLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
|
class ProjectRectificationLists extends BaseAdminDataLists implements ListsSearchInterface, ListsExcelInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,7 +41,7 @@ class ProjectRectificationLists extends BaseAdminDataLists implements ListsSearc
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['project_id'],
|
'=' => ['project_id'],
|
||||||
'%like%' => ['num','wt_unit','xm_master','zg_master']
|
'%like%' => ['num', 'wt_unit', 'xm_master', 'zg_master']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +61,12 @@ class ProjectRectificationLists extends BaseAdminDataLists implements ListsSearc
|
|||||||
->where($this->searchWhere)
|
->where($this->searchWhere)
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()->each(function ($data) {
|
||||||
|
$xmfz = Admin::field('name')->where('id', $data['xm_master'])->findOrEmpty();
|
||||||
|
$djr = Admin::field('name')->where('id', $data['dj_person'])->findOrEmpty();
|
||||||
|
$data['xm_master_name'] = $xmfz?->name;
|
||||||
|
$data['dj_person_name'] = $djr?->name;
|
||||||
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,4 +111,4 @@ class ProjectRectificationLists extends BaseAdminDataLists implements ListsSearc
|
|||||||
'remark' => '核实结果',
|
'remark' => '核实结果',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -12,22 +12,23 @@
|
|||||||
// | author: likeadminTeam
|
// | author: likeadminTeam
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\adminapi\lists\project_process_management;
|
namespace app\adminapi\lists\project_process_management;
|
||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
use app\common\lists\ListsExcelInterface;
|
use app\common\lists\ListsExcelInterface;
|
||||||
use app\common\model\project_process_management\ProjectSurveySignature;
|
use app\common\lists\ListsSearchInterface;
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\model\auth\Admin;
|
||||||
|
use app\common\model\project_process_management\ProjectSurveySignature;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ProjectSurveySignature列表
|
* ProjectSurveySignature列表
|
||||||
* Class ProjectSurveySignatureLists
|
* Class ProjectSurveySignatureLists
|
||||||
* @package app\adminapi\listsproject_process_management
|
* @package app\adminapi\listsproject_process_management
|
||||||
*/
|
*/
|
||||||
class ProjectSurveySignatureLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
|
class ProjectSurveySignatureLists extends BaseAdminDataLists implements ListsSearchInterface, ListsExcelInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,7 +41,7 @@ class ProjectSurveySignatureLists extends BaseAdminDataLists implements ListsSea
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['project_id'],
|
'=' => ['project_id'],
|
||||||
'%like%' => ['num','wt_unit','jsdw']
|
'%like%' => ['num', 'wt_unit', 'jsdw']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +61,12 @@ class ProjectSurveySignatureLists extends BaseAdminDataLists implements ListsSea
|
|||||||
->where($this->searchWhere)
|
->where($this->searchWhere)
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()->each(function ($data) {
|
||||||
|
$xmfz = Admin::field('name')->where('id', $data['xmfz'])->findOrEmpty();
|
||||||
|
$djr = Admin::field('name')->where('id', $data['djr'])->findOrEmpty();
|
||||||
|
$data['xmfz_name'] = $xmfz?->name;
|
||||||
|
$data['djr_name'] = $djr?->name;
|
||||||
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,4 +112,4 @@ class ProjectSurveySignatureLists extends BaseAdminDataLists implements ListsSea
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -12,21 +12,22 @@
|
|||||||
// | author: likeadminTeam
|
// | author: likeadminTeam
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\adminapi\logic;
|
namespace app\adminapi\logic;
|
||||||
|
|
||||||
|
|
||||||
use app\common\model\DataReception;
|
use app\common\logic\BaseLogic;
|
||||||
use app\common\logic\BaseLogic;
|
use app\common\model\auth\Admin;
|
||||||
use think\facade\Db;
|
use app\common\model\DataReception;
|
||||||
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DataReception逻辑
|
* DataReception逻辑
|
||||||
* Class DataReceptionLogic
|
* Class DataReceptionLogic
|
||||||
* @package app\adminapi\logic
|
* @package app\adminapi\logic
|
||||||
*/
|
*/
|
||||||
class DataReceptionLogic extends BaseLogic
|
class DataReceptionLogic extends BaseLogic
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -135,6 +136,8 @@ class DataReceptionLogic extends BaseLogic
|
|||||||
$data['ssgsysjs_file'] = !empty($data['ssgsysjs_file']) ? json_decode($data['ssgsysjs_file'], true) : '';
|
$data['ssgsysjs_file'] = !empty($data['ssgsysjs_file']) ? json_decode($data['ssgsysjs_file'], true) : '';
|
||||||
$data['wlhj_file'] = !empty($data['wlhj_file']) ? json_decode($data['wlhj_file'], true) : '';
|
$data['wlhj_file'] = !empty($data['wlhj_file']) ? json_decode($data['wlhj_file'], true) : '';
|
||||||
$data['other_file'] = !empty($data['other_file']) ? json_decode($data['other_file'], true) : '';
|
$data['other_file'] = !empty($data['other_file']) ? json_decode($data['other_file'], true) : '';
|
||||||
|
$head = Admin::field('name')->where('id', $data['person'])->findOrEmpty();
|
||||||
|
$data['person_name'] = $head?->name;
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -140,6 +140,8 @@
|
|||||||
$project = CostProject::field('project_name,project_num,contract_id,industry,principal')->where('id', $data['project_id'])->findOrEmpty();
|
$project = CostProject::field('project_name,project_num,contract_id,industry,principal')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$contract = MarketingContract::field('contract_name')->where('id', $project['contract_id'])->findOrEmpty();
|
$contract = MarketingContract::field('contract_name')->where('id', $project['contract_id'])->findOrEmpty();
|
||||||
$admin = Admin::field('name')->where('id', $project['principal'])->findOrEmpty();
|
$admin = Admin::field('name')->where('id', $project['principal'])->findOrEmpty();
|
||||||
|
$djr = Admin::field('name')->where('id', $data['djr'])->findOrEmpty();
|
||||||
|
$data['djr_name'] = $djr?->name;
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['project_num'] = $project['project_num'];
|
$data['project_num'] = $project['project_num'];
|
||||||
$data['contract_name'] = $contract['contract_name'];
|
$data['contract_name'] = $contract['contract_name'];
|
||||||
|
@ -12,24 +12,60 @@
|
|||||||
// | author: likeadminTeam
|
// | author: likeadminTeam
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\adminapi\logic\project_process_management;
|
namespace app\adminapi\logic\project_process_management;
|
||||||
|
|
||||||
|
|
||||||
use app\common\model\project_process_management\ProjectChangeVisa;
|
use app\common\logic\BaseLogic;
|
||||||
use app\common\logic\BaseLogic;
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\project_process_management\ProjectChangeVisaContent;
|
use app\common\model\project_process_management\ProjectChangeVisa;
|
||||||
use think\facade\Db;
|
use app\common\model\project_process_management\ProjectChangeVisaContent;
|
||||||
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ProjectChangeVisa逻辑
|
* ProjectChangeVisa逻辑
|
||||||
* Class ProjectChangeVisaLogic
|
* Class ProjectChangeVisaLogic
|
||||||
* @package app\adminapi\logic\project_process_management
|
* @package app\adminapi\logic\project_process_management
|
||||||
*/
|
*/
|
||||||
class ProjectChangeVisaLogic extends BaseLogic
|
class ProjectChangeVisaLogic extends BaseLogic
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 编辑
|
||||||
|
* @param array $params
|
||||||
|
* @return bool
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/02/23 09:58
|
||||||
|
*/
|
||||||
|
public static function edit(array $params): bool
|
||||||
|
{
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
ProjectChangeVisa::where('id', $params['id'])->update([
|
||||||
|
'project_id' => $params['project_id'],
|
||||||
|
'djr' => $params['djr'],
|
||||||
|
'djrq' => $params['djrq'],
|
||||||
|
]);
|
||||||
|
if (!empty($params['project_change_visa_content'])) {
|
||||||
|
foreach ($params['project_change_visa_content'] as $item) {
|
||||||
|
if (!empty($item['id'])) {
|
||||||
|
ProjectChangeVisaContentLogic::edit($item);
|
||||||
|
} else {
|
||||||
|
$item['project_change_visa_id'] = $params['id'];
|
||||||
|
ProjectChangeVisaContentLogic::add($item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Db::commit();
|
||||||
|
return true;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
self::setError($e->getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 添加
|
* @notes 添加
|
||||||
* @param array $params
|
* @param array $params
|
||||||
@ -48,7 +84,7 @@ class ProjectChangeVisaLogic extends BaseLogic
|
|||||||
'djr' => $params['djr'],
|
'djr' => $params['djr'],
|
||||||
'djrq' => $params['djrq'],
|
'djrq' => $params['djrq'],
|
||||||
]);
|
]);
|
||||||
if(!empty($params['project_change_visa_content'])){
|
if (!empty($params['project_change_visa_content'])) {
|
||||||
foreach ($params['project_change_visa_content'] as $item) {
|
foreach ($params['project_change_visa_content'] as $item) {
|
||||||
$item['project_change_visa_id'] = $projectChangeVisa->id;
|
$item['project_change_visa_id'] = $projectChangeVisa->id;
|
||||||
ProjectChangeVisaContentLogic::add($item);
|
ProjectChangeVisaContentLogic::add($item);
|
||||||
@ -63,43 +99,6 @@ class ProjectChangeVisaLogic extends BaseLogic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @notes 编辑
|
|
||||||
* @param array $params
|
|
||||||
* @return bool
|
|
||||||
* @author likeadmin
|
|
||||||
* @date 2024/02/23 09:58
|
|
||||||
*/
|
|
||||||
public static function edit(array $params): bool
|
|
||||||
{
|
|
||||||
Db::startTrans();
|
|
||||||
try {
|
|
||||||
ProjectChangeVisa::where('id', $params['id'])->update([
|
|
||||||
'project_id' => $params['project_id'],
|
|
||||||
'djr' => $params['djr'],
|
|
||||||
'djrq' => $params['djrq'],
|
|
||||||
]);
|
|
||||||
if(!empty($params['project_change_visa_content'])){
|
|
||||||
foreach ($params['project_change_visa_content'] as $item) {
|
|
||||||
if(!empty($item['id'])){
|
|
||||||
ProjectChangeVisaContentLogic::edit($item);
|
|
||||||
}else{
|
|
||||||
$item['project_change_visa_id'] = $params['id'];
|
|
||||||
ProjectChangeVisaContentLogic::add($item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Db::commit();
|
|
||||||
return true;
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
Db::rollback();
|
|
||||||
self::setError($e->getMessage());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 删除
|
* @notes 删除
|
||||||
* @param array $params
|
* @param array $params
|
||||||
@ -109,8 +108,8 @@ class ProjectChangeVisaLogic extends BaseLogic
|
|||||||
*/
|
*/
|
||||||
public static function delete(array $params): bool
|
public static function delete(array $params): bool
|
||||||
{
|
{
|
||||||
$data = ProjectChangeVisaContent::where('project_change_visa_id','in',$params['id'])->findOrEmpty();
|
$data = ProjectChangeVisaContent::where('project_change_visa_id', 'in', $params['id'])->findOrEmpty();
|
||||||
if(!$data->isEmpty()){
|
if (!$data->isEmpty()) {
|
||||||
self::setError('此数据关联了项目变更签证明细信息,须删除项目变更签证明细信息');
|
self::setError('此数据关联了项目变更签证明细信息,须删除项目变更签证明细信息');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -127,9 +126,11 @@ class ProjectChangeVisaLogic extends BaseLogic
|
|||||||
*/
|
*/
|
||||||
public static function detail($params): array
|
public static function detail($params): array
|
||||||
{
|
{
|
||||||
$data = ProjectChangeVisa::with(['projectInfo'])->findOrEmpty($params['id'])->toArray();
|
$data = ProjectChangeVisa::with(['projectInfo'])->findOrEmpty($params['id']);
|
||||||
$data['project_change_visa_content'] = ProjectChangeVisaContent::where('project_change_visa_id', $data['id'])->select();
|
$data['project_change_visa_content'] = ProjectChangeVisaContent::where('project_change_visa_id', $data['id'])->select();
|
||||||
return $data;
|
$djr = Admin::field('name')->where('id', $data['djr'])->findOrEmpty();
|
||||||
|
$data['djr_name'] = $djr?->name;
|
||||||
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function datas()
|
public static function datas()
|
||||||
@ -143,4 +144,4 @@ class ProjectChangeVisaLogic extends BaseLogic
|
|||||||
}
|
}
|
||||||
return $datas;
|
return $datas;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -12,21 +12,22 @@
|
|||||||
// | author: likeadminTeam
|
// | author: likeadminTeam
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\adminapi\logic\project_process_management;
|
namespace app\adminapi\logic\project_process_management;
|
||||||
|
|
||||||
|
|
||||||
use app\common\model\project_process_management\ProjectRectification;
|
use app\common\logic\BaseLogic;
|
||||||
use app\common\logic\BaseLogic;
|
use app\common\model\auth\Admin;
|
||||||
use think\facade\Db;
|
use app\common\model\project_process_management\ProjectRectification;
|
||||||
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ProjectRectification逻辑
|
* ProjectRectification逻辑
|
||||||
* Class ProjectRectificationLogic
|
* Class ProjectRectificationLogic
|
||||||
* @package app\adminapi\logic\project_process_management
|
* @package app\adminapi\logic\project_process_management
|
||||||
*/
|
*/
|
||||||
class ProjectRectificationLogic extends BaseLogic
|
class ProjectRectificationLogic extends BaseLogic
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -123,6 +124,11 @@ class ProjectRectificationLogic extends BaseLogic
|
|||||||
*/
|
*/
|
||||||
public static function detail($params): array
|
public static function detail($params): array
|
||||||
{
|
{
|
||||||
return ProjectRectification::with(['projectInfo'])->findOrEmpty($params['id'])->toArray();
|
$data = ProjectRectification::with(['projectInfo'])->findOrEmpty($params['id']);
|
||||||
|
$xmfz = Admin::field('name')->where('id', $data['xm_master'])->findOrEmpty();
|
||||||
|
$djr = Admin::field('name')->where('id', $data['dj_person'])->findOrEmpty();
|
||||||
|
$data['xm_master_name'] = $xmfz?->name;
|
||||||
|
$data['dj_person_name'] = $djr?->name;
|
||||||
|
return $data->toArray();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -12,21 +12,22 @@
|
|||||||
// | author: likeadminTeam
|
// | author: likeadminTeam
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\adminapi\logic\project_process_management;
|
namespace app\adminapi\logic\project_process_management;
|
||||||
|
|
||||||
|
|
||||||
use app\common\model\project_process_management\ProjectSurveySignature;
|
use app\common\logic\BaseLogic;
|
||||||
use app\common\logic\BaseLogic;
|
use app\common\model\auth\Admin;
|
||||||
use think\facade\Db;
|
use app\common\model\project_process_management\ProjectSurveySignature;
|
||||||
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ProjectSurveySignature逻辑
|
* ProjectSurveySignature逻辑
|
||||||
* Class ProjectSurveySignatureLogic
|
* Class ProjectSurveySignatureLogic
|
||||||
* @package app\adminapi\logic\project_process_management
|
* @package app\adminapi\logic\project_process_management
|
||||||
*/
|
*/
|
||||||
class ProjectSurveySignatureLogic extends BaseLogic
|
class ProjectSurveySignatureLogic extends BaseLogic
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -127,7 +128,11 @@ class ProjectSurveySignatureLogic extends BaseLogic
|
|||||||
*/
|
*/
|
||||||
public static function detail($params): array
|
public static function detail($params): array
|
||||||
{
|
{
|
||||||
$data = ProjectSurveySignature::with(['projectInfo'])->findOrEmpty($params['id'])->toArray();
|
$data = ProjectSurveySignature::with(['projectInfo'])->findOrEmpty($params['id']);
|
||||||
return $data;
|
$xmfz = Admin::field('name')->where('id', $data['xmfz'])->findOrEmpty();
|
||||||
|
$djr = Admin::field('name')->where('id', $data['djr'])->findOrEmpty();
|
||||||
|
$data['xmfz_name'] = $xmfz?->name;
|
||||||
|
$data['djr_name'] = $djr?->name;
|
||||||
|
return $data->toArray();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user