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
c17116fb
Commit
c17116fb
authored
Jan 21, 2022
by
李腾威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 4387 4375
parent
3191bec5
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
68 additions
and
4 deletions
+68
-4
DataDictionaryServiceImpl.java
...ot/biz/common/service/impl/DataDictionaryServiceImpl.java
+13
-0
FireTeamListDto.java
...join/amos/boot/module/common/api/dto/FireTeamListDto.java
+3
-0
FirefightersDto.java
...join/amos/boot/module/common/api/dto/FirefightersDto.java
+5
-0
FireTeamMapper.xml
...e-common-api/src/main/resources/mapper/FireTeamMapper.xml
+5
-1
FirefightersMapper.xml
...mmon-api/src/main/resources/mapper/FirefightersMapper.xml
+7
-2
FireTeamServiceImpl.java
...t/module/common/biz/service/impl/FireTeamServiceImpl.java
+4
-0
FirefightersServiceImpl.java
...dule/common/biz/service/impl/FirefightersServiceImpl.java
+12
-0
KeySiteServiceImpl.java
...ot/module/common/biz/service/impl/KeySiteServiceImpl.java
+14
-1
FirefightersController.java
...oot/module/jcs/biz/controller/FirefightersController.java
+5
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/impl/DataDictionaryServiceImpl.java
View file @
c17116fb
...
@@ -121,6 +121,19 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
...
@@ -121,6 +121,19 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
List
<
Menu
>
menus
=
TreeParser
.
getTreeContainsCount
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
List
<
Menu
>
menus
=
TreeParser
.
getTreeContainsCount
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
,
"getCount"
);
"getParent"
,
"getCount"
);
// root.setChildren(menus);
// root.setChildren(menus);
for
(
Menu
m:
menus
)
{
if
(
null
!=
m
.
children
)
{
List
<
Menu
>
children
=
m
.
getChildren
();
int
count
=
0
;
for
(
Menu
mm:
children
)
{
count
=
count
+
mm
.
num
;
}
m
.
setNum
(
count
);
}
}
return
Lists
.
newArrayList
(
menus
);
return
Lists
.
newArrayList
(
menus
);
}
}
public
List
<
DataDictionary
>
getwaterResourceTypeTree
(
String
bizOrgCode
)
throws
Exception
{
public
List
<
DataDictionary
>
getwaterResourceTypeTree
(
String
bizOrgCode
)
throws
Exception
{
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/FireTeamListDto.java
View file @
c17116fb
...
@@ -44,4 +44,7 @@ public class FireTeamListDto {
...
@@ -44,4 +44,7 @@ public class FireTeamListDto {
@ApiModelProperty
(
value
=
"所属单位"
)
@ApiModelProperty
(
value
=
"所属单位"
)
private
String
company
;
private
String
company
;
@ApiModelProperty
(
value
=
"树节点子节点id集合"
)
private
List
<
String
>
typeCodes
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/FirefightersDto.java
View file @
c17116fb
...
@@ -7,6 +7,8 @@ import lombok.Data;
...
@@ -7,6 +7,8 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* 消防队员
* 消防队员
*
*
...
@@ -71,6 +73,9 @@ public class FirefightersDto extends BaseDto {
...
@@ -71,6 +73,9 @@ public class FirefightersDto extends BaseDto {
@ApiModelProperty
(
value
=
"岗位名称"
)
@ApiModelProperty
(
value
=
"岗位名称"
)
private
String
jobTitle
;
private
String
jobTitle
;
@ApiModelProperty
(
value
=
"岗位名称"
)
private
List
<
String
>
jobTitles
;
@ApiModelProperty
(
value
=
"岗位code"
)
@ApiModelProperty
(
value
=
"岗位code"
)
private
String
jobTitleCode
;
private
String
jobTitleCode
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FireTeamMapper.xml
View file @
c17116fb
...
@@ -44,7 +44,11 @@
...
@@ -44,7 +44,11 @@
WHERE
WHERE
a.is_delete = 0
a.is_delete = 0
<if
test=
'par.parent != null'
>
and a.parent = #{par.parent}
</if>
<if
test=
'par.parent != null'
>
and a.parent = #{par.parent}
</if>
<if
test=
'par.typeCode != null'
>
and a.type_code = #{par.typeCode}
</if>
<if
test=
'par.typeCodes != null'
>
and a.type_code in
<foreach
collection=
"par.typeCodes"
item=
"id"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
<if
test=
'par.companyCode != null'
>
and a.company_code = #{par.companyCode}
</if>
<if
test=
'par.companyCode != null'
>
and a.company_code = #{par.companyCode}
</if>
<if
test=
'par.company != null and par.company != -1'
>
and a.company = #{par.company}
</if>
<if
test=
'par.company != null and par.company != -1'
>
and a.company = #{par.company}
</if>
<if
test=
'par.name != null'
>
and a.name like concat('%', #{par.name}, '%')
</if>
<if
test=
'par.name != null'
>
and a.name like concat('%', #{par.name}, '%')
</if>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FirefightersMapper.xml
View file @
c17116fb
...
@@ -28,8 +28,13 @@
...
@@ -28,8 +28,13 @@
<if
test=
'par.state!=null'
>
and a.state_code= #{par.state}
</if>
<if
test=
'par.state!=null'
>
and a.state_code= #{par.state}
</if>
<if
test=
'par.company!=null and par.company!= -1'
>
and a.company= #{par.company}
</if>
<if
test=
'par.company!=null and par.company!= -1'
>
and a.company= #{par.company}
</if>
<if
test=
'par.fireTeamId!=null'
>
and a.fire_team_id= #{par.fireTeamId}
</if>
<if
test=
'par.fireTeamId!=null'
>
and a.fire_team_id= #{par.fireTeamId}
</if>
<if
test=
'par.jobTitle!=null'
>
and a.job_title_code =#{par.jobTitle}
</if>
<if
test=
'par.jobTitles!=null'
>
and a.job_title_code in
<if
test=
'par.areasExpertiseCode!=null and par.areasExpertiseCode!="0"'
>
and b.areas_expertise_code
<foreach
collection=
"par.jobTitles"
item=
"id"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
<if
test=
'par.areasExpertiseCode!=null and par.areasExpertiseCode!="0"'
>
and b.areas_expertise_code
=#{par.areasExpertiseCode}
=#{par.areasExpertiseCode}
</if>
</if>
<if
test=
'par.company!=null and par.company!= -1'
>
and a.company= #{par.company}
</if>
<if
test=
'par.company!=null and par.company!= -1'
>
and a.company= #{par.company}
</if>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FireTeamServiceImpl.java
View file @
c17116fb
...
@@ -106,6 +106,10 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -106,6 +106,10 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
team
.
setNodeIds
(
teamList
.
stream
().
map
(
e
->
e
.
getSequenceNbr
().
toString
()).
collect
(
Collectors
.
toList
()));
team
.
setNodeIds
(
teamList
.
stream
().
map
(
e
->
e
.
getSequenceNbr
().
toString
()).
collect
(
Collectors
.
toList
()));
}
}
if
(!
ValidationUtil
.
isEmpty
(
team
.
getTypeCode
()))
{
team
.
setTypeCodes
(
Arrays
.
asList
(
team
.
getTypeCode
().
split
(
","
)));
}
IPage
<
FireTeamCardDto
>
fireTeamListPage
=
this
.
baseMapper
.
getFireTeamForPage
(
page
,
team
);
IPage
<
FireTeamCardDto
>
fireTeamListPage
=
this
.
baseMapper
.
getFireTeamForPage
(
page
,
team
);
List
<
FireTeamCardDto
>
fireTeamList
=
fireTeamListPage
.
getRecords
();
List
<
FireTeamCardDto
>
fireTeamList
=
fireTeamListPage
.
getRecords
();
Map
<
Object
,
Long
>
finalTeamCarCountMap
=
teamCarCountMap
;
Map
<
Object
,
Long
>
finalTeamCarCountMap
=
teamCarCountMap
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FirefightersServiceImpl.java
View file @
c17116fb
...
@@ -125,6 +125,18 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
...
@@ -125,6 +125,18 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
,
firefightersMapper
.
getFirefightersJobTitleCount
(
bizOrgCode
));
"getParent"
,
firefightersMapper
.
getFirefightersJobTitleCount
(
bizOrgCode
));
for
(
Menu
m:
menus
)
{
if
(
null
!=
m
.
children
)
{
List
<
Menu
>
children
=
m
.
getChildren
();
int
count
=
0
;
for
(
Menu
mm:
children
)
{
count
=
count
+
mm
.
num
;
}
m
.
setNum
(
count
);
}
}
return
menus
;
return
menus
;
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/KeySiteServiceImpl.java
View file @
c17116fb
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.common.biz.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.common.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.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
...
@@ -9,6 +10,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -9,6 +10,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.entity.KeySite
;
import
com.yeejoin.amos.boot.module.common.api.entity.KeySite
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
...
@@ -26,6 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -26,6 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
@@ -65,6 +70,8 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
...
@@ -65,6 +70,8 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
@Value
(
"${auth-key-key-site:key_site_info}"
)
@Value
(
"${auth-key-key-site:key_site_info}"
)
private
String
authKey
;
private
String
authKey
;
@Autowired
private
RedisUtils
redisUtils
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -94,7 +101,13 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
...
@@ -94,7 +101,13 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
@Override
@Override
public
List
<
KeySiteExcleDto
>
exportToExcel
(
String
name
,
Long
buildingId
,
String
fireEnduranceRate
,
public
List
<
KeySiteExcleDto
>
exportToExcel
(
String
name
,
Long
buildingId
,
String
fireEnduranceRate
,
String
useNature
,
String
fireFacilitiesInfo
,
String
bizOrgCode
)
{
String
useNature
,
String
fireFacilitiesInfo
,
String
bizOrgCode
)
{
List
<
KeySiteDto
>
list
=
this
.
queryForKeySiteList
(
name
,
buildingId
,
fireEnduranceRate
,
useNature
,
fireFacilitiesInfo
,
bizOrgCode
);
// 导出模板增加权限
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
// 权限处理
String
bizOrgCodeNew
=
reginParams
.
getPersonIdentity
().
getBizOrgCode
();
List
<
KeySiteDto
>
list
=
this
.
queryForKeySiteList
(
name
,
buildingId
,
fireEnduranceRate
,
useNature
,
fireFacilitiesInfo
,
bizOrgCodeNew
);
List
<
KeySiteExcleDto
>
excleList
=
new
ArrayList
<>();
List
<
KeySiteExcleDto
>
excleList
=
new
ArrayList
<>();
list
.
forEach
(
i
->
{
list
.
forEach
(
i
->
{
KeySiteExcleDto
keySiteExcleDto
=
new
KeySiteExcleDto
();
KeySiteExcleDto
keySiteExcleDto
=
new
KeySiteExcleDto
();
...
...
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 @
c17116fb
...
@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
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
;
...
@@ -346,6 +347,10 @@ public class FirefightersController extends BaseController {
...
@@ -346,6 +347,10 @@ public class FirefightersController extends BaseController {
pageNum
=
1
;
pageNum
=
1
;
pageSize
=
Integer
.
MAX_VALUE
;
pageSize
=
Integer
.
MAX_VALUE
;
}
}
if
(!
ValidationUtil
.
isEmpty
(
firefighters
.
getJobTitle
()))
{
firefighters
.
setJobTitles
(
Arrays
.
asList
(
firefighters
.
getJobTitle
().
split
(
","
)));
}
List
<
FirefightersZhDto
>
list
=
iFirefightersService
.
getFirefighters
((
pageNum
-
1
)
*
pageSize
,
pageSize
,
List
<
FirefightersZhDto
>
list
=
iFirefightersService
.
getFirefighters
((
pageNum
-
1
)
*
pageSize
,
pageSize
,
firefighters
);
firefighters
);
Map
<
String
,
Long
>
num
=
iFirefightersService
.
getFirefightersCount
((
pageNum
-
1
)
*
pageSize
,
pageSize
,
Map
<
String
,
Long
>
num
=
iFirefightersService
.
getFirefightersCount
((
pageNum
-
1
)
*
pageSize
,
pageSize
,
...
...
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