Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
d459b297
Commit
d459b297
authored
Dec 31, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):bug处理
1.大编辑履历没将充装介质转义
parent
6b6fbf80
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
3 deletions
+51
-3
FieldDisplayDefine.java
...n/amos/boot/biz/common/annotation/FieldDisplayDefine.java
+39
-0
TechParamsVesselChangeFieldDto.java
...oot/module/jg/api/dto/TechParamsVesselChangeFieldDto.java
+1
-1
FormatService.java
...os/boot/module/jg/biz/edit/typeHandler/FormatService.java
+9
-1
PlatformDictTypeHandler.java
...dule/jg/biz/edit/typeHandler/PlatformDictTypeHandler.java
+2
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/annotation/FieldDisplayDefine.java
View file @
d459b297
...
...
@@ -10,6 +10,7 @@ import java.lang.annotation.*;
public
@interface
FieldDisplayDefine
{
String
value
();
/**
* 字段别名 兼容前端使用
*
...
...
@@ -21,15 +22,53 @@ public @interface FieldDisplayDefine {
String
format
()
default
"yyyy-MM-dd"
;
/**
* 是否是数据库字典
*
* @return 是否
*/
boolean
isExist
()
default
true
;
/**
* 处理器bean 名称
*
* @return bean 名称唯一
*/
String
typeHandler
()
default
"defaultTypeHandler"
;
/**
* 字典 key
*
* @return 字典key
*/
String
dictCode
()
default
""
;
/**
* 字典类型
*
* @return 平台字典、还是业务字典
*/
DictType
dictType
()
default
DictType
.
no
;
/**
* 是否冗余字段,如行政区划名称,冗余时则该字段不再记录变更日志
*
* @return 是否冗余
*/
boolean
isRepeatColumn
()
default
false
;
enum
DictType
{
/**
* 业务字典
*/
cb
,
/**
* 平台字典
*/
platform
,
/**
* 非字典
*/
no
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/TechParamsVesselChangeFieldDto.java
View file @
d459b297
...
...
@@ -36,7 +36,7 @@ public class TechParamsVesselChangeFieldDto extends BaseTechParamsFieldDto {
@FieldDisplayDefine
(
value
=
"总容积"
)
private
String
totalVolume
;
@FieldDisplayDefine
(
value
=
"充装介质"
,
dictCode
=
"
CZJZ"
)
@FieldDisplayDefine
(
value
=
"充装介质"
,
dictCode
=
"
FILLING_MEDIUM"
,
dictType
=
FieldDisplayDefine
.
DictType
.
platform
)
private
String
chargingMedium
;
@FieldDisplayDefine
(
value
=
"规格"
)
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/typeHandler/FormatService.java
View file @
d459b297
...
...
@@ -21,6 +21,8 @@ public class FormatService {
private
final
CbDataDictTypeHandler
dataDictTypeHandler
;
private
final
PlatformDictTypeHandler
platformDictTypeHandler
;
private
final
Map
<
String
,
TypeHandler
<
String
>>
handlerCache
=
new
ConcurrentHashMap
<>();
@Value
(
"${type-handler.default:defaultTypeHandler}"
)
...
...
@@ -28,9 +30,15 @@ public class FormatService {
public
String
format
(
FieldDisplayDefine
displayDefine
,
String
value
)
{
// 字典优先
if
(
StringUtils
.
isNotEmpty
(
displayDefine
.
dictCode
()))
{
// 1.1兼容之前的业务字典,有字典配置时默认是业务字典
if
(
StringUtils
.
isNotEmpty
(
displayDefine
.
dictCode
())
&&
(
displayDefine
.
dictType
().
equals
(
FieldDisplayDefine
.
DictType
.
no
)
||
displayDefine
.
dictType
().
equals
(
FieldDisplayDefine
.
DictType
.
cb
))){
return
dataDictTypeHandler
.
handle
(
displayDefine
.
dictCode
(),
value
);
}
// 1.2平台字典
if
(
StringUtils
.
isNotEmpty
(
displayDefine
.
dictCode
())
&&
displayDefine
.
dictType
().
equals
(
FieldDisplayDefine
.
DictType
.
platform
)){
return
platformDictTypeHandler
.
handle
(
displayDefine
.
dictCode
(),
value
);
}
// 其次是自定义的处理器
try
{
TypeHandler
<
String
>
handler
=
handlerCache
.
computeIfAbsent
(
displayDefine
.
typeHandler
(),
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/typeHandler/PlatformDictTypeHandler.java
View file @
d459b297
...
...
@@ -28,7 +28,8 @@ public class PlatformDictTypeHandler implements DictTypeHandler {
if
(
StringUtils
.
isEmpty
(
dictCode
)){
return
null
;
}
return
cache
.
computeIfAbsent
(
dictCode
,
k
->
{
String
key
=
dictType
+
"_"
+
dictCode
;
return
cache
.
computeIfAbsent
(
key
,
k
->
{
try
{
List
<
DictionarieValueModel
>
result
=
Systemctl
.
dictionarieClient
.
dictValues
(
dictType
).
getResult
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment