Browse Source

推荐信息管理

lizeyu 10 months ago
parent
commit
cb1e9e0a08

+ 1 - 1
h5app/src/views/pages/jobhunt/recommend/recommend.vue

@@ -147,7 +147,7 @@ export default defineComponent({
     }
 
     const onBack = () => {
-      router.go(-1);
+      router.push({path: './list', query: {reload: 1}});
     }
 
     const reload = () => {

+ 0 - 1
h5app/src/views/pages/recommendMgt/detail.vue

@@ -121,7 +121,6 @@ export default defineComponent({
     const loadData = async function (id: any) {
       loading.value = true;
       getListById(id).then((data) => {
-        debugger;
         dataModel.value = data;
       })
       loading.value = false;

+ 14 - 10
src/main/java/com/hz/employmentsite/controller/jobUserManager/RecommendMgtController.java

@@ -14,7 +14,6 @@ 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")
@@ -55,20 +54,25 @@ public class RecommendMgtController {
 
     @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);
+    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,
+                                                    @RequestParam(required = false) String parentProfessionID, @RequestParam(required = false) Integer cultureRank,
+                                                    @RequestParam(required = false) Integer workYear, @RequestParam(required = false) Integer minSalary,
+                                                    @RequestParam(required = false) Integer maxSalary) {
+        PageInfo<RecommendCompanyPostVo> result = recommendMgtService.getRecommendCompanyPostList(pageIndex, pageSize, jobHuntID, professionID, companyName, type, parentProfessionID, cultureRank, workYear, minSalary, maxSalary);
         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);
+    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 cultureRank, @RequestParam(required = false) Integer keyPersonType,
+                                            @RequestParam(required = false) String parentProfessionID, @RequestParam(required = false) Integer workYear,
+                                            @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);
         return RespGenerstor.success(result);
     }
 

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

@@ -19,18 +19,26 @@ public interface RecommendMgtCQuery {
                                              @Param("professionName") String professionName);
 
     /**
-     * 获取推荐企业信息
+     * 获取推荐岗位信息
      * @param jobHuntID 求职意向id
      * @param professionID 岗位id
      * @param companyName 企业名称
      * @param type 0-未推荐;1-已推荐
+     * @param parentProfessionID 岗位父级id
+     * @param cultureRank 学历编号
+     * @param workYear 工作年限
+     * @param minSalary 最低薪资
+     * @param maxSalary 最高薪资
      * @return
      * */
     List<RecommendCompanyPostVo> getRecommendCompanyPostList(@Param("jobHuntID")String jobHuntID, @Param("professionID") String professionID,
-                                                             @Param("companyName")String companyName, @Param("type") Integer type);
+                                                             @Param("companyName")String companyName, @Param("type") Integer type,
+                                                             @Param("parentProfessionID")String parentProfessionID, @Param("cultureRank") Integer cultureRank,
+                                                              @Param("workYear") Integer workYear,@Param("minSalary")Integer minSalary,
+                                                             @Param("maxSalary")Integer maxSalary);
 
     /**
-     * 获取推荐企业信息
+     * 获取推荐求职人员信息
      * @param postID 企业岗位id
      * @param professionID 岗位id
      * @param userName 求职人员姓名
@@ -39,7 +47,10 @@ public interface RecommendMgtCQuery {
      * */
     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);
+                                             @Param("cultureRank") Integer cultureRank, @Param("keyPersonType") Integer keyPersonType,
+                                             @Param("parentProfessionID")String parentProfessionID,
+                                             @Param("workYear") Integer workYear,@Param("minSalary")Integer minSalary,
+                                             @Param("maxSalary")Integer maxSalary);
 
    List<ProfessionLevel> getProfessionLevelList();
 

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

@@ -15,6 +15,7 @@ import com.hz.employmentsite.vo.jobUserManager.ProfessionLevel;
 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.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -93,9 +94,10 @@ public class RecommendMgtServiceImpl implements RecommendMgtService {
 
     @Override
     public PageInfo<RecommendCompanyPostVo> getRecommendCompanyPostList(Integer page, Integer rows, String jobHuntID, String professionID,
-                                                                        String companyName, Integer type) {
+                                                                        String companyName, Integer type, String parentProfessionID, Integer cultureRank,
+                                                                        Integer workYear,Integer minSalary,Integer maxSalary) {
         PageHelper.startPage(page, rows);
-        List<RecommendCompanyPostVo> list = recommendMgtCQuery.getRecommendCompanyPostList(jobHuntID, professionID, companyName, type);
+        List<RecommendCompanyPostVo> list = recommendMgtCQuery.getRecommendCompanyPostList(jobHuntID, professionID, companyName, type,parentProfessionID,cultureRank,workYear,minSalary,maxSalary);
         list.forEach(x -> {
             if (stringUtils.IsNullOrEmpty(x.recommendMgtID)) {
                 x.recommendMgtID = UUID.randomUUID().toString();
@@ -107,9 +109,10 @@ public class RecommendMgtServiceImpl implements RecommendMgtService {
 
     @Override
     public PageInfo<RecommendJobVo> getRecommendJobList(Integer page, Integer rows, String postID, String professionID,
-                                                        String userName, Integer type, Integer cultureLeve, Integer keyPersonType) {
+                                                        String userName, Integer type, Integer cultureRank, Integer keyPersonType,
+                                                        String parentProfessionID, Integer workYear,Integer minSalary,Integer maxSalary) {
         PageHelper.startPage(page, rows);
-        List<RecommendJobVo> list = recommendMgtCQuery.getRecommendJobList(postID, professionID, userName, type, cultureLeve, keyPersonType);
+        List<RecommendJobVo> list = recommendMgtCQuery.getRecommendJobList(postID, professionID, userName, type, cultureRank, keyPersonType, parentProfessionID, workYear, minSalary, maxSalary);
         list.forEach(x -> {
             if (stringUtils.IsNullOrEmpty(x.recommendMgtID)) {
                 x.recommendMgtID = UUID.randomUUID().toString();

+ 24 - 12
src/main/java/com/hz/employmentsite/services/service/jobUserManager/RecommendMgtService.java

@@ -25,30 +25,42 @@ public interface RecommendMgtService {
 
     int addRecommend(List<PcRecommendMgt> list, String userId);
 
+
     /**
-     * 获取推荐企业信息
-     * @param page
-     * @param rows
-     * @param jobHuntId 求职意向id
-     * @param professionId 岗位id
+     * 推荐岗位信息
+     * @param jobHuntID 求职意向id
+     * @param professionID 岗位id
      * @param companyName 企业名称
      * @param type 0-未推荐;1-已推荐
+     * @param parentProfessionID 岗位父级id
+     * @param cultureRank 学历编号
+     * @param workYear 工作年限
+     * @param minSalary 最低薪资
+     * @param maxSalary 最高薪资
      * @return
      * */
-    PageInfo<RecommendCompanyPostVo> getRecommendCompanyPostList(Integer page, Integer rows, String jobHuntId,
-                                                                 String professionId, String companyName, Integer type);
+    PageInfo<RecommendCompanyPostVo> getRecommendCompanyPostList(Integer page, Integer rows, String jobHuntID,
+                                                                 String professionID, String companyName, Integer type,
+                                                                 String parentProfessionID, Integer cultureRank,
+                                                                 Integer workYear,Integer minSalary,Integer maxSalary);
 
 
     /**
-     * 获取推荐企业信息
-     * @param postId 企业岗位id
-     * @param professionId 岗位id
+     * 推荐求职人员信息
+     * @param postID 企业岗位id
+     * @param professionID 岗位id
      * @param userName 求职人员姓名
      * @param type 0-未推荐;1-已推荐
+     * @param parentProfessionID 岗位父级id
+     * @param cultureRank 学历编号
+     * @param workYear 工作年限
+     * @param minSalary 最低薪资
+     * @param maxSalary 最高薪资
      * @return
      * */
-    PageInfo<RecommendJobVo> getRecommendJobList(Integer page, Integer rows, String postId, String professionId, String userName,
-                                                 Integer type, Integer cultureLeve, Integer keyPersonType);
+    PageInfo<RecommendJobVo> getRecommendJobList(Integer page, Integer rows, String postID, String professionID, String userName,
+                                                 Integer type, Integer cultureRank, Integer keyPersonType,
+                                                 String parentProfessionID, Integer workYear,Integer minSalary,Integer maxSalary);
 
     List<ProfessionLevel> getProfessionLevelList();
 

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

@@ -92,5 +92,7 @@ public class PostVo {
 
     public String professionName;
 
+    public String parentProfessionID;
+
     public String recommendNum; //推荐数量
 }

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

@@ -24,10 +24,12 @@ public class JobHuntVo {
     public String jobUserTypeStr;
     public String professionID;
     public String professionName;
+    public String ParentProfessionID;
     public BigDecimal minSalary;
     public BigDecimal maxSalary;
     public String otherDemand;
     public Boolean isAccomplish;
     public String errorMessage;
     public String recommendNum; // 推荐数量
+    public String cultureRank;
 }

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

@@ -11,4 +11,7 @@ public class RecommendJobVo {
     public String isRecommend;
     public String professionID;
     public String professionName;
+    public String workYear;
+    public String minSalary;
+    public String maxSalary;
 }

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

@@ -4,7 +4,8 @@
     <select id="getJobHuntList" resultType="com.hz.employmentsite.vo.jobUserManager.JobHuntVo">
         select jobHunt.JobHuntID, jobHunt.JobUserID, jobHunt.ProfessionID, jobHunt.WorkCode, jobHunt.WorkName, jobHunt.AreaWork, jobHunt.InDate, jobHunt.WorkYear, jobHunt.JobHuntType, jobHunt.JobUserType, jobHunt.MinSalary, jobHunt.MaxSalary, jobHunt.CreateUserID, jobHunt.CreateTime, jobHunt.ModifyUserID, jobHunt.ModifyTime, jobHunt.OtherDemand
         ,jobUser.name as JobUserName,dic_jobUserType.Name as jobUserTypeStr,dic_huntJobType.Name as jobHuntTypeStr
-        ,profession.ProfessionName, IFNULL(count(rmgt.RecommendMgtID),0) as recommendNum
+        ,profession.ProfessionName, profession.ParentProfessionID, IFNULL(count(rmgt.RecommendMgtID),0) as recommendNum
+        ,jobUser.cultureRank
         from pc_jobhunt jobHunt
         left join pc_jobuser jobUser on jobHunt.JobUserID = jobUser.JobUserID
         left join pc_profession profession on jobHunt.professionID = profession.professionID
@@ -50,7 +51,7 @@
             and isAccomplish = #{isAccomplish}
         </if>-->
         group by jobHunt.JobHuntID, jobHunt.JobUserID, jobHunt.ProfessionID, jobHunt.WorkCode, jobHunt.WorkName, jobHunt.AreaWork, jobHunt.InDate, jobHunt.WorkYear, jobHunt.JobHuntType, jobHunt.JobUserType, jobHunt.MinSalary, jobHunt.MaxSalary, jobHunt.CreateUserID, jobHunt.CreateTime, jobHunt.ModifyUserID, jobHunt.ModifyTime, jobHunt.OtherDemand
-        ,jobUser.`Name`,dic_jobUserType.`Name`,dic_huntJobType.`Name`, profession.ProfessionName
+        ,jobUser.`Name`,dic_jobUserType.`Name`,dic_huntJobType.`Name`, profession.ProfessionName, profession.ParentProfessionID,jobUser.cultureRank
         order by jobHunt.CreateTime desc
     </select>
 </mapper>

+ 2 - 2
src/main/resources/mapping/cquery/PostCQuery.xml

@@ -8,7 +8,7 @@
         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,
-        post.ProfessionID,pro.ProfessionName
+        post.ProfessionID,pro.ProfessionName,pro.parentProfessionID
         , IFNULL(count(rmgt.RecommendMgtID),0) as recommendNum
         from pc_post post
         left join pc_company company on post.CompanyID = company.CompanyID
@@ -46,7 +46,7 @@
         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`,
-        post.ProfessionID,pro.ProfessionName
+        post.ProfessionID,pro.ProfessionName,pro.parentProfessionID
         order by post.CreateTime desc
     </select>
     <select id="selectRecommendPostList" resultType="com.hz.employmentsite.vo.companyService.RecommendPostVo">

+ 113 - 41
src/main/resources/mapping/cquery/RecommendMgtCQuery.xml

@@ -15,11 +15,16 @@
         left join pc_jobuser e on d.JobUserID = e.JobuserID
         left join pc_profession f on b.ProfessionID = f.ProfessionID
         left join pc_profession f2 on d.ProfessionID = f2.ProfessionID
-        left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='RecommendType') dic1 on a.RecommendType = dic1.`Value`
-        left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='EntryState') dic2 on a.EntryState = dic2.`Value`
-        left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='IsRead') dic3 on a.PostIsRead = dic3.`Value`
-        left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='IsRead') dic4 on a.JobPeopleIsRead = dic4.`Value`
-        left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='Gender') dic5 on e.Sex = dic5.`Value`
+        left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='RecommendType') dic1 on
+        a.RecommendType = dic1.`Value`
+        left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='EntryState') dic2 on
+        a.EntryState = dic2.`Value`
+        left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='IsRead') dic3 on a.PostIsRead =
+        dic3.`Value`
+        left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='IsRead') dic4 on
+        a.JobPeopleIsRead = dic4.`Value`
+        left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='Gender') dic5 on e.Sex =
+        dic5.`Value`
         left join sys_user g on a.CreateUserID = g.UserID
         <where>
             <if test="recommendMgtID != '' and recommendMgtID != null">
@@ -46,8 +51,9 @@
         </where>
         order by a.createtime desc
     </select>
-<!--    推荐岗位信息-->
-    <select id="getRecommendCompanyPostList" resultType="com.hz.employmentsite.vo.jobUserManager.RecommendCompanyPostVo">
+    <!--    推荐岗位信息-->
+    <select id="getRecommendCompanyPostList"
+            resultType="com.hz.employmentsite.vo.jobUserManager.RecommendCompanyPostVo">
         select a.postid,b.companyname,c.professionname,a.recruitcount,a.starttime,a.endtime,b.companyAddress,
         case when d.recommendmgtid is null then '未推荐' else '已推荐' end as isRecommend,
         d.recommendMgtID,a.professionid,c.professionname,a.maxsalary,a.minsalary
@@ -56,87 +62,153 @@
         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>
+            <choose>
+                <when test="parentProfessionID!=null and parentProfessionID!=''">
+                    and c.ParentProfessionID = #{parentProfessionID}
+                </when>
+                <when test="professionID!=null and professionID!=''">
+                    and a.ProfessionID = #{professionID}
+                </when>
+                <otherwise>and 1=1</otherwise>
+            </choose>
+            <if test="companyName!=null and companyName!=''">
+                and b.CompanyName like Concat('%',#{companyName},'%')
+            </if>
+            <if test="cultureRank!=null and cultureRank!=''">
+                and a.CultureRank <![CDATA[>=]]> #{cultureRank}
+            </if>
+            <if test="workYear!=null">
+                <choose>
+                    <when test="workYear==1 or workYear==2">
+                        and a.WorkYear = 2
+                    </when>
+                    <when test="workYear==3 or workYear==4 or workYear==5">
+                        and a.WorkYear = 3
+                    </when>
+                    <when test="workYear>5">
+                        and a.WorkYear = 4
+                    </when>
+                    <otherwise>and 1=1</otherwise>
+                </choose>
+            </if>
+            <if test="minSalary!=null and minSalary!=''">
+                and a.MinSalary <![CDATA[<=]]> #{minSalary}
+            </if>
+            <if test="maxSalary!=null and maxSalary!=''">
+                and a.MaxSalary <![CDATA[>=]]> #{maxSalary}
+            </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,a.professionid,c.professionname
+        select a.jobhuntid,b.username,b.usermobile,e.sitename,dic1.`name` as culturerankname,dic2.`name` as
+        keypersontypename,a.workyear,a.minsalary,a.maxsalary,
+        case when d.recommendmgtid is null then '未推荐' else '已推荐' end as
+        isrecommend,d.recommendMgtID,a.professionid,c.professionname
         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 (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="userName!=null and userName!=''">
+                and b.UserName like Concat('%',#{userName},'%')
+            </if>
             <if test="keyPersonType!=null and keyPersonType!=''">
                 and b.KeyPersonTypeID = #{keyPersonType}
             </if>
-            <if test="cultureLeve!=null and cultureLeve!=''">
-                and b.CultureRank = #{cultureLeve}
-            </if>
+            <if test="cultureRank!=null and cultureRank!=''">
+                and b.CultureRank <![CDATA[>=]]> #{cultureRank}
+            </if>
+            <choose>
+                <when test="parentProfessionID!=null and parentProfessionID!=''">
+                    and c.ParentProfessionID = #{parentProfessionID}
+                </when>
+                <when test="professionID!=null and professionID!=''">
+                    and a.ProfessionID = #{professionID}
+                </when>
+                <otherwise>and 1=1</otherwise>
+            </choose>
+            <if test="workYear!=null and workYear!=''">
+                and a.WorkYear <![CDATA[<=]]> #{workYear}
+            </if>
+        <choose>
+            <when test="minSalary!=null and maxSalary!=null">
+                and a.MinSalary <![CDATA[<=]]> #{maxSalary} and a.MaxSalary <![CDATA[>=]]> #{minSalary}
+            </when>
+            <when test="minSalary!=null and minSalary!=''">
+                and a.MinSalary <![CDATA[>=]]> #{minSalary}
+            </when>
+            <when test="maxSalary!=null and maxSalary!=''">
+                and a.MaxSalary <![CDATA[<=]]> #{maxSalary}
+            </when>
+            <otherwise>and 1=1</otherwise>
+        </choose>
         </where>
         order by a.CreateTime desc
     </select>
     <select id="getProfessionLevelList" resultType="com.hz.employmentsite.vo.jobUserManager.ProfessionLevel">
-        select ProfessionID,ParentProfessionID,ProfessionName,'1' as ProfessionLevel from pc_profession where ParentProfessionID = ''
+        select ProfessionID, ParentProfessionID, ProfessionName, '1' as ProfessionLevel
+        from pc_profession
+        where ParentProfessionID = ''
         union all
-        select a.ProfessionID,a.ParentProfessionID,a.ProfessionName,'2' as ProfessionLevel
+        select a.ProfessionID, a.ParentProfessionID, a.ProfessionName, '2' as ProfessionLevel
         from pc_profession a
-        inner join (select ProfessionID from pc_profession where ParentProfessionID = '' ) b on a.ParentProfessionID=b.ProfessionID
+                 inner join (select ProfessionID from pc_profession where ParentProfessionID = '') b
+                            on a.ParentProfessionID = b.ProfessionID
         union all
-        select c.ProfessionID,c.ParentProfessionID,c.ProfessionName,'3' as ProfessionLevel
+        select c.ProfessionID, c.ParentProfessionID, c.ProfessionName, '3' as ProfessionLevel
         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
+                 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
     </select>
     <select id="getCompanypostToUsermessageList" resultType="java.util.HashMap">
-        select a.recommendmgtid,e.openId as userOpenId,
-               c.companyname,c.usermobile as companymobile,b.postName
+        select a.recommendmgtid,
+               e.openId     as userOpenId,
+               c.companyname,
+               c.usermobile as companymobile,
+               b.postName
         from pc_recommend_mgt a
                  inner join pc_post b on a.PostID = b.PostID
                  inner join pc_company c on b.CompanyID = c.CompanyID
                  inner join pc_jobhunt d on a.JobHuntID = d.JobHuntID
                  inner join pc_jobuser e on d.JobUserID = e.JobuserID
-        where (a.isSendUser = 0 || a.isSendUser is null) and e.openId is not null
+        where (a.isSendUser = 0 || a.isSendUser is null)
+          and e.openId is not null
     </select>
     <select id="getUserhuntpostToCompanymessageList" resultType="java.util.HashMap">
-        select a.recommendmgtid,c.openId as companyOpenId,
-               e.`name` as userName,e.usermobile,d.workName as userHuntPostName
+        select a.recommendmgtid,
+               c.openId   as companyOpenId,
+               e.`name`   as userName,
+               e.usermobile,
+               d.workName as userHuntPostName
         from pc_recommend_mgt a
                  inner join pc_post b on a.PostID = b.PostID
                  inner join pc_company c on b.CompanyID = c.CompanyID
                  inner join pc_jobhunt d on a.JobHuntID = d.JobHuntID
                  inner join pc_jobuser e on d.JobUserID = e.JobuserID
-        where (a.isSendCompany = 0 || a.isSendCompany is null) and c.openId is not null
+        where (a.isSendCompany = 0 || a.isSendCompany is null)
+          and c.openId is not null
     </select>
 
 </mapper>

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

@@ -183,7 +183,7 @@ export default defineComponent({
       {
         title: '序号',
         align: "center",
-        key: 'institutionID',
+        key: 'postID',
         width: 90,
         customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`
       },
@@ -243,11 +243,11 @@ export default defineComponent({
     };
 
     const onRecommendJob = (item) =>{
-      recommendRef.value.show(item.professionID,item.professionName,item.postID,item.companyName,0,'推荐求职人员');
+      recommendRef.value.show(item.professionID,item.parentProfessionID,item.professionName,item.postID,item.companyName,0,'推荐求职人员');
     }
 
     const onRecommendInfo = (item) =>{
-      recommendRef.value.show(item.professionID,item.professionName,item.postID,item.companyName,1,'求职人员信息');
+      recommendRef.value.show(item.professionID,item.parentProfessionID,item.professionName,item.postID,item.companyName,1,'求职人员信息');
     }
 
     const handleTableChange: TableProps['onChange'] = (pag: { pageSize: number; current: number },) => {

+ 86 - 20
vue/src/views/companyService/post/recommend.vue

@@ -1,6 +1,6 @@
 <template>
   <a-modal
-    :width="1300"
+    :width="1400"
     v-model:visible="visible"
     :title="title"
     :confirm-loading="confirmLoading"
@@ -29,7 +29,15 @@
                        placeholder=""/>
             </a-form-item>
           </a-col>
-          <a-col :span="7"></a-col>
+          <a-col :span="6" style="text-align: center;">
+            <a-form-item label="" :label-col="{ span: 4 }" name="checkParentProfessionID">
+              <a-checkbox
+                v-model:checked="searchParams.checkParentProfessionID"
+                @change="onSearch">
+                相关行业
+              </a-checkbox>
+            </a-form-item>
+          </a-col>
           <a-col :span="5" style="text-align: left">
             <a-button type="primary" html-type="submit" @click="onSearch">查询</a-button>
             <a-button
@@ -38,7 +46,14 @@
               () => {
                 searchParams.pageIndex = 1;
                 searchParams.pageSize = 10;
-                searchParams.companyName = null;
+                searchParams.userName= '';
+                searchParams.keyPersonType= null;
+                searchParams.parentProfessionID= '';
+                searchParams.checkParentProfessionID= false;
+                searchParams.cultureRank= null;
+                searchParams.workYear= null;
+                searchParams.minSalary= null;
+                searchParams.maxSalary= null;
                 loadData();
               }
             ">重置
@@ -61,35 +76,50 @@
             </a-form-item>
           </a-col>
           <a-col :span="6">
-            <a-form-item label="学历选择" :label-col="{span:6}" name="cultureLevel">
+            <a-form-item label="文化程度" :label-col="{span:8}" name="cultureRank">
               <a-select
                 ref="select"
-                v-model:value="searchParams.cultureLevel"
+                v-model:value="searchParams.cultureRank"
                 :options="cultureLevelList"
                 :field-names="{ label: 'name', value: 'value' }"
                 :allow-clear="true"
-                @change="loadData"
+                @change="onSearch"
               >
               </a-select>
             </a-form-item>
           </a-col>
           <a-col :span="6">
-            <a-form-item label="重点人员类别" :label-col="{span:6}" name="cultureLevel">
+            <a-form-item label="重点人员类别" :label-col="{span:8}" name="cultureLevel">
               <a-select
                 ref="select"
                 v-model:value="searchParams.keyPersonType"
                 :options="keyPersonTypeList"
                 :field-names="{ label: 'name', value: 'value' }"
                 :allow-clear="true"
-                @change="loadData"
+                @change="onSearch"
               >
               </a-select>
             </a-form-item>
           </a-col>
         </a-row>
+        <a-row :gutter="24" v-show="expand">
+          <a-col :span="6">
+            <a-form-item label="工作年限" :label-col="{ span: 8 }" name="workYear">
+              <a-input v-model:value="searchParams.workYear" placeholder=""/>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <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-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" v-if="searchParams.type===0" functioncode="T01030202" @click='onBatchRecommend()'>批量推荐
+            <a-button type="primary" html-type="submit" v-if="searchParams.type===0" functioncode="T01030202"
+                      @click='onBatchRecommend()'>批量推荐
             </a-button>
           </a-col>
         </a-row>
@@ -128,19 +158,24 @@ export default defineComponent({
     const visible = ref<boolean>(false);
     const confirmLoading = ref<boolean>(false);
     const formRef = ref<FormInstance>();
-    const expand = ref(true);
+    const expand = ref(false);
     const title = ref<string>('');
     const searchParams = reactive({
       pageIndex: 1,
       pageSize: 10,
+      companyName: '',
+      professionName: null,
+      type: null,
       postID: null,
       userName: '',
-      companyName: '',
       professionID: '',
-      professionName: null,
-      cultureLeve: null,
       keyPersonType: null,
-      type: null
+      parentProfessionID: '',
+      checkParentProfessionID: false,
+      cultureRank: null,
+      workYear: null,
+      minSalary: null,
+      maxSalary: null
     });
     const formState = reactive({
       total: 0,
@@ -149,6 +184,7 @@ export default defineComponent({
     });
     const cultureLevelList = ref<SelectProps['options']>();
     const keyPersonTypeList = ref<SelectProps['options']>();
+    const parentProfessionID = ref<string>('');
 
     const columns: TableColumnsType = [
       {
@@ -159,11 +195,20 @@ export default defineComponent({
         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: '求职岗位', dataIndex: 'professionName', key: 'professionName', align: "center",},
+      {title: '求职人员姓名', dataIndex: 'userName', key: 'userName', align: "center",},
+      {title: '联系电话', dataIndex: 'userMobile', key: 'userMobile', align: "center",},
+      {title: '所属驿站', dataIndex: 'siteName', key: 'siteName', align: "center",},
+      {title: '工作年限', dataIndex: 'workYear', key: 'workYear', align: "center",},
+      {
+        title: '薪资要求', dataIndex: 'salary', key: 'salary', align: "center",
+        customRender: (item) => {
+          const salary = showSalary(item.record.minSalary, item.record.maxSalary);
+          return salary;
+        }
+      },
+      {title: '文化程度', dataIndex: 'culturerankName', key: 'culturerankName', align: "center",},
+      {title: '重点人员类别', dataIndex: 'keypersontypeName', key: 'keypersontypeName', align: "center",},
       {title: '操作', key: 'operation', width: 60, align: 'center'},
     ];
     const pagination = computed(() => ({
@@ -191,6 +236,7 @@ export default defineComponent({
     };
 
     const onSearch = () => {
+      searchParams.parentProfessionID = searchParams.checkParentProfessionID ? parentProfessionID.value : '';
       loadData();
     }
 
@@ -202,9 +248,26 @@ export default defineComponent({
       formState.loading = false;
     };
 
-    const show = (professionID: any, professionName: any, postID: any, companyName: any, type: any, titleName: string) => {
+    const showSalary = (minSalary: any, maxSalary: any) => {
+      if (minSalary != null) {
+        if (maxSalary != null) {
+          return minSalary.toString() + "-" + maxSalary.toString();
+        } else {
+          return "≥" + minSalary.toString();
+        }
+      } else {
+        if (maxSalary != null) {
+          return "≤" + maxSalary.toString();
+        } else {
+          return "";
+        }
+      }
+    }
+
+    const show = (professionID: any, parentID: any, professionName: any, postID: any, companyName: any, type: any, titleName: string) => {
       visible.value = true;
       title.value = titleName;
+      parentProfessionID.value = parentID;
       searchParams.postID = postID;
       searchParams.companyName = companyName;
       searchParams.professionID = professionID;
@@ -284,6 +347,7 @@ export default defineComponent({
       keyPersonTypeList,
       show,
       onSearch,
+      showSalary,
       onRecommend,
       onBatchRecommend,
       onSelectChange,
@@ -296,6 +360,8 @@ export default defineComponent({
     };
   },
   created() {
+    this.getCultureLevelList();
+    this.getKeyPersonTypeList();
   }
 });
 </script>

+ 255 - 243
vue/src/views/jobUserManager/jobhunt/index.vue

@@ -9,19 +9,19 @@
       <a-row :gutter="24">
         <a-col :span="6">
           <a-form-item label="姓名" :label-col="{ span: 8 }" name="jobUserName">
-            <a-input v-model:value="searchParamsState.jobUserName" placeholder="" />
+            <a-input v-model:value="searchParamsState.jobUserName" 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="searchParamsState.professionName" placeholder="" />
+            <a-input v-model:value="searchParamsState.professionName" placeholder=""/>
           </a-form-item>
         </a-col>
         <a-col :span="8">
           <a-form-item label="工作年限" :label-col="{ span: 6 }" name="workYear">
-            <a-input type="number" v-model:value="searchParamsState.minWorkYear" style="width:110px;" placeholder="" />
+            <a-input type="number" v-model:value="searchParamsState.minWorkYear" style="width:110px;" placeholder=""/>
             <label style="margin:10px;">-</label>
-            <a-input type="number" v-model:value="searchParamsState.maxWorkYear" style="width:110px;" placeholder="" />
+            <a-input type="number" v-model:value="searchParamsState.maxWorkYear" style="width:110px;" placeholder=""/>
           </a-form-item>
         </a-col>
         <a-col :span="4" style="text-align: left">
@@ -37,27 +37,28 @@
                 formRef.resetFields();
                 loadData();
               }
-            ">重置</a-button>
+            ">重置
+          </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>
         </a-col>
       </a-row>
-      <a-row :gutter="24"  v-show="expand">
+      <a-row :gutter="24" v-show="expand">
         <a-col :span="6">
           <a-form-item label="求职类型" :label-col="{ span: 8 }" name="jobHuntTypeID">
             <a-select ref="select"
-              v-model:value="searchParamsState.jobHuntTypeID"
-              :options="jobHuntTypeList"
-              :field-names="{ label: 'name', value: 'value' }"
-              :allow-clear="true"
-              @change="loadData"
+                      v-model:value="searchParamsState.jobHuntTypeID"
+                      :options="jobHuntTypeList"
+                      :field-names="{ label: 'name', value: 'value' }"
+                      :allow-clear="true"
+                      @change="loadData"
             >
             </a-select>
           </a-form-item>
@@ -75,14 +76,14 @@
         </a-col>
         <a-col :span="8">
           <a-form-item label="月薪要求" :label-col="{ span: 6 }" name="salary">
-            <a-input type="number" v-model:value="searchParamsState.minSalary" style="width:110px;" placeholder="" />
+            <a-input type="number" v-model:value="searchParamsState.minSalary" style="width:110px;" placeholder=""/>
             <label style="margin:10px;">-</label>
-            <a-input type="number" v-model:value="searchParamsState.maxSalary" style="width:110px;" placeholder="" />
+            <a-input type="number" v-model:value="searchParamsState.maxSalary" style="width:110px;" placeholder=""/>
           </a-form-item>
         </a-col>
         <a-col :span="4" style="text-align: left"></a-col>
       </a-row>
-      <a-row :gutter="24"  v-show="expand">
+      <a-row :gutter="24" v-show="expand">
         <a-col :span="6">
           <a-form-item label="是否完成求职" :label-col="{ span: 8 }" name="isAccomplish">
             <a-select ref="select"
@@ -95,36 +96,40 @@
             </a-select>
           </a-form-item>
         </a-col>
-        <a-col :span="6"> </a-col>
-        <a-col :span="8"> </a-col>
-        <a-col :span="4" style="text-align: left"> </a-col>
+        <a-col :span="6"></a-col>
+        <a-col :span="8"></a-col>
+        <a-col :span="4" style="text-align: left"></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='onAdd' >新增</a-button>
+          <a-button type="primary" html-type="submit" functioncode="T01030202" @click='onAdd'>新增</a-button>
           <BImportExcel functioncode="T01030205"
-            :options="importOptions"
-            @success="loadData"
+                        :options="importOptions"
+                        @success="loadData"
           ></BImportExcel>
-          <BExportExcel :title="'导出'" :filename="'求职意向信息'" :url="'/jobUserService/jobHunt/export'" :params="{...searchParamsState, rows:100000,jobHuntIDList:formState.selectedRowKeys.join(',')}"></BExportExcel>
+          <BExportExcel :title="'导出'" :filename="'求职意向信息'" :url="'/jobUserService/jobHunt/export'"
+                        :params="{...searchParamsState, rows:100000,jobHuntIDList:formState.selectedRowKeys.join(',')}"></BExportExcel>
         </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.jobHuntID" bordered @change="handleTableChange" >
+      <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.jobHuntID" bordered @change="handleTableChange">
         <template #bodyCell="{ column, text, record }">
           <template v-if="column.key === 'recommendNum'">
             <div class="table-operation">
-              <a-button type="link" size="small" @click='onRecommendInfo(record)'>{{record.recommendNum}}</a-button>
+              <a-button type="link" size="small" @click='onRecommendInfo(record)'>{{ record.recommendNum }}</a-button>
             </div>
           </template>
           <template v-if="column.key === 'operation'">
             <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>
+              <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>
@@ -136,10 +141,10 @@
 
 <script lang="ts">
 import {reactive, ref, computed, defineComponent, createVNode} from 'vue';
-import type { FormInstance, TableColumnsType, TableProps, SelectProps } from 'ant-design-vue';
-import { getJobHuntList, delJobHunt} from '@/api/jobUserManager/jobhunt';
-import { getSysDictionaryList } from '@/api/system/dictionary';
-import { getPaginationTotalTitle } from '@/utils/common';
+import type {FormInstance, TableColumnsType, TableProps, SelectProps} from 'ant-design-vue';
+import {getJobHuntList, delJobHunt} from '@/api/jobUserManager/jobhunt';
+import {getSysDictionaryList} from '@/api/system/dictionary';
+import {getPaginationTotalTitle} from '@/utils/common';
 import dayjs from 'dayjs';
 import BImportExcel from "@/components/basic/excel/importExcel/importExcel.vue";
 import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
@@ -149,233 +154,240 @@ import type {ImportProps} from "@/components/basic/excel/importExcel/ImportProps
 import {useTabsViewStore} from "@/store/modules/tabsView";
 import Recommend from "@/views/jobUserManager/jobhunt/recommend.vue";
 
-  export default defineComponent({
-    name: 'JobHuntList',
-    components: {BImportExcel,BExportExcel,Recommend},
-    setup() {
-      const formRef = ref<FormInstance>();
-      const tabsViewStore = useTabsViewStore();
-      const expand = ref(false);
-      const recommendRef = ref();
-      const searchParamsState = reactive({
-        pageIndex: 1,
-        pageSize: 20,
-        jobUserName: null,
-        professionName:null,
-        minWorkYear: null,
-        maxWorkYear: null,
-        jobHuntTypeID: null,
-        jobUserTypeID:null,
-        minSalary:null,
-        maxSalary:null,
-        isAccomplish:null
-      });
-      const formState = reactive({
-        total: 0,
-        selectedRowKeys: [],
-        loading: false,
-      });
-      const columns: TableColumnsType = [
-        {
-          title: '序号',
-          align: 'center',
-          width: 80,
-          key: 'jobHuntID',
-          customRender: (item) =>
-            `${searchParamsState.pageSize * (searchParamsState.pageIndex - 1) + item.index + 1}`,
-        },
-        { title: '姓名', dataIndex: 'jobUserName', key: 'jobUserName', width: 100,align: "center", },
-        // { title: '工种名称', dataIndex: 'workName', key: 'workName', width: 150, align: "center", },
-        { title: '希望工作地区', dataIndex: 'areaWork', key: 'areaWork', width: 150, align: "center", },
-        { title: '可到职日期', dataIndex: 'inDate', key: 'inDate', width: 100, align: "center",
-          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: 'professionName', key: 'professionName', align: "center", },
-        { title: '人才类型', dataIndex: 'jobUserTypeStr', key: 'jobUserTypeStr' , align: "center",},
-        { title: '月薪要求', dataIndex: 'salary', key: 'salary' , align: "center",
-          customRender: (item) => {
-          const salary = showSalary(item.record.minSalary,item.record.maxSalary);
+export default defineComponent({
+  name: 'JobHuntList',
+  components: {BImportExcel, BExportExcel, Recommend},
+  setup() {
+    const formRef = ref<FormInstance>();
+    const tabsViewStore = useTabsViewStore();
+    const expand = ref(false);
+    const recommendRef = ref();
+    const searchParamsState = reactive({
+      pageIndex: 1,
+      pageSize: 20,
+      jobUserName: null,
+      professionName: null,
+      minWorkYear: null,
+      maxWorkYear: null,
+      jobHuntTypeID: null,
+      jobUserTypeID: null,
+      minSalary: null,
+      maxSalary: null,
+      isAccomplish: null
+    });
+    const formState = reactive({
+      total: 0,
+      selectedRowKeys: [],
+      loading: false,
+    });
+    const columns: TableColumnsType = [
+      {
+        title: '序号',
+        align: 'center',
+        width: 80,
+        key: 'jobHuntID',
+        customRender: (item) =>
+          `${searchParamsState.pageSize * (searchParamsState.pageIndex - 1) + item.index + 1}`,
+      },
+      {title: '姓名', dataIndex: 'jobUserName', key: 'jobUserName', width: 100, align: "center",},
+      // { title: '工种名称', dataIndex: 'workName', key: 'workName', width: 150, align: "center", },
+      {title: '希望工作地区', dataIndex: 'areaWork', key: 'areaWork', width: 150, align: "center",},
+      {
+        title: '可到职日期', dataIndex: 'inDate', key: 'inDate', width: 100, align: "center",
+        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: 'professionName', key: 'professionName', align: "center",},
+      {title: '人才类型', dataIndex: 'jobUserTypeStr', key: 'jobUserTypeStr', align: "center",},
+      {
+        title: '月薪要求', dataIndex: 'salary', key: 'salary', align: "center",
+        customRender: (item) => {
+          const salary = showSalary(item.record.minSalary, item.record.maxSalary);
           return salary;
-          }
-        },
-        {title: '推荐数量', key: 'recommendNum', align: "center"},
-        { title: '操作', key: 'operation', fixed: 'right', width: 170, align: "center"},
-      ];
-      const pagination = computed(() => ({
-        total: formState.total,
-        current: searchParamsState.pageIndex,
-        pageSize: searchParamsState.pageSize,
-        showSizeChanger: true,
-        showTotal: (total) => getPaginationTotalTitle(total),
-      }));
-      const importOptions = ref<ImportProps>({
-        title: '导入',
-        url: '/jobUserService/jobHunt/importJobHunt',
-        columns: [
-          {cnName: '姓名', enName: 'jobUserName', width: 100},
-          // {cnName: '工种名称', enName: 'workName', width: 100},
-          {cnName: '求职类型', enName: 'jobHuntType', width: 100},
-          {cnName: '人才类型', enName: 'jobUserType', width: 100},
-          {cnName: '最低月薪(元)', enName: 'minSalary', width: 100},
-          {cnName: '最高月薪(元)', enName: 'maxSalary', width: 100},
-          {cnName: '求职岗位', enName: 'professionName', width: 100},
-          {cnName: '希望工作地区', enName: 'areaWork', width: 100},
-          {cnName: '可到职日期', enName: 'inDate', width: 100},
-          {cnName: '工作年限', enName: 'workYear', width: 100},
-          {cnName: '其他要求', enName: 'otherDemand', width: 100},
-        ],
-        template: {
-          tempFileName: '求职意向导入模板.xlsx',
-          url: '',
-          params: null,
-        },
-      });
-      const dataList = ref([]);
-      const jobHuntTypeList = ref<SelectProps['options']>();
-      const jobUserTypeList = ref<SelectProps['options']>();
-      const isAccomplishList = ref<SelectProps['options']>();
-      const showSalary =(minSalary:any,maxSalary:any)=>{
-        if(minSalary!=null){
-          if(maxSalary!=null){
-            return minSalary.toString()+"-"+maxSalary.toString();
-          }else{
-            return "≥"+minSalary.toString();
-          }
-        }else{
-          if(maxSalary!=null){
-            return "≤"+maxSalary.toString();
-          }else{
-            return "";
-          }
+        }
+      },
+      {title: '推荐数量', key: 'recommendNum', align: "center"},
+      {title: '操作', key: 'operation', fixed: 'right', width: 170, align: "center"},
+    ];
+    const pagination = computed(() => ({
+      total: formState.total,
+      current: searchParamsState.pageIndex,
+      pageSize: searchParamsState.pageSize,
+      showSizeChanger: true,
+      showTotal: (total) => getPaginationTotalTitle(total),
+    }));
+    const importOptions = ref<ImportProps>({
+      title: '导入',
+      url: '/jobUserService/jobHunt/importJobHunt',
+      columns: [
+        {cnName: '姓名', enName: 'jobUserName', width: 100},
+        // {cnName: '工种名称', enName: 'workName', width: 100},
+        {cnName: '求职类型', enName: 'jobHuntType', width: 100},
+        {cnName: '人才类型', enName: 'jobUserType', width: 100},
+        {cnName: '最低月薪(元)', enName: 'minSalary', width: 100},
+        {cnName: '最高月薪(元)', enName: 'maxSalary', width: 100},
+        {cnName: '求职岗位', enName: 'professionName', width: 100},
+        {cnName: '希望工作地区', enName: 'areaWork', width: 100},
+        {cnName: '可到职日期', enName: 'inDate', width: 100},
+        {cnName: '工作年限', enName: 'workYear', width: 100},
+        {cnName: '其他要求', enName: 'otherDemand', width: 100},
+      ],
+      template: {
+        tempFileName: '求职意向导入模板.xlsx',
+        url: '',
+        params: null,
+      },
+    });
+    const dataList = ref([]);
+    const jobHuntTypeList = ref<SelectProps['options']>();
+    const jobUserTypeList = ref<SelectProps['options']>();
+    const isAccomplishList = ref<SelectProps['options']>();
+    const showSalary = (minSalary: any, maxSalary: any) => {
+      if (minSalary != null) {
+        if (maxSalary != null) {
+          return minSalary.toString() + "-" + maxSalary.toString();
+        } else {
+          return "≥" + minSalary.toString();
+        }
+      } else {
+        if (maxSalary != null) {
+          return "≤" + maxSalary.toString();
+        } else {
+          return "";
         }
       }
-      const onSelectChange = (selectedRowKeys: any) => {
-        formState.selectedRowKeys = selectedRowKeys;
-      };
+    }
+    const onSelectChange = (selectedRowKeys: any) => {
+      formState.selectedRowKeys = selectedRowKeys;
+    };
 
-      const handleTableChange: TableProps['onChange'] = (pag: {
-        pageSize: number;
-        current: number;
-      }) => {
-        searchParamsState.pageIndex = pag.current;
-        searchParamsState.pageSize = pag.pageSize;
-        loadData();
-      };
+    const handleTableChange: TableProps['onChange'] = (pag: {
+      pageSize: number;
+      current: number;
+    }) => {
+      searchParamsState.pageIndex = pag.current;
+      searchParamsState.pageSize = pag.pageSize;
+      loadData();
+    };
 
-      const onSearch = () => {
-        loadData();
-      }
+    const onSearch = () => {
+      loadData();
+    }
 
-      const onDel= (item: any) => {
-        if (item) {
-          formState.selectedRowKeys.push(item.jobHuntID as never)
-        }
+    const onDel = (item: any) => {
+      if (item) {
+        formState.selectedRowKeys.push(item.jobHuntID as never)
+      }
 
-        if (formState.selectedRowKeys.length <= 0) {
-          message.warning('请选择需要删除的数据!');
-          return false;
-        }
+      if (formState.selectedRowKeys.length <= 0) {
+        message.warning('请选择需要删除的数据!');
+        return false;
+      }
 
-        Modal.confirm({
-          title: '确认删除选中的驿站站点?',
-          icon: createVNode(ExclamationCircleOutlined),
-          content: '',
-          okText: '确认删除',
-          okType: 'danger',
-          okButtonProps: {},
-          cancelText: '取消',
-          onOk() {
-            delJobHunt(formState.selectedRowKeys).then(() => {
-              loadData();
-            });
-          },
-          onCancel() {
+      Modal.confirm({
+        title: '确认删除选中的驿站站点?',
+        icon: createVNode(ExclamationCircleOutlined),
+        content: '',
+        okText: '确认删除',
+        okType: 'danger',
+        okButtonProps: {},
+        cancelText: '取消',
+        onOk() {
+          delJobHunt(formState.selectedRowKeys).then(() => {
+            loadData();
+          });
+        },
+        onCancel() {
 
-          },
-        });
-      };
+        },
+      });
+    };
 
-      const loadData = async function () {
-        formState.loading = true;
-        getJobHuntTypeList();
-        getJobUserTypeList();
-        getIsAccomplishList();
-        const result: any = await getJobHuntList(searchParamsState);
-        dataList.value = result.list;
-        formState.total = result.total;
-        formState.loading = false;
-      };
+    const loadData = async function () {
+      formState.loading = true;
+      getJobHuntTypeList();
+      getJobUserTypeList();
+      getIsAccomplishList();
+      const result: any = await getJobHuntList(searchParamsState);
+      dataList.value = result.list;
+      formState.total = result.total;
+      formState.loading = false;
+    };
 
-      const onAdd =()=>{
-        tabsViewStore.addTabByPath('/jobusermgr/jobhunt/add', {id:null});
-      };
+    const onAdd = () => {
+      tabsViewStore.addTabByPath('/jobusermgr/jobhunt/add', {id: null});
+    };
 
-      const onEdit = (id: string) => {
-        tabsViewStore.addTabByPath('/jobusermgr/jobhunt/edit', {id:id});
-      };
+    const onEdit = (id: string) => {
+      tabsViewStore.addTabByPath('/jobusermgr/jobhunt/edit', {id: id});
+    };
 
-      const onRecommendCompanyPost = (item) =>{
-        recommendRef.value.show(item.professionID,item.professionName,item.jobHuntID,item.jobUserName,0,"推荐求职人员");
-      }
+    const onRecommendCompanyPost = (item) => {
+      recommendRef.value.show(item.professionID, item.professionName, item.jobHuntID, item.jobUserName, 0,
+        item.parentProfessionID, item.cultureRank, item.workYear, item.minSalary, item.maxSalary,
+        "推荐求职人员");
+    }
 
-      const onRecommendInfo = (item) =>{
-        recommendRef.value.show(item.professionID,item.professionName,item.jobHuntID,item.jobUserName,1,'求职人员信息');
-      }
+    const onRecommendInfo = (item) => {
+      recommendRef.value.show(item.professionID, item.professionName, item.jobHuntID, item.jobUserName, 1,
+        item.parentProfessionID, item.cultureRank, item.workYear, item.minSalary, item.maxSalary,
+        '求职人员信息');
+    }
 
-      const getJobHuntTypeList = () => {
-        getSysDictionaryList('JobHuntType').then((data) => {
-          jobHuntTypeList.value = data;
-        });
-      };
+    const getJobHuntTypeList = () => {
+      getSysDictionaryList('JobHuntType').then((data) => {
+        jobHuntTypeList.value = data;
+      });
+    };
 
-      const getJobUserTypeList = () => {
-        getSysDictionaryList('JobUserType').then((data) => {
-          jobUserTypeList.value = data;
-        });
-      };
+    const getJobUserTypeList = () => {
+      getSysDictionaryList('JobUserType').then((data) => {
+        jobUserTypeList.value = data;
+      });
+    };
 
-      const getIsAccomplishList = () => {
-        getSysDictionaryList('ContractRecord').then((data) => {
-          isAccomplishList.value = data;
-        });
-      };
+    const getIsAccomplishList = () => {
+      getSysDictionaryList('ContractRecord').then((data) => {
+        isAccomplishList.value = data;
+      });
+    };
 
-      return {
-        formRef,
-        expand,
-        searchParamsState,
-        formState,
-        columns,
-        pagination,
-        dataList,
-        importOptions,
-        jobHuntTypeList,
-        jobUserTypeList,
-        isAccomplishList,
-        recommendRef,
-        showSalary,
-        loadData,
-        onSearch,
-        onAdd,
-        onEdit,
-        onDel,
-        onRecommendCompanyPost,
-        onRecommendInfo,
-        onSelectChange,
-        handleTableChange,
-        getJobHuntTypeList,
-        getJobUserTypeList,
-        getIsAccomplishList,
-      };
-    },
-    created() {
-      this.loadData();
-    },
-    activated() {
-      if (history.state.params?.reload) this.loadData();
-    },
-  });
+    return {
+      formRef,
+      expand,
+      searchParamsState,
+      formState,
+      columns,
+      pagination,
+      dataList,
+      importOptions,
+      jobHuntTypeList,
+      jobUserTypeList,
+      isAccomplishList,
+      recommendRef,
+      showSalary,
+      loadData,
+      onSearch,
+      onAdd,
+      onEdit,
+      onDel,
+      onRecommendCompanyPost,
+      onRecommendInfo,
+      onSelectChange,
+      handleTableChange,
+      getJobHuntTypeList,
+      getJobUserTypeList,
+      getIsAccomplishList,
+    };
+  },
+  created() {
+    this.loadData();
+  },
+  activated() {
+    if (history.state.params?.reload) this.loadData();
+  },
+});
 </script>
 
 <style lang="less" scoped></style>

+ 94 - 10
vue/src/views/jobUserManager/jobhunt/recommend.vue

@@ -43,6 +43,11 @@
                 searchParams.pageIndex = 1;
                 searchParams.pageSize = 10;
                 searchParams.companyName = null;
+                searchParams.parentProfessionID= '';
+                searchParams.cultureRank= null;
+                searchParams.workYear= null;
+                searchParams.minSalary= null;
+                searchParams.maxSalary= null;
                 loadData();
               }
             ">重置
@@ -58,9 +63,25 @@
             <!--          </a>-->
           </a-col>
         </a-row>
+        <a-row :gutter="24">
+          <a-col :span="16">
+            <a-form-item label="推荐岗位筛选:" :label-col="{ span: 4 }" name="recommendPostWhere">
+              <!--              <div :style="{ borderBottom: '1px solid #E9E9E9' }">-->
+              <!--              <a-checkbox-->
+              <!--                v-model:checked="checkAll"-->
+              <!--                :indeterminate="indeterminate"-->
+              <!--                @change="onCheckAllChange">-->
+              <!--                全选-->
+              <!--              </a-checkbox>-->
+              <!--            </div>-->
+              <a-checkbox-group v-model:value="checkRecommendPostWhereList" :options="recommendPostWhereList"/>
+            </a-form-item>
+          </a-col>
+        </a-row>
         <a-row class="edit-operation">
           <a-col :span="24" style="text-align: right">
-            <a-button type="primary" v-if="searchParams.type===0" html-type="submit" functioncode="T01030202" @click='onBatchRecommend()'>批量推荐
+            <a-button type="primary" v-if="searchParams.type===0" html-type="submit" functioncode="T01030202"
+                      @click='onBatchRecommend()'>批量推荐
             </a-button>
           </a-col>
         </a-row>
@@ -84,12 +105,13 @@
 </template>
 
 <script lang="ts">
-import {reactive, ref, computed, defineComponent} from 'vue';
+import {reactive, ref, computed, defineComponent, toRefs, watch} from 'vue';
 import type {FormInstance, TableColumnsType, TableProps} from 'ant-design-vue';
 import {getRecommendCompanyPostList, addRecommend} from '@/api/jobUserManager/recommendMgt';
 import {getPaginationTotalTitle} from '@/utils/common';
 import dayjs from 'dayjs';
 import {message} from "ant-design-vue";
+import {getSysDictionaryList} from '@/api/system/dictionary';
 
 export default defineComponent({
   name: 'RecommendCompanyPostList',
@@ -99,21 +121,41 @@ export default defineComponent({
     const formRef = ref<FormInstance>();
     const expand = ref(false);
     const title = ref<string>();
+    const dataList = ref([]);
+    const addRecommendList = ref([] as any);
+    const recommendPostWhereList = ref([] as any);
+
     const searchParams = reactive({
       pageIndex: 1,
       pageSize: 10,
       jobUserName: null,
+      professionName: null,
+      type: 0,
       jobHuntID: '',
-      professionID: '',
       companyName: null,
-      professionName: null,
-      type: 0
+      professionID: '',
+      parentProfessionID: '',
+      cultureRank: null,
+      workYear: null,
+      minSalary: null,
+      maxSalary: null
     });
     const formState = reactive({
       total: 0,
       selectedRowKeys: [],
       loading: false,
     });
+    const state = reactive({
+      indeterminate: true,
+      checkAll: false,
+      checkRecommendPostWhereList: [1],
+      professionID: '',
+      parentProfessionID: '',
+      cultureRank: null,
+      workYear: null,
+      minSalary: null,
+      maxSalary: null
+    });
     const columns: TableColumnsType = [
       {
         title: '序号',
@@ -144,9 +186,6 @@ export default defineComponent({
       showSizeChanger: true,
       showTotal: (total) => getPaginationTotalTitle(total),
     }));
-    const dataList = ref([]);
-    const addRecommendList = ref([] as any);
-
     const onSelectChange = (selectedRowKeys: any) => {
       formState.selectedRowKeys = selectedRowKeys;
     };
@@ -161,6 +200,17 @@ export default defineComponent({
     };
 
     const onSearch = () => {
+      searchParams.professionID = state.checkRecommendPostWhereList.findIndex(x => x == 1) >= 0 ? state.professionID : "";
+      searchParams.cultureRank = state.checkRecommendPostWhereList.findIndex(x => x == 2) >= 0 ? state.cultureRank : null;
+      searchParams.workYear = state.checkRecommendPostWhereList.findIndex(x => x == 3) >= 0 ? state.workYear : null;
+      if (state.checkRecommendPostWhereList.findIndex(x => x == 4) >= 0) {
+        searchParams.minSalary = state.minSalary;
+        searchParams.maxSalary = state.maxSalary;
+      } else {
+        searchParams.minSalary = null;
+        searchParams.maxSalary = null;
+      }
+      searchParams.parentProfessionID = state.checkRecommendPostWhereList.findIndex(x => x == 5) >= 0 ? state.parentProfessionID : "";
       loadData();
     }
 
@@ -172,13 +222,36 @@ export default defineComponent({
       formState.loading = false;
     };
 
-    const show = (professionID: any, professionName: any, jobHuntID: any, jobUserName: any, type: any, titleName: string) => {
+    const onCheckAllChange = (e: any) => {
+      Object.assign(state, {
+        checkRecommendPostWhereList: e.target.checked ? recommendPostWhereList.value.map(x => x.value) : [],
+        indeterminate: false,
+      });
+    };
+    watch(
+      () => state.checkRecommendPostWhereList,
+      val => {
+        state.indeterminate = !!val.length && val.length < recommendPostWhereList.value.length;
+        state.checkAll = val.length === recommendPostWhereList.value.length;
+      },
+    );
+
+    const show = (professionID: any, professionName: any, jobHuntID: any, jobUserName: any, type: any,
+                  parentProfessionID: any, cultureRank: any, workYear: any, minSalary: any, maxSalary: any,
+                  titleName: string) => {
       visible.value = true;
       searchParams.jobHuntID = jobHuntID;
       searchParams.jobUserName = jobUserName;
       searchParams.professionID = professionID;
       searchParams.professionName = professionName;
       searchParams.type = type;
+      state.professionID = professionID;
+      state.parentProfessionID = parentProfessionID;
+      state.cultureRank = cultureRank;
+      state.workYear = workYear;
+      state.workYear = workYear;
+      state.minSalary = minSalary;
+      state.maxSalary = maxSalary;
       title.value = titleName;
       loadData();
     }
@@ -218,6 +291,12 @@ export default defineComponent({
       });
     };
 
+    const getRecommendPostWhereList = () => {
+      getSysDictionaryList('RecommendPostWhere').then((data) => {
+        recommendPostWhereList.value = data.map((x: any) => ({label: x.name, value: x.value}));
+      });
+    };
+
     const handleOk = () => {
       visible.value = false;
     };
@@ -233,22 +312,27 @@ export default defineComponent({
       formRef,
       expand,
       searchParams,
+      ...toRefs(state),
       formState,
       columns,
       pagination,
       dataList,
+      recommendPostWhereList,
       show,
       onSearch,
+      onCheckAllChange,
       onRecommend,
       onBatchRecommend,
       onSelectChange,
       handleTableChange,
       loadData,
+      getRecommendPostWhereList,
       handleOk,
       handleCancel
     };
   },
-  created() {
+  mounted() {
+    this.getRecommendPostWhereList();
   }
 });
 </script>