Commit ca29f7a3 authored by zhuangxinwei's avatar zhuangxinwei

Merge remote-tracking branch 'origin/master' into master

parents c3df4895 a708fc5f
package com.ruoyi.web.controller.system; package com.ruoyi.web.controller.system;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -10,7 +11,9 @@ import com.ruoyi.common.utils.DictUtils; ...@@ -10,7 +11,9 @@ import com.ruoyi.common.utils.DictUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.Gldry; import com.ruoyi.system.domain.Gldry;
import com.ruoyi.system.domain.Yxry;
import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysDictTypeService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -29,6 +32,7 @@ import com.ruoyi.system.domain.Jcglry; ...@@ -29,6 +32,7 @@ import com.ruoyi.system.domain.Jcglry;
import com.ruoyi.system.service.IJcglryService; import com.ruoyi.system.service.IJcglryService;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/** /**
* 解除隔离人员Controller * 解除隔离人员Controller
...@@ -44,6 +48,8 @@ public class JcglryController extends BaseController ...@@ -44,6 +48,8 @@ public class JcglryController extends BaseController
private IJcglryService jcglryService; private IJcglryService jcglryService;
@Autowired @Autowired
private SysUserMapper sysUserMapper; private SysUserMapper sysUserMapper;
@Autowired
private ISysDictTypeService dictTypeService;
/** /**
* 查询解除隔离人员列表 * 查询解除隔离人员列表
*/ */
...@@ -146,4 +152,49 @@ public class JcglryController extends BaseController ...@@ -146,4 +152,49 @@ public class JcglryController extends BaseController
{ {
return toAjax(jcglryService.deleteJcglryByIds(ids)); return toAjax(jcglryService.deleteJcglryByIds(ids));
} }
/**
* 根据字典类型查询隔离位置
*/
@GetMapping(value = "/glPlace")
public AjaxResult dictType()
{
List<SysDictData> data = new ArrayList<>();
List<SysDictData> point = dictTypeService.selectDictDataByType("isolation_point");
List<SysDictData> shelters = dictTypeService.selectDictDataByType("shelters");
data.addAll(point);
data.addAll(shelters);
return success(data);
}
@PostMapping("/importTemplate")
@PreAuthorize("@ss.hasPermi('system:jcglry:import')")
@Log(title = "下载解除隔离人员模板", businessType = BusinessType.IMPORT)
public void importTemplate(HttpServletResponse response) throws Exception {
ExcelUtil<Jcglry> util = new ExcelUtil<Jcglry>(Jcglry.class);
Class<? extends Jcglry> clazz = new Jcglry().getClass();
List<SysDictData> isAreas = DictUtils.getDictCache("is_area");
List<SysDictData> glPlace = DictUtils.getDictCache("isolation_point");
glPlace.addAll(DictUtils.getDictCache("shelters"));
List<SysDictData> arrangeDrivers = DictUtils.getDictCache("arrange_drivers");
String[] isArea=isAreas.stream().map(SysDictData::getDictLabel).toArray(String[]::new);
String[] glPlaces=glPlace.stream().map(SysDictData::getDictLabel).toArray(String[]::new);
String[] arrangeDriver=arrangeDrivers.stream().map(SysDictData::getDictLabel).toArray(String[]::new);
ExcelUtil.setClassExcelAttribute( clazz,"isArea","combo",isArea);
ExcelUtil.setClassExcelAttribute( clazz,"glPlace","combo",glPlaces);
ExcelUtil.setClassExcelAttribute( clazz,"arrangeDrivers","combo",arrangeDriver);
//设置文本格式表头在第几列
String columes = "6";
util.importTemplateExcelSetHead(response, "解除隔离人员",columes);
}
@Log(title = "导入解除隔离人员", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('system:jcglry:import')")
@PostMapping("/importData")
public void importData(MultipartFile file, HttpServletResponse response) throws Exception
{
ExcelUtil<Jcglry> util = new ExcelUtil<Jcglry>(Jcglry.class);
List<Jcglry> list = util.importExcel(file.getInputStream());
jcglryService.importList(list, response);
}
} }
...@@ -10,7 +10,7 @@ import org.springframework.data.annotation.Transient; ...@@ -10,7 +10,7 @@ import org.springframework.data.annotation.Transient;
/** /**
* 解除隔离人员对象 jcglry * 解除隔离人员对象 jcglry
* *
* @author ruoyi * @author ruoyi
* @date 2022-12-01 * @date 2022-12-01
*/ */
...@@ -22,25 +22,25 @@ public class Jcglry extends BaseEntity ...@@ -22,25 +22,25 @@ public class Jcglry extends BaseEntity
private Long id; private Long id;
/** 是否区内 */ /** 是否区内 */
@Excel(name = "区域类别",dictType = "is_area") @Excel(name = "区域类别",dictType = "is_area",combo = "")
private String isArea; private String isArea;
/** 姓名 */ /** 姓名 */
@Excel(name = "接触人员姓名") @Excel(name = "解除人员姓名")
private String name; private String name;
/** 隔离位置 */ /** 隔离位置 */
@Excel(name = "解除酒店") @Excel(name = "解除酒店",combo = "",dictType = "isolation_point,shelters",separator = ",")
private String glPlace; private String glPlace;
/** 隔离时间 */ /** 隔离时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "入住时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "入住时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date rzTime; private Date rzTime;
/** 解除时间 */ /** 解除时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "解除时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "解除时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date jcTime; private Date jcTime;
/** 人员类别 */ /** 人员类别 */
...@@ -67,16 +67,28 @@ public class Jcglry extends BaseEntity ...@@ -67,16 +67,28 @@ public class Jcglry extends BaseEntity
// @Excel(name = "小区/村名称") // @Excel(name = "小区/村名称")
private String community; private String community;
/** 楼号单元号门牌号 */
@Excel(name = "楼号")
private String building;
/** 楼号单元号门牌号 */
@Excel(name = "单元号")
private String unit;
/** 楼号单元号门牌号 */
@Excel(name = "门牌号")
private String house;
/** 家庭住址 */ /** 家庭住址 */
@Excel(name = "家庭住址") @Excel(name = "家庭住址")
private String address; private String address;
/** 转运状态 */ /** 转运状态 */
@Excel(name = "是否已转走",readConverterExp = "0=是,1=否") // @Excel(name = "是否已转走",readConverterExp = "0=是,1=否")
private String zyStatus; private String zyStatus;
/** 是否安排司机 */ /** 是否安排司机 */
@Excel(name = "是否安排司机",dictType = "arrange_drivers") @Excel(name = "已安排司机",dictType = "arrange_drivers",combo = "")
private String arrangeDrivers; private String arrangeDrivers;
/** 备注街道 */ /** 备注街道 */
...@@ -106,174 +118,174 @@ public class Jcglry extends BaseEntity ...@@ -106,174 +118,174 @@ public class Jcglry extends BaseEntity
@Transient @Transient
private String value; private String value;
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
} }
public Long getId() public Long getId()
{ {
return id; return id;
} }
public void setIsArea(String isArea) public void setIsArea(String isArea)
{ {
this.isArea = isArea; this.isArea = isArea;
} }
public String getIsArea() public String getIsArea()
{ {
return isArea; return isArea;
} }
public void setName(String name) public void setName(String name)
{ {
this.name = name; this.name = name;
} }
public String getName() public String getName()
{ {
return name; return name;
} }
public void setGlPlace(String glPlace) public void setGlPlace(String glPlace)
{ {
this.glPlace = glPlace; this.glPlace = glPlace;
} }
public String getGlPlace() public String getGlPlace()
{ {
return glPlace; return glPlace;
} }
public void setRzTime(Date rzTime) public void setRzTime(Date rzTime)
{ {
this.rzTime = rzTime; this.rzTime = rzTime;
} }
public Date getRzTime() public Date getRzTime()
{ {
return rzTime; return rzTime;
} }
public void setJcTime(Date jcTime) public void setJcTime(Date jcTime)
{ {
this.jcTime = jcTime; this.jcTime = jcTime;
} }
public Date getJcTime() public Date getJcTime()
{ {
return jcTime; return jcTime;
} }
public void setRylb(String rylb) public void setRylb(String rylb)
{ {
this.rylb = rylb; this.rylb = rylb;
} }
public String getRylb() public String getRylb()
{ {
return rylb; return rylb;
} }
public void setCardNo(String cardNo) public void setCardNo(String cardNo)
{ {
this.cardNo = cardNo; this.cardNo = cardNo;
} }
public String getCardNo() public String getCardNo()
{ {
return cardNo; return cardNo;
} }
public void setPhone(String phone) public void setPhone(String phone)
{ {
this.phone = phone; this.phone = phone;
} }
public String getPhone() public String getPhone()
{ {
return phone; return phone;
} }
public void setStreet(String street) public void setStreet(String street)
{ {
this.street = street; this.street = street;
} }
public String getStreet() public String getStreet()
{ {
return street; return street;
} }
public void setCommittee(String committee) public void setCommittee(String committee)
{ {
this.committee = committee; this.committee = committee;
} }
public String getCommittee() public String getCommittee()
{ {
return committee; return committee;
} }
public void setCommunity(String community) public void setCommunity(String community)
{ {
this.community = community; this.community = community;
} }
public String getCommunity() public String getCommunity()
{ {
return community; return community;
} }
public void setAddress(String address) public void setAddress(String address)
{ {
this.address = address; this.address = address;
} }
public String getAddress() public String getAddress()
{ {
return address; return address;
} }
public void setZyStatus(String zyStatus) public void setZyStatus(String zyStatus)
{ {
this.zyStatus = zyStatus; this.zyStatus = zyStatus;
} }
public String getZyStatus() public String getZyStatus()
{ {
return zyStatus; return zyStatus;
} }
public void setArrangeDrivers(String arrangeDrivers) public void setArrangeDrivers(String arrangeDrivers)
{ {
this.arrangeDrivers = arrangeDrivers; this.arrangeDrivers = arrangeDrivers;
} }
public String getArrangeDrivers() public String getArrangeDrivers()
{ {
return arrangeDrivers; return arrangeDrivers;
} }
public void setBzStreet(String bzStreet) public void setBzStreet(String bzStreet)
{ {
this.bzStreet = bzStreet; this.bzStreet = bzStreet;
} }
public String getBzStreet() public String getBzStreet()
{ {
return bzStreet; return bzStreet;
} }
public void setBzAddress(String bzAddress) public void setBzAddress(String bzAddress)
{ {
this.bzAddress = bzAddress; this.bzAddress = bzAddress;
} }
public String getBzAddress() public String getBzAddress()
{ {
return bzAddress; return bzAddress;
} }
public void setStatus(String status) public void setStatus(String status)
{ {
this.status = status; this.status = status;
} }
public String getStatus() public String getStatus()
{ {
return status; return status;
} }
public void setDelFlag(String delFlag) public void setDelFlag(String delFlag)
{ {
this.delFlag = delFlag; this.delFlag = delFlag;
} }
public String getDelFlag() public String getDelFlag()
{ {
return delFlag; return delFlag;
} }
...@@ -333,4 +345,28 @@ public class Jcglry extends BaseEntity ...@@ -333,4 +345,28 @@ public class Jcglry extends BaseEntity
public void setValue(String value) { public void setValue(String value) {
this.value = value; this.value = value;
} }
public String getBuilding() {
return building;
}
public void setBuilding(String building) {
this.building = building;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getHouse() {
return house;
}
public void setHouse(String house) {
this.house = house;
}
} }
...@@ -2,6 +2,7 @@ package com.ruoyi.system.mapper; ...@@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.Jcglry; import com.ruoyi.system.domain.Jcglry;
import org.apache.ibatis.annotations.Param;
/** /**
* 解除隔离人员Mapper接口 * 解除隔离人员Mapper接口
...@@ -58,4 +59,11 @@ public interface JcglryMapper ...@@ -58,4 +59,11 @@ public interface JcglryMapper
* @return 结果 * @return 结果
*/ */
public int deleteJcglryByIds(Long[] ids); public int deleteJcglryByIds(Long[] ids);
List<Jcglry> selectYxryByCard(String cardNo);
int insertBatchYxry(@Param("list")List<Jcglry> list);
int updateBatchYxry(@Param("list")List<Jcglry> list);
} }
...@@ -2,6 +2,9 @@ package com.ruoyi.system.service; ...@@ -2,6 +2,9 @@ package com.ruoyi.system.service;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.Jcglry; import com.ruoyi.system.domain.Jcglry;
import com.ruoyi.system.domain.Yxry;
import javax.servlet.http.HttpServletResponse;
/** /**
* 解除隔离人员Service接口 * 解除隔离人员Service接口
...@@ -58,4 +61,6 @@ public interface IJcglryService ...@@ -58,4 +61,6 @@ public interface IJcglryService
* @return 结果 * @return 结果
*/ */
public int deleteJcglryById(Long id); public int deleteJcglryById(Long id);
void importList(List<Jcglry> list, HttpServletResponse response);
} }
...@@ -8,6 +8,7 @@ import com.ruoyi.common.core.domain.entity.SysDictData; ...@@ -8,6 +8,7 @@ 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.*; import com.ruoyi.common.utils.*;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.Yxry;
import com.ruoyi.system.domain.Zlqk; import com.ruoyi.system.domain.Zlqk;
import com.ruoyi.system.mapper.SysDictDataMapper; import com.ruoyi.system.mapper.SysDictDataMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -137,19 +138,6 @@ public class HscjServiceImpl implements IHscjService { ...@@ -137,19 +138,6 @@ public class HscjServiceImpl implements IHscjService {
if (StringUtils.isEmpty(hscj.getRygx())) { if (StringUtils.isEmpty(hscj.getRygx())) {
hscj.setRygx("本人"); hscj.setRygx("本人");
} }
// 校验单张Excel是否有多个重复的身份证号
if (StringUtils.isNotEmpty(hscj.getCardNo())){
int isExist = 0;
for (Hscj hscjTest : list){
if (hscj.getCardNo().equals(hscjTest.getCardNo())){
isExist++;
}
}
if (isExist > 1){
failureList.add(hscj);
continue;
}
}
if (StringUtils.isNotEmpty(hscj.getCardNo()) if (StringUtils.isNotEmpty(hscj.getCardNo())
&& StringUtils.isNotEmpty(hscj.getArea()) && StringUtils.isNotEmpty(hscj.getArea())
&& StringUtils.isNotEmpty(hscj.getBoxhao()) && StringUtils.isNotEmpty(hscj.getBoxhao())
...@@ -162,6 +150,27 @@ public class HscjServiceImpl implements IHscjService { ...@@ -162,6 +150,27 @@ public class HscjServiceImpl implements IHscjService {
&& StringUtils.isNotEmpty(hscj.getCjPhone()) && StringUtils.isNotEmpty(hscj.getCjPhone())
&& StringUtils.isNotEmpty(hscj.getBblx()) && StringUtils.isNotEmpty(hscj.getBblx())
) { ) {
// 校验单张Excel是否有多个重复的身份证号
// if (StringUtils.isNotEmpty(hscj.getCardNo())){
// int isExist = 0;
// for (Hscj hscjTest : list){
// if (hscj.getCardNo().equals(hscjTest.getCardNo())){
// isExist++;
// }
// }
// if (isExist > 1){
// failureList.add(hscj);
// continue;
// }
List<Hscj> hsctList = list.stream().filter(l ->
hscj.getCardNo().equals(l.getCardNo()) && l.getCjTime()!=null &&
DateUtils.dateTime(hscj.getCjTime()).equals(DateUtils.dateTime(l.getCjTime())))
.collect(Collectors.toList());
if (hsctList.size() > 1) {
failureList.add(hscj);
continue;
}
// }
// // 校验四级联动是否对应字典的值 // // 校验四级联动是否对应字典的值
// // 校验 所在区 // // 校验 所在区
// if (StringUtils.isNotEmpty(hscj.getArea())){ // if (StringUtils.isNotEmpty(hscj.getArea())){
......
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List; import java.util.List;
import com.ruoyi.common.utils.DateUtils; import java.util.stream.Collectors;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.*;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.Fcry;
import com.ruoyi.system.domain.Gldry;
import com.ruoyi.system.domain.Yxry;
import com.ruoyi.system.mapper.FcryMapper;
import com.ruoyi.system.mapper.GldryMapper;
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.JcglryMapper; import com.ruoyi.system.mapper.JcglryMapper;
import com.ruoyi.system.domain.Jcglry; import com.ruoyi.system.domain.Jcglry;
import com.ruoyi.system.service.IJcglryService; import com.ruoyi.system.service.IJcglryService;
import javax.servlet.http.HttpServletResponse;
/** /**
* 解除隔离人员Service业务层处理 * 解除隔离人员Service业务层处理
* *
...@@ -22,6 +36,12 @@ public class JcglryServiceImpl implements IJcglryService ...@@ -22,6 +36,12 @@ public class JcglryServiceImpl implements IJcglryService
@Autowired @Autowired
private JcglryMapper jcglryMapper; private JcglryMapper jcglryMapper;
@Autowired
private FcryMapper fcryMapper;
@Autowired
private GldryMapper gldryMapper;
/** /**
* 查询解除隔离人员 * 查询解除隔离人员
* *
...@@ -31,7 +51,43 @@ public class JcglryServiceImpl implements IJcglryService ...@@ -31,7 +51,43 @@ public class JcglryServiceImpl implements IJcglryService
@Override @Override
public Jcglry selectJcglryById(Long id) public Jcglry selectJcglryById(Long id)
{ {
return jcglryMapper.selectJcglryById(id); Jcglry jcglry = jcglryMapper.selectJcglryById(id);
// 根据身份证号查询方舱人员信息
List<Fcry> fcries = fcryMapper.selectFcryByCard(jcglry.getCardNo());
// 根据身份证号查询隔离人员
List<Gldry> gldries = gldryMapper.selectGldryByCard(jcglry.getCardNo(),null);
Fcry fcry = null;
Gldry gldry = null;
if (!fcries.isEmpty())
fcry = fcries.stream().max(Comparator.comparing(Fcry::getZrTime)).get();
if (!gldries.isEmpty())
gldry = gldries.stream().max(Comparator.comparing(Gldry::getZrTime)).get();
//0=是,1=否
if (fcry!=null && gldry!=null) {
//相等则返回0,date1大返回1,否则返回-1。
if (fcry.getZrTime().compareTo(gldry.getZrTime()) > 0){
if (null!=fcry.getZcTime())
jcglry.setZyStatus("0");
else
jcglry.setZyStatus("1");
} else {
if (null!=gldry.getZcTime())
jcglry.setZyStatus("0");
else
jcglry.setZyStatus("1");
}
} else if (fcry!=null) {
if (null!=fcry.getZcTime())
jcglry.setZyStatus("0");
else
jcglry.setZyStatus("1");
} else if (gldry!=null) {
if (null!=gldry.getZcTime())
jcglry.setZyStatus("0");
else
jcglry.setZyStatus("1");
}
return jcglry;
} }
/** /**
...@@ -44,7 +100,45 @@ public class JcglryServiceImpl implements IJcglryService ...@@ -44,7 +100,45 @@ public class JcglryServiceImpl implements IJcglryService
@DataScope(deptAlias = "d", userAlias = "u") @DataScope(deptAlias = "d", userAlias = "u")
public List<Jcglry> selectJcglryList(Jcglry jcglry) public List<Jcglry> selectJcglryList(Jcglry jcglry)
{ {
return jcglryMapper.selectJcglryList(jcglry); List<Jcglry> list = jcglryMapper.selectJcglryList(jcglry);
for (Jcglry yx : list) {
// 根据身份证号查询方舱人员信息
List<Fcry> fcries = fcryMapper.selectFcryByCard(yx.getCardNo());
// 根据身份证号查询隔离人员
List<Gldry> gldries = gldryMapper.selectGldryByCard(yx.getCardNo(),null);
Fcry fcry = null;
Gldry gldry = null;
if (!fcries.isEmpty())
fcry = fcries.stream().max(Comparator.comparing(Fcry::getZrTime)).get();
if (!gldries.isEmpty())
gldry = gldries.stream().max(Comparator.comparing(Gldry::getZrTime)).get();
//0=是,1=否
if (fcry!=null && gldry!=null) {
//相等则返回0,date1大返回1,否则返回-1。
if (fcry.getZrTime().compareTo(gldry.getZrTime()) > 0){
if (null!=fcry.getZcTime())
yx.setZyStatus("0");
else
yx.setZyStatus("1");
} else {
if (null!=gldry.getZcTime())
yx.setZyStatus("0");
else
yx.setZyStatus("1");
}
} else if (fcry!=null) {
if (null!=fcry.getZcTime())
yx.setZyStatus("0");
else
yx.setZyStatus("1");
} else if (gldry!=null) {
if (null!=gldry.getZcTime())
yx.setZyStatus("0");
else
yx.setZyStatus("1");
}
}
return list;
} }
/** /**
...@@ -97,4 +191,100 @@ public class JcglryServiceImpl implements IJcglryService ...@@ -97,4 +191,100 @@ public class JcglryServiceImpl implements IJcglryService
{ {
return jcglryMapper.deleteJcglryById(id); return jcglryMapper.deleteJcglryById(id);
} }
/**
* 导入数据
*
* @return 结果
*/
@Override
public void importList(List<Jcglry> list, HttpServletResponse response) {
if (StringUtils.isNull(list) || list.size() == 0) {
throw new ServiceException("导入数据不能为空!");
}
List<Jcglry> trueList = new ArrayList<>();
List<Jcglry> failureList = new ArrayList<>();
List<Jcglry> updateList = new ArrayList<>();
for (Jcglry zlqk : list) {
if (StringUtils.isNotEmpty(zlqk.getCardNo()) && StringUtils.isNotEmpty(zlqk.getIsArea())
&& StringUtils.isNotEmpty(zlqk.getPhone()) && StringUtils.isNotEmpty(zlqk.getName())
&& StringUtils.isNotEmpty(zlqk.getGlPlace()) && zlqk.getRzTime()!= null
&& null!=zlqk.getJcTime() && StringUtils.isNotEmpty(zlqk.getRylb())) {
// String community = "";
// String committee = "";
String street = "";
if (StringUtils.isNotEmpty(zlqk.getStreet())){ //如果街道不为空,去数据字典匹配value
List<SysDictData> communitys = DictUtils.getDictCache("street_town");
List<String> values = communitys.stream().filter(l->zlqk.getStreet().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList());
if (!values.isEmpty())
street=values.get(0);
else {
failureList.add(zlqk);
continue;
}
}
// if ((StringUtils.isNotEmpty(community)&&StringUtils.isEmpty(committee))||
// (StringUtils.isNotEmpty(committee)&&StringUtils.isEmpty(street))){
// failureList.add(zlqk);
// continue;
// }
//校验身份证是否重复
List<Jcglry> zlqks = jcglryMapper.selectYxryByCard(zlqk.getCardNo());
if (!zlqks.isEmpty()) {
// zlqk.setCommunity(community);
// zlqk.setCommittee(committee);
zlqk.setStreet(street);
updateList.add(zlqk);
} else {
zlqks = list.stream().filter(l -> zlqk.getCardNo().equals(l.getCardNo())).collect(Collectors.toList());
if (zlqks.size() > 1)
failureList.add(zlqk);
else {
if (!CheckUtils.checkPhone(zlqk.getPhone())) {
failureList.add(zlqk);
} else {
if (CheckUtils.checkCard(zlqk.getCardNo())){
// zlqk.setCheckCard("正确");
// zlqk.setCommunity(community);
// zlqk.setCommittee(committee);
zlqk.setStreet(street);
trueList.add(zlqk);
} else {
// zlqk.setCheckCard("不正确");
failureList.add(zlqk);
}
}
}
}
} else if (StringUtils.isEmpty(zlqk.getCardNo()) && StringUtils.isEmpty(zlqk.getIsArea())
&& StringUtils.isEmpty(zlqk.getPhone()) && StringUtils.isEmpty(zlqk.getName())
&& StringUtils.isEmpty(zlqk.getGlPlace()) && zlqk.getRzTime()== null
&& null==zlqk.getJcTime() && StringUtils.isEmpty(zlqk.getRylb())) {
continue;
} else {
failureList.add(zlqk);
}
}
if (!trueList.isEmpty()) {
for (Jcglry zlqk : trueList) {
zlqk.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
zlqk.setCreateTime(DateUtils.getNowDate());
}
jcglryMapper.insertBatchYxry(trueList);
}
if (!updateList.isEmpty()) {
for (Jcglry zlqk : updateList) {
zlqk.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
zlqk.setUpdateTime(DateUtils.getNowDate());
}
jcglryMapper.updateBatchYxry(updateList);
}
if (!failureList.isEmpty()) {
ExcelUtil<Jcglry> util = new ExcelUtil<Jcglry>(Jcglry.class);
util.exportExcel(response, failureList, "解除隔离人员数据");
// return AjaxResult.error(111,"导出失败数据"+failureList.size()+"条");
}
// return AjaxResult.success("数据导入成功");
}
} }
...@@ -141,45 +141,45 @@ public class YxryServiceImpl implements IYxryService { ...@@ -141,45 +141,45 @@ public class YxryServiceImpl implements IYxryService {
List<Yxry> updateList = 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.getArea()) ) { && StringUtils.isNotEmpty(zlqk.getPhone()) && StringUtils.isNotEmpty(zlqk.getArea())) {
String community = ""; String community = "";
String committee = ""; String committee = "";
String street = ""; String street = "";
if (StringUtils.isNotEmpty(zlqk.getCommunity())){ //如果小区不为空,去数据字典匹配value if (StringUtils.isNotEmpty(zlqk.getCommunity())) { //如果小区不为空,去数据字典匹配value
List<SysDictData> communitys = DictUtils.getDictCache("community"); List<SysDictData> communitys = DictUtils.getDictCache("community");
List<String> values = communitys.stream().filter(l->zlqk.getCommunity().equals(l.getDictLabel())) List<String> values = communitys.stream().filter(l -> zlqk.getCommunity().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList()); .map(SysDictData::getDictValue).collect(Collectors.toList());
if (!values.isEmpty()) if (!values.isEmpty())
community=values.get(0); community = values.get(0);
else { else {
failureList.add(zlqk); failureList.add(zlqk);
continue; continue;
} }
} }
if (StringUtils.isNotEmpty(zlqk.getCommittee())){ //如果委员会不为空,去数据字典匹配value if (StringUtils.isNotEmpty(zlqk.getCommittee())) { //如果委员会不为空,去数据字典匹配value
List<SysDictData> communitys = DictUtils.getDictCache("committee"); List<SysDictData> communitys = DictUtils.getDictCache("committee");
List<String> values = communitys.stream().filter(l->zlqk.getCommittee().equals(l.getDictLabel())) List<String> values = communitys.stream().filter(l -> zlqk.getCommittee().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList()); .map(SysDictData::getDictValue).collect(Collectors.toList());
if (!values.isEmpty()) if (!values.isEmpty())
committee=values.get(0); committee = values.get(0);
else { else {
failureList.add(zlqk); failureList.add(zlqk);
continue; continue;
} }
} }
if (StringUtils.isNotEmpty(zlqk.getStreet())){ //如果街道不为空,去数据字典匹配value if (StringUtils.isNotEmpty(zlqk.getStreet())) { //如果街道不为空,去数据字典匹配value
List<SysDictData> communitys = DictUtils.getDictCache("street_town"); List<SysDictData> communitys = DictUtils.getDictCache("street_town");
List<String> values = communitys.stream().filter(l->zlqk.getStreet().equals(l.getDictLabel())) List<String> values = communitys.stream().filter(l -> zlqk.getStreet().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList()); .map(SysDictData::getDictValue).collect(Collectors.toList());
if (!values.isEmpty()) if (!values.isEmpty())
street=values.get(0); street = values.get(0);
else { else {
failureList.add(zlqk); failureList.add(zlqk);
continue; continue;
} }
} }
if ((StringUtils.isNotEmpty(community)&&StringUtils.isEmpty(committee))|| if ((StringUtils.isNotEmpty(community) && StringUtils.isEmpty(committee)) ||
(StringUtils.isNotEmpty(committee)&&StringUtils.isEmpty(street))){ (StringUtils.isNotEmpty(committee) && StringUtils.isEmpty(street))) {
failureList.add(zlqk); failureList.add(zlqk);
continue; continue;
} }
...@@ -198,7 +198,7 @@ public class YxryServiceImpl implements IYxryService { ...@@ -198,7 +198,7 @@ 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("正确");
zlqk.setCommunity(community); zlqk.setCommunity(community);
zlqk.setCommittee(committee); zlqk.setCommittee(committee);
...@@ -270,18 +270,18 @@ public class YxryServiceImpl implements IYxryService { ...@@ -270,18 +270,18 @@ public class YxryServiceImpl implements IYxryService {
map.put("glName", null); map.put("glName", null);
} else if (fcryList.size() > 0 && gldryList.size() > 0) { // 都没转出 } else if (fcryList.size() > 0 && gldryList.size() > 0) { // 都没转出
map.put("glPlace", "其他"); map.put("glPlace", "其他");
map.put("fcName", fcryList.stream().map(Fcry::getFcPlace).collect(Collectors.joining(","))); map.put("fcName", DictUtils.getDictLabel("shelters",fcryList.stream().map(Fcry::getFcPlace).collect(Collectors.joining(","))));
map.put("glName", gldryList.stream().map(Gldry::getGlPlace).collect(Collectors.joining(","))); map.put("glName", DictUtils.getDictLabel("isolation_point",gldryList.stream().map(Gldry::getGlPlace).collect(Collectors.joining(","))));
} else if (fcryList.size() > 0) { } else if (fcryList.size() > 0) {
map.put("glPlace", "方舱隔离"); map.put("glPlace", "方舱隔离");
map.put("fcName", fcryList.stream().map(Fcry::getFcPlace).collect(Collectors.joining(","))); map.put("fcName", DictUtils.getDictLabel("shelters",fcryList.stream().map(Fcry::getFcPlace).collect(Collectors.joining(","))));
map.put("glName", null); map.put("glName", null);
} else { } else {
map.put("glPlace", "隔离点隔离"); map.put("glPlace", "隔离点隔离");
map.put("fcName", null); map.put("fcName", null);
map.put("glName", gldryList.stream().map(Gldry::getGlPlace).collect(Collectors.joining(","))); map.put("glName", DictUtils.getDictLabel("isolation_point",gldryList.stream().map(Gldry::getGlPlace).collect(Collectors.joining(","))));
} }
map.put("card",zlqks.isEmpty()); map.put("card", zlqks.isEmpty());
return map; return map;
} }
} }
...@@ -13,6 +13,7 @@ import com.ruoyi.common.utils.DateUtils; ...@@ -13,6 +13,7 @@ import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.BeanValidators; import com.ruoyi.common.utils.bean.BeanValidators;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.Yxry;
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.utils.SecurityUtils;
...@@ -128,6 +129,7 @@ public class ZlqkServiceImpl implements IZlqkService ...@@ -128,6 +129,7 @@ public class ZlqkServiceImpl implements IZlqkService
} }
List<Zlqk> trueList = new ArrayList<>(); List<Zlqk> trueList = new ArrayList<>();
List<Zlqk> failureList = new ArrayList<>(); List<Zlqk> failureList = new ArrayList<>();
List<Yxry> updateList = new ArrayList<>();
for (Zlqk zlqk : list) { for (Zlqk zlqk : list) {
if (StringUtils.isNotEmpty(zlqk.getCardNo()) && StringUtils.isNotEmpty(zlqk.getUserName()) if (StringUtils.isNotEmpty(zlqk.getCardNo()) && StringUtils.isNotEmpty(zlqk.getUserName())
&&StringUtils.isNotEmpty(zlqk.getPhone()) && zlqk.getSbDate() != null &&StringUtils.isNotEmpty(zlqk.getPhone()) && zlqk.getSbDate() != null
...@@ -141,11 +143,13 @@ public class ZlqkServiceImpl implements IZlqkService ...@@ -141,11 +143,13 @@ public class ZlqkServiceImpl implements IZlqkService
if (zlqks.size()>1) if (zlqks.size()>1)
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())
......
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
a.unit, a.unit,
a.doorplate, a.doorplate,
a.zr_time, a.zr_time,
a.zc_time,
a.gl_place, a.gl_place,
a.status, a.status,
a.del_flag, a.del_flag,
......
...@@ -29,14 +29,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -29,14 +29,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="unit" column="unit"/>
<result property="building" column="building"/>
<result property="house" column="house"/>
</resultMap> </resultMap>
<sql id="selectJcglryVo"> <sql id="selectJcglryVo">
select id, is_area, name, gl_place, rz_time, jc_time, rylb, card_no, phone, street, committee, community, address, zy_status, arrange_drivers, bz_street, bz_address, status, del_flag, create_by, create_time, update_by, update_time, remark from jcglry select id, is_area, name, gl_place, rz_time, jc_time, rylb, card_no, phone, street, committee, community, address,
zy_status, arrange_drivers, bz_street, bz_address, status, del_flag, create_by, create_time, update_by,
update_time, remark,unit, house, building from jcglry
</sql> </sql>
<select id="selectJcglryList" parameterType="Jcglry" resultMap="JcglryResult"> <select id="selectJcglryList" parameterType="Jcglry" resultMap="JcglryResult">
select a.id, a.is_area, a.name, a.gl_place, a.rz_time, a.jc_time, a.rylb, a.card_no, a.phone, a.street, a.committee, a.community, a.address, a.zy_status, a.arrange_drivers, a.bz_street, a.bz_address, a.status, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark from jcglry a select a.id, a.is_area, a.name, a.gl_place, a.rz_time, a.jc_time, a.rylb, a.card_no, a.phone, a.street,
a.committee, a.community, a.address, a.zy_status, a.arrange_drivers, a.bz_street, a.bz_address,
a.status, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.unit, a.house, a.building
from jcglry a
left join sys_user u on u.user_id = a.create_by left join sys_user u on u.user_id = a.create_by
left join sys_dept d on u.dept_id = d.dept_id left join sys_dept d on u.dept_id = d.dept_id
where a.del_flag = 0 where a.del_flag = 0
...@@ -67,7 +75,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -67,7 +75,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectJcglryVo"/> <include refid="selectJcglryVo"/>
where id = #{id} where id = #{id}
</select> </select>
<select id="selectYxryByCard" resultType="com.ruoyi.system.domain.Jcglry" parameterType="java.lang.String">
<include refid="selectJcglryVo"/>
where del_flag = '0' and card_no = #{cardNo}
</select>
<insert id="insertJcglry" parameterType="Jcglry" useGeneratedKeys="true" keyProperty="id"> <insert id="insertJcglry" parameterType="Jcglry" useGeneratedKeys="true" keyProperty="id">
insert into jcglry insert into jcglry
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -82,6 +95,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -82,6 +95,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="street != null">street,</if> <if test="street != null">street,</if>
<if test="committee != null">committee,</if> <if test="committee != null">committee,</if>
<if test="community != null">community,</if> <if test="community != null">community,</if>
<if test="unit != null">unit,</if>
<if test="building != null">building,</if>
<if test="house != null">house,</if>
<if test="address != null">address,</if> <if test="address != null">address,</if>
<if test="zyStatus != null">zy_status,</if> <if test="zyStatus != null">zy_status,</if>
<if test="arrangeDrivers != null">arrange_drivers,</if> <if test="arrangeDrivers != null">arrange_drivers,</if>
...@@ -107,6 +123,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -107,6 +123,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="street != null">#{street},</if> <if test="street != null">#{street},</if>
<if test="committee != null">#{committee},</if> <if test="committee != null">#{committee},</if>
<if test="community != null">#{community},</if> <if test="community != null">#{community},</if>
<if test="unit != null">#{unit},</if>
<if test="building != null">#{building},</if>
<if test="house != null">#{house},</if>
<if test="address != null">#{address},</if> <if test="address != null">#{address},</if>
<if test="zyStatus != null">#{zyStatus},</if> <if test="zyStatus != null">#{zyStatus},</if>
<if test="arrangeDrivers != null">#{arrangeDrivers},</if> <if test="arrangeDrivers != null">#{arrangeDrivers},</if>
...@@ -122,6 +141,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -122,6 +141,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
</insert> </insert>
<insert id="insertBatchYxry" parameterType="com.ruoyi.system.domain.Jcglry">
insert into jcglry
( is_area ,name, gl_place, rz_time, jc_time, rylb, card_no, phone, street, committee, community,
address, zy_status, arrange_drivers, bz_street, bz_address, create_by, create_time, remark,unit,building,
house ) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.isArea},#{item.name},#{item.glPlace},#{item.rzTime},#{item.jcTime},#{item.rylb},#{item.cardNo},#{item.phone},
#{item.street},#{item.committee},#{item.community},
#{item.address}, #{item.zyStatus}, #{item.arrangeDrivers},#{item.bzStreet}, #{item.bzAddress},#{item.createBy},
#{item.createTime},#{item.remark},#{item.unit},#{item.building},#{item.house})
</foreach>
</insert>
<update id="updateJcglry" parameterType="Jcglry"> <update id="updateJcglry" parameterType="Jcglry">
update jcglry update jcglry
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
...@@ -136,6 +168,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -136,6 +168,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="street != null">street = #{street},</if> <if test="street != null">street = #{street},</if>
<if test="committee != null">committee = #{committee},</if> <if test="committee != null">committee = #{committee},</if>
<if test="community != null">community = #{community},</if> <if test="community != null">community = #{community},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="building != null">building = #{building},</if>
<if test="house != null">house = #{house},</if>
<if test="address != null">address = #{address},</if> <if test="address != null">address = #{address},</if>
<if test="zyStatus != null">zy_status = #{zyStatus},</if> <if test="zyStatus != null">zy_status = #{zyStatus},</if>
<if test="arrangeDrivers != null">arrange_drivers = #{arrangeDrivers},</if> <if test="arrangeDrivers != null">arrange_drivers = #{arrangeDrivers},</if>
...@@ -152,6 +187,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -152,6 +187,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</update> </update>
<update id="updateBatchYxry" parameterType="com.ruoyi.system.domain.Jcglry">
<foreach item="item" index="index" collection="list" separator=";">
update jcglry
<trim prefix="SET" suffixOverrides=",">
<if test="item.isArea != null">is_area = #{item.isArea},</if>
<if test="item.name != null">name = #{item.name},</if>
<if test="item.glPlace != null">gl_place = #{item.glPlace},</if>
<if test="item.rzTime != null">rz_time = #{item.rzTime},</if>
<if test="item.jcTime != null">jc_time = #{item.jcTime},</if>
<if test="item.rylb != null">rylb = #{item.rylb},</if>
<if test="item.cardNo != null">card_no = #{item.cardNo},</if>
<if test="item.phone != null">phone = #{item.phone},</if>
<if test="item.street != null">street = #{item.street},</if>
<if test="item.committee != null">committee = #{item.committee},</if>
<if test="item.community != null">community = #{item.community},</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.address != null">address = #{item.address},</if>
<if test="item.zyStatus != null">zy_status = #{item.zyStatus},</if>
<if test="item.arrangeDrivers != null">arrange_drivers = #{item.arrangeDrivers},</if>
<if test="item.bzStreet != null">bz_street = #{item.bzStreet},</if>
<if test="item.bzAddress != null">bz_address = #{item.bzAddress},</if>
<if test="item.status != null">status = #{item.status},</if>
<if test="item.delFlag != null">del_flag = #{item.delFlag},</if>
<if test="item.createBy != null">create_by = #{citem.reateBy},</if>
<if test="item.createTime != null">create_time = #{item.createTime},</if>
<if test="item.updateBy != null">update_by = #{item.updateBy},</if>
<if test="updateTime != null">update_time = #{item.updateTime},</if>
<if test="item.remark != null">remark = #{item.remark},</if>
</trim>
where card_no = #{item.cardNo}
</foreach>
</update>
<delete id="deleteJcglryById" parameterType="Long"> <delete id="deleteJcglryById" parameterType="Long">
delete from jcglry where id = #{id} delete from jcglry where id = #{id}
</delete> </delete>
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<if test="hasAcid != null and hasAcid != ''">and a.has_acid like concat('%', #{hasAcid}, '%')</if> <if test="hasAcid != null and hasAcid != ''">and a.has_acid like concat('%', #{hasAcid}, '%')</if>
<if test="status != null and status != ''">and a.status = #{status}</if> <if test="status != null and status != ''">and a.status = #{status}</if>
${params.dataScope} ${params.dataScope}
order by a.create_time desc order by a.is_handle desc,a.create_time desc
</select> </select>
<select id="selectYcsbById" parameterType="Long" resultMap="YcsbResult"> <select id="selectYcsbById" parameterType="Long" resultMap="YcsbResult">
......
...@@ -42,3 +42,11 @@ export function delJcglry(id) { ...@@ -42,3 +42,11 @@ export function delJcglry(id) {
method: 'delete' method: 'delete'
}) })
} }
// 查询隔离地点
export function getDictData(type) {
return request({
url: '/system/jcglry/glPlace',
method: 'get'
})
}
...@@ -52,6 +52,14 @@ export function importTemplate(params) { ...@@ -52,6 +52,14 @@ export function importTemplate(params) {
params params
}) })
} }
// 移动端新增
export function phoneAdd(data) {
return request({
url: '/system/ycsb/addMobile',
method: 'post',
data: data
})
}
// 导入抗原异常上报信息 // 导入抗原异常上报信息
export function importExcel(data) { export function importExcel(data) {
......
...@@ -36,11 +36,11 @@ ...@@ -36,11 +36,11 @@
<el-table-column label="混管异常数量" align="center" prop="abnormalMixingNum" :show-overflow-tooltip="true"/> <el-table-column label="混管异常数量" align="center" prop="abnormalMixingNum" :show-overflow-tooltip="true"/>
<el-table-column label="混管异常涉及人数" align="center" prop="abnormalMixingOfPipesNum" width="140" :show-overflow-tooltip="true"/> <el-table-column label="混管异常涉及人数" align="center" prop="abnormalMixingOfPipesNum" width="140" :show-overflow-tooltip="true"/>
<el-table-column label="阳性涉及小区数量" align="center" prop="PositiveAreaNum" width="130" :show-overflow-tooltip="true"/> <el-table-column label="阳性涉及小区数量" align="center" prop="PositiveAreaNum" width="130" :show-overflow-tooltip="true"/>
<el-table-column label="涉及单元楼数量" align="center" prop="unitBuildingInvolvedNum" :show-overflow-tooltip="true"/> <el-table-column label="涉及单元楼数量" align="center" prop="unitBuildingInvolvedNum" width="130" :show-overflow-tooltip="true"/>
<el-table-column label="小区封控数量" align="center" prop="cellBlockingControlNum" :show-overflow-tooltip="true"/> <el-table-column label="小区封控数量" align="center" prop="cellBlockingControlNum" :show-overflow-tooltip="true"/>
<el-table-column label="单元封控数量" align="center" prop="unitSealingControlNum" :show-overflow-tooltip="true"/> <el-table-column label="单元封控数量" align="center" prop="unitSealingControlNum" :show-overflow-tooltip="true"/>
<el-table-column label="解封单元数量" align="center" prop="unpackingUnitNum" :show-overflow-tooltip="true"/> <el-table-column label="解封单元数量" align="center" prop="unpackingUnitNum" :show-overflow-tooltip="true"/>
<el-table-column label="转运至方舱数量" align="center" prop="transferToShelterNum" :show-overflow-tooltip="true"/> <el-table-column label="转运至方舱数量" align="center" prop="transferToShelterNum" width="130" :show-overflow-tooltip="true"/>
<el-table-column label="转运至隔离点数量" align="center" prop="transferToIsolationPointNum" width="130" :show-overflow-tooltip="true"/> <el-table-column label="转运至隔离点数量" align="center" prop="transferToIsolationPointNum" width="130" :show-overflow-tooltip="true"/>
</el-table> </el-table>
</div> </div>
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<!-- </el-row>--> <!-- </el-row>-->
<!-- <el-row>--> <!-- <el-row>-->
<!-- <el-col :span="12">--> <!-- <el-col :span="12">-->
<el-form-item label="抗原结果" prop="AntigenResults"> <el-form-item label="抗原结果" prop="kyResult">
<el-radio-group v-model="form.AntigenResults"> <el-radio-group v-model="form.kyResult">
<el-radio :label="'0'">异常</el-radio> <el-radio :label="'0'">异常</el-radio>
<!-- <el-radio :label="'1'">正常</el-radio>--> <!-- <el-radio :label="'1'">正常</el-radio>-->
</el-radio-group> </el-radio-group>
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
<!-- </el-col>--> <!-- </el-col>-->
<!-- </el-row>--> <!-- </el-row>-->
</el-form> </el-form>
<div class="warn">如提交信息发生变更,请尽快联系属地街道/镇 或属地居委会。</div>
<div slot="footer" class="footer"> <div slot="footer" class="footer">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
</div> </div>
...@@ -155,7 +156,7 @@ ...@@ -155,7 +156,7 @@
<script> <script>
import moment from "moment"; import moment from "moment";
import { phoneAdd } from "@/api/system/ycsb";
export default { export default {
name: "kfInfoAdd", name: "kfInfoAdd",
data() { data() {
...@@ -407,7 +408,8 @@ name: "kfInfoAdd", ...@@ -407,7 +408,8 @@ name: "kfInfoAdd",
sbDate: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), sbDate: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
userName: null, userName: null,
cardNo: null, cardNo: null,
AntigenResults: '0', kyResult: '0',
isHandle: '1',
phone: null, phone: null,
area: '1', area: '1',
street: null, street: null,
...@@ -491,18 +493,26 @@ name: "kfInfoAdd", ...@@ -491,18 +493,26 @@ name: "kfInfoAdd",
}) })
}, },
submitForm() { submitForm() {
this.$confirm('是否确认提交?', '提示', { this.$refs["form"].validate(valid => {
confirmButtonText: '确定', if (valid) {
cancelButtonText: '取消', this.$confirm('是否确认提交?', '提示', {
type: 'info' confirmButtonText: '确定',
}).then(() => { cancelButtonText: '取消',
this.$message({ type: 'info'
type: 'success', }).then(() => {
message: '提交成功!' phoneAdd(this.form).then(res=>{
}); if(res.code === 200) {
this.reset() this.$message({
}).catch(() => { type: 'success',
message: '提交成功!'
});
this.reset()
}
})
}).catch(() => {
});
}
}); });
}, },
// 表单重置 // 表单重置
...@@ -511,7 +521,8 @@ name: "kfInfoAdd", ...@@ -511,7 +521,8 @@ name: "kfInfoAdd",
sbDate: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), sbDate: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
userName: null, userName: null,
cardNo: null, cardNo: null,
AntigenResults: '0', kyResult: '0',
isHandle: '1',
phone: null, phone: null,
area: '1', area: '1',
street: null, street: null,
...@@ -563,11 +574,18 @@ name: "kfInfoAdd", ...@@ -563,11 +574,18 @@ name: "kfInfoAdd",
width: 20px!important; width: 20px!important;
height: 20px!important; height: 20px!important;
} }
.warn{
padding: 30px 10px 20px 10px;
color: red;
font-size: 20px;
}
.footer{ .footer{
float: right; float: right;
padding-bottom: 20px; padding-bottom: 20px;
width: 100%; width: 100%;
::v-deep.el-button--medium{ ::v-deep.el-button--medium{
font-size: 20px!important;
height: 50px!important;
width: 100%!important; width: 100%!important;
border-radius: 24px!important; border-radius: 24px!important;
} }
......
...@@ -55,9 +55,9 @@ ...@@ -55,9 +55,9 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer"> <!-- <div class="el-login-footer">-->
<span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span> <!-- <span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span>-->
</div> <!-- </div>-->
</div> </div>
</template> </template>
......
...@@ -279,6 +279,11 @@ ...@@ -279,6 +279,11 @@
<dict-tag :options="dict.type.street_town" :value="scope.row.street"/> <dict-tag :options="dict.type.street_town" :value="scope.row.street"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="居委会" align="center" prop="committee" width="130" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.committee" :value="scope.row.committee"/>
</template>
</el-table-column>
<el-table-column label="小区/村名称" align="center" prop="communityName" width="120" :show-overflow-tooltip="true"/> <el-table-column label="小区/村名称" align="center" prop="communityName" width="120" :show-overflow-tooltip="true"/>
<el-table-column label="采集地点" align="center" prop="cjPlace" width="100" :show-overflow-tooltip="true" /> <el-table-column label="采集地点" align="center" prop="cjPlace" width="100" :show-overflow-tooltip="true" />
<el-table-column label="采集管号" align="center" prop="cjgh" width="140" :show-overflow-tooltip="true" /> <el-table-column label="采集管号" align="center" prop="cjgh" width="140" :show-overflow-tooltip="true" />
...@@ -649,20 +654,20 @@ import moment from 'moment' ...@@ -649,20 +654,20 @@ import moment from 'moment'
export default { export default {
name: "Hscj", name: "Hscj",
dicts: ['street_town', 'residential_area', 'sys_user_sex', 'sys_normal_disable'], dicts: ['street_town','committee', 'residential_area', 'sys_user_sex', 'sys_normal_disable'],
data() { data() {
return { return {
cjTimeOptions: { cjTimeOptions: {
disabledDate: time => { disabledDate: time => {
if (this.form.cjTime) { if (this.form.cjTime) {
return time.getTime() > new Date(this.form.cjTime).getTime() return time.getTime() > new Date().getTime()
} }
} }
}, },
jcTimeOptions: { jcTimeOptions: {
disabledDate: time => { disabledDate: time => {
if (this.form.jcTime) { if (this.form.jcTime) {
return time.getTime() > new Date(this.form.jcTime).getTime() return time.getTime() > new Date().getTime()
} }
} }
}, },
......
This diff is collapsed.
...@@ -161,12 +161,27 @@ ...@@ -161,12 +161,27 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" width="100" :show-overflow-tooltip="true" /> <el-table-column label="编号" align="center" prop="id" width="100" :show-overflow-tooltip="true" />
<el-table-column label="是否已处理" align="center" prop="isHandle" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.isHandle === '0' ? '已处理' : '未处理'}}</span>
</template>
</el-table-column>
<el-table-column label="日期" align="center" prop="sbDate" width="100" :show-overflow-tooltip="true"> <el-table-column label="日期" align="center" prop="sbDate" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.sbDate, '{m}-{d}') }}</span> <span>{{ parseTime(scope.row.sbDate, '{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="姓名" align="center" prop="userName" width="100" :show-overflow-tooltip="true" /> <el-table-column label="姓名" align="center" prop="userName" width="100" :show-overflow-tooltip="true" />
<el-table-column label="抗原结果" align="center" prop="kyResult" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.kyResult === '0' ? '异常' : '正常'}}</span>
</template>
</el-table-column>
<el-table-column label="是否做核酸" align="center" prop="hasAcid" width="120" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{scope.row.hasAcid === '0' ? '是' : scope.row.hasAcid === '1' ? '否' : '' }}</span>
</template>
</el-table-column>
<el-table-column label="身份证号码" align="center" prop="cardNo" width="180" :show-overflow-tooltip="true" /> <el-table-column label="身份证号码" align="center" prop="cardNo" width="180" :show-overflow-tooltip="true" />
<el-table-column label="联系方式" align="center" prop="phone" width="140" :show-overflow-tooltip="true" /> <el-table-column label="联系方式" align="center" prop="phone" width="140" :show-overflow-tooltip="true" />
<el-table-column label="居住地所在区" align="center" prop="area" width="100" :show-overflow-tooltip="true"> <el-table-column label="居住地所在区" align="center" prop="area" width="100" :show-overflow-tooltip="true">
...@@ -179,18 +194,16 @@ ...@@ -179,18 +194,16 @@
<dict-tag :options="dict.type.street_town" :value="scope.row.street"/> <dict-tag :options="dict.type.street_town" :value="scope.row.street"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="小区/村名称" align="center" prop="communityName" width="120" :show-overflow-tooltip="true" /> <el-table-column label="居委会" align="center" prop="committee" width="130" :show-overflow-tooltip="true">
<el-table-column label="单元号" align="center" prop="unit" />
<el-table-column label="是否做核酸" align="center" prop="hasAcid" width="120" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.hasAcid === '0' ? '是' : scope.row.hasAcid === '1' ? '否' : '' }}</span> <dict-tag :options="dict.type.committee" :value="scope.row.committee"/>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="状态" align="center" prop="status">--> <el-table-column label="小区/村名称" align="center" prop="communityName" width="120" :show-overflow-tooltip="true" />
<!-- <template slot-scope="scope">--> <el-table-column label="楼号" align="center" prop="building" width="100" :show-overflow-tooltip="true" />
<!-- <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>--> <el-table-column label="单元号" align="center" prop="unit" width="100" :show-overflow-tooltip="true" />
<!-- </template>--> <el-table-column label="门牌号" align="center" prop="house" width="100" :show-overflow-tooltip="true" />
<!-- </el-table-column>--> <el-table-column label="家庭现住址" align="center" prop="address" width="100" :show-overflow-tooltip="true" />
<el-table-column label="备注" align="center" prop="remark" width="120" :show-overflow-tooltip="true" /> <el-table-column label="备注" align="center" prop="remark" width="120" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160" :show-overflow-tooltip="true"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -456,13 +469,13 @@ import moment from 'moment' ...@@ -456,13 +469,13 @@ import moment from 'moment'
export default { export default {
name: "Ycsb", name: "Ycsb",
dicts: ['street_town', 'residential_area', 'sys_normal_disable'], dicts: ['street_town','committee', 'residential_area', 'sys_normal_disable'],
data() { data() {
return { return {
sbDateOptions: { sbDateOptions: {
disabledDate: time => { disabledDate: time => {
if (this.form.sbDate) { if (this.form.sbDate) {
return time.getTime() > new Date(this.form.sbDate).getTime() return time.getTime() > new Date().getTime()
} }
} }
}, },
......
...@@ -245,6 +245,11 @@ ...@@ -245,6 +245,11 @@
<dict-tag :options="dict.type.street_town" :value="scope.row.street"/> <dict-tag :options="dict.type.street_town" :value="scope.row.street"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="居委会" align="center" prop="committee" width="130" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.committee" :value="scope.row.committee"/>
</template>
</el-table-column>
<el-table-column label="小区/村名称" align="center" prop="communityName" width="120" :show-overflow-tooltip="true" /> <el-table-column label="小区/村名称" align="center" prop="communityName" width="120" :show-overflow-tooltip="true" />
<el-table-column label="楼号" align="center" prop="building" width="100" :show-overflow-tooltip="true" /> <el-table-column label="楼号" align="center" prop="building" width="100" :show-overflow-tooltip="true" />
<el-table-column label="单元号" align="center" prop="unit" width="100" :show-overflow-tooltip="true" /> <el-table-column label="单元号" align="center" prop="unit" width="100" :show-overflow-tooltip="true" />
...@@ -611,27 +616,27 @@ import moment from 'moment' ...@@ -611,27 +616,27 @@ import moment from 'moment'
export default { export default {
name: "Yxry", name: "Yxry",
dicts: ['isolation_status', 'street_town', 'residential_area', 'sys_normal_disable', 'control_status','yz_status'], dicts: ['isolation_status', 'street_town','committee', 'residential_area', 'sys_normal_disable', 'control_status','yz_status'],
data() { data() {
return { return {
sbDateOptions: { sbDateOptions: {
disabledDate: time => { disabledDate: time => {
if (this.form.sbDate) { if (this.form.sbDate) {
return time.getTime() > new Date(this.form.sbDate).getTime() return time.getTime() > new Date().getTime()
} }
} }
}, },
cyTimeOptions: { cyTimeOptions: {
disabledDate: time => { disabledDate: time => {
if (this.form.cyTime) { if (this.form.cyTime) {
return time.getTime() > new Date(this.form.cyTime).getTime() return time.getTime() > new Date().getTime()
} }
} }
}, },
zyTimeOptions: { zyTimeOptions: {
disabledDate: time => { disabledDate: time => {
if (this.form.zyTime) { if (this.form.zyTime) {
return time.getTime() > new Date(this.form.zyTime).getTime() return time.getTime() > new Date().getTime()
} }
} }
}, },
...@@ -1230,6 +1235,7 @@ export default { ...@@ -1230,6 +1235,7 @@ export default {
this.juSelect(response.data.committee) this.juSelect(response.data.committee)
} }
this.form = response.data; this.form = response.data;
this.getInfoByCard()
this.formLoading = false this.formLoading = false
}); });
}, },
...@@ -1247,10 +1253,24 @@ export default { ...@@ -1247,10 +1253,24 @@ export default {
this.juSelect(response.data.committee) this.juSelect(response.data.committee)
} }
this.form = response.data; this.form = response.data;
this.getInfoByCard()
this.title = "修改阳性人员"; this.title = "修改阳性人员";
this.formLoading = false this.formLoading = false
}); });
}, },
/** 修改查看的时候通过身份证号获取隔离地点的反显*/
getInfoByCard() {
const params = {
card: this.form.cardNo
}
cardGetInfo(params).then(response => {
if(response.code === 200) {
this.form.glPlace = response.data.glPlace
this.form.fcName = response.data.fcName
this.form.glName = response.data.glName
}
});
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
......
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