Commit a61d88c1 authored by gaoyingwei's avatar gaoyingwei

修改 定时

parent 2b71587e
......@@ -211,8 +211,8 @@ public class FcryController extends BaseController
.map(SysDictData::getDictLabel).collect(Collectors.toList());
String[] fc = labels.toArray(new String[]{});
ExcelUtil.setClassExcelAttribute(clazz,"fcPlace","combo",fc);
String[] isPositive = {"是","否"};
ExcelUtil.setClassExcelAttribute( clazz,"isPositive","combo",isPositive);
// String[] isPositive = {"阳","未阳"};
// ExcelUtil.setClassExcelAttribute( clazz,"isPositive","combo",isPositive);
String[] positiveOnly = {"是","否"};
ExcelUtil.setClassExcelAttribute( clazz,"positiveOnly","combo",positiveOnly);
// List<String> streetList = fkqkService.selectStreet();
......
......@@ -121,9 +121,9 @@ public class GldryController extends BaseController
// 设置 是否阳性 下拉框
List<SysDictData> isYxs = DictUtils.getDictCache("is_yx");
String[] isYx=isYxs.stream().map(SysDictData::getDictLabel).toArray(String[]::new);
ExcelUtil.setClassExcelAttribute( clazz,"isYx","combo",isYx);
// List<SysDictData> isYxs = DictUtils.getDictCache("is_yx");
// String[] isYx=isYxs.stream().map(SysDictData::getDictLabel).toArray(String[]::new);
// ExcelUtil.setClassExcelAttribute( clazz,"isYx","combo",isYx);
// // 设置 居住所在地 下拉框
// List<SysDictData> dictResidentialArea = sysDictDataMapper.selectDictDataByType("residential_area");
......
package com.ruoyi.quartz.task;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.Fcry;
import com.ruoyi.system.domain.Gldry;
import com.ruoyi.system.domain.Jcglry;
import com.ruoyi.system.domain.Yxry;
import com.ruoyi.system.mapper.FcryMapper;
import com.ruoyi.system.mapper.GldryMapper;
import com.ruoyi.system.mapper.JcglryMapper;
import com.ruoyi.system.mapper.YxryMapper;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -24,6 +27,10 @@ public class JcglTask
private JcglryMapper jcglryMapper;
@Autowired
private YxryMapper yxryMapper;
@Autowired
private GldryMapper gldryMapper;
@Autowired
private FcryMapper fcryMapper;
public void updateAddress()
{
System.out.println("定时执行同步隔离人员");
......@@ -46,12 +53,39 @@ public class JcglTask
yxrys.addAll(yxries);
}
}
//更新解除隔离人员地址
if (!jcglries.isEmpty()){
jcglryMapper.updateBatch(jcglries);
}
//更新阳性是否解除隔离
if (!jcglries.isEmpty()){
yxryMapper.updateBatch(yxrys);
}
//更新方舱人员会否阳性
List<Fcry> fcries = new ArrayList<>();
List<Fcry> fcryList = fcryMapper.selectAll();
for (Fcry fcry : fcryList) {
List<Yxry> yxries = yxryMapper.selectYxryByCard(fcry.getCardNo());
if (!yxries.isEmpty()){
// fcry.setIsPositive("1");
fcries.add(fcry);
}
}
if (!fcries.isEmpty()){
fcryMapper.updateBatch(fcries);
}
//更新隔离点人员是否阳性
List<Gldry> gldries = new ArrayList<>();
List<Gldry> gldryList = gldryMapper.selectAll();
for (Gldry gldry : gldryList) {
List<Yxry> yxries = yxryMapper.selectYxryByCard(gldry.getCardNo());
if (!yxries.isEmpty()){
// gldry.setIsYx("1");
gldries.add(gldry);
}
}
if (!gldries.isEmpty()){
gldryMapper.updateBatch(gldries);
}
}
}
......@@ -43,7 +43,7 @@ public class FcryDTO extends BaseEntity
@Excel(name = "人员类别")
private String peopleType;
/** 是否疾控判定阳性 */
@Excel(name = "是否疾控判定阳性",dictType = "is_positive",combo = "")
@Excel(name = "是否阳性",dictType = "is_yx",type = Excel.Type.EXPORT)
private String isPositive;
/** 仅抗原阳性 */
@Excel(name = "仅抗原阳性",dictType = "positive_only",combo = "")
......
......@@ -47,7 +47,7 @@ public class Gldry extends BaseEntity
/** 是否阳性(阳,未阳) */
// 新增字段
@Excel(name = "是否阳性",dictType = "is_yx")
@Excel(name = "是否阳性",dictType = "is_yx",type = Excel.Type.EXPORT)
private String isYx;
/** 居住地所在区 */
......
......@@ -73,4 +73,8 @@ public interface FcryMapper
int selectToday(@Param("date") LocalDate date);
int selectCurrent();
List<Fcry> selectAll();
int updateBatch(@Param("list") List<Fcry> list);
}
......@@ -72,4 +72,8 @@ public interface GldryMapper
int selectToday(@Param("date") LocalDate date);
int selectCurrent();
List<Gldry> selectAll();
int updateBatch(@Param("list") List<Gldry> list);
}
......@@ -297,9 +297,9 @@ public class HscjServiceImpl implements IHscjService {
}
if (!trueList.isEmpty()) {
// 循环批量添加数据
int toIndex = 400;
for (int i = 0; i < trueList.size(); i += 400) {
if (i + 400 > trueList.size()) {
int toIndex = 500;
for (int i = 0; i < trueList.size(); i += 500) {
if (i + 500 > trueList.size()) {
toIndex = trueList.size() - i;
}
List<Hscj> list1 = trueList.subList(i, i + toIndex);
......
......@@ -103,6 +103,12 @@
<include refid="selectFcryVo"/>
where id = #{id}
</select>
<select id="selectAll" resultMap="FcryResult">
<include refid="selectFcryVo"/>
where del_flag = '0'
</select>
<select id="selectFcryByCard" resultMap="FcryResult">
select a.id,
a.fc_place,
......@@ -265,6 +271,14 @@
</trim>
where id = #{id}
</update>
<update id="updateBatch" parameterType="com.ruoyi.system.domain.Fcry">
<foreach item="item" index="index" collection="list" separator=";">
update fcry set is_positive = '1'
where id = #{item.id}
</foreach>
</update>
<insert id="updateBatchFcry" parameterType="com.ruoyi.system.domain.Fcry">
<foreach item="item" index="index" collection="list" separator=";">
update fcry
......
......@@ -71,6 +71,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<select id="selectAll" resultMap="GldryResult">
<include refid="selectGldryVo"/>
where del_flag = '0'
</select>
<select id="selectGldryByCard" resultType="com.ruoyi.system.domain.Gldry">
<include refid="selectGldryVo"/>
where card_no = #{cardNo} and del_flag = '0'
......@@ -183,6 +188,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</update>
<update id="updateBatch" parameterType="com.ruoyi.system.domain.Gldry">
<foreach item="item" index="index" collection="list" separator=";">
update gldry set is_yx = '1'
where id = #{item.id}
</foreach>
</update>
<delete id="deleteGldryById" parameterType="Long">
delete from gldry where id = #{id}
</delete>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment