Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projecttwo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangtao
projecttwo
Commits
4648b9e3
Commit
4648b9e3
authored
Jun 30, 2025
by
wangzhengwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拒绝理由
parent
320ae76b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
Project.php
app/api/controller/manage/Project.php
+3
-3
ProjectService.php
app/api/service/ProjectService.php
+2
-2
ProjectValidate.php
app/api/validate/ProjectValidate.php
+1
-0
No files found.
app/api/controller/manage/Project.php
View file @
4648b9e3
...
...
@@ -170,7 +170,7 @@ class Project extends BaseController
//项目完成
public
function
confirmCompletion
(
Request
$request
)
{
$filed
=
[
'project_put_id'
,
'type'
];
$filed
=
[
'project_put_id'
,
'type'
,
'reason'
];
// 验证参数
$vo
=
(
new
ProjectValidate
())
->
goCheck
(
$filed
);
...
...
@@ -189,7 +189,7 @@ class Project extends BaseController
}
}
$res
=
ProjectService
::
confirmCompletion
(
$data
[
'project_put_id'
],
$data
[
'type'
]);
$res
=
ProjectService
::
confirmCompletion
(
$data
[
'project_put_id'
],
$data
[
'type'
]
,
$data
[
'reason'
]
);
if
(
$res
[
'code'
]
==
1
)
{
return
$this
->
returnMsg
(
'success'
,
1
);
}
...
...
@@ -350,7 +350,7 @@ class Project extends BaseController
return
$this
->
returnMsg
(
'项目已审核不能编辑'
);
}
if
(
$data
[
'put_end_time'
]
<
$project
->
createtime
)
if
(
$data
[
'put_end_time'
]
<
strtotime
(
$project
->
createtime
)
)
{
return
$this
->
returnMsg
(
'项目截止日期应大于当前日期'
);
}
...
...
app/api/service/ProjectService.php
View file @
4648b9e3
...
...
@@ -13,7 +13,7 @@ use think\facade\Log;
class
ProjectService
{
public
static
function
confirmCompletion
(
$id
,
$type
=
1
)
public
static
function
confirmCompletion
(
$id
,
$type
=
1
,
$reason
=
''
)
{
// 定义查询条件
$where
=
[
'id'
=>
$id
,
'status'
=>
2
,
'complete_status'
=>
1
];
...
...
@@ -31,7 +31,7 @@ class ProjectService
//验收失败
if
(
$type
==
2
)
{
$putUpdate
=
[
'complete_status'
=>
2
,
'complete_time'
=>
time
()];
$putUpdate
=
[
'complete_status'
=>
2
,
'complete_time'
=>
time
()
,
'reason'
=>
$reason
];
$putResult
=
ProjectPut
::
where
(
$where
)
->
update
(
$putUpdate
);
if
(
!
$putResult
)
{
...
...
app/api/validate/ProjectValidate.php
View file @
4648b9e3
...
...
@@ -34,6 +34,7 @@ class ProjectValidate extends BaseValidate
'user_id'
=>
'require|number'
,
'pid'
=>
'require|number'
,
'put_end_time'
=>
'require'
,
'reason'
=>
'require'
,
];
protected
$message
=
[
'title.require'
=>
'项目名不能为空'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment