Browse Source

Merge branch 'master' of http://39.98.153.250:9080/bowintek/EmploymentSite

pengjing 1 year ago
parent
commit
7071285961

+ 6 - 0
src/main/java/com/hz/employmentsite/controller/jobUserManager/ProfessionController.java

@@ -29,4 +29,10 @@ public class ProfessionController {
         return RespGenerstor.success(professionService.getListByParentProfessionID(parentProfessionID));
     }
 
+    @ResponseBody
+    @GetMapping("/getParentProfessionID")
+    public BaseResponse<String> getParentProfessionID(@RequestParam("professionID") String professionID) {
+        return RespGenerstor.success(professionService.getParentProfessionID(professionID));
+    }
+
 }

+ 5 - 5
src/main/java/com/hz/employmentsite/model/PcJobhunt.java

@@ -8,7 +8,7 @@ public class PcJobhunt {
 
     private String jobUserID;
 
-    private String postID;
+    private String professionID;
 
     private String workCode;
 
@@ -54,12 +54,12 @@ public class PcJobhunt {
         this.jobUserID = jobUserID == null ? null : jobUserID.trim();
     }
 
-    public String getPostID() {
-        return postID;
+    public String getProfessionID() {
+        return professionID;
     }
 
-    public void setPostID(String postID) {
-        this.postID = postID == null ? null : postID.trim();
+    public void setProfessionID(String professionID) {
+        this.professionID = professionID == null ? null : professionID.trim();
     }
 
     public String getWorkCode() {

+ 28 - 28
src/main/java/com/hz/employmentsite/model/PcJobhuntExample.java

@@ -246,73 +246,73 @@ public class PcJobhuntExample {
             return (Criteria) this;
         }
 
-        public Criteria andPostIDIsNull() {
-            addCriterion("PostID is null");
+        public Criteria andProfessionIDIsNull() {
+            addCriterion("ProfessionID is null");
             return (Criteria) this;
         }
 
-        public Criteria andPostIDIsNotNull() {
-            addCriterion("PostID is not null");
+        public Criteria andProfessionIDIsNotNull() {
+            addCriterion("ProfessionID is not null");
             return (Criteria) this;
         }
 
-        public Criteria andPostIDEqualTo(String value) {
-            addCriterion("PostID =", value, "postID");
+        public Criteria andProfessionIDEqualTo(String value) {
+            addCriterion("ProfessionID =", value, "professionID");
             return (Criteria) this;
         }
 
-        public Criteria andPostIDNotEqualTo(String value) {
-            addCriterion("PostID <>", value, "postID");
+        public Criteria andProfessionIDNotEqualTo(String value) {
+            addCriterion("ProfessionID <>", value, "professionID");
             return (Criteria) this;
         }
 
-        public Criteria andPostIDGreaterThan(String value) {
-            addCriterion("PostID >", value, "postID");
+        public Criteria andProfessionIDGreaterThan(String value) {
+            addCriterion("ProfessionID >", value, "professionID");
             return (Criteria) this;
         }
 
-        public Criteria andPostIDGreaterThanOrEqualTo(String value) {
-            addCriterion("PostID >=", value, "postID");
+        public Criteria andProfessionIDGreaterThanOrEqualTo(String value) {
+            addCriterion("ProfessionID >=", value, "professionID");
             return (Criteria) this;
         }
 
-        public Criteria andPostIDLessThan(String value) {
-            addCriterion("PostID <", value, "postID");
+        public Criteria andProfessionIDLessThan(String value) {
+            addCriterion("ProfessionID <", value, "professionID");
             return (Criteria) this;
         }
 
-        public Criteria andPostIDLessThanOrEqualTo(String value) {
-            addCriterion("PostID <=", value, "postID");
+        public Criteria andProfessionIDLessThanOrEqualTo(String value) {
+            addCriterion("ProfessionID <=", value, "professionID");
             return (Criteria) this;
         }
 
-        public Criteria andPostIDLike(String value) {
-            addCriterion("PostID like", value, "postID");
+        public Criteria andProfessionIDLike(String value) {
+            addCriterion("ProfessionID like", value, "professionID");
             return (Criteria) this;
         }
 
-        public Criteria andPostIDNotLike(String value) {
-            addCriterion("PostID not like", value, "postID");
+        public Criteria andProfessionIDNotLike(String value) {
+            addCriterion("ProfessionID not like", value, "professionID");
             return (Criteria) this;
         }
 
-        public Criteria andPostIDIn(List<String> values) {
-            addCriterion("PostID in", values, "postID");
+        public Criteria andProfessionIDIn(List<String> values) {
+            addCriterion("ProfessionID in", values, "professionID");
             return (Criteria) this;
         }
 
-        public Criteria andPostIDNotIn(List<String> values) {
-            addCriterion("PostID not in", values, "postID");
+        public Criteria andProfessionIDNotIn(List<String> values) {
+            addCriterion("ProfessionID not in", values, "professionID");
             return (Criteria) this;
         }
 
-        public Criteria andPostIDBetween(String value1, String value2) {
-            addCriterion("PostID between", value1, value2, "postID");
+        public Criteria andProfessionIDBetween(String value1, String value2) {
+            addCriterion("ProfessionID between", value1, value2, "professionID");
             return (Criteria) this;
         }
 
-        public Criteria andPostIDNotBetween(String value1, String value2) {
-            addCriterion("PostID not between", value1, value2, "postID");
+        public Criteria andProfessionIDNotBetween(String value1, String value2) {
+            addCriterion("ProfessionID not between", value1, value2, "professionID");
             return (Criteria) this;
         }
 

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

@@ -5,7 +5,7 @@ import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.filter.exception.BaseException;
 import com.hz.employmentsite.mapper.PcJobhuntMapper;
 import com.hz.employmentsite.mapper.PcJobuserMapper;
-import com.hz.employmentsite.mapper.PcPostMapper;
+import com.hz.employmentsite.mapper.PcProfessionMapper;
 import com.hz.employmentsite.mapper.cquery.JobHuntCQuery;
 import com.hz.employmentsite.model.*;
 import com.hz.employmentsite.services.service.jobUserManager.JobHuntService;
@@ -34,7 +34,7 @@ public class JobHuntServiceImpl implements JobHuntService {
     private PcJobuserMapper pcJobuserMapper;
 
     @Autowired
-    private PcPostMapper pcPostMapper;
+    private PcProfessionMapper pcProfessionMapper;
 
     @Autowired
     private DictionaryService dictionaryService;
@@ -86,7 +86,7 @@ public class JobHuntServiceImpl implements JobHuntService {
             dbData = new PcJobhunt();
             dbData.setJobHuntID(data.getJobHuntID());
             dbData.setJobUserID(data.getJobUserID());
-            dbData.setPostID(data.getPostID());
+            dbData.setProfessionID(data.getProfessionID());
             dbData.setWorkCode(data.getWorkCode());
             dbData.setWorkName(data.getWorkName());
             dbData.setAreaWork(data.getAreaWork());
@@ -104,7 +104,7 @@ public class JobHuntServiceImpl implements JobHuntService {
             //修改
             dbData.setJobHuntID(data.jobHuntID);
             dbData.setJobUserID(data.jobUserID);
-            dbData.setPostID(data.postID);
+            dbData.setProfessionID(data.professionID);
             dbData.setWorkCode(data.workCode);
             dbData.setWorkName(data.workName);
             dbData.setAreaWork(data.areaWork);
@@ -132,9 +132,9 @@ public class JobHuntServiceImpl implements JobHuntService {
         jobuserExample.or().andNameIsNotNull();
         List<PcJobuser> jobUserList = pcJobuserMapper.selectByExample(jobuserExample);
         //求职岗位
-        PcPostExample postExample = new PcPostExample();
-        postExample.or().andPostNameIsNotNull();
-        List<PcPost> postList = pcPostMapper.selectByExample(postExample);
+        PcProfessionExample professionExample = new PcProfessionExample();
+        professionExample.or().andProfessionNameIsNotNull();
+        List<PcProfession> professionList = pcProfessionMapper.selectByExample(professionExample);
         //求职类型
         List<SysDictionaryItem> dicHuntTypeList = dictionaryService.getDictionaryItemList("JobHuntType");
         //人才类型
@@ -179,10 +179,10 @@ public class JobHuntServiceImpl implements JobHuntService {
             if (stringUtils.IsNullOrEmpty(item.postName))
                 errorInfo += "请填写岗位名称!";
             else {
-                item.postID = postList.stream().filter(it -> it.getPostName().equals(item.getPostName().trim()))
-                        .findFirst().orElse(new PcPost()).getPostID();
-                if (item.postID == null)
-                    errorInfo += "岗位不存在!";
+                item.professionID = professionList.stream().filter(it -> it.getProfessionName().equals(item.getPostName().trim()))
+                        .findFirst().orElse(new PcProfession()).getProfessionID();
+                if (item.professionID == null)
+                    errorInfo += "求职岗位不存在!";
             }
             if (stringUtils.IsNullOrEmpty(item.areaWork))
                 errorInfo += "请填写希望工作地区!";

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

@@ -100,14 +100,14 @@ public class JobUserServiceImpl implements JobUserService {
         PcJobhuntExample.Criteria huntCro = huntExp.or();
         huntCro.andJobUserIDEqualTo(jobuserID);
         List<PcJobhunt> jobHuntList = pcJobhuntMapper.selectByExample(huntExp);
-        List<String> postIDList = new ArrayList<>();
+        List<String> professionIDList = new ArrayList<>();
         if (jobHuntList.size()>0){
             jobHuntList.stream().forEach(item->{
-                postIDList.add(item.getPostID());
+                professionIDList.add(item.getProfessionID());
             });
             PcPostExample postExp = new PcPostExample();
             PcPostExample.Criteria postCro = postExp.or();
-            postCro.andPostIDIn(postIDList);
+            postCro.andPostIDIn(professionIDList);
             List<PcPost> curPostList = pcPostMapper.selectByExample(postExp);
             return curPostList;
         }else{

+ 7 - 0
src/main/java/com/hz/employmentsite/services/impl/jobUserManager/ProfessionServiceImpl.java

@@ -49,5 +49,12 @@ public class ProfessionServiceImpl implements ProfessionService {
         return list;
     }
 
+    @Override
+    public String getParentProfessionID(String professionID){
+        PcProfessionExample professionExp = new PcProfessionExample();
+        professionExp.or().andProfessionIDEqualTo(professionID);
+        var curProfession= pcProfessionMapper.selectByExample(professionExp).get(0);
+        return  curProfession.getParentProfessionID();
+    };
 
 }

+ 2 - 0
src/main/java/com/hz/employmentsite/services/service/jobUserManager/ProfessionService.java

@@ -8,4 +8,6 @@ public interface ProfessionService {
     List<SysDictionaryItem> getList();
 
     List<SysDictionaryItem> getListByParentProfessionID(String professionID);
+
+    String getParentProfessionID(String professionID);
 }

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

@@ -11,8 +11,9 @@ public class JobHuntVo {
     @JobHuntID
     public String jobHuntID;
     public String jobUserID;
-    public String postID;
     public String jobUserName;
+    public String professionID;
+    public String professionName;
     public String workCode;
     public String workName;
     public String areaWork;

+ 17 - 16
src/main/resources/mapping/PcJobhuntMapper.xml

@@ -4,7 +4,7 @@
   <resultMap id="BaseResultMap" type="com.hz.employmentsite.model.PcJobhunt">
     <id column="JobHuntID" jdbcType="VARCHAR" property="jobHuntID" />
     <result column="JobUserID" jdbcType="VARCHAR" property="jobUserID" />
-    <result column="PostID" jdbcType="VARCHAR" property="postID" />
+    <result column="ProfessionID" jdbcType="VARCHAR" property="professionID" />
     <result column="WorkCode" jdbcType="VARCHAR" property="workCode" />
     <result column="WorkName" jdbcType="VARCHAR" property="workName" />
     <result column="AreaWork" jdbcType="VARCHAR" property="areaWork" />
@@ -79,9 +79,9 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    JobHuntID, JobUserID, PostID, WorkCode, WorkName, AreaWork, InDate, WorkYear, JobHuntType, 
-    JobUserType, MinSalary, MaxSalary, CreateUserID, CreateTime, ModifyUserID, ModifyTime, 
-    OtherDemand
+    JobHuntID, JobUserID, ProfessionID, WorkCode, WorkName, AreaWork, InDate, WorkYear, 
+    JobHuntType, JobUserType, MinSalary, MaxSalary, CreateUserID, CreateTime, ModifyUserID, 
+    ModifyTime, OtherDemand
   </sql>
   <select id="selectByExample" parameterType="com.hz.employmentsite.model.PcJobhuntExample" resultMap="BaseResultMap">
     select
@@ -114,13 +114,13 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.hz.employmentsite.model.PcJobhunt">
-    insert into pc_jobhunt (JobHuntID, JobUserID, PostID, 
+    insert into pc_jobhunt (JobHuntID, JobUserID, ProfessionID, 
       WorkCode, WorkName, AreaWork, 
       InDate, WorkYear, JobHuntType, 
       JobUserType, MinSalary, MaxSalary, 
       CreateUserID, CreateTime, ModifyUserID, 
       ModifyTime, OtherDemand)
-    values (#{jobHuntID,jdbcType=VARCHAR}, #{jobUserID,jdbcType=VARCHAR}, #{postID,jdbcType=VARCHAR}, 
+    values (#{jobHuntID,jdbcType=VARCHAR}, #{jobUserID,jdbcType=VARCHAR}, #{professionID,jdbcType=VARCHAR}, 
       #{workCode,jdbcType=VARCHAR}, #{workName,jdbcType=VARCHAR}, #{areaWork,jdbcType=VARCHAR}, 
       #{inDate,jdbcType=TIMESTAMP}, #{workYear,jdbcType=INTEGER}, #{jobHuntType,jdbcType=INTEGER}, 
       #{jobUserType,jdbcType=INTEGER}, #{minSalary,jdbcType=DECIMAL}, #{maxSalary,jdbcType=DECIMAL}, 
@@ -136,8 +136,8 @@
       <if test="jobUserID != null">
         JobUserID,
       </if>
-      <if test="postID != null">
-        PostID,
+      <if test="professionID != null">
+        ProfessionID,
       </if>
       <if test="workCode != null">
         WorkCode,
@@ -189,8 +189,8 @@
       <if test="jobUserID != null">
         #{jobUserID,jdbcType=VARCHAR},
       </if>
-      <if test="postID != null">
-        #{postID,jdbcType=VARCHAR},
+      <if test="professionID != null">
+        #{professionID,jdbcType=VARCHAR},
       </if>
       <if test="workCode != null">
         #{workCode,jdbcType=VARCHAR},
@@ -251,8 +251,8 @@
       <if test="row.jobUserID != null">
         JobUserID = #{row.jobUserID,jdbcType=VARCHAR},
       </if>
-      <if test="row.postID != null">
-        PostID = #{row.postID,jdbcType=VARCHAR},
+      <if test="row.professionID != null">
+        ProfessionID = #{row.professionID,jdbcType=VARCHAR},
       </if>
       <if test="row.workCode != null">
         WorkCode = #{row.workCode,jdbcType=VARCHAR},
@@ -305,7 +305,7 @@
     update pc_jobhunt
     set JobHuntID = #{row.jobHuntID,jdbcType=VARCHAR},
       JobUserID = #{row.jobUserID,jdbcType=VARCHAR},
-      PostID = #{row.postID,jdbcType=VARCHAR},
+      ProfessionID = #{row.professionID,jdbcType=VARCHAR},
       WorkCode = #{row.workCode,jdbcType=VARCHAR},
       WorkName = #{row.workName,jdbcType=VARCHAR},
       AreaWork = #{row.areaWork,jdbcType=VARCHAR},
@@ -330,8 +330,8 @@
       <if test="jobUserID != null">
         JobUserID = #{jobUserID,jdbcType=VARCHAR},
       </if>
-      <if test="postID != null">
-        PostID = #{postID,jdbcType=VARCHAR},
+      <if test="professionID != null">
+        ProfessionID = #{professionID,jdbcType=VARCHAR},
       </if>
       <if test="workCode != null">
         WorkCode = #{workCode,jdbcType=VARCHAR},
@@ -381,7 +381,7 @@
   <update id="updateByPrimaryKey" parameterType="com.hz.employmentsite.model.PcJobhunt">
     update pc_jobhunt
     set JobUserID = #{jobUserID,jdbcType=VARCHAR},
-      PostID = #{postID,jdbcType=VARCHAR},
+      ProfessionID = #{professionID,jdbcType=VARCHAR},
       WorkCode = #{workCode,jdbcType=VARCHAR},
       WorkName = #{workName,jdbcType=VARCHAR},
       AreaWork = #{areaWork,jdbcType=VARCHAR},
@@ -398,4 +398,5 @@
       OtherDemand = #{otherDemand,jdbcType=VARCHAR}
     where JobHuntID = #{jobHuntID,jdbcType=VARCHAR}
   </update>
+
 </mapper>

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

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

+ 28 - 11
vue/src/views/jobUserManager/jobhunt/edit.vue

@@ -1,6 +1,6 @@
 <template>
-  <div class="card-edit">
-    <a-form :model="dataModel" autocomplete="off" @finish="onFinish">
+  <div class="card-edit" :visible="formState.loading">
+    <a-form :model="dataModel" autocomplete="off" @finish="onFinish" >
       <a-divider orientation="left">求职意向信息</a-divider>
       <a-row type="flex">
         <a-col :span="7">
@@ -55,7 +55,7 @@
           </a-form-item>
         </a-col>
         <a-col :span="9">
-          <a-form-item label="求职岗位"  name="thirdProfessionID" :label-col="{span:7}" :rules="[{ required: true,message:'请继续选择求职岗位!' }]">
+          <a-form-item label="求职岗位"  name="professionID" :label-col="{span:7}" :rules="[{ required: true,message:'请继续选择求职岗位!' }]">
             <label v-if="opCategory==3">{{dataModel.postID}}</label>
             <a-select v-if="curLevel==1" ref="select" show-search optionFilterProp="label"  style="width: 230px"
                       name="firstProfessionID" v-model:value="dataModel.firstProfessionID" @change="professionChange(1)" >
@@ -72,7 +72,7 @@
               </a-select-option>
             </a-select>
             <a-select v-if="curLevel==3" ref="select" show-search optionFilterProp="label" style="width: 230px"
-                      name="thirdProfessionID"  v-model:value="dataModel.thirdProfessionID" @change="professionChange(3)" >
+                      name="professionID"  v-model:value="dataModel.professionID" @change="professionChange(3)" >
               <a-select-option v-for="item in thirdProfessionList" :label="item.name" :value="item.code"
                                :key="item.code">
                 <span>{{ item.name }}</span>
@@ -174,7 +174,7 @@ export default defineComponent({
       /*console.log('allPostResult',allPostResult.list);*/
       const professionResult :any = await get("profession/getFirstProfessionList",null);
       firstProfessionList.value = professionResult;
-      console.log('firstProfessionList',professionResult);
+      //console.log('firstProfessionList',professionResult);
     }
 
     const getJobUserList = async function() {
@@ -200,6 +200,7 @@ export default defineComponent({
     }
 
     const loadData = (id: string) => {
+      formState.loading = true;
       curLevel.value = 1;
       getWorkAreas();
       getAllPostList();
@@ -208,8 +209,25 @@ export default defineComponent({
       getJobWorkTypeList();
       getJobHuntByID(id).then((result: any) => {
         formData.dataModel = result;
-        // console.log('dataModel',formData.dataModel);
+        if(formData.dataModel.professionID != null){
+          curLevel.value = 3;
+          get("profession/getParentProfessionID", {professionID:formData.dataModel.professionID}).then(data=>{
+            formData.dataModel.secondProfessionID = data;
+            get("profession/getListByParentProfessionID", {parentProfessionID:formData.dataModel.secondProfessionID}).then(data=>{
+              thirdProfessionList.value = data;
+              console.log("thirdProfessionList",thirdProfessionList.value);
+            });
+            get("profession/getParentProfessionID", {professionID:formData.dataModel.secondProfessionID}).then(data=>{
+              formData.dataModel.firstProfessionID = data;
+              get("profession/getListByParentProfessionID", {parentProfessionID:formData.dataModel.firstProfessionID}).then(data=>{
+                secondProfessionList.value = data;
+                console.log("secondProfessionList",secondProfessionList.value);
+              });
+            });
+          });
+        }
       });
+      formState.loading = false;
     };
 
     const onClose = (reload: any) => {
@@ -244,17 +262,16 @@ export default defineComponent({
         get("profession/getListByParentProfessionID", {parentProfessionID:formData.dataModel.firstProfessionID}).then(data=>{
           secondProfessionList.value = data;
           formData.dataModel.secondProfessionID = null;
-          formData.dataModel.thirdProfessionID = null;
+          formData.dataModel.professionID = null;
         });
       }else if(index==2){
         get("profession/getListByParentProfessionID", {parentProfessionID:formData.dataModel.secondProfessionID}).then(data=>{
           thirdProfessionList.value = data;
-          formData.dataModel.thirdProfessionID = null;
+          formData.dataModel.professionID = null;
         });
       }
-      if(index==3){
-        formData.dataModel.postID = formData.dataModel.thirdProfessionID;
-      }else{
+      if(index!=3)
+      {
         curLevel.value = index+1;
       }
     }

+ 1 - 1
vue/src/views/jobUserManager/jobhunt/index.vue

@@ -182,7 +182,7 @@ import {useTabsViewStore} from "@/store/modules/tabsView";
           customRender: ({ record }) => record.inDate == null?"":dayjs(record.inDate).format('YYYY-MM-DD'), },
         { title: '工作年限', dataIndex: 'workYear', key: 'workYear' , align: "center",},
         { title: '求职类型', dataIndex: 'jobHuntTypeStr', key: 'jobHuntTypeStr', align: "center", },
-        { title: '求职岗位', dataIndex: 'postName', key: 'postName', align: "center", },
+        { title: '求职岗位', dataIndex: 'professionName', key: 'professionName', align: "center", },
         { title: '人才类型', dataIndex: 'jobUserTypeStr', key: 'jobUserTypeStr' , align: "center",},
         { title: '月薪要求', dataIndex: 'salary', key: 'salary' , align: "center",
           customRender: (item) => {