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 0f7212f2
authored
Mar 19, 2026
by
杨卫
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:检测师代码调整
1 parent
379396b6
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
863 additions
and
40 deletions
aus-admin/src/main/java/com/glsx/usedcar/web/rest/inspect/InspectorController.java
aus-core/src/main/java/com/glsx/usedcar/config/InspectorConfig.java
aus-core/src/main/java/com/glsx/usedcar/consts/common/SymbolConsts.java
aus-core/src/main/java/com/glsx/usedcar/consts/inspect/InspectConstants.java
aus-core/src/main/java/com/glsx/usedcar/converts/InspectorConverter.java
aus-core/src/main/java/com/glsx/usedcar/enums/inspect/InspectionBaseInfoFieldEnum.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/dto/InspectionNodeDTO.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/dto/InspectionResultDTO.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/entity/InspectionNode.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/entity/InspectionNodeVersion.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/entity/InspectionValue.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectionRecordService.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectorService.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionDetailRespVO.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionNodeDetailVO.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionNodeVO.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionValueVO.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/UpdateInspectorStatusVO.java
aus-core/src/main/java/com/glsx/usedcar/validators/inspector/AbstractNodeValidator.java
aus-inspector/src/main/java/com/glsx/usedcar/controller/InspectionRecordController.java
aus-admin/src/main/java/com/glsx/usedcar/web/rest/inspect/InspectorController.java
View file @
0f7212f
...
...
@@ -107,19 +107,12 @@ public class InspectorController {
}
@Operation
(
summary
=
"禁用/启用检测师"
,
description
=
"根据检测师ID修改状态,0-禁用,1-启用"
)
@PostMapping
(
"/status/{id}"
)
public
BaseResp
<
Void
>
updateStatus
(
@Parameter
(
description
=
"检测师ID"
,
required
=
true
)
@NotNull
(
message
=
"检测师ID不能为空"
)
@Positive
(
message
=
"检测师ID必须为正数"
)
@PathVariable
(
"id"
)
Long
id
,
@Parameter
(
description
=
"状态值:0-禁用,1-启用"
,
required
=
true
)
@NotNull
(
message
=
"状态值不能为空"
)
@RequestParam
(
"status"
)
Integer
status
)
{
log
.
info
(
"禁用/启用检测师请求: ID={}, status={}"
,
id
,
status
);
@PostMapping
(
"/status"
)
public
BaseResp
<
Void
>
updateStatus
(
@Valid
@RequestBody
UpdateInspectorStatusVO
updateVO
)
{
log
.
info
(
"禁用/启用检测师请求: ID={}, status={}"
,
updateVO
.
getId
(),
updateVO
.
getStatus
());
try
{
inspectorService
.
updateStatus
(
id
,
status
);
inspectorService
.
updateStatus
(
updateVO
.
getId
(),
updateVO
.
getStatus
(),
updateVO
.
getRemark
()
);
}
catch
(
BusinessCodeException
be
)
{
log
.
error
(
"禁用/启用检测师失败!业务异常!"
,
be
);
return
BaseResp
.
fail
(
StrUtil
.
toString
(
be
.
getCode
()),
be
.
getMessage
());
...
...
@@ -133,15 +126,14 @@ public class InspectorController {
@Operation
(
summary
=
"分页查询检测师"
,
description
=
"分页查询检测师列表,支持姓名或手机号模糊查询,自动过滤逻辑删除数据"
)
@PostMapping
(
"/page"
)
public
BaseResp
<
Page
<
InspectorRespVO
>
>
pageInspectors
(
@Valid
@RequestBody
Pagination
<
Inspector
>
pagination
)
{
public
Page
<
InspectorRespVO
>
pageInspectors
(
@Valid
@RequestBody
Pagination
<
Inspector
>
pagination
)
{
log
.
info
(
"分页查询检测师请求: offset={}, limit={}"
,
pagination
.
getOffset
(),
pagination
.
getLimit
());
try
{
Page
<
InspectorRespVO
>
result
=
inspectorService
.
pageInspectors
(
pagination
);
return
BaseResp
.
success
(
result
);
return
inspectorService
.
pageInspectors
(
pagination
);
}
catch
(
Exception
e
)
{
log
.
error
(
"分页查询检测师失败!系统异常!"
,
e
);
return
BaseResp
.
fail
(
"系统异常: "
+
e
.
getMessage
()
);
return
Page
.
empty
(
);
}
}
...
...
aus-core/src/main/java/com/glsx/usedcar/config/InspectorConfig.java
0 → 100644
View file @
0f7212f
package
com
.
glsx
.
usedcar
.
config
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.Configuration
;
/**
* 检测师配置
* @author yangwei
* @version 1.0
* @since 2026/03/18 11:13
*/
@Data
@Configuration
@NoArgsConstructor
@AllArgsConstructor
@ConfigurationProperties
(
prefix
=
"inspector"
)
public
class
InspectorConfig
{
/**
* 检测审核接口地址
*/
private
String
inspectionAuditUrl
;
}
aus-core/src/main/java/com/glsx/usedcar/consts/common/SymbolConsts.java
View file @
0f7212f
...
...
@@ -13,4 +13,8 @@ public interface SymbolConsts {
/** 逗号 */
String
COMMA
=
","
;
/** - */
String
HYPHEN
=
"-"
;
}
aus-core/src/main/java/com/glsx/usedcar/consts/inspect/InspectConstants.java
0 → 100644
View file @
0f7212f
package
com
.
glsx
.
usedcar
.
consts
.
inspect
;
/**
* 检测相关常量
* @author yangwei
* @version 1.0
* @since 2026/03/18 15:23
*/
public
interface
InspectConstants
{
// ==================== 节点类型 ====================
/** 节点类型:模块 */
int
NODE_TYPE_MODULE
=
1
;
/** 节点类型:分组 */
int
NODE_TYPE_GROUP
=
2
;
/** 节点类型:叶子节点 */
int
NODE_TYPE_LEAF
=
3
;
// ==================== 展现模式 ====================
/** 展现模式:列表表单 */
int
DISPLAY_MODE_LIST_FORM
=
1
;
/** 展现模式:网格检测 */
int
DISPLAY_MODE_GRID
=
2
;
/** 展现模式:区域分组 */
int
DISPLAY_MODE_AREA_GROUP
=
3
;
/** 展现模式:图片上传 */
int
DISPLAY_MODE_IMAGE_UPLOAD
=
4
;
/** 展现模式:基础信息 */
int
DISPLAY_MODE_BASE_INFO
=
5
;
/** 展现模式:视频录制 */
int
DISPLAY_MODE_VIDEO
=
6
;
// ==================== 检测项类型 ====================
/** 检测项类型:基础字段 */
int
ITEM_TYPE_BASE
=
1
;
/** 检测项类型:故障检测 */
int
ITEM_TYPE_FAULT
=
2
;
// ==================== 结果状态 ====================
/** 结果状态:正常 */
int
RESULT_STATUS_NORMAL
=
1
;
/** 结果状态:故障 */
int
RESULT_STATUS_FAULT
=
2
;
/** 结果状态:无此结构 */
int
RESULT_STATUS_NO_STRUCTURE
=
3
;
// ==================== 完成标志 ====================
/** 完成标志:未完成 */
String
COMPLETED_FLAG_NO
=
"0"
;
/** 完成标志:已完成 */
String
COMPLETED_FLAG_YES
=
"1"
;
// ==================== 默认值类型 ====================
/** 默认值类型:固定值 */
int
DEFAULT_TYPE_FIXED
=
1
;
/** 默认值类型:接口获取 */
int
DEFAULT_TYPE_API
=
2
;
/** 默认值类型:表达式 */
int
DEFAULT_TYPE_EXPR
=
3
;
// 选项数据源类型:1-固定值,2-接口获取
int
OPTION_DATA_TYPE_FIXED
=
1
;
int
OPTION_DATA_TYPE_API
=
2
;
}
aus-core/src/main/java/com/glsx/usedcar/converts/InspectorConverter.java
View file @
0f7212f
...
...
@@ -135,4 +135,22 @@ public interface InspectorConverter {
*/
InspectionRecord
completeInspectionVo2InspectionRecord
(
CompleteInspectionVO
completeInspectionVO
);
/**
* 检测节点VO 转 检测节点详情VO
* @author yangwei
* @since 2026/3/18 15:30
* @param vo 检测节点VO
* @return com.glsx.usedcar.module.inspect.vo.InspectionNodeDetailVO
*/
InspectionNodeDetailVO
inspectionNodeVO2DetailVO
(
InspectionNodeVO
vo
);
/**
* 检测节点VO列表 转 检测节点详情VO列表
* @author yangwei
* @since 2026/3/18 15:30
* @param vos 检测节点VO列表
* @return 检测节点详情VO列表
*/
List
<
InspectionNodeDetailVO
>
inspectionNodeVOs2DetailVOs
(
List
<
InspectionNodeVO
>
vos
);
}
aus-core/src/main/java/com/glsx/usedcar/enums/inspect/InspectionBaseInfoFieldEnum.java
0 → 100644
View file @
0f7212f
package
com
.
glsx
.
usedcar
.
enums
.
inspect
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* 检测项基础信息字段枚举
* 用于映射检测节点的 nodeCode 到车辆基础信息字段
*
* @author yangwei
* @version 1.0
* @since 2026/03/18 16:00
*/
@Getter
@AllArgsConstructor
public
enum
InspectionBaseInfoFieldEnum
{
/** 车系ID */
CAR_SERIES_ID
(
"carSeriesId"
,
"车系ID"
),
/** 车系名称 */
CAR_SERIES_NAME
(
"carSeriesName"
,
"车系名称"
),
/** 车型ID */
CAR_TYPE_ID
(
"carTypeId"
,
"车型ID"
),
/** 车型名称 */
CAR_TYPE_NAME
(
"carTypeName"
,
"车型名称"
),
/** 车牌号 */
LICENSE_PLATE
(
"licensePlate"
,
"车牌号"
),
/** 首次上牌 */
FIRST_PLATE
(
"firstPlate"
,
"首次上牌"
),
/** 排放标准 */
EMISSION_STANDARD
(
"emissionStandard"
,
"排放标准"
),
/** 排量 */
DISPLACEMENT
(
"displacement"
,
"排量"
),
;
private
final
String
code
;
private
final
String
description
;
/**
* 根据code获取枚举
*
* @param code 字段编码
* @return 枚举实例,未找到返回null
*/
public
static
InspectionBaseInfoFieldEnum
getByCode
(
String
code
)
{
if
(
code
==
null
)
{
return
null
;
}
for
(
InspectionBaseInfoFieldEnum
e
:
values
())
{
if
(
e
.
getCode
().
equals
(
code
))
{
return
e
;
}
}
return
null
;
}
/**
* 判断是否是基础信息字段
*
* @param code 字段编码
* @return 是否是基础信息字段
*/
public
static
boolean
isBaseInfoField
(
String
code
)
{
return
getByCode
(
code
)
!=
null
;
}
}
aus-core/src/main/java/com/glsx/usedcar/module/inspect/dto/InspectionNodeDTO.java
View file @
0f7212f
package
com
.
glsx
.
usedcar
.
module
.
inspect
.
dto
;
import
jakarta.persistence.Column
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
...
...
@@ -33,6 +34,11 @@ public class InspectionNodeDTO implements Serializable {
@Builder
.
Default
private
Long
parentId
=
0L
;
/**
* 节点代码
*/
private
String
nodeCode
;
/** 节点名称 */
private
String
nodeName
;
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/dto/InspectionResultDTO.java
View file @
0f7212f
...
...
@@ -50,6 +50,9 @@ public class InspectionResultDTO implements Serializable {
@Serial
private
static
final
long
serialVersionUID
=
7281943562814735109L
;
/** 值对应的key */
private
String
valueKey
;
/** 值内容(统一存储:文本/数字/日期/文件路径等) */
private
String
valueText
;
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/entity/InspectionNode.java
View file @
0f7212f
...
...
@@ -55,6 +55,12 @@ public class InspectionNode extends AuditingEntity implements Serializable {
private
Long
parentId
=
0L
;
/**
* 节点代码
*/
@Column
(
name
=
"NODE_CODE"
,
length
=
100
)
private
String
nodeCode
;
/**
* 节点名称
*/
@Column
(
name
=
"NODE_NAME"
,
nullable
=
false
,
length
=
100
)
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/entity/InspectionNodeVersion.java
View file @
0f7212f
...
...
@@ -58,6 +58,12 @@ public class InspectionNodeVersion extends AuditingEntity implements Serializabl
private
Long
templateHistoryId
;
/**
* 节点代码
*/
@Column
(
name
=
"NODE_CODE"
,
length
=
100
)
private
String
nodeCode
;
/**
* 节点名称
*/
@Column
(
name
=
"NODE_NAME"
,
nullable
=
false
,
length
=
100
)
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/entity/InspectionValue.java
View file @
0f7212f
...
...
@@ -48,6 +48,12 @@ public class InspectionValue extends AuditingEntity implements Serializable {
private
Long
resultId
;
/**
* 值对应的key,一般选项才有
*/
@Column
(
name
=
"VALUE_KEY"
,
nullable
=
false
,
length
=
1024
)
private
String
valueKey
;
/**
* 值内容(统一存储:文本/数字/日期/文件路径/JSON等)
*/
@Column
(
name
=
"VALUE_TEXT"
,
nullable
=
false
,
length
=
1024
)
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectionRecordService.java
View file @
0f7212f
...
...
@@ -3,20 +3,24 @@ package com.glsx.usedcar.module.inspect.service;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.glsx.usedcar.config.InspectorConfig
;
import
com.glsx.usedcar.consts.common.CommonConsts
;
import
com.glsx.usedcar.consts.common.DatePatternConsts
;
import
com.glsx.usedcar.consts.inspect.InspectConstants
;
import
com.glsx.usedcar.converts.InspectorConverter
;
import
com.glsx.usedcar.enums.common.DeleteFlag
;
import
com.glsx.usedcar.enums.inspect.InspectionBaseInfoFieldEnum
;
import
com.glsx.usedcar.module.auction.service.AbstractAuctionService
;
import
com.glsx.usedcar.module.business.entity.NoticeTemplate
;
import
com.glsx.usedcar.module.business.service.NoticeField
;
import
com.glsx.usedcar.module.inspect.dao.InspectionRecordRepository
;
import
com.glsx.usedcar.module.inspect.dao.InspectionResultRepository
;
import
com.glsx.usedcar.module.inspect.dao.InspectionValueRepository
;
import
com.glsx.usedcar.module.inspect.entity.InspectionRecord
;
import
com.glsx.usedcar.module.inspect.entity.InspectionResult
;
import
com.glsx.usedcar.module.inspect.entity.InspectionValue
;
import
com.glsx.usedcar.module.inspect.dao.InspectionWorkOrderRepository
;
import
com.glsx.usedcar.module.inspect.entity.*
;
import
com.glsx.usedcar.module.inspect.vo.*
;
import
com.glsx.usedcar.module.vehicle.entity.Vehicle
;
import
com.glsx.usedcar.validators.inspector.NodeValidationManager
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -43,12 +47,14 @@ import java.util.stream.Collectors;
@Transactional
(
propagation
=
Propagation
.
SUPPORTS
,
readOnly
=
true
)
public
class
InspectionRecordService
extends
AbstractAuctionService
{
private
final
InspectorConfig
inspectorConfig
;
private
final
InspectorConverter
inspectorConverter
;
private
final
NodeValidationManager
nodeValidationManager
;
private
final
InspectionNodeService
inspectionNodeService
;
private
final
InspectionValueRepository
inspectionValueRepository
;
private
final
InspectionRecordRepository
inspectionRecordRepository
;
private
final
InspectionResultRepository
inspectionResultRepository
;
private
final
InspectionValueRepository
inspectionValueRepository
;
private
final
InspectionNodeService
inspectionNodeService
;
private
final
NodeValidationManager
nodeValidationManager
;
private
final
InspectorConverter
inspectorConverter
;
private
final
InspectionWorkOrderRepository
inspectionWorkOrderRepository
;
/**
* <pre>
...
...
@@ -94,7 +100,7 @@ public class InspectionRecordService extends AbstractAuctionService {
if
(
config
==
null
)
{
throw
new
BusinessCodeException
(
ErrorCodeEnum
.
NODE_NOT_EXISTS
,
nodeId
,
leafNode
.
getNodeName
());
}
if
(!
Objects
.
equals
(
config
.
getNodeType
(),
3
))
{
if
(!
Objects
.
equals
(
config
.
getNodeType
(),
InspectConstants
.
NODE_TYPE_LEAF
))
{
throw
new
BusinessCodeException
(
ErrorCodeEnum
.
NODE_NOT_LEAF
,
nodeId
,
config
.
getNodeName
());
}
}
...
...
@@ -156,7 +162,11 @@ public class InspectionRecordService extends AbstractAuctionService {
.
locationModule
(
req
.
getLocationModule
())
.
startTime
(
LocalDateTime
.
now
())
.
build
();
return
inspectionRecordRepository
.
save
(
record
);
InspectionRecord
save
=
inspectionRecordRepository
.
save
(
record
);
// todo 更新检测任务状态
return
save
;
}
/**
...
...
@@ -356,19 +366,28 @@ public class InspectionRecordService extends AbstractAuctionService {
record
.
setCompleteTime
(
completeTime
);
inspectionRecordRepository
.
save
(
record
);
//
todo 4. 发送企微,更新施工单状态,脚本待完善
// 发送通知消息
//
4. 发送通知消息
Optional
<
InspectionWorkOrder
>
inspectionWorkOrderOptional
=
inspectionWorkOrderRepository
.
findByIdAndDeleteFlag
(
taskId
,
DeleteFlag
.
NOT_DELETED
.
getCode
());
sendNoticeMessage
(
NoticeTemplate
.
TemplateType
.
DETECT_REPORT
,
Map
.
of
(
NoticeField
.
CAR_INFO
,
null
,
NoticeField
.
CAR_INFO
,
inspectionWorkOrderOptional
.
map
(
InspectionWorkOrder:
:
getVehicle
)
.
map
(
Vehicle:
:
toVehicleName
)
.
orElse
(
StrUtil
.
EMPTY
),
NoticeField
.
CORE_SCORE
,
record
.
getOverallScore
(),
NoticeField
.
EXTERNAL_SCORE
,
record
.
getExteriorScore
(),
NoticeField
.
FRAME_RATING
,
record
.
getSkeletonLevel
(),
NoticeField
.
INTERIOR_RATING
,
record
.
getInteriorLevel
(),
NoticeField
.
DETECT_NAME
,
null
,
NoticeField
.
DETECT_NAME
,
inspectionWorkOrderOptional
.
map
(
InspectionWorkOrder:
:
getInspector
)
.
map
(
Inspector:
:
getName
)
.
orElse
(
StrUtil
.
EMPTY
),
NoticeField
.
SUBMIT_TIME
,
DateUtil
.
format
(
completeTime
,
DatePatternConsts
.
PATTERN_YMDHMSS
),
NoticeField
.
CLICK_HANDLER
,
null
NoticeField
.
CLICK_HANDLER
,
Optional
.
ofNullable
(
inspectorConfig
.
getInspectionAuditUrl
())
.
filter
(
StrUtil:
:
isNotBlank
).
orElse
(
StrUtil
.
EMPTY
)
));
// todo 5. 更新施工单状态
log
.
info
(
"检测师完成检测成功,recordId: {}"
,
record
.
getId
());
return
CompleteInspectionRespVO
.
builder
()
.
firstUncompletedNodeId
(
null
)
...
...
@@ -393,7 +412,7 @@ public class InspectionRecordService extends AbstractAuctionService {
}
/**
* 递归收集指定父节点下的所有叶子节点(
nodeLevel=2
),基于平铺列表的 parentId 关系
* 递归收集指定父节点下的所有叶子节点(
NodeType=3
),基于平铺列表的 parentId 关系
*
* @param parentId 父节点 ID
* @param parentChildMap parentId -> 子节点列表
...
...
@@ -494,4 +513,216 @@ public class InspectionRecordService extends AbstractAuctionService {
public
InspectionRecordDetailVO
getDetail
(
Long
recordId
)
{
return
null
;
}
/**
* <pre>
* 查询检测详情
* 1. 根据检测记录id查询检测记录
* 2. 通过taskId获取工单信息
* 3. 获取所有节点配置(树形结构)
* 4. 查询检测结果,填充到节点中
* 5. 从检测项结果中获取车辆基础信息
* 6. 统计根节点和模块节点的正常数、故障数、无此结构数量
* </pre>
*
* @param recordId 检测记录ID
* @return 检测详情
*/
public
InspectionDetailRespVO
getInspectionDetail
(
Long
recordId
)
{
log
.
info
(
"查询检测详情,recordId: {}"
,
recordId
);
// 1. 查询检测记录
InspectionRecord
record
=
inspectionRecordRepository
.
findByIdAndDeletedFlag
(
recordId
,
DeleteFlag
.
NOT_DELETED
.
getCode
())
.
orElseThrow
(()
->
new
BusinessCodeException
(
ErrorCodeEnum
.
DATA_NOT_EXISTS
,
recordId
,
"检测记录"
));
Long
taskId
=
record
.
getTaskId
();
// 2. 获取工单信息
InspectionWorkOrder
workOrder
=
inspectionWorkOrderRepository
.
findByIdAndDeleteFlag
(
taskId
,
DeleteFlag
.
NOT_DELETED
.
getCode
())
.
orElseThrow
(()
->
new
BusinessCodeException
(
ErrorCodeEnum
.
DATA_NOT_EXISTS
,
taskId
,
"检测工单"
));
// 3. 获取所有节点配置(树形结构)
List
<
InspectionNodeVO
>
allNodes
=
inspectionNodeService
.
inspectionNodesByTaskId
(
taskId
);
// 4. 查询检测结果
List
<
InspectionResult
>
results
=
inspectionResultRepository
.
findByRecordIdWithValues
(
recordId
,
DeleteFlag
.
NOT_DELETED
.
getCode
());
Map
<
Long
,
InspectionResult
>
resultMap
=
results
.
stream
()
.
collect
(
Collectors
.
toMap
(
InspectionResult:
:
getNodeId
,
r
->
r
,
(
a
,
b
)
->
a
));
// 5. 从检测项结果中获取车辆基础信息
Map
<
String
,
String
>
baseInfoMap
=
extractBaseInfoFromResults
(
allNodes
,
resultMap
);
// 6. 构建树形结构并填充结果
List
<
InspectionNodeVO
>
rootNodes
=
inspectionNodeService
.
getChildNodes
(
0L
,
allNodes
);
// 转换为详情VO并填充数据
List
<
InspectionNodeDetailVO
>
detailNodes
=
buildDetailNodes
(
rootNodes
,
resultMap
);
// 7. 构建响应
InspectionScoreVO
scoreVO
=
inspectorConverter
.
inspectionRecordMapRespVO
(
record
);
return
InspectionDetailRespVO
.
builder
()
.
id
(
recordId
)
.
taskId
(
taskId
)
.
carSeriesId
(
parseInteger
(
baseInfoMap
.
get
(
InspectionBaseInfoFieldEnum
.
CAR_SERIES_ID
.
getCode
())))
.
carSeriesName
(
baseInfoMap
.
get
(
InspectionBaseInfoFieldEnum
.
CAR_SERIES_NAME
.
getCode
()))
.
carTypeId
(
parseInteger
(
baseInfoMap
.
get
(
InspectionBaseInfoFieldEnum
.
CAR_TYPE_ID
.
getCode
())))
.
licensePlate
(
baseInfoMap
.
get
(
InspectionBaseInfoFieldEnum
.
LICENSE_PLATE
.
getCode
()))
.
carTypeName
(
baseInfoMap
.
get
(
InspectionBaseInfoFieldEnum
.
CAR_TYPE_NAME
.
getCode
()))
.
firstPlate
(
baseInfoMap
.
get
(
InspectionBaseInfoFieldEnum
.
FIRST_PLATE
.
getCode
()))
.
emissionStandard
(
baseInfoMap
.
get
(
InspectionBaseInfoFieldEnum
.
EMISSION_STANDARD
.
getCode
()))
.
displacement
(
baseInfoMap
.
get
(
InspectionBaseInfoFieldEnum
.
DISPLACEMENT
.
getCode
()))
.
inspectionScoreVO
(
scoreVO
)
.
inspectionNodeList
(
detailNodes
)
.
build
();
}
/**
* 从检测项结果中提取车辆基础信息
* 通过节点的 defaultField 字段映射到对应的车辆信息字段
*
* @param allNodes 所有节点配置
* @param resultMap 检测结果映射
* @return 车辆基础信息映射(field -> value)
*/
private
Map
<
String
,
String
>
extractBaseInfoFromResults
(
List
<
InspectionNodeVO
>
allNodes
,
Map
<
Long
,
InspectionResult
>
resultMap
)
{
Map
<
String
,
String
>
baseInfoMap
=
new
HashMap
<>();
// 遍历所有叶子节点,提取基础信息
for
(
InspectionNodeVO
node
:
allNodes
)
{
if
(
node
.
getNodeType
()
==
null
||
node
.
getNodeType
()
!=
InspectConstants
.
NODE_TYPE_LEAF
)
{
continue
;
}
// 检查是否是基础信息节点(通过 nodeCode 判断是否在基础信息字段列表中)
String
nodeCode
=
node
.
getNodeCode
();
if
(
StrUtil
.
isBlank
(
nodeCode
))
{
continue
;
}
if
(!
InspectionBaseInfoFieldEnum
.
isBaseInfoField
(
nodeCode
))
{
continue
;
}
// 从检测结果中获取值
InspectionResult
result
=
resultMap
.
get
(
node
.
getId
());
if
(
result
==
null
||
CollUtil
.
isEmpty
(
result
.
getInspectionValues
()))
{
continue
;
}
// 获取第一个值
String
value
=
result
.
getInspectionValues
().
get
(
0
).
getValueText
();
if
(
StrUtil
.
isNotBlank
(
value
))
{
baseInfoMap
.
put
(
nodeCode
,
value
);
}
}
return
baseInfoMap
;
}
/**
* 解析整数字符串
*/
private
Integer
parseInteger
(
String
value
)
{
if
(
StrUtil
.
isBlank
(
value
))
{
return
null
;
}
try
{
return
Integer
.
parseInt
(
value
);
}
catch
(
NumberFormatException
e
)
{
return
null
;
}
}
/**
* 构建详情节点列表(递归)
*
* @param nodes 节点VO列表
* @param resultMap 检测结果映射
* @return 详情节点列表
*/
private
List
<
InspectionNodeDetailVO
>
buildDetailNodes
(
List
<
InspectionNodeVO
>
nodes
,
Map
<
Long
,
InspectionResult
>
resultMap
)
{
if
(
CollUtil
.
isEmpty
(
nodes
))
{
return
new
ArrayList
<>();
}
List
<
InspectionNodeDetailVO
>
detailNodes
=
new
ArrayList
<>();
for
(
InspectionNodeVO
node
:
nodes
)
{
InspectionNodeDetailVO
detailVO
=
inspectorConverter
.
inspectionNodeVO2DetailVO
(
node
);
// 填充检测结果(叶子节点才有)
fillNodeResult
(
detailVO
,
node
,
resultMap
);
// 递归处理子节点
if
(
CollUtil
.
isNotEmpty
(
node
.
getChildrenNodes
()))
{
List
<
InspectionNodeDetailVO
>
childDetailNodes
=
buildDetailNodes
(
node
.
getChildrenNodes
(),
resultMap
);
detailVO
.
setChildrenNodes
(
childDetailNodes
);
// 统计子节点的正常数、故障数、无此结构数
calculateNodeStatistics
(
detailVO
,
childDetailNodes
);
}
detailNodes
.
add
(
detailVO
);
}
return
detailNodes
;
}
/**
* 填充节点的检测结果
*/
private
void
fillNodeResult
(
InspectionNodeDetailVO
detailVO
,
InspectionNodeVO
node
,
Map
<
Long
,
InspectionResult
>
resultMap
)
{
if
(
node
.
getId
()
==
null
||
node
.
getId
()
<=
0
)
{
return
;
}
InspectionResult
result
=
resultMap
.
get
(
node
.
getId
());
if
(
result
==
null
)
{
return
;
}
// 叶子节点填充检测结果
if
(
node
.
getNodeType
()
!=
null
&&
node
.
getNodeType
()
==
InspectConstants
.
NODE_TYPE_LEAF
)
{
InspectionResultVO
resultVO
=
inspectorConverter
.
inspectionResult2VO
(
result
);
detailVO
.
setInspectionResultVO
(
resultVO
);
}
}
/**
* 计算节点的统计数据(正常数、故障数、无此结构数)
* 递归汇总所有子节点的统计信息
*
* @param detailVO 当前节点
* @param childDetailNodes 子节点列表
*/
private
void
calculateNodeStatistics
(
InspectionNodeDetailVO
detailVO
,
List
<
InspectionNodeDetailVO
>
childDetailNodes
)
{
int
successNum
=
0
;
int
failNum
=
0
;
int
noStructureNum
=
0
;
for
(
InspectionNodeDetailVO
child
:
childDetailNodes
)
{
// 如果子节点是叶子节点,从检测结果获取状态
if
(
child
.
getNodeType
()
!=
null
&&
child
.
getNodeType
()
==
InspectConstants
.
NODE_TYPE_LEAF
)
{
InspectionResultVO
resultVO
=
child
.
getInspectionResultVO
();
if
(
resultVO
!=
null
&&
resultVO
.
getResultStatus
()
!=
null
)
{
int
status
=
resultVO
.
getResultStatus
();
if
(
status
==
InspectConstants
.
RESULT_STATUS_NORMAL
)
{
successNum
++;
}
else
if
(
status
==
InspectConstants
.
RESULT_STATUS_FAULT
)
{
failNum
++;
}
else
if
(
status
==
InspectConstants
.
RESULT_STATUS_NO_STRUCTURE
)
{
noStructureNum
++;
}
}
}
else
{
// 非叶子节点,汇总子节点的统计
successNum
+=
child
.
getSuccessNum
()
!=
null
?
child
.
getSuccessNum
()
:
0
;
failNum
+=
child
.
getFailNum
()
!=
null
?
child
.
getFailNum
()
:
0
;
noStructureNum
+=
child
.
getNoStructureNum
()
!=
null
?
child
.
getNoStructureNum
()
:
0
;
}
}
detailVO
.
setSuccessNum
(
successNum
);
detailVO
.
setFailNum
(
failNum
);
detailVO
.
setNoStructureNum
(
noStructureNum
);
}
}
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectorService.java
View file @
0f7212f
...
...
@@ -171,7 +171,7 @@ public class InspectorService {
* @since 2026/3/9 17:00
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateStatus
(
Long
id
,
Integer
status
)
{
public
void
updateStatus
(
Long
id
,
Integer
status
,
String
remark
)
{
// 参数校验
if
(
status
==
null
||
(
status
!=
0
&&
status
!=
1
))
{
throw
new
BusinessCodeException
(
ErrorCodeEnum
.
COMMON_ERROR
,
"状态值必须是0或1"
);
...
...
@@ -187,12 +187,20 @@ public class InspectorService {
return
;
}
if
(
status
==
0
)
{
if
(
StrUtil
.
isBlank
(
remark
))
{
throw
new
BusinessCodeException
(
ErrorCodeEnum
.
COMMON_ERROR
,
"禁用时必须填写禁用原因"
);
}
else
{
inspector
.
setRemark
(
remark
);
}
}
// 更新状态
inspector
.
setStatus
(
status
);
inspectorRepository
.
save
(
inspector
);
// 记录操作日志
String
desc
=
status
==
0
?
"账号禁用"
:
"账号启用
"
;
String
desc
=
status
==
0
?
String
.
format
(
"禁用账号,原因为:%s"
,
remark
)
:
"启用账号
"
;
insertInspectorOpLog
(
inspector
.
getId
(),
desc
);
log
.
info
(
"检测师状态更新成功: ID={}, 新状态={}"
,
inspector
.
getId
(),
status
);
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionDetailRespVO.java
View file @
0f7212f
package
com
.
glsx
.
usedcar
.
module
.
inspect
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
jakarta.persistence.Column
;
import
jakarta.validation.constraints.NotBlank
;
import
jakarta.validation.constraints.Size
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.summerframework.orm.validator.CreateValidGroup
;
import
org.summerframework.orm.validator.UpdateValidGroup
;
import
java.io.Serial
;
import
java.io.Serializable
;
...
...
@@ -32,9 +37,33 @@ public class InspectionDetailRespVO implements Serializable {
@Schema
(
description
=
"关联任务ID"
)
private
Long
taskId
;
@Schema
(
description
=
"车系id"
)
private
Integer
carSeriesId
;
@Schema
(
description
=
"车系名字 奔驰GLC"
)
private
String
carSeriesName
;
@Schema
(
description
=
"车型id"
)
private
Integer
carTypeId
;
@Schema
(
description
=
"车牌号"
)
private
String
licensePlate
;
@Schema
(
description
=
"车型名称(品牌/车系/年款/配置)"
)
private
String
carTypeName
;
@Schema
(
description
=
"首次上牌"
)
private
String
firstPlate
;
@Schema
(
description
=
"排放标准"
)
private
String
emissionStandard
;
@Schema
(
description
=
"排量"
)
private
String
displacement
;
@Schema
(
description
=
"评分评级"
)
private
InspectionScoreVO
inspectionScoreVO
;
@Schema
(
description
=
"检测节点列表"
)
private
List
<
InspectionNodeVO
>
inspectionNodeList
;
private
List
<
InspectionNode
Detail
VO
>
inspectionNodeList
;
}
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionNodeDetailVO.java
0 → 100644
View file @
0f7212f
package
com
.
glsx
.
usedcar
.
module
.
inspect
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serial
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* @author yangwei
* @version 1.0
* @since 2026/03/18 14:53
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema
(
description
=
"检测节点查询响应 VO"
)
public
class
InspectionNodeDetailVO
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
6177108860298484327L
;
/**
* 节点 ID
*/
@Schema
(
description
=
"节点 ID"
)
private
Long
id
;
/**
* 所属模版 ID
*/
@Schema
(
description
=
"所属模版 ID"
)
private
Long
templateId
;
/**
* 父节点 ID,0 表示根节点
*/
@Schema
(
description
=
"父节点 ID,0 表示根节点"
)
@Builder
.
Default
private
Long
parentId
=
0L
;
/**
* 节点名称
*/
@Schema
(
description
=
"节点名称"
)
private
String
nodeName
;
/**
* 节点类型:1-模块,2-分组,3-叶子节点
*/
@Schema
(
description
=
"节点类型:1-模块,2-分组,3-叶子节点"
)
private
Integer
nodeType
;
/**
* 展示节点名称:1-展示 0-不展示
*/
@Schema
(
description
=
"展示节点名称:1-展示 0-不展示"
)
@Builder
.
Default
private
String
showNodeName
=
"1"
;
/**
* 编辑权限,0 不可编辑,1 可编辑
*/
@Schema
(
description
=
"编辑权限,0 不可编辑,1 可编辑"
)
@Builder
.
Default
private
String
editPermission
=
"1"
;
/**
* 展现模式:1-列表表单,2-网格检测,3-区域分组,4-图片上传,5-基础信息,6-视频录制
*/
@Schema
(
description
=
"展现模式:1-列表表单,2-网格检测,3-区域分组,4-图片上传,5-基础信息,6-视频录制"
)
private
Integer
displayMode
;
/**
* 检测项类型:1-基础字段,2-故障检测
*/
@Schema
(
description
=
"检测项类型:1-基础字段,2-故障检测"
)
private
Integer
itemType
;
/**
* 交互类型:text_input、number_input、date_picker、dropdown、cascade、button_select、image_upload、video_upload
*/
@Schema
(
description
=
"交互类型"
,
example
=
"text_input"
)
private
String
interactionType
;
/**
* 数据格式:string、number、date、datetime
*/
@Schema
(
description
=
"数据格式:string、number、date、datetime"
)
private
String
dataFormat
;
/**
* 日期格式,如:yyyy-MM-dd
*/
@Schema
(
description
=
"日期格式"
,
example
=
"yyyy-MM-dd"
)
private
String
datePattern
;
/**
* 预留字段
*/
@Schema
(
description
=
"预留字段"
)
private
String
reserved
;
/**
* 占位提示词
*/
@Schema
(
description
=
"占位提示词"
)
private
String
placeholder
;
/**
* 后缀(单位)
*/
@Schema
(
description
=
"后缀(单位)"
)
private
String
suffix
;
/**
* 是否必填:0-选填,1-必填
*/
@Schema
(
description
=
"是否必填:0-选填,1-必填"
)
@Builder
.
Default
private
Integer
required
=
1
;
/**
* 选项配置(JSON 格式文本):固定选项或动态接口配置
*/
@Schema
(
description
=
"选项配置(JSON 格式文本)"
)
private
String
optionsJson
;
/**
* 选项数据源类型:1-固定值,2-接口获取
*/
@Schema
(
description
=
"选项数据源类型:1-固定值,2-接口获取"
)
@Builder
.
Default
private
Integer
optionsSourceType
=
1
;
/**
* 校验规则(JSON 格式文本):{"min": 2, "max": 9, "regex": "..."}
*/
@Schema
(
description
=
"校验规则(JSON 格式文本)"
)
private
String
validationRules
;
/**
* 可选项列表(JSON 格式文本)
*/
@Schema
(
description
=
"可选项列表(JSON 格式文本)"
)
private
String
options
;
/**
* 是否支持"无此结构":0-否,1-是
*/
@Schema
(
description
=
"是否支持\"无此结构\":0-否,1-是"
)
@Builder
.
Default
private
Integer
allowNoStructure
=
0
;
/**
* 是否存在默认值:1-存在 0-不存在
*/
@Schema
(
description
=
"是否存在默认值:1-存在 0-不存在"
)
@Builder
.
Default
private
String
existsDefaultValue
=
"0"
;
/**
* 默认值(固定值)
*/
@Schema
(
description
=
"默认值(固定值)"
)
private
String
defaultValue
;
/**
* 默认值(接口获取字段)
*/
@Schema
(
description
=
"默认值(接口获取字段)"
)
private
String
defaultField
;
/**
* 默认值(表达式)
*/
@Schema
(
description
=
"默认值(表达式)"
)
private
String
defaultExpr
;
/**
* 默认值类型:1-固定值,2-接口获取,3-表达式
*/
@Schema
(
description
=
"默认值类型:1-固定值,2-接口获取,3-表达式"
)
@Builder
.
Default
private
Integer
defaultType
=
1
;
/**
* 默认值配置(JSON 格式文本)
*/
@Schema
(
description
=
"默认值配置(JSON 格式文本)"
)
private
String
defaultConfig
;
/**
* 最大上传数量
*/
@Schema
(
description
=
"最大上传数量"
)
@Builder
.
Default
private
Integer
maxCount
=
1
;
/**
* 拍摄要求说明
*/
@Schema
(
description
=
"拍摄要求说明"
)
private
String
captureRequirement
;
/**
* 最大大小,单位 (KB)
*/
@Schema
(
description
=
"最大大小,单位 (KB)"
)
private
Long
maxKb
;
/**
* 节点路径,如:/1/7/8/
*/
@Schema
(
description
=
"节点路径"
)
private
String
nodePath
;
/**
* 节点层级,根节点为 0
*/
@Schema
(
description
=
"节点层级,根节点为 0"
)
@Builder
.
Default
private
Integer
nodeLevel
=
0
;
/**
* 同级排序号
*/
@Schema
(
description
=
"同级排序号"
)
@Builder
.
Default
private
Integer
sortOrder
=
0
;
/**
* 状态:0-禁用,1-启用
*/
@Schema
(
description
=
"状态:0-禁用,1-启用"
)
@Builder
.
Default
private
Integer
status
=
1
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
private
String
remark
;
/**
* 创建时间
*/
@Schema
(
description
=
"创建时间"
)
private
LocalDateTime
createTime
;
@Schema
(
description
=
"失败数"
)
private
Integer
failNum
;
@Schema
(
description
=
"成功数"
)
private
Integer
successNum
;
@Schema
(
description
=
"无此结构数"
)
private
Integer
noStructureNum
;
/**
* 更新时间
*/
@Schema
(
description
=
"更新时间"
)
private
LocalDateTime
updateTime
;
@Schema
(
description
=
"检测项值,叶子节点才有"
)
private
InspectionResultVO
inspectionResultVO
;
@Schema
(
description
=
"子节点列表"
)
private
List
<
InspectionNodeDetailVO
>
childrenNodes
;
}
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionNodeVO.java
View file @
0f7212f
package
com
.
glsx
.
usedcar
.
module
.
inspect
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
jakarta.persistence.Column
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
...
...
@@ -47,6 +48,9 @@ public class InspectionNodeVO implements Serializable {
@Builder
.
Default
private
Long
parentId
=
0L
;
@Schema
(
description
=
"节点代码"
)
private
String
nodeCode
;
/**
* 节点名称
*/
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectionValueVO.java
View file @
0f7212f
...
...
@@ -31,6 +31,10 @@ public class InspectionValueVO implements Serializable {
@Schema
(
description
=
"关联结果ID(inspection_result.id)"
)
private
Long
resultId
;
/** 值对应的key */
@Schema
(
description
=
"值对应的key,不一定存在"
)
private
String
valueKey
;
@Schema
(
description
=
"值内容(统一存储:文本/数字/日期/文件路径/JSON等)"
)
private
String
valueText
;
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/UpdateInspectorStatusVO.java
0 → 100644
View file @
0f7212f
package
com
.
glsx
.
usedcar
.
module
.
inspect
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
jakarta.validation.constraints.NotNull
;
import
jakarta.validation.constraints.Positive
;
import
jakarta.validation.constraints.Size
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
me.chanjar.weixin.common.annotation.Required
;
import
java.io.Serial
;
import
java.io.Serializable
;
/**
* 更新检测师状态 VO
* @author yangwei
* @version 1.0
* @since 2026/03/19 09:40
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema
(
description
=
"更新检测师状态 VO"
)
public
class
UpdateInspectorStatusVO
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
6880730705706357204L
;
@Schema
(
description
=
"检测师ID"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
@NotNull
(
message
=
"检测师ID不能为空"
)
@Positive
(
message
=
"检测师ID必须为正数"
)
private
Long
id
;
@Schema
(
description
=
"检测师状态"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
@NotNull
(
message
=
"检测师状态不能为空"
)
private
Integer
status
;
@Schema
(
description
=
"禁用原因, 禁用时必填"
)
@Size
(
max
=
256
,
message
=
"禁用原因长度不能超过{max}"
)
private
String
remark
;
}
aus-core/src/main/java/com/glsx/usedcar/validators/inspector/AbstractNodeValidator.java
View file @
0f7212f
...
...
@@ -6,6 +6,8 @@ import cn.hutool.core.util.ObjectUtil;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson2.JSON
;
import
com.alibaba.fastjson2.JSONArray
;
import
com.glsx.usedcar.consts.common.SymbolConsts
;
import
com.glsx.usedcar.consts.inspect.InspectConstants
;
import
com.glsx.usedcar.consts.inspect.ValidatorConstants
;
import
com.glsx.usedcar.module.inspect.dto.InspectionNodeDTO
;
import
com.glsx.usedcar.module.inspect.dto.InspectionResultDTO
;
...
...
@@ -307,13 +309,23 @@ public abstract class AbstractNodeValidator implements NodeValidator {
*/
protected
ValidationResult
validateOptions
(
List
<
String
>
values
,
InspectionNodeDTO
node
)
{
String
optionsStr
=
node
.
getOptions
();
if
(
StrUtil
.
isBlank
(
optionsStr
)
||
CollUtil
.
isEmpty
(
values
))
{
// 如果是固定值存在值才进行校验
if
(
node
.
getOptionsSourceType
()
!=
InspectConstants
.
OPTION_DATA_TYPE_FIXED
||
StrUtil
.
isBlank
(
optionsStr
)
||
CollUtil
.
isEmpty
(
values
))
{
return
ValidationResult
.
success
();
}
List
<
String
>
validOptions
;
try
{
JSONArray
arr
=
JSON
.
parseArray
(
optionsStr
);
validOptions
=
arr
.
stream
().
map
(
Object:
:
toString
).
toList
();
validOptions
=
arr
.
stream
().
map
(
el
->
{
String
elStr
=
ObjectUtil
.
toString
(
el
);
if
(
StrUtil
.
isNotBlank
(
elStr
)
&&
StrUtil
.
contains
(
elStr
,
SymbolConsts
.
HYPHEN
))
{
List
<
String
>
split
=
StrUtil
.
split
(
elStr
,
SymbolConsts
.
HYPHEN
);
if
(
split
.
size
()
>
1
)
{
elStr
=
split
.
get
(
1
);
}
}
return
elStr
;
}).
toList
();
}
catch
(
Exception
e
)
{
log
.
warn
(
"节点【{}】options 配置解析失败:{}"
,
node
.
getNodeName
(),
optionsStr
);
return
ValidationResult
.
success
();
...
...
aus-inspector/src/main/java/com/glsx/usedcar/controller/InspectionRecordController.java
View file @
0f7212f
...
...
@@ -46,17 +46,22 @@ public class InspectionRecordController {
@PostMapping
(
"/completeInspection"
)
@Operation
(
summary
=
"完成检测"
,
description
=
"完成检测,全量检查所有必填选项"
)
public
BaseResp
<
CompleteInspectionRespVO
>
completeInspection
(
@RequestBody
@Valid
CompleteInspectionVO
req
)
{
CompleteInspectionRespVO
result
=
inspectionRecordService
.
completeInspection
(
req
);
return
BaseResp
.
success
(
CompleteInspectionRespVO
.
builder
().
build
(),
"完成检测"
);
return
BaseResp
.
success
(
inspectionRecordService
.
completeInspection
(
req
),
"完成检测"
);
}
@PostMapping
(
"/{recordId}/detail"
)
/**
* 编写查询检测详情接口,根据检测记录id查询,检测节点还要统计根节点以及模块节点的正常数,故障数以及无此结构数量
* @author yangwei
* @since 2026/3/18 15:00
* @param recordId
* @return com.glsx.usedcar.resp.BaseResp<com.glsx.usedcar.module.inspect.vo.InspectionDetailRespVO>
*/
@GetMapping
(
"/{recordId}/detail"
)
@Operation
(
summary
=
"详情"
,
description
=
"检测详情"
)
public
BaseResp
<
InspectionDetailRespVO
>
detail
(
@PathVariable
(
"recordId"
)
@Parameter
(
description
=
"检测记录id"
,
required
=
true
)
Long
recordId
)
{
return
BaseResp
.
success
(
InspectionDetailRespVO
.
builder
().
build
(),
"检测详情"
);
return
BaseResp
.
success
(
inspectionRecordService
.
getInspectionDetail
(
recordId
),
"检测详情"
);
}
}
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