Browse Source

web-岗位推荐求职人员、意向推荐岗位查询功能调整

liao-sea 9 months ago
parent
commit
282b53b2c7

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

@@ -63,11 +63,11 @@ public class RecommendMgtController {
     @GetMapping("/getRecommendCompanyPostList")
     @GetMapping("/getRecommendCompanyPostList")
     public BaseResponse getRecommendCompanyPostList(@RequestParam("pageIndex") int pageIndex, @RequestParam("pageSize") int pageSize,
     public BaseResponse getRecommendCompanyPostList(@RequestParam("pageIndex") int pageIndex, @RequestParam("pageSize") int pageSize,
                                                     @RequestParam("jobHuntID") String jobHuntID, @RequestParam(required = false) String professionID,
                                                     @RequestParam("jobHuntID") String jobHuntID, @RequestParam(required = false) String professionID,
-                                                    @RequestParam(required = false) String companyName, @RequestParam("type") Integer type,
+                                                    @RequestParam(required = false) String companyName,@RequestParam(required = false) String inviteProfessionName, @RequestParam("type") Integer type,
                                                     @RequestParam(required = false) String parentProfessionID, @RequestParam(required = false) Integer cultureRank,
                                                     @RequestParam(required = false) String parentProfessionID, @RequestParam(required = false) Integer cultureRank,
                                                     @RequestParam(required = false) String workYear, @RequestParam(required = false) Integer minSalary,
                                                     @RequestParam(required = false) String workYear, @RequestParam(required = false) Integer minSalary,
                                                     @RequestParam(required = false) Integer maxSalary) {
                                                     @RequestParam(required = false) Integer maxSalary) {
-        PageInfo<RecommendCompanyPostVo> result = recommendMgtService.getRecommendCompanyPostList(pageIndex, pageSize, jobHuntID, professionID, companyName, type, parentProfessionID, cultureRank, workYear, minSalary, maxSalary);
+        PageInfo<RecommendCompanyPostVo> result = recommendMgtService.getRecommendCompanyPostList(pageIndex, pageSize, jobHuntID, professionID, companyName,inviteProfessionName, type, parentProfessionID, cultureRank, workYear, minSalary, maxSalary);
         return RespGenerstor.success(result);
         return RespGenerstor.success(result);
     }
     }
 
 
@@ -75,11 +75,12 @@ public class RecommendMgtController {
     @GetMapping("/getRecommendJobList")
     @GetMapping("/getRecommendJobList")
     public BaseResponse getRecommendJobList(@RequestParam("pageIndex") int pageIndex, @RequestParam("pageSize") int pageSize,
     public BaseResponse getRecommendJobList(@RequestParam("pageIndex") int pageIndex, @RequestParam("pageSize") int pageSize,
                                             @RequestParam("postID") String postID, @RequestParam(required = false) String professionID,
                                             @RequestParam("postID") String postID, @RequestParam(required = false) String professionID,
+                                            @RequestParam(required = false) String huntProfessionID,
                                             @RequestParam(required = false) String userName, @RequestParam("type") Integer type,
                                             @RequestParam(required = false) String userName, @RequestParam("type") Integer type,
                                             @RequestParam(required = false) Integer cultureRank, @RequestParam(required = false) Integer keyPersonType,
                                             @RequestParam(required = false) Integer cultureRank, @RequestParam(required = false) Integer keyPersonType,
                                             @RequestParam(required = false) String parentProfessionID, @RequestParam(required = false) Integer workYear,
                                             @RequestParam(required = false) String parentProfessionID, @RequestParam(required = false) Integer workYear,
                                             @RequestParam(required = false) Integer minSalary,@RequestParam(required = false) Integer maxSalary) {
                                             @RequestParam(required = false) Integer minSalary,@RequestParam(required = false) Integer maxSalary) {
-        PageInfo<RecommendJobVo> result = recommendMgtService.getRecommendJobList(pageIndex, pageSize, postID, professionID, userName, type, cultureRank, keyPersonType, parentProfessionID, workYear, minSalary, maxSalary);
+        PageInfo<RecommendJobVo> result = recommendMgtService.getRecommendJobList(pageIndex, pageSize, postID, professionID,huntProfessionID, userName, type, cultureRank, keyPersonType, parentProfessionID, workYear, minSalary, maxSalary);
         return RespGenerstor.success(result);
         return RespGenerstor.success(result);
     }
     }
 
 
@@ -105,6 +106,14 @@ public class RecommendMgtController {
         return RespGenerstor.success(result);
         return RespGenerstor.success(result);
     }
     }
 
 
+    @ResponseBody
+    @GetMapping("/getCompanyProfessionLikeList")
+    public BaseResponse getCompanyProfessionLikeList(@RequestParam("pageIndex") int pageIndex, @RequestParam("pageSize") int pageSize,
+                                                     @RequestParam("professionName") String professionName,@RequestParam("companyName") String companyName) {
+        PageInfo<ProfessionLevel> result = recommendMgtService.getCompanyProfessionLikeList(pageIndex, pageSize, professionName,companyName);
+        return RespGenerstor.success(result);
+    }
+
     @ResponseBody
     @ResponseBody
     @GetMapping("/getOccupationCategoryList")
     @GetMapping("/getOccupationCategoryList")
     public BaseResponse getOccupationCategoryList() {
     public BaseResponse getOccupationCategoryList() {

+ 4 - 2
src/main/java/com/hz/employmentsite/mapper/cquery/RecommendMgtCQuery.java

@@ -37,7 +37,7 @@ public interface RecommendMgtCQuery {
      * @return
      * @return
      */
      */
     List<RecommendCompanyPostVo> getRecommendCompanyPostList(@Param("jobHuntID") String jobHuntID, @Param("professionID") String professionID,
     List<RecommendCompanyPostVo> getRecommendCompanyPostList(@Param("jobHuntID") String jobHuntID, @Param("professionID") String professionID,
-                                                             @Param("companyName") String companyName, @Param("type") Integer type,
+                                                             @Param("companyName") String companyName,@Param("inviteProfessionName")String inviteProfessionName, @Param("type") Integer type,
                                                              @Param("parentProfessionID") String parentProfessionID, @Param("cultureRank") Integer cultureRank,
                                                              @Param("parentProfessionID") String parentProfessionID, @Param("cultureRank") Integer cultureRank,
                                                              @Param("workYear") String workYear, @Param("minSalary") Integer minSalary,
                                                              @Param("workYear") String workYear, @Param("minSalary") Integer minSalary,
                                                              @Param("maxSalary") Integer maxSalary);
                                                              @Param("maxSalary") Integer maxSalary);
@@ -51,7 +51,7 @@ public interface RecommendMgtCQuery {
      * @param type         0-未推荐;1-已推荐
      * @param type         0-未推荐;1-已推荐
      * @return
      * @return
      */
      */
-    List<RecommendJobVo> getRecommendJobList(@Param("postID") String postID, @Param("professionID") String professionID,
+    List<RecommendJobVo> getRecommendJobList(@Param("postID") String postID, @Param("professionID") String professionID,@Param("huntProfessionID") String huntProfessionID,
                                              @Param("userName") String userName, @Param("type") Integer type,
                                              @Param("userName") String userName, @Param("type") Integer type,
                                              @Param("cultureRank") Integer cultureRank, @Param("keyPersonType") Integer keyPersonType,
                                              @Param("cultureRank") Integer cultureRank, @Param("keyPersonType") Integer keyPersonType,
                                              @Param("parentProfessionID") String parentProfessionID,
                                              @Param("parentProfessionID") String parentProfessionID,
@@ -62,6 +62,8 @@ public interface RecommendMgtCQuery {
 
 
     List<ProfessionLevel> getProfessionLikeList(@Param("professionName") String professionName);
     List<ProfessionLevel> getProfessionLikeList(@Param("professionName") String professionName);
 
 
+    List<ProfessionLevel> getCompanyProfessionLikeList(@Param("professionName") String professionName,@Param("companyName") String companyName);
+
     List<WorkCategoryLevel> getWorkCategoryLevelList();
     List<WorkCategoryLevel> getWorkCategoryLevelList();
 
 
     List<OccupationCategory> getOccupationCategoryList();
     List<OccupationCategory> getOccupationCategoryList();

+ 22 - 4
src/main/java/com/hz/employmentsite/services/impl/jobUserManager/RecommendMgtServiceImpl.java

@@ -161,10 +161,10 @@ public class RecommendMgtServiceImpl implements RecommendMgtService {
 
 
     @Override
     @Override
     public PageInfo<RecommendCompanyPostVo> getRecommendCompanyPostList(Integer page, Integer rows, String jobHuntID, String professionID,
     public PageInfo<RecommendCompanyPostVo> getRecommendCompanyPostList(Integer page, Integer rows, String jobHuntID, String professionID,
-                                                                        String companyName, Integer type, String parentProfessionID, Integer cultureRank,
+                                                                        String companyName,String inviteProfessionName, Integer type, String parentProfessionID, Integer cultureRank,
                                                                         String workYear,Integer minSalary,Integer maxSalary) {
                                                                         String workYear,Integer minSalary,Integer maxSalary) {
         PageHelper.startPage(page, rows);
         PageHelper.startPage(page, rows);
-        List<RecommendCompanyPostVo> list = recommendMgtCQuery.getRecommendCompanyPostList(jobHuntID, professionID, companyName, type,parentProfessionID,cultureRank,workYear,minSalary,maxSalary);
+        List<RecommendCompanyPostVo> list = recommendMgtCQuery.getRecommendCompanyPostList(jobHuntID, professionID, companyName, inviteProfessionName, type,parentProfessionID,cultureRank,workYear,minSalary,maxSalary);
         list.forEach(x -> {
         list.forEach(x -> {
             if (stringUtils.IsNullOrEmpty(x.recommendMgtID)) {
             if (stringUtils.IsNullOrEmpty(x.recommendMgtID)) {
                 x.recommendMgtID = UUID.randomUUID().toString();
                 x.recommendMgtID = UUID.randomUUID().toString();
@@ -175,7 +175,7 @@ public class RecommendMgtServiceImpl implements RecommendMgtService {
     }
     }
 
 
     @Override
     @Override
-    public PageInfo<RecommendJobVo> getRecommendJobList(Integer page, Integer rows, String postID, String professionID,
+    public PageInfo<RecommendJobVo> getRecommendJobList(Integer page, Integer rows, String postID, String professionID,String huntProfessionID,
                                                         String userName, Integer type, Integer cultureRank, Integer keyPersonType,
                                                         String userName, Integer type, Integer cultureRank, Integer keyPersonType,
                                                         String parentProfessionID, Integer workYear,Integer minSalary,Integer maxSalary) {
                                                         String parentProfessionID, Integer workYear,Integer minSalary,Integer maxSalary) {
         PageHelper.startPage(page, rows);
         PageHelper.startPage(page, rows);
@@ -188,7 +188,7 @@ public class RecommendMgtServiceImpl implements RecommendMgtService {
                 recommendedJobHuntIDList.add(curRecommended.getJobHuntID());
                 recommendedJobHuntIDList.add(curRecommended.getJobHuntID());
             }
             }
         }
         }
-        List<RecommendJobVo> list = recommendMgtCQuery.getRecommendJobList(postID, professionID, userName, type, cultureRank, keyPersonType, parentProfessionID, workYear, minSalary, maxSalary,stringUtils.ListToInSql(recommendedJobHuntIDList));
+        List<RecommendJobVo> list = recommendMgtCQuery.getRecommendJobList(postID, professionID, huntProfessionID, userName, type, cultureRank, keyPersonType, parentProfessionID, workYear, minSalary, maxSalary,stringUtils.ListToInSql(recommendedJobHuntIDList));
         list.forEach(x -> {
         list.forEach(x -> {
             if (stringUtils.IsNullOrEmpty(x.getRecommendMgtID())) {
             if (stringUtils.IsNullOrEmpty(x.getRecommendMgtID())) {
                 x.setRecommendMgtID(UUID.randomUUID().toString());
                 x.setRecommendMgtID(UUID.randomUUID().toString());
@@ -223,6 +223,24 @@ public class RecommendMgtServiceImpl implements RecommendMgtService {
         return result;
         return result;
     }
     }
 
 
+    @Override
+    public PageInfo<ProfessionLevel> getCompanyProfessionLikeList(Integer page, Integer rows,String professionName,String companyName) {
+        PageHelper.startPage(page, rows);
+
+        List<ProfessionLevel> list = recommendMgtCQuery.getCompanyProfessionLikeList(professionName,companyName);
+        List<ProfessionLevel> finalList = new ArrayList<>();
+        HashMap<String,String> nameCodeList = new HashMap<>();
+        list.forEach(item->{
+            if(!nameCodeList.containsValue(item.postName)){
+                nameCodeList.put("postName",item.postName);
+                finalList.add(item);
+            }
+        });
+        PageInfo<ProfessionLevel> result = new PageInfo(finalList);
+
+        return result;
+    }
+
     @Override
     @Override
     public List<OccupationCategory> getOccupationCategoryList() {return recommendMgtCQuery.getOccupationCategoryList();}
     public List<OccupationCategory> getOccupationCategoryList() {return recommendMgtCQuery.getOccupationCategoryList();}
 
 

+ 4 - 2
src/main/java/com/hz/employmentsite/services/service/jobUserManager/RecommendMgtService.java

@@ -43,7 +43,7 @@ public interface RecommendMgtService {
      * @return
      * @return
      * */
      * */
     PageInfo<RecommendCompanyPostVo> getRecommendCompanyPostList(Integer page, Integer rows, String jobHuntID,
     PageInfo<RecommendCompanyPostVo> getRecommendCompanyPostList(Integer page, Integer rows, String jobHuntID,
-                                                                 String professionID, String companyName, Integer type,
+                                                                 String professionID, String companyName,String inviteProfessionName, Integer type,
                                                                  String parentProfessionID, Integer cultureRank,
                                                                  String parentProfessionID, Integer cultureRank,
                                                                  String workYear,Integer minSalary,Integer maxSalary);
                                                                  String workYear,Integer minSalary,Integer maxSalary);
 
 
@@ -61,7 +61,7 @@ public interface RecommendMgtService {
      * @param maxSalary 最高薪资
      * @param maxSalary 最高薪资
      * @return
      * @return
      * */
      * */
-    PageInfo<RecommendJobVo> getRecommendJobList(Integer page, Integer rows, String postID, String professionID, String userName,
+    PageInfo<RecommendJobVo> getRecommendJobList(Integer page, Integer rows, String postID, String professionID,String huntProfessionID, String userName,
                                                  Integer type, Integer cultureRank, Integer keyPersonType,
                                                  Integer type, Integer cultureRank, Integer keyPersonType,
                                                  String parentProfessionID, Integer workYear,Integer minSalary,Integer maxSalary);
                                                  String parentProfessionID, Integer workYear,Integer minSalary,Integer maxSalary);
 
 
@@ -69,6 +69,8 @@ public interface RecommendMgtService {
 
 
     PageInfo<ProfessionLevel> getProfessionLikeList(Integer page, Integer rows,String professionName);
     PageInfo<ProfessionLevel> getProfessionLikeList(Integer page, Integer rows,String professionName);
 
 
+    PageInfo<ProfessionLevel> getCompanyProfessionLikeList(Integer page, Integer rows,String professionName,String companyName);
+
     List<WorkCategoryLevel> getWorkCategoryLevelList();
     List<WorkCategoryLevel> getWorkCategoryLevelList();
 
 
     List<OccupationCategory> getOccupationCategoryList();
     List<OccupationCategory> getOccupationCategoryList();

+ 2 - 0
src/main/java/com/hz/employmentsite/vo/jobUserManager/ProfessionLevel.java

@@ -6,4 +6,6 @@ import com.hz.employmentsite.model.PcProfession;
 public class ProfessionLevel extends PcProfession {
 public class ProfessionLevel extends PcProfession {
     public String professionLevel;
     public String professionLevel;
     public String parentProfessionName;
     public String parentProfessionName;
+    public String companyName;
+    public String postName;
 }
 }

+ 36 - 3
src/main/resources/mapping/cquery/RecommendMgtCQuery.xml

@@ -105,9 +105,13 @@
                 <when test="parentProfessionID!=null and parentProfessionID!=''">
                 <when test="parentProfessionID!=null and parentProfessionID!=''">
                     and c.ParentProfessionID = #{parentProfessionID}
                     and c.ParentProfessionID = #{parentProfessionID}
                 </when>
                 </when>
-                <when test="professionID!=null and professionID!=''">
+                <when test="professionID!=null and professionID!=''and (inviteProfessionName == null or inviteProfessionName =='') ">
                     and a.ProfessionID = #{professionID}
                     and a.ProfessionID = #{professionID}
                 </when>
                 </when>
+
+                <when test="professionID!=null and professionID!=''and inviteProfessionName != null and inviteProfessionName !=''  ">
+                    and ( a.ProfessionID = #{professionID} or c.professionname like Concat('%',#{inviteProfessionName},'%') )
+                </when>
                 <otherwise>and 1=1</otherwise>
                 <otherwise>and 1=1</otherwise>
             </choose>
             </choose>
             <if test="companyName!=null and companyName!=''">
             <if test="companyName!=null and companyName!=''">
@@ -157,7 +161,7 @@
                 and d.RecommendMgtID is not null
                 and d.RecommendMgtID is not null
             </if>
             </if>
             <if test="userName!=null and userName!=''">
             <if test="userName!=null and userName!=''">
-                and b.UserName like Concat('%',#{userName},'%')
+                and b.name like Concat('%',#{userName},'%')
             </if>
             </if>
             <if test="keyPersonType!=null and keyPersonType!=''">
             <if test="keyPersonType!=null and keyPersonType!=''">
                 and b.KeyPersonTypeID = #{keyPersonType}
                 and b.KeyPersonTypeID = #{keyPersonType}
@@ -169,9 +173,12 @@
                 <when test="parentProfessionID!=null and parentProfessionID!=''">
                 <when test="parentProfessionID!=null and parentProfessionID!=''">
                     and c.ParentProfessionID = #{parentProfessionID}
                     and c.ParentProfessionID = #{parentProfessionID}
                 </when>
                 </when>
-                <when test="professionID!=null and professionID!=''">
+                <when test="professionID!=null and professionID!=''and (huntProfessionID==null or huntProfessionID=='')">
                     and a.ProfessionID = #{professionID}
                     and a.ProfessionID = #{professionID}
                 </when>
                 </when>
+                <when test="professionID!=null and professionID!=''and huntProfessionID!=null and huntProfessionID!=''">
+                    and ( a.ProfessionID = #{professionID} or a.ProfessionID = #{huntProfessionID} )
+                </when>
                 <otherwise>and 1=1</otherwise>
                 <otherwise>and 1=1</otherwise>
             </choose>
             </choose>
             <if test="workYear!=null and workYear!=''">
             <if test="workYear!=null and workYear!=''">
@@ -213,6 +220,32 @@
                                                  on a.ParentProfessionID = b.ProfessionID) bb
                                                  on a.ParentProfessionID = b.ProfessionID) bb
                             on c.ParentProfessionID = bb.ProfessionID
                             on c.ParentProfessionID = bb.ProfessionID
     </select>
     </select>
+    <select id="getCompanyProfessionLikeList" resultType="com.hz.employmentsite.vo.jobUserManager.ProfessionLevel">
+        select aa.ProfessionID, aa.ParentProfessionID, aa.ProfessionName, bb.ProfessionName as ParentProfessionName,
+               company.companyName,post.postName
+        from (
+        select c.ProfessionID, c.ParentProfessionID, c.ProfessionName,c.OrderNo
+        from pc_profession c
+        inner join (select a.ProfessionID
+        from pc_profession a
+        inner join (select ProfessionID from pc_profession where ParentProfessionID = '') b
+        on a.ParentProfessionID = b.ProfessionID) bb
+        on c.ParentProfessionID = bb.ProfessionID
+        where 1=1
+        <if test="professionName!=null and professionName!=''">
+            and c.ProfessionName like Concat('%',#{professionName},'%')
+        </if>
+        ) aa
+        left join pc_profession bb on aa.ParentProfessionID = bb.ProfessionID
+        left join pc_post post on aa.ProfessionID = post.ProfessionID
+        left join pc_company company on post.companyID = company.companyID
+        where 1=1 and post.RecordStatus = 1
+        <if test="companyName!=null and companyName!=''">
+            and company.companyName = #{companyName}
+        </if>
+        order by bb.OrderNo,aa.OrderNo
+    </select>
+
     <select id="getProfessionLikeList" resultType="com.hz.employmentsite.vo.jobUserManager.ProfessionLevel">
     <select id="getProfessionLikeList" resultType="com.hz.employmentsite.vo.jobUserManager.ProfessionLevel">
         select aa.ProfessionID, aa.ParentProfessionID, aa.ProfessionName, bb.ProfessionName as ParentProfessionName
         select aa.ProfessionID, aa.ParentProfessionID, aa.ProfessionName, bb.ProfessionName as ParentProfessionName
         from (
         from (

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

@@ -92,3 +92,17 @@ export function getProfessionLikeList(params: any) {
     },
     },
   );
   );
 }
 }
+
+
+export function getCompanyProfessionLikeList(params: any) {
+  return request<any>(
+    {
+      url: "jobusermgr/recommendmgt/getCompanyProfessionLikeList",
+      method: 'get',
+      params: params,
+    },
+    {
+      isNew: true,
+    },
+  );
+}

+ 1 - 1
vue/src/views/companyService/post/edit.vue

@@ -606,7 +606,7 @@ export default defineComponent(
       // 岗位名称变更
       // 岗位名称变更
       function professionChange(value: any) {
       function professionChange(value: any) {
         console.log(value)
         console.log(value)
-        postCompany.dataModel.professionName = value
+        postCompany.dataModel.professionName = value;
         const profession = professionList.value.find(prof => prof.professionName === value);
         const profession = professionList.value.find(prof => prof.professionName === value);
         if (profession) {
         if (profession) {
           postCompany.dataModel.professionID = profession.professionID;
           postCompany.dataModel.professionID = profession.professionID;

+ 1 - 1
vue/src/views/companyService/post/index.vue

@@ -326,7 +326,7 @@ export default defineComponent({
 
 
     const getCompanyList = () => {
     const getCompanyList = () => {
       console.log('getCompanyList');
       console.log('getCompanyList');
-      get('companyService/company/getList', {pageIndex: 1, pageSize: 999}).then(result => {
+      get('companyService/company/getList', {pageIndex: 1, pageSize: 9999}).then(result => {
         companyList.value = result.list;
         companyList.value = result.list;
         console.log(companyList.value);
         console.log(companyList.value);
       })
       })

+ 71 - 13
vue/src/views/companyService/post/recommend.vue

@@ -29,16 +29,25 @@
                        placeholder=""/>
                        placeholder=""/>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
-          <a-col :span="6" style="text-align: center;" v-if="searchParams.type===0">
-            <a-form-item label="" :label-col="{ span: 4 }" name="checkParentProfessionID">
-              <a-checkbox
-                v-model:checked="searchParams.checkParentProfessionID"
-                @change="onSearch">
-                相关行业
-              </a-checkbox>
+          <a-col :span="6">
+            <a-form-item label="求职岗位" :label-col="{ span: 8 }" name="professionName">
+              <a-auto-complete
+                v-model:value="searchParams.huntProfessionName"
+                :options="professionList"
+                @search="selectProfessionList"
+                @change="professionChange"
+                :field-names="{
+                            value:'professionName',
+                          }"
+              >
+                <template #option="item">
+                  <span v-html="formatStr(item.professionName)"></span>({{ item.parentProfessionName }})
+                </template>
+              </a-auto-complete>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
-          <a-col :span="5" style="text-align: left">
+
+          <a-col :span="6" style="text-align: left">
             <a-button type="primary" html-type="submit" @click="onSearch">查询</a-button>
             <a-button type="primary" html-type="submit" @click="onSearch">查询</a-button>
             <a-button
             <a-button
               style="margin: 0 8px"
               style="margin: 0 8px"
@@ -75,6 +84,7 @@
               <a-input v-model:value="searchParams.userName" placeholder=""/>
               <a-input v-model:value="searchParams.userName" placeholder=""/>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
+
           <a-col :span="6">
           <a-col :span="6">
             <a-form-item label="文化程度" :label-col="{span:8}" name="cultureRank">
             <a-form-item label="文化程度" :label-col="{span:8}" name="cultureRank">
               <a-select
               <a-select
@@ -110,9 +120,18 @@
           </a-col>
           </a-col>
           <a-col :span="12">
           <a-col :span="12">
             <a-form-item label="薪资要求" :label-col="{span:4}" name="maxSalary">
             <a-form-item label="薪资要求" :label-col="{span:4}" name="maxSalary">
-              <a-input type="number" v-model:value="searchParams.minSalary" style="width:110px;" placeholder=""/>
-              <label style="margin:10px;">-</label>
-              <a-input type="number" v-model:value="searchParams.maxSalary" style="width:110px;" placeholder=""/>
+            <a-input type="number" v-model:value="searchParams.minSalary" style="width:120px;" placeholder=""/>
+            <label style="margin:10px;">-</label>
+            <a-input type="number" v-model:value="searchParams.maxSalary" style="width:120px;" placeholder=""/>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3" v-if="searchParams.type===0">
+            <a-form-item label=""  name="checkParentProfessionID">
+              <a-checkbox
+                v-model:checked="searchParams.checkParentProfessionID"
+                @change="onSearch">
+                相关行业
+              </a-checkbox>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
         </a-row>
         </a-row>
@@ -146,12 +165,12 @@
 <script lang="ts">
 <script lang="ts">
 import {reactive, ref, computed, defineComponent} from 'vue';
 import {reactive, ref, computed, defineComponent} from 'vue';
 import type {FormInstance, TableColumnsType, TableProps} from 'ant-design-vue';
 import type {FormInstance, TableColumnsType, TableProps} from 'ant-design-vue';
-import {getRecommendJobList, addRecommend} from '@/api/jobUserManager/recommendMgt';
+import {getRecommendJobList, addRecommend, getProfessionLikeList} from '@/api/jobUserManager/recommendMgt';
 import {getPaginationTotalTitle} from '@/utils/common';
 import {getPaginationTotalTitle} from '@/utils/common';
 import type {SelectProps} from "ant-design-vue";
 import type {SelectProps} from "ant-design-vue";
 import {getSysDictionaryList} from "@/api/system/dictionary";
 import {getSysDictionaryList} from "@/api/system/dictionary";
 import {message} from "ant-design-vue";
 import {message} from "ant-design-vue";
-
+import {debounce} from "lodash-es";
 export default defineComponent({
 export default defineComponent({
   name: 'RecommendJobList',
   name: 'RecommendJobList',
   setup() {
   setup() {
@@ -165,10 +184,12 @@ export default defineComponent({
       pageSize: 10,
       pageSize: 10,
       companyName: '',
       companyName: '',
       professionName: null,
       professionName: null,
+      huntProfessionName:null,
       type: null,
       type: null,
       postID: null,
       postID: null,
       userName: '',
       userName: '',
       professionID: '',
       professionID: '',
+      huntProfessionID: '',
       keyPersonType: null,
       keyPersonType: null,
       parentProfessionID: '',
       parentProfessionID: '',
       checkParentProfessionID: false,
       checkParentProfessionID: false,
@@ -234,6 +255,39 @@ export default defineComponent({
       searchParams.pageSize = pag.pageSize;
       searchParams.pageSize = pag.pageSize;
       loadData();
       loadData();
     };
     };
+    // 名称搜索关键字高亮
+    const formatStr = (str: any) => {
+      if (!str) {
+        return "";
+      }
+      return str.replace(searchParams.huntProfessionName, '<span style="color: coral">' + searchParams.huntProfessionName + '</span>');
+    }
+    const professionList = ref<Array<any>>([]);
+    // 查询岗位
+    const selectProfessionList = debounce((professionName: string) => {
+      if (professionName) {
+        getProfessionLikeList({
+          pageIndex: 1,
+          pageSize: 30,
+          professionName
+        }).then(data => {
+          professionList.value = data.list;
+        })
+      }
+    }, 200)
+
+    // 岗位名称变更
+    function professionChange(value: any) {
+      searchParams.huntProfessionName = value;
+      console.log("当前搜索的求职岗位名称",value);
+      const profession = professionList.value.find(prof => prof.professionName === value);
+      if (profession) {
+        searchParams.huntProfessionID = profession.professionID;
+        onSearch();
+      } else {
+        searchParams.huntProfessionID = "";
+      }
+    }
 
 
     const onSearch = () => {
     const onSearch = () => {
       searchParams.parentProfessionID = searchParams.checkParentProfessionID ? parentProfessionID.value : '';
       searchParams.parentProfessionID = searchParams.checkParentProfessionID ? parentProfessionID.value : '';
@@ -355,10 +409,13 @@ export default defineComponent({
       columns,
       columns,
       pagination,
       pagination,
       dataList,
       dataList,
+      professionList,
       cultureLevelList,
       cultureLevelList,
       addRecommendList,
       addRecommendList,
       keyPersonTypeList,
       keyPersonTypeList,
       show,
       show,
+      formatStr,
+      professionChange,
       onSearch,
       onSearch,
       showSalary,
       showSalary,
       onRecommend,
       onRecommend,
@@ -368,6 +425,7 @@ export default defineComponent({
       loadData,
       loadData,
       getCultureLevelList,
       getCultureLevelList,
       getKeyPersonTypeList,
       getKeyPersonTypeList,
+      selectProfessionList,
       handleOk,
       handleOk,
       handleCancel
       handleCancel
     };
     };

+ 105 - 8
vue/src/views/jobUserManager/jobhunt/recommend.vue

@@ -19,7 +19,7 @@
       >
       >
         <a-row :gutter="24">
         <a-row :gutter="24">
           <a-col :span="6">
           <a-col :span="6">
-            <a-form-item label="求职" :label-col="{ span: 8 }" name="name">
+            <a-form-item label="求职人员姓名" :label-col="{ span: 8 }" name="name">
               <a-input v-model:value="searchParams.jobUserName" style="color: black;" disabled="true" placeholder=""/>
               <a-input v-model:value="searchParams.jobUserName" style="color: black;" disabled="true" placeholder=""/>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
@@ -30,11 +30,18 @@
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :span="6">
           <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 label="招聘企业" :label-col="{ span: 8 }" name="companyName">
+<!--              <a-input v-model:value="searchParams.companyName" placeholder=""/>-->
+              <a-select ref="select" show-search optionFilterProp="label" allow-clear="true"
+                        v-model:value="searchParams.companyName" >
+                <a-select-option v-for="item in companyList" :label="item.companyName" :value="item.companyName"
+                                 :key="item.companyID" @change="companyChange">
+                  <span>{{ item.companyName }}</span>
+                </a-select-option>
+              </a-select>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
-          <a-col :span="4" style="text-align: left">
+          <a-col :span="6" style="text-align: left;">
             <a-button type="primary" html-type="submit" @click="onSearch">查询</a-button>
             <a-button type="primary" html-type="submit" @click="onSearch">查询</a-button>
             <a-button
             <a-button
               style="margin: 0 8px"
               style="margin: 0 8px"
@@ -63,8 +70,25 @@
             <!--          </a>-->
             <!--          </a>-->
           </a-col>
           </a-col>
         </a-row>
         </a-row>
-        <a-row :gutter="24" v-if="searchParams.type===0" >
-          <a-col :span="16">
+        <a-row :gutter="24">
+          <a-col :span="6">
+            <a-form-item label="招聘岗位" :label-col="{ span: 8 }" name="inviteProfessionName">
+              <a-auto-complete
+                v-model:value="searchParams.inviteProfessionName"
+                :options="inviteProfessionList"
+                @search="selectInviteProfessionList"
+                @change="inviteProfessionChange"
+                :field-names="{
+                            value:'professionName',
+                          }"
+              >
+                <template #option="item">
+                  <span v-html="formatStr(item.professionName)"></span>({{ item.parentProfessionName }})
+                </template>
+              </a-auto-complete>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12" v-if="searchParams.type===0">
             <a-form-item label="推荐岗位筛选:" :label-col="{ span: 4 }" name="recommendPostWhere">
             <a-form-item label="推荐岗位筛选:" :label-col="{ span: 4 }" name="recommendPostWhere">
               <!--              <div :style="{ borderBottom: '1px solid #E9E9E9' }">-->
               <!--              <div :style="{ borderBottom: '1px solid #E9E9E9' }">-->
               <!--              <a-checkbox-->
               <!--              <a-checkbox-->
@@ -78,6 +102,8 @@
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
         </a-row>
         </a-row>
+        <a-row :gutter="24" >
+        </a-row>
         <a-row class="edit-operation">
         <a-row class="edit-operation">
           <a-col :span="24" style="text-align: right">
           <a-col :span="24" style="text-align: right">
             <a-button type="primary" v-if="searchParams.type===0" html-type="submit" functioncode="T01030207"
             <a-button type="primary" v-if="searchParams.type===0" html-type="submit" functioncode="T01030207"
@@ -107,11 +133,13 @@
 <script lang="ts">
 <script lang="ts">
 import {reactive, ref, computed, defineComponent, toRefs, watch} from 'vue';
 import {reactive, ref, computed, defineComponent, toRefs, watch} from 'vue';
 import type {FormInstance, TableColumnsType, TableProps} from 'ant-design-vue';
 import type {FormInstance, TableColumnsType, TableProps} from 'ant-design-vue';
-import {getRecommendCompanyPostList, addRecommend} from '@/api/jobUserManager/recommendMgt';
+import {getRecommendCompanyPostList, addRecommend,getProfessionLikeList, getCompanyProfessionLikeList} from '@/api/jobUserManager/recommendMgt';
 import {getPaginationTotalTitle} from '@/utils/common';
 import {getPaginationTotalTitle} from '@/utils/common';
 import dayjs from 'dayjs';
 import dayjs from 'dayjs';
-import {message} from "ant-design-vue";
+import {message, SelectProps} from "ant-design-vue";
 import {getSysDictionaryList} from '@/api/system/dictionary';
 import {getSysDictionaryList} from '@/api/system/dictionary';
+import {get} from "@/api/common";
+import {debounce} from "lodash-es";
 
 
 export default defineComponent({
 export default defineComponent({
   name: 'RecommendCompanyPostList',
   name: 'RecommendCompanyPostList',
@@ -122,18 +150,36 @@ export default defineComponent({
     const expand = ref(false);
     const expand = ref(false);
     const title = ref<string>();
     const title = ref<string>();
     const dataList = ref([]);
     const dataList = ref([]);
+    const companyList = ref<SelectProps['options']>();
     const addRecommendList = ref([] as any);
     const addRecommendList = ref([] as any);
     const recommendPostWhereList = ref([] as any);
     const recommendPostWhereList = ref([] as any);
 
 
+    get('companyService/company/getList', {pageIndex: 1, pageSize: 9999}).then(result => {
+      companyList.value = result.list;
+    });
+
+    function companyChange(value: any) {
+      getCompanyProfessionLikeList({
+        pageIndex: 1,
+        pageSize: 30,
+        professionName:"",
+        companyName:value
+      }).then(data => {
+        inviteProfessionList.value = data.list;
+      })
+    }
+
     const searchParams = reactive({
     const searchParams = reactive({
       pageIndex: 1,
       pageIndex: 1,
       pageSize: 10,
       pageSize: 10,
       jobUserName: null,
       jobUserName: null,
       professionName: null,
       professionName: null,
+      inviteProfessionName: null,
       type: 0,
       type: 0,
       jobHuntID: '',
       jobHuntID: '',
       companyName: null,
       companyName: null,
       professionID: '',
       professionID: '',
+      inviteProfessionID: '',
       parentProfessionID: '',
       parentProfessionID: '',
       cultureRank: null,
       cultureRank: null,
       workYear: null,
       workYear: null,
@@ -208,6 +254,51 @@ export default defineComponent({
       loadData();
       loadData();
     };
     };
 
 
+    // 名称搜索关键字高亮
+    const formatStr = (str: any) => {
+      if (!str) {
+        return "";
+      }
+      return str.replace(searchParams.inviteProfessionName, '<span style="color: coral">' + searchParams.inviteProfessionName + '</span>');
+    }
+    const inviteProfessionList = ref<Array<any>>([]);
+    // 查询岗位
+    const selectInviteProfessionList = debounce((professionName: string) => {
+      if (professionName) {
+        if(searchParams.companyName){
+          getCompanyProfessionLikeList({
+            pageIndex: 1,
+            pageSize: 30,
+            professionName:professionName,
+            companyName:searchParams.companyName
+          }).then(data => {
+            inviteProfessionList.value = data.list;
+          })
+        }else{
+          getProfessionLikeList({
+            pageIndex: 1,
+            pageSize: 30,
+            professionName
+          }).then(data => {
+            inviteProfessionList.value = data.list;
+          })
+        }
+      }
+    }, 200)
+
+    // 岗位名称变更
+    function inviteProfessionChange(value: any) {
+      searchParams.inviteProfessionName = value;
+      console.log("当前搜索的招聘岗位名称",value);
+      const profession = inviteProfessionList.value.find(prof => prof.professionName === value);
+      if (profession) {
+        searchParams.inviteProfessionID = profession.professionID;
+        onSearch();
+      } else {
+        searchParams.inviteProfessionID = "";
+      }
+    }
+
     const onSearch = () => {
     const onSearch = () => {
       searchParams.professionID = state.checkRecommendPostWhereList.findIndex(x => x == 1) >= 0 ? state.professionID : "";
       searchParams.professionID = state.checkRecommendPostWhereList.findIndex(x => x == 1) >= 0 ? state.professionID : "";
       searchParams.cultureRank = state.checkRecommendPostWhereList.findIndex(x => x == 2) >= 0 ? state.cultureRank : null;
       searchParams.cultureRank = state.checkRecommendPostWhereList.findIndex(x => x == 2) >= 0 ? state.cultureRank : null;
@@ -363,9 +454,14 @@ export default defineComponent({
       columns,
       columns,
       pagination,
       pagination,
       dataList,
       dataList,
+      companyList,
+      inviteProfessionList,
       recommendPostWhereList,
       recommendPostWhereList,
       show,
       show,
       onSearch,
       onSearch,
+      formatStr,
+      companyChange,
+      inviteProfessionChange,
       showSalary,
       showSalary,
       onCheckAllChange,
       onCheckAllChange,
       onRecommend,
       onRecommend,
@@ -374,6 +470,7 @@ export default defineComponent({
       handleTableChange,
       handleTableChange,
       loadData,
       loadData,
       getRecommendPostWhereList,
       getRecommendPostWhereList,
+      selectInviteProfessionList,
       handleOk,
       handleOk,
       handleCancel
       handleCancel
     };
     };