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
d315935c
Commit
d315935c
authored
Dec 03, 2022
by
gaoyingwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 定时
parent
d32ef2fd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
20 deletions
+38
-20
JcglTask.java
...-quartz/src/main/java/com/ruoyi/quartz/task/JcglTask.java
+23
-12
YxryMapper.java
...tem/src/main/java/com/ruoyi/system/mapper/YxryMapper.java
+2
-0
FcryMapper.xml
ruoyi-system/src/main/resources/mapper/system/FcryMapper.xml
+4
-4
GldryMapper.xml
...i-system/src/main/resources/mapper/system/GldryMapper.xml
+3
-3
YxryMapper.xml
ruoyi-system/src/main/resources/mapper/system/YxryMapper.xml
+6
-1
No files found.
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/JcglTask.java
View file @
d315935c
...
...
@@ -13,6 +13,7 @@ import org.springframework.stereotype.Component;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 定时任务调度
...
...
@@ -35,11 +36,12 @@ public class JcglTask
{
System
.
out
.
println
(
"定时执行同步隔离人员"
);
List
<
Jcglry
>
list
=
jcglryMapper
.
selectAllJcglry
();
List
<
Yxry
>
yxries
=
yxryMapper
.
selectAll
();
List
<
Jcglry
>
jcglries
=
new
ArrayList
<>();
List
<
Yxry
>
yxrys
=
new
ArrayList
<>();
for
(
Jcglry
jcglry
:
list
)
{
List
<
Yxry
>
yxrie
s
=
yxryMapper
.
selectYxryByCard
(
jcglry
.
getCardNo
());
if
(!
yxrie
s
.
isEmpty
()){
List
<
Yxry
>
yxrie
List
=
yxries
.
stream
().
filter
(
l
->
l
.
getCardNo
().
equals
(
jcglry
.
getCardNo
())).
collect
(
Collectors
.
toList
());
if
(!
yxrie
List
.
isEmpty
()){
jcglry
.
setStreet
(
yxries
.
get
(
0
).
getStreet
());
jcglry
.
setCommittee
(
yxries
.
get
(
0
).
getCommittee
());
jcglry
.
setCommunity
(
yxries
.
get
(
0
).
getCommunity
());
...
...
@@ -50,7 +52,7 @@ public class JcglTask
jcglry
.
setIsArea
(
"0"
);
}
jcglries
.
add
(
jcglry
);
yxrys
.
addAll
(
yxries
);
//
yxrys.addAll(yxries);
}
}
//更新解除隔离人员地址
...
...
@@ -58,18 +60,26 @@ public class JcglTask
jcglryMapper
.
updateBatch
(
jcglries
);
}
//更新阳性是否解除隔离
if
(!
yxrys
.
isEmpty
()){
for
(
Yxry
yxry
:
yxries
)
{
List
<
Jcglry
>
jcglryList
=
list
.
stream
().
filter
(
l
->
l
.
getCardNo
().
equals
(
yxry
.
getCardNo
())).
collect
(
Collectors
.
toList
());
if
(!
jcglryList
.
isEmpty
())
yxry
.
setIsDeisolation
(
"1"
);
else
yxry
.
setIsDeisolation
(
"0"
);
}
if
(!
yxries
.
isEmpty
()){
yxryMapper
.
updateBatch
(
yxrys
);
}
//更新方舱人员会否阳性
List
<
Fcry
>
fcries
=
new
ArrayList
<>();
List
<
Fcry
>
fcryList
=
fcryMapper
.
selectAll
();
for
(
Fcry
fcry
:
fcryList
)
{
List
<
Yxry
>
yxrie
s
=
yxryMapper
.
selectYxryByCard
(
fcry
.
getCardNo
());
if
(!
yxrie
s
.
isEmpty
()){
List
<
Yxry
>
yxrie
List
=
yxries
.
stream
().
filter
(
l
->
l
.
getCardNo
().
equals
(
fcry
.
getCardNo
())).
collect
(
Collectors
.
toList
());
if
(!
yxrie
List
.
isEmpty
())
fcry
.
setIsPositive
(
"1"
);
fcries
.
add
(
fcry
);
}
else
fcry
.
setIsPositive
(
"0"
);
fcries
.
add
(
fcry
);
}
if
(!
fcries
.
isEmpty
()){
fcryMapper
.
updateBatch
(
fcries
);
...
...
@@ -78,11 +88,12 @@ public class JcglTask
List
<
Gldry
>
gldries
=
new
ArrayList
<>();
List
<
Gldry
>
gldryList
=
gldryMapper
.
selectAll
();
for
(
Gldry
gldry
:
gldryList
)
{
List
<
Yxry
>
yxrie
s
=
yxryMapper
.
selectYxryByCard
(
gldry
.
getCardNo
());
if
(!
yxrie
s
.
isEmpty
()){
List
<
Yxry
>
yxrie
List
=
yxries
.
stream
().
filter
(
l
->
l
.
getCardNo
().
equals
(
gldry
.
getCardNo
())).
collect
(
Collectors
.
toList
());
if
(!
yxrie
List
.
isEmpty
())
gldry
.
setIsYx
(
"1"
);
gldries
.
add
(
gldry
);
}
else
gldry
.
setIsYx
(
"0"
);
gldries
.
add
(
gldry
);
}
if
(!
gldries
.
isEmpty
()){
gldryMapper
.
updateBatch
(
gldries
);
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/YxryMapper.java
View file @
d315935c
...
...
@@ -72,4 +72,6 @@ public interface YxryMapper
int
selectNum
(
Yxry
userType
);
int
updateBatch
(
@Param
(
"list"
)
List
<
Yxry
>
list
);
List
<
Yxry
>
selectAll
();
}
ruoyi-system/src/main/resources/mapper/system/FcryMapper.xml
View file @
d315935c
...
...
@@ -199,7 +199,7 @@
<if
test=
"floor != null"
>
floor,
</if>
<if
test=
"committee != null"
>
committee,
</if>
<if
test=
"positiveOnly != null"
>
positive_only,
</if>
<if
test=
"isPositive != null"
>
is_positive,
</if>
is_positive,
<if
test=
"checkCard != null"
>
check_card,
</if>
<if
test=
"peopleType != null"
>
people_type,
</if>
<if
test=
"otherFcTime != null"
>
other_fc_time,
</if>
...
...
@@ -229,7 +229,7 @@
<if
test=
"floor != null"
>
#{floor},
</if>
<if
test=
"committee != null"
>
#{committee},
</if>
<if
test=
"positiveOnly != null"
>
#{positiveOnly},
</if>
<if
test=
"isPositive != null"
>
#{isPositive},
</if>
null,
<if
test=
"checkCard != null"
>
#{checkCard},
</if>
<if
test=
"peopleType != null"
>
#{peopleType},
</if>
<if
test=
"otherFcTime != null"
>
#{otherFcTime},
</if>
...
...
@@ -243,7 +243,7 @@
<foreach
item=
"item"
index=
"index"
collection=
"list"
separator=
","
>
(#{item.fcPlace},#{item.room},#{item.jzName},#{item.cardNo},#{item.phone},#{item.area},#{item.street},#{item.community},#{item.floor},#{item.committee},
#{item.unit},#{item.doorplate},#{item.zrTime},#{item.zcTime},#{item.glPlace},#{item.createBy},
#{item.createTime},#{item.remark},#{item.checkCard},
#{item.isPositive}
,#{item.positiveOnly},#{item.peopleType},#{item.otherFcTime},#{item.otherGldTime})
#{item.createTime},#{item.remark},#{item.checkCard},
null
,#{item.positiveOnly},#{item.peopleType},#{item.otherFcTime},#{item.otherGldTime})
</foreach>
</insert>
...
...
@@ -284,7 +284,7 @@
<update
id=
"updateBatch"
parameterType=
"com.ruoyi.system.domain.Fcry"
>
<foreach
item=
"item"
index=
"index"
collection=
"list"
separator=
";"
>
update fcry set is_positive =
'1'
update fcry set is_positive =
#{item.isPositive}
where id = #{item.id}
</foreach>
</update>
...
...
ruoyi-system/src/main/resources/mapper/system/GldryMapper.xml
View file @
d315935c
...
...
@@ -115,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"jzName != null"
>
jz_name,
</if>
<if
test=
"cardNo != null"
>
card_no,
</if>
<if
test=
"phone != null"
>
phone,
</if>
<if
test=
"isYx != null"
>
is_yx,
</if>
is_yx,
<if
test=
"area != null"
>
area,
</if>
<if
test=
"street != null"
>
street,
</if>
<if
test=
"community != null"
>
community,
</if>
...
...
@@ -142,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"jzName != null"
>
#{jzName},
</if>
<if
test=
"cardNo != null"
>
#{cardNo},
</if>
<if
test=
"phone != null"
>
#{phone},
</if>
<if
test=
"isYx != null"
>
#{isYx},
</if>
null,
<if
test=
"area != null"
>
#{area},
</if>
<if
test=
"street != null"
>
#{street},
</if>
<if
test=
"community != null"
>
#{community},
</if>
...
...
@@ -200,7 +200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update
id=
"updateBatch"
parameterType=
"com.ruoyi.system.domain.Gldry"
>
<foreach
item=
"item"
index=
"index"
collection=
"list"
separator=
";"
>
update gldry set is_yx =
'1'
update gldry set is_yx =
#{item.isYx}
where id = #{item.id}
</foreach>
</update>
...
...
ruoyi-system/src/main/resources/mapper/system/YxryMapper.xml
View file @
d315935c
...
...
@@ -356,8 +356,13 @@
<update
id=
"updateBatch"
parameterType=
"com.ruoyi.system.domain.Yxry"
>
<foreach
item=
"item"
index=
"index"
collection=
"list"
separator=
";"
>
update yxry set is_deisolation =
'1'
update yxry set is_deisolation =
#{item.isDeisolation}
where id = #{item.id}
</foreach>
</update>
<select
id=
"selectAll"
resultMap=
"YxryResult"
>
<include
refid=
"selectYxryVo"
/>
where del_flag = '0'
</select>
</mapper>
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