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
57234ef3
Commit
57234ef3
authored
Oct 23, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释级联下拉参数
parent
914aa152
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
21 deletions
+85
-21
IdxBizFanWeightController.java
...odule/jxiop/biz/controller/IdxBizFanWeightController.java
+37
-11
IdxBizPvWeightController.java
...module/jxiop/biz/controller/IdxBizPvWeightController.java
+48
-10
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 @
57234ef3
...
@@ -2,8 +2,8 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
...
@@ -2,8 +2,8 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.extension.plugins.pagination.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWeight
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWeight
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanWeightMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanWeightMapper
;
...
@@ -35,10 +35,10 @@ public class IdxBizFanWeightController extends BaseController {
...
@@ -35,10 +35,10 @@ public class IdxBizFanWeightController extends BaseController {
@Autowired
@Autowired
IdxBizFanWeightMapper
idxBizFanWeightMapper
;
IdxBizFanWeightMapper
idxBizFanWeightMapper
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/queryPage"
)
@GetMapping
(
value
=
"/queryPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
public
ResponseModel
<
Page
<
IdxBizFanWeight
>>
queryForDealerReviewPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
IdxBizFanWeight
>>
queryForDealerReviewPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
IdxBizFanWeight
reviewDto
)
{
(
value
=
"size"
)
int
size
,
IdxBizFanWeight
reviewDto
)
{
LambdaQueryWrapper
<
IdxBizFanWeight
>
qu
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizFanWeight
>
qu
=
new
LambdaQueryWrapper
<>();
...
@@ -48,36 +48,62 @@ public class IdxBizFanWeightController extends BaseController {
...
@@ -48,36 +48,62 @@ public class IdxBizFanWeightController extends BaseController {
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getSubarray
()),
IdxBizFanWeight:
:
getSubarray
,
reviewDto
.
getSubarray
());
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
.
getEquipmentName
()),
IdxBizFanWeight:
:
getEquipmentName
,
reviewDto
.
getEquipmentName
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getPointName
()),
IdxBizFanWeight:
:
getPointName
,
reviewDto
.
getPointName
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getPointName
()),
IdxBizFanWeight:
:
getPointName
,
reviewDto
.
getPointName
());
Integer
total
=
idxBizFanWeightMapper
.
selectCount
(
qu
);
qu
.
orderByAsc
(
IdxBizFanWeight:
:
getType
);
qu
.
orderByAsc
(
IdxBizFanWeight:
:
getType
);
PageHelper
.
startPage
(
current
,
size
);
qu
.
last
(
" limit "
+
(
current
-
1
)*
size
+
","
+
size
);
//PageHelper.startPage(current, size);
List
<
IdxBizFanWeight
>
list
=
idxBizFanWeightMapper
.
selectList
(
qu
);
List
<
IdxBizFanWeight
>
list
=
idxBizFanWeightMapper
.
selectList
(
qu
);
Page
<
IdxBizFanWeight
>
page
=
new
Page
();
//PageInfo<IdxBizFanWeight> page = new PageInfo(list);
page
.
setRecords
(
list
);
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
IdxBizFanWeight
>
pagenew
=
new
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
IdxBizFanWeight
>();
page
.
setSize
(
size
);
pagenew
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
pagenew
.
setTotal
(
total
);
return
ResponseHelper
.
buildResponse
(
page
);
pagenew
.
setSize
(
size
);
pagenew
.
setRecords
(
list
);
return
ResponseHelper
.
buildResponse
(
pagenew
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/drop_down"
)
@GetMapping
(
value
=
"/drop_down"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
public
ResponseModel
<
List
<
IdxBizFanWeight
>>
queryForDealerReviewPage
(
String
type
)
{
public
ResponseModel
<
List
<
IdxBizFanWeight
>>
queryForDealerReviewPage
(
String
type
// ,String arae
// ,String station
// ,String equipmentName
// ,String subarray
// ,String pointName
)
{
QueryWrapper
<
IdxBizFanWeight
>
qu
=
new
QueryWrapper
<>();
QueryWrapper
<
IdxBizFanWeight
>
qu
=
new
QueryWrapper
<>();
String
name
=
""
;
String
name
=
""
;
switch
(
type
){
switch
(
type
){
case
"1"
:
case
"1"
:
name
=
"ARAE"
;
name
=
"ARAE"
;
// qu.eq("ARAE",arae);
break
;
break
;
case
"2"
:
case
"2"
:
name
=
"STATION"
;
name
=
"STATION"
;
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
break
;
break
;
case
"3"
:
case
"3"
:
name
=
"EQUIPMENT_NAME"
;
name
=
"EQUIPMENT_NAME"
;
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
// qu.eq("EQUIPMENT_NAME",equipmentName);
break
;
break
;
case
"4"
:
case
"4"
:
name
=
"SUBARRAY"
;
name
=
"SUBARRAY"
;
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
// qu.eq("EQUIPMENT_NAME",equipmentName);
// qu.eq("SUBARRAY",subarray);
break
;
break
;
case
"5"
:
case
"5"
:
name
=
"POINT_NAME"
;
name
=
"POINT_NAME"
;
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
// qu.eq("EQUIPMENT_NAME",equipmentName);
// qu.eq("SUBARRAY",subarray);
// qu.eq("POINT_NAME",pointName);
break
;
break
;
}
}
qu
.
isNotNull
(
name
);
qu
.
isNotNull
(
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 @
57234ef3
...
@@ -2,16 +2,17 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
...
@@ -2,16 +2,17 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWeight
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvWeightMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvWeightMapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.annotations.Case
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -38,7 +39,7 @@ public class IdxBizPvWeightController extends BaseController {
...
@@ -38,7 +39,7 @@ public class IdxBizPvWeightController extends BaseController {
@Autowired
@Autowired
IdxBizPvWeightMapper
idxBizPvWeightMapper
;
IdxBizPvWeightMapper
idxBizPvWeightMapper
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/queryPage"
)
@GetMapping
(
value
=
"/queryPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
public
ResponseModel
<
Page
<
IdxBizPvWeight
>>
queryForDealerReviewPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
IdxBizPvWeight
>>
queryForDealerReviewPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
...
@@ -51,38 +52,75 @@ public class IdxBizPvWeightController extends BaseController {
...
@@ -51,38 +52,75 @@ public class IdxBizPvWeightController extends BaseController {
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getSubarray
()),
IdxBizPvWeight:
:
getSubarray
,
reviewDto
.
getSubarray
());
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
.
getEquipmentName
()),
IdxBizPvWeight:
:
getEquipmentName
,
reviewDto
.
getEquipmentName
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getPointName
()),
IdxBizPvWeight:
:
getPointName
,
reviewDto
.
getPointName
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getPointName
()),
IdxBizPvWeight:
:
getPointName
,
reviewDto
.
getPointName
());
Integer
total
=
idxBizPvWeightMapper
.
selectCount
(
qu
);
qu
.
orderByAsc
(
IdxBizPvWeight:
:
getType
);
qu
.
orderByAsc
(
IdxBizPvWeight:
:
getType
);
PageHelper
.
startPage
(
current
,
size
);
qu
.
last
(
" limit "
+
(
current
-
1
)*
size
+
","
+
size
);
/// PageHelper.startPage(current, size);
List
<
IdxBizPvWeight
>
list
=
idxBizPvWeightMapper
.
selectList
(
qu
);
List
<
IdxBizPvWeight
>
list
=
idxBizPvWeightMapper
.
selectList
(
qu
);
Page
<
IdxBizPvWeight
>
page
=
new
Page
();
// PageInfo<IdxBizPvWeight> page = new PageInfo(list);
page
.
setRecords
(
list
);
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
IdxBizPvWeight
>
pagenew
=
new
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
IdxBizPvWeight
>();
return
ResponseHelper
.
buildResponse
(
page
);
pagenew
.
setCurrent
(
current
);
pagenew
.
setTotal
(
total
);
pagenew
.
setSize
(
size
);
pagenew
.
setRecords
(
list
);
return
ResponseHelper
.
buildResponse
(
pagenew
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/drop_down"
)
@GetMapping
(
value
=
"/drop_down"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
public
ResponseModel
<
List
<
IdxBizPvWeight
>>
queryForDealerReviewPage
(
String
type
)
{
public
ResponseModel
<
List
<
IdxBizPvWeight
>>
queryForDealerReviewPage
(
String
type
// ,String arae
// ,String station
// ,String equipmentName
// ,String subarray
// ,String pointName
)
{
if
(
type
==
null
){
return
ResponseHelper
.
buildResponse
(
null
);
}
QueryWrapper
<
IdxBizPvWeight
>
qu
=
new
QueryWrapper
<>();
QueryWrapper
<
IdxBizPvWeight
>
qu
=
new
QueryWrapper
<>();
String
name
=
""
;
String
name
=
""
;
IdxBizPvWeight
qt
=
new
IdxBizPvWeight
();
switch
(
type
){
switch
(
type
){
case
"1"
:
case
"1"
:
name
=
"ARAE"
;
name
=
"ARAE"
;
// qu.eq("ARAE",arae);
break
;
break
;
case
"2"
:
case
"2"
:
name
=
"STATION"
;
name
=
"STATION"
;
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
break
;
break
;
case
"3"
:
case
"3"
:
name
=
"EQUIPMENT_NAME"
;
name
=
"EQUIPMENT_NAME"
;
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
// qu.eq("EQUIPMENT_NAME",equipmentName);
break
;
break
;
case
"4"
:
case
"4"
:
name
=
"SUBARRAY"
;
name
=
"SUBARRAY"
;
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
// qu.eq("EQUIPMENT_NAME",equipmentName);
// qu.eq("SUBARRAY",subarray);
break
;
break
;
case
"5"
:
case
"5"
:
name
=
"POINT_NAME"
;
name
=
"POINT_NAME"
;
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
// qu.eq("EQUIPMENT_NAME",equipmentName);
// qu.eq("SUBARRAY",subarray);
// qu.eq("POINT_NAME",pointName);
break
;
break
;
}
}
qu
.
isNotNull
(
name
);
qu
.
isNotNull
(
name
);
qu
.
groupBy
(
name
);
qu
.
groupBy
(
name
);
qu
.
orderByAsc
(
name
);
qu
.
orderByAsc
(
name
);
...
...
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