Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f585a61c
authored
Mar 18, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:工单检测审批,开始检测工单,结束检测工单代码提交
1 parent
9be30d29
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
0 deletions
aus-admin/src/main/java/com/glsx/usedcar/web/rest/inspect/InspectionWorkOrderController.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectionWorkOrderService.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionWorkOrderAuditVO.java
aus-admin/src/main/java/com/glsx/usedcar/web/rest/inspect/InspectionWorkOrderController.java
View file @
f585a61
...
@@ -121,4 +121,30 @@ public class InspectionWorkOrderController {
...
@@ -121,4 +121,30 @@ public class InspectionWorkOrderController {
return
BaseResp
.
fail
(
"系统异常: "
+
e
.
getMessage
());
return
BaseResp
.
fail
(
"系统异常: "
+
e
.
getMessage
());
}
}
}
}
@Operation
(
summary
=
"审批检测工单"
,
description
=
"审批检测工单(仅工单状态为已完成时可审批,同意则生成检测报告)"
)
@PostMapping
(
"/audit"
)
public
BaseResp
<
Void
>
audit
(
@Valid
@RequestBody
InspectionWorkOrderAuditVO
auditVO
,
Authentication
authentication
)
{
log
.
info
(
"审批检测工单请求: {}"
,
JSON
.
toJSONString
(
auditVO
));
try
{
if
(
authentication
==
null
||
authentication
.
getPrincipal
()
==
null
)
{
throw
new
BusinessCodeException
(
ErrorCodeEnum
.
LOGIN_ERROR
,
"未登录,无法操作"
);
}
User
user
=
(
User
)
authentication
.
getPrincipal
();
inspectionWorkOrderService
.
auditInspectionWorkOrder
(
auditVO
,
user
.
getUserId
(),
user
.
getUserName
(),
InspectionPlatTypeEnum
.
BACKEND
);
}
catch
(
BusinessCodeException
be
)
{
log
.
error
(
"审批检测工单失败!业务异常!"
,
be
);
return
BaseResp
.
fail
(
StrUtil
.
toString
(
be
.
getCode
()),
StrUtil
.
toString
(
be
.
getMessage
()));
}
catch
(
Exception
e
)
{
log
.
error
(
"审批检测工单失败!系统异常!"
,
e
);
return
BaseResp
.
fail
(
"系统异常: "
+
e
.
getMessage
());
}
return
BaseResp
.
success
();
}
}
}
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectionWorkOrderService.java
View file @
f585a61
This diff is collapsed.
Click to expand it.
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionWorkOrderAuditVO.java
0 → 100644
View file @
f585a61
package
com
.
glsx
.
usedcar
.
module
.
inspect
.
vo
;
import
jakarta.validation.constraints.NotBlank
;
import
jakarta.validation.constraints.NotNull
;
import
lombok.Data
;
/**
* 检测工单审批VO
*/
@Data
public
class
InspectionWorkOrderAuditVO
{
/**
* 工单主键ID
*/
@NotNull
(
message
=
"工单ID不能为空"
)
private
Long
id
;
/**
* 审批结果:1=同意,2=不同意
*/
@NotNull
(
message
=
"审批结果不能为空"
)
private
Integer
auditResult
;
/**
* 审批意见
*/
@NotBlank
(
message
=
"审批意见不能为空"
)
private
String
auditOpinion
;
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment