Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bill-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
bill-platform
Commits
ade7cf56
Commit
ade7cf56
authored
Jun 27, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改统计报表
parent
02407efc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
42 deletions
+45
-42
bill-manager/src/main/java/com/mortals/xhx/module/ph/service/PhQueueStatService.java
...com/mortals/xhx/module/ph/service/PhQueueStatService.java
+1
-1
bill-manager/src/main/java/com/mortals/xhx/module/ph/service/impl/PhQueueStatServiceImpl.java
...ls/xhx/module/ph/service/impl/PhQueueStatServiceImpl.java
+30
-20
bill-manager/src/main/java/com/mortals/xhx/module/pj/service/PjEvaluateStatService.java
.../mortals/xhx/module/pj/service/PjEvaluateStatService.java
+1
-1
bill-manager/src/main/java/com/mortals/xhx/module/pj/service/impl/PjEvaluateStatServiceImpl.java
...xhx/module/pj/service/impl/PjEvaluateStatServiceImpl.java
+13
-20
No files found.
bill-manager/src/main/java/com/mortals/xhx/module/ph/service/PhQueueStatService.java
View file @
ade7cf56
...
...
@@ -25,7 +25,7 @@ public interface PhQueueStatService extends ICRUDService<PhQueueStatEntity,Long>
Rest
<
Void
>
updateSitePhStat
(
PhQueueStatEntity
entity
,
Context
context
);
List
<
PhQueueStatEntity
>
getBillInfos
(
PhQueueStatQuery
query
,
Integer
datePattern
,
PageInfo
pageInfo
,
Context
context
);
List
<
PhQueueStatEntity
>
getBillInfos
(
PhQueueStatQuery
query
,
PageInfo
pageInfo
,
Context
context
);
}
\ No newline at end of file
bill-manager/src/main/java/com/mortals/xhx/module/ph/service/impl/PhQueueStatServiceImpl.java
View file @
ade7cf56
...
...
@@ -4,7 +4,9 @@ import com.mortals.framework.common.Rest;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.xhx.common.code.TimeUnitEnum
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.ph.model.PhQueueEntity
;
import
com.mortals.xhx.module.ph.model.PhQueueQuery
;
import
com.mortals.xhx.module.ph.model.PhQueueStatQuery
;
...
...
@@ -12,6 +14,7 @@ import com.mortals.xhx.module.ph.service.PhQueueService;
import
com.mortals.xhx.module.pj.model.PjEvaluateEntity
;
import
com.mortals.xhx.module.pj.model.PjEvaluateStatEntity
;
import
com.mortals.xhx.module.pj.model.PjEvaluateStatQuery
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
...
...
@@ -162,7 +165,7 @@ public class PhQueueStatServiceImpl extends AbstractCRUDServiceImpl<PhQueueStatD
Map
<
String
,
List
<
PhQueueEntity
>>
collect
=
phQueueEntities
.
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getSectionName
()));
collect
.
entrySet
().
stream
().
forEach
(
item
->
{
String
hallName
=
item
.
getKey
();
if
(
ObjectUtils
.
isEmpty
(
hallName
))
return
;
if
(
ObjectUtils
.
isEmpty
(
hallName
))
return
;
List
<
PhQueueEntity
>
value
=
item
.
getValue
();
Double
intAvg
=
value
.
stream
().
mapToInt
(
e
->
e
.
getWaitTime
()).
average
().
orElse
(
0
D
);
log
.
info
(
"更新站点评价统计数据,站点名称:{},日期:{},大厅:{},评价数量:{}"
,
entity
.
getSiteName
(),
currentDate
,
entity
.
getHallName
(),
phQueueEntities
.
size
());
...
...
@@ -207,7 +210,7 @@ public class PhQueueStatServiceImpl extends AbstractCRUDServiceImpl<PhQueueStatD
Map
<
String
,
List
<
PhQueueEntity
>>
collect
=
phQueueEntities
.
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getSectionName
()));
collect
.
entrySet
().
stream
().
forEach
(
item
->
{
String
bussiness
=
item
.
getKey
();
if
(
ObjectUtils
.
isEmpty
(
bussiness
))
return
;
if
(
ObjectUtils
.
isEmpty
(
bussiness
))
return
;
List
<
PhQueueEntity
>
value
=
item
.
getValue
();
Double
intAvg
=
value
.
stream
().
mapToInt
(
e
->
e
.
getWaitTime
()).
average
().
orElse
(
0
D
);
log
.
info
(
"更新站点评价统计数据,站点名称:{},日期:{},业务:{},评价数量:{}"
,
entity
.
getSiteName
(),
currentDate
,
entity
.
getBusiness
(),
phQueueEntities
.
size
());
...
...
@@ -251,7 +254,7 @@ public class PhQueueStatServiceImpl extends AbstractCRUDServiceImpl<PhQueueStatD
Map
<
String
,
List
<
PhQueueEntity
>>
collect
=
phQueueEntities
.
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getSectionName
()));
collect
.
entrySet
().
stream
().
forEach
(
item
->
{
String
window
=
item
.
getKey
();
if
(
ObjectUtils
.
isEmpty
(
window
))
return
;
if
(
ObjectUtils
.
isEmpty
(
window
))
return
;
List
<
PhQueueEntity
>
value
=
item
.
getValue
();
Double
intAvg
=
value
.
stream
().
mapToInt
(
e
->
e
.
getWaitTime
()).
average
().
orElse
(
0
D
);
log
.
info
(
"更新站点评价统计数据,站点名称:{},日期:{},业务:{},评价数量:{}"
,
entity
.
getSiteName
(),
currentDate
,
entity
.
getBusiness
(),
phQueueEntities
.
size
());
...
...
@@ -292,24 +295,31 @@ public class PhQueueStatServiceImpl extends AbstractCRUDServiceImpl<PhQueueStatD
@Override
public
List
<
PhQueueStatEntity
>
getBillInfos
(
PhQueueStatQuery
query
,
Integer
datePattern
,
PageInfo
pageInfo
,
Context
context
)
{
List
<
PhQueueStatEntity
>
statList
=
new
ArrayList
<>();
if
(
datePattern
==
TimeUnitEnum
.
DAY
.
getValue
())
{
query
.
setGroupList
(
Arrays
.
asList
(
"day"
));
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"month"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"day"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
statList
=
this
.
getDao
().
getStatList
(
query
,
pageInfo
);
}
else
if
(
datePattern
==
TimeUnitEnum
.
MONTH
.
getValue
())
{
query
.
setGroupList
(
Arrays
.
asList
(
"month"
));
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"month"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
statList
=
this
.
getDao
().
getStatList
(
query
,
pageInfo
);
}
else
if
(
datePattern
==
TimeUnitEnum
.
YEAR
.
getValue
())
{
query
.
setGroupList
(
Arrays
.
asList
(
"year"
));
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
statList
=
this
.
getDao
().
getStatList
(
query
,
pageInfo
);
}
else
{
throw
new
AppException
(
"不支持当前日期格式查询统计!"
);
public
Result
<
PhQueueStatEntity
>
find
(
PhQueueStatEntity
entity
,
PageInfo
pageInfo
,
Context
context
)
throws
AppException
{
Result
<
PhQueueStatEntity
>
result
=
new
Result
<>();
PhQueueStatQuery
query
=
new
PhQueueStatQuery
();
BeanUtils
.
copyProperties
(
entity
,
query
,
BeanUtil
.
getNullPropertyNames
(
entity
));
List
<
PhQueueStatEntity
>
billInfos
=
this
.
getBillInfos
(
query
,
pageInfo
,
context
);
result
.
setList
(
billInfos
);
result
.
setPageInfo
(
pageInfo
);
return
super
.
find
(
entity
,
pageInfo
,
context
);
}
@Override
public
List
<
PhQueueStatEntity
>
getBillInfos
(
PhQueueStatQuery
query
,
PageInfo
pageInfo
,
Context
context
)
{
if
(!
ObjectUtils
.
isEmpty
(
query
.
getGroupList
()))
{
//针对groupList分组 进行排序
if
(
query
.
getGroupList
().
contains
(
"year"
)
&&
query
.
getGroupList
().
contains
(
"month"
)
&&
query
.
getGroupList
().
contains
(
"day"
))
{
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"month"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"day"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
}
else
if
(
query
.
getGroupList
().
contains
(
"year"
)
&&
query
.
getGroupList
().
contains
(
"month"
))
{
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"month"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
}
else
if
(
query
.
getGroupList
().
contains
(
"year"
))
{
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
}
}
return
statList
;
return
this
.
getDao
().
getStatList
(
query
,
pageInfo
)
;
}
}
\ No newline at end of file
bill-manager/src/main/java/com/mortals/xhx/module/pj/service/PjEvaluateStatService.java
View file @
ade7cf56
...
...
@@ -30,7 +30,7 @@ public interface PjEvaluateStatService extends ICRUDService<PjEvaluateStatEntity
Rest
<
Void
>
updateSitePjStat
(
PjEvaluateStatEntity
entity
,
Context
context
);
List
<
PjEvaluateStatEntity
>
getBillInfos
(
PjEvaluateStatQuery
query
,
Integer
datePattern
,
PageInfo
pageInfo
,
Context
context
);
List
<
PjEvaluateStatEntity
>
getBillInfos
(
PjEvaluateStatQuery
query
,
PageInfo
pageInfo
,
Context
context
);
}
\ No newline at end of file
bill-manager/src/main/java/com/mortals/xhx/module/pj/service/impl/PjEvaluateStatServiceImpl.java
View file @
ade7cf56
...
...
@@ -47,8 +47,7 @@ public class PjEvaluateStatServiceImpl extends AbstractCRUDServiceImpl<PjEvaluat
Result
<
PjEvaluateStatEntity
>
result
=
new
Result
<>();
PjEvaluateStatQuery
query
=
new
PjEvaluateStatQuery
();
BeanUtils
.
copyProperties
(
entity
,
query
,
BeanUtil
.
getNullPropertyNames
(
entity
));
List
<
PjEvaluateStatEntity
>
billInfos
=
this
.
getBillInfos
(
query
,
TimeUnitEnum
.
DAY
.
getValue
(),
pageInfo
,
context
);
List
<
PjEvaluateStatEntity
>
billInfos
=
this
.
getBillInfos
(
query
,
pageInfo
,
context
);
result
.
setList
(
billInfos
);
result
.
setPageInfo
(
pageInfo
);
return
result
;
...
...
@@ -59,7 +58,7 @@ public class PjEvaluateStatServiceImpl extends AbstractCRUDServiceImpl<PjEvaluat
//todo 统计站点评价 分站点--部门 ||窗口编号||评价选项 ==》评价数量
//查询指定日期当前站点所有评价数量
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
entity
.
getYear
(),
entity
.
getMonth
()
-
1
,
entity
.
getDay
());
calendar
.
set
(
entity
.
getYear
(),
entity
.
getMonth
()
-
1
,
entity
.
getDay
());
SimpleDateFormat
date
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
//yyyy-年,MM-月,dd-日,HH-时,mm-分,ss-秒
String
currentDate
=
date
.
format
(
calendar
.
getTime
());
...
...
@@ -291,23 +290,17 @@ public class PjEvaluateStatServiceImpl extends AbstractCRUDServiceImpl<PjEvaluat
@Override
public
List
<
PjEvaluateStatEntity
>
getBillInfos
(
PjEvaluateStatQuery
query
,
Integer
datePattern
,
PageInfo
pageInfo
,
Context
context
)
{
List
<
PjEvaluateStatEntity
>
statList
=
new
ArrayList
<>();
if
(
datePattern
==
TimeUnitEnum
.
DAY
.
getValue
())
{
query
.
setGroupList
(
Arrays
.
asList
(
"year"
,
"month"
,
"day"
));
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"month"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"day"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
statList
=
this
.
getDao
().
getStatList
(
query
,
pageInfo
);
}
else
if
(
datePattern
==
TimeUnitEnum
.
MONTH
.
getValue
())
{
query
.
setGroupList
(
Arrays
.
asList
(
"year"
,
"month"
));
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"month"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
statList
=
this
.
getDao
().
getStatList
(
query
,
pageInfo
);
}
else
if
(
datePattern
==
TimeUnitEnum
.
YEAR
.
getValue
())
{
query
.
setGroupList
(
Arrays
.
asList
(
"year"
));
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
statList
=
this
.
getDao
().
getStatList
(
query
,
pageInfo
);
}
else
{
throw
new
AppException
(
"不支持当前日期格式查询统计!"
);
public
List
<
PjEvaluateStatEntity
>
getBillInfos
(
PjEvaluateStatQuery
query
,
PageInfo
pageInfo
,
Context
context
)
{
if
(!
ObjectUtils
.
isEmpty
(
query
.
getGroupList
()))
{
//针对groupList分组 进行排序
if
(
query
.
getGroupList
().
contains
(
"year"
)
&&
query
.
getGroupList
().
contains
(
"month"
)
&&
query
.
getGroupList
().
contains
(
"day"
))
{
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"month"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"day"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
}
else
if
(
query
.
getGroupList
().
contains
(
"year"
)
&&
query
.
getGroupList
().
contains
(
"month"
))
{
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"month"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
}
else
if
(
query
.
getGroupList
().
contains
(
"year"
))
{
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
}
}
return
statList
;
return
this
.
getDao
().
getStatList
(
query
,
pageInfo
)
;
}
}
\ No newline at end of file
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