Browse Source

求职信息管理

lizeyu 11 months ago
parent
commit
63936ea5a0
26 changed files with 1755 additions and 352 deletions
  1. 1 10
      src/main/java/com/hz/employmentsite/controller/companyService/PostController.java
  2. 30 3
      src/main/java/com/hz/employmentsite/controller/jobUserManager/RecommendMgtController.java
  3. 0 12
      src/main/java/com/hz/employmentsite/mapper/cquery/PostCQuery.java
  4. 26 1
      src/main/java/com/hz/employmentsite/mapper/cquery/RecommendMgtCQuery.java
  5. 1 11
      src/main/java/com/hz/employmentsite/services/impl/companyService/PostServiceImpl.java
  6. 8 9
      src/main/java/com/hz/employmentsite/services/impl/jobUserManager/JobHuntServiceImpl.java
  7. 51 6
      src/main/java/com/hz/employmentsite/services/impl/jobUserManager/RecommendMgtServiceImpl.java
  8. 0 14
      src/main/java/com/hz/employmentsite/services/service/companyService/PostService.java
  9. 36 0
      src/main/java/com/hz/employmentsite/services/service/jobUserManager/RecommendMgtService.java
  10. 4 0
      src/main/java/com/hz/employmentsite/vo/companyService/PostVo.java
  11. 2 1
      src/main/java/com/hz/employmentsite/vo/jobUserManager/JobHuntVo.java
  12. 3 2
      src/main/java/com/hz/employmentsite/vo/companyService/RecommendCompanyPostVo.java
  13. 12 0
      src/main/java/com/hz/employmentsite/vo/jobUserManager/RecommendJobVo.java
  14. 2 0
      src/main/resources/generatorConfig.xml
  15. 3 2
      src/main/resources/mapping/cquery/JobHuntCQuery.xml
  16. 5 25
      src/main/resources/mapping/cquery/PostCQuery.xml
  17. 60 5
      src/main/resources/mapping/cquery/RecommendMgtCQuery.xml
  18. 977 65
      vue/package-lock.json
  19. 0 13
      vue/src/api/companyService/post.ts
  20. 41 0
      vue/src/api/jobUserManager/recommendMgt/index.ts
  21. 2 1
      vue/src/router/asyncModules/companyService.ts
  22. 8 3
      vue/src/views/companyService/post/index.vue
  23. 259 0
      vue/src/views/companyService/post/recommend.vue
  24. 9 3
      vue/src/views/jobUserManager/jobhunt/index.vue
  25. 67 48
      vue/src/views/jobUserManager/jobhunt/recommend.vue
  26. 148 118
      vue/src/views/jobUserManager/recommendMgt/index.vue

+ 1 - 10
src/main/java/com/hz/employmentsite/controller/companyService/PostController.java

@@ -10,7 +10,7 @@ import com.hz.employmentsite.services.service.AccountService;
 import com.hz.employmentsite.services.service.companyService.PostService;
 import com.hz.employmentsite.util.DateUtils;
 import com.hz.employmentsite.util.ExcelHelper;
-import com.hz.employmentsite.vo.companyService.RecommendCompanyPostVo;
+import com.hz.employmentsite.vo.jobUserManager.RecommendCompanyPostVo;
 import com.hz.employmentsite.vo.companyService.RecommendPostVo;
 import com.hz.employmentsite.vo.companyService.PostVo;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -55,15 +55,6 @@ public class PostController {
         return RespGenerstor.success(result);
     }
 
-    @ResponseBody
-    @GetMapping("/getRecommendCompanyPost")
-    public BaseResponse getRecommendCompanyPost(@RequestParam("pageIndex") int pageIndex,@RequestParam("pageSize") int pageSize,
-                                                @RequestParam("jobHuntId") String jobHuntId, @RequestParam("professionId") String professionId,
-                                                @RequestParam("companyName") String companyName, @RequestParam("type") Integer type) {
-        PageInfo<RecommendCompanyPostVo> result = postService.getRecommendCompanyPostList(pageIndex, pageSize,jobHuntId, professionId, companyName, type);
-        return RespGenerstor.success(result);
-    }
-
     @PostMapping("/saveCommendPost")
     public BaseResponse saveCommendPost(@RequestBody RecommendPostVo data) {
         var result = postService.saveCommendPost(data, accountService.getLoginUserID());

+ 30 - 3
src/main/java/com/hz/employmentsite/controller/jobUserManager/RecommendMgtController.java

@@ -6,12 +6,14 @@ import com.hz.employmentsite.filter.exception.RespGenerstor;
 import com.hz.employmentsite.model.PcRecommendMgt;
 import com.hz.employmentsite.services.service.AccountService;
 import com.hz.employmentsite.services.service.jobUserManager.RecommendMgtService;
-import com.hz.employmentsite.vo.companyService.RecommendPostVo;
+import com.hz.employmentsite.vo.jobUserManager.RecommendCompanyPostVo;
+import com.hz.employmentsite.vo.jobUserManager.RecommendJobVo;
 import com.hz.employmentsite.vo.jobUserManager.RecommendMgtVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
+import java.util.Map;
 
 @RestController
 @RequestMapping(value = "/api/jobusermgr/recommendmgt")
@@ -26,9 +28,15 @@ public class RecommendMgtController {
     public BaseResponse getList(@RequestParam("page") int pageIndex, @RequestParam("limit") int pageSize,
                                 @RequestParam(required = false) String name, @RequestParam(required = false) String companyName,
                                 @RequestParam(required = false) Integer recommendType, @RequestParam(required = false) Integer entryState,
-                                @RequestParam(required = false) String pushName, @RequestParam(required = false) String professionId) {
+                                @RequestParam(required = false) String pushName, @RequestParam(required = false) String professionID) {
 
-        PageInfo<RecommendMgtVo> result = recommendMgtService.getList(pageIndex, pageSize, name, companyName, recommendType, entryState, pushName, professionId);
+        PageInfo<RecommendMgtVo> result = recommendMgtService.getList(pageIndex, pageSize, name, companyName, recommendType, entryState, pushName, professionID);
+        return RespGenerstor.success(result);
+    }
+
+    @PostMapping("/setEntryState")
+    public BaseResponse setEntryState(@RequestBody PcRecommendMgt data) {
+        var result = recommendMgtService.setEntryState(data.getRecommendMgtID(), data.getEntryState());
         return RespGenerstor.success(result);
     }
 
@@ -37,4 +45,23 @@ public class RecommendMgtController {
         var result = recommendMgtService.addRecommend(data, accountService.getLoginUserID());
         return RespGenerstor.success(result);
     }
+
+    @ResponseBody
+    @GetMapping("/getRecommendCompanyPostList")
+    public BaseResponse getRecommendCompanyPostList(@RequestParam("pageIndex") int pageIndex,@RequestParam("pageSize") int pageSize,
+                                                @RequestParam("jobHuntID") String jobHuntID, @RequestParam(required = false) String professionID,
+                                                @RequestParam(required = false) String companyName, @RequestParam("type") Integer type) {
+        PageInfo<RecommendCompanyPostVo> result = recommendMgtService.getRecommendCompanyPostList(pageIndex, pageSize, jobHuntID, professionID, companyName, type);
+        return RespGenerstor.success(result);
+    }
+
+    @ResponseBody
+    @GetMapping("/getRecommendJobList")
+    public BaseResponse getRecommendJobList(@RequestParam("pageIndex") int pageIndex,@RequestParam("pageSize") int pageSize,
+                                                @RequestParam("postID") String postID, @RequestParam(required = false) String professionID,
+                                                @RequestParam(required = false) String userName, @RequestParam("type") Integer type,
+                                                @RequestParam(required = false) Integer cultureLeve, @RequestParam(required = false) Integer keyPersonType) {
+        PageInfo<RecommendJobVo> result = recommendMgtService.getRecommendJobList(pageIndex, pageSize, postID, professionID, userName, type, cultureLeve, keyPersonType);
+        return RespGenerstor.success(result);
+    }
 }

+ 0 - 12
src/main/java/com/hz/employmentsite/mapper/cquery/PostCQuery.java

@@ -1,7 +1,6 @@
 package com.hz.employmentsite.mapper.cquery;
 
 import com.hz.employmentsite.model.PcPost;
-import com.hz.employmentsite.vo.companyService.RecommendCompanyPostVo;
 import com.hz.employmentsite.vo.companyService.RecommendPostVo;
 import com.hz.employmentsite.vo.companyService.PostVo;
 import org.apache.ibatis.annotations.Param;
@@ -14,15 +13,4 @@ public interface PostCQuery {
     List<RecommendPostVo> selectRecommendPostList(@Param("jobUserID") String jobUserID);
 
     int insert(PcPost post);
-
-    /**
-     * 获取推荐企业信息
-     * @param jobHuntId 求职意向id
-     * @param professionId 岗位id
-     * @param companyName 企业名称
-     * @param type 0-未推荐;1-已推荐
-     * @return
-     * */
-    List<RecommendCompanyPostVo> getRecommendCompanyPostList(@Param("jobHuntId")String jobHuntId, @Param("professionId") String professionId,
-                                                                     @Param("companyName")String companyName, @Param("type") Integer type);
 }

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

@@ -1,5 +1,7 @@
 package com.hz.employmentsite.mapper.cquery;
 
+import com.hz.employmentsite.vo.jobUserManager.RecommendCompanyPostVo;
+import com.hz.employmentsite.vo.jobUserManager.RecommendJobVo;
 import com.hz.employmentsite.vo.jobUserManager.RecommendMgtVo;
 import org.apache.ibatis.annotations.Param;
 
@@ -11,5 +13,28 @@ public interface RecommendMgtCQuery {
                                              @Param("recommendType") Integer recommendType,
                                              @Param("entryState") Integer entryState,
                                              @Param("pushName") String pushName,
-                                             @Param("professionId") String professionId);
+                                             @Param("professionID") String professionID);
+
+    /**
+     * 获取推荐企业信息
+     * @param jobHuntID 求职意向id
+     * @param professionID 岗位id
+     * @param companyName 企业名称
+     * @param type 0-未推荐;1-已推荐
+     * @return
+     * */
+    List<RecommendCompanyPostVo> getRecommendCompanyPostList(@Param("jobHuntID")String jobHuntID, @Param("professionID") String professionID,
+                                                             @Param("companyName")String companyName, @Param("type") Integer type);
+
+    /**
+     * 获取推荐企业信息
+     * @param postID 企业岗位id
+     * @param professionID 岗位id
+     * @param userName 求职人员姓名
+     * @param type 0-未推荐;1-已推荐
+     * @return
+     * */
+    List<RecommendJobVo> getRecommendJobList(@Param("postID")String postID, @Param("professionID") String professionID,
+                                             @Param("userName")String userName, @Param("type") Integer type,
+                                             @Param("cultureLeve") Integer cultureLeve, @Param("keyPersonType") Integer keyPersonType);
 }

+ 1 - 11
src/main/java/com/hz/employmentsite/services/impl/companyService/PostServiceImpl.java

@@ -11,7 +11,7 @@ import com.hz.employmentsite.model.*;
 import com.hz.employmentsite.services.service.companyService.PostService;
 import com.hz.employmentsite.services.service.system.DictionaryService;
 import com.hz.employmentsite.util.StringUtils;
-import com.hz.employmentsite.vo.companyService.RecommendCompanyPostVo;
+import com.hz.employmentsite.vo.jobUserManager.RecommendCompanyPostVo;
 import com.hz.employmentsite.vo.companyService.RecommendPostVo;
 import com.hz.employmentsite.vo.companyService.PostVo;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -61,16 +61,6 @@ public class PostServiceImpl implements PostService {
         return result;
     }
 
-    @Override
-    public PageInfo<RecommendCompanyPostVo> getRecommendCompanyPostList(Integer page, Integer rows,
-                                                           String jobHuntId, String professionId,
-                                                           String companyName, Integer type){
-        PageHelper.startPage(page, rows);
-        List<RecommendCompanyPostVo> list = postCQuery.getRecommendCompanyPostList(jobHuntId, professionId, companyName, type);
-        PageInfo<RecommendCompanyPostVo> result = new PageInfo(list);
-        return result;
-    }
-
     @Override
     public Integer saveCommendPost(RecommendPostVo data, String userId) {
         int result = 0;

+ 8 - 9
src/main/java/com/hz/employmentsite/services/impl/jobUserManager/JobHuntServiceImpl.java

@@ -6,6 +6,7 @@ import com.hz.employmentsite.filter.exception.BaseException;
 import com.hz.employmentsite.mapper.PcJobhuntMapper;
 import com.hz.employmentsite.mapper.PcJobuserMapper;
 import com.hz.employmentsite.mapper.PcPostMapper;
+import com.hz.employmentsite.mapper.PcProfessionMapper;
 import com.hz.employmentsite.mapper.cquery.JobHuntCQuery;
 import com.hz.employmentsite.model.*;
 import com.hz.employmentsite.services.service.jobUserManager.JobHuntService;
@@ -34,7 +35,7 @@ public class JobHuntServiceImpl implements JobHuntService {
     private PcJobuserMapper pcJobuserMapper;
 
     @Autowired
-    private PcPostMapper pcPostMapper;
+    private PcProfessionMapper pcProfessionMapper;
 
     @Autowired
     private DictionaryService dictionaryService;
@@ -131,10 +132,8 @@ public class JobHuntServiceImpl implements JobHuntService {
         PcJobuserExample jobuserExample = new PcJobuserExample();
         jobuserExample.or().andNameIsNotNull();
         List<PcJobuser> jobUserList = pcJobuserMapper.selectByExample(jobuserExample);
-        //求职岗位
-        PcPostExample postExample = new PcPostExample();
-        postExample.or().andPostNameIsNotNull();
-        List<PcPost> postList = pcPostMapper.selectByExample(postExample);
+        //岗位
+        List<PcProfession> proList = pcProfessionMapper.selectByExample(null);
         //求职类型
         List<SysDictionaryItem> dicHuntTypeList = dictionaryService.getDictionaryItemList("JobHuntType");
         //人才类型
@@ -176,12 +175,12 @@ public class JobHuntServiceImpl implements JobHuntService {
             if (stringUtils.IsNullOrEmpty(String.valueOf(item.maxSalary)) || item.maxSalary == null)
                 errorInfo += "请填写最高薪酬!";
 
-            if (stringUtils.IsNullOrEmpty(item.postName))
+            if (stringUtils.IsNullOrEmpty(item.professionName))
                 errorInfo += "请填写岗位名称!";
             else {
-                item.postID = postList.stream().filter(it -> it.getPostName().equals(item.getPostName().trim()))
-                        .findFirst().orElse(new PcPost()).getPostID();
-                if (item.postID == null)
+                item.professionID = proList.stream().filter(it -> it.getProfessionName().equals(item.getProfessionName().trim()))
+                        .findFirst().orElse(new PcProfession()).getProfessionID();
+                if (item.professionID == null)
                     errorInfo += "岗位不存在!";
             }
             if (stringUtils.IsNullOrEmpty(item.areaWork))

+ 51 - 6
src/main/java/com/hz/employmentsite/services/impl/jobUserManager/RecommendMgtServiceImpl.java

@@ -6,6 +6,9 @@ import com.hz.employmentsite.mapper.PcRecommendMgtMapper;
 import com.hz.employmentsite.mapper.cquery.RecommendMgtCQuery;
 import com.hz.employmentsite.model.PcRecommendMgt;
 import com.hz.employmentsite.services.service.jobUserManager.RecommendMgtService;
+import com.hz.employmentsite.util.StringUtils;
+import com.hz.employmentsite.vo.jobUserManager.RecommendCompanyPostVo;
+import com.hz.employmentsite.vo.jobUserManager.RecommendJobVo;
 import com.hz.employmentsite.vo.jobUserManager.RecommendMgtVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -19,12 +22,14 @@ public class RecommendMgtServiceImpl implements RecommendMgtService {
     private RecommendMgtCQuery recommendMgtCQuery;
     @Autowired
     private PcRecommendMgtMapper pcRecommendMgtMapper;
+    @Autowired
+    private StringUtils stringUtils;
 
     @Override
-    public PageInfo<RecommendMgtVo> getList(Integer page, Integer rows, String name, String companyName, Integer recommendType, Integer entryState, String pushName, String professionId) {
+    public PageInfo<RecommendMgtVo> getList(Integer page, Integer rows, String name, String companyName, Integer recommendType, Integer entryState, String pushName, String professionID) {
         PageHelper.startPage(page, rows);
 
-        List<RecommendMgtVo> list = recommendMgtCQuery.getRecommendMgtList(name, companyName, recommendType, entryState, pushName, professionId);
+        List<RecommendMgtVo> list = recommendMgtCQuery.getRecommendMgtList(name, companyName, recommendType, entryState, pushName, professionID);
 
         PageInfo<RecommendMgtVo> result = new PageInfo(list);
 
@@ -32,18 +37,19 @@ public class RecommendMgtServiceImpl implements RecommendMgtService {
     }
 
     @Override
-    public int addRecommend(List<PcRecommendMgt> list, String userId) {
+    public int addRecommend(List<PcRecommendMgt> list, String userID) {
         try {
             List<PcRecommendMgt> addList = new ArrayList<>();
             list.forEach(item -> {
                 PcRecommendMgt model = new PcRecommendMgt();
-                model.setRecommendMgtID(UUID.randomUUID().toString());
+                model.setRecommendMgtID(item.getRecommendMgtID());
                 model.setPostID(item.getPostID());
                 model.setJobHuntID(item.getJobHuntID());
                 model.setRecommendType(item.getRecommendType());
-                model.setEntryState(0);
-                model.setCreateUserID(userId);
+                model.setEntryState(Integer.parseInt("0"));
+                model.setCreateUserID(userID);
                 model.setCreateTime(new Date());
+                addList.add(model);
             });
 
             addList.forEach(x -> {
@@ -56,4 +62,43 @@ public class RecommendMgtServiceImpl implements RecommendMgtService {
             return 0;
         }
     }
+
+    @Override
+    public int setEntryState(String id, Integer state) {
+        PcRecommendMgt data = pcRecommendMgtMapper.selectByPrimaryKey(id);
+        if (data == null) {
+            return -1;
+        }
+
+        data.setEntryState(state);
+        return pcRecommendMgtMapper.updateByPrimaryKey(data);
+    }
+
+    @Override
+    public PageInfo<RecommendCompanyPostVo> getRecommendCompanyPostList(Integer page, Integer rows, String jobHuntID, String professionID,
+                                                                        String companyName, Integer type) {
+        PageHelper.startPage(page, rows);
+        List<RecommendCompanyPostVo> list = recommendMgtCQuery.getRecommendCompanyPostList(jobHuntID, professionID, companyName, type);
+        list.forEach(x -> {
+            if (stringUtils.IsNullOrEmpty(x.recommendMgtID)) {
+                x.recommendMgtID = UUID.randomUUID().toString();
+            }
+        });
+        PageInfo<RecommendCompanyPostVo> result = new PageInfo(list);
+        return result;
+    }
+
+    @Override
+    public PageInfo<RecommendJobVo> getRecommendJobList(Integer page, Integer rows, String postID, String professionID,
+                                                        String userName, Integer type, Integer cultureLeve, Integer keyPersonType) {
+        PageHelper.startPage(page, rows);
+        List<RecommendJobVo> list = recommendMgtCQuery.getRecommendJobList(postID, professionID, userName, type, cultureLeve, keyPersonType);
+        list.forEach(x -> {
+            if (stringUtils.IsNullOrEmpty(x.recommendMgtID)) {
+                x.recommendMgtID = UUID.randomUUID().toString();
+            }
+        });
+        PageInfo<RecommendJobVo> result = new PageInfo(list);
+        return result;
+    }
 }

+ 0 - 14
src/main/java/com/hz/employmentsite/services/service/companyService/PostService.java

@@ -1,7 +1,6 @@
 package com.hz.employmentsite.services.service.companyService;
 import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.model.PcPost;
-import com.hz.employmentsite.vo.companyService.RecommendCompanyPostVo;
 import com.hz.employmentsite.vo.companyService.RecommendPostVo;
 import com.hz.employmentsite.vo.companyService.PostVo;
 import java.util.List;
@@ -17,17 +16,4 @@ public interface PostService {
     List<PcPost> getDataListByCompanyId(String companyID);
     List<PostVo> importPost(List<PostVo> dataList, String userID);
 
-    /**
-     * 获取推荐企业信息
-     * @param page
-     * @param rows
-     * @param jobHuntId 求职意向id
-     * @param professionId 岗位id
-     * @param companyName 企业名称
-     * @param type 0-未推荐;1-已推荐
-     * @return
-     * */
-    PageInfo<RecommendCompanyPostVo> getRecommendCompanyPostList(Integer page, Integer rows, String jobHuntId,
-                                                             String professionId, String companyName, Integer type);
-
 }

+ 36 - 0
src/main/java/com/hz/employmentsite/services/service/jobUserManager/RecommendMgtService.java

@@ -2,12 +2,48 @@ package com.hz.employmentsite.services.service.jobUserManager;
 
 import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.model.PcRecommendMgt;
+import com.hz.employmentsite.vo.jobUserManager.RecommendCompanyPostVo;
+import com.hz.employmentsite.vo.jobUserManager.RecommendJobVo;
 import com.hz.employmentsite.vo.jobUserManager.RecommendMgtVo;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.List;
 
 public interface RecommendMgtService {
     PageInfo<RecommendMgtVo> getList(Integer page, Integer rows, String name, String companyName, Integer recommendType, Integer entryState, String pushName, String professionId);
 
+    /**
+     * 修改入职状态
+     * @param id
+     * @param state 入职状态
+     */
+    int setEntryState(String id, Integer state);
+
     int addRecommend(List<PcRecommendMgt> list, String userId);
+
+    /**
+     * 获取推荐企业信息
+     * @param page
+     * @param rows
+     * @param jobHuntId 求职意向id
+     * @param professionId 岗位id
+     * @param companyName 企业名称
+     * @param type 0-未推荐;1-已推荐
+     * @return
+     * */
+    PageInfo<RecommendCompanyPostVo> getRecommendCompanyPostList(Integer page, Integer rows, String jobHuntId,
+                                                                 String professionId, String companyName, Integer type);
+
+
+    /**
+     * 获取推荐企业信息
+     * @param postId 企业岗位id
+     * @param professionId 岗位id
+     * @param userName 求职人员姓名
+     * @param type 0-未推荐;1-已推荐
+     * @return
+     * */
+    PageInfo<RecommendJobVo> getRecommendJobList(Integer page, Integer rows, String postId, String professionId, String userName,
+                                                 Integer type, Integer cultureLeve, Integer keyPersonType);
 }

+ 4 - 0
src/main/java/com/hz/employmentsite/vo/companyService/PostVo.java

@@ -87,4 +87,8 @@ public class PostVo {
     public Date endTime;
 
     public String isRecommendName; //是否推荐
+
+    public String professionID;
+
+    public String professionName;
 }

+ 2 - 1
src/main/java/com/hz/employmentsite/vo/jobUserManager/JobHuntVo.java

@@ -23,7 +23,8 @@ public class JobHuntVo {
 
     public String jobHuntTypeStr;
     public String jobUserTypeStr;
-    public String postName;
+    public String professionID;
+    public String professionName;
     public BigDecimal minSalary;
     public BigDecimal maxSalary;
     public String otherDemand;

+ 3 - 2
src/main/java/com/hz/employmentsite/vo/companyService/RecommendCompanyPostVo.java

@@ -1,7 +1,8 @@
-package com.hz.employmentsite.vo.companyService;
+package com.hz.employmentsite.vo.jobUserManager;
 
 public class RecommendCompanyPostVo {
-    public String postId;
+    public String recommendMgtID;
+    public String postID;
     public String companyName;
     public String professionName;
     public String recruitCount;

+ 12 - 0
src/main/java/com/hz/employmentsite/vo/jobUserManager/RecommendJobVo.java

@@ -0,0 +1,12 @@
+package com.hz.employmentsite.vo.jobUserManager;
+
+public class RecommendJobVo {
+    public String recommendMgtID;
+    public String jobhuntID;
+    public String userName;
+    public String userMobile;
+    public String siteName;
+    public String culturerankName;
+    public String keypersontypeName;
+    public String isRecommend;
+}

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

@@ -100,6 +100,8 @@
         <table schema="" tableName="pc_post"><property name="useActualColumnNames" value="true"/></table>
         <table schema="" tableName="pc_post"><property name="useActualColumnNames" value="true"/></table>
         <table schema="" tableName="pc_company"><property name="useActualColumnNames" value="true"/></table>
+        <table schema="" tableName="pc_recommend_mgt"><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>-->

+ 3 - 2
src/main/resources/mapping/cquery/JobHuntCQuery.xml

@@ -3,9 +3,10 @@
 <mapper namespace="com.hz.employmentsite.mapper.cquery.JobHuntCQuery">
     <select id="getJobHuntList" resultType="com.hz.employmentsite.vo.jobUserManager.JobHuntVo">
         select jobHunt.*,jobUser.name as JobUserName,dic_jobUserType.Name as jobUserTypeStr,dic_huntJobType.Name as jobHuntTypeStr,
-               post.PostName from pc_jobhunt jobHunt
+                pro.ProfessionName
+        from pc_jobhunt jobHunt
         left join pc_jobuser jobUser on jobHunt.JobUserID = jobUser.JobUserID
-        left join pc_post post on jobHunt.postID = post.postID
+        left join pc_profession pro on jobHunt.ProfessionID = pro.ProfessionID
         left join (select * from sys_dictionary_item where DictionaryCode ='JobUserType') dic_jobUserType on jobHunt.JobUserType = dic_jobUserType.value
         left join (select * from sys_dictionary_item where DictionaryCode ='JobHuntType') dic_huntJobType on jobHunt.JobHuntType = dic_huntJobType.value
         where 1=1

+ 5 - 25
src/main/resources/mapping/cquery/PostCQuery.xml

@@ -5,9 +5,12 @@
         select post.postID,post.workCode,post.workName,post.recruitCount,post.companyID,post.postName,post.recordStatus,post.workNature,post.validDay,
                post.workYear,post.cultureRank,post.postDesc,post.maxSalary,post.minSalary,post.welfare,post.postEmail,post.workTime,post.isTrail,post.trailMonths,
                post.TrailMaxSalary,post.trailMinSalary,post.createUserID,post.createTime,post.modifyUserID,post.modifyTime,post.validTime,post.startTime,post.endTime,
-               post.jobPlace,company.userName,company.userMobile,company.companyEmail,company.CompanyName,company.insuredCount,item.`Name` as cultureLevelName from pc_post post
+               post.jobPlace,company.userName,company.userMobile,company.companyEmail,company.CompanyName,company.insuredCount,item.`Name` as cultureLevelName,
+               post.ProfessionID,pro.ProfessionName
+        from pc_post post
         left join pc_company company on post.CompanyID = company.CompanyID
         left join sys_dictionary_item item on item.value=post.CultureRank and item.DictionaryCode='CultureLevel'
+        left join pc_profession pro on post.ProfessionID = pro.ProfessionID
         where 1=1
         <if test="postIDList != '' and postIDList != null">
             and post.postID in (${postIDList})
@@ -25,7 +28,7 @@
             and company.CompanyName like Concat('%',#{companyName},'%')
         </if>
         <if test="RecordStatus != null and RecordStatus != ''">
-            and post.RecordStatus = #{RecordStatus}
+            and pro.RecordStatus = #{RecordStatus}
         </if>
         <if test="WorkName != null and WorkName != ''">
             and post.WorkName like Concat('%', #{WorkName},'%')
@@ -44,27 +47,4 @@
         where jobhunt.JobUserID = #{jobUserID}
         order by post.CreateTime desc
     </select>
-    <select id="getRecommendCompanyPostList" resultType="com.hz.employmentsite.vo.companyService.RecommendCompanyPostVo">
-        select a.postid,b.companyname,c.professionname,a.recruitcount,a.starttime,a.endtime,
-        case when d.recommendmgtid is null then '未推荐' else '已推荐' end as isrecommend
-        from pc_post a
-        left join pc_company b on a.CompanyID = b.CompanyID
-        left join pc_profession c on a.ProfessionID = c.ProfessionID
-        left join pc_recommend_mgt d on a.PostID = d.PostID and #{jobHuntId} = d.JobHuntID
-        <where>
-            <if test="professionId!=null and professionId!=''">
-                and a.ProfessionID = #{professionId}
-            </if>
-            <if test="companyName!=null and companyName!=''">
-                and b.CompanyName like Concat('%',#{companyName},'%')
-            </if>
-            <if test="type!=null and type==0">
-                and d.RecommendMgtID is null
-            </if>
-            <if test="type!=null and type==1">
-                and d.RecommendMgtID is not null
-            </if>
-        </where>
-        order by a.CreateTime desc
-    </select>
 </mapper>

+ 60 - 5
src/main/resources/mapping/cquery/RecommendMgtCQuery.xml

@@ -26,19 +26,74 @@
             <if test="companyName != '' and companyName != null">
                 and c.CompanyName like Concat('%',#{companyName},'%')
             </if>
-            <if test="recommendType != null and recommendType != ''">
+            <if test="recommendType != null">
                 and a.RecommendType = #{recommendType}
             </if>
-            <if test="entryState != null and entryState != ''">
+            <if test="entryState != null">
                 and a.EntryState = #{entryState}
             </if>
             <if test="pushName != '' and pushName != null">
-                and c.pushname like Concat('%',#{pushName},'%')
+                and g.Name like Concat('%',#{pushName},'%')
             </if>
-            <if test="professionId != '' and professionId != null">
-                and b.ProfessionID = #{professionId}
+            <if test="professionID != '' and professionID != null">
+                and b.ProfessionID = #{professionID}
             </if>
         </where>
         order by a.createtime desc
     </select>
+    <select id="getRecommendCompanyPostList" resultType="com.hz.employmentsite.vo.jobUserManager.RecommendCompanyPostVo">
+        select a.postid,b.companyname,c.professionname,a.recruitcount,a.starttime,a.endtime,
+        case when d.recommendmgtid is null then '未推荐' else '已推荐' end as isRecommend,d.recommendMgtID
+        from pc_post a
+        left join pc_company b on a.CompanyID = b.CompanyID
+        left join pc_profession c on a.ProfessionID = c.ProfessionID
+        left join pc_recommend_mgt d on a.PostID = d.PostID and d.JobHuntID = #{jobHuntID}
+        <where>
+            <if test="professionID!=null and professionID!=''">
+                and a.ProfessionID = #{professionID}
+            </if>
+            <if test="companyName!=null and companyName!=''">
+                and b.CompanyName like Concat('%',#{companyName},'%')
+            </if>
+            <if test="type!=null and type==0">
+                and d.RecommendMgtID is null
+            </if>
+            <if test="type!=null and type==1">
+                and d.RecommendMgtID is not null
+            </if>
+        </where>
+        order by a.CreateTime desc
+    </select>
+    <select id="getRecommendJobList" resultType="com.hz.employmentsite.vo.jobUserManager.RecommendJobVo">
+        select a.jobhuntid,b.username,b.usermobile,e.sitename,dic1.`name` as culturerankname,dic2.`name` as keypersontypename,
+        case when d.recommendmgtid is null then '未推荐' else '已推荐' end as isrecommend,d.recommendMgtID
+        from pc_jobhunt a
+        left join pc_jobuser b on a.JobUserID = b.JobUserID
+        left join pc_profession c on a.ProfessionID = c.ProfessionID
+        left join pc_site e on b.SiteID = e.SiteID
+        left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='CultureLevel') dic1 on b.CultureRank = dic1.`Value`
+        left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='KeyPersonType') dic2 on b.KeyPersonTypeID = dic2.`Value`
+        left join pc_recommend_mgt d on a.JobHuntID = d.JobHuntID and d.PostID = #{postID}
+        <where>
+            <if test="professionID!=null and professionID!=''">
+                and a.ProfessionID = #{professionID}
+            </if>
+            <if test="userName!=null and userName!=''">
+                and b.UserName like Concat('%',#{userName},'%')
+            </if>
+            <if test="type!=null and type==0">
+                and d.RecommendMgtID is null
+            </if>
+            <if test="type!=null and type==1">
+                and d.RecommendMgtID is not null
+            </if>
+            <if test="keyPersonType!=null and keyPersonType!=''">
+                and b.KeyPersonTypeID = #{keyPersonType}
+            </if>
+            <if test="cultureLeve!=null and cultureLeve!=''">
+                and b.CultureRank = #{cultureLeve}
+            </if>
+        </where>
+        order by a.CreateTime desc
+    </select>
 </mapper>

File diff suppressed because it is too large
+ 977 - 65
vue/package-lock.json


+ 0 - 13
vue/src/api/companyService/post.ts

@@ -14,19 +14,6 @@ export function getList(params: any) {
   );
 }
 
-export function getRecommendCompanyPostList(params: any) {
-  return request<object>(
-    {
-      url: "companyService/post/getRecommendCompanyPostList",
-      method: 'get',
-      params: params,
-    },
-    {
-      isNew: true,
-    },
-  );
-}
-
 export function getPostByID(id: string) {
   return request<object>({
     url: 'companyService/post/getPostByID',

+ 41 - 0
vue/src/api/jobUserManager/recommendMgt/index.ts

@@ -11,6 +11,21 @@ export function getList(query: any) {
   );
 }
 
+export function setEntryState(data: any) {
+  return request(
+    {
+      url: 'jobusermgr/recommendmgt/setEntryState',
+      method: 'post',
+      data: data,
+    },
+    {
+      isNew: true,
+      successMsg: '提交成功!',
+      errorMsg: '提交失败!'
+    },
+  );
+}
+
 export function addRecommend(data: any) {
   return request(
     {
@@ -25,3 +40,29 @@ export function addRecommend(data: any) {
     },
   );
 }
+
+export function getRecommendCompanyPostList(params: any) {
+  return request<object>(
+    {
+      url: "jobusermgr/recommendmgt/getRecommendCompanyPostList",
+      method: 'get',
+      params: params,
+    },
+    {
+      isNew: true,
+    },
+  );
+}
+
+export function getRecommendJobList(params: any) {
+  return request<object>(
+    {
+      url: "jobusermgr/recommendmgt/getRecommendJobList",
+      method: 'get',
+      params: params,
+    },
+    {
+      isNew: true,
+    },
+  );
+}

+ 2 - 1
vue/src/router/asyncModules/companyService.ts

@@ -4,5 +4,6 @@ export default {
   'companyService/enterprise/edit': () => import('@/views/companyService/company/edit.vue'),
   'companyService/post/index': () => import('@/views/companyService/post/index.vue'),
   'companyService/post/add': () => import('@/views/companyService/post/edit.vue'),
-  'companyService/post/edit': () => import('@/views/companyService/post/edit.vue')
+  'companyService/post/edit': () => import('@/views/companyService/post/edit.vue'),
+  'companyService/post/recommend': () => import('@/views/companyService/post/recommend.vue')
 };

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

@@ -97,6 +97,7 @@
             <div class="table-operation">
               <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>
+              <a-button type="link" size="small" functioncode="T01030207" @click="onRecommendJob(record)" >推荐求职人员</a-button>
             </div>
           </template>
         </template>
@@ -176,7 +177,7 @@ export default defineComponent({
         key: 'institutionID',
         customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`
       },
-      {title: '岗位名称', dataIndex: 'postName', key: 'postName', align: "center"},
+      {title: '岗位名称', dataIndex: 'professionName', key: 'professionName', align: "center"},
       {title: '招聘人数', dataIndex: 'recruitCount', key: 'recruitCount', width: 120, align: "center"},
       {
         title: '开始日期', dataIndex: 'startTime', key: 'startTime', align: "center", customRender: (item) => {
@@ -203,7 +204,7 @@ export default defineComponent({
       },
       {title: '联系人', dataIndex: 'userName', key: 'userName', align: "center"},
       {title: '联系电话', dataIndex: 'userMobile', key: 'userMobile', align: "center"},
-      {title: '操作', key: 'operation', fixed: 'right', width: 100, align: "center"},
+      {title: '操作', key: 'operation', fixed: 'right', width: 200, align: "center"},
     ];
     const pagination = computed(() => ({
       total: formState.total,
@@ -233,6 +234,10 @@ export default defineComponent({
       tabsViewStore.addTabByPath('/companyService/post/edit', {id: item.postID});
     };
 
+    const onRecommendJob = (item) =>{
+      tabsViewStore.addTabByPath('/companyService/post/recommend', {professionID:item.professionID,professionName:item.professionName,postID:item.postID,companyName:item.companyName});
+    }
+
     const handleTableChange: TableProps['onChange'] = (pag: { pageSize: number; current: number },) => {
       searchParams.pageIndex = pag.current;
       searchParams.pageSize = pag.pageSize;
@@ -291,7 +296,6 @@ export default defineComponent({
       })
     };
 
-
     return {
       formRef,
       searchParams,
@@ -309,6 +313,7 @@ export default defineComponent({
       loadData,
       onAdd,
       onEdit,
+      onRecommendJob,
       expand,
       postStatusList,
       companyList

+ 259 - 0
vue/src/views/companyService/post/recommend.vue

@@ -0,0 +1,259 @@
+<template>
+  <div class="card-search">
+    <a-form
+      ref="formRef"
+      name="advanced_search"
+      class="ant-advanced-search-form"
+      :model="searchParams"
+    >
+      <a-row :gutter="24">
+        <a-col :span="6">
+          <a-form-item label="招聘企业" :label-col="{ span: 8 }" name="companyName">
+            <a-input v-model:value="searchParams.companyName" style="color: black;" disabled="true" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="6">
+          <a-form-item label="招聘岗位" :label-col="{ span: 8 }" name="professionName">
+            <a-input v-model:value="searchParams.professionName" style="color: black;" disabled="true" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+        </a-col>
+        <a-col :span="4" style="text-align: left">
+          <a-button type="primary" html-type="submit" @click="onSearch">查询</a-button>
+          <a-button
+            style="margin: 0 8px"
+            @click="
+              () => {
+                searchParams.pageIndex = 1;
+                searchParams.pageSize = 20;
+                searchParams.companyName = null;
+                loadData();
+              }
+            ">重置
+          </a-button>
+          <a style="font-size: 12px" @click="expand = !expand">
+            <template v-if="expand">
+              <UpOutlined/>
+            </template>
+            <template v-else>
+              <DownOutlined/>
+            </template>
+            {{ expand ? '收缩' : '展开' }}
+          </a>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24" v-show="expand">
+        <a-col :span="6">
+          <a-form-item label="招聘人员姓名" :label-col="{ span: 8 }" name="userName">
+            <a-input v-model:value="searchParams.userName" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="6">
+          <a-form-item label="学历选择" :label-col="{span:6}" name="cultureLevel">
+            <a-select
+              ref="select"
+              v-model:value="searchParams.cultureLevel"
+              :options="cultureLevelList"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
+              @change="loadData"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="6">
+          <a-form-item label="重点人员类别" :label-col="{span:6}" name="cultureLevel">
+            <a-select
+              ref="select"
+              v-model:value="searchParams.keyPersonType"
+              :options="keyPersonTypeList"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
+              @change="loadData"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row class="edit-operation">
+        <a-col :span="24" style="text-align: right">
+          <a-button type="primary" html-type="submit" functioncode="T01030202" @click='onBatchRecommend()'>批量推荐
+          </a-button>
+        </a-col>
+      </a-row>
+    </a-form>
+    <div class="search-result-list">
+      <a-table :columns="columns" :data-source="dataList" :scroll="{ x: '100%', y: 500 }" :pagination="pagination"
+               :loading="formState.loading"
+               :row-selection="{ selectedRowKeys: formState.selectedRowKeys, onChange: onSelectChange }"
+               :row-key="(record) => record.recommendMgtID" bordered @change="handleTableChange">
+        <template #bodyCell="{ column, text, record }">
+          <template v-if="column.key === 'operation'">
+            <div class="table-operation">
+              <a-button type="link" size="small" @click='onRecommend(record)'>推荐
+              </a-button>
+            </div>
+          </template>
+        </template>
+      </a-table>
+    </div>
+  </div>
+</template>
+
+<script lang="ts">
+import {reactive, ref, computed, defineComponent} from 'vue';
+import type {FormInstance, TableColumnsType, TableProps} from 'ant-design-vue';
+import {getRecommendJobList, addRecommend} from '@/api/jobUserManager/recommendMgt';
+import {getPaginationTotalTitle} from '@/utils/common';
+import type {SelectProps} from "ant-design-vue";
+import {getSysDictionaryList} from "@/api/system/dictionary";
+import {message} from "ant-design-vue";
+
+export default defineComponent({
+  name: 'RecommendJobList',
+  setup() {
+    const formRef = ref<FormInstance>();
+    const expand = ref(true);
+    const searchParams = reactive({
+      pageIndex: 1,
+      pageSize: 20,
+      postID: null,
+      userName: '',
+      companyName: '',
+      professionID: '',
+      professionName: null,
+      cultureLeve: null,
+      keyPersonType: null,
+      type: 0
+    });
+    const formState = reactive({
+      total: 0,
+      selectedRowKeys: [],
+      loading: false,
+    });
+    const cultureLevelList = ref<SelectProps['options']>();
+    const keyPersonTypeList = ref<SelectProps['options']>();
+
+    const columns: TableColumnsType = [
+      {
+        title: '序号',
+        align: 'center',
+        width: 80,
+        key: 'recommendMgtID',
+        customRender: (item) =>
+          `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`,
+      },
+      {title: '求职人员姓名', dataIndex: 'userName', key: 'userName', width: 100, align: "center",},
+      {title: '联系电话', dataIndex: 'userMobile', key: 'userMobile', width: 150, align: "center",},
+      {title: '所属驿站', dataIndex: 'siteName', key: 'siteName', width: 150, align: "center",},
+      {title: '文化程度', dataIndex: 'culturerankName', key: 'culturerankName', width: 150, align: "center",},
+      {title: '重点人员类别', dataIndex: 'keypersontypeName', key: 'keypersontypeName', width: 150, align: "center",},
+      {title: '操作', key: 'operation', width: 100, align: 'center'},
+    ];
+    const pagination = computed(() => ({
+      total: formState.total,
+      current: searchParams.pageIndex,
+      pageSize: searchParams.pageSize,
+      showSizeChanger: true,
+      showTotal: (total) => getPaginationTotalTitle(total),
+    }));
+    const dataList = ref([]);
+    const addRecommendList = ref([] as any);
+
+    const onSelectChange = (selectedRowKeys: any) => {
+      console.log(selectedRowKeys)
+      formState.selectedRowKeys = selectedRowKeys;
+    };
+
+    const handleTableChange: TableProps['onChange'] = (pag: {
+      pageSize: number;
+      current: number;
+    }) => {
+      searchParams.pageIndex = pag.current;
+      searchParams.pageSize = pag.pageSize;
+      loadData();
+    };
+
+    const onSearch = () => {
+      loadData();
+    }
+
+    const loadData = async function () {
+      formState.loading = true;
+      const result: any = await getRecommendJobList(searchParams);
+      dataList.value = result.list;
+      formState.total = result.total;
+      formState.loading = false;
+      console.log("huntParams", searchParams);
+    };
+
+    const onRecommend = (item: any) => {
+      addRecommendList.value.push({recommendMgtID: item.recommendMgtID,jobHuntID: item.jobhuntID, postID: searchParams.postID, recommendType: searchParams.type});
+      addRecommend(addRecommendList.value).then(()=>{
+        loadData();
+        addRecommendList.length = 0;
+      });
+    };
+
+    const onBatchRecommend = () => {
+      if(formState.selectedRowKeys.length == 0){
+        message.warn("请选择需要推荐的求职人员!")
+        return;
+      }
+      formState.selectedRowKeys.forEach(id => {
+        const item: any = dataList.value.find((x: any)=>x.recommendMgtID==id)
+        if(item){
+          addRecommendList.value.push({recommendMgtID: item.recommendMgtID,jobHuntID: item.jobhuntID, postID: searchParams.postID, recommendType: searchParams.type});
+        }
+      })
+      addRecommend(addRecommendList.value).then(()=>{
+        loadData();
+        addRecommendList.length = 0;
+      });
+    };
+
+    const getCultureLevelList = () => {
+      getSysDictionaryList('CultureLevel').then((data) => {
+        cultureLevelList.value = data;
+      });
+    };
+
+    const getKeyPersonTypeList = () => {
+      getSysDictionaryList('KeyPersonType').then((data) => {
+        keyPersonTypeList.value = data;
+      });
+    };
+
+    return {
+      formRef,
+      expand,
+      searchParams,
+      formState,
+      columns,
+      pagination,
+      dataList,
+      cultureLevelList,
+      addRecommendList,
+      keyPersonTypeList,
+      onSearch,
+      onRecommend,
+      onBatchRecommend,
+      onSelectChange,
+      handleTableChange,
+      loadData,
+      getCultureLevelList,
+      getKeyPersonTypeList
+    };
+  },
+  created() {
+    this.searchParams.postID = history.state.params?.postID;
+    this.searchParams.companyName = history.state.params?.companyName;
+    this.searchParams.professionID = history.state.params?.professionID;
+    this.searchParams.professionName = history.state.params?.professionName;
+    this.loadData();
+  }
+});
+</script>
+
+<style lang="less" scoped></style>

+ 9 - 3
vue/src/views/jobUserManager/jobhunt/index.vue

@@ -119,6 +119,7 @@
             <div class="table-operation">
               <a-button type="link" size="small" functioncode="T01030203" @click='onEdit(record.jobHuntID)' >编辑</a-button>
               <a-button type="link" size="small" functioncode="T01030204" @click="onDel(record)" >删除</a-button>
+              <a-button type="link" size="small" functioncode="T01030207" @click="onRecommendCompanyPost(record)" >推荐企业</a-button>
             </div>
           </template>
         </template>
@@ -182,7 +183,7 @@ import {useTabsViewStore} from "@/store/modules/tabsView";
           customRender: ({ record }) => record.inDate == null?"":dayjs(record.inDate).format('YYYY-MM-DD'), },
         { title: '工作年限', dataIndex: 'workYear', key: 'workYear' , align: "center",},
         { title: '求职类型', dataIndex: 'jobHuntTypeStr', key: 'jobHuntTypeStr', align: "center", },
-        { title: '求职岗位', dataIndex: 'postName', key: 'postName', align: "center", },
+        { title: '求职岗位', dataIndex: 'professionName', key: 'professionName', align: "center", },
         { title: '人才类型', dataIndex: 'jobUserTypeStr', key: 'jobUserTypeStr' , align: "center",},
         { title: '月薪要求', dataIndex: 'salary', key: 'salary' , align: "center",
           customRender: (item) => {
@@ -190,7 +191,7 @@ import {useTabsViewStore} from "@/store/modules/tabsView";
           return salary;
           }
         },
-        { title: '操作', key: 'operation', width: 100, align: 'center' },
+        { title: '操作', key: 'operation', fixed: 'right', width: 170, align: "center"},
       ];
       const pagination = computed(() => ({
         total: formState.total,
@@ -209,7 +210,7 @@ import {useTabsViewStore} from "@/store/modules/tabsView";
           {cnName: '人才类型', enName: 'jobUserType', width: 100},
           {cnName: '最低月薪(元)', enName: 'minSalary', width: 100},
           {cnName: '最高月薪(元)', enName: 'maxSalary', width: 100},
-          {cnName: '求职岗位', enName: 'postName', width: 100},
+          {cnName: '求职岗位', enName: 'professionName', width: 100},
           {cnName: '希望工作地区', enName: 'areaWork', width: 100},
           {cnName: '可到职日期', enName: 'inDate', width: 100},
           {cnName: '工作年限', enName: 'workYear', width: 100},
@@ -306,6 +307,10 @@ import {useTabsViewStore} from "@/store/modules/tabsView";
         tabsViewStore.addTabByPath('/jobusermgr/jobhunt/edit', {id:id});
       };
 
+      const onRecommendCompanyPost = (item) =>{
+        tabsViewStore.addTabByPath('/jobusermgr/jobhunt/recommend', {professionID:item.professionID,professionName:item.professionName,jobHuntID:item.jobHuntID,jobUserName:item.jobUserName});
+      }
+
       const getJobHuntTypeList = () => {
         getSysDictionaryList('JobHuntType').then((data) => {
           jobHuntTypeList.value = data;
@@ -342,6 +347,7 @@ import {useTabsViewStore} from "@/store/modules/tabsView";
         onAdd,
         onEdit,
         onDel,
+        onRecommendCompanyPost,
         onSelectChange,
         handleTableChange,
         getJobHuntTypeList,

+ 67 - 48
vue/src/views/jobUserManager/jobhunt/recommend.vue

@@ -4,20 +4,23 @@
       ref="formRef"
       name="advanced_search"
       class="ant-advanced-search-form"
-      :model="searchParamsState"
+      :model="searchParams"
     >
       <a-row :gutter="24">
         <a-col :span="6">
           <a-form-item label="求职者" :label-col="{ span: 8 }" name="name">
-            <a-input v-model:value="searchParamsState.name" disabled="true" placeholder="" />
+            <a-input v-model:value="searchParams.jobUserName" style="color: black;" disabled="true" placeholder="" />
           </a-form-item>
         </a-col>
         <a-col :span="6">
-          <a-form-item label="企业名称" :label-col="{ span: 8 }" name="companyName">
-            <a-input v-model:value="searchParamsState.companyName" placeholder="" />
+          <a-form-item label="求职岗位" :label-col="{ span: 8 }" name="professionName">
+            <a-input v-model:value="searchParams.professionName" style="color: black;" disabled="true" placeholder="" />
           </a-form-item>
         </a-col>
-        <a-col :span="8">
+        <a-col :span="6">
+          <a-form-item label="企业名称" :label-col="{ span: 8 }" name="companyName">
+            <a-input v-model:value="searchParams.companyName" placeholder="" />
+          </a-form-item>
         </a-col>
         <a-col :span="4" style="text-align: left">
           <a-button type="primary" html-type="submit" @click="onSearch">查询</a-button>
@@ -25,21 +28,21 @@
             style="margin: 0 8px"
             @click="
               () => {
-                searchParamsState.pageIndex = 1;
-                searchParamsState.pageSize = 20;
-                searchParamsState.companyName = null;
+                searchParams.pageIndex = 1;
+                searchParams.pageSize = 20;
+                searchParams.companyName = null;
                 loadData();
               }
             ">重置</a-button>
-          <a style="font-size: 12px" @click="expand = !expand">
-            <template v-if="expand">
-              <UpOutlined />
-            </template>
-            <template v-else>
-              <DownOutlined />
-            </template>
-            {{ expand ? '收缩' : '展开' }}
-          </a>
+<!--          <a style="font-size: 12px" @click="expand = !expand">-->
+<!--            <template v-if="expand">-->
+<!--              <UpOutlined />-->
+<!--            </template>-->
+<!--            <template v-else>-->
+<!--              <DownOutlined />-->
+<!--            </template>-->
+<!--            {{ expand ? '收缩' : '展开' }}-->
+<!--          </a>-->
         </a-col>
       </a-row>
       <a-row class="edit-operation">
@@ -51,11 +54,11 @@
     <div class="search-result-list">
       <a-table :columns="columns" :data-source="dataList" :scroll="{ x: '100%', y: 500 }"  :pagination="pagination"
                :loading="formState.loading" :row-selection="{ selectedRowKeys: formState.selectedRowKeys, onChange: onSelectChange }"
-               :row-key="(record) => record.postId" bordered @change="handleTableChange" >
+               :row-key="(record) => record.postID" bordered @change="handleTableChange" >
         <template #bodyCell="{ column, text, record }">
           <template v-if="column.key === 'operation'">
             <div class="table-operation">
-              <a-button type="link" size="small" functioncode="T01030203" @click='onBatchRecommend(record)' >推荐</a-button>
+              <a-button type="link" size="small" @click='onRecommend(record)' >推荐</a-button>
             </div>
           </template>
         </template>
@@ -67,24 +70,25 @@
 <script lang="ts">
 import {reactive, ref, computed, defineComponent} from 'vue';
 import type { FormInstance, TableColumnsType, TableProps } from 'ant-design-vue';
-import { getRecommendCompanyPostList } from '@/api/companyService/post';
-import { addRecommend } from '@/api/jobUserManager/recommendMgt';
+import {getRecommendCompanyPostList, addRecommend} from '@/api/jobUserManager/recommendMgt';
 import { getPaginationTotalTitle } from '@/utils/common';
 import dayjs from 'dayjs';
+import {message} from "ant-design-vue";
 
 export default defineComponent({
   name: 'RecommendCompanyPostList',
   setup() {
     const formRef = ref<FormInstance>();
     const expand = ref(false);
-    const searchParamsState = reactive({
+    const searchParams = reactive({
       pageIndex: 1,
       pageSize: 20,
-      name: null,
-      jobHuntId: '',
-      professionId:'',
+      jobUserName: null,
+      jobHuntID: '',
+      professionID:'',
       companyName: null,
-      recommendType: 0
+      professionName: null,
+      type: 0
     });
     const formState = reactive({
       total: 0,
@@ -96,28 +100,28 @@ export default defineComponent({
         title: '序号',
         align: 'center',
         width: 80,
-        key: 'postId',
+        key: 'postID',
         customRender: (item) =>
-          `${searchParamsState.pageSize * (searchParamsState.pageIndex - 1) + item.index + 1}`,
+          `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`,
       },
       { title: '企业名称', dataIndex: 'companyName', key: 'companyName', width: 100,align: "center", },
       { title: '岗位名称', dataIndex: 'professionName', key: 'professionName', width: 150, align: "center", },
       { title: '招聘人数', dataIndex: 'recruitCount', key: 'recruitCount', width: 150, align: "center", },
       { title: '工作开始时间', dataIndex: 'startTime', key: 'startTime', width: 100, align: "center",
-        customRender: ({ record }) => record.inDate == null?"":dayjs(record.inDate).format('YYYY-MM-DD'), },
+        customRender: ({ record }) => record.startTime == null?"":dayjs(record.startTime).format('YYYY-MM-DD'), },
       { title: '工作结束时间', dataIndex: 'endTime', key: 'endTime', width: 100, align: "center",
-        customRender: ({ record }) => record.inDate == null?"":dayjs(record.inDate).format('YYYY-MM-DD'), },
+        customRender: ({ record }) => record.endTime == null?"":dayjs(record.endTime).format('YYYY-MM-DD'), },
       { title: '操作', key: 'operation', width: 100, align: 'center' },
     ];
     const pagination = computed(() => ({
       total: formState.total,
-      current: searchParamsState.pageIndex,
-      pageSize: searchParamsState.pageSize,
+      current: searchParams.pageIndex,
+      pageSize: searchParams.pageSize,
       showSizeChanger: true,
       showTotal: (total) => getPaginationTotalTitle(total),
     }));
     const dataList = ref([]);
-    const addRecommendList = ref([]);
+    const addRecommendList = ref([] as any);
 
     const onSelectChange = (selectedRowKeys: any) => {
       formState.selectedRowKeys = selectedRowKeys;
@@ -127,8 +131,8 @@ export default defineComponent({
       pageSize: number;
       current: number;
     }) => {
-      searchParamsState.pageIndex = pag.current;
-      searchParamsState.pageSize = pag.pageSize;
+      searchParams.pageIndex = pag.current;
+      searchParams.pageSize = pag.pageSize;
       loadData();
     };
 
@@ -138,46 +142,61 @@ export default defineComponent({
 
     const loadData = async function () {
       formState.loading = true;
-      const result: any = await getRecommendCompanyPostList(searchParamsState);
+      const result: any = await getRecommendCompanyPostList(searchParams);
       dataList.value = result.list;
       formState.total = result.total;
       formState.loading = false;
-      console.log("huntParams",searchParamsState);
+      console.log("huntParams",searchParams);
     };
 
     const onRecommend =(item: any)=>{
-      console.log(item)
+      addRecommendList.value.push({recommendMgtID: item.recommendMgtID,postID: item.postID, jobHuntID : searchParams.jobHuntID, recommendType: searchParams.type});
+      addRecommend(addRecommendList.value).then(()=>{
+        loadData();
+        addRecommendList.length = 0;
+      });
     };
 
     const onBatchRecommend = () => {
-      // formState.selectedRowKeys.forEach(id=>{
-      //   addRecommendList.value.push({postId: id, jobHuntId: searchParamsState.jobHuntId, recommendType: searchParamsState.recommendType});
-      // })
-      addRecommend(addRecommendList);
+      if(formState.selectedRowKeys.length == 0){
+        message.warn("请选择需要推荐的企业!")
+        return;
+      }
+      formState.selectedRowKeys.forEach(id=>{
+        const item: any = dataList.value.find((x: any)=>x.recommendMgtID==id)
+        if(item){
+          addRecommendList.value.push({recommendMgtID: item.recommendMgtID,postID: item.postID, jobHuntID : searchParams.jobHuntID, recommendType: searchParams.type});
+        }
+      })
+      addRecommend(addRecommendList.value).then(()=>{
+        loadData();
+        addRecommendList.length = 0;
+      });
     };
 
     return {
       formRef,
       expand,
-      searchParamsState,
+      searchParams,
       formState,
       columns,
       pagination,
       dataList,
-      loadData,
       onSearch,
       onRecommend,
       onBatchRecommend,
       onSelectChange,
       handleTableChange,
+      loadData
     };
   },
   created() {
+    this.searchParams.jobHuntID =  history.state.params?.jobHuntID;
+    this.searchParams.jobUserName =  history.state.params?.jobUserName;
+    this.searchParams.professionID =  history.state.params?.professionID;
+    this.searchParams.professionName =  history.state.params?.professionName;
     this.loadData();
-  },
-  activated() {
-    if (history.state.params?.reload) this.loadData();
-  },
+  }
 });
 </script>
 

+ 148 - 118
vue/src/views/jobUserManager/recommendMgt/index.vue

@@ -9,12 +9,12 @@
       <a-row :gutter="24">
         <a-col :span="6">
           <a-form-item label="求职人姓名" :label-col="{ span: 8 }" name="name">
-            <a-input v-model:value="searchParamsState.name" placeholder="" />
+            <a-input v-model:value="searchParamsState.name" placeholder=""/>
           </a-form-item>
         </a-col>
         <a-col :span="6">
           <a-form-item label="企业名称" :label-col="{ span: 8 }" name="companyName">
-            <a-input v-model:value="searchParamsState.companyName" placeholder="" />
+            <a-input v-model:value="searchParamsState.companyName" placeholder=""/>
           </a-form-item>
         </a-col>
         <a-col :span="6">
@@ -40,14 +40,14 @@
                 loadData();
               }
             "
-            >重置
+          >重置
           </a-button>
           <a style="font-size: 12px" @click="expand = !expand">
             <template v-if="expand">
-              <UpOutlined />
+              <UpOutlined/>
             </template>
             <template v-else>
-              <DownOutlined />
+              <DownOutlined/>
             </template>
             {{ expand ? '收缩' : '展开' }}
           </a>
@@ -69,12 +69,12 @@
         </a-col>
         <a-col :span="6">
           <a-form-item label="推送人" :label-col="{ span: 8 }" name="pushName">
-            <a-input v-model:value="searchParamsState.pushName" placeholder="" />
+            <a-input v-model:value="searchParamsState.pushName" placeholder=""/>
           </a-form-item>
         </a-col>
         <a-col :span="6">
           <a-form-item label="岗位" :label-col="{ span: 8 }" name="professionId">
-            <a-input v-model:value="searchParamsState.professionId" placeholder="" />
+            <a-input v-model:value="searchParamsState.professionId" placeholder=""/>
           </a-form-item>
         </a-col>
       </a-row>
@@ -94,133 +94,163 @@
         bordered
         @change="handleTableChange"
       >
+        <template #bodyCell="{ column, text, record }">
+          <template v-if="column.key === 'operation'">
+            <div class="table-operation">
+              <a-button type="link" size="small" v-show="record.entryState!=1" functioncode="T01030203"
+                        @click='onSetEntryState(record.recommendMgtID, 1)'>已入职
+              </a-button>
+              <a-button type="link" size="small" v-show="record.entryState==1" functioncode="T01030203"
+                        @click='onSetEntryState(record.recommendMgtID, 0)'>已离职
+              </a-button>
+            </div>
+          </template>
+        </template>
       </a-table>
     </div>
   </div>
 </template>
 
 <script lang="ts">
-  import { reactive, ref, computed, defineComponent } from 'vue';
-  import type { FormInstance, TableColumnsType, TableProps, SelectProps } from 'ant-design-vue';
-  import { getList } from '@/api/jobUserManager/recommendMgt';
-  import { getSysDictionaryList } from '@/api/system/dictionary';
-  import { getPaginationTotalTitle } from '@/utils/common';
-  import dayjs from "dayjs";
+import {reactive, ref, computed, defineComponent} from 'vue';
+import type {FormInstance, TableColumnsType, TableProps, SelectProps} from 'ant-design-vue';
+import {getList, setEntryState} from '@/api/jobUserManager/recommendMgt';
+import {getSysDictionaryList} from '@/api/system/dictionary';
+import {getPaginationTotalTitle} from '@/utils/common';
+import dayjs from "dayjs";
 
-  export default defineComponent({
-    name: 'recommendMgtList',
-    setup() {
-      const expand = ref(false);
-      const modalRoleUserRef = ref();
-      const modalRoleEditRef = ref();
-      const formRef = ref<FormInstance>();
-      const searchParamsState = reactive({ page: 1, limit: 20, post: '', name: '',  companyName: '', recommendType:null, entryState:null, pushName:'', professionId : null });
-      const formState = reactive({
-        total: 0,
-        selectedRowKeys: [],
-        loading: false,
-      });
-      const columns: TableColumnsType = [
-        {
-          title: '序号',
-          align: 'center',
-          width: 80,
-          key: 'recommendMgtID',
-          customRender: (item) =>
-            `${searchParamsState.limit * (searchParamsState.page - 1) + item.index + 1}`,
-        },
-        { title: '企业', dataIndex: 'companyName', key: 'companyName', width: 150 },
-        { title: '企业电话', dataIndex: 'companyMobile', key: 'companyMobile', width: 150 },
-        { title: '求职者', dataIndex: 'name', key: 'name', width: 100 },
-        { title: '求职者电话', dataIndex: 'userMobile', key: 'userMobile', width: 150 },
-        { title: '岗位', dataIndex: 'professionName', key: 'professionName', width: 150 },
-        { title: '类型', dataIndex: 'recommendTypeName', key: 'recommendTypeName', width: 100 },
-        { title: '入职状态', dataIndex: 'entryStateName', key: 'entryStateName' },
-        { title: '推送人', dataIndex: 'pushName', key: 'pushName' },
-        { title: '推送时间', dataIndex: 'createTime', key: 'createTime',
-          customRender: ({ record }) => dayjs(record.endDate).format('YYYY-MM-DD'),
-        },
-        { title: '操作', key: 'operation', width: 100, align: 'center' },
-      ];
-      const pagination = computed(() => ({
-        total: formState.total,
-        current: searchParamsState.page,
-        pageSize: searchParamsState.limit,
-        showSizeChanger: true,
-        showTotal: (total) => getPaginationTotalTitle(total),
-      }));
+export default defineComponent({
+  name: 'recommendMgtList',
+  setup() {
+    const expand = ref(false);
+    const modalRoleUserRef = ref();
+    const modalRoleEditRef = ref();
+    const formRef = ref<FormInstance>();
+    const searchParamsState = reactive({
+      page: 1,
+      limit: 20,
+      post: '',
+      name: '',
+      companyName: '',
+      recommendType: null,
+      entryState: null,
+      pushName: '',
+      professionId: null
+    });
+    const formState = reactive({
+      total: 0,
+      selectedRowKeys: [],
+      loading: false,
+    });
+    const columns: TableColumnsType = [
+      {
+        title: '序号',
+        align: 'center',
+        width: 80,
+        key: 'recommendMgtID',
+        customRender: (item) =>
+          `${searchParamsState.limit * (searchParamsState.page - 1) + item.index + 1}`,
+      },
+      {title: '企业', dataIndex: 'companyName', key: 'companyName', width: 150},
+      {title: '企业电话', dataIndex: 'companyMobile', key: 'companyMobile', width: 150},
+      {title: '求职者', dataIndex: 'name', key: 'name', width: 100},
+      {title: '求职者电话', dataIndex: 'userMobile', key: 'userMobile', width: 150},
+      {title: '岗位', dataIndex: 'professionName', key: 'professionName', width: 150},
+      {title: '类型', dataIndex: 'recommendTypeName', key: 'recommendTypeName', width: 100},
+      {title: '入职状态', dataIndex: 'entryStateName', key: 'entryStateName'},
+      {title: '推送人', dataIndex: 'pushName', key: 'pushName'},
+      {
+        title: '推送时间', dataIndex: 'createTime', key: 'createTime',
+        customRender: ({record}) => dayjs(record.endDate).format('YYYY-MM-DD'),
+      },
+      {title: '操作', key: 'operation', width: 100, align: 'center'},
+    ];
+    const pagination = computed(() => ({
+      total: formState.total,
+      current: searchParamsState.page,
+      pageSize: searchParamsState.limit,
+      showSizeChanger: true,
+      showTotal: (total) => getPaginationTotalTitle(total),
+    }));
 
-      const dataList = ref([]);
-      const recommendTypeList = ref<SelectProps['options']>();
-      const entryStateList = ref<SelectProps['options']>();
+    const dataList = ref([]);
+    const recommendTypeList = ref<SelectProps['options']>();
+    const entryStateList = ref<SelectProps['options']>();
 
-      const onSelectChange = (selectedRowKeys: any) => {
-        formState.selectedRowKeys = selectedRowKeys;
-      };
+    const onSelectChange = (selectedRowKeys: any) => {
+      formState.selectedRowKeys = selectedRowKeys;
+    };
 
-      const handleTableChange: TableProps['onChange'] = (pag: {
-        pageSize: number;
-        current: number;
-      }) => {
-        searchParamsState.page = pag.current;
-        searchParamsState.limit = pag.pageSize;
-        loadData();
-      };
+    const handleTableChange: TableProps['onChange'] = (pag: {
+      pageSize: number;
+      current: number;
+    }) => {
+      searchParamsState.page = pag.current;
+      searchParamsState.limit = pag.pageSize;
+      loadData();
+    };
 
-      const onFinish = () => {
-        loadData();
-      };
+    const onFinish = () => {
+      loadData();
+    };
+
+    const loadData = async function () {
+      formState.loading = true;
+      const result: any = await getList(searchParamsState);
 
-      const loadData = async function () {
-        formState.loading = true;
-        const result: any = await getList(searchParamsState);
+      dataList.value = result.list;
+      formState.total = result.total;
+      formState.loading = false;
+    };
 
-        dataList.value = result.list;
-        formState.total = result.total;
-        formState.loading = false;
-      };
+    const onSetEntryState = async (recommendMgtID, entryState) => {
+      setEntryState({recommendMgtID: recommendMgtID, entryState: entryState}).then(()=>{
+        loadData();
+      });
+    }
 
-      const getRecommendTypeList = () => {
-        getSysDictionaryList('RecommendType').then((data) => {
-          recommendTypeList.value = data;
-        });
-      };
+    const getRecommendTypeList = () => {
+      getSysDictionaryList('RecommendType').then((data) => {
+        recommendTypeList.value = data;
+      });
+    };
 
-      const getEntryStateList = () => {
-        getSysDictionaryList('EntryState').then((data) => {
-          entryStateList.value = data;
-        });
-      };
+    const getEntryStateList = () => {
+      getSysDictionaryList('EntryState').then((data) => {
+        entryStateList.value = data;
+      });
+    };
 
-      return {
-        modalRoleUserRef,
-        modalRoleEditRef,
-        formRef,
-        loadData,
-        searchParamsState,
-        formState,
-        columns,
-        pagination,
-        dataList,
-        recommendTypeList,
-        entryStateList,
-        onSelectChange,
-        handleTableChange,
-        onFinish,
-        getRecommendTypeList,
-        getEntryStateList,
-        expand
-      };
-    },
-    created() {
-      this.loadData();
-      this.getRecommendTypeList();
-      this.getEntryStateList();
-    },
-    activated() {
-      if (history.state.params?.reload) this.loadData();
-    },
-  });
+    return {
+      modalRoleUserRef,
+      modalRoleEditRef,
+      formRef,
+      loadData,
+      searchParamsState,
+      formState,
+      columns,
+      pagination,
+      dataList,
+      recommendTypeList,
+      entryStateList,
+      onSetEntryState,
+      onSelectChange,
+      handleTableChange,
+      onFinish,
+      getRecommendTypeList,
+      getEntryStateList,
+      expand
+    };
+  },
+  created() {
+    this.loadData();
+    this.getRecommendTypeList();
+    this.getEntryStateList();
+  },
+  activated() {
+    if (history.state.params?.reload) this.loadData();
+  },
+});
 </script>
 
 <style lang="less" scoped></style>