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
dacdd34f
Commit
dacdd34f
authored
Jun 29, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加数据字典批量查询
parent
17e203b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
DataDictionaryController.java
...t/module/jcs/biz/controller/DataDictionaryController.java
+49
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/DataDictionaryController.java
View file @
dacdd34f
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.*
;
import
com.yeejoin.amos.boot.biz.common.utils.*
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.DataDictionary
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.DataDictionary
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.AlertFormVo
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataDictionaryServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -20,8 +21,11 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...
@@ -20,8 +21,11 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -162,5 +166,50 @@ public class DataDictionaryController extends BaseController {
...
@@ -162,5 +166,50 @@ public class DataDictionaryController extends BaseController {
return
ResponseHelper
.
buildResponse
(
menus
);
return
ResponseHelper
.
buildResponse
(
menus
);
}
}
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/form/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据表态类型多个code查询表单数据项"
,
notes
=
"根据表态类型多个code查询表单数据项"
)
public
ResponseModel
<
Object
>
selectFormdListItem
(
HttpServletRequest
request
,
String
types
){
HashMap
<
Object
,
Object
>
objectObjectHashMap
=
new
HashMap
<>();
try
{
String
[]
typest
=
types
.
split
(
","
);
for
(
String
type
:
typest
)
{
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"type"
,
type
);
queryWrapper
.
orderByAsc
(
"sort_num"
);
if
(
redisUtils
.
hasKey
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
)){
Object
obj
=
redisUtils
.
get
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
);
objectObjectHashMap
.
put
(
type
,
obj
);
}
else
{
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
List
<
Menu
>
menus
=
null
;
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
);
redisUtils
.
set
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
,
JSON
.
toJSON
(
menus
),
time
);
objectObjectHashMap
.
put
(
type
,
menus
);
}
}
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常!"
);
}
return
ResponseHelper
.
buildResponse
(
objectObjectHashMap
);
}
}
}
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