Browse Source

求职人员信息管理-新增

Liudijing 11 months ago
parent
commit
544984ade2

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

@@ -1,20 +1,29 @@
 package com.hz.employmentsite.controller.jobUserManager;
 
 import com.github.pagehelper.PageInfo;
+import com.hz.employmentsite.filter.exception.BaseErrorEnum;
+import com.hz.employmentsite.filter.exception.BaseException;
 import com.hz.employmentsite.filter.exception.BaseResponse;
 import com.hz.employmentsite.filter.exception.RespGenerstor;
+import com.hz.employmentsite.services.service.AccountService;
 import com.hz.employmentsite.services.service.jobUserManager.JobuserService;
 import com.hz.employmentsite.vo.jobUserManager.JobUserVo;
 import com.hz.employmentsite.vo.jobUserManager.JobhuntVo;
+import com.hz.employmentsite.vo.taskAndLog.DotaskVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+import java.util.UUID;
+
 @RestController
 @RequestMapping(value = "/api/Jobusermgr/Jobuser")
 public class JobuserController {
 
     @Autowired
     private JobuserService jobuserService;
+    @Autowired
+    private AccountService accountService;
 
     @ResponseBody
     @GetMapping("/getList")
@@ -22,8 +31,50 @@ public class JobuserController {
                                 @RequestParam(required = false) String name, @RequestParam(required = false) String siteId, @RequestParam(required = false) Integer jobStatus, @RequestParam(required = false) Integer sexId,
                                 @RequestParam(required = false) Integer educationTypeId, @RequestParam(required = false) Integer emphasisTypeId) {
 
-        PageInfo<JobUserVo> result = jobuserService.getList(pageIndex, pageSize, name, siteId, jobStatus,sexId,educationTypeId,emphasisTypeId);
+        PageInfo<JobUserVo> result = jobuserService.getList(pageIndex, pageSize, null, name, siteId, jobStatus, sexId, educationTypeId, emphasisTypeId);
+        return RespGenerstor.success(result);
+    }
+
+    @ResponseBody
+    @GetMapping("/getDataById")
+    public BaseResponse getDataById(String id) {
+        var result = jobuserService.getDataById(id);
+        if (result == null) {
+            result = new JobUserVo();
+            result.setJobuserID(UUID.randomUUID().toString());
+        }
         return RespGenerstor.success(result);
     }
 
+    @ResponseBody
+    @GetMapping("/getEducationList")
+    public BaseResponse getEducationList(String id) {
+        var educationList = jobuserService.getJobUserEducationList(id);
+        return RespGenerstor.success(educationList);
+    }
+
+    @ResponseBody
+    @GetMapping("/getExperienceList")
+    public BaseResponse getExperienceList(String id) {
+        var experienceList = jobuserService.getJobUserPcExperienceList(id);
+        return RespGenerstor.success(experienceList);
+    }
+
+    @ResponseBody
+    @PostMapping("/save")
+    public BaseResponse Save(@RequestBody JobUserVo data) {
+        var result = jobuserService.save(data, accountService.getLoginUserID());
+        return RespGenerstor.success(result);
+    }
+
+    @ResponseBody
+    @PostMapping("/delete")
+    public BaseResponse delete(@RequestBody List<String> ids) {
+        var result = jobuserService.delete(ids);
+        if (result <= 0) {
+            throw new BaseException(BaseErrorEnum.DELETE_NOT_DATA_ERROR);
+        }
+        return RespGenerstor.success(1);
+    }
+
 }

+ 1 - 1
src/main/java/com/hz/employmentsite/mapper/cquery/JobuserCQuery.java

@@ -6,5 +6,5 @@ import org.apache.ibatis.annotations.Param;
 import java.util.List;
 
 public interface JobuserCQuery {
-    List<JobUserVo> selectJobuserList(@Param("name") String name, @Param("siteId")String siteId, @Param("jobStatus")Integer jobStatus, @Param("sexId")Integer sexId, @Param("educationTypeId")Integer educationTypeId, @Param("emphasisTypeId")Integer emphasisTypeId);
+    List<JobUserVo> selectJobuserList(@Param("jobuserID") String jobuserID,@Param("name") String name, @Param("siteId")String siteId, @Param("jobStatus")Integer jobStatus, @Param("sexId")Integer sexId, @Param("educationTypeId")Integer educationTypeId, @Param("emphasisTypeId")Integer emphasisTypeId);
 }

+ 4 - 4
src/main/java/com/hz/employmentsite/model/PcEducation.java

@@ -7,7 +7,7 @@ public class PcEducation {
 
     private String jobuserID;
 
-    private String cultureRank;
+    private Integer cultureRank;
 
     private Date schoolTime;
 
@@ -45,12 +45,12 @@ public class PcEducation {
         this.jobuserID = jobuserID == null ? null : jobuserID.trim();
     }
 
-    public String getCultureRank() {
+    public Integer getCultureRank() {
         return cultureRank;
     }
 
-    public void setCultureRank(String cultureRank) {
-        this.cultureRank = cultureRank == null ? null : cultureRank.trim();
+    public void setCultureRank(Integer cultureRank) {
+        this.cultureRank = cultureRank;
     }
 
     public Date getSchoolTime() {

+ 10 - 20
src/main/java/com/hz/employmentsite/model/PcEducationExample.java

@@ -255,62 +255,52 @@ public class PcEducationExample {
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankEqualTo(String value) {
+        public Criteria andCultureRankEqualTo(Integer value) {
             addCriterion("CultureRank =", value, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankNotEqualTo(String value) {
+        public Criteria andCultureRankNotEqualTo(Integer value) {
             addCriterion("CultureRank <>", value, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankGreaterThan(String value) {
+        public Criteria andCultureRankGreaterThan(Integer value) {
             addCriterion("CultureRank >", value, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankGreaterThanOrEqualTo(String value) {
+        public Criteria andCultureRankGreaterThanOrEqualTo(Integer value) {
             addCriterion("CultureRank >=", value, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankLessThan(String value) {
+        public Criteria andCultureRankLessThan(Integer value) {
             addCriterion("CultureRank <", value, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankLessThanOrEqualTo(String value) {
+        public Criteria andCultureRankLessThanOrEqualTo(Integer value) {
             addCriterion("CultureRank <=", value, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankLike(String value) {
-            addCriterion("CultureRank like", value, "cultureRank");
-            return (Criteria) this;
-        }
-
-        public Criteria andCultureRankNotLike(String value) {
-            addCriterion("CultureRank not like", value, "cultureRank");
-            return (Criteria) this;
-        }
-
-        public Criteria andCultureRankIn(List<String> values) {
+        public Criteria andCultureRankIn(List<Integer> values) {
             addCriterion("CultureRank in", values, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankNotIn(List<String> values) {
+        public Criteria andCultureRankNotIn(List<Integer> values) {
             addCriterion("CultureRank not in", values, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankBetween(String value1, String value2) {
+        public Criteria andCultureRankBetween(Integer value1, Integer value2) {
             addCriterion("CultureRank between", value1, value2, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankNotBetween(String value1, String value2) {
+        public Criteria andCultureRankNotBetween(Integer value1, Integer value2) {
             addCriterion("CultureRank not between", value1, value2, "cultureRank");
             return (Criteria) this;
         }

+ 19 - 19
src/main/java/com/hz/employmentsite/model/PcJobuser.java

@@ -27,7 +27,7 @@ public class PcJobuser {
 
     private Integer familyNatureID;
 
-    private String cultureRank;
+    private Integer cultureRank;
 
     private Integer healthID;
 
@@ -41,11 +41,11 @@ public class PcJobuser {
 
     private Integer maritalStatusID;
 
-    private String province;
+    private String provinceCode;
 
-    private String city;
+    private String regionCode;
 
-    private String region;
+    private String streetCode;
 
     private String userName;
 
@@ -169,12 +169,12 @@ public class PcJobuser {
         this.familyNatureID = familyNatureID;
     }
 
-    public String getCultureRank() {
+    public Integer getCultureRank() {
         return cultureRank;
     }
 
-    public void setCultureRank(String cultureRank) {
-        this.cultureRank = cultureRank == null ? null : cultureRank.trim();
+    public void setCultureRank(Integer cultureRank) {
+        this.cultureRank = cultureRank;
     }
 
     public Integer getHealthID() {
@@ -225,28 +225,28 @@ public class PcJobuser {
         this.maritalStatusID = maritalStatusID;
     }
 
-    public String getProvince() {
-        return province;
+    public String getProvinceCode() {
+        return provinceCode;
     }
 
-    public void setProvince(String province) {
-        this.province = province == null ? null : province.trim();
+    public void setProvinceCode(String provinceCode) {
+        this.provinceCode = provinceCode == null ? null : provinceCode.trim();
     }
 
-    public String getCity() {
-        return city;
+    public String getRegionCode() {
+        return regionCode;
     }
 
-    public void setCity(String city) {
-        this.city = city == null ? null : city.trim();
+    public void setRegionCode(String regionCode) {
+        this.regionCode = regionCode == null ? null : regionCode.trim();
     }
 
-    public String getRegion() {
-        return region;
+    public String getStreetCode() {
+        return streetCode;
     }
 
-    public void setRegion(String region) {
-        this.region = region == null ? null : region.trim();
+    public void setStreetCode(String streetCode) {
+        this.streetCode = streetCode == null ? null : streetCode.trim();
     }
 
     public String getUserName() {

+ 94 - 104
src/main/java/com/hz/employmentsite/model/PcJobuserExample.java

@@ -915,62 +915,52 @@ public class PcJobuserExample {
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankEqualTo(String value) {
+        public Criteria andCultureRankEqualTo(Integer value) {
             addCriterion("CultureRank =", value, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankNotEqualTo(String value) {
+        public Criteria andCultureRankNotEqualTo(Integer value) {
             addCriterion("CultureRank <>", value, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankGreaterThan(String value) {
+        public Criteria andCultureRankGreaterThan(Integer value) {
             addCriterion("CultureRank >", value, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankGreaterThanOrEqualTo(String value) {
+        public Criteria andCultureRankGreaterThanOrEqualTo(Integer value) {
             addCriterion("CultureRank >=", value, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankLessThan(String value) {
+        public Criteria andCultureRankLessThan(Integer value) {
             addCriterion("CultureRank <", value, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankLessThanOrEqualTo(String value) {
+        public Criteria andCultureRankLessThanOrEqualTo(Integer value) {
             addCriterion("CultureRank <=", value, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankLike(String value) {
-            addCriterion("CultureRank like", value, "cultureRank");
-            return (Criteria) this;
-        }
-
-        public Criteria andCultureRankNotLike(String value) {
-            addCriterion("CultureRank not like", value, "cultureRank");
-            return (Criteria) this;
-        }
-
-        public Criteria andCultureRankIn(List<String> values) {
+        public Criteria andCultureRankIn(List<Integer> values) {
             addCriterion("CultureRank in", values, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankNotIn(List<String> values) {
+        public Criteria andCultureRankNotIn(List<Integer> values) {
             addCriterion("CultureRank not in", values, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankBetween(String value1, String value2) {
+        public Criteria andCultureRankBetween(Integer value1, Integer value2) {
             addCriterion("CultureRank between", value1, value2, "cultureRank");
             return (Criteria) this;
         }
 
-        public Criteria andCultureRankNotBetween(String value1, String value2) {
+        public Criteria andCultureRankNotBetween(Integer value1, Integer value2) {
             addCriterion("CultureRank not between", value1, value2, "cultureRank");
             return (Criteria) this;
         }
@@ -1365,213 +1355,213 @@ public class PcJobuserExample {
             return (Criteria) this;
         }
 
-        public Criteria andProvinceIsNull() {
-            addCriterion("Province is null");
+        public Criteria andProvinceCodeIsNull() {
+            addCriterion("ProvinceCode is null");
             return (Criteria) this;
         }
 
-        public Criteria andProvinceIsNotNull() {
-            addCriterion("Province is not null");
+        public Criteria andProvinceCodeIsNotNull() {
+            addCriterion("ProvinceCode is not null");
             return (Criteria) this;
         }
 
-        public Criteria andProvinceEqualTo(String value) {
-            addCriterion("Province =", value, "province");
+        public Criteria andProvinceCodeEqualTo(String value) {
+            addCriterion("ProvinceCode =", value, "provinceCode");
             return (Criteria) this;
         }
 
-        public Criteria andProvinceNotEqualTo(String value) {
-            addCriterion("Province <>", value, "province");
+        public Criteria andProvinceCodeNotEqualTo(String value) {
+            addCriterion("ProvinceCode <>", value, "provinceCode");
             return (Criteria) this;
         }
 
-        public Criteria andProvinceGreaterThan(String value) {
-            addCriterion("Province >", value, "province");
+        public Criteria andProvinceCodeGreaterThan(String value) {
+            addCriterion("ProvinceCode >", value, "provinceCode");
             return (Criteria) this;
         }
 
-        public Criteria andProvinceGreaterThanOrEqualTo(String value) {
-            addCriterion("Province >=", value, "province");
+        public Criteria andProvinceCodeGreaterThanOrEqualTo(String value) {
+            addCriterion("ProvinceCode >=", value, "provinceCode");
             return (Criteria) this;
         }
 
-        public Criteria andProvinceLessThan(String value) {
-            addCriterion("Province <", value, "province");
+        public Criteria andProvinceCodeLessThan(String value) {
+            addCriterion("ProvinceCode <", value, "provinceCode");
             return (Criteria) this;
         }
 
-        public Criteria andProvinceLessThanOrEqualTo(String value) {
-            addCriterion("Province <=", value, "province");
+        public Criteria andProvinceCodeLessThanOrEqualTo(String value) {
+            addCriterion("ProvinceCode <=", value, "provinceCode");
             return (Criteria) this;
         }
 
-        public Criteria andProvinceLike(String value) {
-            addCriterion("Province like", value, "province");
+        public Criteria andProvinceCodeLike(String value) {
+            addCriterion("ProvinceCode like", value, "provinceCode");
             return (Criteria) this;
         }
 
-        public Criteria andProvinceNotLike(String value) {
-            addCriterion("Province not like", value, "province");
+        public Criteria andProvinceCodeNotLike(String value) {
+            addCriterion("ProvinceCode not like", value, "provinceCode");
             return (Criteria) this;
         }
 
-        public Criteria andProvinceIn(List<String> values) {
-            addCriterion("Province in", values, "province");
+        public Criteria andProvinceCodeIn(List<String> values) {
+            addCriterion("ProvinceCode in", values, "provinceCode");
             return (Criteria) this;
         }
 
-        public Criteria andProvinceNotIn(List<String> values) {
-            addCriterion("Province not in", values, "province");
+        public Criteria andProvinceCodeNotIn(List<String> values) {
+            addCriterion("ProvinceCode not in", values, "provinceCode");
             return (Criteria) this;
         }
 
-        public Criteria andProvinceBetween(String value1, String value2) {
-            addCriterion("Province between", value1, value2, "province");
+        public Criteria andProvinceCodeBetween(String value1, String value2) {
+            addCriterion("ProvinceCode between", value1, value2, "provinceCode");
             return (Criteria) this;
         }
 
-        public Criteria andProvinceNotBetween(String value1, String value2) {
-            addCriterion("Province not between", value1, value2, "province");
+        public Criteria andProvinceCodeNotBetween(String value1, String value2) {
+            addCriterion("ProvinceCode not between", value1, value2, "provinceCode");
             return (Criteria) this;
         }
 
-        public Criteria andCityIsNull() {
-            addCriterion("City is null");
+        public Criteria andRegionCodeIsNull() {
+            addCriterion("RegionCode is null");
             return (Criteria) this;
         }
 
-        public Criteria andCityIsNotNull() {
-            addCriterion("City is not null");
+        public Criteria andRegionCodeIsNotNull() {
+            addCriterion("RegionCode is not null");
             return (Criteria) this;
         }
 
-        public Criteria andCityEqualTo(String value) {
-            addCriterion("City =", value, "city");
+        public Criteria andRegionCodeEqualTo(String value) {
+            addCriterion("RegionCode =", value, "regionCode");
             return (Criteria) this;
         }
 
-        public Criteria andCityNotEqualTo(String value) {
-            addCriterion("City <>", value, "city");
+        public Criteria andRegionCodeNotEqualTo(String value) {
+            addCriterion("RegionCode <>", value, "regionCode");
             return (Criteria) this;
         }
 
-        public Criteria andCityGreaterThan(String value) {
-            addCriterion("City >", value, "city");
+        public Criteria andRegionCodeGreaterThan(String value) {
+            addCriterion("RegionCode >", value, "regionCode");
             return (Criteria) this;
         }
 
-        public Criteria andCityGreaterThanOrEqualTo(String value) {
-            addCriterion("City >=", value, "city");
+        public Criteria andRegionCodeGreaterThanOrEqualTo(String value) {
+            addCriterion("RegionCode >=", value, "regionCode");
             return (Criteria) this;
         }
 
-        public Criteria andCityLessThan(String value) {
-            addCriterion("City <", value, "city");
+        public Criteria andRegionCodeLessThan(String value) {
+            addCriterion("RegionCode <", value, "regionCode");
             return (Criteria) this;
         }
 
-        public Criteria andCityLessThanOrEqualTo(String value) {
-            addCriterion("City <=", value, "city");
+        public Criteria andRegionCodeLessThanOrEqualTo(String value) {
+            addCriterion("RegionCode <=", value, "regionCode");
             return (Criteria) this;
         }
 
-        public Criteria andCityLike(String value) {
-            addCriterion("City like", value, "city");
+        public Criteria andRegionCodeLike(String value) {
+            addCriterion("RegionCode like", value, "regionCode");
             return (Criteria) this;
         }
 
-        public Criteria andCityNotLike(String value) {
-            addCriterion("City not like", value, "city");
+        public Criteria andRegionCodeNotLike(String value) {
+            addCriterion("RegionCode not like", value, "regionCode");
             return (Criteria) this;
         }
 
-        public Criteria andCityIn(List<String> values) {
-            addCriterion("City in", values, "city");
+        public Criteria andRegionCodeIn(List<String> values) {
+            addCriterion("RegionCode in", values, "regionCode");
             return (Criteria) this;
         }
 
-        public Criteria andCityNotIn(List<String> values) {
-            addCriterion("City not in", values, "city");
+        public Criteria andRegionCodeNotIn(List<String> values) {
+            addCriterion("RegionCode not in", values, "regionCode");
             return (Criteria) this;
         }
 
-        public Criteria andCityBetween(String value1, String value2) {
-            addCriterion("City between", value1, value2, "city");
+        public Criteria andRegionCodeBetween(String value1, String value2) {
+            addCriterion("RegionCode between", value1, value2, "regionCode");
             return (Criteria) this;
         }
 
-        public Criteria andCityNotBetween(String value1, String value2) {
-            addCriterion("City not between", value1, value2, "city");
+        public Criteria andRegionCodeNotBetween(String value1, String value2) {
+            addCriterion("RegionCode not between", value1, value2, "regionCode");
             return (Criteria) this;
         }
 
-        public Criteria andRegionIsNull() {
-            addCriterion("Region is null");
+        public Criteria andStreetCodeIsNull() {
+            addCriterion("StreetCode is null");
             return (Criteria) this;
         }
 
-        public Criteria andRegionIsNotNull() {
-            addCriterion("Region is not null");
+        public Criteria andStreetCodeIsNotNull() {
+            addCriterion("StreetCode is not null");
             return (Criteria) this;
         }
 
-        public Criteria andRegionEqualTo(String value) {
-            addCriterion("Region =", value, "region");
+        public Criteria andStreetCodeEqualTo(String value) {
+            addCriterion("StreetCode =", value, "streetCode");
             return (Criteria) this;
         }
 
-        public Criteria andRegionNotEqualTo(String value) {
-            addCriterion("Region <>", value, "region");
+        public Criteria andStreetCodeNotEqualTo(String value) {
+            addCriterion("StreetCode <>", value, "streetCode");
             return (Criteria) this;
         }
 
-        public Criteria andRegionGreaterThan(String value) {
-            addCriterion("Region >", value, "region");
+        public Criteria andStreetCodeGreaterThan(String value) {
+            addCriterion("StreetCode >", value, "streetCode");
             return (Criteria) this;
         }
 
-        public Criteria andRegionGreaterThanOrEqualTo(String value) {
-            addCriterion("Region >=", value, "region");
+        public Criteria andStreetCodeGreaterThanOrEqualTo(String value) {
+            addCriterion("StreetCode >=", value, "streetCode");
             return (Criteria) this;
         }
 
-        public Criteria andRegionLessThan(String value) {
-            addCriterion("Region <", value, "region");
+        public Criteria andStreetCodeLessThan(String value) {
+            addCriterion("StreetCode <", value, "streetCode");
             return (Criteria) this;
         }
 
-        public Criteria andRegionLessThanOrEqualTo(String value) {
-            addCriterion("Region <=", value, "region");
+        public Criteria andStreetCodeLessThanOrEqualTo(String value) {
+            addCriterion("StreetCode <=", value, "streetCode");
             return (Criteria) this;
         }
 
-        public Criteria andRegionLike(String value) {
-            addCriterion("Region like", value, "region");
+        public Criteria andStreetCodeLike(String value) {
+            addCriterion("StreetCode like", value, "streetCode");
             return (Criteria) this;
         }
 
-        public Criteria andRegionNotLike(String value) {
-            addCriterion("Region not like", value, "region");
+        public Criteria andStreetCodeNotLike(String value) {
+            addCriterion("StreetCode not like", value, "streetCode");
             return (Criteria) this;
         }
 
-        public Criteria andRegionIn(List<String> values) {
-            addCriterion("Region in", values, "region");
+        public Criteria andStreetCodeIn(List<String> values) {
+            addCriterion("StreetCode in", values, "streetCode");
             return (Criteria) this;
         }
 
-        public Criteria andRegionNotIn(List<String> values) {
-            addCriterion("Region not in", values, "region");
+        public Criteria andStreetCodeNotIn(List<String> values) {
+            addCriterion("StreetCode not in", values, "streetCode");
             return (Criteria) this;
         }
 
-        public Criteria andRegionBetween(String value1, String value2) {
-            addCriterion("Region between", value1, value2, "region");
+        public Criteria andStreetCodeBetween(String value1, String value2) {
+            addCriterion("StreetCode between", value1, value2, "streetCode");
             return (Criteria) this;
         }
 
-        public Criteria andRegionNotBetween(String value1, String value2) {
-            addCriterion("Region not between", value1, value2, "region");
+        public Criteria andStreetCodeNotBetween(String value1, String value2) {
+            addCriterion("StreetCode not between", value1, value2, "streetCode");
             return (Criteria) this;
         }
 

+ 196 - 3
src/main/java/com/hz/employmentsite/services/impl/jobUserManager/JobuserServiceImpl.java

@@ -2,31 +2,224 @@ package com.hz.employmentsite.services.impl.jobUserManager;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.hz.employmentsite.mapper.PcEducationMapper;
+import com.hz.employmentsite.mapper.PcExperienceMapper;
+import com.hz.employmentsite.mapper.PcJobuserMapper;
 import com.hz.employmentsite.mapper.cquery.JobuserCQuery;
+import com.hz.employmentsite.model.*;
 import com.hz.employmentsite.services.service.jobUserManager.JobuserService;
+import com.hz.employmentsite.util.StringUtils;
 import com.hz.employmentsite.vo.jobUserManager.JobUserVo;
-import com.hz.employmentsite.vo.jobUserManager.JobhuntVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
+import java.util.UUID;
 
 @Service("JobuserService")
 public class JobuserServiceImpl implements JobuserService {
 
     @Autowired
     private JobuserCQuery jobuserCQuery;
+    @Autowired
+    private StringUtils stringUtils;
+    @Autowired
+    private PcEducationMapper pcEducationMapper;
+    @Autowired
+    private PcJobuserMapper pcJobuserMapper;
+    @Autowired
+    private PcExperienceMapper pcExperienceMapper;
 
     @Override
-    public PageInfo<JobUserVo> getList(Integer page, Integer rows, String name, String siteId, Integer jobStatus, Integer sexId, Integer educationTypeId, Integer emphasisTypeId) {
+    public PageInfo<JobUserVo> getList(Integer page, Integer rows, String jobuserID, String name, String siteId, Integer jobStatus, Integer sexId, Integer educationTypeId, Integer emphasisTypeId) {
         PageHelper.startPage(page, rows);
 
-        List<JobUserVo> list = jobuserCQuery.selectJobuserList(name, siteId, jobStatus, sexId, educationTypeId, emphasisTypeId);
+        List<JobUserVo> list = jobuserCQuery.selectJobuserList(jobuserID, name, siteId, jobStatus, sexId, educationTypeId, emphasisTypeId);
 
         PageInfo<JobUserVo> result = new PageInfo(list);
 
         return result;
     }
 
+    @Override
+    public JobUserVo getDataById(String id) {
+        if (stringUtils.IsNullOrEmpty(id)) {
+            return null;
+        }
+        return jobuserCQuery.selectJobuserList(id, null, null, null, null, null, null).stream().findFirst().orElse(null);
+    }
+
+    @Override
+    public List<PcEducation> getJobUserEducationList(String jobuserID) {
+        PcEducationExample exp = new PcEducationExample();
+        PcEducationExample.Criteria cro = exp.or();
+        cro.andJobuserIDEqualTo(jobuserID);
+        List<PcEducation> educationList = pcEducationMapper.selectByExample(exp);
+        return educationList;
+    }
+
+    @Override
+    public List<PcExperience> getJobUserPcExperienceList(String jobuserID) {
+        PcExperienceExample exp = new PcExperienceExample();
+        PcExperienceExample.Criteria cro = exp.or();
+        cro.andJobuserIDEqualTo(jobuserID);
+        List<PcExperience> educationList = pcExperienceMapper.selectByExample(exp);
+        return educationList;
+    }
+
+    private int deleteEducation(List<String> ids) {
+        int educationRows = 0;
+        PcEducationExample expEducation = new PcEducationExample();
+        PcEducationExample.Criteria croEducation = expEducation.or();
+        croEducation.andJobuserIDIn(ids);
+        educationRows = pcEducationMapper.deleteByExample(expEducation);
+        return educationRows;
+    }
+
+    private int deleteExperience(List<String> ids) {
+        int experienceRows = 0;
+        PcExperienceExample expExperi = new PcExperienceExample();
+        PcExperienceExample.Criteria croExperi = expExperi.or();
+        croExperi.andJobuserIDIn(ids);
+        experienceRows = pcExperienceMapper.deleteByExample(expExperi);
+
+        return experienceRows;
+    }
+
+
+    @Override
+    public int delete(List<String> ids) {
+        deleteEducation(ids);
+        deleteExperience(ids);
+        int result = 0;
+        PcJobuserExample exp = new PcJobuserExample();
+        PcJobuserExample.Criteria cro = exp.or();
+        cro.andJobuserIDIn(ids);
+        result = pcJobuserMapper.deleteByExample(exp);
+        return result;
+    }
+
+    @Override
+    public int save(JobUserVo data, String userId) {
+        int result = 0;
+        PcJobuser dbData = pcJobuserMapper.selectByPrimaryKey(data.getJobuserID());
+        if (dbData == null) {
+            dbData = new PcJobuser();
+            dbData.setJobuserID(data.getJobuserID());
+            dbData.setSiteID(data.getSiteID());
+            dbData.setIdentityNumber(data.getIdentityNumber());
+            dbData.setName(data.getName());
+            dbData.setPyName(data.getPyName());
+            dbData.setEngName(data.getEngName());
+            dbData.setSex(data.getSex());
+            dbData.setNation(data.getNation());
+            dbData.setPoliticsStatusID(data.getPoliticsStatusID());
+            dbData.setBirthplace(data.getBirthplace());
+            dbData.setBirthDay(data.getBirthDay());
+            dbData.setFamilyNatureID(data.getFamilyNatureID());
+            dbData.setFamilyAddress(data.getFamilyAddress());
+            dbData.setCultureRank(data.getCultureRank());
+            dbData.setHealthID(data.getHealthID());
+            dbData.setHeight(data.getHeight());
+            dbData.setBloodTypeID(data.getBloodTypeID());
+            dbData.setVision(data.getVision());
+            dbData.setWeight(data.getWeight());
+            dbData.setMaritalStatusID(data.getMaritalStatusID());
+            dbData.setProvinceCode(data.getProvinceCode());
+            dbData.setRegionCode(data.getRegionCode());
+            dbData.setStreetCode(data.getStreetCode());
+            dbData.setUserName(data.getUserName());
+            dbData.setUserMobile(data.getUserMobile());
+            dbData.setAddress(data.getAddress());
+            dbData.setPostalCode(data.getPostalCode());
+            dbData.setEmail(data.getEmail());
+            dbData.setHobby(data.getHobby());
+            dbData.setKeyPersonTypeID(data.getKeyPersonTypeID());
+            dbData.setCreateTime(new Date());
+            dbData.setCreateUserID(userId);
+            result = pcJobuserMapper.insert(dbData);
+
+        } else {
+            dbData.setJobuserID(data.getJobuserID());
+            dbData.setSiteID(data.getSiteID());
+            dbData.setIdentityNumber(data.getIdentityNumber());
+            dbData.setName(data.getName());
+            dbData.setPyName(data.getPyName());
+            dbData.setEngName(data.getEngName());
+            dbData.setSex(data.getSex());
+            dbData.setNation(data.getNation());
+            dbData.setPoliticsStatusID(data.getPoliticsStatusID());
+            dbData.setBirthplace(data.getBirthplace());
+            dbData.setBirthDay(data.getBirthDay());
+            dbData.setFamilyNatureID(data.getFamilyNatureID());
+            dbData.setFamilyAddress(data.getFamilyAddress());
+            dbData.setCultureRank(data.getCultureRank());
+            dbData.setHealthID(data.getHealthID());
+            dbData.setHeight(data.getHeight());
+            dbData.setBloodTypeID(data.getBloodTypeID());
+            dbData.setVision(data.getVision());
+            dbData.setWeight(data.getWeight());
+            dbData.setMaritalStatusID(data.getMaritalStatusID());
+            dbData.setProvinceCode(data.getProvinceCode());
+            dbData.setRegionCode(data.getRegionCode());
+            dbData.setStreetCode(data.getStreetCode());
+            dbData.setUserName(data.getUserName());
+            dbData.setUserMobile(data.getUserMobile());
+            dbData.setAddress(data.getAddress());
+            dbData.setPostalCode(data.getPostalCode());
+            dbData.setEmail(data.getEmail());
+            dbData.setHobby(data.getHobby());
+            dbData.setKeyPersonTypeID(data.getKeyPersonTypeID());
+            dbData.setModifyTime(new Date());
+            dbData.setModifyUserID(userId);
+            result = pcJobuserMapper.updateByPrimaryKeySelective(dbData);
+        }
+        if (result >= 1) {
+            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+            String jobUserId = dbData.getJobuserID();
+            List<String> ids = new ArrayList<>();
+            ids.add(jobUserId);
+            deleteEducation(ids);
+            deleteExperience(ids);
+            data.getJobEducation().stream().forEach(x -> {
+                PcEducation education = new PcEducation();
+                education.setEducationID(UUID.randomUUID().toString());
+                education.setJobuserID(jobUserId);
+                education.setCultureRank(Integer.parseInt(x.get("cultureRank") + ""));
+                education.setSchoolName(x.get("schoolName").toString());
+                try {
+                    education.setSchoolTime(dateFormat.parse(x.get("schoolTime").toString()));
+                    education.setOverTime(dateFormat.parse(x.get("overTime").toString()));
+                } catch (ParseException e) {
+                    e.printStackTrace();
+                }
+                education.setMajor(x.get("major").toString());
+                education.setCreateTime(new Date());
+                education.setCreateUserID(userId);
+                pcEducationMapper.insert(education);
+            });
+            data.getJobExperience().stream().forEach(x -> {
+                PcExperience experience = new PcExperience();
+                experience.setExperienceID(UUID.randomUUID().toString());
+                experience.setJobuserID(jobUserId);
+                try {
+                    experience.setStartTime(dateFormat.parse(x.get("startTime").toString()));
+                    experience.setEndTime(dateFormat.parse(x.get("endTime").toString()));
+                } catch (ParseException e) {
+                    e.printStackTrace();
+                }
+                experience.setDuties(x.get("duties").toString());
+                experience.setWorkAddress(x.get("workAddress").toString());
+                experience.setCreateTime(new Date());
+                experience.setCreateUserID(userId);
+                pcExperienceMapper.insert(experience);
+            });
+        }
+        return result;
+    }
+
 }

+ 16 - 1
src/main/java/com/hz/employmentsite/services/service/jobUserManager/JobuserService.java

@@ -1,8 +1,23 @@
 package com.hz.employmentsite.services.service.jobUserManager;
 
 import com.github.pagehelper.PageInfo;
+import com.hz.employmentsite.model.PcEducation;
+import com.hz.employmentsite.model.PcExperience;
 import com.hz.employmentsite.vo.jobUserManager.JobUserVo;
+import com.hz.employmentsite.vo.taskAndLog.DotaskVo;
+
+import java.util.List;
 
 public interface JobuserService {
-    PageInfo<JobUserVo> getList(Integer page, Integer rows, String name, String siteId, Integer jobStatus,Integer sexId,Integer educationTypeId,Integer emphasisTypeId);
+    PageInfo<JobUserVo> getList(Integer page, Integer rows,String jobuserID, String name, String siteId, Integer jobStatus,Integer sexId,Integer educationTypeId,Integer emphasisTypeId);
+
+    JobUserVo getDataById(String id);
+
+    List<PcEducation> getJobUserEducationList(String jobuserID);
+
+    List<PcExperience> getJobUserPcExperienceList(String jobuserID);
+
+    int delete(List<String> ids);
+
+    int save(JobUserVo data, String userId);
 }

+ 5 - 0
src/main/java/com/hz/employmentsite/vo/jobUserManager/JobUserVo.java

@@ -3,6 +3,9 @@ package com.hz.employmentsite.vo.jobUserManager;
 import com.hz.employmentsite.model.PcJobuser;
 import lombok.Data;
 
+import java.util.HashMap;
+import java.util.List;
+
 @Data
 public class JobUserVo extends PcJobuser {
     public String genderName;
@@ -10,4 +13,6 @@ public class JobUserVo extends PcJobuser {
     public String siteName;
     public String jobStatusName;
     public String keyTypeName;
+    public List<HashMap<String,Object>> jobEducation;
+    public List<HashMap<String,Object>> jobExperience;
 }

+ 1 - 0
src/main/resources/generatorConfig.xml

@@ -102,6 +102,7 @@
         <table schema="" tableName="pc_company"><property name="useActualColumnNames" value="true"/></table>
         -->
 <!--        <table schema="" tableName="pc_jobuser"><property name="useActualColumnNames" value="true"/></table>-->
+<!--        <table schema="" tableName="pc_education"><property name="useActualColumnNames" value="true"/></table>-->
 
 
     </context>

+ 7 - 7
src/main/resources/mapping/PcEducationMapper.xml

@@ -4,7 +4,7 @@
   <resultMap id="BaseResultMap" type="com.hz.employmentsite.model.PcEducation">
     <id column="EducationID" jdbcType="VARCHAR" property="educationID" />
     <result column="JobuserID" jdbcType="VARCHAR" property="jobuserID" />
-    <result column="CultureRank" jdbcType="VARCHAR" property="cultureRank" />
+    <result column="CultureRank" jdbcType="INTEGER" property="cultureRank" />
     <result column="SchoolTime" jdbcType="TIMESTAMP" property="schoolTime" />
     <result column="OverTime" jdbcType="TIMESTAMP" property="overTime" />
     <result column="SchoolName" jdbcType="VARCHAR" property="schoolName" />
@@ -114,7 +114,7 @@
       CollegeDirection, Major, Introduce, 
       CreateUserID, CreateTime, ModifyUserID, 
       ModifyTime)
-    values (#{educationID,jdbcType=VARCHAR}, #{jobuserID,jdbcType=VARCHAR}, #{cultureRank,jdbcType=VARCHAR}, 
+    values (#{educationID,jdbcType=VARCHAR}, #{jobuserID,jdbcType=VARCHAR}, #{cultureRank,jdbcType=INTEGER}, 
       #{schoolTime,jdbcType=TIMESTAMP}, #{overTime,jdbcType=TIMESTAMP}, #{schoolName,jdbcType=VARCHAR}, 
       #{collegeDirection,jdbcType=VARCHAR}, #{major,jdbcType=VARCHAR}, #{introduce,jdbcType=VARCHAR}, 
       #{createUserID,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyUserID,jdbcType=VARCHAR}, 
@@ -171,7 +171,7 @@
         #{jobuserID,jdbcType=VARCHAR},
       </if>
       <if test="cultureRank != null">
-        #{cultureRank,jdbcType=VARCHAR},
+        #{cultureRank,jdbcType=INTEGER},
       </if>
       <if test="schoolTime != null">
         #{schoolTime,jdbcType=TIMESTAMP},
@@ -221,7 +221,7 @@
         JobuserID = #{row.jobuserID,jdbcType=VARCHAR},
       </if>
       <if test="row.cultureRank != null">
-        CultureRank = #{row.cultureRank,jdbcType=VARCHAR},
+        CultureRank = #{row.cultureRank,jdbcType=INTEGER},
       </if>
       <if test="row.schoolTime != null">
         SchoolTime = #{row.schoolTime,jdbcType=TIMESTAMP},
@@ -262,7 +262,7 @@
     update pc_education
     set EducationID = #{row.educationID,jdbcType=VARCHAR},
       JobuserID = #{row.jobuserID,jdbcType=VARCHAR},
-      CultureRank = #{row.cultureRank,jdbcType=VARCHAR},
+      CultureRank = #{row.cultureRank,jdbcType=INTEGER},
       SchoolTime = #{row.schoolTime,jdbcType=TIMESTAMP},
       OverTime = #{row.overTime,jdbcType=TIMESTAMP},
       SchoolName = #{row.schoolName,jdbcType=VARCHAR},
@@ -284,7 +284,7 @@
         JobuserID = #{jobuserID,jdbcType=VARCHAR},
       </if>
       <if test="cultureRank != null">
-        CultureRank = #{cultureRank,jdbcType=VARCHAR},
+        CultureRank = #{cultureRank,jdbcType=INTEGER},
       </if>
       <if test="schoolTime != null">
         SchoolTime = #{schoolTime,jdbcType=TIMESTAMP},
@@ -322,7 +322,7 @@
   <update id="updateByPrimaryKey" parameterType="com.hz.employmentsite.model.PcEducation">
     update pc_education
     set JobuserID = #{jobuserID,jdbcType=VARCHAR},
-      CultureRank = #{cultureRank,jdbcType=VARCHAR},
+      CultureRank = #{cultureRank,jdbcType=INTEGER},
       SchoolTime = #{schoolTime,jdbcType=TIMESTAMP},
       OverTime = #{overTime,jdbcType=TIMESTAMP},
       SchoolName = #{schoolName,jdbcType=VARCHAR},

+ 47 - 47
src/main/resources/mapping/PcJobuserMapper.xml

@@ -14,16 +14,16 @@
     <result column="Birthplace" jdbcType="VARCHAR" property="birthplace" />
     <result column="BirthDay" jdbcType="TIMESTAMP" property="birthDay" />
     <result column="FamilyNatureID" jdbcType="INTEGER" property="familyNatureID" />
-    <result column="CultureRank" jdbcType="VARCHAR" property="cultureRank" />
+    <result column="CultureRank" jdbcType="INTEGER" property="cultureRank" />
     <result column="HealthID" jdbcType="INTEGER" property="healthID" />
     <result column="BloodTypeID" jdbcType="INTEGER" property="bloodTypeID" />
     <result column="Height" jdbcType="VARCHAR" property="height" />
     <result column="Vision" jdbcType="VARCHAR" property="vision" />
     <result column="Weight" jdbcType="VARCHAR" property="weight" />
     <result column="MaritalStatusID" jdbcType="INTEGER" property="maritalStatusID" />
-    <result column="Province" jdbcType="VARCHAR" property="province" />
-    <result column="City" jdbcType="VARCHAR" property="city" />
-    <result column="Region" jdbcType="VARCHAR" property="region" />
+    <result column="ProvinceCode" jdbcType="VARCHAR" property="provinceCode" />
+    <result column="RegionCode" jdbcType="VARCHAR" property="regionCode" />
+    <result column="StreetCode" jdbcType="VARCHAR" property="streetCode" />
     <result column="UserName" jdbcType="VARCHAR" property="userName" />
     <result column="UserMobile" jdbcType="VARCHAR" property="userMobile" />
     <result column="Address" jdbcType="VARCHAR" property="address" />
@@ -99,9 +99,9 @@
   <sql id="Base_Column_List">
     JobuserID, SiteID, IdentityNumber, Name, PyName, EngName, Sex, Nation, PoliticsStatusID, 
     Birthplace, BirthDay, FamilyNatureID, CultureRank, HealthID, BloodTypeID, Height, 
-    Vision, Weight, MaritalStatusID, Province, City, Region, UserName, UserMobile, Address, 
-    FamilyAddress, PostalCode, Email, Hobby, JobStatusID, KeyPersonTypeID, CreateUserID, 
-    CreateTime, ModifyUserID, ModifyTime
+    Vision, Weight, MaritalStatusID, ProvinceCode, RegionCode, StreetCode, UserName, 
+    UserMobile, Address, FamilyAddress, PostalCode, Email, Hobby, JobStatusID, KeyPersonTypeID, 
+    CreateUserID, CreateTime, ModifyUserID, ModifyTime
   </sql>
   <select id="selectByExample" parameterType="com.hz.employmentsite.model.PcJobuserExample" resultMap="BaseResultMap">
     select
@@ -140,8 +140,8 @@
       Birthplace, BirthDay, FamilyNatureID, 
       CultureRank, HealthID, BloodTypeID, 
       Height, Vision, Weight, 
-      MaritalStatusID, Province, City, 
-      Region, UserName, UserMobile, 
+      MaritalStatusID, ProvinceCode, RegionCode, 
+      StreetCode, UserName, UserMobile, 
       Address, FamilyAddress, PostalCode, 
       Email, Hobby, JobStatusID, 
       KeyPersonTypeID, CreateUserID, CreateTime, 
@@ -150,10 +150,10 @@
       #{name,jdbcType=VARCHAR}, #{pyName,jdbcType=VARCHAR}, #{engName,jdbcType=VARCHAR}, 
       #{sex,jdbcType=INTEGER}, #{nation,jdbcType=VARCHAR}, #{politicsStatusID,jdbcType=INTEGER}, 
       #{birthplace,jdbcType=VARCHAR}, #{birthDay,jdbcType=TIMESTAMP}, #{familyNatureID,jdbcType=INTEGER}, 
-      #{cultureRank,jdbcType=VARCHAR}, #{healthID,jdbcType=INTEGER}, #{bloodTypeID,jdbcType=INTEGER}, 
+      #{cultureRank,jdbcType=INTEGER}, #{healthID,jdbcType=INTEGER}, #{bloodTypeID,jdbcType=INTEGER}, 
       #{height,jdbcType=VARCHAR}, #{vision,jdbcType=VARCHAR}, #{weight,jdbcType=VARCHAR}, 
-      #{maritalStatusID,jdbcType=INTEGER}, #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, 
-      #{region,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{userMobile,jdbcType=VARCHAR}, 
+      #{maritalStatusID,jdbcType=INTEGER}, #{provinceCode,jdbcType=VARCHAR}, #{regionCode,jdbcType=VARCHAR}, 
+      #{streetCode,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{userMobile,jdbcType=VARCHAR}, 
       #{address,jdbcType=VARCHAR}, #{familyAddress,jdbcType=VARCHAR}, #{postalCode,jdbcType=VARCHAR}, 
       #{email,jdbcType=VARCHAR}, #{hobby,jdbcType=VARCHAR}, #{jobStatusID,jdbcType=INTEGER}, 
       #{keyPersonTypeID,jdbcType=INTEGER}, #{createUserID,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
@@ -219,14 +219,14 @@
       <if test="maritalStatusID != null">
         MaritalStatusID,
       </if>
-      <if test="province != null">
-        Province,
+      <if test="provinceCode != null">
+        ProvinceCode,
       </if>
-      <if test="city != null">
-        City,
+      <if test="regionCode != null">
+        RegionCode,
       </if>
-      <if test="region != null">
-        Region,
+      <if test="streetCode != null">
+        StreetCode,
       </if>
       <if test="userName != null">
         UserName,
@@ -306,7 +306,7 @@
         #{familyNatureID,jdbcType=INTEGER},
       </if>
       <if test="cultureRank != null">
-        #{cultureRank,jdbcType=VARCHAR},
+        #{cultureRank,jdbcType=INTEGER},
       </if>
       <if test="healthID != null">
         #{healthID,jdbcType=INTEGER},
@@ -326,14 +326,14 @@
       <if test="maritalStatusID != null">
         #{maritalStatusID,jdbcType=INTEGER},
       </if>
-      <if test="province != null">
-        #{province,jdbcType=VARCHAR},
+      <if test="provinceCode != null">
+        #{provinceCode,jdbcType=VARCHAR},
       </if>
-      <if test="city != null">
-        #{city,jdbcType=VARCHAR},
+      <if test="regionCode != null">
+        #{regionCode,jdbcType=VARCHAR},
       </if>
-      <if test="region != null">
-        #{region,jdbcType=VARCHAR},
+      <if test="streetCode != null">
+        #{streetCode,jdbcType=VARCHAR},
       </if>
       <if test="userName != null">
         #{userName,jdbcType=VARCHAR},
@@ -422,7 +422,7 @@
         FamilyNatureID = #{row.familyNatureID,jdbcType=INTEGER},
       </if>
       <if test="row.cultureRank != null">
-        CultureRank = #{row.cultureRank,jdbcType=VARCHAR},
+        CultureRank = #{row.cultureRank,jdbcType=INTEGER},
       </if>
       <if test="row.healthID != null">
         HealthID = #{row.healthID,jdbcType=INTEGER},
@@ -442,14 +442,14 @@
       <if test="row.maritalStatusID != null">
         MaritalStatusID = #{row.maritalStatusID,jdbcType=INTEGER},
       </if>
-      <if test="row.province != null">
-        Province = #{row.province,jdbcType=VARCHAR},
+      <if test="row.provinceCode != null">
+        ProvinceCode = #{row.provinceCode,jdbcType=VARCHAR},
       </if>
-      <if test="row.city != null">
-        City = #{row.city,jdbcType=VARCHAR},
+      <if test="row.regionCode != null">
+        RegionCode = #{row.regionCode,jdbcType=VARCHAR},
       </if>
-      <if test="row.region != null">
-        Region = #{row.region,jdbcType=VARCHAR},
+      <if test="row.streetCode != null">
+        StreetCode = #{row.streetCode,jdbcType=VARCHAR},
       </if>
       <if test="row.userName != null">
         UserName = #{row.userName,jdbcType=VARCHAR},
@@ -509,16 +509,16 @@
       Birthplace = #{row.birthplace,jdbcType=VARCHAR},
       BirthDay = #{row.birthDay,jdbcType=TIMESTAMP},
       FamilyNatureID = #{row.familyNatureID,jdbcType=INTEGER},
-      CultureRank = #{row.cultureRank,jdbcType=VARCHAR},
+      CultureRank = #{row.cultureRank,jdbcType=INTEGER},
       HealthID = #{row.healthID,jdbcType=INTEGER},
       BloodTypeID = #{row.bloodTypeID,jdbcType=INTEGER},
       Height = #{row.height,jdbcType=VARCHAR},
       Vision = #{row.vision,jdbcType=VARCHAR},
       Weight = #{row.weight,jdbcType=VARCHAR},
       MaritalStatusID = #{row.maritalStatusID,jdbcType=INTEGER},
-      Province = #{row.province,jdbcType=VARCHAR},
-      City = #{row.city,jdbcType=VARCHAR},
-      Region = #{row.region,jdbcType=VARCHAR},
+      ProvinceCode = #{row.provinceCode,jdbcType=VARCHAR},
+      RegionCode = #{row.regionCode,jdbcType=VARCHAR},
+      StreetCode = #{row.streetCode,jdbcType=VARCHAR},
       UserName = #{row.userName,jdbcType=VARCHAR},
       UserMobile = #{row.userMobile,jdbcType=VARCHAR},
       Address = #{row.address,jdbcType=VARCHAR},
@@ -573,7 +573,7 @@
         FamilyNatureID = #{familyNatureID,jdbcType=INTEGER},
       </if>
       <if test="cultureRank != null">
-        CultureRank = #{cultureRank,jdbcType=VARCHAR},
+        CultureRank = #{cultureRank,jdbcType=INTEGER},
       </if>
       <if test="healthID != null">
         HealthID = #{healthID,jdbcType=INTEGER},
@@ -593,14 +593,14 @@
       <if test="maritalStatusID != null">
         MaritalStatusID = #{maritalStatusID,jdbcType=INTEGER},
       </if>
-      <if test="province != null">
-        Province = #{province,jdbcType=VARCHAR},
+      <if test="provinceCode != null">
+        ProvinceCode = #{provinceCode,jdbcType=VARCHAR},
       </if>
-      <if test="city != null">
-        City = #{city,jdbcType=VARCHAR},
+      <if test="regionCode != null">
+        RegionCode = #{regionCode,jdbcType=VARCHAR},
       </if>
-      <if test="region != null">
-        Region = #{region,jdbcType=VARCHAR},
+      <if test="streetCode != null">
+        StreetCode = #{streetCode,jdbcType=VARCHAR},
       </if>
       <if test="userName != null">
         UserName = #{userName,jdbcType=VARCHAR},
@@ -657,16 +657,16 @@
       Birthplace = #{birthplace,jdbcType=VARCHAR},
       BirthDay = #{birthDay,jdbcType=TIMESTAMP},
       FamilyNatureID = #{familyNatureID,jdbcType=INTEGER},
-      CultureRank = #{cultureRank,jdbcType=VARCHAR},
+      CultureRank = #{cultureRank,jdbcType=INTEGER},
       HealthID = #{healthID,jdbcType=INTEGER},
       BloodTypeID = #{bloodTypeID,jdbcType=INTEGER},
       Height = #{height,jdbcType=VARCHAR},
       Vision = #{vision,jdbcType=VARCHAR},
       Weight = #{weight,jdbcType=VARCHAR},
       MaritalStatusID = #{maritalStatusID,jdbcType=INTEGER},
-      Province = #{province,jdbcType=VARCHAR},
-      City = #{city,jdbcType=VARCHAR},
-      Region = #{region,jdbcType=VARCHAR},
+      ProvinceCode = #{provinceCode,jdbcType=VARCHAR},
+      RegionCode = #{regionCode,jdbcType=VARCHAR},
+      StreetCode = #{streetCode,jdbcType=VARCHAR},
       UserName = #{userName,jdbcType=VARCHAR},
       UserMobile = #{userMobile,jdbcType=VARCHAR},
       Address = #{address,jdbcType=VARCHAR},

+ 15 - 8
src/main/resources/mapping/cquery/JobuserCQuery.xml

@@ -2,20 +2,27 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.hz.employmentsite.mapper.cquery.JobuserCQuery">
     <select id="selectJobuserList" resultType="com.hz.employmentsite.vo.jobUserManager.JobUserVo">
-        select gender.name as GenderName,culture.name as CultureName,site.SiteName,jobstatus.name as JobStatusName ,keytype.name as KeyTypeName,jobuser.* from pc_jobuser jobuser
+
+        select gender.name as GenderName,culture.name as CultureName,site.SiteName,jobstatus.name as JobStatusName
+        ,keytype.name as KeyTypeName,jobuser.* from pc_jobuser jobuser
         left join pc_site site
         on site.SiteID = jobuser.SiteID
+
         left join sys_dictionary_item culture
-        on jobuser.CultureRank = culture.value
+        on jobuser.CultureRank = culture.value and culture.DictionaryCode='CultureLevel'
+
         left join sys_dictionary_item gender
-        on jobuser.Sex = gender.value
+        on jobuser.Sex = gender.value and gender.DictionaryCode='Gender'
+
         left join sys_dictionary_item jobstatus
-        on jobuser.JobStatusID = jobstatus.value
-        left join sys_dictionary_item keytype
-        on jobuser.KeyPersonTypeID = keytype.value
-        where gender.DictionaryCode='Gender' and culture.DictionaryCode='CultureLevel'
-        and jobstatus.DictionaryCode='JobStatus' and keytype.DictionaryCode='KeyPersonType'
+        on jobuser.JobStatusID = jobstatus.value and jobstatus.DictionaryCode='JobStatus'
 
+        left join sys_dictionary_item keytype
+        on jobuser.KeyPersonTypeID = keytype.value and keytype.DictionaryCode='KeyPersonType'
+        where 1=1
+        <if test="jobuserID != '' and jobuserID != null">
+            and jobuser.jobuserID = #{jobuserID}
+        </if>
         <if test="name != '' and name != null">
             and jobuser.name like Concat('%',#{name},'%')
         </if>

+ 66 - 0
vue/src/api/jobUserManager/jobuser/index.ts

@@ -10,3 +10,69 @@ export function getList(query: any) {
     { isNew: true },
   );
 }
+
+export function getDataById(id: any) {
+  return request(
+    {
+      url: 'Jobusermgr/Jobuser/getDataById',
+      method: 'get',
+      params: {id},
+    },
+    { isNew: true },
+  );
+}
+
+export function save(data: any) {
+  return request(
+    {
+      url: "Jobusermgr/Jobuser/save",
+      method: 'post',
+      data: data
+    },
+    {
+      isNew: true,
+      successMsg: '提交成功!',
+      errorMsg: '提交失败!'
+    },
+  );
+}
+
+export function del(data: any) {
+  return request({
+      url: 'Jobusermgr/Jobuser/delete',
+      method: 'post',
+      data: data
+    },
+    {
+      isNew: true,
+      successMsg: '删除成功!',
+      errorMsg: '删除失败!'
+    }
+  )
+}
+
+export function getEducationList(id: any) {
+  return request(
+    {
+      url: "Jobusermgr/Jobuser/getEducationList",
+      method: 'get',
+      params: {id},
+    },
+    {
+      isNew: true,
+    },
+  );
+}
+
+export function getExperienceList(id: any) {
+  return request(
+    {
+      url: "Jobusermgr/Jobuser/getExperienceList",
+      method: 'get',
+      params: {id},
+    },
+    {
+      isNew: true,
+    },
+  );
+}

+ 3 - 1
vue/src/router/asyncModules/jobUserManager.ts

@@ -1,5 +1,7 @@
 export default {
-  'views/jobusermgr/jobuser/index': () => import('@/views/jobUserManager/jobuser/index.vue'),
+  'views/jobusermgr/jobseeker/index': () => import('@/views/jobUserManager/jobuser/index.vue'),
+  'views/jobusermgr/jobseeker/add': () => import('@/views/jobUserManager/jobuser/edit.vue'),
+  'views/jobusermgr/jobseeker/edit': () => import('@/views/jobUserManager/jobuser/edit.vue'),
   'views/jobusermgr/jobhunt/index': () => import('@/views/jobUserManager/jobhunt/index.vue'),
   'views/jobusermgr/recommend/index': () => import('@/views/jobUserManager/recommend/index.vue'),
 };

+ 6 - 5
vue/src/views/companyService/company/edit.vue

@@ -269,11 +269,12 @@ export default defineComponent(
       })
 
       const changeCity = () => {
-        get('system/area/getAreaList', {code: formState.dataModel.regionCode}).then(data => {
-          console.log(data);
-          streetList.value = data;
-          console.log(streetList.value);
-        })
+        if(formState.dataModel.regionCode){
+          get('system/area/getAreaList', {code: formState.dataModel.regionCode}).then(data => {
+            streetList.value = data;
+            formState.dataModel.streetCode = "";
+          })
+        }
       }
 
       const onFinish = () => {

+ 5 - 5
vue/src/views/companyService/company/index.vue

@@ -26,7 +26,7 @@
           </a-form-item>
         </a-col>
         <a-col :span="6" style="text-align: right">
-          <a-button type="primary" html-type="submit" @click="onSearch">查询</a-button>
+          <a-button type="primary" html-type="submit" @click="onSearch" >查询</a-button>
         </a-col>
       </a-row>
       <a-row :gutter="24">
@@ -63,8 +63,8 @@
       </a-row>
       <a-row class="edit-operation">
         <a-col :span="24" style="text-align: right">
-          <a-button type="primary" html-type="submit" @click='onAdd'>新增</a-button>
-          <BImportExcel
+          <a-button type="primary" html-type="submit" @click='onAdd' functioncode="T01020102">新增</a-button>
+          <BImportExcel functioncode="T01020105"
             :options="importOptions"
             @success="loadData"
           ></BImportExcel>
@@ -84,8 +84,8 @@
         <template #bodyCell="{ column, text, record }">
           <template v-if="column.key === 'operation'">
             <div class="table-operation">
-              <a-button type="link" size="small" @click='onEdit(record)'>编辑</a-button>
-              <a-button type="link" size="small" @click="onDel(record)">删除</a-button>
+              <a-button type="link" size="small" @click='onEdit(record)' functioncode="T01020103">编辑</a-button>
+              <a-button type="link" size="small" @click="onDel(record)" functioncode="T01020104">删除</a-button>
             </div>
           </template>
         </template>

+ 4 - 3
vue/src/views/companyService/post/index.vue

@@ -47,8 +47,9 @@
       </a-row>
       <a-row class="edit-operation">
         <a-col :span="24" style="text-align: right">
-          <a-button type="primary" html-type="submit" @click='onAdd'>新增</a-button>
+          <a-button type="primary" html-type="submit" functioncode="T01020202" @click='onAdd'>新增</a-button>
           <BImportExcel
+            functioncode="T01020205"
             :options="importOptions"
             @success="loadData"
           ></BImportExcel>
@@ -68,8 +69,8 @@
         <template #bodyCell="{ column, text, record }">
           <template v-if="column.key === 'operation'">
             <div class="table-operation">
-              <a-button type="link" size="small" @click='onEdit(record)'>编辑</a-button>
-              <a-button type="link" size="small" @click="onDel(record)">删除</a-button>
+              <a-button type="link" size="small" @click='onEdit(record)' functioncode="T01020203">编辑</a-button>
+              <a-button type="link" size="small" @click="onDel(record)" functioncode="T01020204">删除</a-button>
             </div>
           </template>
         </template>

+ 800 - 0
vue/src/views/jobUserManager/jobuser/edit.vue

@@ -0,0 +1,800 @@
+<template>
+  <div class="card-edit">
+    <a-form :model="dataModel" autocomplete="off" @finish="onFinish">
+      <a-divider orientation="left">求职人员信息管理</a-divider>
+      <a-row :gutter="24">
+        <a-col :span="8">
+          <a-form-item
+            label="姓名"
+            :label-col="{ span: 6 }"
+            name="name"
+            :rules="[{ required: true, message: '请输入姓名!' }]"
+          >
+            <a-input v-model:value="dataModel.name" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="身份证号码"
+            :label-col="{ span: 6 }"
+            name="identityNumber"
+            :rules="[{ required: true, message: '请输入身份证号码!' }]"
+          >
+            <a-input v-model:value="dataModel.identityNumber" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item label="性别" :label-col="{span:6}" name="sex">
+            <a-select
+              ref="select"
+              v-model:value="dataModel.sex"
+              :options="genderList"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+
+      <a-row :gutter="24">
+        <a-col :span="8">
+          <a-form-item
+            label="民族"
+            :label-col="{ span: 6 }"
+            name="nation"
+            :rules="[{ required: true, message: '请输入民族!' }]"
+          >
+            <a-input v-model:value="dataModel.nation" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item label="政治面貌" :label-col="{span:6}" name="politicsStatusID">
+            <a-select
+              ref="select"
+              v-model:value="dataModel.politicsStatusID"
+              :options="politicsStatusList"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="出生地"
+            :label-col="{ span: 6 }"
+            name="birthplace"
+            :rules="[{ required: true, message: '请输入出生地!' }]"
+          >
+            <a-input v-model:value="dataModel.birthplace" placeholder=""/>
+          </a-form-item>
+        </a-col>
+      </a-row>
+
+      <a-row :gutter="24">
+        <a-col :span="8">
+          <a-form-item
+            label="出生日期"
+            :label-col="{ span: 6 }"
+            name="birthDay"
+            :rules="[{ required: true, message: '请输入出生日期!' }]"
+          >
+            <a-date-picker
+              v-model:value="dataModel.birthDay"
+              picker="date"
+              value-format="YYYY-MM-DD"
+            />
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item label="户口性质" :label-col="{span:6}" name="familyNatureID"
+                       :rules="[{ required: true, message: '请选择户口性质!' }]">
+            <a-select
+              ref="select"
+              v-model:value="dataModel.familyNatureID"
+              :options="familyNatureList"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item label="文化程度" :label-col="{span:6}" name="cultureRank"
+                       :rules="[{ required: true, message: '请选择文化程度!' }]">
+            <a-select
+              ref="select"
+              v-model:value="dataModel.cultureRank"
+              :options="cultureList"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+
+      <a-row :gutter="24">
+        <a-col :span="8">
+          <a-form-item label="健康状况" :label-col="{span:6}" name="healthID"
+                       :rules="[{ required: true, message: '请选择健康状况!' }]">
+            <a-select
+              ref="select"
+              v-model:value="dataModel.healthID"
+              :options="healthList"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="血型"
+            :label-col="{ span: 6 }"
+            name="bloodTypeID"
+            :rules="[{ required: true, message: '请输入血型!' }]"
+          >
+            <a-select
+              ref="select"
+              v-model:value="dataModel.bloodTypeID"
+              :options="bloodTypeList"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="身高"
+            :label-col="{ span: 6 }"
+            name="height"
+            :rules="[{ required: true, message: '请输入身高!' }]"
+          >
+            <a-input v-model:value="dataModel.height" placeholder=""/>
+          </a-form-item>
+        </a-col>
+      </a-row>
+
+      <a-row :gutter="24">
+        <a-col :span="8">
+          <a-form-item
+            label="视力"
+            :label-col="{ span: 6 }"
+            name="vision"
+            :rules="[{ required: true, message: '请输入视力!' }]"
+          >
+            <a-input v-model:value="dataModel.vision" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="体重"
+            :label-col="{ span: 6 }"
+            name="weight"
+            :rules="[{ required: true, message: '请输入体重!' }]"
+          >
+            <a-input v-model:value="dataModel.weight" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item label="婚姻状况" :label-col="{span:6}" name="maritalStatusID"
+                       :rules="[{ required: true, message: '请选择婚姻状况!' }]">
+            <a-select
+              ref="select"
+              v-model:value="dataModel.maritalStatusID"
+              :options="maritalStatusList"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+
+      <a-row :gutter="24">
+        <a-col :span="8">
+          <a-form-item label="省份" :label-col="{span:6}" name="provinceCode"
+                       :rules="[{ required: true, message: '请选择省份!' }]">
+            <a-select
+              ref="select"
+              v-model:value="dataModel.provinceCode"
+              :options="provinceList"
+              :field-names="{ label: 'name', value: 'code' }"
+              :allow-clear="true"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item label="市/县" :label-col="{span:6}" name="regionCode"
+                       :rules="[{ required: true, message: '请选择市/县!' }]">
+            <a-select
+              ref="select"
+              v-model:value="dataModel.regionCode"
+              :options="regionList"
+              :field-names="{ label: 'name', value: 'code' }"
+              :allow-clear="true"
+              @change="changeCity"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item label="镇街" :label-col="{span:6}" name="streetCode"
+                       :rules="[{ required: true, message: '请选择镇街!' }]">
+            <a-select
+              ref="select"
+              v-model:value="dataModel.streetCode"
+              :options="streetList"
+              :field-names="{ label: 'name', value: 'code' }"
+              :allow-clear="true"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+
+      <a-row :gutter="24">
+        <a-col :span="8">
+          <a-form-item
+            label="联系人"
+            :label-col="{ span: 6 }"
+            name="userName"
+            :rules="[{ required: true, message: '请输入联系人!' }]"
+          >
+            <a-input v-model:value="dataModel.userName" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="联系电话"
+            :label-col="{ span: 6 }"
+            name="userMobile"
+            :rules="[{ required: true, message: '请输入联系电话!' }]"
+          >
+            <a-input v-model:value="dataModel.userMobile" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="地址"
+            :label-col="{ span: 6 }"
+            name="address"
+            :rules="[{ required: true, message: '请输入地址!' }]"
+          >
+            <a-input v-model:value="dataModel.address" placeholder=""/>
+          </a-form-item>
+        </a-col>
+      </a-row>
+
+      <a-row :gutter="24">
+        <a-col :span="8">
+          <a-form-item
+            label="家庭住址"
+            :label-col="{ span: 6 }"
+            name="familyAddress"
+            :rules="[{ required: true, message: '请输入家庭住址!' }]"
+          >
+            <a-input v-model:value="dataModel.familyAddress" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="邮政编码"
+            :label-col="{ span: 6 }"
+            name="postalCode"
+            :rules="[{ required: true, message: '请输入邮政编码!' }]"
+          >
+            <a-input v-model:value="dataModel.postalCode" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="电子邮箱"
+            :label-col="{ span: 6 }"
+            name="email"
+            :rules="[{ required: true, message: '请输入电子邮箱!' }]"
+          >
+            <a-input v-model:value="dataModel.email" placeholder=""/>
+          </a-form-item>
+        </a-col>
+      </a-row>
+
+      <a-row :gutter="24">
+        <a-col :span="8">
+          <a-form-item label="所属驿站" :label-col="{span:6}" name="siteID"
+                       :rules="[{ required: true, message: '请选择所属驿站!' }]">
+            <a-select
+              ref="select"
+              v-model:value="dataModel.siteID"
+              :options="siteList"
+              :field-names="{ label: 'siteName', value: 'siteID' }"
+              :allow-clear="true"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item label="就业状态" :label-col="{span:6}" name="jobStatusID"
+                       :rules="[{ required: true, message: '请选择就业状态!' }]">
+            <a-select
+              ref="select"
+              v-model:value="dataModel.jobStatusID"
+              :options="jobStatusList"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item label="重点人员类别" :label-col="{span:6}" name="keyPersonTypeID"
+                       :rules="[{ required: true, message: '请选择重点人员类别!' }]">
+            <a-select
+              ref="select"
+              v-model:value="dataModel.keyPersonTypeID"
+              :options="keyPersonTypeList"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+
+      <a-row :gutter="24">
+        <a-col :span="11">
+          <a-form-item
+            label=" 兴趣爱好"
+            :label-col="{ span: 4 }"
+            name="hobby"
+            :rules="[{ required: false, message: '请输入兴趣爱好!' }]"
+          >
+<!--            <a-input v-model:value="dataModel.hobby" placeholder=""/>-->
+            <a-textarea v-model:value="dataModel.hobby" placeholder="兴趣爱好" :rows="2" style="margin-left: 8px;"/>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row>
+        <a-col :span="24" style="text-align: right; margin-top: 20px; margin-right: 20px">
+          <Space>
+            <a-button @click="addEducation">
+              <template #icon>
+                <plus-circle-outlined/>
+              </template>
+              新增
+            </a-button>
+          </Space>
+        </a-col>
+      </a-row>
+      <a-divider orientation="left">教育经历</a-divider>
+      <a-row>
+        <a-col style="margin-bottom: 20px;">
+          <a-table :columns="educationColumns" :data-source="educationData" :pagination="false"
+                   bordered>
+            <template #bodyCell="{ column ,index}">
+              <template v-if="column.key === 'schoolName'">
+                <div>
+                  <a-input
+                    v-model:value="educationData[index][column.key]" style="width: 200px"
+                  />
+                </div>
+              </template>
+              <template v-if="column.key === 'cultureRank'">
+                <div>
+                  <a-select
+                    ref="select"
+                    v-model:value="educationData[index][column.key]"
+                    :options="cultureList"
+                    :field-names="{ label: 'name', value: 'value' }"
+                    :allow-clear="true" style="width: 200px"
+                  >
+                  </a-select>
+                </div>
+              </template>
+              <template v-if="column.key === 'schoolTime'">
+                <div>
+                  <a-date-picker
+                    v-model:value="educationData[index][column.key]"
+                    picker="date"
+                    value-format="YYYY-MM-DD"
+                  />
+                </div>
+              </template>
+              <template v-if="column.key === 'overTime'">
+                <div>
+                  <a-date-picker
+                    v-model:value="educationData[index][column.key]"
+                    picker="date"
+                    value-format="YYYY-MM-DD"
+                  />
+                </div>
+              </template>
+              <template v-if="column.key === 'major'">
+                <div>
+                  <a-input
+                    v-model:value="educationData[index][column.key]" style="width: 200px"
+                  />
+                </div>
+              </template>
+              <template v-if="column.key === 'educationOperation'">
+                <a-button type="link" size="small" @click="deleteEducation(index)">删除</a-button>
+              </template>
+            </template>
+          </a-table>
+        </a-col>
+      </a-row>
+      <a-row>
+        <a-col :span="24" style="text-align: right; margin-top: 20px; margin-right: 20px">
+          <Space>
+            <a-button @click="addExperience">
+              <template #icon>
+                <plus-circle-outlined/>
+              </template>
+              新增
+            </a-button>
+          </Space>
+        </a-col>
+      </a-row>
+      <a-divider orientation="left">工作经历</a-divider>
+      <a-row>
+        <a-col style="margin-bottom: 20px;">
+          <a-table :columns="experienceColumns" :data-source="experienceData" :pagination="false"
+                   bordered>
+            <template #bodyCell="{ column ,index}">
+              <template v-if="column.key === 'startTime'">
+                <div>
+                  <a-date-picker
+                    v-model:value="experienceData[index][column.key]"
+                    picker="date"
+                    value-format="YYYY-MM-DD"
+                  />
+                </div>
+              </template>
+              <template v-if="column.key === 'endTime'">
+                <div>
+                  <a-date-picker
+                    v-model:value="experienceData[index][column.key]"
+                    picker="date"
+                    value-format="YYYY-MM-DD"
+                  />
+                </div>
+              </template>
+              <template v-if="column.key === 'workAddress'">
+                <div>
+                  <a-input
+                    v-model:value="experienceData[index][column.key]" style="width: 200px"
+                  />
+                </div>
+              </template>
+              <template v-if="column.key === 'duties'">
+                <div>
+                  <a-input
+                    v-model:value="experienceData[index][column.key]" style="width: 200px"
+                  />
+                </div>
+              </template>
+              <template v-if="column.key === 'experienceOperation'">
+                <a-button type="link" size="small" @click="deleteExperience(index)">删除</a-button>
+              </template>
+            </template>
+          </a-table>
+        </a-col>
+      </a-row>
+      <a-form-item class="buttom-btns">
+        <a-button @click="onClose">取消</a-button>
+        <a-button type="primary" html-type="submit">提交</a-button>
+      </a-form-item>
+    </a-form>
+  </div>
+</template>
+
+<script lang="ts">
+import {defineComponent, reactive, ref, toRefs} from 'vue';
+// import {useRouter} from 'vue-router';
+import type {SelectProps, TableColumnsType} from 'ant-design-vue';
+import {useTabsViewStore} from '@/store/modules/tabsView';
+import BUploadFile from '@/components/file/uploadFile.vue';
+import {get} from "@/api/common";
+import {save, getEducationList, getDataById, getExperienceList} from '@/api/jobUserManager/jobuser'
+
+interface FormState {
+  dataModel: any;
+}
+
+export default defineComponent(
+  {
+    components: {BUploadFile},
+    setup() {
+      const formState = reactive<FormState>({dataModel: {}});
+      const formTableState = reactive({loading: false});
+      const searchParams = reactive({
+        pageIndex: 1,
+        pageSize: 99
+      });
+      // const router = useRouter();
+      const siteuserList = ref([]);
+      const provinceList = ref<SelectProps['options']>([{name: '广东省', code: '440000000000000'}]);
+      const siteList = ref<SelectProps['options']>();
+      const genderList = ref<SelectProps['options']>();
+      const keyPersonTypeList = ref<SelectProps['options']>();
+      const jobStatusList = ref<SelectProps['options']>();
+      const maritalStatusList = ref<SelectProps['options']>();
+      const healthList = ref<SelectProps['options']>();
+      const bloodTypeList = ref<SelectProps['options']>();
+      const cultureList = ref<SelectProps['options']>();
+      const politicsStatusList = ref<SelectProps['options']>();
+      const regionList = ref<SelectProps['options']>();
+      const streetList = ref<SelectProps['options']>();
+      const familyNatureList = ref<SelectProps['options']>();
+      // const fullpath = router.currentRoute.value.fullPath;
+      const tabsViewStore = useTabsViewStore();
+      const isEdit = true;
+
+      const fileList = ref();
+      const setFileList = (files) => {
+        fileList.value = files;
+      };
+
+      get('/companyService/company/getSiteList', {}).then(data => {
+        siteList.value = data;
+      })
+
+      get('system/dictionary/getDictionaryItemByCodeList', {code: 'Gender'}).then(data => {
+        genderList.value = data;
+      });
+
+      get('system/dictionary/getDictionaryItemByCodeList', {code: 'KeyPersonType'}).then(data => {
+        keyPersonTypeList.value = data;
+      });
+
+      get('system/dictionary/getDictionaryItemByCodeList', {code: 'JobStatus'}).then(data => {
+        jobStatusList.value = data;
+      });
+
+      get('system/dictionary/getDictionaryItemByCodeList', {code: 'MaritalStatus'}).then(data => {
+        maritalStatusList.value = data;
+      });
+
+      get('system/dictionary/getDictionaryItemByCodeList', {code: 'BloodType'}).then(data => {
+        bloodTypeList.value = data;
+      });
+
+      get('system/dictionary/getDictionaryItemByCodeList', {code: 'Health'}).then(data => {
+        healthList.value = data;
+      });
+
+      get('system/dictionary/getDictionaryItemByCodeList', {code: 'CultureLevel'}).then(data => {
+        cultureList.value = data;
+      });
+
+      get('system/dictionary/getDictionaryItemByCodeList', {code: 'PoliticsStatus'}).then(data => {
+        politicsStatusList.value = data;
+      });
+
+      get('system/area/getCityList', {}).then(data => {
+        regionList.value = data;
+      });
+
+      get('system/dictionary/getDictionaryItemByCodeList', {code: 'FamilyNature'}).then(data => {
+        familyNatureList.value = data;
+      });
+
+      const changeCity = () => {
+        if (formState.dataModel.regionCode) {
+          get('system/area/getAreaList', {code: formState.dataModel.regionCode}).then(data => {
+            streetList.value = data;
+            formState.dataModel.streetCode = "";
+          })
+        }
+      }
+
+      const educationColumns: TableColumnsType = [
+        {
+          title: '序号',
+          align: "center",
+          key: 'educationID',
+          width: 120,
+          customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`
+        },
+        {
+          title: '学校名',
+          dataIndex: 'schoolName',
+          key: 'schoolName',
+          align: "center",
+          width: 120
+        },
+        {
+          title: '文化程度',
+          dataIndex: 'cultureRank',
+          key: 'cultureRank',
+          align: "center",
+          width: 120
+        },
+        {
+          title: '就读时间',
+          dataIndex: 'schoolTime',
+          key: 'schoolTime',
+          align: "center",
+          width: 120
+        },
+        {
+          title: '毕业时间',
+          dataIndex: 'overTime',
+          key: 'overTime',
+          align: "center",
+          width: 120
+        },
+        {
+          title: '专业',
+          dataIndex: 'major',
+          key: 'major',
+          align: "center",
+          width: 120
+        },
+        {title: '操作', key: 'educationOperation', fixed: 'right', width: 120, align: "center"},
+      ]
+
+      const educationData = ref([]);
+      const loadEducation = (id: any) => {
+        getEducationList(id).then(data => {
+          if (data)
+            educationData.value = data;
+        });
+      }
+      const addEducation = () => {
+        (educationData.value as any[]).push({
+          schoolName: '',
+          cultureRank: null,
+          schoolTime: null,
+          overTime: null,
+          major: ''
+        });
+      }
+      const deleteEducation = (record) => {
+        (educationData.value as any[]).splice(record, 1);
+      }
+
+      const experienceColumns: TableColumnsType = [
+        {
+          title: '序号',
+          align: "center",
+          key: 'experienceID',
+          width: 120,
+          customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`
+        },
+        {
+          title: '开始时间',
+          dataIndex: 'startTime',
+          key: 'startTime',
+          align: "center",
+          width: 120
+        },
+        {
+          title: '结束时间',
+          dataIndex: 'endTime',
+          key: 'endTime',
+          align: "center",
+          width: 120
+        },
+        {
+          title: '工作单位',
+          dataIndex: 'workAddress',
+          key: 'workAddress',
+          align: "center",
+          width: 120
+        },
+        {
+          title: '职务',
+          dataIndex: 'duties',
+          key: 'duties',
+          align: "center",
+          width: 120
+        },
+        {title: '操作', key: 'experienceOperation', fixed: 'right', width: 120, align: "center"},
+      ]
+      const experienceData = ref([]);
+      const loadExperienceData = (id: any) => {
+        getExperienceList(id).then(data => {
+          if (data) {
+            experienceData.value = data;
+          }
+        })
+      }
+      const deleteExperience = (record) => {
+        (experienceData.value as any[]).splice(record, 1);
+      }
+      const addExperience = () => {
+        (experienceData.value as any[]).push({
+          startTime: null,
+          endTime: null,
+          workAddress: null,
+          duties: null,
+        });
+      }
+
+
+      const onAdd = () => {
+        tabsViewStore.addTabByPath('', null);
+      };
+      const onDel = () => {
+
+      };
+      const onClose = (reload: any) => {
+        tabsViewStore.closeCurrentTabByPath('/jobusermgr/jobseeker/add');
+        tabsViewStore.closeCurrentTabByPath('/jobusermgr/jobseeker/edit');
+        // router.push({name: '/taskAndLog/dotask/index'});
+        tabsViewStore.openTab('/jobusermgr/jobseeker/index', {reload: reload});
+      };
+
+      const onFinish = () => {
+        formState.dataModel.jobEducation = educationData.value;
+        formState.dataModel.jobExperience = experienceData.value;
+        save(formState.dataModel).then(result => {
+          if (result) {
+            onClose(1)
+          }
+        });
+      }
+
+      const loadData = (id: any) => {
+        getDataById(id).then(data => {
+          formState.dataModel = data
+          if (formState.dataModel.regionCode) {
+            changeCity();
+          }
+        });
+      };
+
+      return {
+        ...toRefs(formState),
+        isEdit,
+        loadData,
+        onClose,
+        onFinish,
+        onAdd,
+        onDel,
+        siteList,
+        addEducation,
+        deleteEducation,
+        educationColumns,
+        maritalStatusList,
+        formState,
+        formTableState,
+        setFileList,
+        regionList,
+        educationData,
+        streetList,
+        familyNatureList,
+        siteuserList,
+        cultureList,
+        genderList,
+        loadEducation,
+        healthList,
+        keyPersonTypeList,
+        politicsStatusList,
+        changeCity,
+        jobStatusList,
+        experienceData,
+        provinceList,
+        bloodTypeList,
+        loadExperienceData,
+        deleteExperience,
+        addExperience,
+        experienceColumns
+      }
+    },
+    created() {
+      const id = history.state.params?.id;
+      this.loadData(id);
+      if(id){
+        this.loadEducation(id);
+        this.loadExperienceData(id);
+      }
+    }
+  })
+</script>
+

+ 37 - 7
vue/src/views/jobUserManager/jobuser/index.vue

@@ -95,7 +95,9 @@
         </a-col>
       </a-row>
       <a-row class="edit-operation">
-        <a-col :span="24" style="text-align: right"></a-col>
+        <a-col :span="24" style="text-align: right">
+          <a-button type="primary" html-type="submit" @click='onAdd' functioncode="T01030102">新增</a-button>
+        </a-col>
       </a-row>
     </a-form>
     <div class="search-result-list">
@@ -112,8 +114,8 @@
         <template #bodyCell="{ column, text, record }">
           <template v-if="column.key === 'operation'">
             <div class="table-operation">
-              <a-button type="link" size="small" @click='onEdit(record)'>编辑</a-button>
-              <a-button type="link" size="small" @click="onDel(record)">删除</a-button>
+              <a-button type="link" size="small" functioncode="T01030103" @click='onEdit(record)'>编辑</a-button>
+              <a-button type="link" size="small" functioncode="T01030104" @click="onDel(record)">删除</a-button>
             </div>
           </template>
         </template>
@@ -167,7 +169,11 @@ export default defineComponent({
       {title: '民族', dataIndex: 'nation', key: 'nation', width: 80},
       {title: '联系电话', dataIndex: 'userMobile', key: 'userMobile'},
       {title: '所属驿站', dataIndex: 'siteName', key: 'siteName'},
-      {title: '年龄', dataIndex: 'age', key: 'age'},
+      {
+        title: '年龄', dataIndex: 'age', key: 'age', customRender: item => {
+          return calculateAge(item.record.identityNumber);
+        }
+      },
       {title: '文化程度', dataIndex: 'cultureName', key: 'cultureName'},
       {title: '地址', dataIndex: 'address', key: 'address'},
       {title: '就业状态', dataIndex: 'jobStatusName', key: 'jobStatusName'},
@@ -189,6 +195,24 @@ export default defineComponent({
     const educationTypeList = ref<SelectProps['options']>();
     const emphasisTypeList = ref<SelectProps['options']>();
 
+    const calculateAge = (idCardNumber) => {
+      // 假设身份证号中出生日期的格式为YYYYMMDD
+      const birthYear = parseInt(idCardNumber.substring(6, 10), 10);
+      const birthMonth = parseInt(idCardNumber.substring(10, 12), 10);
+      const birthDay = parseInt(idCardNumber.substring(12, 14), 10);
+      // 获取当前日期
+      const currentDate = new Date();
+      const currentYear = currentDate.getFullYear();
+      const currentMonth = currentDate.getMonth() + 1; // 月份从 0 开始
+      const currentDay = currentDate.getDate();
+      // 计算年龄
+      let age = currentYear - birthYear;
+      if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
+        age--; // 生日还未过,减去一岁
+      }
+
+      return age;
+    }
     const onSelectChange = (selectedRowKeys: any) => {
       formState.selectedRowKeys = selectedRowKeys;
     };
@@ -245,18 +269,23 @@ export default defineComponent({
 
     const tabsViewStore = useTabsViewStore();
     const onAdd = () => {
-      tabsViewStore.addTabByPath('/taskAndLog/dotask/add', null);
+      tabsViewStore.addTabByPath('/jobusermgr/jobseeker/add', null);
     };
     const onEdit = (item: any) => {
-      tabsViewStore.addTabByPath('/taskAndLog/dotask/edit', {id: item.dotaskID});
+      tabsViewStore.addTabByPath('/jobusermgr/jobseeker/edit', {id: item.jobuserID});
     };
 
+    const onDel=()=>{
+
+    }
+
     return {
       modalRoleUserRef,
       modalRoleEditRef,
       formRef,
       loadData,
       onAdd,
+      onDel,
       onEdit,
       searchParamsState,
       formState,
@@ -274,7 +303,8 @@ export default defineComponent({
       getJobStatusList,
       getSexList,
       getEducationList,
-      getEmphasisTypeList
+      getEmphasisTypeList,
+      calculateAge
 
     };
   },

+ 6 - 5
vue/src/views/taskAndLog/dotask/edit.vue

@@ -181,9 +181,12 @@ export default defineComponent(
       }
 
       const changeCity = () => {
-        get('system/area/getAreaList', {code: formState.dataModel.regionCode}).then(data => {
-          streetList.value = data;
-        })
+        if(formState.dataModel.regionCode){
+          get('system/area/getAreaList', {code: formState.dataModel.regionCode}).then(data => {
+            streetList.value = data;
+            formState.dataModel.streetCode = "";
+          })
+        }
       }
 
       const userData = ref([]);
@@ -192,7 +195,6 @@ export default defineComponent(
         getWorkUserList(id).then(data => {
           if (data)
             userData.value = data;
-          console.log('userData',userData);
         });
       }
 
@@ -229,7 +231,6 @@ export default defineComponent(
       const loadData = (id: any) => {
         getDataById(id).then(data => {
           formState.dataModel = data
-          console.log(formState.dataModel);
           if (formState.dataModel.regionCode) {
             changeCity();
           }

+ 3 - 3
vue/src/views/taskAndLog/dotask/index.vue

@@ -64,7 +64,7 @@
       </a-row>
       <a-row class="edit-operation">
         <a-col :span="24" style="text-align: right">
-          <a-button type="primary" html-type="submit" @click='onAdd'>新增</a-button>
+          <a-button type="primary" html-type="submit" @click='onAdd' functioncode="T01040102">新增</a-button>
           <BExportExcel :title="'导出'" :filename="'任务信息'"
                         :url="'taskAndLog/dotask/export'"
                         :params="{...searchParams, isExport: true, rows:10000}"></BExportExcel>
@@ -81,8 +81,8 @@
         <template #bodyCell="{ column, text, record }">
           <template v-if="column.key === 'operation'">
             <div class="table-operation">
-              <a-button type="link" size="small" @click='onEdit(record)'>编辑</a-button>
-              <a-button type="link" size="small" @click="onDel(record)">删除</a-button>
+              <a-button type="link" size="small" @click='onEdit(record)' functioncode="T01040103">编辑</a-button>
+              <a-button type="link" size="small" @click="onDel(record)" functioncode="T01040104">删除</a-button>
             </div>
           </template>
         </template>