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
cbb9f187
Commit
cbb9f187
authored
Jun 10, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础信息接口
parent
b5db5ef9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
520 additions
and
168 deletions
+520
-168
DataDictionaryController.java
...t/module/jcs/biz/controller/DataDictionaryController.java
+137
-0
FireTeamController.java
...os/boot/module/jcs/biz/controller/FireTeamController.java
+60
-7
FirefightersContractController.java
...le/jcs/biz/controller/FirefightersContractController.java
+27
-8
FirefightersController.java
...oot/module/jcs/biz/controller/FirefightersController.java
+103
-15
FirefightersJacketController.java
...dule/jcs/biz/controller/FirefightersJacketController.java
+120
-109
FirefightersPostController.java
...module/jcs/biz/controller/FirefightersPostController.java
+43
-13
FirefightersThoughtController.java
...ule/jcs/biz/controller/FirefightersThoughtController.java
+28
-15
UserController.java
...n/amos/boot/module/jcs/biz/controller/UserController.java
+2
-1
No files found.
amos-boot-biz-common/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
0 → 100644
View file @
cbb9f187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IDataDictionaryService
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
java.util.Arrays
;
/**
* 数据字典
*
* @author tb
* @date 2021-06-07
*/
@RestController
@Api
(
tags
=
"数据字典Api"
)
@RequestMapping
(
value
=
"/jcs/data-dictionary"
)
public
class
DataDictionaryController
extends
BaseController
{
@Autowired
IDataDictionaryService
iDataDictionaryService
;
/**
* 新增数据字典
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增数据字典"
,
notes
=
"新增数据字典"
)
public
boolean
saveDataDictionary
(
HttpServletRequest
request
,
@RequestBody
DataDictionary
dataDictionary
){
return
iDataDictionaryService
.
save
(
dataDictionary
);
}
/**
* 根据id删除
* @param id
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iDataDictionaryService
.
removeById
(
id
);
}
/**
* 修改数据字典
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改数据字典"
,
notes
=
"修改数据字典"
)
public
boolean
updateByIdDataDictionary
(
HttpServletRequest
request
,
@RequestBody
DataDictionary
dataDictionary
){
return
iDataDictionaryService
.
updateById
(
dataDictionary
);
}
/**
* 根据id查询
* @param id
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
DataDictionary
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iDataDictionaryService
.
getById
(
id
);
}
/**
* 列表分页查询
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
DataDictionary
>
listPage
(
String
pageNum
,
String
pageSize
,
DataDictionary
dataDictionary
){
Page
<
DataDictionary
>
pageBean
;
QueryWrapper
<
DataDictionary
>
dataDictionaryQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
DataDictionary
>
aClass
=
dataDictionary
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
field
.
setAccessible
(
true
);
Object
o
=
field
.
get
(
dataDictionary
);
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
if
(
type
.
equals
(
Integer
.
class
))
{
Integer
fileValue
=
(
Integer
)
field
.
get
(
dataDictionary
);
dataDictionaryQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
dataDictionary
);
dataDictionaryQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
dataDictionary
);
dataDictionaryQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
dataDictionary
);
dataDictionaryQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
catch
(
Exception
e
)
{
}
});
IPage
<
DataDictionary
>
page
;
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
else
{
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
page
=
iDataDictionaryService
.
page
(
pageBean
,
dataDictionaryQueryWrapper
);
return
page
;
}
}
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 @
cbb9f187
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.RestController
;
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.vo.FireTeamListVo
;
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.update.UpdateWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.springframework.web.bind.annotation.*
;
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.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.NameUtils
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -54,8 +67,9 @@ public class FireTeamController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iFireTeamService
.
removeById
(
id
);
public
ResponseModel
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
iFireTeamService
.
update
(
new
UpdateWrapper
<
FireTeam
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"is_delete"
,
1
));
return
CommonResponseUtil
.
success
();
}
...
...
@@ -68,8 +82,10 @@ public class FireTeamController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改消防队伍"
,
notes
=
"修改消防队伍"
)
public
boolean
updateByIdFireTeam
(
HttpServletRequest
request
,
@RequestBody
FireTeam
fireTeam
){
return
iFireTeamService
.
updateById
(
fireTeam
);
public
ResponseModel
updateByIdFireTeam
(
HttpServletRequest
request
,
@RequestBody
FireTeam
fireTeam
){
boolean
flag
=
iFireTeamService
.
updateById
(
fireTeam
);
return
CommonResponseUtil
.
success
();
}
...
...
@@ -88,6 +104,43 @@ public class FireTeamController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getList"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新列表分页查询"
,
notes
=
"新表分页查询"
)
public
ResponseModel
getFirefighters
(
Integer
pageNum
,
Integer
pageSize
,
FireTeamListVo
fireTeamList
){
//条件分页
List
<
FireTeamVo
>
list
=
iFireTeamService
.
getFireTeam
(
pageNum
,
pageSize
,
fireTeamList
);
Map
<
String
,
Long
>
num
=
iFireTeamService
.
getFireTeamCount
(
pageNum
,
pageSize
,
fireTeamList
);
Page
<
FireTeamVo
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
,
num
.
get
(
"num"
));
pageBean
.
setRecords
(
list
);
return
CommonResponseUtil
.
success
(
pageBean
);
}
/**
* 列表分页查询
* @return
* @throws Exception
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/listTree"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"队伍树"
,
notes
=
"队伍树"
)
public
ResponseModel
listTree
()
throws
Exception
{
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
columnMap
.
put
(
"is_delete"
,
0
);
Collection
<
FireTeam
>
list
=
iFireTeamService
.
listByMap
(
columnMap
);
FireTeam
ll
=
new
FireTeam
();
//List<Menu> menus=TreeParser.getTree(null,list);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
FireTeam
.
class
.
getName
(),
"getSequenceNbr"
,
3
,
"getName"
,
"getParent"
);
return
CommonResponseUtil
.
success
(
menus
);
}
/**
* 列表分页查询
* @return
...
...
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 @
cbb9f187
...
...
@@ -15,8 +15,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersContract
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersThought
;
import
com.yeejoin.amos.boot.biz.common.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
java.util.Arrays
;
...
...
@@ -42,8 +45,13 @@ public class FirefightersContractController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增消防员合同"
,
notes
=
"新增消防员合同"
)
public
boolean
saveFirefightersContract
(
HttpServletRequest
request
,
@RequestBody
FirefightersContract
firefightersContract
){
return
iFirefightersContractService
.
save
(
firefightersContract
);
public
ResponseModel
saveFirefightersContract
(
HttpServletRequest
request
,
@RequestBody
FirefightersContract
firefightersContract
){
boolean
flag
=
iFirefightersContractService
.
save
(
firefightersContract
);
return
CommonResponseUtil
.
success
(
firefightersContract
);
}
/**
...
...
@@ -54,8 +62,9 @@ public class FirefightersContractController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iFirefightersContractService
.
removeById
(
id
);
public
ResponseModel
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
boolean
flag
=
iFirefightersContractService
.
removeById
(
id
);
return
CommonResponseUtil
.
success
();
}
...
...
@@ -68,8 +77,13 @@ public class FirefightersContractController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改消防员合同"
,
notes
=
"修改消防员合同"
)
public
boolean
updateByIdFirefightersContract
(
HttpServletRequest
request
,
@RequestBody
FirefightersContract
firefightersContract
){
return
iFirefightersContractService
.
updateById
(
firefightersContract
);
public
ResponseModel
updateByIdFirefightersContract
(
HttpServletRequest
request
,
@RequestBody
FirefightersContract
firefightersContract
){
boolean
flag
=
iFirefightersContractService
.
updateById
(
firefightersContract
);
if
(
flag
)
{
return
CommonResponseUtil
.
success
(
firefightersContract
);
}
return
CommonResponseUtil
.
failure
(
"修改失败!"
);
}
...
...
@@ -82,8 +96,13 @@ public class FirefightersContractController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
FirefightersContract
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iFirefightersContractService
.
getById
(
id
);
public
ResponseModel
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
@SuppressWarnings
(
"rawtypes"
)
QueryWrapper
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"firefightersId"
,
id
);
FirefightersContract
firefightersContract
=
iFirefightersContractService
.
getOne
(
queryWrapper
);
return
CommonResponseUtil
.
success
(
firefightersContract
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersController.java
View file @
cbb9f187
This diff is collapsed.
Click to expand it.
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 @
cbb9f187
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersPostController.java
View file @
cbb9f187
...
...
@@ -5,18 +5,27 @@ import io.swagger.annotations.Api;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersContactsService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersEducationService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersPostService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersWorkexperienceService
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.FirefightersData
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletRequest
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersContacts
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersEducation
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersPost
;
import
com.yeejoin.amos.boot.biz.common.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
java.util.Arrays
;
...
...
@@ -34,7 +43,12 @@ public class FirefightersPostController extends BaseController {
@Autowired
IFirefightersPostService
iFirefightersPostService
;
@Autowired
IFirefightersContactsService
ifirefightersContactsService
;
@Autowired
IFirefightersEducationService
ifirefightersEducationService
;
@Autowired
IFirefightersWorkexperienceService
ifirefightersWorkexperienceService
;
/**
* 新增岗位信息
* @return
...
...
@@ -42,9 +56,14 @@ public class FirefightersPostController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增岗位信息"
,
notes
=
"新增岗位信息"
)
public
boolean
saveFirefightersPost
(
HttpServletRequest
request
,
@RequestBody
FirefightersPost
firefightersPost
){
return
iFirefightersPostService
.
save
(
firefightersPost
);
}
@Transactional
public
ResponseModel
saveFirefightersPost
(
HttpServletRequest
request
,
@RequestBody
FirefightersData
firefightersData
){
iFirefightersPostService
.
save
(
firefightersData
.
getFirefightersPost
());
ifirefightersWorkexperienceService
.
save
(
firefightersData
.
getFirefightersWorkexperience
());
ifirefightersEducationService
.
save
(
firefightersData
.
getFirefightersEducation
())
;
return
CommonResponseUtil
.
success
();
}
/**
* 根据id删除
...
...
@@ -53,7 +72,7 @@ public class FirefightersPostController extends BaseController {
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据
id删除"
)
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iFirefightersPostService
.
removeById
(
id
);
}
...
...
@@ -68,8 +87,13 @@ public class FirefightersPostController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改岗位信息"
,
notes
=
"修改岗位信息"
)
public
boolean
updateByIdFirefightersPost
(
HttpServletRequest
request
,
@RequestBody
FirefightersPost
firefightersPost
){
return
iFirefightersPostService
.
updateById
(
firefightersPost
);
public
ResponseModel
updateByIdFirefightersPost
(
HttpServletRequest
request
,
@RequestBody
FirefightersData
firefightersData
){
iFirefightersPostService
.
updateById
(
firefightersData
.
getFirefightersPost
());
ifirefightersWorkexperienceService
.
updateById
(
firefightersData
.
getFirefightersWorkexperience
());
ifirefightersEducationService
.
updateById
(
firefightersData
.
getFirefightersEducation
());
return
CommonResponseUtil
.
success
();
}
...
...
@@ -79,11 +103,17 @@ public class FirefightersPostController extends BaseController {
* @param id
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@SuppressWarnings
(
"unchecked"
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
FirefightersPost
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iFirefightersPostService
.
getById
(
id
);
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据消防员id查询"
,
notes
=
"根据消防员id查询"
)
public
ResponseModel
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
@SuppressWarnings
(
"rawtypes"
)
QueryWrapper
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"firefighters_id"
,
id
);
FirefightersData
firefightersData
=
new
FirefightersData
(
ifirefightersWorkexperienceService
.
getOne
(
queryWrapper
),
ifirefightersEducationService
.
getOne
(
queryWrapper
),
iFirefightersPostService
.
getOne
(
queryWrapper
));
return
CommonResponseUtil
.
success
(
firefightersData
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersThoughtController.java
View file @
cbb9f187
...
...
@@ -15,8 +15,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersThought
;
import
com.yeejoin.amos.boot.biz.common.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
java.util.Arrays
;
...
...
@@ -42,8 +44,10 @@ public class FirefightersThoughtController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增消防员思想谈话记录"
,
notes
=
"新增消防员思想谈话记录"
)
public
boolean
saveFirefightersThought
(
HttpServletRequest
request
,
@RequestBody
FirefightersThought
firefightersThought
){
return
iFirefightersThoughtService
.
save
(
firefightersThought
);
public
ResponseModel
saveFirefightersThought
(
HttpServletRequest
request
,
@RequestBody
FirefightersThought
firefightersThought
){
boolean
flag
=
iFirefightersThoughtService
.
save
(
firefightersThought
);
return
CommonResponseUtil
.
success
(
firefightersThought
);
}
/**
...
...
@@ -54,22 +58,25 @@ public class FirefightersThoughtController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iFirefightersThoughtService
.
removeById
(
id
);
public
ResponseModel
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
boolean
flag
=
iFirefightersThoughtService
.
removeById
(
id
);
return
CommonResponseUtil
.
success
();
}
/**
* 修改消防员思想谈话记录
/** 修改消防员思想谈话记录
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改消防员思想谈话记录"
,
notes
=
"修改消防员思想谈话记录"
)
public
boolean
updateByIdFirefightersThought
(
HttpServletRequest
request
,
@RequestBody
FirefightersThought
firefightersThought
){
return
iFirefightersThoughtService
.
updateById
(
firefightersThought
);
public
ResponseModel
updateByIdFirefightersThought
(
HttpServletRequest
request
,
@RequestBody
FirefightersThought
firefightersThought
){
boolean
flag
=
iFirefightersThoughtService
.
updateById
(
firefightersThought
);
return
CommonResponseUtil
.
success
(
firefightersThought
);
}
...
...
@@ -79,11 +86,17 @@ public class FirefightersThoughtController extends BaseController {
* @param id
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@SuppressWarnings
(
"unchecked"
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
FirefightersThought
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iFirefightersThoughtService
.
getById
(
id
);
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据消防员id查询"
,
notes
=
"根据消防员id查询"
)
public
ResponseModel
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
@SuppressWarnings
(
"rawtypes"
)
QueryWrapper
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"firefighters_id"
,
id
);
FirefightersThought
firefightersThought
=
iFirefightersThoughtService
.
getOne
(
queryWrapper
);
return
CommonResponseUtil
.
success
(
firefightersThought
);
}
...
...
@@ -95,7 +108,7 @@ public class FirefightersThoughtController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
FirefightersThought
>
listPage
(
String
pageNum
,
String
pageSize
,
FirefightersThought
firefightersThought
){
public
ResponseModel
listPage
(
String
pageNum
,
String
pageSize
,
FirefightersThought
firefightersThought
){
Page
<
FirefightersThought
>
pageBean
;
QueryWrapper
<
FirefightersThought
>
firefightersThoughtQueryWrapper
=
new
QueryWrapper
<>();
...
...
@@ -131,7 +144,7 @@ public class FirefightersThoughtController extends BaseController {
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
page
=
iFirefightersThoughtService
.
page
(
pageBean
,
firefightersThoughtQueryWrapper
);
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 @
cbb9f187
...
...
@@ -198,6 +198,8 @@ public class UserController extends BaseController {
reginParams
.
setRole
(
role
);
reginParams
.
setDepartment
(
department
);
saveSelectedOrgInfo
(
reginParams
);
//保存用户信息
saveUser
(
user
);
return
buildCurCompany
(
selectUserInfo
,
user
);
}
catch
(
Exception
e
)
{
...
...
@@ -206,7 +208,6 @@ public class UserController extends BaseController {
throw
new
RuntimeException
(
"系统繁忙,请稍后再试"
);
}
}
private
JSONObject
buildCurCompany
(
ReginParams
selectUserInfo
,
AgencyUserModel
user
)
{
JSONObject
result
=
new
JSONObject
();
result
.
put
(
"userId"
,
user
.
getUserId
());
...
...
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