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
7ea37e71
Commit
7ea37e71
authored
Apr 07, 2023
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
技术参数新增接口 新增错误提示
parent
889f837d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
TechInfoService.java
...eejoin/amos/api/openapi/face/service/TechInfoService.java
+12
-5
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/TechInfoService.java
View file @
7ea37e71
...
...
@@ -17,20 +17,22 @@ import org.springframework.stereotype.Service;
import
org.springframework.ui.context.support.UiApplicationContextUtils
;
import
org.typroject.tyboot.component.cache.Redis
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
@Service
public
class
TechInfoService
{
public
String
saveTechInfo
(
List
<
JSONObject
>
techInfoList
){
List
<
String
>
failSupervisoryCode
=
new
ArrayList
<>();
for
(
JSONObject
techInfo:
techInfoList
)
{
String
type
=
techInfo
.
getString
(
"type"
);
String
entityClasspath
=
EquipTypeEnum
.
classPathmap
.
get
(
type
);
if
(
ValidationUtil
.
isEmpty
(
entityClasspath
)){
failSupervisoryCode
.
add
(
techInfo
.
getString
(
"type"
)+
":"
+
techInfo
.
getString
(
"supervisoryCode"
));
}
String
serviceClasspath
=
EquipTypeEnum
.
servicePathmap
.
get
(
type
);
try
{
Class
entityClazz
=
Class
.
forName
(
entityClasspath
);
...
...
@@ -42,9 +44,14 @@ public class TechInfoService {
service
.
save
(
entity
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
failSupervisoryCode
.
add
(
techInfo
.
getString
(
"type"
)+
":"
+
techInfo
.
getString
(
"supervisoryCode"
));
}
}
String
result
=
"ok"
;
if
(!
ValidationUtil
.
isEmpty
(
failSupervisoryCode
)){
result
=
"supervisoryCode为"
+
JSON
.
toJSONString
(
failSupervisoryCode
)+
"的参数添加失败,请检查参数。"
;
}
return
"ok"
;
return
result
;
}
...
...
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