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
19c12c11
Commit
19c12c11
authored
Dec 01, 2022
by
gaoyingwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 解除隔离人员模块
parent
42f2ff22
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
16 deletions
+103
-16
JcglryController.java
...ava/com/ruoyi/web/controller/system/JcglryController.java
+46
-1
DataUtils.java
...ommon/src/main/java/com/ruoyi/common/utils/DataUtils.java
+1
-1
Jcglry.java
...-system/src/main/java/com/ruoyi/system/domain/Jcglry.java
+52
-13
JcglryMapper.xml
...-system/src/main/resources/mapper/system/JcglryMapper.xml
+4
-1
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/JcglryController.java
View file @
19c12c11
package
com
.
ruoyi
.
web
.
controller
.
system
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletResponse
;
import
com.ruoyi.common.core.domain.entity.SysDictData
;
import
com.ruoyi.common.utils.DataUtils
;
import
com.ruoyi.common.utils.DictUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.system.domain.Gldry
;
import
com.ruoyi.system.mapper.SysUserMapper
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -33,7 +42,8 @@ public class JcglryController extends BaseController
{
@Autowired
private
IJcglryService
jcglryService
;
@Autowired
private
SysUserMapper
sysUserMapper
;
/**
* 查询解除隔离人员列表
*/
...
...
@@ -41,6 +51,12 @@ public class JcglryController extends BaseController
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
Jcglry
jcglry
)
{
String
userType
=
sysUserMapper
.
selectUserTypeById
(
SecurityUtils
.
getUserId
());
jcglry
.
setUserType
(
userType
);
if
(
"2"
.
equals
(
userType
))
jcglry
.
setValue
(
DataUtils
.
getKey
(
null
,
String
.
valueOf
(
SecurityUtils
.
getUserId
()),
null
,
null
,
null
));
else
if
(
"3"
.
equals
(
userType
))
jcglry
.
setValue
(
DataUtils
.
getKey
(
null
,
null
,
String
.
valueOf
(
SecurityUtils
.
getUserId
()),
null
,
null
));
startPage
();
List
<
Jcglry
>
list
=
jcglryService
.
selectJcglryList
(
jcglry
);
return
getDataTable
(
list
);
...
...
@@ -54,7 +70,36 @@ public class JcglryController extends BaseController
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
Jcglry
jcglry
)
{
String
userType
=
sysUserMapper
.
selectUserTypeById
(
SecurityUtils
.
getUserId
());
jcglry
.
setUserType
(
userType
);
if
(
"2"
.
equals
(
userType
))
jcglry
.
setValue
(
DataUtils
.
getKey
(
null
,
String
.
valueOf
(
SecurityUtils
.
getUserId
()),
null
,
null
,
null
));
else
if
(
"3"
.
equals
(
userType
))
jcglry
.
setValue
(
DataUtils
.
getKey
(
null
,
null
,
String
.
valueOf
(
SecurityUtils
.
getUserId
()),
null
,
null
));
List
<
Jcglry
>
list
=
jcglryService
.
selectJcglryList
(
jcglry
);
List
<
SysDictData
>
shelters
=
DictUtils
.
getDictCache
(
"shelters"
);
List
<
SysDictData
>
isolationPoint
=
DictUtils
.
getDictCache
(
"isolation_point"
);
List
<
SysDictData
>
street
=
DictUtils
.
getDictCache
(
"street_town"
);
for
(
Jcglry
yxry1
:
list
)
{
if
(
StringUtils
.
isNotEmpty
(
yxry1
.
getStreet
()))
{
List
<
String
>
labels
=
street
.
stream
().
filter
(
l
->
yxry1
.
getStreet
().
equals
(
l
.
getDictValue
()))
.
map
(
SysDictData:
:
getDictLabel
).
collect
(
Collectors
.
toList
());
if
(!
labels
.
isEmpty
())
yxry1
.
setStreet
(
labels
.
get
(
0
));
}
if
(
StringUtils
.
isNotEmpty
(
yxry1
.
getGlPlace
()))
{
List
<
String
>
labels
=
shelters
.
stream
().
filter
(
l
->
yxry1
.
getGlPlace
().
equals
(
l
.
getDictValue
()))
.
map
(
SysDictData:
:
getDictLabel
).
collect
(
Collectors
.
toList
());
if
(!
labels
.
isEmpty
())
yxry1
.
setGlPlace
(
labels
.
get
(
0
));
else
{
List
<
String
>
point
=
isolationPoint
.
stream
().
filter
(
l
->
yxry1
.
getGlPlace
().
equals
(
l
.
getDictValue
()))
.
map
(
SysDictData:
:
getDictLabel
).
collect
(
Collectors
.
toList
());
if
(!
point
.
isEmpty
())
yxry1
.
setGlPlace
(
point
.
get
(
0
));
}
}
}
ExcelUtil
<
Jcglry
>
util
=
new
ExcelUtil
<
Jcglry
>(
Jcglry
.
class
);
util
.
exportExcel
(
response
,
list
,
"解除隔离人员数据"
);
}
...
...
ruoyi-common/src/main/java/com/ruoyi/common/utils/DataUtils.java
View file @
19c12c11
...
...
@@ -17,7 +17,7 @@ public class DataUtils {
"\"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\"},"
+
"\"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\":{\"
01\":\"173\",\"02\":\"174\", \"03\":\"175\", \"04\":\"176\",\"05\":\"177\", \"06\":\"178\", \"07\":\"179\", \"0
8\":\"180\"}}"
;
public
static
String
getValue
(
String
area
,
String
street
,
String
community
)
{
JSONObject
map
=
JSON
.
parseObject
(
dateMap
);
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/Jcglry.java
View file @
19c12c11
...
...
@@ -6,6 +6,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
org.springframework.data.annotation.Transient
;
/**
* 解除隔离人员对象 jcglry
...
...
@@ -21,20 +22,20 @@ public class Jcglry extends BaseEntity
private
Long
id
;
/** 是否区内 */
@Excel
(
name
=
"
是否区内
"
)
@Excel
(
name
=
"
区域类别"
,
dictType
=
"is_area
"
)
private
String
isArea
;
/** 姓名 */
@Excel
(
name
=
"姓名"
)
@Excel
(
name
=
"
接触人员
姓名"
)
private
String
name
;
/** 隔离位置 */
@Excel
(
name
=
"
隔离位置
"
)
@Excel
(
name
=
"
解除酒店
"
)
private
String
glPlace
;
/** 隔离时间 */
@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"
)
private
Date
rzTime
;
/** 解除时间 */
...
...
@@ -47,7 +48,7 @@ public class Jcglry extends BaseEntity
private
String
rylb
;
/** 身份证号码 */
@Excel
(
name
=
"身份证号
码
"
)
@Excel
(
name
=
"身份证号"
)
private
String
cardNo
;
/** 联系方式 */
...
...
@@ -55,15 +56,15 @@ public class Jcglry extends BaseEntity
private
String
phone
;
/** 街道/镇 */
@Excel
(
name
=
"
街道/镇
"
)
@Excel
(
name
=
"
所属街道
"
)
private
String
street
;
/** 居委会 */
@Excel
(
name
=
"居委会"
)
//
@Excel(name = "居委会")
private
String
committee
;
/** 小区/村名称 */
@Excel
(
name
=
"小区/村名称"
)
//
@Excel(name = "小区/村名称")
private
String
community
;
/** 家庭住址 */
...
...
@@ -71,28 +72,40 @@ public class Jcglry extends BaseEntity
private
String
address
;
/** 转运状态 */
@Excel
(
name
=
"
转运状态
"
)
@Excel
(
name
=
"
是否已转走"
,
readConverterExp
=
"0=是,1=否
"
)
private
String
zyStatus
;
/** 是否安排司机 */
@Excel
(
name
=
"是否安排司机"
)
@Excel
(
name
=
"是否安排司机"
,
dictType
=
"arrange_drivers"
)
private
String
arrangeDrivers
;
/** 备注街道 */
@Excel
(
name
=
"备注街道"
)
//
@Excel(name = "备注街道")
private
String
bzStreet
;
/** 备注住址 */
@Excel
(
name
=
"备注住址"
)
//
@Excel(name = "备注住址")
private
String
bzAddress
;
/** 状态(0正常 1停用) */
@Excel
(
name
=
"状态"
,
readConverterExp
=
"0=正常,1=停用"
)
//
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private
String
status
;
/** 删除标志(0代表存在 1代表删除) */
private
String
delFlag
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remark
;
//当前登录人类别
@Transient
private
String
userType
;
//当前登录人所属value
@Transient
private
String
value
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
...
...
@@ -294,4 +307,30 @@ public class Jcglry extends BaseEntity
.
append
(
"remark"
,
getRemark
())
.
toString
();
}
@Override
public
String
getRemark
()
{
return
remark
;
}
@Override
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getUserType
()
{
return
userType
;
}
public
void
setUserType
(
String
userType
)
{
this
.
userType
=
userType
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
}
ruoyi-system/src/main/resources/mapper/system/JcglryMapper.xml
View file @
19c12c11
...
...
@@ -57,7 +57,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"bzStreet != null and bzStreet != ''"
>
and a.bz_street like concat('%', #{bzStreet}, '%')
</if>
<if
test=
"bzAddress != null and bzAddress != ''"
>
and a.bz_address like concat('%', #{bzAddress}, '%')
</if>
<if
test=
"status != null and status != ''"
>
and a.status = #{status}
</if>
${params.dataScope}
<if
test=
"userType != null and userType == '00'.toString()"
>
${params.dataScope}
</if>
<if
test=
"userType != null and userType == '2'.toString()"
>
and a.street = #{value}
</if>
<if
test=
"userType != null and userType == '3'.toString()"
>
and a.committee = #{value}
</if>
order by a.create_time desc
</select>
<select
id=
"selectJcglryById"
parameterType=
"Long"
resultMap=
"JcglryResult"
>
...
...
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