Преглед изворни кода

web-求职人员导入功能实现

liao-sea пре 11 месеци
родитељ
комит
de1361dd8f

+ 1 - 1
src/main/java/com/hz/employmentsite/controller/jobUserManager/JobHuntController.java

@@ -104,7 +104,7 @@ public class JobHuntController {
     }
     }
 
 
     @PostMapping("/importJobHunt")
     @PostMapping("/importJobHunt")
-    public BaseResponse<Object> importPost(@RequestBody List<JobHuntVo> dataList) {
+    public BaseResponse<Object> importJobHunt(@RequestBody List<JobHuntVo> dataList) {
         List<JobHuntVo> result = jobhuntService.importJobHunt(dataList, accountService.getLoginUserID());
         List<JobHuntVo> result = jobhuntService.importJobHunt(dataList, accountService.getLoginUserID());
         if (result != null && result.size() > 0) {
         if (result != null && result.size() > 0) {
             return RespGenerstor.importFail(BaseErrorEnum.IMPORT_DATA_ERROR, result);
             return RespGenerstor.importFail(BaseErrorEnum.IMPORT_DATA_ERROR, result);

+ 9 - 0
src/main/java/com/hz/employmentsite/controller/jobUserManager/JobUserController.java

@@ -149,6 +149,15 @@ public class JobUserController {
         return RespGenerstor.success(1);
         return RespGenerstor.success(1);
     }
     }
 
 
+    @PostMapping("/importJobUser")
+    public BaseResponse<Object> importJobUser(@RequestBody List<JobUserVo> dataList) {
+        List<JobUserVo> result = jobuserService.importJobUser(dataList, accountService.getLoginUserID());
+        if (result != null && result.size() > 0) {
+            return RespGenerstor.importFail(BaseErrorEnum.IMPORT_DATA_ERROR, result);
+        } else {
+            return RespGenerstor.success(true);
+        }
+    }
 
 
     @GetMapping("/export")
     @GetMapping("/export")
     public BaseResponse export(HttpServletResponse response, @RequestParam(required = false) Boolean isExport,
     public BaseResponse export(HttpServletResponse response, @RequestParam(required = false) Boolean isExport,

+ 354 - 0
src/main/java/com/hz/employmentsite/services/impl/jobUserManager/JobUserServiceImpl.java

@@ -8,8 +8,10 @@ import com.hz.employmentsite.mapper.cquery.JobUserCQuery;
 import com.hz.employmentsite.mapper.cquery.LabelCQuery;
 import com.hz.employmentsite.mapper.cquery.LabelCQuery;
 import com.hz.employmentsite.model.*;
 import com.hz.employmentsite.model.*;
 import com.hz.employmentsite.services.service.jobUserManager.JobUserService;
 import com.hz.employmentsite.services.service.jobUserManager.JobUserService;
+import com.hz.employmentsite.services.service.system.DictionaryService;
 import com.hz.employmentsite.util.DateUtils;
 import com.hz.employmentsite.util.DateUtils;
 import com.hz.employmentsite.util.StringUtils;
 import com.hz.employmentsite.util.StringUtils;
+import com.hz.employmentsite.vo.jobUserManager.JobHuntVo;
 import com.hz.employmentsite.vo.jobUserManager.JobUserVo;
 import com.hz.employmentsite.vo.jobUserManager.JobUserVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -17,6 +19,9 @@ import org.springframework.stereotype.Service;
 import java.text.ParseException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
 
 
 @Service("JobUserService")
 @Service("JobUserService")
 public class JobUserServiceImpl implements JobUserService {
 public class JobUserServiceImpl implements JobUserService {
@@ -27,6 +32,9 @@ public class JobUserServiceImpl implements JobUserService {
     private StringUtils stringUtils;
     private StringUtils stringUtils;
     @Autowired
     @Autowired
     private DateUtils dateUtils;
     private DateUtils dateUtils;
+
+    @Autowired
+    private DictionaryService dictionaryService;
     @Autowired
     @Autowired
     private PcEducationMapper pcEducationMapper;
     private PcEducationMapper pcEducationMapper;
     @Autowired
     @Autowired
@@ -40,8 +48,14 @@ public class JobUserServiceImpl implements JobUserService {
     @Autowired
     @Autowired
     private PcSiteUserMapper pcSiteUserMapper;
     private PcSiteUserMapper pcSiteUserMapper;
     @Autowired
     @Autowired
+    private PcSiteMapper pcSiteMapper;
+    @Autowired
     private PcLabelJobuserMapper pcLabelJobuserMapper;
     private PcLabelJobuserMapper pcLabelJobuserMapper;
     @Autowired
     @Autowired
+    private PcOccupationalMapper pcOccupationalMapper;
+    @Autowired
+    private AreaCodeMapper areaCodeMapper;
+    @Autowired
     private LabelCQuery labelCQuery;
     private LabelCQuery labelCQuery;
 
 
     @Override
     @Override
@@ -530,4 +544,344 @@ public class JobUserServiceImpl implements JobUserService {
         return result;
         return result;
     }
     }
 
 
+    //验证身份证号是否合法
+    private boolean identityNumberIsValid(String idNumber) {
+        if (idNumber == null || (idNumber.length() != 18 && idNumber.length() != 15)) {
+            return false;
+        }
+        // 校验18位身份证
+        if (idNumber.length() == 18) {
+            String[] idInfo = idNumber.substring(0, 17).split("");
+            String birth = idInfo[6] + idInfo[7] + '-' + idInfo[8] + idInfo[9] + '-' + idInfo[10] + idInfo[11];
+            try {
+                if (!idInfo[12].equals("19") && !idInfo[12].equals("20")) {
+                    return false;
+                }
+                java.time.LocalDate.parse(birth, java.time.format.DateTimeFormatter.ISO_DATE);
+            } catch (Exception e) {
+                return false;
+            }
+
+            int sum = 0;
+            int[] weights = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2};
+            char[] checkCode = {'1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'};
+            for (int i = 0; i < 17; i++) {
+                sum += Integer.parseInt(idInfo[i]) * weights[i];
+            }
+            return idInfo[17].equals(String.valueOf(checkCode[sum % 11]));
+        }
+
+        return true;
+    }
+
+    //验证手机号是否合法
+    private boolean userMobileIsValid(String mobile) {
+        // 中国手机号码长度为11位,且符合以下格式:13x, 14x, 15x, 17x, 18x
+        String mobile_Regex = "^(13[0-9]|14[57]|15[0-35-9]|17[0-9]|18[0-9])\\d{8}$";
+        return mobile.matches(mobile_Regex);
+    }
+
+    private boolean userEmailIsValid(String email){
+        String email_Regex =  "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
+        Pattern pattern = Pattern.compile(email_Regex);
+        Matcher matcher = pattern.matcher(email);
+        return matcher.matches();
+    }
+
+    @Override
+    public List<JobUserVo> importJobUser(List<JobUserVo> dataList, String userID) {
+        if (dataList.size() <= 0)
+            throw new BaseException("", "请添加导入数据!");
+        //性别
+        List<SysDictionaryItem> dicJobUserGenderList = dictionaryService.getDictionaryItemList("Gender");
+        //重点人员类别
+        List<SysDictionaryItem> dicKeyPersonTypeList = dictionaryService.getDictionaryItemList("KeyPersonType");
+        //就业状态
+        List<SysDictionaryItem> dicJobStatusList = dictionaryService.getDictionaryItemList("JobStatus");
+        //所属驿站
+        PcSite curLoginUserSiteInfo = null;
+        PcSiteUserExample siteUserExp = new PcSiteUserExample();
+        siteUserExp.or().andUserIDEqualTo(userID);
+        PcSiteUser curLoginSiteUser = pcSiteUserMapper.selectByExample(siteUserExp).stream().findFirst().orElse(null);
+        if(curLoginSiteUser==null){
+            throw new BaseException("", "未能查询到当前登录人的驿站信息!");
+        }else{
+            PcSiteExample siteExp = new PcSiteExample();
+            siteExp.or().andSiteIDEqualTo(curLoginSiteUser.getSiteID());
+            curLoginUserSiteInfo = pcSiteMapper.selectByExample(siteExp).stream().findFirst().orElse(null);
+        }
+        //是否全日制
+        List<SysDictionaryItem> dicIsFullTimeList = dictionaryService.getDictionaryItemList("IsFullTime");
+        //职业资格类别
+        List<SysDictionaryItem> secondLevelOcCategoryList = new ArrayList<>();
+        PcOccupationalExample occupationalExp = new PcOccupationalExample();
+        occupationalExp.or().andParentOccupationalIDEqualTo("").andStatusEqualTo(1);
+        var firstLevelData = pcOccupationalMapper.selectByExample(occupationalExp);
+        for (PcOccupational curOccupational : firstLevelData) {
+            occupationalExp = new PcOccupationalExample();
+            occupationalExp.or().andParentOccupationalIDEqualTo(curOccupational.getOccupationalID()).andStatusEqualTo(1);
+            var secondLevelData = pcOccupationalMapper.selectByExample(occupationalExp);
+            for (PcOccupational curChildOccupational : secondLevelData) {
+                SysDictionaryItem item = new SysDictionaryItem();
+                item.setCode(curChildOccupational.getOccupationalID());
+                item.setName(curChildOccupational.getOccupationalName());
+                secondLevelOcCategoryList.add(item);
+            }
+        }
+        //职业资格等级
+        List<SysDictionaryItem> dicOcclLevelList = dictionaryService.getDictionaryItemList("OccupationalLevel");
+        //民族
+        List<SysDictionaryItem> dicNationTypeList = dictionaryService.getDictionaryItemList("NationType");
+        //政治面貌
+        List<SysDictionaryItem> dicPoliticsTypeList = dictionaryService.getDictionaryItemList("PoliticsStatus");
+        //户口性质
+        List<SysDictionaryItem> dicFamilyNatureList = dictionaryService.getDictionaryItemList("FamilyNature");
+        //最高学历
+        List<SysDictionaryItem> dicHighestDegreeList = dictionaryService.getDictionaryItemList("HighestDegree");
+        //健康状况
+        List<SysDictionaryItem> dicHealthTypeList = dictionaryService.getDictionaryItemList("Health");
+        //婚姻状况
+        List<SysDictionaryItem> dicMaritalStatusList = dictionaryService.getDictionaryItemList("MaritalStatus");
+        //市/县
+        List<SysDictionaryItem> regionDataList = new ArrayList<>();
+        AreaCodeExample regionExp= new AreaCodeExample();
+        regionExp.or().andFidEqualTo("441300000000000").andLvEqualTo("3");
+        var thirdLevelRegionList = areaCodeMapper.selectByExample(regionExp);
+        for (AreaCode curRegionData : thirdLevelRegionList) {
+            SysDictionaryItem item = new SysDictionaryItem();
+            item.setCode(curRegionData.getCode());
+            item.setName(curRegionData.getName());
+            regionDataList.add(item);
+        }
+        //镇街
+        List<SysDictionaryItem> streetDataList = new ArrayList<>();
+        AreaCodeExample streetExp= new AreaCodeExample();
+        streetExp.or().andLvEqualTo("4");
+        var forthLevelStreetList = areaCodeMapper.selectByExample(streetExp);
+        for (AreaCode curStreetData : forthLevelStreetList) {
+            SysDictionaryItem item = new SysDictionaryItem();
+            item.setCode(curStreetData.getCode());
+            item.setName(curStreetData.getName());
+            streetDataList.add(item);
+        }
+
+        List<JobUserVo> resultList = new ArrayList<>();
+        PcSite finalCurLoginUserSiteInfo = curLoginUserSiteInfo;
+        dataList.forEach(item -> {
+            String errorInfo = "";
+            item.setJobUserID(UUID.randomUUID().toString());
+            var repeatResult = ifHadRepeatData(item);
+            switch (repeatResult){
+                default:
+                case 0:
+                    break;
+                case 1:
+                    errorInfo += "身份证号码已存在!";
+                case 2:
+                    errorInfo += "联系电话已存在!";
+                case 3:
+                    errorInfo += "身份证号码、联系电话重复!";
+                case 4:
+                    errorInfo += "社保卡已绑定其他人员!";
+                case 5:
+                    errorInfo += "身份证号码、社保卡号重复!";
+                case 6:
+                    errorInfo += "联系电话、社保卡号重复!";
+                case 7:
+                    errorInfo += "身份证号码、联系电话、社保卡号重复!";
+            }
+
+            if (stringUtils.IsNullOrEmpty(item.getName())){
+                errorInfo += "请填写姓名!";
+            }
+
+            if (stringUtils.IsNullOrEmpty(item.getIdentityNumber()))
+                errorInfo += "请填写身份证号码!";
+            else{
+                if(identityNumberIsValid(item.getIdentityNumber())) {
+                    var birthDay = dateUtils.StrToDate(item.getIdentityNumber().substring(6,14));
+                    var sexStr = Integer.parseInt(item.getIdentityNumber().substring(16,17));
+                    if(!stringUtils.IsNullOrEmpty(item.getBirthDayStr())){
+                        if(birthDay!=dateUtils.StrToDate(item.getBirthDayStr())){
+                            errorInfo += "出生日期与身份证号不匹配!";
+                        }
+                    }else{
+                        item.setBirthDay(birthDay);
+                    }
+                    if(!stringUtils.IsNullOrEmpty(item.getSexName())){
+                        if((sexStr%2==0&&item.getSexName()=="男")||(sexStr%2!=0&&item.getSexName()=="女")){
+                            errorInfo += "性别与身份证号不匹配!";
+                        }
+                    }
+                }else{
+                    errorInfo += "身份证号码不合法!";
+                }
+            }
+
+            if (stringUtils.IsNullOrEmpty(item.getSexName()))
+                errorInfo += "请选择性别!";
+            else {
+                item.setSex(dicJobUserGenderList.stream().filter(it -> it.getName().equals(item.getSexName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getValue());
+                if (item.getSex() == null || item.getSex() == 0)
+                    errorInfo += "性别不存在!";
+            }
+
+            if (stringUtils.IsNullOrEmpty(item.getKeyPersonTypeName()))
+                errorInfo += "请选择重点人员类别!";
+            else {
+                item.setKeyPersonTypeID(dicKeyPersonTypeList.stream().filter(it -> it.getName().equals(item.getKeyPersonTypeName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getValue());
+                if (item.getKeyPersonTypeID() == null || item.getKeyPersonTypeID() == 0)
+                    errorInfo += "重点人员类别不存在!";
+            }
+
+            if (stringUtils.IsNullOrEmpty(item.getJobStatusName()))
+                errorInfo += "请选择就业状态!";
+            else {
+                item.setJobStatusID(dicJobStatusList.stream().filter(it -> it.getName().equals(item.getJobStatusName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getValue());
+                if (item.getJobStatusID() == null || item.getJobStatusID() == 0)
+                    errorInfo += "就业状态不存在!";
+            }
+
+            if (stringUtils.IsNullOrEmpty(item.getSiteName()))
+                errorInfo += "请填写所属驿站!";
+            else {
+                if (finalCurLoginUserSiteInfo!=null){
+                    if(item.getSiteName()!= finalCurLoginUserSiteInfo.getSiteName()){
+                        errorInfo += "请填写您所在的驿站名称!";
+                    }else{
+                        item.setSiteID(finalCurLoginUserSiteInfo.getSiteID());
+                    }
+                }
+            }
+
+            if (stringUtils.IsNullOrEmpty(item.getAddress()))
+                errorInfo += "请填写地址!";
+
+            if (stringUtils.IsNullOrEmpty(item.getUserMobile()))
+                errorInfo += "请填写联系电话!";
+            else{
+                if(!userMobileIsValid(item.getUserMobile())){
+                    errorInfo += "联系电话不合法!";
+                }
+            }
+
+            if (!stringUtils.IsNullOrEmpty(item.getIsFullTimeName())){
+                item.setIsFullTime(dicIsFullTimeList.stream().filter(it -> it.getName().equals(item.getIsFullTimeName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getValue());
+                if (item.getIsFullTime() == null || item.getIsFullTime() == 0)
+                    errorInfo += "是否全日制不存在!";
+            }
+
+            if (!stringUtils.IsNullOrEmpty(item.getOccupationalCategoryName())){
+                item.setOccupationalCategory(secondLevelOcCategoryList.stream().filter(it -> it.getName().equals(item.getOccupationalCategoryName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getCode());
+                if (item.getOccupationalCategory() == null)
+                    errorInfo += "职业资格类别不存在!";
+            }
+
+            if (!stringUtils.IsNullOrEmpty(item.getOccupationalLevelName())) {
+                item.setOccupationalLevel(dicOcclLevelList.stream().filter(it -> it.getName().equals(item.getOccupationalLevelName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getValue());
+                if (item.getOccupationalLevel() == null || item.getOccupationalLevel() == 0)
+                    errorInfo += "职业资格等级不存在!";
+            }
+
+            if (!stringUtils.IsNullOrEmpty(item.getNationName())) {
+                item.setNation(dicNationTypeList.stream().filter(it -> it.getName().equals(item.getNationName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getValue());
+                if (item.getNation() == null || item.getNation() == 0)
+                    errorInfo += "民族不存在!";
+            }
+
+            if (!stringUtils.IsNullOrEmpty(item.getPoliticsStatusName())) {
+                item.setPoliticsStatusID(dicPoliticsTypeList.stream().filter(it -> it.getName().equals(item.getPoliticsStatusName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getValue());
+                if (item.getPoliticsStatusID() == null || item.getPoliticsStatusID() == 0)
+                    errorInfo += "政治面貌不存在!";
+            }
+
+            if (!stringUtils.IsNullOrEmpty(item.getFamilyNatureName())) {
+                item.setFamilyNatureID(dicFamilyNatureList.stream().filter(it -> it.getName().equals(item.getFamilyNatureName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getValue());
+                if (item.getFamilyNatureID() == null || item.getFamilyNatureID() == 0)
+                    errorInfo += "户口性质不存在!";
+            }
+
+            if (!stringUtils.IsNullOrEmpty(item.getCultureRankName())) {
+                item.setCultureRank(dicHighestDegreeList.stream().filter(it -> it.getName().equals(item.getCultureRankName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getValue());
+                if (item.getCultureRank() == null || item.getCultureRank() == 0)
+                    errorInfo += "最高学历不存在!";
+            }
+
+            if (!stringUtils.IsNullOrEmpty(item.getHealthName())) {
+                item.setHealthID(dicHealthTypeList.stream().filter(it -> it.getName().equals(item.getHealthName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getValue());
+                if (item.getHealthID() == null || item.getHealthID() == 0)
+                    errorInfo += "健康状况不存在!";
+            }
+
+            if (!stringUtils.IsNullOrEmpty(item.getMaritalStatusName())) {
+                item.setMaritalStatusID(dicMaritalStatusList.stream().filter(it -> it.getName().equals(item.getMaritalStatusName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getValue());
+                if (item.getMaritalStatusID() == null || item.getMaritalStatusID() == 0)
+                    errorInfo += "婚姻状况不存在!";
+            }
+
+            if (!stringUtils.IsNullOrEmpty(item.getEmail())) {
+                if (!userEmailIsValid(item.getEmail()))
+                    errorInfo += "电子邮箱不合法!";
+            }
+
+            if (!stringUtils.IsNullOrEmpty(item.getProvinceName())) {
+                if((item.getProvinceName().trim()).equals("广东省")){
+                    item.setProvinceCode("440000000000000");
+                }else{
+                    errorInfo += "省份不存在!";
+                }
+            }
+
+            if (!stringUtils.IsNullOrEmpty(item.getRegionName())) {
+                item.setRegionCode(regionDataList.stream().filter(it -> it.getName().equals(item.getRegionName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getCode());
+                if (item.getRegionCode() == null)
+                    errorInfo += "市/县不存在!";
+            }
+
+            if (!stringUtils.IsNullOrEmpty(item.getStreetName())) {
+                item.setStreetCode(streetDataList.stream().filter(it -> it.getName().equals(item.getStreetName().trim()))
+                        .findFirst().orElse(new SysDictionaryItem()).getCode());
+                if (item.getStreetCode() == null)
+                    errorInfo += "镇街不存在!";
+                else{
+                    if (stringUtils.IsNullOrEmpty(item.getRegionName())){
+                        errorInfo += "请选择相关市/县!";
+                    }else{
+                        AreaCodeExample curStreetExp = new AreaCodeExample();
+                        streetExp.or().andCodeEqualTo(item.getStreetCode());
+                        var curStreetReginCode = areaCodeMapper.selectByExample(curStreetExp).get(0).getFid();
+                        if(item.getRegionCode()!= null&&curStreetReginCode!=item.getRegionCode()){
+                            errorInfo += "镇街不属于当前市/县!";
+                        }
+                    }
+                }
+            }
+
+            if (stringUtils.IsNullOrEmpty(errorInfo)) {
+                resultList.add(item);
+            } else {
+                item.setErrorMessage(errorInfo);
+            }
+        });
+
+        if (dataList.stream().filter(it -> !stringUtils.IsNullOrEmpty(it.errorMessage)).collect(Collectors.toList()).size() > 0)
+            return dataList;
+        resultList.forEach(item -> {
+            save(item, userID);
+        });
+        return null;
+    }
 }
 }

+ 3 - 0
src/main/java/com/hz/employmentsite/services/service/jobUserManager/JobUserService.java

@@ -5,6 +5,7 @@ import com.hz.employmentsite.model.PcEducation;
 import com.hz.employmentsite.model.PcExperience;
 import com.hz.employmentsite.model.PcExperience;
 import com.hz.employmentsite.model.PcPost;
 import com.hz.employmentsite.model.PcPost;
 import com.hz.employmentsite.model.SelectProps;
 import com.hz.employmentsite.model.SelectProps;
+import com.hz.employmentsite.vo.jobUserManager.JobHuntVo;
 import com.hz.employmentsite.vo.jobUserManager.JobUserVo;
 import com.hz.employmentsite.vo.jobUserManager.JobUserVo;
 
 
 import java.util.Date;
 import java.util.Date;
@@ -35,4 +36,6 @@ public interface JobUserService {
     int save(JobUserVo data, String userId);
     int save(JobUserVo data, String userId);
 
 
     int baseInfoSave(JobUserVo data, String userId);
     int baseInfoSave(JobUserVo data, String userId);
+
+    List<JobUserVo> importJobUser(List<JobUserVo> dataList, String userID);
 }
 }

+ 6 - 3
src/main/java/com/hz/employmentsite/vo/jobUserManager/JobUserVo.java

@@ -32,17 +32,18 @@ public class JobUserVo {
     private String engName;
     private String engName;
 
 
     private Integer sex;
     private Integer sex;
+    private String sexName;
 
 
     private Integer nation;
     private Integer nation;
     private String nationName;
     private String nationName;
 
 
     private Integer politicsStatusID;
     private Integer politicsStatusID;
-
     private String politicsStatusName;
     private String politicsStatusName;
 
 
     private String birthPlace;
     private String birthPlace;
 
 
     private Date birthDay;
     private Date birthDay;
+    private String birthDayStr;
 
 
     private Integer age;
     private Integer age;
 
 
@@ -53,13 +54,12 @@ public class JobUserVo {
     private String familyNatureName;
     private String familyNatureName;
 
 
     private Integer cultureRank;
     private Integer cultureRank;
+    private String cultureRankName;
 
 
     private Integer healthID;
     private Integer healthID;
-
     private String healthName;
     private String healthName;
 
 
     private Integer bloodTypeID;
     private Integer bloodTypeID;
-
     private String bloodTypeName;
     private String bloodTypeName;
 
 
     private String height;
     private String height;
@@ -73,6 +73,7 @@ public class JobUserVo {
     private String MaritalStatusName;
     private String MaritalStatusName;
 
 
     private String provinceCode;
     private String provinceCode;
+    private String provinceName;
 
 
     @RegionID
     @RegionID
     private String regionCode;
     private String regionCode;
@@ -100,6 +101,7 @@ public class JobUserVo {
     private Integer jobStatusID;
     private Integer jobStatusID;
 
 
     private Integer keyPersonTypeID;
     private Integer keyPersonTypeID;
+    private String keyPersonTypeName;
 
 
     private String personalSkills;
     private String personalSkills;
 
 
@@ -108,6 +110,7 @@ public class JobUserVo {
     private String modifyUserID;
     private String modifyUserID;
     private String modifyUserName;
     private String modifyUserName;
     private Date modifyTime;
     private Date modifyTime;
+    public String errorMessage;
 
 
     public String openId;
     public String openId;
 
 

BIN
src/main/resources/static/doc/template/求职人员导入模板.xlsx


+ 1 - 1
vue/src/views/jobUserManager/jobuser/edit.vue

@@ -133,7 +133,7 @@
       </a-row>
       </a-row>
       <a-row :gutter="24">
       <a-row :gutter="24">
         <a-col :span="8">
         <a-col :span="8">
-          <a-form-item label="是否全日制" :label-col="{ span: 6 }" name="socialSecurityCard">
+          <a-form-item label="是否全日制" :label-col="{ span: 6 }" name="isFullTime">
             <a-select ref="select" v-model:value="dataModel.isFullTime" :options="isFullTimeList"
             <a-select ref="select" v-model:value="dataModel.isFullTime" :options="isFullTimeList"
                       :field-names="{ label: 'name', value: 'value' }" :allow-clear="false"></a-select>
                       :field-names="{ label: 'name', value: 'value' }" :allow-clear="false"></a-select>
           </a-form-item>
           </a-form-item>

+ 51 - 1
vue/src/views/jobUserManager/jobuser/index.vue

@@ -130,6 +130,10 @@
           </div>
           </div>
           <div>
           <div>
             <a-button type="primary" html-type="submit" @click='onAdd' functioncode="T01030102">新增</a-button>
             <a-button type="primary" html-type="submit" @click='onAdd' functioncode="T01030102">新增</a-button>
+            <BImportExcel functioncode="T01030105"
+                          :options="importOptions"
+                          @success="loadData"
+            ></BImportExcel>
             <BExportExcel :title="'导出'" :filename="'求职人员信息'" v-show="false"
             <BExportExcel :title="'导出'" :filename="'求职人员信息'" v-show="false"
                           :url="'jobUserService/jobUser/export'"
                           :url="'jobUserService/jobUser/export'"
                           :params="{...exportSearchParams, isExport: true, rows:10000,jobUserIDList:formState.selectedRowKeys.join(',')}"></BExportExcel>
                           :params="{...exportSearchParams, isExport: true, rows:10000,jobUserIDList:formState.selectedRowKeys.join(',')}"></BExportExcel>
@@ -176,6 +180,7 @@ import BImportExcel from "@/components/basic/excel/importExcel/importExcel.vue";
 import {getSiteList} from "@/api/baseSettings/siteInfo";
 import {getSiteList} from "@/api/baseSettings/siteInfo";
 import {get} from "@/api/common";
 import {get} from "@/api/common";
 import ColumnsSetting from "@/components/common/ColumnsSetting.vue";
 import ColumnsSetting from "@/components/common/ColumnsSetting.vue";
+import type {ImportProps} from "@/components/basic/excel/importExcel/ImportProps";
 
 
 export default defineComponent({
 export default defineComponent({
   name: 'JobUserList',
   name: 'JobUserList',
@@ -243,7 +248,51 @@ export default defineComponent({
       showSizeChanger: true,
       showSizeChanger: true,
       showTotal: (total) => getPaginationTotalTitle(total),
       showTotal: (total) => getPaginationTotalTitle(total),
     }));
     }));
-
+    const importOptions = ref<ImportProps>({
+      title: '导入',
+      url: '/jobUserService/jobUser/importJobUser',
+      columns: [
+        {cnName: '姓名', enName: 'name', width: 100},
+        {cnName: '身份证号码', enName: 'identityNumber', width: 100},
+        {cnName: '性别', enName: 'sexName', width: 100},
+        {cnName: '重点人员类别', enName: 'keyPersonTypeName', width: 100},
+        {cnName: '就业状态', enName: 'jobStatusName', width: 100},
+        {cnName: '所属驿站', enName: 'siteName', width: 100},
+        {cnName: '地址', enName: 'address', width: 100},
+        {cnName: '联系电话', enName: 'userMobile', width: 100},
+        {cnName: '联系人', enName: 'userName', width: 100},
+        {cnName: '籍贯', enName: 'nativePlace', width: 100},
+        {cnName: '社会保障卡号', enName: 'socialSecurityCard', width: 100},
+        {cnName: '毕业院校', enName: 'finishSchool', width: 100},
+        {cnName: '专业', enName: 'profession', width: 100},
+        {cnName: '是否全日制', enName: 'isFullTimeName', width: 100},
+        {cnName: '职业资格类别', enName: 'occupationalCategoryName', width: 100},
+        {cnName: '职业资格等级', enName: 'occupationalLevelName', width: 100},
+        {cnName: '民族', enName: 'nationName', width: 100},
+        {cnName: '政治面貌', enName: 'politicsStatusName', width: 100},
+        {cnName: '出生地', enName: 'birthPlace', width: 100},
+        {cnName: '出生日期', enName: 'birthDayStr', width: 100},
+        {cnName: '户口性质', enName: 'familyNatureName', width: 100},
+        {cnName: '最高学历', enName: 'cultureRankName', width: 100},
+        {cnName: '健康状况', enName: 'healthName', width: 100},
+        {cnName: '婚姻状况', enName: 'bloodTypeName', width: 100},
+        {cnName: '电子邮箱', enName: 'email', width: 100},
+        {cnName: '身高(cm)', enName: 'height', width: 100},
+        {cnName: '体重(kg)', enName: 'weight', width: 100},
+        {cnName: '视力', enName: 'vision', width: 100},
+        {cnName: '省份', enName: 'provinceName', width: 100},
+        {cnName: '市/县', enName: 'regionName', width: 100},
+        {cnName: '镇街', enName: 'streetName', width: 100},
+        {cnName: '家庭住址', enName: 'familyAddress', width: 100},
+        {cnName: '兴趣爱好', enName: 'hobby', width: 100},
+        {cnName: '个人技能', enName: 'personalSkills', width: 100},
+      ],
+      template: {
+        tempFileName: '求职人员导入模板.xlsx',
+        url: '',
+        params: null,
+      },
+    });
     const dataList = ref([]);
     const dataList = ref([]);
     const siteList = ref<any>([]);
     const siteList = ref<any>([]);
     const jobStatusList = ref<SelectProps['options']>();
     const jobStatusList = ref<SelectProps['options']>();
@@ -381,6 +430,7 @@ export default defineComponent({
       originalColumns,
       originalColumns,
       columnsCheckSub,
       columnsCheckSub,
       pagination,
       pagination,
+      importOptions,
       dataList,
       dataList,
       siteList,
       siteList,
       jobStatusList,
       jobStatusList,