Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cmszMonitorAnalysis
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
liuna
cmszMonitorAnalysis
Commits
f0e48c5d
Commit
f0e48c5d
authored
Dec 21, 2017
by
liuna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2017年12月21日 智能分析平台提交内容
--增加省份带有全国字段的实体
parent
b7da7ec1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
138 additions
and
12 deletions
+138
-12
ProvinceAll.java
src/main/java/com/hp/cmsz/entity/ProvinceAll.java
+49
-0
ProvinceAllDao.java
src/main/java/com/hp/cmsz/repository/ProvinceAllDao.java
+20
-0
QualityRuleInfoDao.java
src/main/java/com/hp/cmsz/repository/QualityRuleInfoDao.java
+3
-3
ProvinceAllService.java
src/main/java/com/hp/cmsz/service/ProvinceAllService.java
+57
-0
QualityRuleInfoService.java
.../cmsz/service/analysissupport/QualityRuleInfoService.java
+9
-9
No files found.
src/main/java/com/hp/cmsz/entity/ProvinceAll.java
0 → 100644
View file @
f0e48c5d
package
com
.
hp
.
cmsz
.
entity
;
import
java.io.Serializable
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.SequenceGenerator
;
import
javax.persistence.Table
;
/**
* dim_province_all_info_t表对应的实体类
*
*
*
*/
@Entity
@Table
(
name
=
"dim_province_all_info_t"
)
public
class
ProvinceAll
implements
Serializable
{
private
Long
provinceId
;
//省份ID
private
String
provinceName
;
//省份名称
private
String
provinceCode
;
//省份编码
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
SEQUENCE
,
generator
=
"ProvinceSequence"
)
@SequenceGenerator
(
name
=
"ProvinceSequence"
,
sequenceName
=
"dim_province_info_t_seq"
,
allocationSize
=
1
)
public
Long
getProvinceId
()
{
return
provinceId
;
}
public
void
setProvinceId
(
Long
provinceId
)
{
this
.
provinceId
=
provinceId
;
}
public
String
getProvinceName
()
{
return
provinceName
;
}
public
void
setProvinceName
(
String
provinceName
)
{
this
.
provinceName
=
provinceName
;
}
public
String
getProvinceCode
()
{
return
provinceCode
;
}
public
void
setProvinceCode
(
String
provinceCode
)
{
this
.
provinceCode
=
provinceCode
;
}
}
\ No newline at end of file
src/main/java/com/hp/cmsz/repository/ProvinceAllDao.java
0 → 100644
View file @
f0e48c5d
package
com
.
hp
.
cmsz
.
repository
;
import
com.hp.cmsz.entity.ProvinceAll
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
java.util.List
;
public
interface
ProvinceAllDao
extends
JpaSpecificationExecutor
<
ProvinceAll
>,
PagingAndSortingRepository
<
ProvinceAll
,
Long
>
{
List
<
ProvinceAll
>
findByProvinceName
(
String
provinceName
);
List
<
ProvinceAll
>
findByProvinceIdIn
(
List
<
Long
>
provinceIds
);
List
<
ProvinceAll
>
findByProvinceId
(
Long
provinceId
);
@Query
(
"from ProvinceAll p where p.provinceId>=0 order by p.provinceId"
)
List
<
ProvinceAll
>
findProvince
();
}
src/main/java/com/hp/cmsz/repository/QualityRuleInfoDao.java
View file @
f0e48c5d
...
@@ -25,10 +25,10 @@ public interface QualityRuleInfoDao extends JpaSpecificationExecutor<QualityRule
...
@@ -25,10 +25,10 @@ public interface QualityRuleInfoDao extends JpaSpecificationExecutor<QualityRule
QualityRuleInfo
findByQualityRuleId
(
Long
qualityRuleId
);
QualityRuleInfo
findByQualityRuleId
(
Long
qualityRuleId
);
//根据筛选项查找
//根据筛选项查找
Page
<
QualityRuleInfo
>
findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndWarningTypeI
nAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc
(
List
<
Long
>
dataSource
,
List
<
Long
>
chnnal
,
List
<
Long
>
busines
,
List
<
Long
>
province
,
List
<
Long
>
ifFilter
,
List
<
String
>
ifWarning
,
Timestamp
startTime
,
Timestamp
endTime
,
Pageable
pageable
);
Page
<
QualityRuleInfo
>
findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndWarningTypeI
sNotAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc
(
List
<
Long
>
dataSource
,
List
<
Long
>
chnnal
,
List
<
Long
>
busines
,
List
<
Long
>
province
,
List
<
Long
>
ifFilter
,
String
ifWarning
,
Timestamp
startTime
,
Timestamp
endTime
,
Pageable
pageable
);
//
List<QualityRuleInfo> findByProvinceIdAndKpiIdAndWarningTypeIsNotAndBusinessTimeBetween(Long provinceId, Long kpiId,String type, Timestamp startTime, Timestamp endTime);
List
<
QualityRuleInfo
>
findByProvinceIdAndKpiIdAndWarningTypeIsNotAndBusinessTimeBetween
(
Long
provinceId
,
Long
kpiId
,
String
type
,
Timestamp
startTime
,
Timestamp
endTime
);
List
<
QualityRuleReport
>
findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc
(
Long
provinceId
,
Long
kpiId
,
Timestamp
startTime
,
Timestamp
endTime
);
//
List<QualityRuleReport> findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime);
}
}
src/main/java/com/hp/cmsz/service/ProvinceAllService.java
0 → 100644
View file @
f0e48c5d
package
com
.
hp
.
cmsz
.
service
;
import
java.util.List
;
import
com.hp.cmsz.entity.ProvinceAll
;
import
com.hp.cmsz.repository.ProvinceAllDao
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.hp.cmsz.repository.YwglTagDao
;
/**
*
*
*/
@Component
@Transactional
(
readOnly
=
true
)
public
class
ProvinceAllService
{
@Autowired
private
ProvinceAllDao
provinceAllDao
;
@Autowired
private
YwglTagDao
ywglTagDao
;
public
long
getProvinceSize
()
{
return
provinceAllDao
.
count
();
}
public
List
<
ProvinceAll
>
getProvinceList
()
{
return
(
List
<
ProvinceAll
>)
provinceAllDao
.
findAll
();
}
//业务规律省份地市 author Sophia
public
List
<
Object
[]>
getCityByProvince
(
List
<
Long
>
pro
){
return
(
List
<
Object
[]>)
ywglTagDao
.
findCityByProvince
(
pro
);
}
//有省份ID号得到省份的名称
public
String
getProvinceNameByProvinceIds
(
List
<
Long
>
provinceIds
){
List
<
ProvinceAll
>
provinces
=
provinceAllDao
.
findByProvinceIdIn
(
provinceIds
);
String
provinceStr
=
""
;
for
(
int
i
=
0
;
i
<
provinces
.
size
();
i
++){
if
(
i
==(
provinces
.
size
()-
1
)){
provinceStr
+=
provinces
.
get
(
i
).
getProvinceName
();
}
else
{
provinceStr
+=
provinces
.
get
(
i
).
getProvinceName
()+
" "
;
}
}
return
provinceStr
;
}
}
src/main/java/com/hp/cmsz/service/analysissupport/QualityRuleInfoService.java
View file @
f0e48c5d
...
@@ -39,20 +39,20 @@ public class QualityRuleInfoService {
...
@@ -39,20 +39,20 @@ public class QualityRuleInfoService {
}
}
//根据筛选项获取质量规则
//根据筛选项获取质量规则
public
Page
<
QualityRuleInfo
>
getQualityRuleInfoBy
(
QualityRuleInfo
qualityRuleInfo
,
int
pageNumber
,
int
pageSize
,
String
sortType
,
List
<
Long
>
dataSource
,
List
<
Long
>
chnnal
,
List
<
Long
>
busines
,
List
<
Long
>
province
,
List
<
Long
>
ifFilter
,
List
<
String
>
ifWarning
,
Timestamp
startTime
,
Timestamp
endTime
){
public
Page
<
QualityRuleInfo
>
getQualityRuleInfoBy
(
QualityRuleInfo
qualityRuleInfo
,
int
pageNumber
,
int
pageSize
,
String
sortType
,
List
<
Long
>
dataSource
,
List
<
Long
>
chnnal
,
List
<
Long
>
busines
,
List
<
Long
>
province
,
List
<
Long
>
ifFilter
,
String
ifWarning
,
Timestamp
startTime
,
Timestamp
endTime
){
PageRequest
pageRequest
=
buildPageRequest
(
pageNumber
,
pageSize
,
sortType
,
"qualityRuleId"
);
PageRequest
pageRequest
=
buildPageRequest
(
pageNumber
,
pageSize
,
sortType
,
"qualityRuleId"
);
return
qualityRuleInfoDao
.
findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndWarningTypeI
n
AndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc
(
dataSource
,
chnnal
,
busines
,
province
,
ifFilter
,
ifWarning
,
startTime
,
endTime
,
pageRequest
);
return
qualityRuleInfoDao
.
findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndWarningTypeI
sNot
AndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc
(
dataSource
,
chnnal
,
busines
,
province
,
ifFilter
,
ifWarning
,
startTime
,
endTime
,
pageRequest
);
}
}
// //根据省份ID、指标ID和业务时间查询质量规则运营明细
//根据省份ID、指标ID和业务时间查询质量规则运营明细
// public List<QualityRuleInfo> findBy(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime){
public
List
<
QualityRuleInfo
>
findBy
(
Long
provinceId
,
Long
kpiId
,
Timestamp
startTime
,
Timestamp
endTime
){
// return qualityRuleInfoDao.findByProvinceIdAndKpiIdAndWarningTypeIsNotAndBusinessTimeBetween(provinceId,kpiId,"正常",startTime,endTime);
return
qualityRuleInfoDao
.
findByProvinceIdAndKpiIdAndWarningTypeIsNotAndBusinessTimeBetween
(
provinceId
,
kpiId
,
"正常"
,
startTime
,
endTime
);
// }
public
List
<
QualityRuleReport
>
findBy
(
Long
provinceId
,
Long
kpiId
,
Timestamp
startTime
,
Timestamp
endTime
){
return
qualityRuleInfoDao
.
findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc
(
provinceId
,
kpiId
,
startTime
,
endTime
);
}
}
// public List<QualityRuleReport> findBy(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime){
// return qualityRuleInfoDao.findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(provinceId,kpiId,startTime,endTime);
// }
/**
/**
* 创建分页请求.
* 创建分页请求.
*/
*/
...
...
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