update
This commit is contained in:
parent
59239952d1
commit
d7652ed93d
@ -39,6 +39,7 @@ class ApprovalIssuanceAchievementDocumentsLists extends BaseAdminDataLists imple
|
||||
{
|
||||
return [
|
||||
'=' => ['project', 'project_num'],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
@ -55,7 +56,7 @@ class ApprovalIssuanceAchievementDocumentsLists extends BaseAdminDataLists imple
|
||||
public function lists(): array
|
||||
{
|
||||
return ApprovalIssuanceAchievementDocuments::where($this->searchWhere)
|
||||
->field(['id', 'dataid', 'num', 'project', 'project_num', 'task', 'processes', 'number', 'apptime', 'person', 'tips', 'fd_1', 'fd_2', 'fd_3'])
|
||||
->with(['projectInfo'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
|
@ -41,10 +41,9 @@ class ApprovalIssuanceAchievementDocumentsLogic extends BaseLogic
|
||||
Db::startTrans();
|
||||
try {
|
||||
ApprovalIssuanceAchievementDocuments::create([
|
||||
'dataid' => $params['dataid'],
|
||||
'num' => $params['num'],
|
||||
'project' => $params['project'],
|
||||
'project_num' => $params['project_num'],
|
||||
'dataid' => generate_sn(ApprovalIssuanceAchievementDocuments::class, 'dataid'),
|
||||
'num' => generate_sn(ApprovalIssuanceAchievementDocuments::class, 'num'),
|
||||
'project_id' => $params['project'],
|
||||
'task' => $params['task'],
|
||||
'processes' => $params['processes'],
|
||||
'number' => $params['number'],
|
||||
@ -78,10 +77,7 @@ class ApprovalIssuanceAchievementDocumentsLogic extends BaseLogic
|
||||
Db::startTrans();
|
||||
try {
|
||||
ApprovalIssuanceAchievementDocuments::where('id', $params['id'])->update([
|
||||
'dataid' => $params['dataid'],
|
||||
'num' => $params['num'],
|
||||
'project' => $params['project'],
|
||||
'project_num' => $params['project_num'],
|
||||
'project_id' => $params['project'],
|
||||
'task' => $params['task'],
|
||||
'processes' => $params['processes'],
|
||||
'number' => $params['number'],
|
||||
|
@ -16,6 +16,7 @@ namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\model\cost_project\CostProject;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
@ -30,5 +31,8 @@ class ApprovalIssuanceAchievementDocuments extends BaseModel
|
||||
protected $name = 'approval_issuance_achievement_documents';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
public function projectInfo()
|
||||
{
|
||||
return $this->hasOne(CostProject::class, 'id', 'project_id');
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user