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
90f73fe8
Commit
90f73fe8
authored
Jul 24, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改评价统计更新与组合查询
parent
1480d0df
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
0 deletions
+51
-0
bill-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
...er/src/main/java/com/mortals/xhx/common/key/RedisKey.java
+10
-0
bill-manager/src/main/java/com/mortals/xhx/daemon/task/SiteStatTaskImpl.java
...in/java/com/mortals/xhx/daemon/task/SiteStatTaskImpl.java
+28
-0
bill-manager/src/main/java/com/mortals/xhx/module/ph/web/PhQueueStatController.java
.../com/mortals/xhx/module/ph/web/PhQueueStatController.java
+3
-0
bill-manager/src/main/java/com/mortals/xhx/module/pj/web/PjEvaluateStatController.java
...m/mortals/xhx/module/pj/web/PjEvaluateStatController.java
+10
-0
No files found.
bill-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
View file @
90f73fe8
...
...
@@ -22,6 +22,11 @@ public class RedisKey {
*/
public
static
final
String
KEY_SITE_QUEUE_WINDOW_CHCHE
=
"site:queue:window:"
;
/**
* 站点--排号--大厅--count
*/
public
static
final
String
KEY_SITE_QUEUE_HALLNAME_CHCHE
=
"site:queue:hallname:"
;
/**
...
...
@@ -34,4 +39,9 @@ public class RedisKey {
*/
public
static
final
String
KEY_SITE_PJ_WINDOW_CHCHE
=
"site:pj:window:"
;
/**
* 站点--评价--大厅--count
*/
public
static
final
String
KEY_SITE_PJ_HALLNAME_CHCHE
=
"site:pj:hallname:"
;
}
bill-manager/src/main/java/com/mortals/xhx/daemon/task/SiteStatTaskImpl.java
View file @
90f73fe8
...
...
@@ -68,10 +68,12 @@ public class SiteStatTaskImpl implements ITaskExcuteService {
for
(
SitePdu
site
:
sitePduList
)
{
updatePjSectionCache
(
site
);
updatePjWindowCache
(
site
);
updatePjHallNameCache
(
site
);
updatePhQueueBusniessCache
(
site
);
updatePhQueueSectionNameCache
(
site
);
updatePhQueueWindowsCache
(
site
);
updatePhQueueHallNameCache
(
site
);
}
}
}
...
...
@@ -115,6 +117,19 @@ public class SiteStatTaskImpl implements ITaskExcuteService {
}
}
private
void
updatePhQueueHallNameCache
(
SitePdu
site
)
{
PhQueueStatQuery
phQueueStatQuery
=
new
PhQueueStatQuery
();
phQueueStatQuery
.
setSiteId
(
site
.
getId
());
phQueueStatQuery
.
setHallNameNotList
(
Arrays
.
asList
(
""
));
List
<
PhQueueStatEntity
>
phQueueStatEntities
=
phQueueStatService
.
find
(
phQueueStatQuery
,
null
);
if
(!
ObjectUtils
.
isEmpty
(
phQueueStatEntities
))
{
cacheService
.
del
(
RedisKey
.
KEY_SITE_QUEUE_HALLNAME_CHCHE
+
site
.
getId
());
for
(
PhQueueStatEntity
phQueueStatEntity
:
phQueueStatEntities
)
{
cacheService
.
hset
(
RedisKey
.
KEY_SITE_QUEUE_HALLNAME_CHCHE
+
site
.
getId
(),
phQueueStatEntity
.
getHallName
(),
phQueueStatEntity
.
getPhCount
());
}
}
}
private
void
updatePjSectionCache
(
SitePdu
site
)
{
...
...
@@ -143,6 +158,19 @@ public class SiteStatTaskImpl implements ITaskExcuteService {
}
}
private
void
updatePjHallNameCache
(
SitePdu
site
)
{
PjEvaluateStatQuery
pjEvaluateStatQuery
=
new
PjEvaluateStatQuery
();
pjEvaluateStatQuery
.
setSiteId
(
site
.
getId
());
pjEvaluateStatQuery
.
setHallNameNotList
(
Arrays
.
asList
(
""
));
List
<
PjEvaluateStatEntity
>
pjEvaluateStatEntities
=
pjEvaluateStatService
.
find
(
pjEvaluateStatQuery
,
null
);
if
(!
ObjectUtils
.
isEmpty
(
pjEvaluateStatEntities
))
{
cacheService
.
del
(
RedisKey
.
KEY_SITE_PJ_HALLNAME_CHCHE
+
site
.
getId
());
for
(
PjEvaluateStatEntity
pjEvaluateStatEntity
:
pjEvaluateStatEntities
)
{
cacheService
.
hset
(
RedisKey
.
KEY_SITE_PJ_HALLNAME_CHCHE
+
site
.
getId
(),
pjEvaluateStatEntity
.
getHallName
(),
pjEvaluateStatEntity
.
getPjCount
());
}
}
}
private
void
statByDate
()
{
SitePdu
sitePdu
=
new
SitePdu
();
sitePdu
.
setSize
(-
1
);
...
...
bill-manager/src/main/java/com/mortals/xhx/module/ph/web/PhQueueStatController.java
View file @
90f73fe8
...
...
@@ -7,6 +7,7 @@ import com.mortals.framework.annotation.UnAuth;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.util.ThreadPool
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
...
...
@@ -52,6 +53,8 @@ public class PhQueueStatController extends BaseCRUDJsonBodyMappingController<PhQ
private
ISiteFeign
siteFeign
;
@Autowired
private
PhQueueStatService
phQueueStatService
;
@Autowired
private
ICacheService
cacheService
;
public
PhQueueStatController
()
{
super
.
setModuleDesc
(
"排队叫号汇总统计"
);
...
...
bill-manager/src/main/java/com/mortals/xhx/module/pj/web/PjEvaluateStatController.java
View file @
90f73fe8
...
...
@@ -6,8 +6,10 @@ import cn.hutool.core.date.DateUtil;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.util.ThreadPool
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.common.key.RedisKey
;
import
com.mortals.xhx.common.pdu.RespData
;
import
com.mortals.xhx.common.pdu.site.SitePdu
;
import
com.mortals.xhx.feign.site.ISiteFeign
;
...
...
@@ -48,6 +50,8 @@ public class PjEvaluateStatController extends BaseCRUDJsonBodyMappingController<
private
ISiteFeign
siteFeign
;
@Autowired
private
PjEvaluateStatService
pjEvaluateStatService
;
@Autowired
private
ICacheService
cacheService
;
public
PjEvaluateStatController
()
{
super
.
setModuleDesc
(
"评价汇总统计"
);
...
...
@@ -61,12 +65,18 @@ public class PjEvaluateStatController extends BaseCRUDJsonBodyMappingController<
//通过站点 查询存在的部门 大厅等
Object
siteId
=
model
.
get
(
"siteId"
);
if
(!
ObjectUtils
.
isEmpty
(
siteId
))
{
/*
PjEvaluateStatQuery pjEvaluateStatQuery = new PjEvaluateStatQuery();
pjEvaluateStatQuery.setSiteId((Long) siteId);
List<PjEvaluateStatEntity> pjEvaluateStatEntities = this.service.find(pjEvaluateStatQuery, context);
Map<String, String> sectionNameMap = pjEvaluateStatEntities.parallelStream().filter(f -> !ObjectUtils.isEmpty(f.getSectionName())).collect(Collectors.toMap(PjEvaluateStatEntity::getSectionName, PjEvaluateStatEntity::getSectionName, (k1, k2) -> k2));
Map<String, String> hallNameMap = pjEvaluateStatEntities.parallelStream().filter(f -> !ObjectUtils.isEmpty(f.getHallName())).collect(Collectors.toMap(PjEvaluateStatEntity::getHallName, PjEvaluateStatEntity::getHallName, (k1, k2) -> k2));
Map<String, String> windowFromnumMap = pjEvaluateStatEntities.parallelStream().filter(f -> !ObjectUtils.isEmpty(f.getWindowFromnum())).collect(Collectors.toMap(PjEvaluateStatEntity::getWindowFromnum, PjEvaluateStatEntity::getWindowFromnum, (k1, k2) -> k2));
*/
Map
<
String
,
String
>
sectionNameMap
=
cacheService
.
hgetAll
(
RedisKey
.
KEY_SITE_PJ_SECTIONNAME_CHCHE
+
siteId
);
Map
<
String
,
String
>
hallNameMap
=
cacheService
.
hgetAll
(
RedisKey
.
KEY_SITE_PJ_HALLNAME_CHCHE
+
siteId
);
Map
<
String
,
String
>
windowFromnumMap
=
cacheService
.
hgetAll
(
RedisKey
.
KEY_SITE_PJ_WINDOW_CHCHE
+
siteId
);
this
.
addDict
(
model
,
"sectionNameList"
,
sectionNameMap
);
this
.
addDict
(
model
,
"hallNameList"
,
hallNameMap
);
...
...
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