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 496981e2
authored
May 11, 2026
by
杨卫
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:检测工单编辑详细日志
1 parent
d93339b0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
4 deletions
aus-core/src/main/java/com/glsx/usedcar/enums/inspect/InteractionTypeEnum.java
aus-core/src/main/java/com/glsx/usedcar/enums/inspect/ResultStatusEnum.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectionEditLogService.java
aus-core/src/main/java/com/glsx/usedcar/enums/inspect/InteractionTypeEnum.java
View file @
496981e
...
@@ -20,8 +20,8 @@ public enum InteractionTypeEnum {
...
@@ -20,8 +20,8 @@ public enum InteractionTypeEnum {
DATE_PICKER
(
"date_picker"
,
"日期选择"
),
DATE_PICKER
(
"date_picker"
,
"日期选择"
),
DROPDOWN
(
"dropdown"
,
"下拉"
),
DROPDOWN
(
"dropdown"
,
"下拉"
),
CASCADE
(
"cascade"
,
"级联选项"
),
CASCADE
(
"cascade"
,
"级联选项"
),
BUTTON_SELECT
(
"button_select"
,
"按钮选择"
),
BUTTON_SELECT
(
"button_select"
,
"按钮选择
(可多选)
"
),
RADIO_BUTTON_SELECT
(
"radio_button_select"
,
"单选按钮
选择
"
),
RADIO_BUTTON_SELECT
(
"radio_button_select"
,
"单选按钮"
),
IMAGE_UPLOAD
(
"image_upload"
,
"图片上传"
),
IMAGE_UPLOAD
(
"image_upload"
,
"图片上传"
),
VIDEO_UPLOAD
(
"video_upload"
,
"视频上传"
),
VIDEO_UPLOAD
(
"video_upload"
,
"视频上传"
),
IMAGE_UPLOAD_AND_BUTTON_SELECT
(
"image_upload_and_button_select"
,
"图片和按钮选择"
),
IMAGE_UPLOAD_AND_BUTTON_SELECT
(
"image_upload_and_button_select"
,
"图片和按钮选择"
),
...
@@ -30,4 +30,13 @@ public enum InteractionTypeEnum {
...
@@ -30,4 +30,13 @@ public enum InteractionTypeEnum {
private
final
String
code
;
private
final
String
code
;
private
final
String
description
;
private
final
String
description
;
public
static
String
getDescriptionByCode
(
String
code
)
{
for
(
InteractionTypeEnum
interactionType
:
InteractionTypeEnum
.
values
())
{
if
(
interactionType
.
getCode
().
equals
(
code
))
{
return
interactionType
.
getDescription
();
}
}
return
null
;
}
}
}
aus-core/src/main/java/com/glsx/usedcar/enums/inspect/ResultStatusEnum.java
0 → 100644
View file @
496981e
package
com
.
glsx
.
usedcar
.
enums
.
inspect
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* 检测结果状态枚举
* @author yangwei
* @version 1.0
* @since 2026/05/11 15:22
*/
@Getter
@AllArgsConstructor
public
enum
ResultStatusEnum
{
/** 结果状态:正常 */
RESULT_STATUS_NORMAL
(
1
,
"正常"
),
/** 结果状态:故障 */
RESULT_STATUS_FAULT
(
2
,
"故障"
),
/** 结果状态:无此结构 */
RESULT_STATUS_NO_STRUCTURE
(
3
,
"无此结构"
);
private
final
int
code
;
private
final
String
message
;
public
static
String
getMessage
(
int
code
)
{
for
(
ResultStatusEnum
item
:
values
())
{
if
(
item
.
code
==
code
)
{
return
item
.
message
;
}
}
return
null
;
}
}
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectionEditLogService.java
View file @
496981e
...
@@ -2,14 +2,18 @@ package com.glsx.usedcar.module.inspect.service;
...
@@ -2,14 +2,18 @@ package com.glsx.usedcar.module.inspect.service;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.lang.func.LambdaUtil
;
import
cn.hutool.core.lang.func.LambdaUtil
;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson2.JSON
;
import
com.alibaba.fastjson2.JSON
;
import
com.glsx.usedcar.consts.common.SymbolConsts
;
import
com.glsx.usedcar.consts.common.SymbolConsts
;
import
com.glsx.usedcar.consts.inspect.InspectConstants
;
import
com.glsx.usedcar.consts.inspect.InspectConstants
;
import
com.glsx.usedcar.enums.common.DeleteFlag
;
import
com.glsx.usedcar.enums.common.DeleteFlag
;
import
com.glsx.usedcar.enums.inspect.InspectionPlatTypeEnum
;
import
com.glsx.usedcar.enums.inspect.InspectionPlatTypeEnum
;
import
com.glsx.usedcar.enums.inspect.InspectionWorkOrderOperationTypeEnum
;
import
com.glsx.usedcar.enums.inspect.InspectionWorkOrderOperationTypeEnum
;
import
com.glsx.usedcar.enums.inspect.InteractionTypeEnum
;
import
com.glsx.usedcar.enums.inspect.ResultStatusEnum
;
import
com.glsx.usedcar.module.inspect.dao.InspectionOpLogItemRepository
;
import
com.glsx.usedcar.module.inspect.dao.InspectionOpLogItemRepository
;
import
com.glsx.usedcar.module.inspect.dao.InspectionOpLogRepository
;
import
com.glsx.usedcar.module.inspect.dao.InspectionOpLogRepository
;
import
com.glsx.usedcar.module.inspect.dao.InspectionResultRepository
;
import
com.glsx.usedcar.module.inspect.dao.InspectionResultRepository
;
...
@@ -37,6 +41,8 @@ import java.util.*;
...
@@ -37,6 +41,8 @@ import java.util.*;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
org
.
apache
.
logging
.
log4j
.
CloseableThreadContext
.
put
;
/**
/**
* 检测编辑操作日志服务
* 检测编辑操作日志服务
* <p>
* <p>
...
@@ -185,8 +191,8 @@ public class InspectionEditLogService {
...
@@ -185,8 +191,8 @@ public class InspectionEditLogService {
+
(
StrUtil
.
isNotBlank
(
triModuleName
)
?
SymbolConsts
.
HYPHEN
+
triModuleName
:
StrUtil
.
EMPTY
);
+
(
StrUtil
.
isNotBlank
(
triModuleName
)
?
SymbolConsts
.
HYPHEN
+
triModuleName
:
StrUtil
.
EMPTY
);
// 序列化为 JSON
// 序列化为 JSON
String
beforeValue
=
oldEntry
!=
null
?
JSON
.
toJSONString
(
toSnapshotVO
(
oldEntry
)
)
:
null
;
String
beforeValue
=
oldEntry
!=
null
?
builderChineseMap
(
oldEntry
)
:
null
;
String
afterValue
=
newEntry
!=
null
?
JSON
.
toJSONString
(
toSnapshotVO
(
newEntry
)
)
:
null
;
String
afterValue
=
newEntry
!=
null
?
builderChineseMap
(
newEntry
)
:
null
;
InspectionOpLogItem
item
=
new
InspectionOpLogItem
();
InspectionOpLogItem
item
=
new
InspectionOpLogItem
();
item
.
setModuleName
(
StrUtil
.
nullToEmpty
(
moduleName
));
item
.
setModuleName
(
StrUtil
.
nullToEmpty
(
moduleName
));
...
@@ -317,6 +323,33 @@ public class InspectionEditLogService {
...
@@ -317,6 +323,33 @@ public class InspectionEditLogService {
}
}
/**
/**
* 构建中文描述的快照条目
* @author yangwei
* @since 2026/5/11 15:20
* @param entry 快照条目
* @return java.lang.String
*/
private
String
builderChineseMap
(
SnapshotEntry
entry
)
{
List
<
HashMap
<
String
,
String
>>
valueList
=
Optional
.
ofNullable
(
entry
.
getValues
())
.
filter
(
CollUtil:
:
isNotEmpty
)
.
map
(
r
->
r
.
stream
().
map
(
value
->
{
HashMap
<
String
,
String
>
valueMap
=
MapUtil
.
newHashMap
(
true
);
valueMap
.
put
(
"值序号"
,
ObjectUtil
.
toString
(
Optional
.
ofNullable
(
value
.
getValueSeq
()).
orElse
(
0
)));
valueMap
.
put
(
"交互类型"
,
Optional
.
ofNullable
(
InteractionTypeEnum
.
getDescriptionByCode
(
value
.
getInteractionType
())).
orElse
(
SymbolConsts
.
HYPHEN
));
valueMap
.
put
(
"值的key"
,
ObjectUtil
.
toString
(
Optional
.
ofNullable
(
value
.
getValueKey
()).
orElse
(
SymbolConsts
.
HYPHEN
)));
valueMap
.
put
(
"值的内容"
,
ObjectUtil
.
toString
(
Optional
.
ofNullable
(
value
.
getValueText
()).
orElse
(
SymbolConsts
.
HYPHEN
)));
return
valueMap
;
}).
toList
())
.
orElseGet
(
ArrayList:
:
new
);
HashMap
<
String
,
Object
>
singleSnapshot
=
MapUtil
.
newHashMap
(
true
);
singleSnapshot
.
put
(
"结果状态"
,
Optional
.
ofNullable
(
ResultStatusEnum
.
getMessage
(
entry
.
getResultStatus
())).
orElse
(
SymbolConsts
.
HYPHEN
));
singleSnapshot
.
put
(
"值列表"
,
valueList
);
return
JSONUtil
.
toJsonStr
(
singleSnapshot
);
}
/**
* 整体对比两个快照条目是否有差异(节点级,非字段级)
* 整体对比两个快照条目是否有差异(节点级,非字段级)
*/
*/
private
boolean
isSnapshotChanged
(
SnapshotEntry
oldEntry
,
SnapshotEntry
newEntry
)
{
private
boolean
isSnapshotChanged
(
SnapshotEntry
oldEntry
,
SnapshotEntry
newEntry
)
{
...
...
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