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
a7df94cc
Commit
a7df94cc
authored
Oct 23, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
070907be
1d6d2a2d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
384 additions
and
0 deletions
+384
-0
ClusterDbConfig.java
...in/amos/boot/module/jxiop/biz/config/ClusterDbConfig.java
+34
-0
IdxBizFanWeightController.java
...odule/jxiop/biz/controller/IdxBizFanWeightController.java
+89
-0
IdxBizPvWeightController.java
...module/jxiop/biz/controller/IdxBizPvWeightController.java
+96
-0
IdxBizFanWeight.java
...in/amos/boot/module/jxiop/biz/entity/IdxBizFanWeight.java
+68
-0
IdxBizPvWeight.java
...oin/amos/boot/module/jxiop/biz/entity/IdxBizPvWeight.java
+70
-0
IdxBizFanWeightMapper.java
.../boot/module/jxiop/biz/mapper2/IdxBizFanWeightMapper.java
+13
-0
IdxBizPvWeightMapper.java
...s/boot/module/jxiop/biz/mapper2/IdxBizPvWeightMapper.java
+14
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/config/ClusterDbConfig.java
View file @
a7df94cc
...
...
@@ -2,7 +2,10 @@ package com.yeejoin.amos.boot.module.jxiop.biz.config;
import
com.alibaba.druid.pool.DruidDataSource
;
import
com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
;
import
com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean
;
import
com.github.pagehelper.PageInterceptor
;
import
org.apache.ibatis.plugin.Interceptor
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionFactoryBean
;
import
org.mybatis.spring.annotation.MapperScan
;
...
...
@@ -17,6 +20,7 @@ import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import
javax.sql.DataSource
;
import
java.sql.SQLException
;
import
java.util.Properties
;
/**
* 从数据源配置
...
...
@@ -69,7 +73,37 @@ public class ClusterDbConfig {
sessionFactory
.
setTypeAliasesPackage
(
"com.yeejoin.amos.boot.module.jxiop.biz.entity"
);
//mybatis 数据库字段与实体类属性驼峰映射配置
sessionFactory
.
getObject
().
getConfiguration
().
setMapUnderscoreToCamelCase
(
true
);
//分页插件
Interceptor
interceptor
=
new
PageInterceptor
();
Properties
properties
=
new
Properties
();
properties
.
setProperty
(
"helperDialect"
,
"mysql"
);
properties
.
setProperty
(
"offsetAsPageNum"
,
"true"
);
properties
.
setProperty
(
"rowBoundsWithCount"
,
"true"
);
properties
.
setProperty
(
"reasonable"
,
"true"
);
properties
.
setProperty
(
"supportMethodsArguments"
,
"true"
);
properties
.
setProperty
(
"params"
,
"pageNum=current;pageSize=size"
+
""
+
";"
);
interceptor
.
setProperties
(
properties
);
sessionFactory
.
setPlugins
(
new
Interceptor
[]
{
interceptor
,
paginationInterceptor
()
});
return
sessionFactory
.
getObject
();
}
@Bean
public
PaginationInterceptor
paginationInterceptor
()
{
PaginationInterceptor
paginationInterceptor
=
new
PaginationInterceptor
();
paginationInterceptor
.
setDialectType
(
"mysql"
);
return
paginationInterceptor
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanWeightController.java
0 → 100644
View file @
a7df94cc
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.PageHelper
;
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.mapper2.IdxBizFanWeightMapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
/**
* @description:
* @author: tw
* @createDate: 2023/10/23
*/
@RestController
@Api
(
tags
=
"Api"
)
@RequestMapping
(
value
=
"/idx_biz_fan_weight"
)
public
class
IdxBizFanWeightController
extends
BaseController
{
@Autowired
IdxBizFanWeightMapper
idxBizFanWeightMapper
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/queryPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
public
ResponseModel
<
Page
<
IdxBizFanWeight
>>
queryForDealerReviewPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
IdxBizFanWeight
reviewDto
)
{
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
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getStation
()),
IdxBizFanWeight:
:
getStation
,
reviewDto
.
getStation
());
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
.
orderByAsc
(
IdxBizFanWeight:
:
getType
);
PageHelper
.
startPage
(
current
,
size
);
List
<
IdxBizFanWeight
>
list
=
idxBizFanWeightMapper
.
selectList
(
qu
);
Page
<
IdxBizFanWeight
>
page
=
new
Page
();
page
.
setRecords
(
list
);
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
return
ResponseHelper
.
buildResponse
(
page
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/drop_down"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
public
ResponseModel
<
List
<
IdxBizFanWeight
>>
queryForDealerReviewPage
(
String
type
)
{
QueryWrapper
<
IdxBizFanWeight
>
qu
=
new
QueryWrapper
<>();
String
name
=
""
;
switch
(
type
){
case
"1"
:
name
=
"ARAE"
;
break
;
case
"2"
:
name
=
"STATION"
;
break
;
case
"3"
:
name
=
"EQUIPMENT_NAME"
;
break
;
case
"4"
:
name
=
"SUBARRAY"
;
break
;
case
"5"
:
name
=
"POINT_NAME"
;
break
;
}
qu
.
isNotNull
(
name
);
qu
.
groupBy
(
name
);
qu
.
orderByAsc
(
name
);
List
<
IdxBizFanWeight
>
list
=
idxBizFanWeightMapper
.
selectList
(
qu
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizPvWeightController.java
0 → 100644
View file @
a7df94cc
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.PageInfo
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvWeightMapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.annotations.Case
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
/**
* @description:
* @author: tw
* @createDate: 2023/10/23
*/
@RestController
@Api
(
tags
=
"Api"
)
@RequestMapping
(
value
=
"/idx_biz_pv_weight"
)
public
class
IdxBizPvWeightController
extends
BaseController
{
@Autowired
IdxBizPvWeightMapper
idxBizPvWeightMapper
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@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
)
{
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
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getStation
()),
IdxBizPvWeight:
:
getStation
,
reviewDto
.
getStation
());
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
.
orderByAsc
(
IdxBizPvWeight:
:
getType
);
PageHelper
.
startPage
(
current
,
size
);
List
<
IdxBizPvWeight
>
list
=
idxBizPvWeightMapper
.
selectList
(
qu
);
Page
<
IdxBizPvWeight
>
page
=
new
Page
();
page
.
setRecords
(
list
);
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
return
ResponseHelper
.
buildResponse
(
page
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/drop_down"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
public
ResponseModel
<
List
<
IdxBizPvWeight
>>
queryForDealerReviewPage
(
String
type
)
{
QueryWrapper
<
IdxBizPvWeight
>
qu
=
new
QueryWrapper
<>();
String
name
=
""
;
switch
(
type
){
case
"1"
:
name
=
"ARAE"
;
break
;
case
"2"
:
name
=
"STATION"
;
break
;
case
"3"
:
name
=
"EQUIPMENT_NAME"
;
break
;
case
"4"
:
name
=
"SUBARRAY"
;
break
;
case
"5"
:
name
=
"POINT_NAME"
;
break
;
}
qu
.
isNotNull
(
name
);
qu
.
groupBy
(
name
);
qu
.
orderByAsc
(
name
);
List
<
IdxBizPvWeight
>
list
=
idxBizPvWeightMapper
.
selectList
(
qu
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizFanWeight.java
0 → 100644
View file @
a7df94cc
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
/**
* @description:
* @author: tw
* @createDate: 2023/10/23
*/
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"idx_biz_fan_weight"
)
public
class
IdxBizFanWeight
{
/**
*
*/
@TableId
(
value
=
"sequence_nbr"
,
type
=
IdType
.
ID_WORKER
)
private
String
sequenceNbr
;
/**
* 片区
*/
@TableField
(
"ARAE"
)
private
String
arae
;
/**
* 场站
*/
@TableField
(
"STATION"
)
private
String
station
;
/**
* 设备名称
*/
@TableField
(
"EQUIPMENT_NAME"
)
private
String
equipmentName
;
/**
* 测点
*/
@TableField
(
"POINT_NAME"
)
private
String
pointName
;
/**
* 子阵
*/
@TableField
(
"SUBARRAY"
)
private
String
subarray
;
/**
* 类型
*/
@TableField
(
"TYPE"
)
private
String
type
;
/**
* 权重值
*/
@TableField
(
"VALUE"
)
private
Float
value
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizPvWeight.java
0 → 100644
View file @
a7df94cc
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
/**
* @description:
* @author: tw
* @createDate: 2023/10/23
*/
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"idx_biz_pv_weight"
)
public
class
IdxBizPvWeight
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableId
(
value
=
"sequence_nbr"
,
type
=
IdType
.
ID_WORKER
)
private
String
sequenceNbr
;
/**
* 片区
*/
@TableField
(
"ARAE"
)
private
String
arae
;
/**
* 场站
*/
@TableField
(
"STATION"
)
private
String
station
;
/**
* 设备名称
*/
@TableField
(
"EQUIPMENT_NAME"
)
private
String
equipmentName
;
/**
* 测点
*/
@TableField
(
"POINT_NAME"
)
private
String
pointName
;
/**
* 子阵
*/
@TableField
(
"SUBARRAY"
)
private
String
subarray
;
/**
* 类型
*/
@TableField
(
"TYPE"
)
private
String
type
;
/**
* 权重值
*/
@TableField
(
"VALUE"
)
private
Float
value
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizFanWeightMapper.java
0 → 100644
View file @
a7df94cc
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWeight
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFelk
;
/**
* @description:
* @author: tw
* @createDate: 2023/10/23
*/
public
interface
IdxBizFanWeightMapper
extends
BaseMapper
<
IdxBizFanWeight
>
{
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizPvWeightMapper.java
0 → 100644
View file @
a7df94cc
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight
;
/**
* @description:
* @author: tw
* @createDate: 2023/10/23
*/
public
interface
IdxBizPvWeightMapper
extends
BaseMapper
<
IdxBizPvWeight
>
{
}
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