|
|
@ -4,15 +4,19 @@ import com.epmet.commons.tools.annotation.LoginUser; |
|
|
|
import com.epmet.commons.tools.annotation.MaskResponse; |
|
|
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.ExcelUtils; |
|
|
|
import com.epmet.commons.tools.utils.IdCardRegexUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
|
import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.*; |
|
|
|
import com.epmet.service.IcResiCollectService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
@ -180,6 +184,18 @@ public class IcResiCollectController { |
|
|
|
//效验数据
|
|
|
|
ValidatorUtils.validateEntity(formDTO); |
|
|
|
formDTO.setOrigin("internal");//固定为内部
|
|
|
|
|
|
|
|
// 证件类型判断----start----
|
|
|
|
for (IcResiCollectMemFormDTO member : formDTO.getMemberList()) { |
|
|
|
if (StringUtils.isNotBlank(member.getIdNum())) { |
|
|
|
IdCardRegexUtils regex = IdCardRegexUtils.parse(member.getIdNum()); |
|
|
|
if (regex == null) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "证件号解析错误", "证件号解析错误"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 证件类型判断----end----
|
|
|
|
|
|
|
|
return icResiCollectService.saveCollectInfo(formDTO); |
|
|
|
} |
|
|
|
|
|
|
|