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
2d311b0b
Commit
2d311b0b
authored
Jul 29, 2022
by
lisong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6
parents
66a1a530
e0d40437
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
49 deletions
+51
-49
PermissionInterceptor.java
...s/boot/biz/common/interceptors/PermissionInterceptor.java
+4
-4
PermissionInterceptorContext.java
...biz/common/interceptors/PermissionInterceptorContext.java
+10
-2
OrgUsrMapper.java
...join/amos/boot/module/common/api/mapper/OrgUsrMapper.java
+0
-2
EqEqDynamicFormServiceImpl.java
.../equipmanage/service/impl/EqEqDynamicFormServiceImpl.java
+4
-8
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+2
-6
DataSourcesImpl.java
...mos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
+2
-1
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+29
-26
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/interceptors/PermissionInterceptor.java
View file @
2d311b0b
...
...
@@ -71,8 +71,8 @@ public class PermissionInterceptor implements Interceptor {
// 被拦截方法
Method
method
=
getTargetDataAuthMethod
(
mappedStatement
);
DataAuth
dataAuth
=
getTargetDataAuthAnnotation
(
mappedStatement
);
// 没有DataAuth定义注解的跳过及没有手动指定使用数据规则的跳过
if
(
null
==
dataAuth
&&
ValidationUtil
.
isEmpty
(
dataAuthRule
))
{
// 没有DataAuth定义注解
或注解为空
的跳过及没有手动指定使用数据规则的跳过
if
(
(
null
==
dataAuth
||
ValidationUtil
.
isEmpty
(
dataAuth
.
interfacePath
()))
&&
ValidationUtil
.
isEmpty
(
dataAuthRule
))
{
PermissionInterceptorContext
.
clean
();
return
invocation
.
proceed
();
}
...
...
@@ -94,11 +94,11 @@ public class PermissionInterceptor implements Interceptor {
try
{
sql
=
processSelectSql
(
sql
,
dataAuthorization
,
reginParam
,
boundSql
);
}
catch
(
Exception
e
)
{
PermissionInterceptorContext
.
clean
();
PermissionInterceptorContext
.
clean
(
dataAuthRule
);
logger
.
debug
(
e
.
getMessage
());
}
metaObject
.
setValue
(
"delegate.boundSql.sql"
,
sql
);
PermissionInterceptorContext
.
clean
();
PermissionInterceptorContext
.
clean
(
dataAuthRule
);
return
invocation
.
proceed
();
}
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/interceptors/PermissionInterceptorContext.java
View file @
2d311b0b
...
...
@@ -22,9 +22,17 @@ public class PermissionInterceptorContext {
public
static
void
clean
()
{
if
(
requestContext
!=
null
)
{
logger
.
info
(
"clean RestThreadLocal......Begin"
);
logger
.
info
(
"
PermissionInterceptorContext
clean RestThreadLocal......Begin"
);
requestContext
.
remove
();
logger
.
info
(
"clean RestThreadLocal......Done"
);
logger
.
info
(
"PermissionInterceptorContext clean RestThreadLocal......Done"
);
}
}
public
static
void
clean
(
String
info
)
{
if
(
requestContext
!=
null
)
{
logger
.
info
(
"......"
+
info
+
"......PermissionInterceptorContext clean RestThreadLocal......Begin"
);
requestContext
.
remove
();
logger
.
info
(
"......"
+
info
+
"......PermissionInterceptorContext clean RestThreadLocal......Done"
);
}
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/OrgUsrMapper.java
View file @
2d311b0b
...
...
@@ -104,14 +104,12 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
OrgUsr
queryByUserId
(
@Param
(
"userId"
)
Long
userId
);
@DataAuth
(
interfacePath
=
""
)
List
<
OrgUsr
>
companyTreeByUserAndType
(
Map
<
String
,
Object
>
param
);
List
<
OrgUsr
>
equipCompanyExport
(
String
bizOrgCode
);
OrgUsr
queryBySequenceNbr
(
@Param
(
"parentId"
)
String
parentId
);
@DataAuth
(
interfacePath
=
""
)
List
<
OrgUsr
>
companyDeptListWithPersonCount
(
Map
<
String
,
Object
>
param
);
List
<
OrgUsr
>
companyTreeByUser
(
String
bizOrgCode
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EqEqDynamicFormServiceImpl.java
View file @
2d311b0b
...
...
@@ -147,20 +147,16 @@ public class EqEqDynamicFormServiceImpl implements IEqDynamicFormService {
//3.处理子分组数据
List
<
DynamicFormGroup
>
groupList
=
iEqDynamicFormGroupService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormGroup
>()
.
eq
(
DynamicFormGroup:
:
getParentId
,
dynamicFormGroupVo
.
getId
()).
eq
(
DynamicFormGroup:
:
getParentId
,
dynamicFormGroupVo
.
getId
()).
orderByAsc
(
DynamicFormGroup:
:
getSort
));
List
<
DynamicFormGroupVo
>
formGroupVos
=
new
ArrayList
<>();
List
<
DynamicFormGroupVo
>
formGroupVos1
=
groupList
.
stream
().
map
(
s
->
{
List
<
DynamicFormGroupVo
>
formGroupVos
=
new
ArrayList
<>();
groupList
.
forEach
(
s
->
{
this
.
stringToJsonGroupConfig
(
s
);
JSONObject
jsonObject
=
s
.
getGroupConfig
();
if
(
(
jsonObject
.
get
(
"isSelect"
).
toString
()).
equals
(
"true"
)){
if
(
jsonObject
.
get
(
"isSelect"
)
!=
null
&&
"true"
.
equals
(
jsonObject
.
get
(
"isSelect"
).
toString
()
)){
DynamicFormGroupVo
target
=
new
DynamicFormGroupVo
();
Bean
.
copyExistPropertis
(
s
,
target
);
formGroupVos
.
add
(
target
);
return
target
;
}
return
null
;
}).
collect
(
Collectors
.
toList
());
});
formGroupVos
.
forEach
(
v
->
{
this
.
fillFormColumnWithFiledValue
(
v
,
formInstanceMap
);
buildGroupsAndColumnsTreeWithValue
(
v
,
dynamicFormInstances
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
2d311b0b
...
...
@@ -226,8 +226,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
// AST数据同步
List
<
FireFightingSystem
>
fireFightingSystemDetail
=
getFireFightingSystemDetail
(
vo
);
syncDataService
.
syncCreatedFireFightingSystem
(
fireFightingSystemDetail
);
}
else
{
return
s
;
}
// 3.保存图片数据
this
.
insertFiles
(
vo
);
...
...
@@ -241,8 +239,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
// 验证必填项 BUG 2725 by kongfm 2021-09-09
List
<
DynamicFormInstance
>
formInstance
=
vo
.
getFormInstances
();
formInstance
.
stream
().
forEach
(
item
->
{
if
(
item
.
getNotNull
()
==
true
&&
StringUtils
.
isEmpty
(
item
.
getFieldValue
()))
{
formInstance
.
forEach
(
item
->
{
if
(
item
.
getNotNull
()
&&
StringUtils
.
isEmpty
(
item
.
getFieldValue
()))
{
throw
new
BadRequest
(
item
.
getFieldLabel
()
+
"为必填项,请确认"
);
}
});
...
...
@@ -262,8 +260,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
// AST数据同步
List
<
FireFightingSystem
>
fireFightingSystemDetail
=
getFireFightingSystemDetail
(
vo
);
syncDataService
.
syncCreatedFireFightingSystem
(
fireFightingSystemDetail
);
}
else
{
return
null
;
}
// 1.更新消防系统数据
String
sequenceNbr
=
vo
.
getId
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
View file @
2d311b0b
...
...
@@ -492,7 +492,8 @@ public class DataSourcesImpl implements DataSources {
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
"key_site_info"
);
List
<
OrgMenuDto
>
orgUsrTree
=
iOrgUsrService
.
companyTreeByUserAndType
(
reginParams
,
OrgPersonEnum
.
公司
.
getKey
());
// 修改bug6829 查询单位和部门数据
List
<
OrgMenuDto
>
orgUsrTree
=
iOrgUsrService
.
companyTreeByUserAndType
(
reginParams
,
null
);
// List<OrgMenuDto> orgUsrTree = orgUsrService.getTree(null, orgUsrService.getCompanyDetailTree(),
// OrgUsr.class.getName(), "getSequenceNbr", 2, "getBizOrgName", "getParentId", "getBizOrgType");
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
2d311b0b
...
...
@@ -2488,38 +2488,41 @@
</select>
<select
id=
"getFireCarInfoByWL"
resultType=
"java.util.Map"
>
SELECT
`wc`.`id` AS `id`,
`wc`.`name` AS `name`,
max( CASE WHEN ( `wcp`.`equipment_index_key` = 'FireCar_WaterCapacity' ) THEN `wcp`.`value` END ) AS `waterCapacity`,
max( CASE WHEN ( `wcp`.`equipment_index_key` = 'FireCar_FoamCapacity' ) THEN `wcp`.`value` END ) AS `foamCapacity`,
max(
CASE
WHEN ( `wcp`.`equipment_index_key` = 'FireCar_Start' AND `wcp`.`value` = 'true' ) THEN
'启动'
WHEN ( `wcp`.`equipment_index_key` = 'FireCar_Start' AND `wcp`.`value` = 'false' ) THEN
'熄火'
END
) AS `carState`,
max(
CASE
WHEN ( `wcp`.`equipment_index_key` = 'FireCar_Start' AND `wcp`.`value` = 'true' ) THEN
`wcp`.`update_date`
WHEN ( `wcp`.`equipment_index_key` = 'FireCar_Start' AND `wcp`.`value` = 'false' ) THEN
`wcp`.`update_date`
END
) AS `carStateDate`
select a.* from
(SELECT
`wc`.`id` AS `id`,
`wc`.`name` AS `name`,
max( CASE WHEN ( `wcp`.`equipment_index_key` = 'FireCar_WaterCapacity' ) THEN `wcp`.`value` END ) AS
`waterCapacity`,
max( CASE WHEN ( `wcp`.`equipment_index_key` = 'FireCar_FoamCapacity' ) THEN `wcp`.`value` END ) AS
`foamCapacity`,
max(
CASE
WHEN ( `wcp`.`equipment_index_key` = 'FireCar_Start' AND `wcp`.`value` = 'true' ) THEN
'启动'
WHEN ( `wcp`.`equipment_index_key` = 'FireCar_Start' AND `wcp`.`value` = 'false' ) THEN
'熄火'
END
) AS `carState`,
max(
CASE
WHEN ( `wcp`.`equipment_index_key` = 'FireCar_Start' AND `wcp`.`value` = 'true' ) THEN
`wcp`.`update_date`
WHEN ( `wcp`.`equipment_index_key` = 'FireCar_Start' AND `wcp`.`value` = 'false' ) THEN
`wcp`.`update_date`
END
) AS `carStateDate`
FROM
`wl_car` `wc`
LEFT JOIN `wl_car_property` `wcp` ON `wcp`.`car_id` = `wc`.`id`
`wl_car` `wc`
LEFT JOIN `wl_car_property` `wcp` ON `wcp`.`car_id` = `wc`.`id`
<where>
1=1
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
AND wc.biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
</if>
</where>
</where>
) a
</select>
<select
id=
"getWaterInfo"
resultType=
"java.util.Map"
>
...
...
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