Bläddra i källkod

人员信息身份证验证调整

徐滕 4 dagar sedan
förälder
incheckning
c515d157f3

+ 2 - 2
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/controller/EnrollmentRegistrationController.java

@@ -495,8 +495,8 @@ public class EnrollmentRegistrationController {
      */
     @ApiOperation(value = "查询身份证号码唯一性")
     @GetMapping("/findIdCardOnly")
-    public ResponseEntity<Integer> findIdCardOnly(@RequestParam String idCard) throws Exception{
-        Integer idCardOnly = service.findIdCardOnly(idCard);
+    public ResponseEntity<Integer> findIdCardOnly(@RequestParam String idCard, @RequestParam String id) throws Exception{
+        Integer idCardOnly = service.findIdCardOnly(idCard,id);
         return ResponseEntity.ok(idCardOnly);
     }
 

+ 5 - 1
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentRegistrationService.java

@@ -702,10 +702,14 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
         return "操作成功";
     }
 
-    public Integer findIdCardOnly(String idCard) throws Exception {
+    public Integer findIdCardOnly(String idCard, String id) throws Exception {
         QueryWrapper<EnrollmentRegistration> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("id_card", idCard);
         queryWrapper.eq("del_flag", 0);
+        if(StringUtils.isNotBlank(id)){
+            queryWrapper.ne("id", id);
+        }
+
         // 删除基础信息表
         Integer integer = mapper.selectCount(queryWrapper);
         return integer;