Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
data_management_system
Project
Project
Details
Activity
Releases
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
张伯涛
data_management_system
Commits
30eaf855
Commit
30eaf855
authored
Nov 29, 2022
by
陈明豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
核酸采集和隔离点人员的导出空模板,导入功能
parent
4c70d55c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
69 additions
and
23 deletions
+69
-23
GldryController.java
...java/com/ruoyi/web/controller/system/GldryController.java
+3
-7
HscjController.java
.../java/com/ruoyi/web/controller/system/HscjController.java
+3
-7
HscjServiceImpl.java
...n/java/com/ruoyi/system/service/impl/HscjServiceImpl.java
+14
-0
gldry.js
ruoyi-ui/src/api/system/gldry.js
+20
-0
hscj.js
ruoyi-ui/src/api/system/hscj.js
+20
-0
index.vue
ruoyi-ui/src/views/system/gldry/index.vue
+4
-4
index.vue
ruoyi-ui/src/views/system/hscj/index.vue
+5
-5
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/GldryController.java
View file @
30eaf855
...
@@ -56,22 +56,18 @@ public class GldryController extends BaseController
...
@@ -56,22 +56,18 @@ public class GldryController extends BaseController
}
}
@Log
(
title
=
"导出隔离点人员导入空模板"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"导出隔离点人员导入空模板"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/
ex
portTemplate"
)
@GetMapping
(
"/
im
portTemplate"
)
public
void
exportTemplate
(
HttpServletResponse
response
){
public
void
exportTemplate
(
HttpServletResponse
response
){
ExcelUtil
<
Gldry
>
util
=
new
ExcelUtil
<
Gldry
>(
Gldry
.
class
);
ExcelUtil
<
Gldry
>
util
=
new
ExcelUtil
<
Gldry
>(
Gldry
.
class
);
util
.
importTemplateExcel
(
response
,
"隔离点人员数据导入空模板"
);
util
.
importTemplateExcel
(
response
,
"隔离点人员数据导入空模板"
);
}
}
@Log
(
title
=
"导入隔离点人员数据"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"导入隔离点人员数据"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/importGldryData"
)
@PostMapping
(
"/importData"
)
@ResponseBody
public
void
importGldryData
(
MultipartFile
file
,
HttpServletResponse
response
)
throws
Exception
{
public
AjaxResult
importGldryData
(
MultipartFile
file
,
HttpServletResponse
response
)
throws
Exception
{
ExcelUtil
<
Gldry
>
util
=
new
ExcelUtil
<
Gldry
>(
Gldry
.
class
);
ExcelUtil
<
Gldry
>
util
=
new
ExcelUtil
<
Gldry
>(
Gldry
.
class
);
List
<
Gldry
>
dataList
=
util
.
importExcel
(
file
.
getInputStream
());
List
<
Gldry
>
dataList
=
util
.
importExcel
(
file
.
getInputStream
());
gldryService
.
importList
(
dataList
,
response
);
gldryService
.
importList
(
dataList
,
response
);
String
message
=
"导入隔离点人员数据"
;
return
AjaxResult
.
success
(
message
);
}
}
/**
/**
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/HscjController.java
View file @
30eaf855
...
@@ -56,23 +56,19 @@ public class HscjController extends BaseController
...
@@ -56,23 +56,19 @@ public class HscjController extends BaseController
}
}
@Log
(
title
=
"导出核酸采集导入空模板"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"导出核酸采集导入空模板"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/
ex
portTemplate"
)
@GetMapping
(
"/
im
portTemplate"
)
public
void
exportTemplate
(
HttpServletResponse
response
){
public
void
exportTemplate
(
HttpServletResponse
response
){
ExcelUtil
<
Hscj
>
util
=
new
ExcelUtil
<
Hscj
>(
Hscj
.
class
);
ExcelUtil
<
Hscj
>
util
=
new
ExcelUtil
<
Hscj
>(
Hscj
.
class
);
util
.
importTemplateExcel
(
response
,
"核酸采集导入空模板"
);
util
.
importTemplateExcel
(
response
,
"核酸采集导入空模板"
);
}
}
@Log
(
title
=
"导入核算采集数据"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"导入核算采集数据"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/importHsjcData"
)
@PostMapping
(
"/importData"
)
@ResponseBody
public
void
importHscjData
(
MultipartFile
file
,
HttpServletResponse
response
)
throws
Exception
{
public
AjaxResult
importHsjcData
(
MultipartFile
file
,
HttpServletResponse
response
)
throws
Exception
{
ExcelUtil
<
Hscj
>
util
=
new
ExcelUtil
<
Hscj
>(
Hscj
.
class
);
ExcelUtil
<
Hscj
>
util
=
new
ExcelUtil
<
Hscj
>(
Hscj
.
class
);
List
<
Hscj
>
dataList
=
util
.
importExcel
(
file
.
getInputStream
());
List
<
Hscj
>
dataList
=
util
.
importExcel
(
file
.
getInputStream
());
System
.
out
.
println
(
dataList
);
hscjService
.
importList
(
dataList
,
response
);
hscjService
.
importList
(
dataList
,
response
);
String
message
=
"导入核算采集数据"
;
return
AjaxResult
.
success
(
message
);
}
}
/**
/**
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/HscjServiceImpl.java
View file @
30eaf855
...
@@ -3,12 +3,14 @@ package com.ruoyi.system.service.impl;
...
@@ -3,12 +3,14 @@ package com.ruoyi.system.service.impl;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
com.ruoyi.common.core.domain.entity.SysDictData
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.CheckUtils
;
import
com.ruoyi.common.utils.CheckUtils
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.system.domain.Zlqk
;
import
com.ruoyi.system.domain.Zlqk
;
import
com.ruoyi.system.mapper.SysDictDataMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
...
@@ -30,6 +32,8 @@ public class HscjServiceImpl implements IHscjService
...
@@ -30,6 +32,8 @@ public class HscjServiceImpl implements IHscjService
{
{
@Autowired
@Autowired
private
HscjMapper
hscjMapper
;
private
HscjMapper
hscjMapper
;
@Autowired
private
SysDictDataMapper
sysDictDataMapper
;
/**
/**
* 查询核酸采集
* 查询核酸采集
...
@@ -146,6 +150,16 @@ public class HscjServiceImpl implements IHscjService
...
@@ -146,6 +150,16 @@ public class HscjServiceImpl implements IHscjService
if
(!
hscjs
.
isEmpty
()){
if
(!
hscjs
.
isEmpty
()){
failureList
.
add
(
hscj
);
failureList
.
add
(
hscj
);
}
else
{
}
else
{
if
(
StringUtils
.
isNotEmpty
(
hscj
.
getStreet
())){
List
<
SysDictData
>
dictDataList
=
sysDictDataMapper
.
selectDictDataByType
(
"street_town"
);
String
street
=
hscj
.
getStreet
();
for
(
SysDictData
sysDictData:
dictDataList
){
if
(
sysDictData
.
getDictLabel
().
equals
(
street
)){
street
=
sysDictData
.
getDictValue
();
}
}
hscj
.
setStreet
(
street
);
}
if
(
CheckUtils
.
checkCard
(
hscj
.
getCardNo
())){
if
(
CheckUtils
.
checkCard
(
hscj
.
getCardNo
())){
if
(
hscj
.
getSex
().
equals
(
"女"
)){
if
(
hscj
.
getSex
().
equals
(
"女"
)){
hscj
.
setSex
(
"1"
);
hscj
.
setSex
(
"1"
);
...
...
ruoyi-ui/src/api/system/gldry.js
View file @
30eaf855
...
@@ -42,3 +42,23 @@ export function delGldry(id) {
...
@@ -42,3 +42,23 @@ export function delGldry(id) {
method
:
'delete'
method
:
'delete'
})
})
}
}
// 下载导入模板
export
function
importTemplate
(
params
)
{
return
request
({
url
:
'/system/gldry/importTemplate'
,
method
:
'get'
,
responseType
:
'blob'
,
params
})
}
// 导入用户信息
export
function
importExcel
(
data
)
{
return
request
({
url
:
'/system/gldry/importData'
,
method
:
'post'
,
responseType
:
'blob'
,
data
})
}
ruoyi-ui/src/api/system/hscj.js
View file @
30eaf855
...
@@ -42,3 +42,23 @@ export function delHscj(id) {
...
@@ -42,3 +42,23 @@ export function delHscj(id) {
method
:
'delete'
method
:
'delete'
})
})
}
}
// 下载导入模板
export
function
importTemplate
(
params
)
{
return
request
({
url
:
'/system/hscj/importTemplate'
,
method
:
'get'
,
responseType
:
'blob'
,
params
})
}
// 导入用户信息
export
function
importExcel
(
data
)
{
return
request
({
url
:
'/system/hscj/importData'
,
method
:
'post'
,
responseType
:
'blob'
,
data
})
}
ruoyi-ui/src/views/system/gldry/index.vue
View file @
30eaf855
...
@@ -348,7 +348,7 @@
...
@@ -348,7 +348,7 @@
<
script
>
<
script
>
import
{
listGldry
,
getGldry
,
delGldry
,
addGldry
,
updateGldry
}
from
"@/api/system/gldry"
;
import
{
listGldry
,
getGldry
,
delGldry
,
addGldry
,
updateGldry
}
from
"@/api/system/gldry"
;
import
{
getToken
}
from
'@/utils/auth'
import
{
getToken
}
from
'@/utils/auth'
import
{
importTemplate
,
importExcel
}
from
"@/api/system/
zlqk
"
;
import
{
importTemplate
,
importExcel
}
from
"@/api/system/
gldry
"
;
export
default
{
export
default
{
name
:
"Gldry"
,
name
:
"Gldry"
,
...
@@ -370,7 +370,7 @@ export default {
...
@@ -370,7 +370,7 @@ export default {
// 设置上传的请求头部
// 设置上传的请求头部
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
},
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
},
// 上传的地址
// 上传的地址
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/system/
zlqk/im
portTemplate"
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/system/
gldry/ex
portTemplate"
},
},
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
...
@@ -499,7 +499,7 @@ export default {
...
@@ -499,7 +499,7 @@ export default {
/** 导入按钮操作 */
/** 导入按钮操作 */
handleImport
()
{
handleImport
()
{
this
.
importLoading
=
false
this
.
importLoading
=
false
this
.
upload
.
title
=
"
治疗情况
导入"
;
this
.
upload
.
title
=
"
隔离点人员信息
导入"
;
this
.
upload
.
open
=
true
;
this
.
upload
.
open
=
true
;
},
},
/** 下载模板操作 */
/** 下载模板操作 */
...
@@ -509,7 +509,7 @@ export default {
...
@@ -509,7 +509,7 @@ export default {
const
downloadElement
=
document
.
createElement
(
'a'
)
const
downloadElement
=
document
.
createElement
(
'a'
)
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
// 创建下载的链接
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
// 创建下载的链接
downloadElement
.
href
=
href
downloadElement
.
href
=
href
downloadElement
.
download
=
'
治疗情况
导入模板'
+
'.xls'
// 下载后文件名
downloadElement
.
download
=
'
隔离点人员信息
导入模板'
+
'.xls'
// 下载后文件名
document
.
body
.
appendChild
(
downloadElement
)
document
.
body
.
appendChild
(
downloadElement
)
downloadElement
.
click
()
// 点击下载
downloadElement
.
click
()
// 点击下载
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
...
...
ruoyi-ui/src/views/system/hscj/index.vue
View file @
30eaf855
...
@@ -454,7 +454,7 @@
...
@@ -454,7 +454,7 @@
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<!--
治疗情况
导入对话框 -->
<!-- 导入对话框 -->
<el-dialog
:before-close=
"closeFileDialog"
:title=
"upload.title"
:close-on-click-modal=
"false"
:visible
.
sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-dialog
:before-close=
"closeFileDialog"
:title=
"upload.title"
:close-on-click-modal=
"false"
:visible
.
sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-upload
<el-upload
accept=
".xlsx, .xls"
accept=
".xlsx, .xls"
...
@@ -493,7 +493,7 @@
...
@@ -493,7 +493,7 @@
<
script
>
<
script
>
import
{
listHscj
,
getHscj
,
delHscj
,
addHscj
,
updateHscj
}
from
"@/api/system/hscj"
;
import
{
listHscj
,
getHscj
,
delHscj
,
addHscj
,
updateHscj
}
from
"@/api/system/hscj"
;
import
{
getToken
}
from
'@/utils/auth'
import
{
getToken
}
from
'@/utils/auth'
import
{
importTemplate
,
importExcel
}
from
"@/api/system/
zlqk
"
;
import
{
importTemplate
,
importExcel
}
from
"@/api/system/
hscj
"
;
export
default
{
export
default
{
...
@@ -516,7 +516,7 @@ export default {
...
@@ -516,7 +516,7 @@ export default {
// 设置上传的请求头部
// 设置上传的请求头部
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
},
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
},
// 上传的地址
// 上传的地址
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/system/
zlqk/im
portTemplate"
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/system/
hscj/ex
portTemplate"
},
},
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
...
@@ -656,7 +656,7 @@ export default {
...
@@ -656,7 +656,7 @@ export default {
/** 导入按钮操作 */
/** 导入按钮操作 */
handleImport
()
{
handleImport
()
{
this
.
importLoading
=
false
this
.
importLoading
=
false
this
.
upload
.
title
=
"
治疗情况
导入"
;
this
.
upload
.
title
=
"
核酸采集信息
导入"
;
this
.
upload
.
open
=
true
;
this
.
upload
.
open
=
true
;
},
},
/** 下载模板操作 */
/** 下载模板操作 */
...
@@ -666,7 +666,7 @@ export default {
...
@@ -666,7 +666,7 @@ export default {
const
downloadElement
=
document
.
createElement
(
'a'
)
const
downloadElement
=
document
.
createElement
(
'a'
)
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
// 创建下载的链接
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
// 创建下载的链接
downloadElement
.
href
=
href
downloadElement
.
href
=
href
downloadElement
.
download
=
'
治疗情况
导入模板'
+
'.xls'
// 下载后文件名
downloadElement
.
download
=
'
核酸采集信息
导入模板'
+
'.xls'
// 下载后文件名
document
.
body
.
appendChild
(
downloadElement
)
document
.
body
.
appendChild
(
downloadElement
)
downloadElement
.
click
()
// 点击下载
downloadElement
.
click
()
// 点击下载
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
...
...
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