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
15aa9ec5
Commit
15aa9ec5
authored
Jan 03, 2024
by
“yiyousong”
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/smart_gov_platform
parents
0a0ab876
004353a9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
92 additions
and
45 deletions
+92
-45
base-manager/pom.xml
base-manager/pom.xml
+1
-1
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteMatterServiceImpl.java
...s/xhx/module/site/service/impl/SiteMatterServiceImpl.java
+16
-13
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowBusinessServiceImpl.java
...module/window/service/impl/WindowBusinessServiceImpl.java
+8
-8
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowServiceImpl.java
...als/xhx/module/window/service/impl/WindowServiceImpl.java
+61
-20
base-manager/src/main/resources/config/mybatis-sqlmap-config.xml
...nager/src/main/resources/config/mybatis-sqlmap-config.xml
+1
-1
base-manager/src/test/java/com/mortals/httpclient/matter/MatterController.http
.../java/com/mortals/httpclient/matter/MatterController.http
+5
-2
No files found.
base-manager/pom.xml
View file @
15aa9ec5
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
<profiles.log.path>
/home/mortals/app/logs
</profiles.log.path>
<profiles.log.path>
/home/mortals/app/logs
</profiles.log.path>
<profiles.log.level>
info
</profiles.log.level>
<profiles.log.level>
info
</profiles.log.level>
<package.environment>
build
</package.environment>
<package.environment>
build
</package.environment>
<skipUi>
fals
e
</skipUi>
<skipUi>
tru
e
</skipUi>
<profiles.holidayUrl>
https://timor.tech/api/holiday/year/
</profiles.holidayUrl>
<profiles.holidayUrl>
https://timor.tech/api/holiday/year/
</profiles.holidayUrl>
</properties>
</properties>
</profile>
</profile>
...
...
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteMatterServiceImpl.java
View file @
15aa9ec5
...
@@ -40,20 +40,23 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
...
@@ -40,20 +40,23 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
@Override
@Override
protected
void
findAfter
(
SiteMatterEntity
params
,
PageInfo
pageInfo
,
Context
context
,
List
<
SiteMatterEntity
>
list
)
throws
AppException
{
protected
void
findAfter
(
SiteMatterEntity
params
,
PageInfo
pageInfo
,
Context
context
,
List
<
SiteMatterEntity
>
list
)
throws
AppException
{
List
<
Long
>
matterIdlist
=
list
.
stream
().
map
(
item
->
item
.
getMatterId
()).
collect
(
Collectors
.
toList
());
Map
<
Long
,
MatterEntity
>
matterEntityMap
=
matterService
.
find
(
new
MatterQuery
().
idList
(
matterIdlist
)).
parallelStream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
(),
y
->
y
,
(
o
,
n
)
->
n
));
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
list
.
forEach
(
item
->
{
List
<
Long
>
matterIdlist
=
list
.
stream
().
map
(
item
->
item
.
getMatterId
()).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
item
.
getMatterId
()))
{
Map
<
Long
,
MatterEntity
>
matterEntityMap
=
matterService
.
find
(
new
MatterQuery
().
idList
(
matterIdlist
)).
parallelStream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
(),
y
->
y
,
(
o
,
n
)
->
n
));
MatterEntity
matterEntity
=
matterEntityMap
.
get
(
item
.
getMatterId
());
list
.
forEach
(
item
->
{
if
(!
ObjectUtils
.
isEmpty
(
matterEntity
))
{
if
(!
ObjectUtils
.
isEmpty
(
item
.
getMatterId
()))
{
item
.
setBelongDept
(
matterEntity
.
getBelongDept
());
MatterEntity
matterEntity
=
matterEntityMap
.
get
(
item
.
getMatterId
());
item
.
setWindowToTheSceneNum
(
matterEntity
.
getWindowToTheSceneNum
());
if
(!
ObjectUtils
.
isEmpty
(
matterEntity
))
{
item
.
setOnlineToTheSceneNum
(
matterEntity
.
getOnlineToTheSceneNum
());
item
.
setBelongDept
(
matterEntity
.
getBelongDept
());
item
.
setDeptCode
(
matterEntity
.
getDeptCode
());
item
.
setWindowToTheSceneNum
(
matterEntity
.
getWindowToTheSceneNum
());
item
.
setAreaCode
(
matterEntity
.
getAreaCode
());
item
.
setOnlineToTheSceneNum
(
matterEntity
.
getOnlineToTheSceneNum
());
item
.
setDeptCode
(
matterEntity
.
getDeptCode
());
item
.
setAreaCode
(
matterEntity
.
getAreaCode
());
}
}
}
}
}
);
}
);
}
super
.
findAfter
(
params
,
pageInfo
,
context
,
list
);
super
.
findAfter
(
params
,
pageInfo
,
context
,
list
);
}
}
...
...
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowBusinessServiceImpl.java
View file @
15aa9ec5
...
@@ -168,37 +168,37 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
...
@@ -168,37 +168,37 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
*/
*/
@Override
@Override
protected
void
removeBefore
(
Long
[]
ids
,
Context
context
)
throws
AppException
{
protected
void
removeBefore
(
Long
[]
ids
,
Context
context
)
throws
AppException
{
Arrays
.
asList
(
ids
).
forEach
(
id
->
{
/*
Arrays.asList(ids).forEach(id -> {
WindowBusinessEntity windowBusinessEntity = this.get(id, context);
WindowBusinessEntity windowBusinessEntity = this.get(id, context);
pushChangeMsg(windowBusinessEntity);
pushChangeMsg(windowBusinessEntity);
});
});
*/
super
.
removeBefore
(
ids
,
context
);
super
.
removeBefore
(
ids
,
context
);
}
}
/**
/* */
/**
* @param entity
* @param entity
* @param context
* @param context
* @throws AppException
* @throws AppException
*/
*/
/*
@Override
@Override
protected void saveAfter(WindowBusinessEntity entity, Context context) throws AppException {
protected void saveAfter(WindowBusinessEntity entity, Context context) throws AppException {
//通知php更新
//通知php更新
pushChangeMsg(entity);
pushChangeMsg(entity);
super.saveAfter(entity, context);
super.saveAfter(entity, context);
}
}
*/
/**
/* */
/**
* @param entity
* @param entity
* @param context
* @param context
* @throws AppException
* @throws AppException
*/
*/
/*
@Override
@Override
protected void updateAfter(WindowBusinessEntity entity, Context context) throws AppException {
protected void updateAfter(WindowBusinessEntity entity, Context context) throws AppException {
pushChangeMsg(entity);
pushChangeMsg(entity);
super.updateAfter(entity, context);
super.updateAfter(entity, context);
}
}
*/
private
void
pushChangeMsg
(
WindowBusinessEntity
entity
)
{
private
void
pushChangeMsg
(
WindowBusinessEntity
entity
)
{
String
phpUrl
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_PHP_HTTP_URL
,
"http://172.15.28.116:8090"
);
String
phpUrl
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_PHP_HTTP_URL
,
"http://172.15.28.116:8090"
);
...
...
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowServiceImpl.java
View file @
15aa9ec5
...
@@ -10,6 +10,7 @@ import com.mortals.framework.model.PageInfo;
...
@@ -10,6 +10,7 @@ import com.mortals.framework.model.PageInfo;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.framework.util.HttpUtil
;
import
com.mortals.framework.util.HttpUtil
;
import
com.mortals.framework.util.ThreadPool
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.business.model.BusinessEntity
;
import
com.mortals.xhx.module.business.model.BusinessEntity
;
import
com.mortals.xhx.module.business.model.BusinessQuery
;
import
com.mortals.xhx.module.business.model.BusinessQuery
;
...
@@ -132,7 +133,24 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
...
@@ -132,7 +133,24 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
}
}
return
windowBusinessEntity
;
return
windowBusinessEntity
;
}).
filter
(
f
->
f
!=
null
).
collect
(
Collectors
.
toList
());
}).
filter
(
f
->
f
!=
null
).
collect
(
Collectors
.
toList
());
windowBusinessService
.
save
(
windowBusinessEntities
,
context
);
if
(!
ObjectUtils
.
isEmpty
(
windowBusinessEntities
))
{
windowBusinessService
.
save
(
windowBusinessEntities
,
context
);
WindowBusinessQuery
condition
=
new
WindowBusinessQuery
();
condition
.
setWindowId
(
windowId
);
condition
.
setSiteBusinessIdList
(
windowBusinessEntities
.
stream
().
map
(
i
->
i
.
getSiteBusinessId
()).
collect
(
Collectors
.
toList
()));
Runnable
runnable
=
new
Runnable
()
{
@Override
public
void
run
()
{
pushChangeMsg
(
condition
);
}
};
ThreadPool
.
getInstance
().
execute
(
runnable
);
}
//批量推送
}
}
/**
/**
...
@@ -220,25 +238,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
...
@@ -220,25 +238,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
pushChangeMsg
(
entity
.
getId
());
pushChangeMsg
(
entity
.
getId
());
}
}
private
void
pushChangeMsg
(
Long
windowId
)
{
String
phpUrl
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_PHP_HTTP_URL
,
"http://172.15.28.116:8090"
);
phpUrl
+=
"/api/window/winNameChange"
;
HashMap
<
String
,
Object
>
paramsMap
=
new
HashMap
<>();
paramsMap
.
put
(
"windowid"
,
windowId
);
paramsMap
.
put
(
"typeinfo"
,
1
);
phpUrl
+=
"/api/window/winNameChange"
;
String
resp
=
null
;
try
{
Map
<
String
,
String
>
header
=
new
HashMap
<>();
header
.
put
(
HEADER_CONTENT_TYPE
,
"application/json"
);
log
.
info
(
"\n thirdPartyUrl=>{} \n reqbody=>{} "
,
phpUrl
,
JSON
.
toJSONString
(
paramsMap
));
resp
=
HttpUtil
.
doPost
(
phpUrl
,
header
,
JSON
.
toJSONString
(
paramsMap
,
SerializerFeature
.
WriteMapNullValue
));
log
.
info
(
"thirdPartyUrl =>resp:{}"
,
resp
);
}
catch
(
Exception
e
)
{
log
.
error
(
"异常:"
,
e
);
}
}
/**
/**
...
@@ -272,4 +271,46 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
...
@@ -272,4 +271,46 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
}
}
return
successMsg
.
toString
();
return
successMsg
.
toString
();
}
}
private
void
pushChangeMsg
(
Long
windowId
)
{
String
phpUrl
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_PHP_HTTP_URL
,
"http://127.0.0.1:11078/zwfw_api"
);
phpUrl
+=
"/api/window/winNameChange"
;
HashMap
<
String
,
Object
>
paramsMap
=
new
HashMap
<>();
paramsMap
.
put
(
"windowid"
,
windowId
);
paramsMap
.
put
(
"typeinfo"
,
1
);
phpUrl
+=
"/api/window/winNameChange"
;
String
resp
=
null
;
try
{
Map
<
String
,
String
>
header
=
new
HashMap
<>();
header
.
put
(
HEADER_CONTENT_TYPE
,
"application/json"
);
log
.
info
(
"\n thirdPartyUrl=>{} \n reqbody=>{} "
,
phpUrl
,
JSON
.
toJSONString
(
paramsMap
));
resp
=
HttpUtil
.
doPost
(
phpUrl
,
header
,
JSON
.
toJSONString
(
paramsMap
,
SerializerFeature
.
WriteMapNullValue
));
log
.
info
(
"thirdPartyUrl =>resp:{}"
,
resp
);
}
catch
(
Exception
e
)
{
log
.
error
(
"异常:"
,
e
);
}
}
private
void
pushChangeMsg
(
WindowBusinessQuery
entity
)
{
String
phpUrl
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_PHP_HTTP_URL
,
"http://127.0.0.1:11078/zwfw_api"
);
phpUrl
+=
"/api/window/winNameChange"
;
HashMap
<
String
,
Object
>
paramsMap
=
new
HashMap
<>();
paramsMap
.
put
(
"windowid"
,
entity
.
getWindowId
());
paramsMap
.
put
(
"bussinessid"
,
entity
.
getSiteBusinessIdList
().
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
","
)));
paramsMap
.
put
(
"typeinfo"
,
2
);
String
resp
=
null
;
try
{
Map
<
String
,
String
>
header
=
new
HashMap
<>();
header
.
put
(
HEADER_CONTENT_TYPE
,
"application/json"
);
log
.
info
(
"\n thirdPartyUrl=>{} \n reqbody=>{} "
,
phpUrl
,
JSON
.
toJSONString
(
paramsMap
));
resp
=
HttpUtil
.
doPost
(
phpUrl
,
header
,
JSON
.
toJSONString
(
paramsMap
,
SerializerFeature
.
WriteMapNullValue
));
log
.
info
(
"thirdPartyUrl =>resp:{}"
,
resp
);
}
catch
(
Exception
e
)
{
log
.
error
(
"异常:"
,
e
);
}
}
}
}
\ No newline at end of file
base-manager/src/main/resources/config/mybatis-sqlmap-config.xml
View file @
15aa9ec5
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
</plugin>
</plugin>
<plugin
interceptor=
"com.mortals.framework.thirty.mybatis.LogInterceptor"
>
<plugin
interceptor=
"com.mortals.framework.thirty.mybatis.LogInterceptor"
>
<property
name=
"enableExecutorTime"
value=
"true"
/>
<property
name=
"enableExecutorTime"
value=
"true"
/>
<property
name=
"showSql"
value=
"
fals
e"
/>
<property
name=
"showSql"
value=
"
tru
e"
/>
</plugin>
</plugin>
</plugins>
</plugins>
</configuration>
</configuration>
\ No newline at end of file
base-manager/src/test/java/com/mortals/httpclient/matter/MatterController.http
View file @
15aa9ec5
...
@@ -20,9 +20,12 @@ POST {{baseUrl}}/matter/list
...
@@ -20,9 +20,12 @@ POST {{baseUrl}}/matter/list
Content-Type: application/json
Content-Type: application/json
{
{
"siteId": 22,
"siteId": 1,
"matterName": "%%",
"page": 1,
"page": 1,
"size": 2
"size": 10,
"deptCode":"zyl",
"source": ""
}
}
###微官网事项列表
###微官网事项列表
...
...
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