|
|
@@ -1,5 +1,6 @@
|
|
|
package com.jpsoft.employment.modules.base.controller;
|
|
|
|
|
|
+import cn.hutool.core.util.IdcardUtil;
|
|
|
import com.github.pagehelper.Page;
|
|
|
import com.jpsoft.employment.config.OSSConfig;
|
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
|
@@ -7,6 +8,7 @@ import com.jpsoft.employment.modules.common.utils.DES3;
|
|
|
import com.jpsoft.employment.modules.common.utils.OSSUtil;
|
|
|
import com.jpsoft.employment.modules.common.utils.POIUtils;
|
|
|
import com.jpsoft.employment.modules.common.utils.PojoUtils;
|
|
|
+import com.jpsoft.employment.modules.common.utils.IdCardUtils;
|
|
|
import com.jpsoft.employment.modules.common.dto.Sort;
|
|
|
import com.jpsoft.employment.modules.base.entity.PersonInfo;
|
|
|
import com.jpsoft.employment.modules.base.service.PersonInfoService;
|
|
|
@@ -460,6 +462,15 @@ public class PersonInfoController {
|
|
|
personInfo.setUpdateBy(subject);
|
|
|
personInfo.setUpdateTime(new Date());
|
|
|
|
|
|
+ if(StringUtils.isNotEmpty(personInfo.getIdCard())){
|
|
|
+ int gender = IdcardUtil.getGenderByIdCard(personInfo.getIdCard());
|
|
|
+ int age = IdcardUtil.getAgeByIdCard(personInfo.getIdCard());
|
|
|
+
|
|
|
+ personInfo.setGender(String.valueOf(gender));
|
|
|
+ personInfo.setAge(age);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
int affectCount = personInfoService.update(personInfo);
|
|
|
|
|
|
if (affectCount > 0) {
|