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
72d8cea6
Commit
72d8cea6
authored
Jun 10, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
42d80bf0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
29 deletions
+37
-29
Menu.java
...ain/java/com/yeejoin/amos/boot/biz/common/utils/Menu.java
+9
-2
TreeParser.java
...va/com/yeejoin/amos/boot/biz/common/utils/TreeParser.java
+11
-8
DataDictionaryController.java
...t/module/jcs/biz/controller/DataDictionaryController.java
+5
-9
FireTeamController.java
...os/boot/module/jcs/biz/controller/FireTeamController.java
+3
-6
FirefightersContractController.java
...le/jcs/biz/controller/FirefightersContractController.java
+2
-2
FirefightersJacketController.java
...dule/jcs/biz/controller/FirefightersJacketController.java
+4
-2
UserController.java
...n/amos/boot/module/jcs/biz/controller/UserController.java
+3
-0
No files found.
amos-boot-
module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/vo
/Menu.java
→
amos-boot-
biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils
/Menu.java
View file @
72d8cea6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
vo
;
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
;
import
java.util.List
;
import
java.util.List
;
/**
* * 生成树返回对象
* @return
* <PRE>
* author tw
* date 2021/6/10
* </PRE>
*/
public
class
Menu
{
public
class
Menu
{
public
Long
id
;
public
Long
id
;
public
String
name
;
public
String
name
;
...
...
amos-boot-
module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/vo
/TreeParser.java
→
amos-boot-
biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils
/TreeParser.java
View file @
72d8cea6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
vo
;
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
;
import
java.lang.reflect.InvocationTargetException
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.List
;
/**
import
com.yeejoin.amos.boot.module.jcs.api.entity.DataDictionary
;
* 生成树工具类
import
com.yeejoin.amos.boot.module.jcs.api.entity.FireTeam
;
* @return
* <PRE>
* author tw
* date 2021/6/10
* </PRE>
*/
public
class
TreeParser
{
public
class
TreeParser
{
// /**
// /**
// * 解析树形数据
// * 解析树形数据
...
@@ -72,7 +75,7 @@ public class TreeParser{
...
@@ -72,7 +75,7 @@ public class TreeParser{
/*
/*
*
* @param topId 父id
* @param topId 父id
* @param entityList 数据集合
* @param entityList 数据集合
* @param packageURL 集合对象包名+类名
* @param packageURL 集合对象包名+类名
...
@@ -99,7 +102,7 @@ public class TreeParser{
...
@@ -99,7 +102,7 @@ public class TreeParser{
break
;
break
;
case
3
:
case
3
:
IDMethodNameme
=
clazz
.
getSuperclass
().
getSuperclass
().
getDeclaredMethod
(
IDMethodName
);
IDMethodNameme
=
clazz
.
getSuperclass
().
getSuperclass
().
getDeclaredMethod
(
IDMethodName
);
break
;
break
;
default
:
default
:
IDMethodNameme
=
clazz
.
getDeclaredMethod
(
IDMethodName
);
IDMethodNameme
=
clazz
.
getDeclaredMethod
(
IDMethodName
);
break
;
break
;
...
...
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 @
72d8cea6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -6,8 +8,6 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -6,8 +8,6 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IDataDictionaryService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IDataDictionaryService
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.Menu
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.TreeParser
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -15,17 +15,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -15,17 +15,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.entity.FireTeam
;
import
com.yeejoin.amos.boot.biz.common.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
...
@@ -148,7 +144,7 @@ public class DataDictionaryController extends BaseController {
...
@@ -148,7 +144,7 @@ public class DataDictionaryController extends BaseController {
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
columnMap
.
put
(
"type"
,
type
);
columnMap
.
put
(
"type"
,
type
);
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
listByMap
(
columnMap
);
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
listByMap
(
columnMap
);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
);
return
CommonResponseUtil
.
success
(
menus
);
return
CommonResponseUtil
.
success
(
menus
);
}
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FireTeamController.java
View file @
72d8cea6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -8,9 +10,6 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
...
@@ -8,9 +10,6 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.module.jcs.api.service.IFireTeamService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IFireTeamService
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FireTeamListVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FireTeamListVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FireTeamVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FireTeamVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FirefightersListVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.Menu
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.TreeParser
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
...
@@ -20,8 +19,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -20,8 +19,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Firefighters
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersJacket
;
import
com.yeejoin.amos.boot.biz.common.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
@@ -131,7 +128,7 @@ public class FireTeamController extends BaseController {
...
@@ -131,7 +128,7 @@ public class FireTeamController extends BaseController {
Collection
<
FireTeam
>
list
=
iFireTeamService
.
listByMap
(
columnMap
);
Collection
<
FireTeam
>
list
=
iFireTeamService
.
listByMap
(
columnMap
);
FireTeam
ll
=
new
FireTeam
();
FireTeam
ll
=
new
FireTeam
();
//List<Menu> menus=TreeParser.getTree(null,list);
//List<Menu> menus=TreeParser.getTree(null,list);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
FireTeam
.
class
.
getName
(),
"getSequenceNbr"
,
3
,
"getName"
,
"getParent"
);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
FireTeam
.
class
.
getName
(),
"getSequenceNbr"
,
3
,
"getName"
,
"getParent"
);
return
CommonResponseUtil
.
success
(
menus
);
return
CommonResponseUtil
.
success
(
menus
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersContractController.java
View file @
72d8cea6
...
@@ -114,7 +114,7 @@ public class FirefightersContractController extends BaseController {
...
@@ -114,7 +114,7 @@ public class FirefightersContractController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
FirefightersContract
>
listPage
(
String
pageNum
,
String
pageSize
,
FirefightersContract
firefightersContract
){
public
ResponseModel
listPage
(
String
pageNum
,
String
pageSize
,
FirefightersContract
firefightersContract
){
Page
<
FirefightersContract
>
pageBean
;
Page
<
FirefightersContract
>
pageBean
;
QueryWrapper
<
FirefightersContract
>
firefightersContractQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
FirefightersContract
>
firefightersContractQueryWrapper
=
new
QueryWrapper
<>();
...
@@ -150,7 +150,7 @@ public class FirefightersContractController extends BaseController {
...
@@ -150,7 +150,7 @@ public class FirefightersContractController extends BaseController {
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
}
page
=
iFirefightersContractService
.
page
(
pageBean
,
firefightersContractQueryWrapper
);
page
=
iFirefightersContractService
.
page
(
pageBean
,
firefightersContractQueryWrapper
);
return
page
;
return
CommonResponseUtil
.
success
(
page
);
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersJacketController.java
View file @
72d8cea6
...
@@ -107,7 +107,7 @@ public class FirefightersJacketController extends BaseController {
...
@@ -107,7 +107,7 @@ public class FirefightersJacketController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
FirefightersJacket
>
listPage
(
String
pageNum
,
String
pageSize
,
FirefightersJacket
firefightersJacket
)
{
public
ResponseModel
listPage
(
String
pageNum
,
String
pageSize
,
FirefightersJacket
firefightersJacket
)
{
Page
<
FirefightersJacket
>
pageBean
;
Page
<
FirefightersJacket
>
pageBean
;
QueryWrapper
<
FirefightersJacket
>
firefightersJacketQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
FirefightersJacket
>
firefightersJacketQueryWrapper
=
new
QueryWrapper
<>();
...
@@ -143,6 +143,8 @@ public class FirefightersJacketController extends BaseController {
...
@@ -143,6 +143,8 @@ public class FirefightersJacketController extends BaseController {
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
}
page
=
iFirefightersJacketService
.
page
(
pageBean
,
firefightersJacketQueryWrapper
);
page
=
iFirefightersJacketService
.
page
(
pageBean
,
firefightersJacketQueryWrapper
);
return
page
;
return
CommonResponseUtil
.
success
(
page
);
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/UserController.java
View file @
72d8cea6
...
@@ -46,7 +46,9 @@ import org.springframework.web.bind.annotation.RequestParam;
...
@@ -46,7 +46,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -256,6 +258,7 @@ public class UserController extends BaseController {
...
@@ -256,6 +258,7 @@ public class UserController extends BaseController {
@ApiOperation
(
value
=
"查询指定的字典信息"
,
notes
=
"查询指定的字典信息"
)
@ApiOperation
(
value
=
"查询指定的字典信息"
,
notes
=
"查询指定的字典信息"
)
@GetMapping
(
value
=
"listDictionaryByDictCode/{dictCode}"
)
@GetMapping
(
value
=
"listDictionaryByDictCode/{dictCode}"
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
public
List
<
DictionarieValueModel
>
listDictionaryByDictCode
(
@PathVariable
String
dictCode
)
{
public
List
<
DictionarieValueModel
>
listDictionaryByDictCode
(
@PathVariable
String
dictCode
)
{
try
{
try
{
List
<
DictionarieValueModel
>
list
=
remoteSecurityService
.
listDictionaryByDictCode
(
dictCode
);
List
<
DictionarieValueModel
>
list
=
remoteSecurityService
.
listDictionaryByDictCode
(
dictCode
);
...
...
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