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
a62e609e
Commit
a62e609e
authored
Nov 24, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jyjc):检验结果
1.检验结果技术参数为空时,转为null,防止字符串转数字报错
parent
495d2f5a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+12
-2
CompareUtils.java
.../yeejoin/amos/boot/module/jyjc/biz/util/CompareUtils.java
+2
-2
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
View file @
a62e609e
...
...
@@ -46,6 +46,7 @@ import com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionDetectionSaveToDbEv
import
com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.BizEmqPublisher
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jyjc.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util.CompareUtils
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util.JsonUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
...
...
@@ -60,7 +61,6 @@ import org.apache.commons.lang3.StringUtils;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.core.io.Resource
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
...
...
@@ -440,7 +440,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
paramObj
.
forEach
((
k
,
v
)
->
{
DynamicColumnDto
columnDto
=
new
DynamicColumnDto
();
columnDto
.
setColumnName
(
String
.
format
(
"\"%s\""
,
StrUtil
.
toUnderlineCase
(
k
).
toUpperCase
()));
columnDto
.
setColumnValue
(
v
==
null
?
null
:
String
.
valueOf
(
v
));
columnDto
.
setColumnValue
(
v
==
null
?
null
:
nullIfNullOrEmpty
(
String
.
valueOf
(
v
)
));
columns
.
add
(
columnDto
);
});
String
tableName
=
this
.
getTableName
(
param
.
getParamType
());
...
...
@@ -449,6 +449,16 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
}
}
/**
* 处理将空转null 防止技术参数,数字类型在查询详情时,映射错误
*
* @param str 字符串
* @return null or 非空的字符串
*/
private
String
nullIfNullOrEmpty
(
String
str
)
{
return
CompareUtils
.
isNullOrEmpty
(
str
)
?
null
:
str
;
}
private
String
getTableName
(
String
paramType
)
{
return
String
.
format
(
"\"%s\""
,
StrUtil
.
toUnderlineCase
(
paramType
));
}
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/util/CompareUtils.java
View file @
a62e609e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
util
;
public
class
CompareUtils
{
public
final
class
CompareUtils
{
public
static
boolean
isNullOrEmpty
(
String
str
)
{
return
str
==
null
||
str
.
trim
().
isEmpty
()
||
"null"
.
equals
(
str
);
return
str
==
null
||
str
.
trim
().
isEmpty
()
||
"null"
.
equals
IgnoreCase
(
str
);
}
}
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