Commit 6f3c8573 authored by zhuangxinwei's avatar zhuangxinwei

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

parents ed6bbe48 96922d91
......@@ -157,4 +157,14 @@ public class HscjController extends BaseController
{
return toAjax(hscjService.deleteHscjByIds(ids));
}
/**
* 校验身份证号在采集时间内是否重复
*/
@GetMapping("/checkCard")
public AjaxResult checkCard(Hscj hscj)
{
List<Hscj> list = hscjService.checkCard(hscj);
return AjaxResult.success(list.isEmpty());
}
}
......@@ -8,6 +8,7 @@ import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.utils.DictUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.Fkqk;
import com.ruoyi.system.domain.Hscj;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -153,4 +154,14 @@ public class YcsbController extends BaseController
List<Ycsb> list = util.importExcel(file.getInputStream());
ycsbService.importList(list, response);
}
/**
* 校验身份证号是否重复
*/
@GetMapping("/checkCard")
public AjaxResult checkCard(Ycsb ycsb)
{
List<Ycsb> list = ycsbService.checkCard(ycsb);
return AjaxResult.success(list.isEmpty());
}
}
......@@ -58,4 +58,6 @@ public interface HscjMapper
* @return 结果
*/
public int deleteHscjByIds(Long[] ids);
List<Hscj> checkCard(Hscj hscj);
}
......@@ -65,4 +65,5 @@ public interface YcsbMapper
* @return
*/
List<Ycsb> selectYcsbByCard(String cardNo);
}
......@@ -63,4 +63,6 @@ public interface IHscjService
public int deleteHscjById(Long id);
void importList(List<Hscj> list, HttpServletResponse response);
List<Hscj> checkCard(Hscj hscj);
}
......@@ -67,4 +67,6 @@ public interface IYcsbService
* @param response
*/
void importList(List<Ycsb> list, HttpServletResponse response);
List<Ycsb> checkCard(Ycsb ycsb);
}
......@@ -267,4 +267,10 @@ public class HscjServiceImpl implements IHscjService {
util.exportExcel(response, failureList, "核算采集错误数据");
}
}
@Override
public List<Hscj> checkCard(Hscj hscj) {
return hscjMapper.checkCard(hscj);
}
}
......@@ -176,7 +176,7 @@ public class YcsbServiceImpl implements IYcsbService
}
if (StringUtils.isNotEmpty(ycsb.getCommunity())) {
List<SysDictData> communties = DictUtils.getDictCache("community");
List<String> values = this.checkParam(communties, ycsb.getCommittee());
List<String> values = this.checkParam(communties, ycsb.getCommunity());
if (values.isEmpty()) {
failureList.add(ycsb);
continue;
......@@ -212,6 +212,7 @@ public class YcsbServiceImpl implements IYcsbService
ycsb.setCreateTime(DateUtils.getNowDate());
if (ycsbList.size() > 0) {
ycsbMapper.updateYcsb(ycsb);
continue;
}
ycsbMapper.insertYcsb(ycsb);
}
......@@ -226,4 +227,10 @@ public class YcsbServiceImpl implements IYcsbService
return dicList.stream().filter(i -> str.equals(i.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList());
}
@Override
public List<Ycsb> checkCard(Ycsb ycsb) {
return ycsbMapper.selectYcsbByCard(ycsb.getCardNo());
}
}
......@@ -243,6 +243,7 @@ public class YxryServiceImpl implements IYxryService {
@Override
public Map selectByCard(String card) {
List<Yxry> zlqks = yxryMapper.selectYxryByCard(card);
Map map = new HashMap();
// 根据身份证号查询方舱人员信息
Fcry fcry = new Fcry();
......@@ -280,6 +281,7 @@ public class YxryServiceImpl implements IYxryService {
map.put("fcName", null);
map.put("glName", gldryList.stream().map(Gldry::getGlPlace).collect(Collectors.toList()));
}
map.put("card",zlqks.isEmpty());
return map;
}
}
......@@ -114,6 +114,10 @@
<include refid="selectHscjVo"/>
where id = #{id}
</select>
<select id="checkCard" resultType="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>
<insert id="insertHscj" parameterType="Hscj" useGeneratedKeys="true" keyProperty="id">
insert into hscj
......
......@@ -316,8 +316,8 @@
<el-col :span="12">
<el-form-item label="是否阳性" prop="isYx">
<el-select v-model="form.isYx" placeholder="请选择是否阳性" style="width: 100%">
<el-option value="" label="阳"></el-option>
<el-option value="" label="未阳"></el-option>
<el-option value="0" label="阳"></el-option>
<el-option value="1" label="未阳"></el-option>
</el-select>
</el-form-item>
</el-col>
......
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