From 72fbdd1373b9bd076dca6cc1de9304628fa43b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B2=E6=A0=91=E9=80=9A?= <1976590620@qq.com> Date: Wed, 11 Mar 2020 20:31:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=A1=E9=AA=8C=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD=E8=AF=81=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/GridOperatorInfoController.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/controller/GridOperatorInfoController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/controller/GridOperatorInfoController.java index c23ace98d..3679e8020 100755 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/controller/GridOperatorInfoController.java +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/controller/GridOperatorInfoController.java @@ -32,6 +32,7 @@ import com.elink.esua.epdc.dto.consult.form.GridOperatorListFormDTO; import com.elink.esua.epdc.dto.consult.result.GridOperatorListResultDTO; import com.elink.esua.epdc.modules.consult.excel.GridOperatorInfoExcel; import com.elink.esua.epdc.modules.consult.service.GridOperatorInfoService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -71,9 +72,11 @@ public class GridOperatorInfoController { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); //校验身份证 - String idenNoMsg = IdentityNoUtils.IdentityNoVerification(dto.getIdentityNo()); - if (idenNoMsg != null) { - return new Result().error(idenNoMsg); + if(StringUtils.isNotBlank(dto.getIdentityNo())){ + String idenNoMsg = IdentityNoUtils.IdentityNoVerification(dto.getIdentityNo()); + if (idenNoMsg != null) { + return new Result().error(idenNoMsg); + } } dto.setShowFlag("0"); gridOperatorInfoService.save(dto); @@ -85,9 +88,11 @@ public class GridOperatorInfoController { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); //校验身份证 - String idenNoMsg = IdentityNoUtils.IdentityNoVerification(dto.getIdentityNo()); - if (idenNoMsg != null) { - return new Result().error(idenNoMsg); + if(StringUtils.isNotBlank(dto.getIdentityNo())){ + String idenNoMsg = IdentityNoUtils.IdentityNoVerification(dto.getIdentityNo()); + if (idenNoMsg != null) { + return new Result().error(idenNoMsg); + } } gridOperatorInfoService.update(dto); return new Result();