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
c5555ce3
Commit
c5555ce3
authored
Nov 30, 2022
by
mzx
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
2eb94337
0eba13ce
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
179 additions
and
95 deletions
+179
-95
FcryController.java
.../java/com/ruoyi/web/controller/system/FcryController.java
+6
-0
GldryController.java
...java/com/ruoyi/web/controller/system/GldryController.java
+6
-0
YxryController.java
.../java/com/ruoyi/web/controller/system/YxryController.java
+6
-6
CheckUtils.java
...mmon/src/main/java/com/ruoyi/common/utils/CheckUtils.java
+5
-1
DataUtils.java
...ommon/src/main/java/com/ruoyi/common/utils/DataUtils.java
+1
-1
Yxry.java
ruoyi-system/src/main/java/com/ruoyi/system/domain/Yxry.java
+36
-34
YxryMapper.java
...tem/src/main/java/com/ruoyi/system/mapper/YxryMapper.java
+2
-0
YxryServiceImpl.java
...n/java/com/ruoyi/system/service/impl/YxryServiceImpl.java
+32
-14
YxryMapper.xml
ruoyi-system/src/main/resources/mapper/system/YxryMapper.xml
+40
-0
index.vue
ruoyi-ui/src/views/system/hscj/index.vue
+45
-39
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/FcryController.java
View file @
c5555ce3
...
@@ -73,6 +73,12 @@ public class FcryController extends BaseController
...
@@ -73,6 +73,12 @@ public class FcryController extends BaseController
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
Fcry
fcry
)
public
void
export
(
HttpServletResponse
response
,
Fcry
fcry
)
{
{
String
userType
=
sysUserMapper
.
selectUserTypeById
(
SecurityUtils
.
getUserId
());
fcry
.
setUserType
(
userType
);
if
(
"2"
.
equals
(
userType
))
fcry
.
setValue
(
DataUtils
.
getKey
(
null
,
String
.
valueOf
(
SecurityUtils
.
getUserId
()),
null
,
null
,
null
));
else
if
(
"3"
.
equals
(
userType
))
fcry
.
setValue
(
DataUtils
.
getKey
(
null
,
null
,
String
.
valueOf
(
SecurityUtils
.
getUserId
()),
null
,
null
));
List
<
Fcry
>
list
=
fcryService
.
selectFcryList
(
fcry
);
List
<
Fcry
>
list
=
fcryService
.
selectFcryList
(
fcry
);
ExcelUtil
<
Fcry
>
util
=
new
ExcelUtil
<
Fcry
>(
Fcry
.
class
);
ExcelUtil
<
Fcry
>
util
=
new
ExcelUtil
<
Fcry
>(
Fcry
.
class
);
util
.
exportExcel
(
response
,
list
,
"方舱人员数据"
);
util
.
exportExcel
(
response
,
list
,
"方舱人员数据"
);
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/GldryController.java
View file @
c5555ce3
...
@@ -66,6 +66,12 @@ public class GldryController extends BaseController
...
@@ -66,6 +66,12 @@ public class GldryController extends BaseController
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
Gldry
gldry
)
public
void
export
(
HttpServletResponse
response
,
Gldry
gldry
)
{
{
String
userType
=
sysUserMapper
.
selectUserTypeById
(
SecurityUtils
.
getUserId
());
gldry
.
setUserType
(
userType
);
if
(
"2"
.
equals
(
userType
))
gldry
.
setValue
(
DataUtils
.
getKey
(
null
,
String
.
valueOf
(
SecurityUtils
.
getUserId
()),
null
,
null
,
null
));
else
if
(
"3"
.
equals
(
userType
))
gldry
.
setValue
(
DataUtils
.
getKey
(
null
,
null
,
String
.
valueOf
(
SecurityUtils
.
getUserId
()),
null
,
null
));
List
<
Gldry
>
list
=
gldryService
.
selectGldryList
(
gldry
);
List
<
Gldry
>
list
=
gldryService
.
selectGldryList
(
gldry
);
ExcelUtil
<
Gldry
>
util
=
new
ExcelUtil
<
Gldry
>(
Gldry
.
class
);
ExcelUtil
<
Gldry
>
util
=
new
ExcelUtil
<
Gldry
>(
Gldry
.
class
);
util
.
exportExcel
(
response
,
list
,
"隔离点人员数据"
);
util
.
exportExcel
(
response
,
list
,
"隔离点人员数据"
);
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/YxryController.java
View file @
c5555ce3
...
@@ -121,22 +121,22 @@ public class YxryController extends BaseController
...
@@ -121,22 +121,22 @@ public class YxryController extends BaseController
Class
<?
extends
Yxry
>
clazz
=
new
Yxry
().
getClass
();
Class
<?
extends
Yxry
>
clazz
=
new
Yxry
().
getClass
();
// List<SysDictData> isYzs = DictUtils.getDictCache("yz_status");
// List<SysDictData> isYzs = DictUtils.getDictCache("yz_status");
List
<
SysDictData
>
isYins
=
DictUtils
.
getDictCache
(
"yin_status"
);
List
<
SysDictData
>
isYins
=
DictUtils
.
getDictCache
(
"yin_status"
);
List
<
SysDictData
>
areas
=
DictUtils
.
getDictCache
(
"residential_area"
);
//
List<SysDictData> areas = DictUtils.getDictCache("residential_area");
List
<
SysDictData
>
streets
=
DictUtils
.
getDictCache
(
"street_town"
);
//
List<SysDictData> streets = DictUtils.getDictCache("street_town");
// List<SysDictData> isControls = DictUtils.getDictCache("control_status");
// List<SysDictData> isControls = DictUtils.getDictCache("control_status");
List
<
SysDictData
>
isHomes
=
DictUtils
.
getDictCache
(
"home_status"
);
List
<
SysDictData
>
isHomes
=
DictUtils
.
getDictCache
(
"home_status"
);
// List<SysDictData> glPlaces = DictUtils.getDictCache("isolation_status");
// List<SysDictData> glPlaces = DictUtils.getDictCache("isolation_status");
// String[] isYz=isYzs.stream().map(SysDictData::getDictLabel).toArray(String[]::new);
// String[] isYz=isYzs.stream().map(SysDictData::getDictLabel).toArray(String[]::new);
String
[]
isYin
=
isYins
.
stream
().
map
(
SysDictData:
:
getDictLabel
).
toArray
(
String
[]::
new
);
String
[]
isYin
=
isYins
.
stream
().
map
(
SysDictData:
:
getDictLabel
).
toArray
(
String
[]::
new
);
String
[]
area
=
areas
.
stream
().
map
(
SysDictData:
:
getDictLabel
).
toArray
(
String
[]::
new
);
//
String[] area=areas.stream().map(SysDictData::getDictLabel).toArray(String[]::new);
String
[]
street
=
streets
.
stream
().
map
(
SysDictData:
:
getDictLabel
).
toArray
(
String
[]::
new
);
//
String[] street=streets.stream().map(SysDictData::getDictLabel).toArray(String[]::new);
// String[] isControl=isControls.stream().map(SysDictData::getDictLabel).toArray(String[]::new);
// String[] isControl=isControls.stream().map(SysDictData::getDictLabel).toArray(String[]::new);
String
[]
isHome
=
isHomes
.
stream
().
map
(
SysDictData:
:
getDictLabel
).
toArray
(
String
[]::
new
);
String
[]
isHome
=
isHomes
.
stream
().
map
(
SysDictData:
:
getDictLabel
).
toArray
(
String
[]::
new
);
// String[] glPlace=glPlaces.stream().map(SysDictData::getDictLabel).toArray(String[]::new);
// String[] glPlace=glPlaces.stream().map(SysDictData::getDictLabel).toArray(String[]::new);
// ExcelUtil.setClassExcelAttribute( clazz,"isYz","combo",isYz);
// ExcelUtil.setClassExcelAttribute( clazz,"isYz","combo",isYz);
ExcelUtil
.
setClassExcelAttribute
(
clazz
,
"isYin"
,
"combo"
,
isYin
);
ExcelUtil
.
setClassExcelAttribute
(
clazz
,
"isYin"
,
"combo"
,
isYin
);
ExcelUtil
.
setClassExcelAttribute
(
clazz
,
"area"
,
"combo"
,
area
);
//
ExcelUtil.setClassExcelAttribute( clazz,"area","combo",area);
ExcelUtil
.
setClassExcelAttribute
(
clazz
,
"street"
,
"combo"
,
street
);
//
ExcelUtil.setClassExcelAttribute( clazz,"street","combo",street);
// ExcelUtil.setClassExcelAttribute( clazz,"isControl","combo",isControl);
// ExcelUtil.setClassExcelAttribute( clazz,"isControl","combo",isControl);
ExcelUtil
.
setClassExcelAttribute
(
clazz
,
"isHome"
,
"combo"
,
isHome
);
ExcelUtil
.
setClassExcelAttribute
(
clazz
,
"isHome"
,
"combo"
,
isHome
);
// ExcelUtil.setClassExcelAttribute( clazz,"glPlace","combo",glPlace);
// ExcelUtil.setClassExcelAttribute( clazz,"glPlace","combo",glPlace);
...
...
ruoyi-common/src/main/java/com/ruoyi/common/utils/CheckUtils.java
View file @
c5555ce3
...
@@ -31,7 +31,11 @@ public class CheckUtils
...
@@ -31,7 +31,11 @@ public class CheckUtils
{
{
if
(
StringUtils
.
isEmpty
(
phone
))
if
(
StringUtils
.
isEmpty
(
phone
))
return
false
;
return
false
;
String
regex
=
"
/^1\\d{10}$|^(0\\d{2,3}-?|\\(0\\d{2,3}\\))?[1-9]\\d{4,7}(-\\d{1,8})?$/
"
;
String
regex
=
"
^1\\d{10}$|^(0\\d{2,3}-?|\\(0\\d{2,3}\\))?[1-9]\\d{4,7}(-\\d{1,8})?$
"
;
return
Pattern
.
matches
(
regex
,
phone
);
return
Pattern
.
matches
(
regex
,
phone
);
}
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
checkPhone
(
"15922013137"
));
}
}
}
ruoyi-common/src/main/java/com/ruoyi/common/utils/DataUtils.java
View file @
c5555ce3
...
@@ -16,7 +16,7 @@ public class DataUtils {
...
@@ -16,7 +16,7 @@ public class DataUtils {
public
static
String
dateMap
=
"{\"area\":{ \"1\":\"123\",\"2\":\"124\",\"3\":\"124\",\"4\":\"124\",\"5\":\"124\",\"6\":\"124\",\"7\":\"124\",\"8\":\"124\",\"9\":\"124\",\"10\":\"124\",\"11\":\"124\",\"12\":\"124\",\"13\":\"124\",\"14\":\"124\",\"15\":\"124\",\"16\":\"124\",\"17\":\"124\",\"18\":\"124\",\"19\":\"124\",\"20\":\"124\",\"21\":\"124\",\"22\":\"124\",\"23\":\"124\",\"24\":\"124\"},"
+
public
static
String
dateMap
=
"{\"area\":{ \"1\":\"123\",\"2\":\"124\",\"3\":\"124\",\"4\":\"124\",\"5\":\"124\",\"6\":\"124\",\"7\":\"124\",\"8\":\"124\",\"9\":\"124\",\"10\":\"124\",\"11\":\"124\",\"12\":\"124\",\"13\":\"124\",\"14\":\"124\",\"15\":\"124\",\"16\":\"124\",\"17\":\"124\",\"18\":\"124\",\"19\":\"124\",\"20\":\"124\",\"21\":\"124\",\"22\":\"124\",\"23\":\"124\",\"24\":\"124\"},"
+
"\"street\":{\"1\":\"101\",\"2\":\"103\", \"3\":\"102\", \"4\":\"104\",\"5\":\"105\", \"6\":\"106\", \"7\":\"121\", \"8\":\"120\", \"9\":\"117\", \"10\":\"119\", \"11\":\"118\"},"
+
"\"street\":{\"1\":\"101\",\"2\":\"103\", \"3\":\"102\", \"4\":\"104\",\"5\":\"105\", \"6\":\"106\", \"7\":\"121\", \"8\":\"120\", \"9\":\"117\", \"10\":\"119\", \"11\":\"118\"},"
+
"\"community\":{\"1\":\"125\",\"2\":\"126\", \"3\":\"127\",\"4\":\"128\", \"5\":\"129\", \"6\":\"130\", \"7\":\"131\", \"17\":\"132\", \"18\":\"133\", \"19\":\"134\", \"20\":\"135\", \"21\":\"136\", \"22\":\"137\", \"23\":\"138\", \"24\":\"139\", \"34\":\"140\", \"35\":\"141\", \"36\":\"142\", \"37\":\"143\", \"38\":\"144\", \"39\":\"145\", \"40\":\"146\", \"41\":\"147\", \"42\":\"148\", \"43\":\"149\",\"44\":\"150\",\"45\":\"151\",\"46\":\"152\",\"47\":\"153\",\"48\":\"154\",\"49\":\"155\",\"50\":\"156\", \"60\":\"157\", \"61\":\"158\", \"62\":\"159\", \"63\":\"160\", \"64\":\"161\", \"65\":\"162\", \"66\":\"163\", \"67\":\"164\", \"68\":\"181\", \"69\":\"165\", \"70\":\"166\", \"71\":\"167\", \"72\":\"168\", \"73\":\"169\", \"74\":\"170\", \"75\":\"171\", \"76\":\"172\"},"
+
"\"community\":{\"1\":\"125\",\"2\":\"126\", \"3\":\"127\",\"4\":\"128\", \"5\":\"129\", \"6\":\"130\", \"7\":\"131\", \"17\":\"132\", \"18\":\"133\", \"19\":\"134\", \"20\":\"135\", \"21\":\"136\", \"22\":\"137\", \"23\":\"138\", \"24\":\"139\", \"34\":\"140\", \"35\":\"141\", \"36\":\"142\", \"37\":\"143\", \"38\":\"144\", \"39\":\"145\", \"40\":\"146\", \"41\":\"147\", \"42\":\"148\", \"43\":\"149\",\"44\":\"150\",\"45\":\"151\",\"46\":\"152\",\"47\":\"153\",\"48\":\"154\",\"49\":\"155\",\"50\":\"156\", \"60\":\"157\", \"61\":\"158\", \"62\":\"159\", \"63\":\"160\", \"64\":\"161\", \"65\":\"162\", \"66\":\"163\", \"67\":\"164\", \"68\":\"181\", \"69\":\"165\", \"70\":\"166\", \"71\":\"167\", \"72\":\"168\", \"73\":\"169\", \"74\":\"170\", \"75\":\"171\", \"76\":\"172\"},"
+
"\"shelters\":{\"1\":\"107\",\"2\":\"108\", \"3\":\"109\", \"4\":\"110\",\"5\":\"111\", \"6\":\"112\", \"7\":\"113\", \"8\":\"114\", \"9\":\"115\", \"10\":\"116\"},"
+
"\"shelters\":{\"1\":\"107\",\"2\":\"108\", \"3\":\"109\", \"4\":\"110\",\"5\":\"111\", \"6\":\"112\", \"7\":\"113\", \"8\":\"114\", \"9\":\"115\", \"10\":\"116\"
, \"11\":\"182\"
},"
+
"\"isolation\":{\"1\":\"173\",\"2\":\"174\", \"3\":\"175\", \"4\":\"176\",\"5\":\"177\", \"6\":\"178\", \"7\":\"179\", \"8\":\"180\"}}"
;
"\"isolation\":{\"1\":\"173\",\"2\":\"174\", \"3\":\"175\", \"4\":\"176\",\"5\":\"177\", \"6\":\"178\", \"7\":\"179\", \"8\":\"180\"}}"
;
public
static
String
getValue
(
String
area
,
String
street
,
String
community
)
{
public
static
String
getValue
(
String
area
,
String
street
,
String
community
)
{
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/Yxry.java
View file @
c5555ce3
...
@@ -20,6 +20,9 @@ public class Yxry extends BaseEntity
...
@@ -20,6 +20,9 @@ public class Yxry extends BaseEntity
/** 主键 */
/** 主键 */
private
Long
id
;
private
Long
id
;
/** 姓名 */
@Excel
(
name
=
"姓名"
)
private
String
userName
;
/** 日期 */
/** 日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"阳性时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"阳性时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
...
@@ -29,52 +32,28 @@ public class Yxry extends BaseEntity
...
@@ -29,52 +32,28 @@ public class Yxry extends BaseEntity
// @Excel(name = "流调人员姓名")
// @Excel(name = "流调人员姓名")
private
String
ldry
;
private
String
ldry
;
/** 姓名 */
@Excel
(
name
=
"患者姓名"
)
private
String
userName
;
/** 身份证号码 */
@Excel
(
name
=
"身份证号码"
,
cellType
=
Excel
.
ColumnType
.
STRING
)
private
String
cardNo
;
/** 联系方式 */
@Excel
(
name
=
"联系电话"
)
private
String
phone
;
@Excel
(
name
=
"人员类别"
)
@Excel
(
name
=
"人员类别"
)
private
String
userType
;
private
String
userType
;
@Excel
(
name
=
"风险"
)
@Excel
(
name
=
"风险"
)
private
String
riskSource
;
private
String
riskSource
;
/** 是否重症 */
// @Excel(name = "是否重症", dictType = "yz_status",combo = "")
private
String
isYz
;
/** 是否转阴 */
@Excel
(
name
=
"是否转阴"
,
dictType
=
"yin_status"
,
combo
=
""
)
private
String
isYin
;
/** 居住地所在区 */
/** 居住地所在区 */
@Excel
(
name
=
"
患者居住地所在区"
,
dictType
=
"residential_area"
,
combo
=
"
"
)
@Excel
(
name
=
"
居住地所在区"
,
dictType
=
"residential_area
"
)
private
String
area
;
private
String
area
;
/** 街道/镇 */
/** 街道/镇 */
@Excel
(
name
=
"
街道/镇"
,
dictType
=
"street_town"
,
combo
=
"
"
)
@Excel
(
name
=
"
所属街道"
,
dictType
=
"street_town
"
)
private
String
street
;
private
String
street
;
// 新增字段
// 新增字段
@Excel
(
name
=
"居委会"
)
@Excel
(
name
=
"居委会"
,
dictType
=
"committee"
)
private
String
committee
;
private
String
committee
;
/** 小区/村名称 */
/** 小区/村名称 */
@Excel
(
name
=
"小区
/村名称
"
)
@Excel
(
name
=
"小区"
)
private
String
community
;
private
String
community
;
/** 住址 */
@Excel
(
name
=
"住址"
)
private
String
address
;
/** 楼号单元号门牌号 */
/** 楼号单元号门牌号 */
@Excel
(
name
=
"楼号"
)
@Excel
(
name
=
"楼号"
)
private
String
building
;
private
String
building
;
...
@@ -87,6 +66,35 @@ public class Yxry extends BaseEntity
...
@@ -87,6 +66,35 @@ public class Yxry extends BaseEntity
@Excel
(
name
=
"门牌号"
)
@Excel
(
name
=
"门牌号"
)
private
String
house
;
private
String
house
;
/** 住址 */
@Excel
(
name
=
"住址"
)
private
String
address
;
/** 身份证号码 */
@Excel
(
name
=
"身份证号"
,
cellType
=
Excel
.
ColumnType
.
STRING
)
private
String
cardNo
;
/** 联系方式 */
@Excel
(
name
=
"联系电话"
)
private
String
phone
;
/** 是否重症 */
// @Excel(name = "是否重症", dictType = "yz_status",combo = "")
private
String
isYz
;
/** 是否转阴 */
@Excel
(
name
=
"是否转阴"
,
dictType
=
"yin_status"
,
combo
=
""
)
private
String
isYin
;
/** 方舱名称 */
@Excel
(
name
=
"所在方舱"
)
private
String
fcName
;
/** 隔离点名称 */
@Excel
(
name
=
"所在隔离点"
)
private
String
glName
;
/** 是否已管控 */
/** 是否已管控 */
// @Excel(name = "是否已管控", dictType = "control_status",combo = "")
// @Excel(name = "是否已管控", dictType = "control_status",combo = "")
private
String
isControl
;
private
String
isControl
;
...
@@ -117,12 +125,6 @@ public class Yxry extends BaseEntity
...
@@ -117,12 +125,6 @@ public class Yxry extends BaseEntity
// @Excel(name = "隔离状态")
// @Excel(name = "隔离状态")
private
String
isolationStatus
;
private
String
isolationStatus
;
/** 方舱名称 */
private
String
fcName
;
/** 隔离点名称 */
private
String
glName
;
/** 状态(0正常 1停用) */
/** 状态(0正常 1停用) */
// @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
// @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private
String
status
;
private
String
status
;
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/YxryMapper.java
View file @
c5555ce3
...
@@ -64,4 +64,6 @@ public interface YxryMapper
...
@@ -64,4 +64,6 @@ public interface YxryMapper
List
<
Yxry
>
selectYxryByCard
(
String
cardNo
);
List
<
Yxry
>
selectYxryByCard
(
String
cardNo
);
int
insertBatchYxry
(
@Param
(
"list"
)
List
<
Yxry
>
list
);
int
insertBatchYxry
(
@Param
(
"list"
)
List
<
Yxry
>
list
);
int
updateBatchYxry
(
@Param
(
"list"
)
List
<
Yxry
>
list
);
}
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/YxryServiceImpl.java
View file @
c5555ce3
...
@@ -6,11 +6,9 @@ import java.util.List;
...
@@ -6,11 +6,9 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
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.*
;
import
com.ruoyi.common.utils.DataUtils
;
import
com.ruoyi.common.utils.DateUtils
;
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.Fcry
;
import
com.ruoyi.system.domain.Fcry
;
import
com.ruoyi.system.domain.Gldry
;
import
com.ruoyi.system.domain.Gldry
;
...
@@ -21,7 +19,6 @@ import io.netty.util.internal.ObjectUtil;
...
@@ -21,7 +19,6 @@ import io.netty.util.internal.ObjectUtil;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
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.annotation.DataScope
;
import
com.ruoyi.common.annotation.DataScope
;
import
com.ruoyi.system.mapper.YxryMapper
;
import
com.ruoyi.system.mapper.YxryMapper
;
import
com.ruoyi.system.domain.Yxry
;
import
com.ruoyi.system.domain.Yxry
;
...
@@ -136,14 +133,26 @@ public class YxryServiceImpl implements IYxryService {
...
@@ -136,14 +133,26 @@ public class YxryServiceImpl implements IYxryService {
}
}
List
<
Yxry
>
trueList
=
new
ArrayList
<>();
List
<
Yxry
>
trueList
=
new
ArrayList
<>();
List
<
Yxry
>
failureList
=
new
ArrayList
<>();
List
<
Yxry
>
failureList
=
new
ArrayList
<>();
List
<
Yxry
>
updateList
=
new
ArrayList
<>();
for
(
Yxry
zlqk
:
list
)
{
for
(
Yxry
zlqk
:
list
)
{
if
(
StringUtils
.
isNotEmpty
(
zlqk
.
getCardNo
())
&&
StringUtils
.
isNotEmpty
(
zlqk
.
getUserName
())
if
(
StringUtils
.
isNotEmpty
(
zlqk
.
getCardNo
())
&&
StringUtils
.
isNotEmpty
(
zlqk
.
getUserName
())
&&
StringUtils
.
isNotEmpty
(
zlqk
.
getPhone
())
&&
StringUtils
.
isNotEmpty
(
zlqk
.
getPhone
())
&&
StringUtils
.
isNotEmpty
(
zlqk
.
getStreet
())
&&
StringUtils
.
isNotEmpty
(
zlqk
.
getIsYin
()))
{
&&
StringUtils
.
isNotEmpty
(
zlqk
.
getArea
())
&&
StringUtils
.
isNotEmpty
(
zlqk
.
getCommittee
()))
{
if
(
StringUtils
.
isNotEmpty
(
zlqk
.
getCommunity
())){
//如果小区不为空,去数据字典匹配value
List
<
SysDictData
>
community
=
DictUtils
.
getDictCache
(
"community"
);
List
<
String
>
values
=
community
.
stream
().
filter
(
l
->
zlqk
.
getCommunity
().
equals
(
l
.
getDictLabel
()))
.
map
(
SysDictData:
:
getDictValue
).
collect
(
Collectors
.
toList
());
if
(!
values
.
isEmpty
())
zlqk
.
setCommunity
(
values
.
get
(
0
));
else
{
failureList
.
add
(
zlqk
);
continue
;
}
}
//校验身份证是否重复
//校验身份证是否重复
List
<
Yxry
>
zlqks
=
yxryMapper
.
selectYxryByCard
(
zlqk
.
getCardNo
());
List
<
Yxry
>
zlqks
=
yxryMapper
.
selectYxryByCard
(
zlqk
.
getCardNo
());
if
(!
zlqks
.
isEmpty
())
if
(!
zlqks
.
isEmpty
())
failur
eList
.
add
(
zlqk
);
updat
eList
.
add
(
zlqk
);
else
{
else
{
zlqks
=
list
.
stream
().
filter
(
l
->
zlqk
.
getCardNo
().
equals
(
l
.
getCardNo
())).
collect
(
Collectors
.
toList
());
zlqks
=
list
.
stream
().
filter
(
l
->
zlqk
.
getCardNo
().
equals
(
l
.
getCardNo
())).
collect
(
Collectors
.
toList
());
if
(
zlqks
.
size
()
>
1
)
if
(
zlqks
.
size
()
>
1
)
...
@@ -152,17 +161,19 @@ public class YxryServiceImpl implements IYxryService {
...
@@ -152,17 +161,19 @@ public class YxryServiceImpl implements IYxryService {
if
(!
CheckUtils
.
checkPhone
(
zlqk
.
getPhone
()))
{
if
(!
CheckUtils
.
checkPhone
(
zlqk
.
getPhone
()))
{
failureList
.
add
(
zlqk
);
failureList
.
add
(
zlqk
);
}
else
{
}
else
{
if
(
CheckUtils
.
checkCard
(
zlqk
.
getCardNo
()))
if
(
CheckUtils
.
checkCard
(
zlqk
.
getCardNo
()))
{
zlqk
.
setCheckCard
(
"正确"
);
zlqk
.
setCheckCard
(
"正确"
);
else
trueList
.
add
(
zlqk
);
}
else
{
zlqk
.
setCheckCard
(
"不正确"
);
zlqk
.
setCheckCard
(
"不正确"
);
trueList
.
add
(
zlqk
);
failureList
.
add
(
zlqk
);
}
}
}
}
}
}
}
}
else
if
(
StringUtils
.
isEmpty
(
zlqk
.
getCardNo
())
&&
StringUtils
.
isEmpty
(
zlqk
.
getUserName
())
}
else
if
(
StringUtils
.
isEmpty
(
zlqk
.
getCardNo
())
&&
StringUtils
.
isEmpty
(
zlqk
.
getUserName
())
&&
StringUtils
.
isEmpty
(
zlqk
.
getPhone
())
&&
StringUtils
.
isEmpty
(
zlqk
.
getPhone
())
&&
StringUtils
.
isEmpty
(
zlqk
.
getStreet
())
&&
StringUtils
.
isEmpty
(
zlqk
.
get
IsYin
()))
{
&&
StringUtils
.
isEmpty
(
zlqk
.
get
Area
())
&&
StringUtils
.
isEmpty
(
zlqk
.
getCommittee
()))
{
continue
;
continue
;
}
else
{
}
else
{
failureList
.
add
(
zlqk
);
failureList
.
add
(
zlqk
);
...
@@ -170,11 +181,18 @@ public class YxryServiceImpl implements IYxryService {
...
@@ -170,11 +181,18 @@ public class YxryServiceImpl implements IYxryService {
}
}
if
(!
trueList
.
isEmpty
())
{
if
(!
trueList
.
isEmpty
())
{
for
(
Yxry
zlqk
:
trueList
)
{
for
(
Yxry
zlqk
:
trueList
)
{
zlqk
.
setCreateBy
(
String
.
valueOf
(
SecurityUtils
.
getUserId
()));
zlqk
.
setCreateBy
(
DataUtils
.
getValue
(
zlqk
.
getArea
(),
zlqk
.
getStreet
(),
zlqk
.
getCommittee
()));
zlqk
.
setCreateTime
(
DateUtils
.
getNowDate
());
zlqk
.
setCreateTime
(
DateUtils
.
getNowDate
());
}
}
yxryMapper
.
insertBatchYxry
(
trueList
);
yxryMapper
.
insertBatchYxry
(
trueList
);
}
}
if
(!
updateList
.
isEmpty
())
{
for
(
Yxry
zlqk
:
updateList
)
{
zlqk
.
setCreateBy
(
DataUtils
.
getValue
(
zlqk
.
getArea
(),
zlqk
.
getStreet
(),
zlqk
.
getCommittee
()));
zlqk
.
setUpdateTime
(
DateUtils
.
getNowDate
());
}
yxryMapper
.
updateBatchYxry
(
updateList
);
}
if
(!
failureList
.
isEmpty
())
{
if
(!
failureList
.
isEmpty
())
{
ExcelUtil
<
Yxry
>
util
=
new
ExcelUtil
<
Yxry
>(
Yxry
.
class
);
ExcelUtil
<
Yxry
>
util
=
new
ExcelUtil
<
Yxry
>(
Yxry
.
class
);
util
.
exportExcel
(
response
,
failureList
,
"阳性人员数据"
);
util
.
exportExcel
(
response
,
failureList
,
"阳性人员数据"
);
...
...
ruoyi-system/src/main/resources/mapper/system/YxryMapper.xml
View file @
c5555ce3
...
@@ -223,6 +223,46 @@
...
@@ -223,6 +223,46 @@
</foreach>
</foreach>
</insert>
</insert>
<insert
id=
"updateBatchYxry"
parameterType=
"com.ruoyi.system.domain.Yxry"
>
<foreach
item=
"item"
index=
"index"
collection=
"list"
separator=
","
>
update yxry
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"item.sbDate != null"
>
sb_date = #{item.sbDate},
</if>
<if
test=
"item.cyTime != null "
>
cy_time = #{item.cyTime},
</if>
<if
test=
"item.ldry != null"
>
ldry = #{item.ldry},
</if>
<if
test=
"item.userName != null"
>
user_name = #{item.userName},
</if>
<if
test=
"item.cardNo != null"
>
card_no = #{item.cardNo},
</if>
<if
test=
"item.phone != null"
>
phone = #{item.phone},
</if>
<if
test=
"item.area != null"
>
area = #{item.area},
</if>
<if
test=
"item.street != null"
>
street = #{item.street},
</if>
<if
test=
"item.isolationStatus != null"
>
isolation_status = #{item.isolationStatus},
</if>
<if
test=
"item.isControl != null"
>
is_control = #{item.isControl},
</if>
<if
test=
"item.community != null"
>
community = #{item.community},
</if>
<if
test=
"item.committee != null"
>
committee = #{item.committee},
</if>
<if
test=
"item.unit != null"
>
unit = #{item.unit},
</if>
<if
test=
"item.building != null"
>
building = #{item.building},
</if>
<if
test=
"item.house != null"
>
house = #{item.house},
</if>
<if
test=
"item.hasAcid != null"
>
has_acid = #{item.hasAcid},
</if>
<if
test=
"item.glPlace != null"
>
gl_place = #{item.glPlace},
</if>
<if
test=
"item.createBy != null"
>
create_by = #{item.createBy},
</if>
<if
test=
"item.updateBy != null"
>
update_by = #{item.updateBy},
</if>
<if
test=
"item.updateTime != null"
>
update_time = #{item.updateTime},
</if>
<if
test=
"item.remark != null"
>
remark = #{item.remark},
</if>
<if
test=
"item.isYz != null"
>
is_yz = #{item.isYz},
</if>
<if
test=
"item.isYin != null"
>
is_yin = #{item.isYin},
</if>
<if
test=
"item.isHome != null"
>
is_home = #{item.isHome},
</if>
<if
test=
"item.riskSource != null"
>
risk_source = #{item.riskSource},
</if>
<if
test=
"item.userType != null"
>
user_type = #{item.userType},
</if>
<if
test=
"item.zyTime != null"
>
zy_time = #{item.zyTime},
</if>
<if
test=
"item.checkCard != null"
>
check_card = #{item.checkCard},
</if>
<if
test=
"item.glName != null"
>
gl_name = #{item.glName},
</if>
<if
test=
"item.fcName != null"
>
fc_name = #{item.fcName},
</if>
<if
test=
"item.address != null"
>
address = #{item.address},
</if>
</trim>
where card_no = #{item.cardNo}
</foreach>
</insert>
<update
id=
"updateYxry"
parameterType=
"Yxry"
>
<update
id=
"updateYxry"
parameterType=
"Yxry"
>
update yxry
update yxry
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
...
...
ruoyi-ui/src/views/system/hscj/index.vue
View file @
c5555ce3
...
@@ -356,6 +356,42 @@
...
@@ -356,6 +356,42 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"采集地点"
prop=
"cjPlace"
>
<el-input
v-model=
"form.cjPlace"
placeholder=
"请输入采集地点"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"箱号"
prop=
"boxhao"
>
<el-input
v-model=
"form.boxhao"
placeholder=
"请输入箱号"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"采集管号"
prop=
"cjgh"
>
<el-input
v-model=
"form.cjgh"
placeholder=
"请输入采集管号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"姓名"
prop=
"userName"
>
<el-input
v-model=
"form.userName"
placeholder=
"请输入姓名"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"身份证号码"
prop=
"cardNo"
>
<el-input
v-model=
"form.cardNo"
placeholder=
"请输入身份证号码"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系方式"
prop=
"phone"
>
<el-input
v-model=
"form.phone"
placeholder=
"请输入联系方式"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"居住地所在区"
prop=
"area"
>
<el-form-item
label=
"居住地所在区"
prop=
"area"
>
...
@@ -410,41 +446,10 @@
...
@@ -410,41 +446,10 @@
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"采集地点"
prop=
"cjPlace"
>
<el-form-item
label=
"住址"
prop=
"address"
>
<el-input
v-model=
"form.cjPlace"
placeholder=
"请输入采集地点"
/>
<el-input
v-model=
"form.address"
placeholder=
"请输入住址"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"箱号"
prop=
"boxhao"
>
<el-input
v-model=
"form.boxhao"
placeholder=
"请输入箱号"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"采集管号"
prop=
"cjgh"
>
<el-input
v-model=
"form.cjgh"
placeholder=
"请输入采集管号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"姓名"
prop=
"userName"
>
<el-input
v-model=
"form.userName"
placeholder=
"请输入姓名"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"身份证号码"
prop=
"cardNo"
>
<el-input
v-model=
"form.cardNo"
placeholder=
"请输入身份证号码"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系方式"
prop=
"phone"
>
<el-input
v-model=
"form.phone"
placeholder=
"请输入联系方式"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"性别"
prop=
"sex"
>
<el-form-item
label=
"性别"
prop=
"sex"
>
<el-select
style=
"width: 100%"
v-model=
"form.sex"
placeholder=
"请选择性别"
>
<el-select
style=
"width: 100%"
v-model=
"form.sex"
placeholder=
"请选择性别"
>
...
@@ -457,11 +462,6 @@
...
@@ -457,11 +462,6 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"住址"
prop=
"address"
>
<el-input
v-model=
"form.address"
placeholder=
"请输入住址"
/>
</el-form-item>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -543,7 +543,13 @@
...
@@ -543,7 +543,13 @@
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
placeholder=
"请输入备注"
/>
<el-input
type=
"textarea"
:rows=
"3"
maxlength=
"200"
show-word-limit
v-model=
"form.remark"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
...
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