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
a172b5ad
Commit
a172b5ad
authored
Apr 13, 2023
by
xj
Browse files
Options
Browse Files
Download
Plain Diff
完成办不成事报表
parents
4dbef4bd
e6b7c180
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
582 additions
and
36 deletions
+582
-36
base-manager-ui/admin/src/assets/css/common.css
base-manager-ui/admin/src/assets/css/common.css
+1
-1
base-manager-ui/admin/src/pages/basicset/business/business.vue
...manager-ui/admin/src/pages/basicset/business/business.vue
+6
-26
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs1.vue
.../src/pages/basicset/business/components/businessTabs1.vue
+14
-4
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs2.vue
.../src/pages/basicset/business/components/businessTabs2.vue
+9
-0
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs3.vue
.../src/pages/basicset/business/components/businessTabs3.vue
+9
-0
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs4.vue
.../src/pages/basicset/business/components/businessTabs4.vue
+295
-0
base-manager-ui/admin/src/router/config.js
base-manager-ui/admin/src/router/config.js
+13
-0
portal-manager/doc/api.md
portal-manager/doc/api.md
+63
-0
portal-manager/src/main/java/com/mortals/xhx/common/utils/ImageBase64.java
...c/main/java/com/mortals/xhx/common/utils/ImageBase64.java
+49
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/service/PageInfoService.java
.../com/mortals/xhx/module/page/service/PageInfoService.java
+10
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/service/impl/PageInfoServiceImpl.java
...als/xhx/module/page/service/impl/PageInfoServiceImpl.java
+85
-1
portal-manager/src/main/java/com/mortals/xhx/module/page/web/BuryPointController.java
.../com/mortals/xhx/module/page/web/BuryPointController.java
+28
-4
No files found.
base-manager-ui/admin/src/assets/css/common.css
View file @
a172b5ad
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
color
:
#1BBC9B
;
color
:
#1BBC9B
;
}
}
.edit
{
.edit
{
color
:
#03d76f
;
color
:
#03d76f
!important
;
}
}
.clofff
{
.clofff
{
color
:
#fff
;
color
:
#fff
;
...
...
base-manager-ui/admin/src/pages/basicset/business/business.vue
View file @
a172b5ad
<
template
>
<
template
>
<div
class=
"business flex flexc"
>
<div
class=
"business flex flexc"
>
<a-tabs
:activeKey=
"active"
@
change=
"changeRouter"
>
<a-tabs
:activeKey=
"active"
@
change=
"changeRouter"
>
<a-tab-pane
key=
"/business/businessmanage"
tab=
"业务管理"
>
<a-tab-pane
key=
"/business/businessmanage"
tab=
"业务管理"
>
</a-tab-pane>
<!--
<BusinessTabs2
v-if=
"active === 1"
ref=
"BusinessTabs2"
/>
-->
</a-tab-pane>
<a-tab-pane
key=
"/business/mattermanage"
tab=
"事项管理"
>
<a-tab-pane
key=
"/business/mattermanage"
tab=
"事项管理"
>
</a-tab-pane>
<!--
<BusinessTabs1
v-if=
"active === 2"
ref=
"BusinessTabs1"
/>
-->
</a-tab-pane>
<a-tab-pane
key=
"/business/businessinmanage"
tab=
"业务事项关联"
>
<a-tab-pane
key=
"/business/businessinmanage"
tab=
"业务事项关联"
>
<!--
<BusinessTabs3
v-if=
"active === 3"
ref=
"BusinessTabs3"
/>
-->
</a-tab-pane>
<a-tab-pane
key=
"/business/workguide"
tab=
"办事指南数据管理"
>
</a-tab-pane>
</a-tab-pane>
</a-tabs>
</a-tabs>
<div
class=
"business-out-box flex1"
>
<div
class=
"business-out-box flex1"
>
...
@@ -20,21 +17,12 @@
...
@@ -20,21 +17,12 @@
</
template
>
</
template
>
<
script
>
<
script
>
// import BusinessTabs1 from "./components/businessTabs1.vue";
// import BusinessTabs2 from "./components/businessTabs2.vue";
// import BusinessTabs3 from "./components/businessTabs3.vue";
export
default
{
export
default
{
components
:
{
components
:
{},
// BusinessTabs1,
// BusinessTabs2,
// BusinessTabs3,
},
data
()
{
data
()
{
return
{
return
{
siteId
:
""
,
// 站点id
siteId
:
""
,
// 站点id
// active: 1,
};
};
},
},
computed
:
{
computed
:
{
...
@@ -60,15 +48,7 @@ export default {
...
@@ -60,15 +48,7 @@ export default {
/deep/.ant-tabs-nav-container {
/deep/.ant-tabs-nav-container {
border-bottom: 1px solid rgb(224, 224, 224) !important;
border-bottom: 1px solid rgb(224, 224, 224) !important;
}
}
&::after {
content: "";
width: 1px;
height: 82vh;
position: absolute;
background-color: #eeeeee;
top: 44px;
left: 50%;
}
.business-out-box {
.business-out-box {
overflow-y: auto;
overflow-y: auto;
}
}
...
...
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs1.vue
View file @
a172b5ad
...
@@ -354,17 +354,18 @@ export default {
...
@@ -354,17 +354,18 @@ export default {
onSelectLeftRow
(
record
,
selected
)
{
onSelectLeftRow
(
record
,
selected
)
{
if
(
selected
&&
record
.
children
&&
record
.
children
.
length
)
{
if
(
selected
&&
record
.
children
&&
record
.
children
.
length
)
{
record
.
children
.
forEach
((
v
)
=>
{
record
.
children
.
forEach
((
v
)
=>
{
this
.
selectedLeftRowKeys
=
[...
new
Set
([...
this
.
selectedLeftRowKeys
,
v
.
id
])]
this
.
selectedLeftRowKeys
=
[
this
.
deleteData
=
[...
new
Set
([...
this
.
deleteData
,
v
])];
...
new
Set
([...
this
.
selectedLeftRowKeys
,
v
.
id
]),
];
this
.
deleteData
=
[...
new
Set
([...
this
.
deleteData
,
v
])];
});
});
}
else
if
(
!
selected
)
{
}
else
if
(
!
selected
)
{
this
.
selectedLeftRowKeys
=
this
.
selectedLeftRowKeys
.
filter
(
this
.
selectedLeftRowKeys
=
this
.
selectedLeftRowKeys
.
filter
(
(
v
)
=>
v
!=
record
.
id
(
v
)
=>
v
!=
record
.
id
);
);
this
.
deleteData
=
this
.
deleteData
.
filter
((
v
)
=>
{
this
.
deleteData
=
this
.
deleteData
.
filter
((
v
)
=>
{
return
v
.
id
!=
record
.
id
return
v
.
id
!=
record
.
id
;
});
});
}
}
},
},
// 批量删除
// 批量删除
...
@@ -525,6 +526,15 @@ export default {
...
@@ -525,6 +526,15 @@ export default {
width: 100%;
width: 100%;
height: 100%;
height: 100%;
display: flex;
display: flex;
&::after {
content: "";
width: 1px;
height: 82vh;
position: absolute;
background-color: #eeeeee;
top: 44px;
left: 50%;
}
.left,
.left,
.right {
.right {
width: 50%;
width: 50%;
...
...
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs2.vue
View file @
a172b5ad
...
@@ -586,6 +586,15 @@ export default {
...
@@ -586,6 +586,15 @@ export default {
.basicset-tab2 {
.basicset-tab2 {
width: 100%;
width: 100%;
display: flex;
display: flex;
&::after {
content: "";
width: 1px;
height: 82vh;
position: absolute;
background-color: #eeeeee;
top: 44px;
left: 50%;
}
.left,
.left,
.right {
.right {
width: 50%;
width: 50%;
...
...
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs3.vue
View file @
a172b5ad
...
@@ -666,6 +666,15 @@ export default {
...
@@ -666,6 +666,15 @@ export default {
.basicset-tab3 {
.basicset-tab3 {
width: 100%;
width: 100%;
display: flex;
display: flex;
&::after {
content: "";
width: 1px;
height: 82vh;
position: absolute;
background-color: #eeeeee;
top: 44px;
left: 50%;
}
.left,
.left,
.right {
.right {
width: 50%;
width: 50%;
...
...
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs4.vue
0 → 100644
View file @
a172b5ad
rrent"
<
template
>
<div
class=
"basicset-tab4"
>
<div
class=
"left"
>
<div
class=
"header"
>
<h3
class=
"titel"
>
站点事项列表
</h3>
<div
class=
"header-bottom flex aic jcb"
>
<div
class=
"left-btn"
></div>
<div>
<a-space>
<a-select
style=
"min-width: 120px"
allowClear
v-model=
"dept"
class=
"select-department"
placeholder=
"部门搜索"
>
<a-select-option
v-for=
"v in deptList"
:key=
"v.id"
:value=
"v.deptNumber"
>
{{
v
.
name
}}
</a-select-option>
</a-select>
<a-select
style=
"width: 120px"
allowClear
v-model=
"source"
class=
"select-department"
placeholder=
"事项来源"
>
<a-select-option
:value=
"0"
>
一体化添加
</a-select-option>
<a-select-option
:value=
"1"
>
手动添加
</a-select-option>
</a-select>
<a-input-search
v-model=
"searchVal"
placeholder=
"请输入事项名称搜索"
enter-button=
"搜索"
@
search=
"onSearch"
allowClear
/>
</a-space>
</div>
</div>
</div>
<div
class=
"table-content"
>
<!-- 表格 -->
<a-table
bordered
size=
"middle"
:loading=
"loading"
:pagination=
"
{
showTotal: (total) => `共 ${total} 条`,
current: current,
total: total,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: changePage,
onShowSizeChange: showSizeChange,
}"
:scroll="{ y: 550 }"
:columns="columns"
:data-source="matterSiteData"
:rowKey="(record) => record.id"
>
<template
slot=
"index"
slot-scope=
"text, record, index"
>
<span>
{{
(
current
-
1
)
*
size
+
index
+
1
}}
</span>
</
template
>
<!-- 部门 -->
<
template
slot=
"deptName"
slot-scope=
"text"
>
{{
text
.
deptName
?
text
.
deptName
:
"
--
"
}}
</
template
>
<!-- 事项名称 -->
<
template
slot=
"matterName"
slot-scope=
"text"
>
<a-tooltip
placement=
"topLeft"
>
<template
slot=
"title"
>
{{
text
.
matterName
}}
</
template
>
<div
class=
"matter-name"
>
{{ text.matterName }}
</div>
</a-tooltip>
</template>
<!-- 事项来源 -->
<
template
slot=
"source"
slot-scope=
"text"
>
<a-tag
v-if=
"text.source == 0"
color=
"green"
>
一体化添加
</a-tag>
<a-tag
v-else
color=
"blue"
>
手动添加
</a-tag>
</
template
>
<!-- 操作 -->
<
template
slot=
"action"
slot-scope=
"text"
>
<a-space
size=
"middle"
>
<div
class=
"workguide_btn"
:style=
"
{ color: text.hot == 1 ? '#03d76f' : '#1890FF' }"
@click="handleSiteEdit(text, 'hot')"
>
{{
text
.
hot
==
1
?
"
取消热门
"
:
"
设置热门
"
}}
</div>
<div
class=
"workguide_btn"
style=
"width: 60px"
@
click=
"handleSiteEdit(text, 'display')"
>
{{
text
.
display
==
1
?
"
取消展示
"
:
"
展示
"
}}
</div>
</a-space>
</
template
>
</a-table>
</div>
</div>
</div>
</template>
<
script
>
import
{
getSiteMatterList
,
addSitematter
}
from
"
@/services/matter
"
;
import
{
getDeptList
}
from
"
@/services/dept
"
;
import
local
from
"
@/utils/local
"
;
const
columns
=
[
{
title
:
"
序号
"
,
width
:
"
50px
"
,
scopedSlots
:
{
customRender
:
"
index
"
},
},
{
title
:
"
部门
"
,
width
:
"
20%
"
,
scopedSlots
:
{
customRender
:
"
deptName
"
,
},
},
{
title
:
"
事项名称
"
,
// ellipsis: true,
align
:
"
left
"
,
scopedSlots
:
{
customRender
:
"
matterName
"
,
},
},
{
title
:
"
事项来源
"
,
scopedSlots
:
{
customRender
:
"
source
"
,
},
},
{
title
:
"
操作
"
,
width
:
"
200px
"
,
scopedSlots
:
{
customRender
:
"
action
"
,
},
},
];
export
default
{
components
:
{},
data
()
{
return
{
columns
,
loading
:
false
,
source
:
undefined
,
// 左边来源
selectedRowKeys
:
[],
matterSiteData
:
[],
// 站点事项
matterDataList
:
[],
//事项列表数据
current
:
1
,
total
:
0
,
size
:
10
,
pageSizeOptions
:
[
"
10
"
,
"
30
"
,
"
50
"
,
"
100
"
],
siteId
:
local
.
getLocal
(
"
siteId
"
),
// 站点id
deptList
:
[],
// 站点部门
searchVal
:
""
,
// 站点事项搜索
dept
:
undefined
,
// 部门搜索
};
},
created
()
{
this
.
getDeptListData
();
this
.
getMatterSiteData
();
},
methods
:
{
// 获取部门列表
async
getDeptListData
(
obj
=
{})
{
this
.
deptLoading
=
true
;
let
res
=
await
getDeptList
({
siteId
:
this
.
siteId
,
page
:
1
,
size
:
-
1
,
...
obj
,
});
this
.
deptLoading
=
false
;
let
{
code
,
data
}
=
res
.
data
;
if
(
code
===
1
)
{
this
.
deptList
=
data
.
data
;
}
},
// 获取站点事项
async
getMatterSiteData
(
search
=
{})
{
this
.
loading
=
true
;
let
res
=
await
getSiteMatterList
({
page
:
this
.
current
,
size
:
this
.
size
,
siteId
:
this
.
siteId
,
source
:
this
.
source
,
matterName
:
`%
${
this
.
searchVal
}
%`
,
deptCode
:
this
.
dept
,
...
search
,
});
let
{
pageInfo
,
data
}
=
res
.
data
.
data
;
this
.
total
=
pageInfo
.
totalResult
;
this
.
matterSiteData
=
data
;
this
.
loading
=
false
;
},
// 搜索
onSearch
()
{
this
.
current
=
1
;
this
.
getMatterSiteData
();
},
// 左翻页
changePage
(
num
)
{
this
.
current
=
num
;
this
.
getMatterSiteData
();
},
// 左边改变每页显示数量
showSizeChange
(
current
,
size
)
{
this
.
current
=
current
;
this
.
size
=
size
;
this
.
getMatterSiteData
();
},
// 设置热门、展示
async
handleSiteEdit
(
row
,
type
)
{
let
hot
;
let
display
;
if
(
type
===
"
hot
"
)
{
if
(
row
.
hot
==
1
)
{
hot
=
0
;
}
else
{
hot
=
1
;
}
}
else
{
if
(
row
.
display
==
1
)
{
display
=
0
;
}
else
{
display
=
1
;
}
}
let
obj
=
{
id
:
row
.
id
,
};
if
(
hot
!=
"
undefined
"
)
obj
.
hot
=
hot
;
if
(
display
!=
"
undefined
"
)
obj
.
display
=
display
;
let
res
=
await
addSitematter
(
obj
);
if
(
res
.
data
.
code
==
1
)
{
this
.
$message
.
success
(
"
设置成功
"
);
this
.
getMatterSiteData
();
this
.
$forceUpdate
();
}
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
/deep/.business {
&::after {
content: "";
width: 1px;
height: 82vh;
position: absolute;
background-color: red;
top: 44px;
left: 50%;
}
}
.basicset-tab4 {
width: 100%;
height: 100%;
padding: 0px 20px;
.header {
margin-bottom: 15px;
}
.workguide_btn {
cursor: pointer;
width: 60px;
color: #1890ff;
}
.matter-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
</
style
>
base-manager-ui/admin/src/router/config.js
View file @
a172b5ad
...
@@ -76,6 +76,7 @@ const options = {
...
@@ -76,6 +76,7 @@ const options = {
"
@/pages/basicset/business/components/businessTabs1
"
"
@/pages/basicset/business/components/businessTabs1
"
),
),
},
},
// 事项管理
{
{
path
:
"
mattermanage
"
,
path
:
"
mattermanage
"
,
meta
:
{
meta
:
{
...
@@ -86,6 +87,7 @@ const options = {
...
@@ -86,6 +87,7 @@ const options = {
"
@/pages/basicset/business/components/businessTabs2
"
"
@/pages/basicset/business/components/businessTabs2
"
),
),
},
},
// 业务事项关联
{
{
path
:
"
businessinmanage
"
,
path
:
"
businessinmanage
"
,
meta
:
{
meta
:
{
...
@@ -96,6 +98,17 @@ const options = {
...
@@ -96,6 +98,17 @@ const options = {
"
@/pages/basicset/business/components/businessTabs3
"
"
@/pages/basicset/business/components/businessTabs3
"
),
),
},
},
// 办事指南事项管理
{
path
:
"
workguide
"
,
meta
:
{
invisible
:
true
,
},
component
:
()
=>
import
(
"
@/pages/basicset/business/components/businessTabs4
"
),
},
],
],
},
},
{
{
...
...
portal-manager/doc/api.md
View file @
a172b5ad
...
@@ -4708,7 +4708,70 @@ data|object|数据对象
...
@@ -4708,7 +4708,70 @@ data|object|数据对象
```
```
### 保存页面截图
**请求URL:**
page/bury/screen/save
**请求方式:**
POST
**内容类型:**
application/json;charset=utf-8
**简要描述:**
保存或更新产品页面配置:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
deviceNum|String|否|设备编码
productId|Long|否|产品id
productName|String|否|产品名称
pageCode|String|否|页面编码(页面路由)
pageName|String|否|页面名称
screenUrl|String|否|页面截图地址
**请求样例:**
```
{
"deviceNum":"fblh4k",
"productId":427,
"productName":"oo1k4e",
"pageCode":"5fzoqc",
"pageName":"r8smsl",
"screenUrl":"feq3hw",
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 
id|Long|保存后主键id
 
entity|object|保存更新实体
  
id|Long|序号,主键,自增长
  
deviceNum|String|设备编码
  
productId|Long|产品id
  
productName|String|产品名称
  
pageCode|String|页面编码(页面路由)
  
pageName|String|页面名称
  
screenUrl|String|页面截图地址
  
createUserId|Long|创建用户
  
createTime|Date|创建时间
  
updateUserId|Long|更新用户
  
updateTime|Date|更新时间
**响应消息样例:**
```
{
"msg":"新增模块成功",
"code":1,
"data":{}
}
}
```
...
...
portal-manager/src/main/java/com/mortals/xhx/common/utils/ImageBase64.java
0 → 100644
View file @
a172b5ad
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/service/PageInfoService.java
View file @
a172b5ad
package
com.mortals.xhx.module.page.service
;
package
com.mortals.xhx.module.page.service
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.page.model.PageInfoEntity
;
import
com.mortals.xhx.module.page.model.PageInfoEntity
;
/**
/**
...
@@ -11,4 +13,12 @@ import com.mortals.xhx.module.page.model.PageInfoEntity;
...
@@ -11,4 +13,12 @@ import com.mortals.xhx.module.page.model.PageInfoEntity;
*/
*/
public
interface
PageInfoService
extends
ICRUDService
<
PageInfoEntity
,
Long
>{
public
interface
PageInfoService
extends
ICRUDService
<
PageInfoEntity
,
Long
>{
/**
* 埋点设备截图
* @param entity
* @param context
* @return
* @throws AppException
*/
PageInfoEntity
saveScreen
(
PageInfoEntity
entity
,
Context
context
)
throws
AppException
;
}
}
\ No newline at end of file
portal-manager/src/main/java/com/mortals/xhx/module/page/service/impl/PageInfoServiceImpl.java
View file @
a172b5ad
package
com.mortals.xhx.module.page.service.impl
;
package
com.mortals.xhx.module.page.service.impl
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.common.utils.ImageBase64
;
import
com.mortals.xhx.module.page.model.PageInfoQuery
;
import
lombok.Getter
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -6,6 +11,9 @@ import com.mortals.framework.model.Context;
...
@@ -6,6 +11,9 @@ import com.mortals.framework.model.Context;
import
com.mortals.xhx.module.page.dao.PageInfoDao
;
import
com.mortals.xhx.module.page.dao.PageInfoDao
;
import
com.mortals.xhx.module.page.model.PageInfoEntity
;
import
com.mortals.xhx.module.page.model.PageInfoEntity
;
import
com.mortals.xhx.module.page.service.PageInfoService
;
import
com.mortals.xhx.module.page.service.PageInfoService
;
import
java.util.Date
;
/**
/**
* PageInfoService
* PageInfoService
* 产品页面配置 service实现
* 产品页面配置 service实现
...
@@ -15,5 +23,81 @@ import com.mortals.xhx.module.page.service.PageInfoService;
...
@@ -15,5 +23,81 @@ import com.mortals.xhx.module.page.service.PageInfoService;
*/
*/
@Service
(
"pageInfoService"
)
@Service
(
"pageInfoService"
)
public
class
PageInfoServiceImpl
extends
AbstractCRUDServiceImpl
<
PageInfoDao
,
PageInfoEntity
,
Long
>
implements
PageInfoService
{
public
class
PageInfoServiceImpl
extends
AbstractCRUDServiceImpl
<
PageInfoDao
,
PageInfoEntity
,
Long
>
implements
PageInfoService
{
@Value
(
"${upload.path}"
)
@Getter
private
String
filePath
;
@Override
protected
void
saveBefore
(
PageInfoEntity
entity
,
Context
context
)
throws
AppException
{
this
.
validData
(
entity
,
context
);
if
(
StringUtils
.
isEmpty
(
entity
.
getPageCode
())){
throw
new
AppException
(
"页面编码(路由)不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
entity
.
getDeviceNum
())){
throw
new
AppException
(
"设备编码不能为空"
);
}
if
(
entity
.
getProductId
()==
null
){
throw
new
AppException
(
"产品ID不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
entity
.
getScreenUrl
())){
throw
new
AppException
(
"截图内容不能为空"
);
}
}
@Override
public
PageInfoEntity
saveScreen
(
PageInfoEntity
entity
,
Context
context
)
throws
AppException
{
this
.
saveBefore
(
entity
,
context
);
PageInfoQuery
query
=
new
PageInfoQuery
();
query
.
setPageCode
(
entity
.
getPageCode
());
query
.
setProductId
(
entity
.
getProductId
());
query
.
setDeviceNum
(
entity
.
getDeviceNum
());
PageInfoEntity
pageInfoEntity
=
this
.
selectOne
(
query
);
if
(
pageInfoEntity
==
null
){
doSaveImageBase64
(
entity
,
""
);
entity
.
setCreateTime
(
new
Date
());
int
iRet
=
this
.
dao
.
insert
(
entity
);
if
(
iRet
==
0
)
{
throw
new
AppException
(-
1001
,
"写入数据库失败!"
);
}
else
{
this
.
saveAfter
(
entity
,
context
);
return
entity
;
}
}
else
{
doSaveImageBase64
(
entity
,
pageInfoEntity
.
getScreenUrl
());
PageInfoEntity
updateEntity
=
new
PageInfoEntity
();
updateEntity
.
setId
(
pageInfoEntity
.
getId
());
updateEntity
.
setScreenUrl
(
pageInfoEntity
.
getScreenUrl
());
updateEntity
.
setUpdateTime
(
new
Date
());
int
iRet
=
this
.
dao
.
update
(
updateEntity
);
if
(
iRet
==
0
)
{
throw
new
AppException
(-
1002
,
"更新失败!"
);
}
else
{
this
.
updateAfter
(
updateEntity
,
context
);
entity
.
setId
(
pageInfoEntity
.
getId
());
return
entity
;
}
}
}
private
void
doSaveImageBase64
(
PageInfoEntity
entity
,
String
oldName
){
String
base64
=
String
.
valueOf
(
entity
.
getScreenUrl
());
base64
=
base64
.
replaceAll
(
"data:image/png;base64,"
,
""
);
if
(
StringUtils
.
isEmpty
(
base64
)){
throw
new
AppException
(
"图片不能为空"
);
}
String
imageName
=
new
Date
().
getTime
()
+
".png"
;
String
imagePath
=
"/file/uploadfile/"
+
imageName
;
if
(
StringUtils
.
isNotEmpty
(
oldName
)){
imagePath
=
oldName
;
}
String
filePath
=
this
.
filePath
.
endsWith
(
"/"
)
?
this
.
filePath
:
this
.
filePath
+
"/"
+
imagePath
;
try
{
ImageBase64
.
convertImg
(
base64
.
trim
(),
filePath
);
entity
.
setScreenUrl
(
imagePath
);
}
catch
(
Exception
e
){
log
.
error
(
"base64图片转换异常"
,
e
.
fillInStackTrace
());
entity
.
setScreenUrl
(
""
);
}
}
}
}
\ No newline at end of file
portal-manager/src/main/java/com/mortals/xhx/module/page/web/BuryPointController.java
View file @
a172b5ad
...
@@ -8,11 +8,9 @@ import com.mortals.framework.model.Context;
...
@@ -8,11 +8,9 @@ import com.mortals.framework.model.Context;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.web.BaseJsonBodyController
;
import
com.mortals.framework.web.BaseJsonBodyController
;
import
com.mortals.xhx.module.page.model.PageInfoEntity
;
import
com.mortals.xhx.module.page.model.pdu.BuryPointPdu
;
import
com.mortals.xhx.module.page.model.pdu.BuryPointPdu
;
import
com.mortals.xhx.module.page.service.PageAccessDepthService
;
import
com.mortals.xhx.module.page.service.*
;
import
com.mortals.xhx.module.page.service.PageAccessService
;
import
com.mortals.xhx.module.page.service.PageEventService
;
import
com.mortals.xhx.module.page.service.PageRouteService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -38,6 +36,8 @@ public class BuryPointController extends BaseJsonBodyController {
...
@@ -38,6 +36,8 @@ public class BuryPointController extends BaseJsonBodyController {
private
PageEventService
pageEventService
;
private
PageEventService
pageEventService
;
@Autowired
@Autowired
private
PageRouteService
pageRouteService
;
private
PageRouteService
pageRouteService
;
@Autowired
private
PageInfoService
pageInfoService
;
@PostMapping
({
"save"
})
@PostMapping
({
"save"
})
@UnAuth
@UnAuth
...
@@ -75,4 +75,28 @@ public class BuryPointController extends BaseJsonBodyController {
...
@@ -75,4 +75,28 @@ public class BuryPointController extends BaseJsonBodyController {
}
}
}
}
@PostMapping
({
"screen/save"
})
@UnAuth
public
String
saveScreen
(
@RequestBody
PageInfoEntity
pdu
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
int
code
=
1
;
String
busiDesc
=
"保存页面截图"
;
try
{
PageInfoEntity
entity
=
pageInfoService
.
saveScreen
(
pdu
,
context
);
model
.
put
(
"entity"
,
entity
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var7
)
{
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var7
);
code
=
-
1
;
model
.
put
(
"entity"
,
pdu
);
}
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
"code"
,
code
);
ret
.
put
(
"msg"
,
model
.
remove
(
"message_info"
));
ret
.
put
(
"data"
,
model
);
return
ret
.
toJSONString
();
}
}
}
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