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 d93665c1
authored
Mar 25, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:当工单审批失败的时候,工单状态修改为检测中
1 parent
5cabd398
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
9 deletions
aus-api/src/main/java/com/glsx/usedcar/web/api/inspect/InspectionReportController.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectionReportService.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/VehicleInspectScoreRespVO.java
aus-api/src/main/java/com/glsx/usedcar/web/api/inspect/InspectionReportController.java
View file @
d93665c
...
@@ -31,7 +31,7 @@ public class InspectionReportController {
...
@@ -31,7 +31,7 @@ public class InspectionReportController {
*/
*/
@Operation
(
summary
=
"根据车辆ID查询检测评分/评级"
,
@Operation
(
summary
=
"根据车辆ID查询检测评分/评级"
,
description
=
"查询车辆绑定的检测报告对应的综合分数、外观分数、骨架评级、内饰评级"
)
description
=
"查询车辆绑定的检测报告对应的综合分数、外观分数、骨架评级、内饰评级"
)
@GetMapping
(
"/vehicle/
score/
{vehicleId}"
)
@GetMapping
(
"/vehicle/{vehicleId}"
)
public
BaseResp
<
VehicleInspectScoreRespVO
>
getVehicleInspectScore
(
public
BaseResp
<
VehicleInspectScoreRespVO
>
getVehicleInspectScore
(
@Parameter
(
description
=
"车辆ID"
,
required
=
true
,
example
=
"100001"
)
@Parameter
(
description
=
"车辆ID"
,
required
=
true
,
example
=
"100001"
)
@PathVariable
(
"vehicleId"
)
Integer
vehicleId
)
{
@PathVariable
(
"vehicleId"
)
Integer
vehicleId
)
{
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectionReportService.java
View file @
d93665c
...
@@ -437,9 +437,7 @@ public class InspectionReportService {
...
@@ -437,9 +437,7 @@ public class InspectionReportService {
// 关联车辆表:车牌号
// 关联车辆表:车牌号
builder
.
like
(
root
.
get
(
InspectionReport_
.
vehicle
).
get
(
Vehicle_
.
baseInfo
).
get
(
BaseInfo_
.
licensePlate
),
likePattern
),
builder
.
like
(
root
.
get
(
InspectionReport_
.
vehicle
).
get
(
Vehicle_
.
baseInfo
).
get
(
BaseInfo_
.
licensePlate
),
likePattern
),
// 关联车辆表:VIN码
// 关联车辆表:VIN码
builder
.
like
(
root
.
get
(
InspectionReport_
.
vehicle
).
get
(
Vehicle_
.
baseInfo
).
get
(
BaseInfo_
.
vin
),
likePattern
),
builder
.
like
(
root
.
get
(
InspectionReport_
.
vehicle
).
get
(
Vehicle_
.
baseInfo
).
get
(
BaseInfo_
.
vin
),
likePattern
)
// 可选:关联工单表的工单号(双重校验,根据业务需要取舍)
builder
.
like
(
root
.
get
(
InspectionReport_
.
workOrder
).
get
(
InspectionWorkOrder_
.
woId
),
likePattern
)
));
));
}
}
Object
status
=
pagination
.
getFilterValueOrElseNull
(
JpaQueryConstants
.
InspectionReport
.
VEHICLE_STATE
);
Object
status
=
pagination
.
getFilterValueOrElseNull
(
JpaQueryConstants
.
InspectionReport
.
VEHICLE_STATE
);
...
@@ -541,6 +539,7 @@ public class InspectionReportService {
...
@@ -541,6 +539,7 @@ public class InspectionReportService {
respVO
.
setAccident
(
accidentBurnWadeDTO
.
getAccident
());
respVO
.
setAccident
(
accidentBurnWadeDTO
.
getAccident
());
respVO
.
setBurn
(
accidentBurnWadeDTO
.
getBurn
());
respVO
.
setBurn
(
accidentBurnWadeDTO
.
getBurn
());
respVO
.
setWade
(
accidentBurnWadeDTO
.
getWade
());
respVO
.
setWade
(
accidentBurnWadeDTO
.
getWade
());
respVO
.
setH5Url
(
bindReport
.
getH5Url
());
log
.
info
(
"【查询成功】vehicleId={},综合分数={},外观分数={},骨架评级={},内饰评级={}"
,
log
.
info
(
"【查询成功】vehicleId={},综合分数={},外观分数={},骨架评级={},内饰评级={}"
,
vehicleId
,
vehicleId
,
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectionWorkOrderService.java
View file @
d93665c
...
@@ -420,6 +420,7 @@ public class InspectionWorkOrderService {
...
@@ -420,6 +420,7 @@ public class InspectionWorkOrderService {
// 3. 保存审批前原始状态(用于日志)
// 3. 保存审批前原始状态(用于日志)
Integer
originalAuditStatus
=
workOrder
.
getAuditStatus
();
Integer
originalAuditStatus
=
workOrder
.
getAuditStatus
();
Integer
targetAuditStatus
;
Integer
targetAuditStatus
;
Integer
originalStatus
=
workOrder
.
getStatus
();
String
operationContent
;
String
operationContent
;
String
description
;
String
description
;
// 4. 处理审批结果
// 4. 处理审批结果
...
@@ -450,8 +451,9 @@ public class InspectionWorkOrderService {
...
@@ -450,8 +451,9 @@ public class InspectionWorkOrderService {
workOrder
.
getWoId
(),
originalAuditStatus
,
targetAuditStatus
);
workOrder
.
getWoId
(),
originalAuditStatus
,
targetAuditStatus
);
auditOperationType
=
InspectionWorkOrderOperationTypeEnum
.
APPROVE_PASS
;
auditOperationType
=
InspectionWorkOrderOperationTypeEnum
.
APPROVE_PASS
;
}
else
{
}
else
{
// 4.2 不同意审批:
仅更新审批状态为拒绝
,不生成报告
// 4.2 不同意审批:
更新审批状态为拒绝, 更新工单状态为检测中
,不生成报告
targetAuditStatus
=
InspectionWorkOrderAuditStatusEnum
.
REJECT
.
getCode
();
targetAuditStatus
=
InspectionWorkOrderAuditStatusEnum
.
REJECT
.
getCode
();
workOrder
.
setStatus
(
InspectionWorkOrderStatusEnum
.
IN_PROGRESS
.
getCode
());
workOrder
.
setAuditStatus
(
targetAuditStatus
);
workOrder
.
setAuditStatus
(
targetAuditStatus
);
workOrder
.
setAuditContent
(
auditVO
.
getAuditOpinion
());
workOrder
.
setAuditContent
(
auditVO
.
getAuditOpinion
());
workOrder
.
setAuditTime
(
now
);
workOrder
.
setAuditTime
(
now
);
...
@@ -460,8 +462,8 @@ public class InspectionWorkOrderService {
...
@@ -460,8 +462,8 @@ public class InspectionWorkOrderService {
inspectionWorkOrderRepository
.
save
(
workOrder
);
inspectionWorkOrderRepository
.
save
(
workOrder
);
operationContent
=
String
.
format
(
"拒绝审批工单,工单ID:%s,审批意见:%s"
,
auditVO
.
getId
(),
auditVO
.
getAuditOpinion
());
operationContent
=
String
.
format
(
"拒绝审批工单,工单ID:%s,审批意见:%s"
,
auditVO
.
getId
(),
auditVO
.
getAuditOpinion
());
description
=
String
.
format
(
"审批工单[%s]拒绝,状态从[%s]改为[%s],未生成检测报告"
,
description
=
String
.
format
(
"审批工单[%s]拒绝,
审批状态从[%s]改为[%s], 工单
状态从[%s]改为[%s],未生成检测报告"
,
workOrder
.
getWoId
(),
originalAuditStatus
,
targetAuditStatus
);
workOrder
.
getWoId
(),
originalAuditStatus
,
targetAuditStatus
,
originalStatus
,
InspectionWorkOrderStatusEnum
.
IN_PROGRESS
.
getCode
()
);
auditOperationType
=
InspectionWorkOrderOperationTypeEnum
.
APPROVE_REJECT
;
auditOperationType
=
InspectionWorkOrderOperationTypeEnum
.
APPROVE_REJECT
;
}
}
...
@@ -499,11 +501,11 @@ public class InspectionWorkOrderService {
...
@@ -499,11 +501,11 @@ public class InspectionWorkOrderService {
InspectionWorkOrder
workOrder
=
inspectionWorkOrderRepository
.
findByIdAndDeleteFlag
(
id
,
DeleteFlag
.
NOT_DELETED
.
getCode
())
InspectionWorkOrder
workOrder
=
inspectionWorkOrderRepository
.
findByIdAndDeleteFlag
(
id
,
DeleteFlag
.
NOT_DELETED
.
getCode
())
.
orElseThrow
(()
->
new
BusinessCodeException
(
ErrorCodeEnum
.
DATA_NOT_EXIST
,
"检测工单不存在,工单ID:"
+
id
));
.
orElseThrow
(()
->
new
BusinessCodeException
(
ErrorCodeEnum
.
DATA_NOT_EXIST
,
"检测工单不存在,工单ID:"
+
id
));
// 仅「
已派单
」状态可开始检测
// 仅「
待检测
」状态可开始检测
Integer
dispatchedStatus
=
InspectionWorkOrderStatusEnum
.
DISPATCHED
.
getCode
();
Integer
dispatchedStatus
=
InspectionWorkOrderStatusEnum
.
DISPATCHED
.
getCode
();
if
(!
Objects
.
equals
(
workOrder
.
getStatus
(),
dispatchedStatus
))
{
if
(!
Objects
.
equals
(
workOrder
.
getStatus
(),
dispatchedStatus
))
{
throw
new
BusinessCodeException
(
ErrorCodeEnum
.
PARAM_ERROR
,
throw
new
BusinessCodeException
(
ErrorCodeEnum
.
PARAM_ERROR
,
String
.
format
(
"工单状态为[%s],仅已
派单
状态可开始检测,工单ID:"
,
workOrder
.
getStatus
()),
id
);
String
.
format
(
"工单状态为[%s],仅已
待检测
状态可开始检测,工单ID:"
,
workOrder
.
getStatus
()),
id
);
}
}
Inspector
inspector
=
workOrder
.
getInspector
();
Inspector
inspector
=
workOrder
.
getInspector
();
String
opName
=
inspector
.
getName
();
String
opName
=
inspector
.
getName
();
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/VehicleInspectScoreRespVO.java
View file @
d93665c
...
@@ -41,4 +41,8 @@ public class VehicleInspectScoreRespVO {
...
@@ -41,4 +41,8 @@ public class VehicleInspectScoreRespVO {
*/
*/
@Schema
(
description
=
"是否有涉水 0 否 1 是"
,
example
=
"0"
)
@Schema
(
description
=
"是否有涉水 0 否 1 是"
,
example
=
"0"
)
private
String
wade
;
private
String
wade
;
@Schema
(
description
=
"h5跳转地址"
)
private
String
h5Url
;
}
}
\ 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