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
6493ec41
Commit
6493ec41
authored
Jul 25, 2024
by
刘凡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)模板配置表单中的部分API,减少网络请求
parent
34711e95
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
232 additions
and
16 deletions
+232
-16
DPSubServiceImpl.java
...s/boot/module/jyjc/biz/service/impl/DPSubServiceImpl.java
+20
-0
company.json
...boot-module-jyjc-biz/src/main/resources/json/company.json
+11
-1
equip_1000.json
...t-module-jyjc-biz/src/main/resources/json/equip_1000.json
+30
-2
equip_2000.json
...t-module-jyjc-biz/src/main/resources/json/equip_2000.json
+34
-2
equip_3000.json
...t-module-jyjc-biz/src/main/resources/json/equip_3000.json
+30
-2
equip_4000.json
...t-module-jyjc-biz/src/main/resources/json/equip_4000.json
+26
-2
equip_5000.json
...t-module-jyjc-biz/src/main/resources/json/equip_5000.json
+22
-2
equip_6000.json
...t-module-jyjc-biz/src/main/resources/json/equip_6000.json
+15
-1
equip_8000.json
...t-module-jyjc-biz/src/main/resources/json/equip_8000.json
+22
-2
equip_9000.json
...t-module-jyjc-biz/src/main/resources/json/equip_9000.json
+22
-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/DPSubServiceImpl.java
View file @
6493ec41
...
@@ -3,6 +3,9 @@ package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
...
@@ -3,6 +3,9 @@ package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util.DpSubUtils
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util.DpSubUtils
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util.JsonValueUtils
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util.JsonValueUtils
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util.RestTemplateUtils
;
import
com.yeejoin.amos.boot.module.jyjc.biz.util.RestTemplateUtils
;
...
@@ -47,6 +50,9 @@ public class DPSubServiceImpl {
...
@@ -47,6 +50,9 @@ public class DPSubServiceImpl {
@LoadBalanced
@LoadBalanced
private
RestTemplate
restTemplate
;
private
RestTemplate
restTemplate
;
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
public
JSONObject
commonQuery
(
String
template
,
@RequestBody
Map
<
String
,
Object
>
param
)
{
public
JSONObject
commonQuery
(
String
template
,
@RequestBody
Map
<
String
,
Object
>
param
)
{
JSONObject
result
=
new
JSONObject
();
JSONObject
result
=
new
JSONObject
();
String
templateJson
=
DpSubUtils
.
getFileContent
(
template
+
".json"
);
String
templateJson
=
DpSubUtils
.
getFileContent
(
template
+
".json"
);
...
@@ -378,11 +384,25 @@ public class DPSubServiceImpl {
...
@@ -378,11 +384,25 @@ public class DPSubServiceImpl {
Object
value
=
apiResult
.
get
(
fieldKey
);
Object
value
=
apiResult
.
get
(
fieldKey
);
Object
paramFieldKeys
=
JsonValueUtils
.
getValueByKey
(
tab
,
"dataConfig"
,
"dataConfig.paramFieldKeys"
);
Object
paramFieldKeys
=
JsonValueUtils
.
getValueByKey
(
tab
,
"dataConfig"
,
"dataConfig.paramFieldKeys"
);
Object
dictionaryFieldKeys
=
JsonValueUtils
.
getValueByKey
(
tab
,
"dataConfig"
,
"dataConfig.dictionaryFieldKeys"
);
JSONObject
param
=
tab
.
getJSONObject
(
"param"
);
JSONObject
param
=
tab
.
getJSONObject
(
"param"
);
jsonObject
.
put
(
"type"
,
"text"
);
jsonObject
.
put
(
"type"
,
"text"
);
jsonObject
.
put
(
"value"
,
value
);
jsonObject
.
put
(
"value"
,
value
);
if
(!
ValidationUtil
.
isEmpty
(
paramFieldKeys
)
&&
((
JSONArray
)
paramFieldKeys
).
contains
(
fieldKey
)){
if
(!
ValidationUtil
.
isEmpty
(
paramFieldKeys
)
&&
((
JSONArray
)
paramFieldKeys
).
contains
(
fieldKey
)){
jsonObject
.
put
(
"value"
,
param
.
getString
(
fieldKey
));
jsonObject
.
put
(
"value"
,
param
.
getString
(
fieldKey
));
}
else
if
(!
ValidationUtil
.
isEmpty
(
dictionaryFieldKeys
)
&&
((
JSONArray
)
dictionaryFieldKeys
).
stream
().
anyMatch
(
map
->
fieldKey
.
equals
(((
JSONObject
)
map
).
getString
(
"fieldKey"
)))){
((
JSONArray
)
dictionaryFieldKeys
).
stream
().
filter
(
map
->
fieldKey
.
equals
(((
JSONObject
)
map
).
getString
(
"fieldKey"
))).
findFirst
().
ifPresent
(
y
->
{
JSONObject
yObj
=
(
JSONObject
)
y
;
String
dictionaryType
=
yObj
.
getString
(
"dictionaryType"
);
try
{
List
<
DataDictionary
>
dataDictionaryList
=
iDataDictionaryService
.
getByType
(
dictionaryType
);
dataDictionaryList
.
stream
().
filter
(
dataDictionary
->
dataDictionary
.
getCode
().
equals
(
value
)).
findFirst
().
ifPresent
(
map
->
{
jsonObject
.
put
(
"value"
,
map
.
getName
());
});
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
});
}
else
{
}
else
{
if
(
"upload"
.
equals
(
xObj
.
getString
(
"componentKey"
)))
{
if
(
"upload"
.
equals
(
xObj
.
getString
(
"componentKey"
)))
{
JSONArray
attachmentUploadDatas
=
matinfo
.
getJSONArray
(
"datas"
);
JSONArray
attachmentUploadDatas
=
matinfo
.
getJSONArray
(
"datas"
);
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/resources/json/company.json
View file @
6493ec41
...
@@ -14,7 +14,17 @@
...
@@ -14,7 +14,17 @@
"useCode"
:
"{useUnitCode}"
"useCode"
:
"{useUnitCode}"
}
}
},
},
"resultConvert"
:
""
"resultConvert"
:
""
,
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"industrySupervisor"
,
"dictionaryType"
:
"HYZGBM"
},
{
"fieldKey"
:
"registeredOrganCode"
,
"dictionaryType"
:
"DJJG"
}
]
}
}
},
},
{
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/resources/json/equip_1000.json
View file @
6493ec41
...
@@ -17,7 +17,21 @@
...
@@ -17,7 +17,21 @@
"responseSuccess"
:
"data.result.equipInfo"
"responseSuccess"
:
"data.result.equipInfo"
}
}
},
},
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
]
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
],
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"IMPORTED"
,
"dictionaryType"
:
"BOOLEN"
},
{
"fieldKey"
:
"USE_PLACE"
,
"dictionaryType"
:
"ADDRESS"
},
{
"fieldKey"
:
"INSPECT_CONCLUSION"
,
"dictionaryType"
:
"JYJL"
}
]
}
}
},
},
{
{
...
@@ -35,7 +49,21 @@
...
@@ -35,7 +49,21 @@
"ruleData"
:
{
"ruleData"
:
{
"responseSuccess"
:
"data.result.equipParams"
"responseSuccess"
:
"data.result.equipParams"
}
}
}
},
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"DEVICE_LEVEL"
,
"dictionaryType"
:
"GLJB"
},
{
"fieldKey"
:
"FUEL_TYPE"
,
"dictionaryType"
:
"GLZL"
},
{
"fieldKey"
:
"NAME_OF_PRESSURE_PARTS"
,
"dictionaryType"
:
"GLBJMC"
}
]
}
}
},
},
{
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/resources/json/equip_2000.json
View file @
6493ec41
...
@@ -17,7 +17,21 @@
...
@@ -17,7 +17,21 @@
"responseSuccess"
:
"data.result.equipInfo"
"responseSuccess"
:
"data.result.equipInfo"
}
}
},
},
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
]
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
],
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"IMPORTED"
,
"dictionaryType"
:
"BOOLEN"
},
{
"fieldKey"
:
"USE_PLACE"
,
"dictionaryType"
:
"ADDRESS"
},
{
"fieldKey"
:
"INSPECT_CONCLUSION"
,
"dictionaryType"
:
"JYJL"
}
]
}
}
},
},
{
{
...
@@ -35,7 +49,25 @@
...
@@ -35,7 +49,25 @@
"ruleData"
:
{
"ruleData"
:
{
"responseSuccess"
:
"data.result.equipParams"
"responseSuccess"
:
"data.result.equipParams"
}
}
}
},
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"QP_LOSSLESS"
,
"dictionaryType"
:
"RQJCFF"
},
{
"fieldKey"
:
"RQJCFF"
,
"dictionaryType"
:
"RQJCFF"
},
{
"fieldKey"
:
"MAIN_STRUCTURE_TYPE"
,
"dictionaryType"
:
"RQJG"
},
{
"fieldKey"
:
"CHECK_LOSSLESS"
,
"dictionaryType"
:
"RQJCFF"
}
]
}
}
},
},
{
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/resources/json/equip_3000.json
View file @
6493ec41
...
@@ -17,7 +17,21 @@
...
@@ -17,7 +17,21 @@
"responseSuccess"
:
"data.result.equipInfo"
"responseSuccess"
:
"data.result.equipInfo"
}
}
},
},
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
]
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
],
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"IMPORTED"
,
"dictionaryType"
:
"BOOLEN"
},
{
"fieldKey"
:
"USE_PLACE"
,
"dictionaryType"
:
"ADDRESS"
},
{
"fieldKey"
:
"INSPECT_CONCLUSION"
,
"dictionaryType"
:
"JYJL"
}
]
}
}
},
},
{
{
...
@@ -35,7 +49,21 @@
...
@@ -35,7 +49,21 @@
"ruleData"
:
{
"ruleData"
:
{
"responseSuccess"
:
"data.result.equipParams"
"responseSuccess"
:
"data.result.equipParams"
}
}
}
},
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"CONTROL_MODE"
,
"dictionaryType"
:
"KZFS"
},
{
"fieldKey"
:
"EXPLOSIONPROOF_GRADE"
,
"dictionaryType"
:
"FBDJ"
},
{
"fieldKey"
:
"JACKING_TYPE"
,
"dictionaryType"
:
"DSXS"
}
]
}
}
},
},
{
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/resources/json/equip_4000.json
View file @
6493ec41
...
@@ -17,7 +17,21 @@
...
@@ -17,7 +17,21 @@
"responseSuccess"
:
"data.result.equipInfo"
"responseSuccess"
:
"data.result.equipInfo"
}
}
},
},
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
]
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
],
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"IMPORTED"
,
"dictionaryType"
:
"BOOLEN"
},
{
"fieldKey"
:
"USE_PLACE"
,
"dictionaryType"
:
"ADDRESS"
},
{
"fieldKey"
:
"INSPECT_CONCLUSION"
,
"dictionaryType"
:
"JYJL"
}
]
}
}
},
},
{
{
...
@@ -35,7 +49,17 @@
...
@@ -35,7 +49,17 @@
"ruleData"
:
{
"ruleData"
:
{
"responseSuccess"
:
"data.result.equipParams"
"responseSuccess"
:
"data.result.equipParams"
}
}
}
},
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"WORK_LEVEL"
,
"dictionaryType"
:
"GZJB"
},
{
"fieldKey"
:
"select_bq8h7v9tj1"
,
"dictionaryType"
:
"FBDJ"
}
]
}
}
},
},
{
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/resources/json/equip_5000.json
View file @
6493ec41
...
@@ -17,7 +17,21 @@
...
@@ -17,7 +17,21 @@
"responseSuccess"
:
"data.result.equipInfo"
"responseSuccess"
:
"data.result.equipInfo"
}
}
},
},
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
]
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
],
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"IMPORTED"
,
"dictionaryType"
:
"BOOLEN"
},
{
"fieldKey"
:
"USE_PLACE"
,
"dictionaryType"
:
"ADDRESS"
},
{
"fieldKey"
:
"INSPECT_CONCLUSION"
,
"dictionaryType"
:
"JYJL"
}
]
}
}
},
},
{
{
...
@@ -35,7 +49,13 @@
...
@@ -35,7 +49,13 @@
"ruleData"
:
{
"ruleData"
:
{
"responseSuccess"
:
"data.result.equipParams"
"responseSuccess"
:
"data.result.equipParams"
}
}
}
},
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"PROTECT_GRADE"
,
"dictionaryType"
:
"FBDJ"
}
]
}
}
},
},
{
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/resources/json/equip_6000.json
View file @
6493ec41
...
@@ -17,7 +17,21 @@
...
@@ -17,7 +17,21 @@
"responseSuccess"
:
"data.result.equipInfo"
"responseSuccess"
:
"data.result.equipInfo"
}
}
},
},
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
]
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
],
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"IMPORTED"
,
"dictionaryType"
:
"BOOLEN"
},
{
"fieldKey"
:
"USE_PLACE"
,
"dictionaryType"
:
"ADDRESS"
},
{
"fieldKey"
:
"INSPECT_CONCLUSION"
,
"dictionaryType"
:
"JYJL"
}
]
}
}
},
},
{
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/resources/json/equip_8000.json
View file @
6493ec41
...
@@ -17,7 +17,21 @@
...
@@ -17,7 +17,21 @@
"responseSuccess"
:
"data.result.equipInfo"
"responseSuccess"
:
"data.result.equipInfo"
}
}
},
},
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
]
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
],
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"IMPORTED"
,
"dictionaryType"
:
"BOOLEN"
},
{
"fieldKey"
:
"USE_PLACE"
,
"dictionaryType"
:
"ADDRESS"
},
{
"fieldKey"
:
"INSPECT_CONCLUSION"
,
"dictionaryType"
:
"JYJL"
}
]
}
}
},
},
{
{
...
@@ -35,7 +49,13 @@
...
@@ -35,7 +49,13 @@
"ruleData"
:
{
"ruleData"
:
{
"responseSuccess"
:
"data.result.equipParams"
"responseSuccess"
:
"data.result.equipParams"
}
}
}
},
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"GDLB"
,
"dictionaryType"
:
"GDLB"
}
]
}
}
},
},
{
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/resources/json/equip_9000.json
View file @
6493ec41
...
@@ -17,7 +17,21 @@
...
@@ -17,7 +17,21 @@
"responseSuccess"
:
"data.result.equipInfo"
"responseSuccess"
:
"data.result.equipInfo"
}
}
},
},
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
]
"paramFieldKeys"
:
[
"EQU_LIST"
,
"EQU_CATEGORY"
,
"EQU_DEFINE"
],
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"IMPORTED"
,
"dictionaryType"
:
"BOOLEN"
},
{
"fieldKey"
:
"USE_PLACE"
,
"dictionaryType"
:
"ADDRESS"
},
{
"fieldKey"
:
"INSPECT_CONCLUSION"
,
"dictionaryType"
:
"JYJL"
}
]
}
}
},
},
{
{
...
@@ -35,7 +49,13 @@
...
@@ -35,7 +49,13 @@
"ruleData"
:
{
"ruleData"
:
{
"responseSuccess"
:
"data.result.equipParams"
"responseSuccess"
:
"data.result.equipParams"
}
}
}
},
"dictionaryFieldKeys"
:
[
{
"fieldKey"
:
"CARRIER_LINE"
,
"dictionaryType"
:
"YZS"
}
]
}
}
},
},
{
{
...
...
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