Commit ad67f7b7 authored by zhuangxinwei's avatar zhuangxinwei

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

parents 90b81c2b 5e7a691c
...@@ -101,6 +101,17 @@ public class YcsbController extends BaseController ...@@ -101,6 +101,17 @@ public class YcsbController extends BaseController
} else { } else {
ycsbExport.setStreet(""); ycsbExport.setStreet("");
} }
if ("0".equals(ycsbExport.getHasAcid())) {
ycsbExport.setHasAcid("是");
} else if ("1".equals(ycsbExport.getHasAcid())) {
ycsbExport.setHasAcid("否");
}
if ("0".equals(ycsbExport.getCheckCard())) {
ycsbExport.setCheckCard("不正确");
} else if ("1".equals(ycsbExport.getCheckCard())) {
ycsbExport.setCheckCard("正确");
}
} }
util.exportExcel(response, list, "抗原异常上报数据"); util.exportExcel(response, list, "抗原异常上报数据");
} }
......
...@@ -107,7 +107,7 @@ public class Gldry extends BaseEntity ...@@ -107,7 +107,7 @@ public class Gldry extends BaseEntity
/** 创建时间 */ /** 创建时间 */
// 新增于2022-11-30 // 新增于2022-11-30
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") // @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createTime; private Date createTime;
/** 状态(0正常 1停用) */ /** 状态(0正常 1停用) */
......
...@@ -90,7 +90,7 @@ public class Ycsb extends BaseEntity ...@@ -90,7 +90,7 @@ public class Ycsb extends BaseEntity
/** 创建时间 */ /** 创建时间 */
// 新增于2022-11-30 // 新增于2022-11-30
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") // @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createTime; private Date createTime;
......
...@@ -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.Ycsb; import com.ruoyi.system.domain.Ycsb;
import org.apache.ibatis.annotations.Param;
/** /**
* 抗原异常上报Mapper接口 * 抗原异常上报Mapper接口
...@@ -62,8 +63,9 @@ public interface YcsbMapper ...@@ -62,8 +63,9 @@ public interface YcsbMapper
/** /**
* 根据身份证号查询 * 根据身份证号查询
* @param cardNo 身份证号 * @param cardNo 身份证号
* @param id
* @return * @return
*/ */
List<Ycsb> selectYcsbByCard(String cardNo); List<Ycsb> selectYcsbByCard(@Param("cardNo") String cardNo, @Param("id")Long id);
} }
...@@ -70,6 +70,9 @@ public class HscjServiceImpl implements IHscjService { ...@@ -70,6 +70,9 @@ public class HscjServiceImpl implements IHscjService {
hscj.setCheckCard("正确"); hscj.setCheckCard("正确");
else else
throw new ServiceException("身份证格式不正确"); throw new ServiceException("身份证格式不正确");
List<Hscj> list = hscjMapper.checkCard(hscj);
if (!list.isEmpty())
throw new ServiceException("该身份证号当天不能重复提交");
hscj.setCreateBy(createBy); hscj.setCreateBy(createBy);
hscj.setCreateTime(DateUtils.getNowDate()); hscj.setCreateTime(DateUtils.getNowDate());
return hscjMapper.insertHscj(hscj); return hscjMapper.insertHscj(hscj);
...@@ -86,6 +89,9 @@ public class HscjServiceImpl implements IHscjService { ...@@ -86,6 +89,9 @@ public class HscjServiceImpl implements IHscjService {
String createBy = DataUtils.getValue(hscj.getArea(), hscj.getStreet(), hscj.getCommittee()); String createBy = DataUtils.getValue(hscj.getArea(), hscj.getStreet(), hscj.getCommittee());
if(createBy.equals("null")) if(createBy.equals("null"))
throw new ServiceException("所选居住地、街道、社区不存在"); throw new ServiceException("所选居住地、街道、社区不存在");
List<Hscj> list = hscjMapper.checkCard(hscj);
if (!list.isEmpty())
throw new ServiceException("该身份证号当天不能重复提交");
hscj.setCreateBy(createBy); hscj.setCreateBy(createBy);
hscj.setUpdateTime(DateUtils.getNowDate()); hscj.setUpdateTime(DateUtils.getNowDate());
return hscjMapper.updateHscj(hscj); return hscjMapper.updateHscj(hscj);
......
...@@ -8,7 +8,6 @@ import com.ruoyi.common.core.domain.entity.SysDictData; ...@@ -8,7 +8,6 @@ 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 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.annotation.DataScope; import com.ruoyi.common.annotation.DataScope;
...@@ -71,6 +70,9 @@ public class YcsbServiceImpl implements IYcsbService ...@@ -71,6 +70,9 @@ public class YcsbServiceImpl implements IYcsbService
ycsb.setCheckCard("正确"); ycsb.setCheckCard("正确");
else else
throw new ServiceException("身份证格式不正确"); throw new ServiceException("身份证格式不正确");
List<Ycsb> list = ycsbMapper.selectYcsbByCard(ycsb.getCardNo(), null);
if (!list.isEmpty())
throw new ServiceException("身份证号不能重复");
ycsb.setCreateBy(createBy); ycsb.setCreateBy(createBy);
ycsb.setCreateTime(DateUtils.getNowDate()); ycsb.setCreateTime(DateUtils.getNowDate());
return ycsbMapper.insertYcsb(ycsb); return ycsbMapper.insertYcsb(ycsb);
...@@ -88,6 +90,9 @@ public class YcsbServiceImpl implements IYcsbService ...@@ -88,6 +90,9 @@ public class YcsbServiceImpl implements IYcsbService
String createBy = DataUtils.getValue(ycsb.getArea(), ycsb.getStreet(), ycsb.getCommittee()); String createBy = DataUtils.getValue(ycsb.getArea(), ycsb.getStreet(), ycsb.getCommittee());
if(createBy.equals("null")) if(createBy.equals("null"))
throw new ServiceException("所选居住地、街道、社区不存在"); throw new ServiceException("所选居住地、街道、社区不存在");
List<Ycsb> list = ycsbMapper.selectYcsbByCard(ycsb.getCardNo(),ycsb.getId());
if (!list.isEmpty())
throw new ServiceException("身份证号不能重复");
ycsb.setCreateBy(createBy); ycsb.setCreateBy(createBy);
ycsb.setUpdateTime(DateUtils.getNowDate()); ycsb.setUpdateTime(DateUtils.getNowDate());
return ycsbMapper.updateYcsb(ycsb); return ycsbMapper.updateYcsb(ycsb);
...@@ -141,7 +146,7 @@ public class YcsbServiceImpl implements IYcsbService ...@@ -141,7 +146,7 @@ public class YcsbServiceImpl implements IYcsbService
} else { } else {
// 校验身份证格式 // 校验身份证格式
if (CheckUtils.checkCard(ycsb.getCardNo())) { if (CheckUtils.checkCard(ycsb.getCardNo())) {
ycsb.setCheckCard("1"); ycsb.setCheckCard("正确");
// 校验手机号格式 // 校验手机号格式
if (!CheckUtils.checkPhone(ycsb.getPhone())) { if (!CheckUtils.checkPhone(ycsb.getPhone())) {
failureList.add(ycsb); failureList.add(ycsb);
...@@ -187,7 +192,7 @@ public class YcsbServiceImpl implements IYcsbService ...@@ -187,7 +192,7 @@ public class YcsbServiceImpl implements IYcsbService
trueList.add(ycsb); trueList.add(ycsb);
} }
} else { } else {
ycsb.setCheckCard("0"); ycsb.setCheckCard("不正确");
failureList.add(ycsb); failureList.add(ycsb);
} }
} }
...@@ -198,7 +203,7 @@ public class YcsbServiceImpl implements IYcsbService ...@@ -198,7 +203,7 @@ public class YcsbServiceImpl implements IYcsbService
if (!trueList.isEmpty()) { if (!trueList.isEmpty()) {
for (Ycsb ycsb : trueList) { for (Ycsb ycsb : trueList) {
// 校验身份证号是否重复(数据库验证) // 校验身份证号是否重复(数据库验证)
List<Ycsb> ycsbList = ycsbMapper.selectYcsbByCard(ycsb.getCardNo()); List<Ycsb> ycsbList = ycsbMapper.selectYcsbByCard(ycsb.getCardNo(),null);
if ("是".equals(ycsb.getHasAcid())) { if ("是".equals(ycsb.getHasAcid())) {
ycsb.setHasAcid("0"); ycsb.setHasAcid("0");
} else if ("否".equals(ycsb.getHasAcid())) { } else if ("否".equals(ycsb.getHasAcid())) {
...@@ -230,7 +235,7 @@ public class YcsbServiceImpl implements IYcsbService ...@@ -230,7 +235,7 @@ public class YcsbServiceImpl implements IYcsbService
@Override @Override
public List<Ycsb> checkCard(Ycsb ycsb) { public List<Ycsb> checkCard(Ycsb ycsb) {
return ycsbMapper.selectYcsbByCard(ycsb.getCardNo()); return ycsbMapper.selectYcsbByCard(ycsb.getCardNo(), ycsb.getId());
} }
} }
...@@ -116,7 +116,9 @@ ...@@ -116,7 +116,9 @@
</select> </select>
<select id="checkCard" resultType="com.ruoyi.system.domain.Hscj" <select id="checkCard" resultType="com.ruoyi.system.domain.Hscj"
parameterType="com.ruoyi.system.domain.Hscj"> parameterType="com.ruoyi.system.domain.Hscj">
select id from hscj where del_flag ='0' and card_no=#{cardNo} and date_format(cj_time,'%y%m%d') = date_format(#{cjTime},'%y%m%d') select id from hscj where del_flag ='0' and card_no=#{cardNo}
and date_format(cj_time,'%y%m%d') = date_format(#{cjTime},'%y%m%d')
<if test="id != null">and id != #{id}</if>
</select> </select>
<insert id="insertHscj" parameterType="Hscj" useGeneratedKeys="true" keyProperty="id"> <insert id="insertHscj" parameterType="Hscj" useGeneratedKeys="true" keyProperty="id">
......
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
<select id="selectYcsbByCard" resultType="com.ruoyi.system.domain.Ycsb"> <select id="selectYcsbByCard" resultType="com.ruoyi.system.domain.Ycsb">
<include refid="selectYcsbVo"/> <include refid="selectYcsbVo"/>
where del_flag = '0' and card_no = #{cardNo} where del_flag = '0' and card_no = #{cardNo}
<if test="id != null">and id != #{id}</if>
</select> </select>
<insert id="insertYcsb" parameterType="Ycsb" useGeneratedKeys="true" keyProperty="id"> <insert id="insertYcsb" parameterType="Ycsb" useGeneratedKeys="true" keyProperty="id">
......
...@@ -1021,10 +1021,14 @@ export default { ...@@ -1021,10 +1021,14 @@ export default {
} }
cardGetInfo(params).then(response => { cardGetInfo(params).then(response => {
if(response.code === 200) { if(response.code === 200) {
this.$message({ message: '数据查询成功', type: 'success' }) if(response.data.card === true) {
this.form.glPlace = response.data.glPlace this.$message({ message: '数据查询成功', type: 'success' })
this.form.fcName = response.data.fcName this.form.glPlace = response.data.glPlace
this.form.glName = response.data.glName this.form.fcName = response.data.fcName
this.form.glName = response.data.glName
}else {
this.$message({ message: '该身份证号码已存在', type: 'warning' })
}
} }
}); });
} }
......
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