Commit af6fdcb0 authored by zhuangxinwei's avatar zhuangxinwei

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

# Conflicts:
#	ruoyi-ui/src/views/system/hscj/index.vue
#	ruoyi-ui/src/views/system/ycsb/index.vue
#	ruoyi-ui/src/views/system/yxry/index.vue
parents 56217928 2fc3418a
...@@ -3,6 +3,8 @@ package com.ruoyi.web.controller.system; ...@@ -3,6 +3,8 @@ package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.DataUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.Hscj; import com.ruoyi.system.domain.Hscj;
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;
...@@ -112,4 +114,19 @@ public class GldryController extends BaseController ...@@ -112,4 +114,19 @@ public class GldryController extends BaseController
{ {
return toAjax(gldryService.deleteGldryByIds(ids)); return toAjax(gldryService.deleteGldryByIds(ids));
} }
/**
* 根据当前登录人查询value值
* @param type
* @return
*/
@GetMapping("/selectValue")
public AjaxResult selectValue(String type) {
String value = "";
if ("isolation".equals(type)) //隔离点
value = DataUtils.getKey(null,null,null,null, String.valueOf(SecurityUtils.getUserId()));
else if ("shelters".equals(type)) //方舱
value = DataUtils.getKey(null,null,null,String.valueOf(SecurityUtils.getUserId()),null);
return AjaxResult.success(value);
}
} }
package com.ruoyi.common.utils;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import java.util.Iterator;
/**
* 数据工具类
*
* @author ruoyi
*/
public class DataUtils {
public static String dateMap = "{\"area\":{ \"1\":\"11\",\"2\":\"11\",\"3\":\"11\",\"4\":\"11\",\"5\":\"11\",\"6\":\"11\",\"7\":\"11\",\"8\":\"11\",\"9\":\"11\",\"10\":\"11\",\"11\":\"11\",\"12\":\"11\",\"13\":\"11\",\"14\":\"11\",\"15\":\"11\",\"16\":\"11\",\"17\":\"11\",\"18\":\"11\",\"19\":\"11\",\"20\":\"11\",\"21\":\"11\",\"22\":\"11\",\"23\":\"11\",\"24\":\"11\"}," +
"\"street\":{\"1\":\"11\",\"2\":\"11\", \"3\":\"11\", \"4\":\"11\",\"5\":\"11\", \"6\":\"11\", \"7\":\"11\", \"8\":\"11\", \"9\":\"11\", \"10\":\"11\", \"11\":\"11\"}," +
"\"community\":{\"1\":\"11\",\"2\":\"11\", \"3\":\"11\",\"4\":\"11\", \"5\":\"11\", \"6\":\"11\", \"7\":\"11\", \"8\":\"11\", \"9\":\"11\", \"10\":\"11\", \"11\":\"11\", \"12\":\"11\", \"13\":\"11\", \"14\":\"11\", \"15\":\"11\", \"16\":\"11\", \"17\":\"11\", \"18\":\"11\", \"19\":\"11\", \"20\":\"11\", \"21\":\"11\", \"22\":\"11\", \"23\":\"11\", \"24\":\"11\", \"25\":\"11\",\"26\":\"11\",\"27\":\"11\",\"28\":\"11\",\"29\":\"11\",\"30\":\"11\",\"31\":\"11\",\"32\":\"11\", \"33\":\"11\", \"34\":\"11\", \"35\":\"11\", \"36\":\"11\", \"37\":\"11\", \"38\":\"11\", \"39\":\"11\", \"40\":\"11\", \"41\":\"11\", \"42\":\"11\", \"43\":\"11\", \"44\":\"11\", \"45\":\"11\", \"46\":\"11\", \"47\":\"11\", \"48\":\"11\"}," +
"\"shelters\":{\"1\":\"11\",\"2\":\"11\", \"3\":\"11\", \"4\":\"11\",\"5\":\"11\", \"6\":\"11\", \"7\":\"11\", \"8\":\"11\", \"9\":\"11\", \"10\":\"11\"}," +
"\"isolation \":{\"1\":\"11\",\"2\":\"11\", \"3\":\"11\", \"4\":\"11\",\"5\":\"11\", \"6\":\"11\", \"7\":\"11\", \"8\":\"11\"}}";
public static String getValue(String area, String street, String community) {
JSONObject map = JSON.parseObject(dateMap);
if (StringUtils.isNotEmpty(community)) {
JSONObject com = map.getJSONObject("community");
return String.valueOf(com.get(community));
} else if (StringUtils.isNotEmpty(street)) {
JSONObject s = map.getJSONObject("street");
return String.valueOf(s.get(street));
} else if (StringUtils.isNotEmpty(area)) {
JSONObject a = map.getJSONObject("area");
return String.valueOf(a.get(area));
} else
return "null";
}
public static String getKey(String area, String street, String community, String shelters, String isolation) {
JSONObject map = JSON.parseObject(dateMap);
if (StringUtils.isNotEmpty(community)) {
JSONObject com = map.getJSONObject("community");
return getKey(com,community);
} else if (StringUtils.isNotEmpty(street)) {
JSONObject s = map.getJSONObject("street");
return getKey(s,street);
} else if (StringUtils.isNotEmpty(area)) {
JSONObject a = map.getJSONObject("area");
return getKey(a,area);
} else if (StringUtils.isNotEmpty(shelters)) {
JSONObject a = map.getJSONObject("shelters");
return getKey(a,shelters);
} else if (StringUtils.isNotEmpty(isolation)) {
JSONObject a = map.getJSONObject("isolation");
return getKey(a,isolation);
} else
return "null";
}
public static String getKey(JSONObject jsonObject, String value) {
String keyValue = "";
Iterator<String> keys = jsonObject.keySet().iterator();// jsonObject.keys();
while (keys.hasNext()) {
String key = keys.next();
if (((String) jsonObject.get(key)).equals(value)) {
keyValue = key.toString();
break;
}
}
return keyValue;
}
}
...@@ -29,6 +29,9 @@ public class Fkqk extends BaseEntity ...@@ -29,6 +29,9 @@ public class Fkqk extends BaseEntity
@Excel(name = "街道/镇名称") @Excel(name = "街道/镇名称")
private String street; private String street;
// @Excel(name = "居委会")
private String committee;
/** 楼号 */ /** 楼号 */
@Excel(name = "楼号") @Excel(name = "楼号")
private String floor; private String floor;
...@@ -251,4 +254,12 @@ public class Fkqk extends BaseEntity ...@@ -251,4 +254,12 @@ public class Fkqk extends BaseEntity
.append("floor", getFloor()) .append("floor", getFloor())
.toString(); .toString();
} }
public String getCommittee() {
return committee;
}
public void setCommittee(String committee) {
this.committee = committee;
}
} }
...@@ -36,6 +36,9 @@ public class Gldry extends BaseEntity ...@@ -36,6 +36,9 @@ public class Gldry extends BaseEntity
@Excel(name = "身份证号码") @Excel(name = "身份证号码")
private String cardNo; private String cardNo;
/** 身份证号码校验 */
private String checkCard;
/** 联系方式 */ /** 联系方式 */
@Excel(name = "联系方式") @Excel(name = "联系方式")
private String phone; private String phone;
...@@ -86,6 +89,10 @@ public class Gldry extends BaseEntity ...@@ -86,6 +89,10 @@ public class Gldry extends BaseEntity
@Excel(name = "门牌号") @Excel(name = "门牌号")
private String houseNo; private String houseNo;
/** 居委会 */
// 新增字段
private String committee;
/** 转入时间 */ /** 转入时间 */
@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")
...@@ -102,7 +109,7 @@ public class Gldry extends BaseEntity ...@@ -102,7 +109,7 @@ public class Gldry extends BaseEntity
private String remark; private String remark;
/** 状态(0正常 1停用) */ /** 状态(0正常 1停用) */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用") // @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status; private String status;
/** 删除标志(0代表存在 2代表删除) */ /** 删除标志(0代表存在 2代表删除) */
...@@ -291,4 +298,20 @@ public class Gldry extends BaseEntity ...@@ -291,4 +298,20 @@ public class Gldry extends BaseEntity
.append("remark", getRemark()) .append("remark", getRemark())
.toString(); .toString();
} }
public String getCheckCard() {
return checkCard;
}
public void setCheckCard(String checkCard) {
this.checkCard = checkCard;
}
public String getCommittee() {
return committee;
}
public void setCommittee(String committee) {
this.committee = committee;
}
} }
...@@ -20,10 +20,6 @@ public class Hscj extends BaseEntity ...@@ -20,10 +20,6 @@ public class Hscj extends BaseEntity
/** 主键 */ /** 主键 */
private Long id; private Long id;
/** 序号 */
@Excel(name = "序号")
private String xh;
/** 省 */ /** 省 */
// 新增字段 // 新增字段
@Excel(name = "省") @Excel(name = "省")
...@@ -100,7 +96,7 @@ public class Hscj extends BaseEntity ...@@ -100,7 +96,7 @@ public class Hscj extends BaseEntity
/** 标本类型 */ /** 标本类型 */
@Excel(name = "标本类型") @Excel(name = "标本类型")
private String bType; private String bblx;
/** 接收实验室 */ /** 接收实验室 */
@Excel(name = "接收实验室") @Excel(name = "接收实验室")
...@@ -125,8 +121,12 @@ public class Hscj extends BaseEntity ...@@ -125,8 +121,12 @@ public class Hscj extends BaseEntity
@Excel(name = "备注") @Excel(name = "备注")
private String remake; private String remake;
// 新增字段
@Excel(name = "居委会")
private String committee;
/** 状态(0正常 1停用) */ /** 状态(0正常 1停用) */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用") // @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status; private String status;
/** 删除标志(0代表存在 2代表删除) */ /** 删除标志(0代表存在 2代表删除) */
...@@ -165,15 +165,7 @@ public class Hscj extends BaseEntity ...@@ -165,15 +165,7 @@ public class Hscj extends BaseEntity
{ {
return id; return id;
} }
public void setXh(String xh)
{
this.xh = xh;
}
public String getXh()
{
return xh;
}
public void setCity(String city) public void setCity(String city)
{ {
this.city = city; this.city = city;
...@@ -318,15 +310,7 @@ public class Hscj extends BaseEntity ...@@ -318,15 +310,7 @@ public class Hscj extends BaseEntity
{ {
return cjPhone; return cjPhone;
} }
public void setBType(String BType)
{
this.bType = BType;
}
public String getBType()
{
return bType;
}
public void setLaboratory(String laboratory) public void setLaboratory(String laboratory)
{ {
this.laboratory = laboratory; this.laboratory = laboratory;
...@@ -382,11 +366,26 @@ public class Hscj extends BaseEntity ...@@ -382,11 +366,26 @@ public class Hscj extends BaseEntity
return delFlag; return delFlag;
} }
public String getBblx() {
return bblx;
}
public void setBblx(String bblx) {
this.bblx = bblx;
}
public String getCommittee() {
return committee;
}
public void setCommittee(String committee) {
this.committee = committee;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("xh", getXh())
.append("city", getCity()) .append("city", getCity())
.append("area", getArea()) .append("area", getArea())
.append("street", getStreet()) .append("street", getStreet())
...@@ -403,7 +402,7 @@ public class Hscj extends BaseEntity ...@@ -403,7 +402,7 @@ public class Hscj extends BaseEntity
.append("cjTime", getCjTime()) .append("cjTime", getCjTime())
.append("cjName", getCjName()) .append("cjName", getCjName())
.append("cjPhone", getCjPhone()) .append("cjPhone", getCjPhone())
.append("bType", getBType()) .append("bblx", getBblx())
.append("laboratory", getLaboratory()) .append("laboratory", getLaboratory())
.append("jcTime", getJcTime()) .append("jcTime", getJcTime())
.append("rygx", getRygx()) .append("rygx", getRygx())
......
...@@ -22,7 +22,7 @@ public class Ycsb extends BaseEntity ...@@ -22,7 +22,7 @@ public class Ycsb extends BaseEntity
/** 日期 */ /** 日期 */
@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")
private Date sbDate; private Date sbDate;
/** 姓名 */ /** 姓名 */
...@@ -30,40 +30,60 @@ public class Ycsb extends BaseEntity ...@@ -30,40 +30,60 @@ public class Ycsb extends BaseEntity
private String userName; private String userName;
/** 身份证号码 */ /** 身份证号码 */
@Excel(name = "身份证号") @Excel(name = "身份证号")
private String cardNo; private String cardNo;
/** 联系方式 */ /** 联系方式 */
@Excel(name = "联系方式") @Excel(name = "联系电话")
private String phone; private String phone;
/** 联系方式 */
@Excel(name = "家庭现住址")
private String address;
/** 居住地所在区 */ /** 居住地所在区 */
@Excel(name = "居住地所在区") // @Excel(name = "居住地所在区")
private String area; private String area;
/** 街道/镇 */ /** 街道/镇 */
@Excel(name = "街道/镇") @Excel(name = "单位")
private String street; private String street;
// 新增字段
@Excel(name = "居委会")
private String committee;
/** 小区/村名称 */ /** 小区/村名称 */
@Excel(name = "小区/村名称") @Excel(name = "小区")
private String community; private String community;
/** 楼号单元号门牌号 */ /** 楼号单元号门牌号 */
@Excel(name = "楼号单元号门牌号") @Excel(name = "楼号")
private String building;
/** 楼号单元号门牌号 */
@Excel(name = "单元号")
private String unit; private String unit;
/** 楼号单元号门牌号 */
@Excel(name = "门牌号")
private String house;
/** 是否做核酸 */ /** 是否做核酸 */
@Excel(name = "是否做核酸") // @Excel(name = "是否做核酸")
private String hasAcid; private String hasAcid;
/** 状态(0正常 1停用) */ /** 状态(0正常 1停用) */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用") // @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status; private String status;
/** 删除标志(0代表存在 2代表删除) */ /** 删除标志(0代表存在 2代表删除) */
private String delFlag; private String delFlag;
/** 备注 */
@Excel(name = "备注")
private String remark;
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
...@@ -173,6 +193,14 @@ public class Ycsb extends BaseEntity ...@@ -173,6 +193,14 @@ public class Ycsb extends BaseEntity
return delFlag; return delFlag;
} }
public String getCommittee() {
return committee;
}
public void setCommittee(String committee) {
this.committee = committee;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
...@@ -195,4 +223,38 @@ public class Ycsb extends BaseEntity ...@@ -195,4 +223,38 @@ public class Ycsb extends BaseEntity
.append("remark", getRemark()) .append("remark", getRemark())
.toString(); .toString();
} }
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getBuilding() {
return building;
}
public void setBuilding(String building) {
this.building = building;
}
public String getHouse() {
return house;
}
public void setHouse(String house) {
this.house = house;
}
@Override
public String getRemark() {
return remark;
}
@Override
public void setRemark(String remark) {
this.remark = remark;
}
} }
...@@ -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.Gldry; import com.ruoyi.system.domain.Gldry;
import org.apache.ibatis.annotations.Param;
/** /**
* 隔离点人员Mapper接口 * 隔离点人员Mapper接口
...@@ -58,4 +59,12 @@ public interface GldryMapper ...@@ -58,4 +59,12 @@ public interface GldryMapper
* @return 结果 * @return 结果
*/ */
public int deleteGldryByIds(Long[] ids); public int deleteGldryByIds(Long[] ids);
/**
* 根据身份证验重
* @param cardNo
* @param id
* @return
*/
List<Gldry> selectGldryByCard(@Param("cardNo") String cardNo, @Param("id") Long id);
} }
...@@ -65,6 +65,15 @@ public class GldryServiceImpl implements IGldryService ...@@ -65,6 +65,15 @@ public class GldryServiceImpl implements IGldryService
@Override @Override
public int insertGldry(Gldry gldry) public int insertGldry(Gldry gldry)
{ {
if (CheckUtils.checkCard(gldry.getCardNo()))
gldry.setCheckCard("正确");
else
throw new ServiceException("身份证格式不正确");
if (!CheckUtils.checkPhone(gldry.getPhone()))
throw new ServiceException("联系方式格式不正确");
List<Gldry>list = gldryMapper.selectGldryByCard(gldry.getCardNo(),null);
if (!list.isEmpty())
throw new ServiceException("该身份证号已存在");
gldry.setCreateBy(String.valueOf(SecurityUtils.getUserId())); gldry.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
gldry.setCreateTime(DateUtils.getNowDate()); gldry.setCreateTime(DateUtils.getNowDate());
return gldryMapper.insertGldry(gldry); return gldryMapper.insertGldry(gldry);
...@@ -79,6 +88,15 @@ public class GldryServiceImpl implements IGldryService ...@@ -79,6 +88,15 @@ public class GldryServiceImpl implements IGldryService
@Override @Override
public int updateGldry(Gldry gldry) public int updateGldry(Gldry gldry)
{ {
if (CheckUtils.checkCard(gldry.getCardNo()))
gldry.setCheckCard("正确");
else
throw new ServiceException("身份证格式不正确");
if (!CheckUtils.checkPhone(gldry.getPhone()))
throw new ServiceException("联系方式格式不正确");
List<Gldry>list = gldryMapper.selectGldryByCard(gldry.getCardNo(),gldry.getId());
if (!list.isEmpty())
throw new ServiceException("该身份证号已存在");
gldry.setUpdateTime(DateUtils.getNowDate()); gldry.setUpdateTime(DateUtils.getNowDate());
return gldryMapper.updateGldry(gldry); return gldryMapper.updateGldry(gldry);
} }
......
...@@ -6,6 +6,7 @@ import java.util.List; ...@@ -6,6 +6,7 @@ import java.util.List;
import com.ruoyi.common.core.domain.entity.SysDictData; 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.CheckUtils;
import com.ruoyi.common.utils.DataUtils;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
...@@ -28,8 +29,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -28,8 +29,7 @@ import javax.servlet.http.HttpServletResponse;
* @date 2022-11-28 * @date 2022-11-28
*/ */
@Service @Service
public class HscjServiceImpl implements IHscjService public class HscjServiceImpl implements IHscjService {
{
@Autowired @Autowired
private HscjMapper hscjMapper; private HscjMapper hscjMapper;
@Autowired @Autowired
...@@ -42,8 +42,7 @@ public class HscjServiceImpl implements IHscjService ...@@ -42,8 +42,7 @@ public class HscjServiceImpl implements IHscjService
* @return 核酸采集 * @return 核酸采集
*/ */
@Override @Override
public Hscj selectHscjById(Long id) public Hscj selectHscjById(Long id) {
{
return hscjMapper.selectHscjById(id); return hscjMapper.selectHscjById(id);
} }
...@@ -55,8 +54,7 @@ public class HscjServiceImpl implements IHscjService ...@@ -55,8 +54,7 @@ public class HscjServiceImpl implements IHscjService
*/ */
@Override @Override
@DataScope(deptAlias = "d", userAlias = "u") @DataScope(deptAlias = "d", userAlias = "u")
public List<Hscj> selectHscjList(Hscj hscj) public List<Hscj> selectHscjList(Hscj hscj) {
{
return hscjMapper.selectHscjList(hscj); return hscjMapper.selectHscjList(hscj);
} }
...@@ -67,9 +65,11 @@ public class HscjServiceImpl implements IHscjService ...@@ -67,9 +65,11 @@ public class HscjServiceImpl implements IHscjService
* @return 结果 * @return 结果
*/ */
@Override @Override
public int insertHscj(Hscj hscj) public int insertHscj(Hscj hscj) {
{ String createBy = DataUtils.getValue(hscj.getArea(), hscj.getStreet(), hscj.getCommunity());
hscj.setCreateBy(String.valueOf(SecurityUtils.getUserId())); if(createBy.equals("null"))
throw new ServiceException("所选居住地、街道、社区不存在");
hscj.setCreateBy(createBy);
hscj.setCreateTime(DateUtils.getNowDate()); hscj.setCreateTime(DateUtils.getNowDate());
return hscjMapper.insertHscj(hscj); return hscjMapper.insertHscj(hscj);
} }
...@@ -81,8 +81,11 @@ public class HscjServiceImpl implements IHscjService ...@@ -81,8 +81,11 @@ public class HscjServiceImpl implements IHscjService
* @return 结果 * @return 结果
*/ */
@Override @Override
public int updateHscj(Hscj hscj) public int updateHscj(Hscj hscj) {
{ String createBy = DataUtils.getValue(hscj.getArea(), hscj.getStreet(), hscj.getCommunity());
if(createBy.equals("null"))
throw new ServiceException("所选居住地、街道、社区不存在");
hscj.setCreateBy(createBy);
hscj.setUpdateTime(DateUtils.getNowDate()); hscj.setUpdateTime(DateUtils.getNowDate());
return hscjMapper.updateHscj(hscj); return hscjMapper.updateHscj(hscj);
} }
...@@ -94,8 +97,7 @@ public class HscjServiceImpl implements IHscjService ...@@ -94,8 +97,7 @@ public class HscjServiceImpl implements IHscjService
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteHscjByIds(Long[] ids) public int deleteHscjByIds(Long[] ids) {
{
return hscjMapper.deleteHscjByIds(ids); return hscjMapper.deleteHscjByIds(ids);
} }
...@@ -106,28 +108,26 @@ public class HscjServiceImpl implements IHscjService ...@@ -106,28 +108,26 @@ public class HscjServiceImpl implements IHscjService
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteHscjById(Long id) public int deleteHscjById(Long id) {
{
return hscjMapper.deleteHscjById(id); return hscjMapper.deleteHscjById(id);
} }
@Override @Override
public void importList(List<Hscj> list, HttpServletResponse response){ public void importList(List<Hscj> list, HttpServletResponse response) {
if (StringUtils.isNull(list) || list.size() == 0) if (StringUtils.isNull(list) || list.size() == 0) {
{
throw new ServiceException("导入数据不能为空!"); throw new ServiceException("导入数据不能为空!");
} }
List<Hscj> trueList = new ArrayList<>(); List<Hscj> trueList = new ArrayList<>();
List<Hscj> failureList = new ArrayList<>(); List<Hscj> failureList = new ArrayList<>();
for (Hscj hscj:list){ for (Hscj hscj : list) {
if (StringUtils.isEmpty(hscj.getProvince())){ if (StringUtils.isEmpty(hscj.getProvince())) {
hscj.setProvince("河北省"); hscj.setProvince("河北省");
} }
if (StringUtils.isEmpty(hscj.getCity())){ if (StringUtils.isEmpty(hscj.getCity())) {
hscj.setCity("石家庄市"); hscj.setCity("石家庄市");
} }
if (StringUtils.isEmpty(hscj.getRygx())){ if (StringUtils.isEmpty(hscj.getRygx())) {
hscj.setRygx("本人"); hscj.setRygx("本人");
} }
if (StringUtils.isNotEmpty(hscj.getCardNo()) if (StringUtils.isNotEmpty(hscj.getCardNo())
...@@ -142,53 +142,53 @@ public class HscjServiceImpl implements IHscjService ...@@ -142,53 +142,53 @@ public class HscjServiceImpl implements IHscjService
&& StringUtils.isNotEmpty(hscj.getCjTime().toString()) && StringUtils.isNotEmpty(hscj.getCjTime().toString())
&& StringUtils.isNotEmpty(hscj.getCjName()) && StringUtils.isNotEmpty(hscj.getCjName())
&& StringUtils.isNotEmpty(hscj.getCjPhone()) && StringUtils.isNotEmpty(hscj.getCjPhone())
&& StringUtils.isNotEmpty(hscj.getBType()) && StringUtils.isNotEmpty(hscj.getBblx())
){ ) {
Hscj hscjQuerry = new Hscj(); Hscj hscjQuerry = new Hscj();
hscjQuerry.setCardNo(hscj.getCardNo()); hscjQuerry.setCardNo(hscj.getCardNo());
List<Hscj> hscjs = hscjMapper.selectHscjList(hscjQuerry); List<Hscj> hscjs = hscjMapper.selectHscjList(hscjQuerry);
if (!hscjs.isEmpty()){ if (!hscjs.isEmpty()) {
failureList.add(hscj); failureList.add(hscj);
}else { } else {
if (StringUtils.isNotEmpty(hscj.getStreet())){ if (StringUtils.isNotEmpty(hscj.getStreet())) {
List<SysDictData> dictDataList = sysDictDataMapper.selectDictDataByType("street_town"); List<SysDictData> dictDataList = sysDictDataMapper.selectDictDataByType("street_town");
String street = hscj.getStreet(); String street = hscj.getStreet();
for (SysDictData sysDictData:dictDataList){ for (SysDictData sysDictData : dictDataList) {
if (sysDictData.getDictLabel().equals(street)){ if (sysDictData.getDictLabel().equals(street)) {
street = sysDictData.getDictValue(); street = sysDictData.getDictValue();
} }
} }
hscj.setStreet(street); hscj.setStreet(street);
} }
if (CheckUtils.checkCard(hscj.getCardNo())){ if (CheckUtils.checkCard(hscj.getCardNo())) {
if (hscj.getSex().equals("女")){ if (hscj.getSex().equals("女")) {
hscj.setSex("1"); hscj.setSex("1");
trueList.add(hscj); trueList.add(hscj);
} }
if (hscj.getSex().equals("男")){ if (hscj.getSex().equals("男")) {
hscj.setSex("0"); hscj.setSex("0");
trueList.add(hscj); trueList.add(hscj);
}else { } else {
failureList.add(hscj); failureList.add(hscj);
} }
}else { } else {
failureList.add(hscj); failureList.add(hscj);
} }
} }
}else { } else {
failureList.add(hscj); failureList.add(hscj);
} }
} }
if (!trueList.isEmpty()){ if (!trueList.isEmpty()) {
for (Hscj hscj:trueList){ for (Hscj hscj : trueList) {
hscj.setCreateBy(String.valueOf(SecurityUtils.getUserId())); hscj.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
hscj.setCreateTime(DateUtils.getNowDate()); hscj.setCreateTime(DateUtils.getNowDate());
hscjMapper.insertHscj(hscj); hscjMapper.insertHscj(hscj);
} }
} }
if (!failureList.isEmpty()){ if (!failureList.isEmpty()) {
ExcelUtil<Hscj> util = new ExcelUtil<Hscj>(Hscj.class); ExcelUtil<Hscj> util = new ExcelUtil<Hscj>(Hscj.class);
util.exportExcel(response,failureList,"核算采集错误数据"); util.exportExcel(response, failureList, "核算采集错误数据");
} }
} }
} }
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DataUtils;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -56,7 +59,10 @@ public class YcsbServiceImpl implements IYcsbService ...@@ -56,7 +59,10 @@ public class YcsbServiceImpl implements IYcsbService
@Override @Override
public int insertYcsb(Ycsb ycsb) public int insertYcsb(Ycsb ycsb)
{ {
ycsb.setCreateBy(String.valueOf(SecurityUtils.getUserId())); String createBy = DataUtils.getValue(ycsb.getArea(), ycsb.getStreet(), ycsb.getCommunity());
if(createBy.equals("null"))
throw new ServiceException("所选居住地、街道、社区不存在");
ycsb.setCreateBy(createBy);
ycsb.setCreateTime(DateUtils.getNowDate()); ycsb.setCreateTime(DateUtils.getNowDate());
return ycsbMapper.insertYcsb(ycsb); return ycsbMapper.insertYcsb(ycsb);
} }
...@@ -70,6 +76,10 @@ public class YcsbServiceImpl implements IYcsbService ...@@ -70,6 +76,10 @@ public class YcsbServiceImpl implements IYcsbService
@Override @Override
public int updateYcsb(Ycsb ycsb) public int updateYcsb(Ycsb ycsb)
{ {
String createBy = DataUtils.getValue(ycsb.getArea(), ycsb.getStreet(), ycsb.getCommunity());
if(createBy.equals("null"))
throw new ServiceException("所选居住地、街道、社区不存在");
ycsb.setCreateBy(createBy);
ycsb.setUpdateTime(DateUtils.getNowDate()); ycsb.setUpdateTime(DateUtils.getNowDate());
return ycsbMapper.updateYcsb(ycsb); return ycsbMapper.updateYcsb(ycsb);
} }
......
...@@ -6,9 +6,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -6,9 +6,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="Fkqk" id="FkqkResult"> <resultMap type="Fkqk" id="FkqkResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="area" column="area" />
<result property="street" column="street" /> <result property="street" column="street" />
<result property="community" column="community" /> <result property="community" column="community" />
<result property="unit" column="unit" /> <result property="unit" column="unit" />
<result property="committee" column="committee" />
<result property="floor" column="floor" />
<result property="fkDetailed" column="fk_detailed" />
<result property="fkHs" column="fk_hs" />
<result property="fkRs" column="fk_rs" />
<result property="isJf" column="is_jf" />
<result property="realTime" column="real_time" />
<result property="hsTime" column="hs_time" />
<result property="fkTime" column="fk_time" /> <result property="fkTime" column="fk_time" />
<result property="jfTime" column="jf_time" /> <result property="jfTime" column="jf_time" />
<result property="status" column="status" /> <result property="status" column="status" />
...@@ -21,11 +30,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -21,11 +30,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectFkqkVo"> <sql id="selectFkqkVo">
select id, street, community, unit, fk_time, jf_time, status, create_by, create_time, update_by, update_time, del_flag, remark from fkqk select id, area,street, community, unit, fk_time, jf_time, status, create_by, create_time, update_by, update_time, del_flag, remark,
committee,floor,fk_detailed,fk_hs,fk_rs,is_jf,real_time,hs_time from fkqk
</sql> </sql>
<select id="selectFkqkList" parameterType="Fkqk" resultMap="FkqkResult"> <select id="selectFkqkList" parameterType="Fkqk" resultMap="FkqkResult">
select a.id, a.street, a.community, a.unit, a.fk_time, a.jf_time, a.status, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark from fkqk a select a.id,a.area, a.street, a.community, a.unit, a.fk_time, a.jf_time, a.status, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark
a.committee,a.floor,a.fk_detailed,a.fk_hs,a.fk_rs,a.is_jf,a.real_time,a.hs_time
from fkqk 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
...@@ -72,6 +84,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -72,6 +84,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="delFlag != null">del_flag,</if> <if test="delFlag != null">del_flag,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="area != null">area,</if>
<if test="committee != null">committee,</if>
<if test="floor != null">floor,</if>
<if test="fkDetailed != null">fk_detailed,</if>
<if test="fkHs != null">fk_hs,</if>
<if test="fkRs != null">fk_rs,</if>
<if test="isJf != null">is_jf,</if>
<if test="realTime != null">real_time,</if>
<if test="hsTime != null">hs_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="street != null">#{street},</if> <if test="street != null">#{street},</if>
...@@ -86,6 +107,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -86,6 +107,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null">#{delFlag},</if> <if test="delFlag != null">#{delFlag},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="area != null">#{area},</if>
<if test="committee != null">#{committee},</if>
<if test="floor != null">#{floor},</if>
<if test="fkDetailed != null">#{fkDetailed},</if>
<if test="fkHs != null">#{fkHs},</if>
<if test="fkRs != null">#{fkRs},</if>
<if test="isJf != null">#{isJf},</if>
<if test="realTime != null">#{realTime},</if>
<if test="hsTime != null">#{hsTime},</if>
</trim> </trim>
</insert> </insert>
<insert id="insertBatchFkqk" parameterType="Fkqk"> <insert id="insertBatchFkqk" parameterType="Fkqk">
...@@ -111,6 +141,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -111,6 +141,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if> <if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="area != null">area = #{area},</if>
<if test="committee != null">committee = #{committee},</if>
<if test="floor != null">floor = #{floor},</if>
<if test="fkDetailed != null">fk_detailed = #{fkDetailed},</if>
<if test="fkHs != null">fk_hs = #{fkHs},</if>
<if test="isJf != null">is_jf = #{isJf},</if>
<if test="realTime != null">real_time = #{realTime},</if>
<if test="hsTime != null">hs_time = #{hsTime},</if>
<if test="fkRs != null">fk_rs = #{fkRs},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
......
...@@ -28,14 +28,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -28,14 +28,21 @@ 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="committee" column="committee" />
<result property="checkCard" column="check_card" />
</resultMap> </resultMap>
<sql id="selectGldryVo"> <sql id="selectGldryVo">
select id, gl_place, room, jz_name, card_no, phone, area, street, community, unit, zr_time, zc_time, status, del_flag, create_by, create_time, update_by, update_time, remark from gldry select id, gl_place, room, jz_name, card_no, phone, area, street, community, unit, zr_time, zc_time, status,
del_flag, create_by, create_time, update_by, update_time, remark, is_yx, building_no, house_no, unit_no,
committee,check_card from gldry
</sql> </sql>
<select id="selectGldryList" parameterType="Gldry" resultMap="GldryResult"> <select id="selectGldryList" parameterType="Gldry" resultMap="GldryResult">
select a.id, a.gl_place, a.room, a.jz_name, a.card_no, a.phone, a.area, a.street, a.community, a.unit, a.zr_time, a.zc_time, a.status, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark from gldry a select a.id, a.gl_place, a.room, a.jz_name, a.card_no, a.phone, a.area, a.street, a.community, a.unit, a.zr_time,
a.zc_time, a.status, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark ,
a.is_yx,a.building_no,a.house_no,a.unit_no,a.committee,a.check_card
from gldry 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
...@@ -59,6 +66,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -59,6 +66,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</select> </select>
<select id="selectGldryByCard" resultType="com.ruoyi.system.domain.Gldry">
<include refid="selectGldryVo"/>
where card_no = #{cardNo}
<if test="id != null">and id != #{id}</if>
</select>
<insert id="insertGldry" parameterType="Gldry" useGeneratedKeys="true" keyProperty="id"> <insert id="insertGldry" parameterType="Gldry" useGeneratedKeys="true" keyProperty="id">
insert into gldry insert into gldry
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -84,6 +97,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -84,6 +97,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="committee != null">committee,</if>
<if test="checkCard != null">check_card,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="glPlace != null">#{glPlace},</if> <if test="glPlace != null">#{glPlace},</if>
...@@ -108,6 +123,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -108,6 +123,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="committee != null">#{committee},</if>
<if test="checkCard != null">#{checkCard},</if>
</trim> </trim>
</insert> </insert>
...@@ -118,11 +135,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -118,11 +135,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="room != null">room = #{room},</if> <if test="room != null">room = #{room},</if>
<if test="jzName != null">jz_name = #{jzName},</if> <if test="jzName != null">jz_name = #{jzName},</if>
<if test="cardNo != null">card_no = #{cardNo},</if> <if test="cardNo != null">card_no = #{cardNo},</if>
<if test="isYx != null">is_yx = #{isYx},</if>
<if test="phone != null">phone = #{phone},</if> <if test="phone != null">phone = #{phone},</if>
<if test="area != null">area = #{area},</if> <if test="area != null">area = #{area},</if>
<if test="street != null">street = #{street},</if> <if test="street != null">street = #{street},</if>
<if test="community != null">community = #{community},</if> <if test="community != null">community = #{community},</if>
<if test="unit != null">unit = #{unit},</if> <if test="unit != null">unit = #{unit},</if>
<if test="buildingNo != null">building_no = #{buildingNo},</if>
<if test="unitNo != null">unit_no = #{unitNo},</if>
<if test="houseNo != null">house_no = #{houseNo},</if>
<if test="zrTime != null">zr_time = #{zrTime},</if> <if test="zrTime != null">zr_time = #{zrTime},</if>
<if test="zcTime != null">zc_time = #{zcTime},</if> <if test="zcTime != null">zc_time = #{zcTime},</if>
<if test="status != null">status = #{status},</if> <if test="status != null">status = #{status},</if>
...@@ -132,6 +153,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -132,6 +153,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="checkCard != null">check_card = #{checkCard},</if>
<if test="committee != null">committee = #{committee},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
......
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.HscjMapper"> <mapper namespace="com.ruoyi.system.mapper.HscjMapper">
<resultMap type="Hscj" id="HscjResult"> <resultMap type="Hscj" id="HscjResult">
<result property="id" column="id" /> <result property="id" column="id"/>
<result property="xh" column="xh" /> <result property="province" column="province"/>
<result property="province" column="province" /> <result property="city" column="city"/>
<result property="city" column="city" /> <result property="area" column="area"/>
<result property="area" column="area" /> <result property="street" column="street"/>
<result property="street" column="street" /> <result property="community" column="community"/>
<result property="community" column="community" /> <result property="cjPlace" column="cj_place"/>
<result property="cjPlace" column="cj_place" /> <result property="cjgh" column="cjgh"/>
<result property="cjgh" column="cjgh" /> <result property="userName" column="user_name"/>
<result property="userName" column="user_name" /> <result property="cardNo" column="card_no"/>
<result property="cardNo" column="card_no" /> <result property="phone" column="phone"/>
<result property="phone" column="phone" /> <result property="sex" column="sex"/>
<result property="sex" column="sex" /> <result property="address" column="address"/>
<result property="address" column="address" /> <result property="age" column="age"/>
<result property="age" column="age" /> <result property="category" column="category"/>
<result property="category" column="category" /> <result property="cjTime" column="cj_time"/>
<result property="cjTime" column="cj_time" /> <result property="cjName" column="cj_name"/>
<result property="cjName" column="cj_name" /> <result property="cjPhone" column="cj_phone"/>
<result property="cjPhone" column="cj_phone" /> <result property="bblx" column="b_type"/>
<result property="bType" column="b_type" /> <result property="laboratory" column="laboratory"/>
<result property="laboratory" column="laboratory" /> <result property="jcTime" column="jc_time"/>
<result property="jcTime" column="jc_time" /> <result property="cjResult" column="cj_Result"/>
<result property="cjResult" column="cj_Result" /> <result property="rygx" column="rygx"/>
<result property="rygx" column="rygx" /> <result property="boxhao" column="boxhao"/>
<result property="boxhao" column="boxhao" /> <result property="status" column="status"/>
<result property="status" column="status" /> <result property="delFlag" column="del_flag"/>
<result property="delFlag" column="del_flag" /> <result property="createBy" column="create_by"/>
<result property="createBy" column="create_by" /> <result property="createTime" column="create_time"/>
<result property="createTime" column="create_time" /> <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" />
</resultMap> </resultMap>
<sql id="selectHscjVo"> <sql id="selectHscjVo">
select id, xh, city, area, street, community, cj_place, cjgh, user_name, card_no, phone, sex, address, age, category, cj_time, cj_name, cj_phone, b_type, laboratory, jc_time, rygx, boxhao, status, del_flag, create_by, create_time, update_by, update_time, remark from hscj select id,
province,
city,
area,
street,
community,
cj_place,
cjgh,
user_name,
card_no,
phone,
sex,
address,
age,
category,
cj_time,
cj_name,
cj_phone,
b_type,
laboratory,
jc_time,
rygx,
boxhao,
status,
del_flag,
create_by,
create_time,
update_by,
update_time,
remark
from hscj
</sql> </sql>
<select id="selectHscjList" parameterType="Hscj" resultMap="HscjResult"> <select id="selectHscjList" parameterType="Hscj" resultMap="HscjResult">
select a.id, a.xh, a.city, a.area, a.street, a.community, a.cj_place, a.cjgh, a.user_name, a.card_no, a.phone, a.sex, a.address, a.age, a.category, a.cj_time, a.cj_name, a.cj_phone, a.b_type, a.laboratory, a.jc_time, a.rygx, a.boxhao, a.status, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark from hscj a select a.id, a.province, a.city, a.area, a.street, a.community, a.cj_place, a.cjgh, a.user_name, a.card_no,
a.phone,
a.sex, a.address, a.age, a.category, a.cj_time, a.cj_name, a.cj_phone, a.b_type, a.laboratory, a.jc_time,
a.rygx, a.boxhao, a.status, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark from
hscj 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
<if test="xh != null and xh != ''"> and a.xh like concat('%', #{xh}, '%')</if> <if test="city != null and city != ''">and a.city like concat('%', #{city}, '%')</if>
<if test="city != null and city != ''"> and a.city like concat('%', #{city}, '%')</if> <if test="area != null and area != ''">and a.area = #{area}</if>
<if test="area != null and area != ''"> and a.area = #{area}</if> <if test="street != null and street != ''">and a.street = #{street}</if>
<if test="street != null and street != ''"> and a.street = #{street}</if> <if test="community != null and community != ''">and a.community like concat('%', #{community}, '%')</if>
<if test="community != null and community != ''"> and a.community like concat('%', #{community}, '%')</if> <if test="cjPlace != null and cjPlace != ''">and a.cj_place like concat('%', #{cjPlace}, '%')</if>
<if test="cjPlace != null and cjPlace != ''"> and a.cj_place like concat('%', #{cjPlace}, '%')</if> <if test="cjgh != null and cjgh != ''">and a.cjgh like concat('%', #{cjgh}, '%')</if>
<if test="cjgh != null and cjgh != ''"> and a.cjgh like concat('%', #{cjgh}, '%')</if> <if test="userName != null and userName != ''">and a.user_name like concat('%', #{userName}, '%')</if>
<if test="userName != null and userName != ''"> and a.user_name like concat('%', #{userName}, '%')</if> <if test="cardNo != null and cardNo != ''">and a.card_no like concat('%', #{cardNo}, '%')</if>
<if test="cardNo != null and cardNo != ''"> and a.card_no like concat('%', #{cardNo}, '%')</if> <if test="phone != null and phone != ''">and a.phone like concat('%', #{phone}, '%')</if>
<if test="phone != null and phone != ''"> and a.phone like concat('%', #{phone}, '%')</if> <if test="sex != null and sex != ''">and a.sex = #{sex}</if>
<if test="sex != null and sex != ''"> and a.sex = #{sex}</if> <if test="address != null and address != ''">and a.address like concat('%', #{address}, '%')</if>
<if test="address != null and address != ''"> and a.address like concat('%', #{address}, '%')</if> <if test="age != null ">and a.age = #{age}</if>
<if test="age != null "> and a.age = #{age}</if> <if test="category != null and category != ''">and a.category like concat('%', #{category}, '%')</if>
<if test="category != null and category != ''"> and a.category like concat('%', #{category}, '%')</if> <if test="cjTime != null ">and a.cj_time = #{cjTime}</if>
<if test="cjTime != null "> and a.cj_time = #{cjTime}</if> <if test="cjName != null and cjName != ''">and a.cj_name like concat('%', #{cjName}, '%')</if>
<if test="cjName != null and cjName != ''"> and a.cj_name like concat('%', #{cjName}, '%')</if> <if test="cjPhone != null and cjPhone != ''">and a.cj_phone like concat('%', #{cjPhone}, '%')</if>
<if test="cjPhone != null and cjPhone != ''"> and a.cj_phone like concat('%', #{cjPhone}, '%')</if> <if test="bblx != null and bblx != ''">and a.b_type like concat('%', #{bblx}, '%')</if>
<if test="bType != null and bType != ''"> and a.b_type like concat('%', #{bType}, '%')</if> <if test="laboratory != null and laboratory != ''">and a.laboratory like concat('%', #{laboratory}, '%')</if>
<if test="laboratory != null and laboratory != ''"> and a.laboratory like concat('%', #{laboratory}, '%')</if> <if test="jcTime != null ">and a.jc_time = #{jcTime}</if>
<if test="jcTime != null "> and a.jc_time = #{jcTime}</if> <if test="rygx != null and rygx != ''">and a.rygx like concat('%', #{rygx}, '%')</if>
<if test="rygx != null and rygx != ''"> and a.rygx like concat('%', #{rygx}, '%')</if> <if test="boxhao != null and boxhao != ''">and a.boxhao like concat('%', #{boxhao}, '%')</if>
<if test="boxhao != null and boxhao != ''"> and a.boxhao like concat('%', #{boxhao}, '%')</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}
</select> </select>
...@@ -82,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -82,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertHscj" parameterType="Hscj" useGeneratedKeys="true" keyProperty="id"> <insert id="insertHscj" parameterType="Hscj" useGeneratedKeys="true" keyProperty="id">
insert into hscj insert into hscj
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="xh != null">xh,</if> <if test="committee != null">committee,</if>
<if test="province != null">province,</if> <if test="province != null">province,</if>
<if test="city != null">city,</if> <if test="city != null">city,</if>
<if test="area != null">area,</if> <if test="area != null">area,</if>
...@@ -100,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -100,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="cjTime != null">cj_time,</if> <if test="cjTime != null">cj_time,</if>
<if test="cjName != null">cj_name,</if> <if test="cjName != null">cj_name,</if>
<if test="cjPhone != null">cj_phone,</if> <if test="cjPhone != null">cj_phone,</if>
<if test="bType != null">b_type,</if> <if test="bblx != null">b_type,</if>
<if test="laboratory != null">laboratory,</if> <if test="laboratory != null">laboratory,</if>
<if test="jcTime != null">jc_time,</if> <if test="jcTime != null">jc_time,</if>
<if test="cjResult != null">cj_result,</if> <if test="cjResult != null">cj_result,</if>
...@@ -115,7 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -115,7 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="xh != null">#{xh},</if> <if test="committee != null">#{committee},</if>
<if test="province != null">#{province},</if> <if test="province != null">#{province},</if>
<if test="city != null">#{city},</if> <if test="city != null">#{city},</if>
<if test="area != null">#{area},</if> <if test="area != null">#{area},</if>
...@@ -133,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -133,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="cjTime != null">#{cjTime},</if> <if test="cjTime != null">#{cjTime},</if>
<if test="cjName != null">#{cjName},</if> <if test="cjName != null">#{cjName},</if>
<if test="cjPhone != null">#{cjPhone},</if> <if test="cjPhone != null">#{cjPhone},</if>
<if test="bType != null">#{bType},</if> <if test="bblx != null">#{bblx},</if>
<if test="laboratory != null">#{laboratory},</if> <if test="laboratory != null">#{laboratory},</if>
<if test="jcTime != null">#{jcTime},</if> <if test="jcTime != null">#{jcTime},</if>
<if test="cjResult != null">#{cjResult},</if> <if test="cjResult != null">#{cjResult},</if>
...@@ -152,7 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -152,7 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateHscj" parameterType="Hscj"> <update id="updateHscj" parameterType="Hscj">
update hscj update hscj
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="xh != null">xh = #{xh},</if> <if test="province != null">province=#{province},</if>
<if test="city != null">city = #{city},</if> <if test="city != null">city = #{city},</if>
<if test="area != null">area = #{area},</if> <if test="area != null">area = #{area},</if>
<if test="street != null">street = #{street},</if> <if test="street != null">street = #{street},</if>
...@@ -169,7 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -169,7 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="cjTime != null">cj_time = #{cjTime},</if> <if test="cjTime != null">cj_time = #{cjTime},</if>
<if test="cjName != null">cj_name = #{cjName},</if> <if test="cjName != null">cj_name = #{cjName},</if>
<if test="cjPhone != null">cj_phone = #{cjPhone},</if> <if test="cjPhone != null">cj_phone = #{cjPhone},</if>
<if test="bType != null">b_type = #{bType},</if> <if test="bblx != null">b_type = #{bblx},</if>
<if test="laboratory != null">laboratory = #{laboratory},</if> <if test="laboratory != null">laboratory = #{laboratory},</if>
<if test="jcTime != null">jc_time = #{jcTime},</if> <if test="jcTime != null">jc_time = #{jcTime},</if>
<if test="rygx != null">rygx = #{rygx},</if> <if test="rygx != null">rygx = #{rygx},</if>
...@@ -179,6 +211,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -179,6 +211,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="cjResult != null">cj_result=#{cjResult},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
</trim> </trim>
...@@ -186,7 +219,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -186,7 +219,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update> </update>
<delete id="deleteHscjById" parameterType="Long"> <delete id="deleteHscjById" parameterType="Long">
delete from hscj where id = #{id} delete
from hscj
where id = #{id}
</delete> </delete>
<delete id="deleteHscjByIds" parameterType="String"> <delete id="deleteHscjByIds" parameterType="String">
......
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.YcsbMapper"> <mapper namespace="com.ruoyi.system.mapper.YcsbMapper">
<resultMap type="Ycsb" id="YcsbResult"> <resultMap type="Ycsb" id="YcsbResult">
<result property="id" column="id" /> <result property="id" column="id"/>
<result property="sbDate" column="sb_date" /> <result property="sbDate" column="sb_date"/>
<result property="userName" column="user_name" /> <result property="userName" column="user_name"/>
<result property="cardNo" column="card_no" /> <result property="cardNo" column="card_no"/>
<result property="phone" column="phone" /> <result property="phone" column="phone"/>
<result property="area" column="area" /> <result property="area" column="area"/>
<result property="street" column="street" /> <result property="street" column="street"/>
<result property="community" column="community" /> <result property="community" column="community"/>
<result property="unit" column="unit" /> <result property="unit" column="unit"/>
<result property="hasAcid" column="has_acid" /> <result property="hasAcid" column="has_acid"/>
<result property="status" column="status" /> <result property="status" column="status"/>
<result property="delFlag" column="del_flag" /> <result property="delFlag" column="del_flag"/>
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time"/>
<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"/>
</resultMap> </resultMap>
<sql id="selectYcsbVo"> <sql id="selectYcsbVo">
select id, sb_date, user_name, card_no, phone, area, street, community, unit, has_acid, status, del_flag, create_by, create_time, update_by, update_time, remark from ycsb select id,
sb_date,
user_name,
card_no,
phone,
area,
street,
committee,
community,
unit,
has_acid,
status,
del_flag,
create_by,
create_time,
update_by,
update_time,
remark
from ycsb
</sql> </sql>
<select id="selectYcsbList" parameterType="Ycsb" resultMap="YcsbResult"> <select id="selectYcsbList" parameterType="Ycsb" resultMap="YcsbResult">
select a.id, a.sb_date, a.user_name, a.card_no, a.phone, a.area, a.street, a.community, a.unit, a.has_acid, a.status, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark from ycsb a select a.id, a.sb_date, a.user_name, a.card_no, a.phone, a.area, a.street,a.committee, a.community, a.unit,
a.has_acid, a.status, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark
from ycsb 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
<if test="sbDate != null "> and a.sb_date = #{sbDate}</if> <if test="sbDate != null ">and a.sb_date = #{sbDate}</if>
<if test="userName != null and userName != ''"> and a.user_name like concat('%', #{userName}, '%')</if> <if test="userName != null and userName != ''">and a.user_name like concat('%', #{userName}, '%')</if>
<if test="cardNo != null and cardNo != ''"> and a.card_no like concat('%', #{cardNo}, '%')</if> <if test="cardNo != null and cardNo != ''">and a.card_no like concat('%', #{cardNo}, '%')</if>
<if test="phone != null and phone != ''"> and a.phone like concat('%', #{phone}, '%')</if> <if test="phone != null and phone != ''">and a.phone like concat('%', #{phone}, '%')</if>
<if test="area != null and area != ''"> and a.area = #{area}</if> <if test="area != null and area != ''">and a.area = #{area}</if>
<if test="street != null and street != ''"> and a.street = #{street}</if> <if test="street != null and street != ''">and a.street = #{street}</if>
<if test="community != null and community != ''"> and a.community like concat('%', #{community}, '%')</if> <if test="community != null and community != ''">and a.community like concat('%', #{community}, '%')</if>
<if test="unit != null and unit != ''"> and a.unit like concat('%', #{unit}, '%')</if> <if test="committee != null and committee != ''">and a.committee like concat('%', #{committee}, '%')</if>
<if test="hasAcid != null and hasAcid != ''"> and a.has_acid like concat('%', #{hasAcid}, '%')</if> <if test="unit != null and unit != ''">and a.unit like concat('%', #{unit}, '%')</if>
<if test="status != null and status != ''"> and a.status = #{status}</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>
${params.dataScope} ${params.dataScope}
</select> </select>
...@@ -58,10 +79,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -58,10 +79,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null">user_name,</if> <if test="userName != null">user_name,</if>
<if test="cardNo != null">card_no,</if> <if test="cardNo != null">card_no,</if>
<if test="phone != null">phone,</if> <if test="phone != null">phone,</if>
<if test="address != null">address,</if>
<if test="area != null">area,</if> <if test="area != null">area,</if>
<if test="street != null">street,</if> <if test="street != null">street,</if>
<if test="community != null">community,</if> <if test="community != null">community,</if>
<if test="committee != null">committee,</if>
<if test="building != null">building,</if>
<if test="unit != null">unit,</if> <if test="unit != null">unit,</if>
<if test="house != null">house,</if>
<if test="hasAcid != null">has_acid,</if> <if test="hasAcid != null">has_acid,</if>
<if test="status != null">status,</if> <if test="status != null">status,</if>
<if test="delFlag != null">del_flag,</if> <if test="delFlag != null">del_flag,</if>
...@@ -76,10 +101,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -76,10 +101,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null">#{userName},</if> <if test="userName != null">#{userName},</if>
<if test="cardNo != null">#{cardNo},</if> <if test="cardNo != null">#{cardNo},</if>
<if test="phone != null">#{phone},</if> <if test="phone != null">#{phone},</if>
<if test="address != null">#{address},</if>
<if test="area != null">#{area},</if> <if test="area != null">#{area},</if>
<if test="street != null">#{street},</if> <if test="street != null">#{street},</if>
<if test="community != null">#{community},</if> <if test="community != null">#{community},</if>
<if test="committee != null">#{committee},</if>
<if test="building != null">#{building},</if>
<if test="unit != null">#{unit},</if> <if test="unit != null">#{unit},</if>
<if test="house != null">#{house},</if>
<if test="hasAcid != null">#{hasAcid},</if> <if test="hasAcid != null">#{hasAcid},</if>
<if test="status != null">#{status},</if> <if test="status != null">#{status},</if>
<if test="delFlag != null">#{delFlag},</if> <if test="delFlag != null">#{delFlag},</if>
...@@ -98,10 +127,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -98,10 +127,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null">user_name = #{userName},</if> <if test="userName != null">user_name = #{userName},</if>
<if test="cardNo != null">card_no = #{cardNo},</if> <if test="cardNo != null">card_no = #{cardNo},</if>
<if test="phone != null">phone = #{phone},</if> <if test="phone != null">phone = #{phone},</if>
<if test="address != null">address=#{address},</if>
<if test="area != null">area = #{area},</if> <if test="area != null">area = #{area},</if>
<if test="street != null">street = #{street},</if> <if test="street != null">street = #{street},</if>
<if test="committee != null">committee=#{committee},</if>
<if test="community != null">community = #{community},</if> <if test="community != null">community = #{community},</if>
<if test="building != null">building = #{building},</if>
<if test="unit != null">unit = #{unit},</if> <if test="unit != null">unit = #{unit},</if>
<if test="house != null">house = #{house},</if>
<if test="hasAcid != null">has_acid = #{hasAcid},</if> <if test="hasAcid != null">has_acid = #{hasAcid},</if>
<if test="status != null">status = #{status},</if> <if test="status != null">status = #{status},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if> <if test="delFlag != null">del_flag = #{delFlag},</if>
...@@ -115,7 +148,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -115,7 +148,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update> </update>
<delete id="deleteYcsbById" parameterType="Long"> <delete id="deleteYcsbById" parameterType="Long">
delete from ycsb where id = #{id} delete
from ycsb
where id = #{id}
</delete> </delete>
<delete id="deleteYcsbByIds" parameterType="String"> <delete id="deleteYcsbByIds" parameterType="String">
......
...@@ -143,9 +143,9 @@ ...@@ -143,9 +143,9 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="标本类型" prop="bType"> <el-form-item label="标本类型" prop="bblx">
<el-input <el-input
v-model="queryParams.bType" v-model="queryParams.bblx"
placeholder="请输入标本类型" placeholder="请输入标本类型"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
...@@ -251,9 +251,7 @@ ...@@ -251,9 +251,7 @@
v-hasPermi="['system:hscj:export']" v-hasPermi="['system:hscj:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <span style="color: red;font-weight: bold">数据权限正在配置,请勿修改数据,仅支持查看!!!</span>
<span style="font-size: 20px;color: red;font-weight: bold">数据权限正在配置,请勿修改数据,仅支持查看!!!</span>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
...@@ -293,7 +291,7 @@ ...@@ -293,7 +291,7 @@
</el-table-column> </el-table-column>
<el-table-column label="采集人姓名" align="center" prop="cjName" /> <el-table-column label="采集人姓名" align="center" prop="cjName" />
<el-table-column label="采集人电话" align="center" prop="cjPhone" /> <el-table-column label="采集人电话" align="center" prop="cjPhone" />
<el-table-column label="标本类型" align="center" prop="bType" /> <el-table-column label="标本类型" align="center" prop="bblx" />
<el-table-column label="接收实验室" align="center" prop="laboratory" /> <el-table-column label="接收实验室" align="center" prop="laboratory" />
<el-table-column label="检测时间" align="center" prop="jcTime" width="180"> <el-table-column label="检测时间" align="center" prop="jcTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -338,30 +336,33 @@ ...@@ -338,30 +336,33 @@
<!-- 添加或修改核酸采集对话框 --> <!-- 添加或修改核酸采集对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="auto">
<el-form-item label="序号" prop="xh"> <!-- <el-form-item label="序号" prop="xh">-->
<el-input v-model="form.xh" placeholder="请输入序号" /> <!-- <el-input v-model="form.xh" placeholder="请输入序号" />-->
<!-- </el-form-item>-->
<el-form-item label="省" prop="province">
<el-input v-model="form.province" placeholder="请输入省" />
</el-form-item> </el-form-item>
<el-form-item label="市" prop="city"> <el-form-item label="市" prop="city">
<el-input v-model="form.city" placeholder="请输入市" /> <el-input v-model="form.city" placeholder="请输入市" />
</el-form-item> </el-form-item>
<el-form-item label="居住地所在区" prop="area"> <el-form-item label="居住地所在区" prop="area">
<el-select v-model="form.area" placeholder="请选择居住地所在区"> <el-select style="width: 100%" v-model="form.area" placeholder="请选择居住地所在区">
<el-option <el-option
v-for="dict in dict.type.residential_area" v-for="dict in dict.type.residential_area"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="街道/镇" prop="street"> <el-form-item label="街道/镇" prop="street">
<el-select v-model="form.street" placeholder="请选择街道/镇"> <el-select style="width: 100%" v-model="form.street" placeholder="请选择街道/镇">
<el-option <el-option
v-for="dict in dict.type.street_town" v-for="dict in dict.type.street_town"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -371,6 +372,9 @@ ...@@ -371,6 +372,9 @@
<el-form-item label="采集地点" prop="cjPlace"> <el-form-item label="采集地点" prop="cjPlace">
<el-input v-model="form.cjPlace" placeholder="请输入采集地点" /> <el-input v-model="form.cjPlace" placeholder="请输入采集地点" />
</el-form-item> </el-form-item>
<el-form-item label="箱号" prop="boxhao">
<el-input v-model="form.boxhao" placeholder="请输入箱号" />
</el-form-item>
<el-form-item label="采集管号" prop="cjgh"> <el-form-item label="采集管号" prop="cjgh">
<el-input v-model="form.cjgh" placeholder="请输入采集管号" /> <el-input v-model="form.cjgh" placeholder="请输入采集管号" />
</el-form-item> </el-form-item>
...@@ -384,12 +388,12 @@ ...@@ -384,12 +388,12 @@
<el-input v-model="form.phone" placeholder="请输入联系方式" /> <el-input v-model="form.phone" placeholder="请输入联系方式" />
</el-form-item> </el-form-item>
<el-form-item label="性别" prop="sex"> <el-form-item label="性别" prop="sex">
<el-select v-model="form.sex" placeholder="请选择性别"> <el-select style="width: 100%" v-model="form.sex" placeholder="请选择性别">
<el-option <el-option
v-for="dict in dict.type.sys_user_sex" v-for="dict in dict.type.sys_user_sex"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -402,8 +406,13 @@ ...@@ -402,8 +406,13 @@
<el-form-item label="类别" prop="category"> <el-form-item label="类别" prop="category">
<el-input v-model="form.category" placeholder="请输入类别" /> <el-input v-model="form.category" placeholder="请输入类别" />
</el-form-item> </el-form-item>
<el-form-item label="人员关系" prop="rygx">
<el-input v-model="form.rygx" placeholder="请输入人员关系" />
</el-form-item>
<el-form-item label="采集时间" prop="cjTime"> <el-form-item label="采集时间" prop="cjTime">
<el-date-picker clearable <el-date-picker
clearable
style="width: 100%"
v-model="form.cjTime" v-model="form.cjTime"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
...@@ -416,25 +425,27 @@ ...@@ -416,25 +425,27 @@
<el-form-item label="采集人电话" prop="cjPhone"> <el-form-item label="采集人电话" prop="cjPhone">
<el-input v-model="form.cjPhone" placeholder="请输入采集人电话" /> <el-input v-model="form.cjPhone" placeholder="请输入采集人电话" />
</el-form-item> </el-form-item>
<el-form-item label="标本类型" prop="bType"> <el-form-item label="标本类型" prop="bblx">
<el-input v-model="form.bType" placeholder="请输入标本类型" /> <el-input v-model="form.bblx" placeholder="请输入标本类型" />
</el-form-item> </el-form-item>
<el-form-item label="接收实验室" prop="laboratory"> <el-form-item label="接收实验室" prop="laboratory">
<el-input v-model="form.laboratory" placeholder="请输入接收实验室" /> <el-input v-model="form.laboratory" placeholder="请输入接收实验室" />
</el-form-item> </el-form-item>
<el-form-item label="检测时间" prop="jcTime"> <el-form-item label="检测时间" prop="jcTime">
<el-date-picker clearable <el-date-picker
style="width: 100%"
clearable
v-model="form.jcTime" v-model="form.jcTime"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择检测时间"> placeholder="请选择检测时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="人员关系" prop="rygx"> <el-form-item label="检测结果" prop="cjResult">
<el-input v-model="form.rygx" placeholder="请输入人员关系" /> <el-radio-group v-model="form.cjResult">
</el-form-item> <el-radio :label="0">阳性</el-radio>
<el-form-item label="箱号" prop="boxhao"> <el-radio :label="1">阴性</el-radio>
<el-input v-model="form.boxhao" placeholder="请输入箱号" /> </el-radio-group>
</el-form-item> </el-form-item>
<!-- <el-form-item label="状态">--> <!-- <el-form-item label="状态">-->
<!-- <el-radio-group v-model="form.status">--> <!-- <el-radio-group v-model="form.status">-->
...@@ -560,7 +571,7 @@ export default { ...@@ -560,7 +571,7 @@ export default {
cjTime: null, cjTime: null,
cjName: null, cjName: null,
cjPhone: null, cjPhone: null,
bType: null, bblx: null,
laboratory: null, laboratory: null,
jcTime: null, jcTime: null,
rygx: null, rygx: null,
...@@ -568,9 +579,63 @@ export default { ...@@ -568,9 +579,63 @@ export default {
status: null, status: null,
}, },
// 表单参数 // 表单参数
form: {}, form: {
province: '河北省',
city: '石家庄市',
},
// 表单校验 // 表单校验
rules: { rules: {
province: [
{ required: true, message: "请输入省", trigger: "blur" }
],
city: [
{ required: true, message: "请输入市", trigger: "blur" }
],
area: [
{ required: true, message: "请选择居住地所在区", trigger: "change" }
],
street: [
{ required: true, message: "请选择街道/镇", trigger: "change" }
],
community: [
{ required: true, message: "请输入小区/村名称", trigger: "blur" }
],
cjPlace: [
{ required: true, message: "请输入采集地点", trigger: "blur" }
],
boxhao: [
{ required: true, message: "请输入箱号", trigger: "blur" }
],
cjgh: [
{ required: true, message: "请输入采集管号", trigger: "blur" }
],
userName: [
{ required: true, message: "请输入姓名", trigger: "blur" }
],
cardNo: [
{ required: true, message: "请输入身份证号码", trigger: "blur" }
],
sex: [
{ required: true, message: "请选择性别", trigger: "change" }
],
age: [
{ required: true, message: "请输入年龄", trigger: "blur" }
],
rygx: [
{ required: true, message: "请输入人员关系", trigger: "blur" }
],
cjTime: [
{ required: true, message: "请选择采集时间", trigger: "change" }
],
cjName: [
{ required: true, message: "请输入采集人姓名", trigger: "blur" }
],
cjPhone: [
{ required: true, message: "请输入采集人电话", trigger: "blur" }
],
bblx: [
{ required: true, message: "请输入标本类型", trigger: "blur" }
],
} }
}; };
}, },
...@@ -694,9 +759,10 @@ export default { ...@@ -694,9 +759,10 @@ export default {
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
province: '河北省',
id: null, id: null,
xh: null, xh: null,
city: null, city: '石家庄市',
area: null, area: null,
street: null, street: null,
community: null, community: null,
...@@ -712,8 +778,9 @@ export default { ...@@ -712,8 +778,9 @@ export default {
cjTime: null, cjTime: null,
cjName: null, cjName: null,
cjPhone: null, cjPhone: null,
bType: null, bblx: null,
laboratory: null, laboratory: null,
cjResult: null,
jcTime: null, jcTime: null,
rygx: null, rygx: null,
boxhao: null, boxhao: null,
......
...@@ -61,10 +61,10 @@ ...@@ -61,10 +61,10 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="楼号单元号门牌号" prop="unit"> <el-form-item label="单元号" prop="unit">
<el-input <el-input
v-model="queryParams.unit" v-model="queryParams.unit"
placeholder="请输入楼号单元号门牌号" placeholder="请输入单元号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
...@@ -145,9 +145,7 @@ ...@@ -145,9 +145,7 @@
v-hasPermi="['system:ycsb:export']" v-hasPermi="['system:ycsb:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <span style="color: red;font-weight: bold">数据权限正在配置,请勿修改数据,仅支持查看!!!</span>
<span style="font-size: 20px;color: red;font-weight: bold">数据权限正在配置,请勿修改数据,仅支持查看!!!</span>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
...@@ -173,7 +171,7 @@ ...@@ -173,7 +171,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="小区/村名称" align="center" prop="community" /> <el-table-column label="小区/村名称" align="center" prop="community" />
<el-table-column label="楼号单元号门牌号" align="center" prop="unit" /> <el-table-column label="单元号" align="center" prop="unit" />
<el-table-column label="是否做核酸" align="center" prop="hasAcid" /> <el-table-column label="是否做核酸" align="center" prop="hasAcid" />
<!-- <el-table-column label="状态" align="center" prop="status">--> <!-- <el-table-column label="状态" align="center" prop="status">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
...@@ -211,9 +209,11 @@ ...@@ -211,9 +209,11 @@
<!-- 添加或修改抗原异常上报对话框 --> <!-- 添加或修改抗原异常上报对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="auto">
<el-form-item label="日期" prop="sbDate"> <el-form-item label="日期" prop="sbDate">
<el-date-picker clearable <el-date-picker
clearable
style="width: 100%"
v-model="form.sbDate" v-model="form.sbDate"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
...@@ -229,34 +229,46 @@ ...@@ -229,34 +229,46 @@
<el-form-item label="联系方式" prop="phone"> <el-form-item label="联系方式" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系方式" /> <el-input v-model="form.phone" placeholder="请输入联系方式" />
</el-form-item> </el-form-item>
<el-form-item label="家庭现住址" prop="address">
<el-input v-model="form.address" placeholder="请输入家庭现住址" />
</el-form-item>
<el-form-item label="居住地所在区" prop="area"> <el-form-item label="居住地所在区" prop="area">
<el-select v-model="form.area" placeholder="请选择居住地所在区"> <el-select style="width: 100%" v-model="form.area" placeholder="请选择居住地所在区">
<el-option <el-option
v-for="dict in dict.type.residential_area" v-for="dict in dict.type.residential_area"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="街道/镇" prop="street"> <el-form-item label="街道/镇" prop="street">
<el-select v-model="form.street" placeholder="请选择街道/镇"> <el-select style="width: 100%" v-model="form.street" placeholder="请选择街道/镇">
<el-option <el-option
v-for="dict in dict.type.street_town" v-for="dict in dict.type.street_town"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="小区/村名称" prop="community"> <el-form-item label="小区/村名称" prop="community">
<el-input v-model="form.community" placeholder="请输入小区/村名称" /> <el-input v-model="form.community" placeholder="请输入小区/村名称" />
</el-form-item> </el-form-item>
<el-form-item label="楼号单元号门牌号" prop="unit"> <el-form-item label="楼号" prop="building">
<el-input v-model="form.unit" placeholder="请输入楼号单元号门牌号" /> <el-input v-model="form.building" placeholder="请输入楼号" />
</el-form-item> </el-form-item>
<el-form-item label="单元号" prop="unit">
<el-input v-model="form.unit" placeholder="请输入单元号" />
</el-form-item>
<el-form-item label="门牌号" prop="house">
<el-input v-model="form.house" placeholder="请输入门牌号" />
</el-form-item>
<!-- <el-form-item label="楼号单元号门牌号" prop="unit">-->
<!-- <el-input v-model="form.unit" placeholder="请输入楼号单元号门牌号" />-->
<!-- </el-form-item>-->
<el-form-item label="是否做核酸" prop="hasAcid"> <el-form-item label="是否做核酸" prop="hasAcid">
<el-input v-model="form.hasAcid" placeholder="请输入是否做核酸" /> <el-input type="textarea" :rows="3" maxlength="200" show-word-limit v-model="form.hasAcid" placeholder="请输入是否做核酸" />
</el-form-item> </el-form-item>
<!-- <el-form-item label="状态">--> <!-- <el-form-item label="状态">-->
<!-- <el-radio-group v-model="form.status">--> <!-- <el-radio-group v-model="form.status">-->
...@@ -270,9 +282,9 @@ ...@@ -270,9 +282,9 @@
<!-- <el-form-item label="删除标志" prop="delFlag">--> <!-- <el-form-item label="删除标志" prop="delFlag">-->
<!-- <el-input v-model="form.delFlag" placeholder="请输入删除标志" />--> <!-- <el-input v-model="form.delFlag" placeholder="请输入删除标志" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="备注" prop="remark"> <!-- <el-form-item label="备注" prop="remark">-->
<el-input v-model="form.remark" placeholder="请输入备注" /> <!-- <el-input v-model="form.remark" placeholder="请输入备注" />-->
</el-form-item> <!-- </el-form-item>-->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
...@@ -379,6 +391,21 @@ export default { ...@@ -379,6 +391,21 @@ export default {
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
sbDate: [
{ required: true, message: "请输入日期", trigger: "change" }
],
userName: [
{ required: true, message: "请输入姓名", trigger: "blur" }
],
cardNo: [
{ required: true, message: "请输入身份证号码", trigger: "blur" }
],
area: [
{ required: true, message: "请选择居住地所在区", trigger: "change" }
],
street: [
{ required: true, message: "请选择街道/镇", trigger: "change" }
],
} }
}; };
}, },
...@@ -507,8 +534,11 @@ export default { ...@@ -507,8 +534,11 @@ export default {
userName: null, userName: null,
cardNo: null, cardNo: null,
phone: null, phone: null,
address: null,
area: null, area: null,
street: null, street: null,
house: null,
building: null,
community: null, community: null,
unit: null, unit: null,
hasAcid: null, hasAcid: null,
......
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<span style="font-size: 20px;color: red;font-weight: bold">数据权限正在配置,请勿修改数据,仅支持查看!!!</span> <span style="color: red;font-weight: bold">数据权限正在配置,请勿修改数据,仅支持查看!!!</span>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
...@@ -293,29 +293,39 @@ ...@@ -293,29 +293,39 @@
<!-- 添加或修改阳性人员对话框 --> <!-- 添加或修改阳性人员对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="auto">
<el-form-item label="姓名" prop="userName">
<el-input v-model="form.userName" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="日期" prop="sbDate"> <el-form-item label="日期" prop="sbDate">
<el-date-picker clearable <el-date-picker clearable
style="width: 100%"
v-model="form.sbDate" v-model="form.sbDate"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择日期"> placeholder="请选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="流调人员" prop="ldry"> <el-form-item label="人员类别" prop="userType">
<el-input v-model="form.ldry" placeholder="请输入流调人员" /> <el-input v-model="form.userType" placeholder="请输入人员类别" />
</el-form-item> </el-form-item>
<el-form-item label="姓名" prop="userName"> <el-form-item label="风险来源" prop="riskSource">
<el-input v-model="form.userName" placeholder="请输入姓名" /> <el-input v-model="form.riskSource" placeholder="请输入风险来源" />
</el-form-item> </el-form-item>
<el-form-item label="身份证号码" prop="cardNo"> <el-form-item label="楼号" prop="unit">
<el-input v-model="form.cardNo" placeholder="请输入身份证号码" /> <el-input v-model="form.building" placeholder="请输入楼号" />
</el-form-item> </el-form-item>
<el-form-item label="联系方式" prop="phone"> <el-form-item label="单元号" prop="unit">
<el-input v-model="form.phone" placeholder="请输入联系方式" /> <el-input v-model="form.unit" placeholder="请输入单元号" />
</el-form-item>
<el-form-item label="门牌号" prop="unit">
<el-input v-model="form.house" placeholder="请输入门牌号" />
</el-form-item>
<el-form-item label="住址" prop="address">
<el-input v-model="form.address" placeholder="请输入住址" />
</el-form-item> </el-form-item>
<el-form-item label="居住地所在区" prop="area"> <el-form-item label="居住地所在区" prop="area">
<el-select v-model="form.area" placeholder="请选择居住地所在区"> <el-select style="width: 100%" v-model="form.area" placeholder="请选择居住地所在区">
<el-option <el-option
v-for="dict in dict.type.residential_area" v-for="dict in dict.type.residential_area"
:key="dict.value" :key="dict.value"
...@@ -325,7 +335,7 @@ ...@@ -325,7 +335,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="街道/镇" prop="street"> <el-form-item label="街道/镇" prop="street">
<el-select v-model="form.street" placeholder="请选择街道/镇"> <el-select style="width: 100%" v-model="form.street" placeholder="请选择街道/镇">
<el-option <el-option
v-for="dict in dict.type.street_town" v-for="dict in dict.type.street_town"
:key="dict.value" :key="dict.value"
...@@ -337,17 +347,32 @@ ...@@ -337,17 +347,32 @@
<el-form-item label="小区/村名称" prop="community"> <el-form-item label="小区/村名称" prop="community">
<el-input v-model="form.community" placeholder="请输入小区/村名称" /> <el-input v-model="form.community" placeholder="请输入小区/村名称" />
</el-form-item> </el-form-item>
<el-form-item label="楼号" prop="unit"> <el-form-item label="身份证号码" prop="cardNo">
<el-input v-model="form.building" placeholder="请输入楼号" /> <el-input v-model="form.cardNo" placeholder="请输入身份证号码" />
</el-form-item> </el-form-item>
<el-form-item label="单元号" prop="unit"> <el-form-item label="联系方式" prop="phone">
<el-input v-model="form.unit" placeholder="请输入单元号" /> <el-input v-model="form.phone" placeholder="请输入联系方式" />
</el-form-item> </el-form-item>
<el-form-item label="门牌号" prop="unit"> <el-form-item label="流调人员" prop="ldry">
<el-input v-model="form.house" placeholder="请输入门牌号" /> <el-input v-model="form.ldry" placeholder="请输入流调人员" />
</el-form-item> </el-form-item>
<el-form-item label="隔离状态" prop="isolationStatus"> <el-form-item label="是否重症">
<el-select v-model="form.isolationStatus" placeholder="请选择隔离状态"> <el-radio-group v-model="form.isYz">
<el-radio
v-for="dict in dict.type.yz_status"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否转阴" prop="isYin">
<el-radio-group v-model="form.isYin">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="患者隔离位置" prop="isolationStatus">
<el-select style="width: 100%" v-model="form.isolationStatus" placeholder="请选择患者隔离位置">
<el-option <el-option
v-for="dict in dict.type.isolation_status" v-for="dict in dict.type.isolation_status"
:key="dict.value" :key="dict.value"
...@@ -356,7 +381,7 @@ ...@@ -356,7 +381,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否已管控"> <el-form-item label="是否已管控" prop="isControl">
<el-radio-group v-model="form.isControl"> <el-radio-group v-model="form.isControl">
<el-radio <el-radio
v-for="dict in dict.type.control_status" v-for="dict in dict.type.control_status"
...@@ -365,18 +390,24 @@ ...@@ -365,18 +390,24 @@
>{{dict.label}}</el-radio> >{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="是否重症"> <el-form-item label="是否符合居家隔离" prop="isHome">
<el-radio-group v-model="form.isYz"> <el-radio-group v-model="form.isHome">
<el-radio <el-radio :label="0">符合</el-radio>
v-for="dict in dict.type.yz_status" <el-radio :label="1">不符合</el-radio>
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="转运状态" prop="hasAcid"> <el-form-item label="转运状态" prop="hasAcid">
<el-input v-model="form.hasAcid" placeholder="请输入转运状态" /> <el-input v-model="form.hasAcid" placeholder="请输入转运状态" />
</el-form-item> </el-form-item>
<el-form-item label="转运时间" prop="zyTime">
<el-date-picker clearable
style="width: 100%"
v-model="form.zyTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择转运时间">
</el-date-picker>
</el-form-item>
<el-form-item v-if="form.id" label="隔离位置" prop="glPlace"> <el-form-item v-if="form.id" label="隔离位置" prop="glPlace">
<el-input v-model="form.glPlace" placeholder="请输入隔离位置" disabled/> <el-input v-model="form.glPlace" placeholder="请输入隔离位置" disabled/>
</el-form-item> </el-form-item>
...@@ -507,6 +538,27 @@ export default { ...@@ -507,6 +538,27 @@ export default {
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
userName: [
{ required: true, message: "请输入姓名", trigger: "blur" }
],
area: [
{ required: true, message: "请选择居住地所在区", trigger: "change" }
],
street: [
{ required: true, message: "请选择街道/镇", trigger: "change" }
],
cardNo: [
{ required: true, message: "请输入身份证号码", trigger: "blur" }
],
phone: [
{ required: true, message: "请输入联系方式", trigger: "blur" }
],
isYin: [
{ required: true, message: "请选择是否转阴", trigger: "change" }
],
isolationStatus: [
{ required: true, message: "请选择患者隔离位置", trigger: "change" }
],
} }
}; };
}, },
...@@ -633,7 +685,11 @@ export default { ...@@ -633,7 +685,11 @@ export default {
id: null, id: null,
sbDate: null, sbDate: null,
ldry: null, ldry: null,
isYin: null,
userName: null, userName: null,
userType: null,
riskSource: null,
address: null,
cardNo: null, cardNo: null,
phone: null, phone: null,
area: null, area: null,
...@@ -645,6 +701,8 @@ export default { ...@@ -645,6 +701,8 @@ export default {
unit: null, unit: null,
house: null, house: null,
hasAcid: null, hasAcid: null,
isHome: null,
zyTime: null,
glPlace: null, glPlace: null,
status: "0", status: "0",
delFlag: null, delFlag: null,
......
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