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
0e0d3597
Commit
0e0d3597
authored
Dec 07, 2022
by
王琮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改核酸采集导入
parent
82e29673
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
119 additions
and
208 deletions
+119
-208
HscjController.java
.../java/com/ruoyi/web/controller/system/HscjController.java
+4
-3
application-druid.yml
ruoyi-admin/src/main/resources/application-druid.yml
+9
-8
Hscj.java
ruoyi-system/src/main/java/com/ruoyi/system/domain/Hscj.java
+12
-17
HscjErrorDto.java
...rc/main/java/com/ruoyi/system/domain/vo/HscjErrorDto.java
+19
-0
HscjMapper.java
...tem/src/main/java/com/ruoyi/system/mapper/HscjMapper.java
+2
-1
IHscjService.java
.../src/main/java/com/ruoyi/system/service/IHscjService.java
+10
-9
HscjServiceImpl.java
...n/java/com/ruoyi/system/service/impl/HscjServiceImpl.java
+62
-169
HscjMapper.xml
ruoyi-system/src/main/resources/mapper/system/HscjMapper.xml
+1
-1
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/HscjController.java
View file @
0e0d3597
...
...
@@ -10,6 +10,7 @@ import com.ruoyi.common.utils.DictUtils;
import
com.ruoyi.system.domain.Gldry
;
import
com.ruoyi.system.domain.HsjcExportTemplate
;
import
com.ruoyi.system.domain.Yxry
;
import
com.ruoyi.system.domain.vo.HscjErrorDto
;
import
com.ruoyi.system.mapper.SysDictDataMapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -27,7 +28,7 @@ import org.springframework.web.multipart.MultipartFile;
/**
* 核酸采集Controller
*
*
* @author ruoyi
* @date 2022-11-28
*/
...
...
@@ -125,8 +126,8 @@ public class HscjController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:hscj:import')"
)
@PostMapping
(
"/importData"
)
public
void
importHscjData
(
MultipartFile
file
,
HttpServletResponse
response
)
throws
Exception
{
ExcelUtil
<
Hscj
>
util
=
new
ExcelUtil
<
Hscj
>(
Hscj
.
class
);
List
<
Hscj
>
dataList
=
util
.
importExcel
(
file
.
getInputStream
());
ExcelUtil
<
Hscj
ErrorDto
>
util
=
new
ExcelUtil
<
HscjErrorDto
>(
HscjErrorDto
.
class
);
List
<
Hscj
ErrorDto
>
dataList
=
util
.
importExcel
(
file
.
getInputStream
());
hscjService
.
importList
(
dataList
,
response
);
}
...
...
ruoyi-admin/src/main/resources/application-druid.yml
View file @
0e0d3597
...
...
@@ -6,19 +6,20 @@ spring:
druid
:
# 主库数据源
master
:
url
:
jdbc:mysql://
localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://
124.71.16.228:18085/gxq?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowMultiQueries=true
username
:
root
password
:
111111
password
:
njk34nj3k423k
# url: jdbc:mysql://health_db:3306/gxq?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
# username: root
# password: njk34nj3k423k
# 从库数据源
slave
:
# 从数据源开关/默认关闭
enabled
:
fals
e
url
:
username
:
password
:
enabled
:
tru
e
url
:
jdbc:mysql://127.0.0.1:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowMultiQueries=true
username
:
root
password
:
wc199921
# 初始连接数
initialSize
:
5
# 最小连接池数量
...
...
@@ -38,7 +39,7 @@ spring:
testWhileIdle
:
true
testOnBorrow
:
false
testOnReturn
:
false
webStatFilter
:
webStatFilter
:
enabled
:
true
statViewServlet
:
enabled
:
true
...
...
@@ -57,4 +58,4 @@ spring:
merge-sql
:
true
wall
:
config
:
multi-statement-allow
:
true
\ No newline at end of file
multi-statement-allow
:
true
ruoyi-system/src/main/java/com/ruoyi/system/domain/Hscj.java
View file @
0e0d3597
...
...
@@ -4,9 +4,10 @@ import java.util.Date;
import
java.util.List
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.annotation.Excel
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.annotation.Excel
.Type
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
org.springframework.data.annotation.Transient
;
...
...
@@ -25,7 +26,7 @@ public class Hscj extends BaseEntity
/** 省 */
// 新增字段
@Excel
(
name
=
"省"
)
@Excel
(
name
=
"省"
,
type
=
Type
.
EXPORT
)
private
String
province
;
/** 市 */
...
...
@@ -33,14 +34,14 @@ public class Hscj extends BaseEntity
private
String
city
;
/** 居住地所在区 */
@Excel
(
name
=
"
居住地所在区"
,
dictType
=
"residential_area
"
)
@Excel
(
name
=
"
区
"
)
private
String
area
;
/** 街道/镇 */
@Excel
(
name
=
"街道
/镇
"
)
@Excel
(
name
=
"街道"
)
private
String
street
;
@Excel
(
name
=
"
居委会
"
)
@Excel
(
name
=
"
社区
"
)
// 新增字段2
private
String
committee
;
...
...
@@ -60,8 +61,7 @@ public class Hscj extends BaseEntity
@Excel
(
name
=
"采集管号"
,
cellType
=
Excel
.
ColumnType
.
STRING
)
private
String
cjgh
;
/** 采集管号 */
@Excel
(
name
=
"是否混管"
,
readConverterExp
=
"0=单管,1=混管"
,
combo
=
{
"单管"
,
"混管"
})
@Excel
(
name
=
"是否混管"
,
readConverterExp
=
"0=单管,1=混管"
)
private
String
isHun
;
/** 姓名 */
...
...
@@ -69,15 +69,15 @@ public class Hscj extends BaseEntity
private
String
userName
;
/** 身份证号码 */
@Excel
(
name
=
"身份证号
码
"
,
cellType
=
Excel
.
ColumnType
.
STRING
)
@Excel
(
name
=
"身份证号"
,
cellType
=
Excel
.
ColumnType
.
STRING
)
private
String
cardNo
;
/** 身份证号码格式校验 */
@Excel
(
name
=
"身份证格式校验"
)
@Excel
(
name
=
"身份证格式校验"
,
type
=
Type
.
EXPORT
)
private
String
checkCard
;
/** 联系方式 */
@Excel
(
name
=
"
联系方式
"
)
@Excel
(
name
=
"
电话
"
)
private
String
phone
;
/** 性别 */
...
...
@@ -93,7 +93,7 @@ public class Hscj extends BaseEntity
private
Long
age
;
/** 类别 */
@Excel
(
name
=
"
人员
类别"
)
@Excel
(
name
=
"类别"
)
private
String
category
;
/** 人员关系 */
...
...
@@ -136,12 +136,7 @@ public class Hscj extends BaseEntity
@Excel
(
name
=
"备注"
)
private
String
remark
;
// 新增字段
// @Excel(name = "居委会")
// private String committee;
/** 状态(0正常 1停用) */
// @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private
String
status
;
/** 删除标志(0代表存在 2代表删除) */
...
...
@@ -149,8 +144,8 @@ public class Hscj extends BaseEntity
/**创建时间*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
// @Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
private
Date
createTime
;
/**导出选中IDLIST */
@Transient
()
private
List
<
String
>
idList
;
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/HscjErrorDto.java
0 → 100644
View file @
0e0d3597
package
com
.
ruoyi
.
system
.
domain
.
vo
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.annotation.Excel.Type
;
import
com.ruoyi.system.domain.Hscj
;
import
org.apache.poi.ss.usermodel.IndexedColors
;
public
class
HscjErrorDto
extends
Hscj
{
@Excel
(
name
=
"错误提示"
,
type
=
Type
.
EXPORT
,
color
=
IndexedColors
.
RED
)
private
String
error
;
public
String
getError
()
{
return
error
;
}
public
void
setError
(
String
error
)
{
this
.
error
=
error
;
}
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/HscjMapper.java
View file @
0e0d3597
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.system.mapper;
import
java.util.List
;
import
com.ruoyi.system.domain.Hscj
;
import
com.ruoyi.system.domain.Yxry
;
import
com.ruoyi.system.domain.vo.HscjErrorDto
;
import
org.apache.ibatis.annotations.Param
;
/**
...
...
@@ -74,7 +75,7 @@ public interface HscjMapper
List
<
Hscj
>
checkCardBatch
(
List
<
Hscj
>
hscjList
);
int
insertBatch
(
@Param
(
"list"
)
List
<
Hscj
>
list
);
int
insertBatch
(
@Param
(
"list"
)
List
<
Hscj
ErrorDto
>
list
);
int
updateBatch
(
List
<
Hscj
>
updateList
);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/IHscjService.java
View file @
0e0d3597
...
...
@@ -3,20 +3,21 @@ package com.ruoyi.system.service;
import
java.util.List
;
import
com.ruoyi.system.domain.Hscj
;
import
com.ruoyi.system.domain.Zlqk
;
import
com.ruoyi.system.domain.vo.HscjErrorDto
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 核酸采集Service接口
*
*
* @author ruoyi
* @date 2022-11-28
*/
public
interface
IHscjService
public
interface
IHscjService
{
/**
* 查询核酸采集
*
*
* @param id 核酸采集主键
* @return 核酸采集
*/
...
...
@@ -24,7 +25,7 @@ public interface IHscjService
/**
* 查询核酸采集列表
*
*
* @param hscj 核酸采集
* @return 核酸采集集合
*/
...
...
@@ -39,7 +40,7 @@ public interface IHscjService
/**
* 新增核酸采集
*
*
* @param hscj 核酸采集
* @return 结果
*/
...
...
@@ -47,7 +48,7 @@ public interface IHscjService
/**
* 修改核酸采集
*
*
* @param hscj 核酸采集
* @return 结果
*/
...
...
@@ -55,7 +56,7 @@ public interface IHscjService
/**
* 批量删除核酸采集
*
*
* @param ids 需要删除的核酸采集主键集合
* @return 结果
*/
...
...
@@ -63,13 +64,13 @@ public interface IHscjService
/**
* 删除核酸采集信息
*
*
* @param id 核酸采集主键
* @return 结果
*/
public
int
deleteHscjById
(
Long
id
);
void
importList
(
List
<
Hscj
>
list
,
HttpServletResponse
response
);
void
importList
(
List
<
Hscj
ErrorDto
>
list
,
HttpServletResponse
response
);
List
<
Hscj
>
checkCard
(
Hscj
hscj
);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/HscjServiceImpl.java
View file @
0e0d3597
This diff is collapsed.
Click to expand it.
ruoyi-system/src/main/resources/mapper/system/HscjMapper.xml
View file @
0e0d3597
...
...
@@ -260,7 +260,7 @@
</trim>
</insert>
<insert
id=
"insertBatch"
parameterType=
"com.ruoyi.system.domain.
Hscj
"
>
<insert
id=
"insertBatch"
parameterType=
"com.ruoyi.system.domain.
vo.HscjErrorDto
"
>
insert into hscj
(committee,province,city,area,street,community,cj_place,cjgh,user_name,card_no,check_card,phone,sex,address,
age,category,cj_time,cj_name,cj_phone,b_type,laboratory,jc_time,cj_result,rygx,boxhao,create_by,create_time,remark,
...
...
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