Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zh-baseversion-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王浩
zh-baseversion-project
Commits
14b138a0
Commit
14b138a0
authored
Sep 02, 2024
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 燃气用户界面 错误数据导出 再导入功能
parent
45b9a1c9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
27 deletions
+55
-27
TDetectorUserController.java
...ong/web/controller/supervise/TDetectorUserController.java
+2
-1
TDetectorUserServiceImpl.java
.../zehong/system/service/impl/TDetectorUserServiceImpl.java
+1
-2
index.vue
...eb/src/views/regulation/userManagement/gasUsers/index.vue
+52
-24
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/supervise/TDetectorUserController.java
View file @
14b138a0
...
...
@@ -452,13 +452,14 @@ public class TDetectorUserController extends BaseController
List
<
UserManageGasUserExportVo
>
userManageGasUserobjects
=
ExcelUtil
.
moreSheetImportExcel
(
file
,
1
,
2
,
UserManageGasUserExportVo
.
class
,
0
);
tDetectorUserService
.
handleCustomMoreSheetImportData
(
userManageGasUserobjects
,
null
,
updateSupport
,
true
);
return
AjaxResult
.
success
();
}
else
{
List
<
UserManageGasUserExportVo
>
userManageGasUserobjects
=
ExcelUtil
.
moreSheetImportExcel
(
file
,
1
,
2
,
UserManageGasUserExportVo
.
class
,
0
);
List
<
UserManageSafetyDeviceExportVo
>
userManageSafetyobjects
=
ExcelUtil
.
moreSheetImportExcel
(
file
,
1
,
2
,
UserManageSafetyDeviceExportVo
.
class
,
1
);
tDetectorUserService
.
handleCustomMoreSheetImportData
(
userManageGasUserobjects
,
userManageSafetyobjects
,
updateSupport
,
false
);
return
AjaxResult
.
success
();
}
return
AjaxResult
.
success
();
}
/**
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TDetectorUserServiceImpl.java
View file @
14b138a0
...
...
@@ -587,8 +587,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
}
//是要修改的
List
<
TDetectorUser
>
updateCollect
=
successDataList
.
stream
().
filter
(
item
->
item
.
getUserId
()
!=
null
).
collect
(
Collectors
.
toList
());
if
(
updateCollect
.
size
()
>
0
)
{
// tDetectorUserMapper.updateBatch(updateCollect);
if
(
updateCollect
.
size
()
>
0
&&
reImportOfIncorrectDataFlag
)
{
String
sql
=
"UPDATE t_detector_user \n"
+
"SET nick_name = ?,\n"
+
"user_type = ?,\n"
+
...
...
zh-baseversion-web/src/views/regulation/userManagement/gasUsers/index.vue
View file @
14b138a0
...
...
@@ -72,20 +72,7 @@
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleImport"
>
导入
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleImportError"
class=
"button-with-badge"
>
<span>
下载导入时错误数据
</span>
<span
class=
"badge"
v-if=
"importError !== 0"
>
{{
importError
}}
</span>
</el-button>
</el-col>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
...
...
@@ -507,11 +494,39 @@
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__tip text-center"
slot=
"tip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<el-checkbox
v-model=
"upload.updateSupport"
/>
是否更新已经存在的用户数据
</div>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size:12px;vertical-align: baseline;"
@
click=
"importTemplate"
>
下载模板
</el-link>
<br>
<!-- <el-form>
<el-form-item>
<div style="width: 100%; text-align: center;">
<el-button type="primary" @click="downloadImportError">下载错误数据</el-button>
<el-button type="danger" @click="clearImportErrorMethod">清除错误数据</el-button>
</div>
</el-form-item>
</el-form> -->
<el-divider
v-if=
"this.importError > 0 "
content-position=
"left"
>
错误数据导出分隔
</el-divider>
<br>
<el-badge
v-if=
"this.importError > 0 "
:value=
"importError"
class=
"item"
>
<el-button
type=
"danger"
icon=
"el-icon-download"
size=
"small"
@
click=
"handleImportError"
v-if=
"this.importError > 0 "
>
<span>
下载导入时错误数据
</span>
</el-button>
</el-badge>
<!-- <el-link v-if="this.importError > 0" type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="downloadImportError">下载错误数据</el-link>
<el-link v-if="this.importError > 0" type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="clearImportErrorMethod">清除错误数据</el-link> -->
</div>
</el-upload>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -826,14 +841,21 @@ export default {
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
this
.
$alert
(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"
+
response
.
msg
+
"</div>"
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
});
this
.
getDataList
();
this
.
countImportError
();
// this.getDataList();
countImportError
().
then
(
response
=>
{
this
.
importError
=
response
.
data
;
if
(
this
.
importError
===
0
)
{
this
.
$alert
(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"
+
response
.
msg
+
"</div>"
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
});
}
else
{
this
.
$alert
(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"
+
'有错误数据,请点击导入界面查看详情'
+
"</div>"
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
});
}
})
this
.
getList
();
// //导入后 刷新 任职岗位字典数据
// this.peopleOccupationOptions = [];
// this.queryPeopleOccupationByGroupByMethod(
);
listUser
(
this
.
queryParams
).
then
(
response
=>
{
this
.
userList
=
response
.
rows
;
this
.
total
=
response
.
total
;
}
);
},
/**关联设备已经选中数据删除方法*/
...
...
@@ -1212,4 +1234,10 @@ export default {
padding
:
0
15px
;
transform
:
translateX
(
-50%
)
translateY
(
-50%
);
}
.el-badge__content.is-fixed
{
top
:
0
!important
;
right
:
5px
!important
;
}
</
style
>
\ No newline at end of file
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