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
29bc0b2a
Commit
29bc0b2a
authored
Jan 29, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加站点主题事项
parent
bff21970
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
118 additions
and
11 deletions
+118
-11
base-manager/doc/api.md
base-manager/doc/api.md
+4
-0
base-manager/src/main/java/com/mortals/xhx/common/code/JointInfoShowEnum.java
...n/java/com/mortals/xhx/common/code/JointInfoShowEnum.java
+60
-0
base-manager/src/main/java/com/mortals/xhx/module/app/model/vo/AppVo.java
.../main/java/com/mortals/xhx/module/app/model/vo/AppVo.java
+4
-0
base-manager/src/main/java/com/mortals/xhx/module/app/service/impl/AppServiceImpl.java
...m/mortals/xhx/module/app/service/impl/AppServiceImpl.java
+4
-5
base-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterServiceImpl.java
...als/xhx/module/matter/service/impl/MatterServiceImpl.java
+37
-5
base-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterController.java
...a/com/mortals/xhx/module/matter/web/MatterController.java
+9
-1
No files found.
base-manager/doc/api.md
View file @
29bc0b2a
...
...
@@ -9533,6 +9533,8 @@ data|object|数据对象
  updateUserId|Long|更新用户
  updateTime|Date|更新时间
  serviceApi|String|服务接口地址
  custUrl|String|自主应用前端访问地址
  appIconUrl|String|自主应用前端图标地址
dict|object|字典对象
 type|object|字典属性对象,详见附录
 shelves|object|字典属性对象,详见附录
...
...
@@ -9603,6 +9605,8 @@ data|object|数据对象
 updateUserId|Long|更新用户
 updateTime|Date|更新时间
 serviceApi|String|服务接口地址
 custUrl|String|自主应用前端访问地址
 appIconUrl|String|自主应用前端图标地址
dict|object|字典对象
 type|object|字典属性对象,详见附录
 shelves|object|字典属性对象,详见附录
...
...
base-manager/src/main/java/com/mortals/xhx/common/code/JointInfoShowEnum.java
0 → 100644
View file @
29bc0b2a
package
com.mortals.xhx.common.code
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
public
enum
JointInfoShowEnum
{
公共服务部
(
"公共服务部"
,
"公共服务部"
),
党政建设部
(
"党政建设部"
,
"党政建设部"
),
网络理政部
(
"网络理政部"
,
"网络理政部"
);
private
String
value
;
private
String
desc
;
JointInfoShowEnum
(
String
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
}
public
String
getValue
()
{
return
this
.
value
;
}
public
String
getDesc
()
{
return
this
.
desc
;
}
public
static
JointInfoShowEnum
getByValue
(
String
value
)
{
for
(
JointInfoShowEnum
isLackEnum
:
JointInfoShowEnum
.
values
())
{
if
(
isLackEnum
.
getValue
()
==
value
)
{
return
isLackEnum
;
}
}
return
null
;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public
static
Map
<
String
,
String
>
getEnumMap
(
String
...
eItem
)
{
Map
<
String
,
String
>
resultMap
=
new
LinkedHashMap
<>();
for
(
JointInfoShowEnum
item
:
JointInfoShowEnum
.
values
())
{
try
{
boolean
hasE
=
false
;
for
(
String
e
:
eItem
)
{
if
(
item
.
getValue
()
==
e
)
{
hasE
=
true
;
break
;
}
}
if
(!
hasE
)
{
resultMap
.
put
(
item
.
getValue
()
+
""
,
item
.
getDesc
());
}
}
catch
(
Exception
ex
)
{
}
}
return
resultMap
;
}
}
\ No newline at end of file
base-manager/src/main/java/com/mortals/xhx/module/app/model/vo/AppVo.java
View file @
29bc0b2a
...
...
@@ -27,5 +27,9 @@ public class AppVo extends BaseEntityLong {
* 自主应用访问地址
*/
private
String
custUrl
;
/**
* 图标访问地址
*/
private
String
appIconUrl
;
}
\ No newline at end of file
base-manager/src/main/java/com/mortals/xhx/module/app/service/impl/AppServiceImpl.java
View file @
29bc0b2a
...
...
@@ -86,12 +86,11 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
List
<
AppEntity
>
appEntityList
=
this
.
find
(
new
AppQuery
().
appCode
(
item
.
getAppCode
()),
context
);
item
.
setApplianceSiteScope
(
appEntityList
.
size
());
item
.
setSiteIdList
(
appEntityList
.
stream
().
map
(
AppEntity:
:
getSiteId
).
collect
(
Collectors
.
toList
()));
//构建访问地址
SiteEntity
siteEntity
=
siteService
.
getCache
(
item
.
getSiteId
().
toString
());
String
domainUrl
=
GlobalSysInfo
.
getParamValue
(
Constant
.
PARAM_SERVER_HTTP_URL
,
"http://192.168.0.98:11078"
);
if
(!
ObjectUtils
.
isEmpty
(
siteEntity
))
{
//请求地址 http://domian/app/siteCode/appcode/html
String
domainUrl
=
GlobalSysInfo
.
getParamValue
(
Constant
.
PARAM_SERVER_HTTP_URL
,
"http://192.168.0.98:11078"
);
item
.
setCustUrl
(
UrlBuilder
.
of
(
domainUrl
)
.
addPath
(
CUSTAPP_ROOT_PATH
)
.
addPath
(
siteEntity
.
getSiteCode
())
...
...
@@ -101,10 +100,10 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
}
else
{
item
.
setCustUrl
(
""
);
}
//构建图标地址
item
.
setAppIconUrl
(
UrlBuilder
.
of
(
domainUrl
)
.
addPath
(
item
.
getFilePath
()).
toString
());
});
super
.
findAfter
(
params
,
pageInfo
,
context
,
list
);
}
...
...
base-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterServiceImpl.java
View file @
29bc0b2a
...
...
@@ -31,11 +31,11 @@ import com.mortals.xhx.module.matters.model.MattersEntity;
import
com.mortals.xhx.module.matters.model.MattersQuery
;
import
com.mortals.xhx.module.matters.service.MattersDetailService
;
import
com.mortals.xhx.module.matters.service.MattersService
;
import
com.mortals.xhx.module.site.model.SiteEntity
;
import
com.mortals.xhx.module.site.model.SiteMatterEntity
;
import
com.mortals.xhx.module.site.model.SiteMatterQuery
;
import
com.mortals.xhx.module.site.model.*
;
import
com.mortals.xhx.module.site.service.SiteMatterService
;
import
com.mortals.xhx.module.site.service.SiteService
;
import
com.mortals.xhx.module.site.service.SiteThemeMatterService
;
import
com.mortals.xhx.module.site.service.SiteThemeService
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.jsoup.Jsoup
;
...
...
@@ -88,20 +88,52 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
private
DeptService
deptService
;
@Autowired
private
MatterExtService
matterExtService
;
@Autowired
private
SiteThemeMatterService
siteThemeMatterService
;
@Autowired
private
SiteThemeService
siteThemeService
;
@Override
protected
void
saveBefore
(
MatterEntity
entity
,
Context
context
)
throws
AppException
{
//判断如果是自定义事项,需要更新区域编码
if
(
SourceEnum
.
自定义
.
getValue
().
equals
(
entity
.
getSource
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getSiteId
()))
{
if
(
SourceEnum
.
自定义
.
getValue
().
equals
(
entity
.
getSource
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getSiteId
()))
{
SiteEntity
siteEntity
=
siteService
.
get
(
entity
.
getSiteId
(),
context
);
entity
.
setAreaCode
(
siteEntity
.
getAreaCode
());
}
}
super
.
saveBefore
(
entity
,
context
);
}
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected
void
saveAfter
(
MatterEntity
entity
,
Context
context
)
throws
AppException
{
//主题添加自定义关联
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getThemeCode
()))
{
SiteThemeEntity
siteThemeEntity
=
siteThemeService
.
selectOne
(
new
SiteThemeQuery
().
siteId
(
entity
.
getSiteId
()).
themeCode
(
entity
.
getThemeCode
()));
SiteThemeMatterEntity
siteThemeMatterEntity
=
new
SiteThemeMatterEntity
();
siteThemeMatterEntity
.
initAttrValue
();
siteThemeMatterEntity
.
setThemeCode
(
entity
.
getThemeCode
());
siteThemeMatterEntity
.
setSiteId
(
entity
.
getSiteId
());
siteThemeMatterEntity
.
setSource
(
entity
.
getSource
());
siteThemeMatterEntity
.
setMatterId
(
entity
.
getId
());
siteThemeMatterEntity
.
setMatterCode
(
entity
.
getMatterNo
());
siteThemeMatterEntity
.
setMatterName
(
entity
.
getMatterName
());
siteThemeMatterEntity
.
setUserType
(
siteThemeEntity
==
null
?
"2"
:
siteThemeEntity
.
getUserType
());
siteThemeMatterEntity
.
setCreateTime
(
new
Date
());
siteThemeMatterEntity
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
siteThemeMatterService
.
save
(
siteThemeMatterEntity
,
context
);
}
super
.
saveAfter
(
entity
,
context
);
}
@Override
protected
void
updateBefore
(
MatterEntity
entity
,
Context
context
)
throws
AppException
{
...
...
base-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterController.java
View file @
29bc0b2a
...
...
@@ -12,8 +12,11 @@ import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import
com.mortals.framework.web.BasePhpCRUDJsonMappingController
;
import
com.mortals.xhx.base.framework.config.InterceptorConfig
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.JointInfoShowEnum
;
import
com.mortals.xhx.module.matter.model.MatterEntity
;
import
com.mortals.xhx.module.matter.service.MatterService
;
import
com.mortals.xhx.module.site.model.SiteThemeQuery
;
import
com.mortals.xhx.module.site.service.SiteThemeService
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -44,6 +47,8 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
@Autowired
private
InterceptorConfig
interceptorConfig
;
private
SiteThemeService
siteThemeService
;
public
MatterController
()
{
super
.
setFormClass
(
MatterForm
.
class
);
super
.
setModuleDesc
(
"基础事项"
);
...
...
@@ -84,6 +89,7 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
this
.
addDict
(
model
,
"parson"
,
paramService
.
getParamBySecondOrganize
(
"Matter"
,
"parson"
));
this
.
addDict
(
model
,
"lengal"
,
paramService
.
getParamBySecondOrganize
(
"Matter"
,
"lengal"
));
this
.
addDict
(
model
,
"source"
,
paramService
.
getParamBySecondOrganize
(
"Matter"
,
"source"
));
this
.
addDict
(
model
,
"jointInfoShow"
,
JointInfoShowEnum
.
getEnumMap
());
Setting
baseInfoSetting
=
interceptorConfig
.
getBaseInfoSetting
();
Map
<
String
,
String
>
baseInfoMap
=
new
HashMap
<>();
...
...
@@ -102,7 +108,9 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
}
});
this
.
addDict
(
model
,
"sqclInfo"
,
sqclInfoMap
);
//theme
Map
<
String
,
String
>
themeMap
=
siteThemeService
.
find
(
new
SiteThemeQuery
()).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getThemeCode
(),
y
->
y
.
getThemeName
(),
(
o
,
n
)
->
n
));
this
.
addDict
(
model
,
"theme"
,
themeMap
);
super
.
init
(
model
,
context
);
}
...
...
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