Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_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
赵啸非
smart_gov_platform
Commits
ffad5b8d
Commit
ffad5b8d
authored
Jan 29, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改大厅查询
parent
a5f2dd07
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
21 deletions
+61
-21
base-manager/src/main/java/com/mortals/xhx/daemon/task/StatSiteDeptMatterTaskImpl.java
...m/mortals/xhx/daemon/task/StatSiteDeptMatterTaskImpl.java
+51
-18
base-manager/src/main/java/com/mortals/xhx/module/matter/service/MatterService.java
.../com/mortals/xhx/module/matter/service/MatterService.java
+2
-1
base-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterServiceImpl.java
...als/xhx/module/matter/service/impl/MatterServiceImpl.java
+1
-1
base-manager/src/main/resources/sqlmap/module/window/WindowMapperExt.xml
...c/main/resources/sqlmap/module/window/WindowMapperExt.xml
+1
-0
common-lib/src/main/java/com/mortals/xhx/common/keys/RedisCacheKeys.java
...main/java/com/mortals/xhx/common/keys/RedisCacheKeys.java
+6
-1
No files found.
base-manager/src/main/java/com/mortals/xhx/daemon/task/StatSiteDeptMatterTaskImpl.java
View file @
ffad5b8d
package
com.mortals.xhx.daemon.task
;
package
com.mortals.xhx.daemon.task
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.service.ITask
;
import
com.mortals.framework.service.ITask
;
import
com.mortals.framework.service.ITaskExcuteService
;
import
com.mortals.framework.service.ITaskExcuteService
;
import
com.mortals.xhx.common.code.SourceEnum
;
import
com.mortals.xhx.common.code.SourceEnum
;
import
com.mortals.xhx.common.keys.RedisCacheKeys
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptQuery
;
import
com.mortals.xhx.module.dept.model.DeptQuery
;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dept.service.DeptService
;
...
@@ -11,18 +14,16 @@ import com.mortals.xhx.module.matter.model.MatterEntity;
...
@@ -11,18 +14,16 @@ import com.mortals.xhx.module.matter.model.MatterEntity;
import
com.mortals.xhx.module.matter.model.MatterQuery
;
import
com.mortals.xhx.module.matter.model.MatterQuery
;
import
com.mortals.xhx.module.matter.service.MatterService
;
import
com.mortals.xhx.module.matter.service.MatterService
;
import
com.mortals.xhx.module.matters.service.MattersService
;
import
com.mortals.xhx.module.matters.service.MattersService
;
import
com.mortals.xhx.module.site.model.SiteEntity
;
import
com.mortals.xhx.module.site.model.*
;
import
com.mortals.xhx.module.site.model.SiteMatterQuery
;
import
com.mortals.xhx.module.site.model.SiteQuery
;
import
com.mortals.xhx.module.site.service.SiteMatterService
;
import
com.mortals.xhx.module.site.service.SiteMatterService
;
import
com.mortals.xhx.module.site.service.SiteService
;
import
com.mortals.xhx.module.site.service.SiteService
;
import
com.mortals.xhx.module.site.service.SiteThemeService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Arrays
;
import
java.util.*
;
import
java.util.Date
;
import
java.util.stream.Collectors
;
import
java.util.List
;
/**
/**
* 统计站点部门事项
* 统计站点部门事项
...
@@ -35,7 +36,13 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService {
...
@@ -35,7 +36,13 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService {
@Autowired
@Autowired
private
MatterService
matterService
;
private
MatterService
matterService
;
@Autowired
@Autowired
private
SiteService
siteService
;
private
SiteService
siteService
;
@Autowired
private
ICacheService
cacheService
;
@Autowired
private
SiteThemeService
siteThemeService
;
@Override
@Override
...
@@ -47,21 +54,47 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService {
...
@@ -47,21 +54,47 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService {
DeptQuery
query
=
new
DeptQuery
();
DeptQuery
query
=
new
DeptQuery
();
query
.
setSiteId
(
siteEntity
.
getId
());
query
.
setSiteId
(
siteEntity
.
getId
());
List
<
DeptEntity
>
deptEntities
=
deptService
.
find
(
query
);
List
<
DeptEntity
>
deptEntities
=
deptService
.
find
(
query
);
for
(
DeptEntity
deptEntity
:
deptEntities
)
{
for
(
DeptEntity
deptEntity
:
deptEntities
)
{
MatterQuery
matterQuery
=
new
MatterQuery
();
MatterQuery
matterQuery
=
new
MatterQuery
();
matterQuery
.
setEventTypeShowNotList
(
Arrays
.
asList
(
"行政处罚"
));
matterQuery
.
setEventTypeShowNotList
(
Arrays
.
asList
(
"行政处罚"
));
int
total
=
matterService
.
count
(
matterQuery
.
source
(
SourceEnum
.
政务网
.
getValue
()).
deptCode
(
deptEntity
.
getDeptNumber
()),
null
);
int
total
=
matterService
.
count
(
matterQuery
.
source
(
SourceEnum
.
政务网
.
getValue
()).
deptCode
(
deptEntity
.
getDeptNumber
()),
null
);
DeptEntity
deptQuery
=
new
DeptEntity
();
DeptEntity
deptQuery
=
new
DeptEntity
();
deptQuery
.
setTotal
(
total
);
deptQuery
.
setTotal
(
total
);
deptQuery
.
setUpdateTime
(
new
Date
());
deptQuery
.
setUpdateTime
(
new
Date
());
DeptEntity
condition
=
new
DeptEntity
();
DeptEntity
condition
=
new
DeptEntity
();
condition
.
setId
(
deptEntity
.
getId
());
condition
.
setId
(
deptEntity
.
getId
());
deptService
.
getDao
().
update
(
deptQuery
,
condition
);
deptService
.
getDao
().
update
(
deptQuery
,
condition
);
}
}
}
}
//分组暂存 站点 个人企业 主题
Map
<
String
,
List
<
SiteThemeEntity
>>
collect
=
siteThemeService
.
find
(
new
SiteThemeQuery
())
.
parallelStream
()
.
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getSiteId
()
+
"_"
+
x
.
getUserType
()
+
"_"
+
x
.
getThemeCode
()
));
Iterator
<
Map
.
Entry
<
String
,
List
<
SiteThemeEntity
>>>
iterator
=
collect
.
entrySet
().
iterator
();
while
(
iterator
.
hasNext
())
{
Map
.
Entry
<
String
,
List
<
SiteThemeEntity
>>
next
=
iterator
.
next
();
if
(
next
.
getValue
().
size
()
==
0
)
{
iterator
.
remove
();
}
}
//重新 构建redis siteId+userType= >themeCodelist
List
<
SiteThemeEntity
>
themeEntities
=
collect
.
values
().
stream
().
flatMap
(
i
->
i
.
stream
()).
collect
(
Collectors
.
toList
());
themeEntities
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getSiteId
()
+
"_"
+
x
.
getUserType
()))
.
entrySet
()
.
stream
()
.
forEach
(
item
->
{
String
key
=
item
.
getKey
();
List
<
SiteThemeEntity
>
values
=
item
.
getValue
();
String
[]
split
=
key
.
split
(
"_"
);
String
siteId
=
split
[
0
];
String
userType
=
split
[
1
];
cacheService
.
hset
(
RedisCacheKeys
.
getSiteUserTypeThemeCodeKey
()
+
siteId
,
userType
,
JSONObject
.
toJSONString
(
values
));
});
}
}
@Override
@Override
...
...
base-manager/src/main/java/com/mortals/xhx/module/matter/service/MatterService.java
View file @
ffad5b8d
...
@@ -5,6 +5,7 @@ import com.mortals.framework.exception.AppException;
...
@@ -5,6 +5,7 @@ import com.mortals.framework.exception.AppException;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.service.ICRUDCacheService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.matter.dao.MatterDao
;
import
com.mortals.xhx.module.matter.dao.MatterDao
;
import
com.mortals.xhx.module.matter.model.MatterEntity
;
import
com.mortals.xhx.module.matter.model.MatterEntity
;
...
@@ -23,7 +24,7 @@ import java.util.Map;
...
@@ -23,7 +24,7 @@ import java.util.Map;
* @author zxfei
* @author zxfei
* @date 2022-01-12
* @date 2022-01-12
*/
*/
public
interface
MatterService
extends
ICRUDService
<
MatterEntity
,
Long
>
{
public
interface
MatterService
extends
ICRUD
Cache
Service
<
MatterEntity
,
Long
>
{
MatterDao
getDao
();
MatterDao
getDao
();
...
...
base-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterServiceImpl.java
View file @
ffad5b8d
...
@@ -61,7 +61,7 @@ import java.util.stream.Collectors;
...
@@ -61,7 +61,7 @@ import java.util.stream.Collectors;
*/
*/
@Service
(
"matterService"
)
@Service
(
"matterService"
)
@Slf4j
@Slf4j
public
class
MatterServiceImpl
extends
AbstractCRUDServiceImpl
<
MatterDao
,
MatterEntity
,
Long
>
implements
MatterService
{
public
class
MatterServiceImpl
extends
AbstractCRUD
Cache
ServiceImpl
<
MatterDao
,
MatterEntity
,
Long
>
implements
MatterService
{
@Autowired
@Autowired
private
SiteMatterService
siteMatterService
;
private
SiteMatterService
siteMatterService
;
@Autowired
@Autowired
...
...
base-manager/src/main/resources/sqlmap/module/window/WindowMapperExt.xml
View file @
ffad5b8d
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
and a.siteId = #{condition.siteId}
and a.siteId = #{condition.siteId}
</if>
</if>
</trim>
</trim>
</select>
</select>
<!-- 获取事项差集列表列表 -->
<!-- 获取事项差集列表列表 -->
...
...
common-lib/src/main/java/com/mortals/xhx/common/keys/RedisCacheKeys.java
View file @
ffad5b8d
...
@@ -49,5 +49,10 @@ public final class RedisCacheKeys {
...
@@ -49,5 +49,10 @@ public final class RedisCacheKeys {
public
static
String
getFlowSubKey
()
{
public
static
String
getFlowSubKey
()
{
return
"workflow:sub:key:"
;
return
"workflow:sub:key:"
;
}
}
public
static
String
getSiteUserTypeThemeCodeKey
()
{
return
"site:usertype:themecode:"
;
}
}
}
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