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 6c857393
authored
Mar 24, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:补充提交
1 parent
881b74ef
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
21 deletions
aus-admin/src/main/java/com/glsx/usedcar/export/InspectionReportExportBean.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/dao/InspectionReportRepository.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectionReportService.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionRecordRespVO.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionReportRespVO.java
aus-admin/src/main/java/com/glsx/usedcar/export/InspectionReportExportBean.java
View file @
6c85739
...
...
@@ -117,9 +117,6 @@ public class InspectionReportExportBean implements Serializable {
this
.
createTime
=
createTime
!=
null
?
createTime
.
format
(
DATE_TIME_FORMATTER
)
:
""
;
this
.
updateTime
=
updateTime
!=
null
?
updateTime
.
format
(
DATE_TIME_FORMATTER
)
:
""
;
// 评分
this
.
score
=
vo
.
getScore
()
!=
null
?
vo
.
getScore
().
toString
()
:
""
;
// 绑定状态转换
this
.
bindStatus
=
switch
(
vo
.
getBindStatus
())
{
case
1
->
"已绑定"
;
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/dao/InspectionReportRepository.java
View file @
6c85739
...
...
@@ -55,15 +55,6 @@ public interface InspectionReportRepository extends BaseRepository<InspectionRep
List
<
InspectionReport
>
findByBindStatusAndDeleteFlag
(
Integer
bindStatus
,
String
deleteFlag
);
/**
* 根据评分级别查询未删除的检测报告
*
* @param scoreLevel 评分级别(ABCDEF)
* @param deleteFlag 删除标识
* @return 检测报告列表
*/
List
<
InspectionReport
>
findByScoreLevelAndDeleteFlag
(
String
scoreLevel
,
String
deleteFlag
);
/**
* 分页查询检测报告(关联查询车辆、工单信息,避免N+1查询)
* 参考 InspectionWorkOrderRepository 的 EntityGraph 写法
*
...
...
@@ -72,12 +63,12 @@ public interface InspectionReportRepository extends BaseRepository<InspectionRep
* @return 检测报告分页结果
*/
@Override
@EntityGraph
(
attributePaths
=
{
"vehicle"
,
"workOrder"
})
@EntityGraph
(
attributePaths
=
{
"vehicle"
,
"workOrder"
,
"inspectionRecord"
})
Page
<
InspectionReport
>
findAll
(
Specification
<
InspectionReport
>
spec
,
Pageable
pageable
);
List
<
InspectionReport
>
findByVehicleAndBindStatusAndDeleteFlag
(
Vehicle
vehicle
,
int
status
,
String
deleteFlag
);
@EntityGraph
(
attributePaths
=
{
"vehicle"
,
"workOrder"
})
@EntityGraph
(
attributePaths
=
{
"vehicle"
,
"workOrder"
,
"inspectionRecord"
})
Optional
<
InspectionReport
>
findByIdAndDeleteFlag
(
Long
id
,
String
deleteFlag
);
}
\ No newline at end of file
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectionReportService.java
View file @
6c85739
...
...
@@ -18,6 +18,8 @@ import com.glsx.usedcar.module.vehicle.entity.*;
import
com.glsx.usedcar.util.RedisCacheUtil
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.data.domain.Page
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
...
...
@@ -50,7 +52,9 @@ public class InspectionReportService {
private
final
VehicleDao
vehicleDao
;
private
final
InspectionRecordRepository
inspectionRecordRepository
;
private
final
InspectorConfig
inspectorConfig
;
private
final
InspectionRecordService
InspectionRecordService
;
@Lazy
@Autowired
private
InspectionRecordService
InspectionRecordService
;
// ======================== 日志保存方法(核心,接收真实操作人) ========================
/**
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionRecordRespVO.java
0 → 100644
View file @
6c85739
package
com
.
glsx
.
usedcar
.
module
.
inspect
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
/**
* 检测记录返回VO(与检测记录主表一对一)
*/
@Data
@Schema
(
description
=
"检测记录返回VO"
)
public
class
InspectionRecordRespVO
{
@Schema
(
description
=
"记录ID"
,
example
=
"1"
)
private
Long
id
;
@Schema
(
description
=
"关联任务ID(一对一)"
,
example
=
"1001"
)
private
Long
taskId
;
@Schema
(
description
=
"使用的模版ID"
,
example
=
"2001"
)
private
Long
templateId
;
@Schema
(
description
=
"模版编码(快照)"
,
example
=
"INSPECT_TPL_001"
)
private
String
templateCode
;
@Schema
(
description
=
"模版版本号(快照)"
,
example
=
"V1.0.0"
)
private
String
templateVersion
;
@Schema
(
description
=
"检测进度百分比 0-100"
,
example
=
"80"
)
private
Integer
progress
;
@Schema
(
description
=
"已完成模块数"
,
example
=
"5"
)
private
Integer
completedModules
;
@Schema
(
description
=
"所在的一级模块ID"
,
example
=
"3001"
)
private
Long
locationModule
;
@Schema
(
description
=
"开始检测时间"
,
example
=
"2026-03-11 09:00:00"
)
private
LocalDateTime
startTime
;
@Schema
(
description
=
"完成检测时间"
,
example
=
"2026-03-11 10:30:00"
)
private
LocalDateTime
completeTime
;
@Schema
(
description
=
"外观评分"
,
example
=
"96.00"
)
private
BigDecimal
exteriorScore
;
@Schema
(
description
=
"外观评分依据"
,
example
=
"车身无明显划痕,漆面保持良好"
)
private
String
exteriorComment
;
@Schema
(
description
=
"骨架评级(A/B/C/D)"
,
example
=
"A"
)
private
String
skeletonLevel
;
@Schema
(
description
=
"骨架评级依据"
,
example
=
"骨架无变形、无修复痕迹"
)
private
String
skeletonComment
;
@Schema
(
description
=
"内饰评级(A/B/C/D)"
,
example
=
"B"
)
private
String
interiorLevel
;
@Schema
(
description
=
"内饰评级依据"
,
example
=
"座椅轻微磨损,中控台无破损"
)
private
String
interiorComment
;
@Schema
(
description
=
"综合评分"
,
example
=
"95.50"
)
private
BigDecimal
overallScore
;
@Schema
(
description
=
"综合评价"
,
example
=
"车辆整体状况良好,无重大事故、火烧、涉水情况"
)
private
String
overallComment
;
@Schema
(
description
=
"扩展字段(JSON格式文本)"
,
example
=
"{\"key\":\"value\"}"
)
private
String
extJson
;
@Schema
(
description
=
"备注"
,
example
=
"检测过程顺利"
)
private
String
remark
;
@Schema
(
description
=
"删除标识 N:未删除 D:已删除"
,
example
=
"N"
)
private
String
deletedFlag
;
}
\ No newline at end of file
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionReportRespVO.java
View file @
6c85739
...
...
@@ -5,7 +5,6 @@ import com.glsx.usedcar.module.vehicle.entity.Vehicle;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
@Data
...
...
@@ -23,11 +22,8 @@ public class InspectionReportRespVO {
@Schema
(
description
=
"车辆信息"
)
private
Vehicle
vehicle
;
@Schema
(
description
=
"检测评分(保留1位小数)"
,
example
=
"95.5"
)
private
BigDecimal
score
;
@Schema
(
description
=
"评分级别(ABCDEF)"
,
example
=
"A"
)
private
String
scoreLevel
;
@Schema
(
description
=
"检测记录信息"
)
private
InspectionRecordRespVO
inspectionRecord
;
@Schema
(
description
=
"绑定状态(1:已绑定;2:未绑定)"
,
example
=
"1"
)
private
Integer
bindStatus
;
...
...
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