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
Show 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,14 +452,15 @@ public class TDetectorUserController extends BaseController
...
@@ -452,14 +452,15 @@ public class TDetectorUserController extends BaseController
List
<
UserManageGasUserExportVo
>
userManageGasUserobjects
=
ExcelUtil
.
moreSheetImportExcel
(
file
,
1
,
2
,
UserManageGasUserExportVo
.
class
,
0
);
List
<
UserManageGasUserExportVo
>
userManageGasUserobjects
=
ExcelUtil
.
moreSheetImportExcel
(
file
,
1
,
2
,
UserManageGasUserExportVo
.
class
,
0
);
tDetectorUserService
.
handleCustomMoreSheetImportData
(
userManageGasUserobjects
,
null
,
updateSupport
,
true
);
tDetectorUserService
.
handleCustomMoreSheetImportData
(
userManageGasUserobjects
,
null
,
updateSupport
,
true
);
return
AjaxResult
.
success
();
}
else
{
}
else
{
List
<
UserManageGasUserExportVo
>
userManageGasUserobjects
=
ExcelUtil
.
moreSheetImportExcel
(
file
,
1
,
2
,
UserManageGasUserExportVo
.
class
,
0
);
List
<
UserManageGasUserExportVo
>
userManageGasUserobjects
=
ExcelUtil
.
moreSheetImportExcel
(
file
,
1
,
2
,
UserManageGasUserExportVo
.
class
,
0
);
List
<
UserManageSafetyDeviceExportVo
>
userManageSafetyobjects
=
ExcelUtil
.
moreSheetImportExcel
(
file
,
1
,
2
,
UserManageSafetyDeviceExportVo
.
class
,
1
);
List
<
UserManageSafetyDeviceExportVo
>
userManageSafetyobjects
=
ExcelUtil
.
moreSheetImportExcel
(
file
,
1
,
2
,
UserManageSafetyDeviceExportVo
.
class
,
1
);
tDetectorUserService
.
handleCustomMoreSheetImportData
(
userManageGasUserobjects
,
userManageSafetyobjects
,
updateSupport
,
false
);
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
...
@@ -587,8 +587,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
}
}
//是要修改的
//是要修改的
List
<
TDetectorUser
>
updateCollect
=
successDataList
.
stream
().
filter
(
item
->
item
.
getUserId
()
!=
null
).
collect
(
Collectors
.
toList
());
List
<
TDetectorUser
>
updateCollect
=
successDataList
.
stream
().
filter
(
item
->
item
.
getUserId
()
!=
null
).
collect
(
Collectors
.
toList
());
if
(
updateCollect
.
size
()
>
0
)
{
if
(
updateCollect
.
size
()
>
0
&&
reImportOfIncorrectDataFlag
)
{
// tDetectorUserMapper.updateBatch(updateCollect);
String
sql
=
"UPDATE t_detector_user \n"
+
String
sql
=
"UPDATE t_detector_user \n"
+
"SET nick_name = ?,\n"
+
"SET nick_name = ?,\n"
+
"user_type = ?,\n"
+
"user_type = ?,\n"
+
...
...
zh-baseversion-web/src/views/regulation/userManagement/gasUsers/index.vue
View file @
14b138a0
...
@@ -74,19 +74,6 @@
...
@@ -74,19 +74,6 @@
@
click=
"handleImport"
>
导入
</el-button>
@
click=
"handleImport"
>
导入
</el-button>
</el-col>
</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>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
...
@@ -507,11 +494,39 @@
...
@@ -507,11 +494,39 @@
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__tip text-center"
slot=
"tip"
>
<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>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size:12px;vertical-align: baseline;"
@
click=
"importTemplate"
>
下载模板
</el-link>
<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>
</div>
</el-upload>
</el-upload>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -826,14 +841,21 @@ export default {
...
@@ -826,14 +841,21 @@ export default {
this
.
upload
.
open
=
false
;
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
this
.
$refs
.
upload
.
clearFiles
();
// 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
});
this
.
$alert
(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"
+
response
.
msg
+
"</div>"
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
});
this
.
getDataList
();
}
else
{
this
.
countImportError
();
this
.
$alert
(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"
+
'有错误数据,请点击导入界面查看详情'
+
"</div>"
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
});
}
})
this
.
getList
();
listUser
(
this
.
queryParams
).
then
(
response
=>
{
// //导入后 刷新 任职岗位字典数据
this
.
userList
=
response
.
rows
;
// this.peopleOccupationOptions = [];
this
.
total
=
response
.
total
;
// this.queryPeopleOccupationByGroupByMethod(
);
}
);
},
},
/**关联设备已经选中数据删除方法*/
/**关联设备已经选中数据删除方法*/
...
@@ -1212,4 +1234,10 @@ export default {
...
@@ -1212,4 +1234,10 @@ export default {
padding
:
0
15px
;
padding
:
0
15px
;
transform
:
translateX
(
-50%
)
translateY
(
-50%
);
transform
:
translateX
(
-50%
)
translateY
(
-50%
);
}
}
.el-badge__content.is-fixed
{
top
:
0
!important
;
right
:
5px
!important
;
}
</
style
>
</
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