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
4ef9011d
Commit
4ef9011d
authored
Feb 28, 2024
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
智能分析指标权限配置权限过滤问题处理
parent
223138e1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
6 deletions
+59
-6
IdxBizFanWeightController.java
...odule/jxiop/biz/controller/IdxBizFanWeightController.java
+23
-1
IdxBizPvWeightController.java
...module/jxiop/biz/controller/IdxBizPvWeightController.java
+22
-5
IdxBizFanWeight.java
...in/amos/boot/module/jxiop/biz/entity/IdxBizFanWeight.java
+7
-0
IdxBizPvWeight.java
...oin/amos/boot/module/jxiop/biz/entity/IdxBizPvWeight.java
+7
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanWeightController.java
View file @
4ef9011d
...
...
@@ -5,7 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.biz.amosprojectentity.StdUserEmpower
;
import
com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper.UserEmpowerMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBiz3yudDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWeight
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight
;
...
...
@@ -15,6 +18,7 @@ import io.swagger.annotations.ApiOperation;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
...
...
@@ -43,12 +47,20 @@ public class IdxBizFanWeightController extends BaseController {
@Autowired
IdxBizFanWeightMapper
idxBizFanWeightMapper
;
@Autowired
UserEmpowerMapper
userEmpowerMapper
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/queryPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
public
ResponseModel
<
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
IdxBizFanWeight
>>
queryForDealerReviewPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
IdxBizFanWeight
reviewDto
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
userId
=
reginParams
.
getUserModel
().
getUserId
();
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
new
QueryWrapper
<
StdUserEmpower
>().
eq
(
"amos_user_id"
,
userId
).
eq
(
"permission_type"
,
"YTH"
));
String
orgCode
=
"86"
;
if
(
ObjectUtils
.
isEmpty
(
stdUserEmpower
))
{
orgCode
=
stdUserEmpower
.
getAmosOrgCode
().
get
(
0
);
}
LambdaQueryWrapper
<
IdxBizFanWeight
>
qu
=
new
LambdaQueryWrapper
<>();
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getType
()),
IdxBizFanWeight:
:
getType
,
reviewDto
.
getType
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getArae
()),
IdxBizFanWeight:
:
getArae
,
reviewDto
.
getArae
());
...
...
@@ -56,6 +68,7 @@ public class IdxBizFanWeightController extends BaseController {
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getSubarray
()),
IdxBizFanWeight:
:
getSubarray
,
reviewDto
.
getSubarray
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getEquipmentName
()),
IdxBizFanWeight:
:
getEquipmentName
,
reviewDto
.
getEquipmentName
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getPointName
()),
IdxBizFanWeight:
:
getPointName
,
reviewDto
.
getPointName
());
qu
.
like
(
IdxBizFanWeight:
:
getOrgCode
,
orgCode
);
Integer
total
=
idxBizFanWeightMapper
.
selectCount
(
qu
);
qu
.
orderByAsc
(
IdxBizFanWeight:
:
getType
);
...
...
@@ -105,6 +118,14 @@ public class IdxBizFanWeightController extends BaseController {
// ,String subarray
// ,String pointName
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
userId
=
reginParams
.
getUserModel
().
getUserId
();
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
new
QueryWrapper
<
StdUserEmpower
>().
eq
(
"amos_user_id"
,
userId
).
eq
(
"permission_type"
,
"YTH"
));
String
orgCode
=
"86"
;
if
(
ObjectUtils
.
isEmpty
(
stdUserEmpower
))
{
orgCode
=
stdUserEmpower
.
getAmosOrgCode
().
get
(
0
);
}
QueryWrapper
<
IdxBizFanWeight
>
qu
=
new
QueryWrapper
<>();
String
name
=
""
;
switch
(
type
){
...
...
@@ -139,6 +160,7 @@ public class IdxBizFanWeightController extends BaseController {
// qu.eq("POINT_NAME",pointName);
break
;
}
qu
.
like
(
"ORG_CODE"
,
orgCode
);
qu
.
isNotNull
(
name
);
qu
.
groupBy
(
name
);
qu
.
orderByAsc
(
name
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizPvWeightController.java
View file @
4ef9011d
...
...
@@ -8,7 +8,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.biz.amosprojectentity.StdUserEmpower
;
import
com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper.UserEmpowerMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBiz3yudDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWeight
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight
;
...
...
@@ -20,6 +23,7 @@ import io.swagger.annotations.ApiOperation;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
...
...
@@ -48,13 +52,20 @@ public class IdxBizPvWeightController extends BaseController {
@Autowired
IdxBizPvWeightMapper
idxBizPvWeightMapper
;
@Autowired
UserEmpowerMapper
userEmpowerMapper
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/queryPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
public
ResponseModel
<
Page
<
IdxBizPvWeight
>>
queryForDealerReviewPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
IdxBizPvWeight
reviewDto
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
userId
=
reginParams
.
getUserModel
().
getUserId
();
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
new
QueryWrapper
<
StdUserEmpower
>().
eq
(
"amos_user_id"
,
userId
).
eq
(
"permission_type"
,
"YTH"
));
String
orgCode
=
"86"
;
if
(
ObjectUtils
.
isEmpty
(
stdUserEmpower
))
{
orgCode
=
stdUserEmpower
.
getAmosOrgCode
().
get
(
0
);
}
LambdaQueryWrapper
<
IdxBizPvWeight
>
qu
=
new
LambdaQueryWrapper
<>();
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getType
()),
IdxBizPvWeight:
:
getType
,
reviewDto
.
getType
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getArae
()),
IdxBizPvWeight:
:
getArae
,
reviewDto
.
getArae
());
...
...
@@ -62,8 +73,7 @@ public class IdxBizPvWeightController extends BaseController {
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getSubarray
()),
IdxBizPvWeight:
:
getSubarray
,
reviewDto
.
getSubarray
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getEquipmentName
()),
IdxBizPvWeight:
:
getEquipmentName
,
reviewDto
.
getEquipmentName
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getPointName
()),
IdxBizPvWeight:
:
getPointName
,
reviewDto
.
getPointName
());
qu
.
like
(
IdxBizPvWeight:
:
getOrgCode
,
orgCode
);
Integer
total
=
idxBizPvWeightMapper
.
selectCount
(
qu
);
qu
.
orderByAsc
(
IdxBizPvWeight:
:
getType
);
qu
.
last
(
" limit "
+
(
current
-
1
)*
size
+
","
+
size
);
...
...
@@ -116,6 +126,13 @@ public class IdxBizPvWeightController extends BaseController {
if
(
type
==
null
){
return
ResponseHelper
.
buildResponse
(
null
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
userId
=
reginParams
.
getUserModel
().
getUserId
();
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
new
QueryWrapper
<
StdUserEmpower
>().
eq
(
"amos_user_id"
,
userId
).
eq
(
"permission_type"
,
"YTH"
));
String
orgCode
=
"86"
;
if
(
ObjectUtils
.
isEmpty
(
stdUserEmpower
))
{
orgCode
=
stdUserEmpower
.
getAmosOrgCode
().
get
(
0
);
}
QueryWrapper
<
IdxBizPvWeight
>
qu
=
new
QueryWrapper
<>();
String
name
=
""
;
IdxBizPvWeight
qt
=
new
IdxBizPvWeight
();
...
...
@@ -152,7 +169,7 @@ public class IdxBizPvWeightController extends BaseController {
// qu.eq("POINT_NAME",pointName);
break
;
}
qu
.
like
(
"ORG_CODE"
,
orgCode
);
qu
.
isNotNull
(
name
);
qu
.
groupBy
(
name
);
qu
.
orderByAsc
(
name
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizFanWeight.java
View file @
4ef9011d
...
...
@@ -64,6 +64,13 @@ public class IdxBizFanWeight {
*/
@TableField
(
"VALUE"
)
private
Float
value
;
/**
* orgCode
*/
@TableField
(
"ORG_CODE"
)
private
String
orgCode
;
@TableField
(
exist
=
false
)
private
String
Symbol_key
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizPvWeight.java
View file @
4ef9011d
...
...
@@ -65,6 +65,13 @@ public class IdxBizPvWeight {
*/
@TableField
(
"VALUE"
)
private
Float
value
;
/**
* orgCode
*/
@TableField
(
"ORG_CODE"
)
private
String
orgCode
;
@TableField
(
exist
=
false
)
private
String
Symbol_key
;
}
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