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
599cb792
Commit
599cb792
authored
Aug 20, 2021
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of 172.16.10.76:moa/amos-boot-biz into develop
parents
6630e4a8
d453edfd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
194 additions
and
160 deletions
+194
-160
IOrgUsrService.java
...n/amos/boot/module/common/api/service/IOrgUsrService.java
+1
-1
FirefightersPostController.java
...ule/common/biz/controller/FirefightersPostController.java
+168
-150
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+5
-4
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+10
-5
FireTeamServiceImpl.java
...boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
+10
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IOrgUsrService.java
View file @
599cb792
...
@@ -181,7 +181,7 @@ public interface IOrgUsrService {
...
@@ -181,7 +181,7 @@ public interface IOrgUsrService {
List
<
OrgUsrExcelDto
>
exportToExcel
();
List
<
OrgUsrExcelDto
>
exportToExcel
();
UserUnitDto
getUserUnit
(
String
id
,
String
type
,
String
code
);
UserUnitDto
getUserUnit
(
String
userId
);
/**
/**
* 根据登陆人获取公司部门人员树
* 根据登陆人获取公司部门人员树
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FirefightersPostController.java
View file @
599cb792
...
@@ -16,6 +16,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -16,6 +16,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
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
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -36,163 +37,180 @@ import com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersWorkexpe
...
@@ -36,163 +37,180 @@ import com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersWorkexpe
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
/**
/**
* 岗位信息
* 岗位信息
*
*
* @author tb
* @author tb
* @date 2021-06-07
* @date 2021-06-07
*/
*/
@RestController
@RestController
@Api
(
tags
=
"岗位信息Api"
)
@Api
(
tags
=
"岗位信息Api"
)
@RequestMapping
(
value
=
"/firefighters-post"
)
@RequestMapping
(
value
=
"/firefighters-post"
)
public
class
FirefightersPostController
extends
BaseController
{
public
class
FirefightersPostController
extends
BaseController
{
@Autowired
@Autowired
FirefightersPostServiceImpl
iFirefightersPostService
;
FirefightersPostServiceImpl
iFirefightersPostService
;
@Autowired
@Autowired
FirefightersContactsServiceImpl
ifirefightersContactsService
;
FirefightersContactsServiceImpl
ifirefightersContactsService
;
@Autowired
@Autowired
FirefightersEducationServiceImpl
ifirefightersEducationService
;
FirefightersEducationServiceImpl
ifirefightersEducationService
;
@Autowired
@Autowired
FirefightersWorkexperienceServiceImpl
ifirefightersWorkexperienceService
;
FirefightersWorkexperienceServiceImpl
ifirefightersWorkexperienceService
;
@Autowired
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Value
(
"${redis.cache.failure.time}"
)
@Value
(
"${redis.cache.failure.time}"
)
private
long
time
;
private
long
time
;
/**
* 新增岗位信息
/**
* @return
* 新增岗位信息
*/
*
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
* @return
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增岗位信息"
,
notes
=
"新增岗位信息"
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@Transactional
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
public
ResponseModel
<
Object
>
saveFirefightersPost
(
@RequestBody
FirefightersDataDto
firefightersDataDto
)
{
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增岗位信息"
,
notes
=
"新增岗位信息"
)
try
{
@Transactional
iFirefightersPostService
.
save
(
firefightersDataDto
.
getFirefightersPost
());
public
ResponseModel
<
Object
>
saveFirefightersPost
(
@RequestBody
FirefightersDataDto
firefightersDataDto
)
{
ifirefightersWorkexperienceService
.
save
(
firefightersDataDto
.
getFirefightersWorkexperience
());
try
{
ifirefightersEducationService
.
save
(
firefightersDataDto
.
getFirefightersEducation
());
/*---------修改bug:2179 解決崗位与学历可以重复添加导致的列表页展示消防人员信息呈现多条的情况 on 2021-08-21 陈浩---start*/
return
ResponseHelper
.
buildResponse
(
null
);
LambdaQueryWrapper
<
FirefightersPost
>
queryWrapper
=
new
LambdaQueryWrapper
<
FirefightersPost
>();
}
catch
(
Exception
e
)
{
queryWrapper
.
eq
(
FirefightersPost:
:
getFirefightersId
,
firefightersDataDto
.
getFirefightersPost
().
getFirefightersId
());
FirefightersPost
firefightersPost
=
iFirefightersPostService
.
getOne
(
queryWrapper
);
throw
new
RuntimeException
(
"系统异常"
);
}
if
(
firefightersPost
==
null
)
{
}
iFirefightersPostService
.
save
(
firefightersDataDto
.
getFirefightersPost
());
}
else
{
/**
iFirefightersPostService
.
update
(
firefightersDataDto
.
getFirefightersPost
(),
queryWrapper
);
* 根据id删除
}
* @param id
// iFirefightersPostService.save(firefightersDataDto.getFirefightersPost());
* @return
/*---------修改bug:2179 解決崗位与学历可以重复添加导致的列表页展示消防人员信息呈现多条的情况 on 2021-08-21 陈浩---end*/
*/
ifirefightersWorkexperienceService
.
save
(
firefightersDataDto
.
getFirefightersWorkexperience
());
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
ifirefightersEducationService
.
save
(
firefightersDataDto
.
getFirefightersEducation
());
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
return
ResponseHelper
.
buildResponse
(
null
);
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据消防人员id删除岗位和学历信息"
,
notes
=
"根据 id删除"
)
}
catch
(
Exception
e
)
{
@Transactional
public
ResponseModel
<
Object
>
deleteById
(
@PathVariable
Long
id
){
try
{
iFirefightersPostService
.
update
(
new
UpdateWrapper
<
FirefightersPost
>().
eq
(
"firefighters_id"
,
id
).
set
(
"is_delete"
,
1
));
ifirefightersWorkexperienceService
.
update
(
new
UpdateWrapper
<
FirefightersWorkexperience
>().
eq
(
"firefighters_id"
,
id
).
set
(
"is_delete"
,
1
));
ifirefightersEducationService
.
update
(
new
UpdateWrapper
<
FirefightersEducation
>().
eq
(
"firefighters_id"
,
id
).
set
(
"is_delete"
,
1
));
//删除缓存
redisUtils
.
del
(
RedisKey
.
EDUCATION_POST_EXPERIENCE_FIREFIGHTERS_ID
+
id
);
return
ResponseHelper
.
buildResponse
(
null
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
}
}
/**
* 修改岗位信息
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改岗位信息"
,
notes
=
"修改岗位信息"
)
@Transactional
public
ResponseModel
<
Object
>
updateByIdFirefightersPost
(
@RequestBody
FirefightersDataDto
firefightersDataDto
)
{
try
{
FirefightersPost
firefightersPost
=
firefightersDataDto
.
getFirefightersPost
();
iFirefightersPostService
.
updateById
(
firefightersPost
);
ifirefightersWorkexperienceService
.
updateById
(
firefightersDataDto
.
getFirefightersWorkexperience
());
ifirefightersEducationService
.
updateById
(
firefightersDataDto
.
getFirefightersEducation
());
//删除缓存
redisUtils
.
del
(
RedisKey
.
EDUCATION_POST_EXPERIENCE_FIREFIGHTERS_ID
+
firefightersPost
.
getSequenceNbr
());
return
ResponseHelper
.
buildResponse
(
null
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
}
}
throw
new
RuntimeException
(
"系统异常"
);
}
}
/**
* 根据id删除
*
* @param id
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据消防人员id删除岗位和学历信息"
,
notes
=
"根据 id删除"
)
@Transactional
public
ResponseModel
<
Object
>
deleteById
(
@PathVariable
Long
id
)
{
try
{
iFirefightersPostService
.
update
(
new
UpdateWrapper
<
FirefightersPost
>().
eq
(
"firefighters_id"
,
id
).
set
(
"is_delete"
,
1
));
ifirefightersWorkexperienceService
.
update
(
new
UpdateWrapper
<
FirefightersWorkexperience
>().
eq
(
"firefighters_id"
,
id
).
set
(
"is_delete"
,
1
));
ifirefightersEducationService
.
update
(
new
UpdateWrapper
<
FirefightersEducation
>().
eq
(
"firefighters_id"
,
id
).
set
(
"is_delete"
,
1
));
// 删除缓存
redisUtils
.
del
(
RedisKey
.
EDUCATION_POST_EXPERIENCE_FIREFIGHTERS_ID
+
id
);
return
ResponseHelper
.
buildResponse
(
null
);
}
catch
(
Exception
e
)
{
/**
throw
new
RuntimeException
(
"系统异常"
);
* 根据id查询
}
* @param id
}
* @return
*/
/**
@SuppressWarnings
(
"unchecked"
)
* 修改岗位信息
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据消防员id查询"
,
notes
=
"根据消防员id查询"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改岗位信息"
,
notes
=
"修改岗位信息"
)
public
ResponseModel
<
Object
>
selectById
(
@PathVariable
Long
id
){
@Transactional
@SuppressWarnings
(
"rawtypes"
)
public
ResponseModel
<
Object
>
updateByIdFirefightersPost
(
@RequestBody
FirefightersDataDto
firefightersDataDto
)
{
QueryWrapper
queryWrapper
=
new
QueryWrapper
<>();
try
{
queryWrapper
.
eq
(
"firefighters_id"
,
id
);
FirefightersPost
firefightersPost
=
firefightersDataDto
.
getFirefightersPost
();
FirefightersDataDto
firefightersDataDto
=
new
FirefightersDataDto
(
ifirefightersWorkexperienceService
.
getOne
(
queryWrapper
),
ifirefightersEducationService
.
getOne
(
queryWrapper
),
iFirefightersPostService
.
getOne
(
queryWrapper
));
iFirefightersPostService
.
updateById
(
firefightersPost
);
return
ResponseHelper
.
buildResponse
(
firefightersDataDto
);
ifirefightersWorkexperienceService
.
updateById
(
firefightersDataDto
.
getFirefightersWorkexperience
());
}
ifirefightersEducationService
.
updateById
(
firefightersDataDto
.
getFirefightersEducation
());
// 删除缓存
redisUtils
.
del
(
RedisKey
.
EDUCATION_POST_EXPERIENCE_FIREFIGHTERS_ID
+
firefightersPost
.
getSequenceNbr
());
return
ResponseHelper
.
buildResponse
(
null
);
/**
}
catch
(
Exception
e
)
{
* 列表分页查询
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
FirefightersPost
>
listPage
(
String
pageNum
,
String
pageSize
,
FirefightersPost
firefightersPost
){
Page
<
FirefightersPost
>
pageBean
;
QueryWrapper
<
FirefightersPost
>
firefightersPostQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
FirefightersPost
>
aClass
=
firefightersPost
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
field
.
setAccessible
(
true
);
Object
o
=
field
.
get
(
firefightersPost
);
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
if
(
type
.
equals
(
Integer
.
class
))
{
Integer
fileValue
=
(
Integer
)
field
.
get
(
firefightersPost
);
firefightersPostQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
firefightersPost
);
firefightersPostQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
firefightersPost
);
firefightersPostQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
if
(!
name
.
equals
(
NameUtils
.
camel2Underline
(
"serialVersionUID"
)))
{
String
fileValue
=
(
String
)
field
.
get
(
firefightersPost
);
firefightersPostQueryWrapper
.
eq
(
name
,
fileValue
);
}}
}
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
}
});
IPage
<
FirefightersPost
>
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
=
iFirefightersPostService
.
page
(
pageBean
,
firefightersPostQueryWrapper
);
return
page
;
}
}
throw
new
RuntimeException
(
"系统异常"
);
}
}
/**
* 根据id查询
*
* @param id
* @return
*/
@SuppressWarnings
(
"unchecked"
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据消防员id查询"
,
notes
=
"根据消防员id查询"
)
public
ResponseModel
<
Object
>
selectById
(
@PathVariable
Long
id
)
{
@SuppressWarnings
(
"rawtypes"
)
QueryWrapper
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"firefighters_id"
,
id
);
FirefightersDataDto
firefightersDataDto
=
new
FirefightersDataDto
(
ifirefightersWorkexperienceService
.
getOne
(
queryWrapper
),
ifirefightersEducationService
.
getOne
(
queryWrapper
),
iFirefightersPostService
.
getOne
(
queryWrapper
));
return
ResponseHelper
.
buildResponse
(
firefightersDataDto
);
}
/**
* 列表分页查询
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
FirefightersPost
>
listPage
(
String
pageNum
,
String
pageSize
,
FirefightersPost
firefightersPost
)
{
Page
<
FirefightersPost
>
pageBean
;
QueryWrapper
<
FirefightersPost
>
firefightersPostQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
FirefightersPost
>
aClass
=
firefightersPost
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
field
.
setAccessible
(
true
);
Object
o
=
field
.
get
(
firefightersPost
);
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
if
(
type
.
equals
(
Integer
.
class
))
{
Integer
fileValue
=
(
Integer
)
field
.
get
(
firefightersPost
);
firefightersPostQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
firefightersPost
);
firefightersPostQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
firefightersPost
);
firefightersPostQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
if
(!
name
.
equals
(
NameUtils
.
camel2Underline
(
"serialVersionUID"
)))
{
String
fileValue
=
(
String
)
field
.
get
(
firefightersPost
);
firefightersPostQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
}
});
IPage
<
FirefightersPost
>
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
=
iFirefightersPostService
.
page
(
pageBean
,
firefightersPostQueryWrapper
);
return
page
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
599cb792
...
@@ -360,14 +360,14 @@ public class OrgUsrController extends BaseController {
...
@@ -360,14 +360,14 @@ public class OrgUsrController extends BaseController {
/**
/**
* 获取用户单位归属
* 获取用户单位归属
*
*
* @param
i
d
* @param
userI
d
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/
getU
serUnit"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/
{userId}/u
serUnit"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取用户单位归属"
,
notes
=
"获取用户单位归属"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取用户单位归属"
,
notes
=
"获取用户单位归属"
)
public
ResponseModel
<
UserUnitDto
>
getUserUnit
(
@
RequestParam
String
id
,
@RequestParam
String
type
,
@RequestParam
String
code
)
{
public
ResponseModel
<
UserUnitDto
>
getUserUnit
(
@
PathVariable
String
userId
)
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
getUserUnit
(
id
,
type
,
code
));
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
getUserUnit
(
userId
));
}
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
599cb792
...
@@ -46,6 +46,11 @@ import java.util.stream.Collectors;
...
@@ -46,6 +46,11 @@ import java.util.stream.Collectors;
@Service
@Service
public
class
OrgUsrServiceImpl
extends
BaseService
<
OrgUsrDto
,
OrgUsr
,
OrgUsrMapper
>
implements
IOrgUsrService
{
public
class
OrgUsrServiceImpl
extends
BaseService
<
OrgUsrDto
,
OrgUsr
,
OrgUsrMapper
>
implements
IOrgUsrService
{
private
static
final
String
TYPE
=
"PERSON,COMPANY"
;
private
static
final
String
CODE
=
"amosAccount"
;
@Autowired
@Autowired
DynamicFormInstanceServiceImpl
alertFormValueServiceImpl
;
DynamicFormInstanceServiceImpl
alertFormValueServiceImpl
;
@Autowired
@Autowired
...
@@ -1003,13 +1008,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -1003,13 +1008,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
}
@Override
@Override
public
UserUnitDto
getUserUnit
(
String
id
,
String
type
,
String
code
)
{
public
UserUnitDto
getUserUnit
(
String
userId
)
{
if
(
StringUtils
.
isNotBlank
(
id
)
&&
StringUtils
.
isNotBlank
(
type
)
&&
StringUtils
.
isNotBlank
(
code
))
{
if
(
StringUtils
.
isNotBlank
(
userId
))
{
String
[]
typeArr
=
type
.
split
(
","
);
String
[]
typeArr
=
TYPE
.
split
(
","
);
// 业主单位
// 业主单位
List
<
UserUnitDto
>
list
=
orgUsrMapper
.
getUserUnit
(
i
d
,
typeArr
[
0
],
null
);
List
<
UserUnitDto
>
list
=
orgUsrMapper
.
getUserUnit
(
userI
d
,
typeArr
[
0
],
null
);
// 维保单位
// 维保单位
List
<
DynamicFormInstance
>
instanceList
=
alertFormValueServiceImpl
.
getInstanceByCodeAndValue
(
code
,
i
d
);
List
<
DynamicFormInstance
>
instanceList
=
alertFormValueServiceImpl
.
getInstanceByCodeAndValue
(
CODE
,
userI
d
);
if
(!
CollectionUtils
.
isEmpty
(
list
)
&&
!
CollectionUtils
.
isEmpty
(
instanceList
))
{
if
(!
CollectionUtils
.
isEmpty
(
list
)
&&
!
CollectionUtils
.
isEmpty
(
instanceList
))
{
throw
new
RuntimeException
(
"人员绑定单位重复!"
);
throw
new
RuntimeException
(
"人员绑定单位重复!"
);
}
else
{
}
else
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
View file @
599cb792
...
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
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.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
...
@@ -56,6 +58,9 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -56,6 +58,9 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
@Autowired
@Autowired
OrgUsrServiceImpl
orgUsrService
;
OrgUsrServiceImpl
orgUsrService
;
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
/**
/**
* 获取监控大队列表
* 获取监控大队列表
*
*
...
@@ -185,6 +190,11 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -185,6 +190,11 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
FireTeam
parentTeam
=
getById
(
fireTeam
.
getParent
());
FireTeam
parentTeam
=
getById
(
fireTeam
.
getParent
());
fireTeam
.
setTreeCode
(
parentTeam
.
getTreeCode
()
+
TreeParser
.
genTreeCode
());
fireTeam
.
setTreeCode
(
parentTeam
.
getTreeCode
()
+
TreeParser
.
genTreeCode
());
}
}
DataDictionary
dataDictionary
=
iDataDictionaryService
.
getById
(
fireTeam
.
getTypeCode
());
if
(
null
!=
dataDictionary
)
{
fireTeam
.
setType
(
dataDictionary
.
getName
());
}
if
(
ValidationUtil
.
isEmpty
(
fireTeam
.
getSequenceNbr
()))
{
if
(
ValidationUtil
.
isEmpty
(
fireTeam
.
getSequenceNbr
()))
{
save
(
fireTeam
);
save
(
fireTeam
);
}
else
{
}
else
{
...
...
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