Browse Source

解决求职人员服务管理模块bug

lizeyu 10 months ago
parent
commit
2ef049d607

+ 7 - 3
src/main/java/com/hz/employmentsite/controller/jobUserManager/JobHuntController.java

@@ -6,6 +6,7 @@ import com.hz.employmentsite.filter.exception.BaseResponse;
 import com.hz.employmentsite.filter.exception.RespGenerstor;
 import com.hz.employmentsite.services.service.AccountService;
 import com.hz.employmentsite.services.service.jobUserManager.JobHuntService;
+import com.hz.employmentsite.util.DateUtils;
 import com.hz.employmentsite.util.ExcelHelper;
 import com.hz.employmentsite.vo.jobUserManager.JobHuntVo;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -27,13 +28,16 @@ public class JobHuntController {
     @Autowired
     private ExcelHelper excelHelper;
 
+    @Autowired
+    private DateUtils dataUtils;
+
     @ResponseBody
     @GetMapping("/getList")
     public BaseResponse getList(@RequestParam("pageIndex") int pageIndex, @RequestParam("pageSize") int pageSize,
                                     @RequestParam(required = false) List<String> jobHuntIDList,
                                     @RequestParam(required = false) String jobUserID,
                                     @RequestParam(required = false) String jobUserName,
-                                    @RequestParam(required = false) String workName,
+                                    @RequestParam(required = false) String professionName,
                                     @RequestParam(required = false) Integer minWorkYear,
                                     @RequestParam(required = false) Integer maxWorkYear,
                                     @RequestParam(required = false) Integer jobHuntTypeID,
@@ -42,7 +46,7 @@ public class JobHuntController {
                                     @RequestParam(required = false) BigDecimal maxSalary,
                                     @RequestParam(required = false) Integer isAccomplish) {
 
-        PageInfo<JobHuntVo> result = jobhuntService.getList(pageIndex, pageSize,jobHuntIDList,jobUserID,jobUserName,workName,minWorkYear, maxWorkYear, jobHuntTypeID, jobUserTypeID, minSalary, maxSalary, isAccomplish);
+        PageInfo<JobHuntVo> result = jobhuntService.getList(pageIndex, pageSize,jobHuntIDList,jobUserID,jobUserName,professionName,minWorkYear, maxWorkYear, jobHuntTypeID, jobUserTypeID, minSalary, maxSalary, isAccomplish);
         return RespGenerstor.success(result);
     }
 
@@ -99,7 +103,7 @@ public class JobHuntController {
             row.add(item.jobUserName);
             row.add(item.workName);
             row.add(item.areaWork);
-            row.add(item.inDate);
+            row.add(dataUtils.dateToStrFormat(item.inDate,"yyyy-MM-dd"));
             row.add(item.workYear);
             row.add(item.jobHuntTypeStr);
             row.add(item.jobUserTypeStr);

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

@@ -29,9 +29,9 @@ public class RecommendMgtController {
     public BaseResponse getList(@RequestParam("page") int pageIndex, @RequestParam("limit") int pageSize,
                                 @RequestParam(required = false) String name, @RequestParam(required = false) String companyName,
                                 @RequestParam(required = false) Integer recommendType, @RequestParam(required = false) Integer entryState,
-                                @RequestParam(required = false) String pushName, @RequestParam(required = false) String professionID) {
+                                @RequestParam(required = false) String pushName, @RequestParam(required = false) String professionName) {
 
-        PageInfo<RecommendMgtVo> result = recommendMgtService.getList(pageIndex, pageSize, name, companyName, recommendType, entryState, pushName, professionID);
+        PageInfo<RecommendMgtVo> result = recommendMgtService.getList(pageIndex, pageSize, name, companyName, recommendType, entryState, pushName, professionName);
         return RespGenerstor.success(result);
     }
 

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

@@ -7,7 +7,7 @@ import java.util.List;
 
 public interface JobHuntCQuery {
     List<JobHuntVo> getJobHuntList(@Param("jobHuntIDList") String jobHuntIDList,@Param("jobUserID") String jobUserID,
-                                      @Param("jobUserName") String jobUserName,@Param("workName") String workName,
+                                      @Param("jobUserName") String jobUserName,@Param("professionName") String professionName,
                                       @Param("minWorkYear")Integer minWorkYear,@Param("maxWorkYear")Integer maxWorkYear,
                                       @Param("jobHuntTypeID")Integer jobHuntTypeID, @Param("jobUserTypeID")Integer jobUserTypeID,
                                       @Param("minSalary")BigDecimal minSalary, @Param("maxSalary")BigDecimal maxSalary,

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

@@ -14,7 +14,7 @@ public interface RecommendMgtCQuery {
                                              @Param("recommendType") Integer recommendType,
                                              @Param("entryState") Integer entryState,
                                              @Param("pushName") String pushName,
-                                             @Param("professionID") String professionID);
+                                             @Param("professionName") String professionName);
 
     /**
      * 获取推荐企业信息

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

@@ -43,11 +43,11 @@ public class JobHuntServiceImpl implements JobHuntService {
     private StringUtils stringUtils;
 
     @Override
-    public PageInfo<JobHuntVo> getList(Integer pageIndex, Integer pageSize, List<String> jobHuntIDList,String jobUserID, String jobUserName, String workName,
+    public PageInfo<JobHuntVo> getList(Integer pageIndex, Integer pageSize, List<String> jobHuntIDList,String jobUserID, String jobUserName, String professionName,
                                        Integer minWorkYear, Integer maxWorkYear, Integer jobHuntTypeID, Integer jobUserTypeID,
                                        BigDecimal minSalary, BigDecimal maxSalary, Integer isAccomplish) {
         PageHelper.startPage(pageIndex, pageSize);
-        List<JobHuntVo> list = jobhuntCQuery.getJobHuntList(stringUtils.ListToInSql(jobHuntIDList),jobUserID,jobUserName,workName,minWorkYear, maxWorkYear, jobHuntTypeID, jobUserTypeID, minSalary, maxSalary, isAccomplish);
+        List<JobHuntVo> list = jobhuntCQuery.getJobHuntList(stringUtils.ListToInSql(jobHuntIDList),jobUserID,jobUserName,professionName,minWorkYear, maxWorkYear, jobHuntTypeID, jobUserTypeID, minSalary, maxSalary, isAccomplish);
 
         PageInfo<JobHuntVo> result = new PageInfo(list);
 
@@ -149,8 +149,8 @@ public class JobHuntServiceImpl implements JobHuntService {
                 if (item.jobUserID == null)
                     errorInfo += "求职人员不存在!";
             }
-            if (stringUtils.IsNullOrEmpty(item.workName))
-                errorInfo += "请填写工种名称!";
+//            if (stringUtils.IsNullOrEmpty(item.workName))
+//                errorInfo += "请填写工种名称!";
 
             if (stringUtils.IsNullOrEmpty(item.jobHuntTypeStr))
                 errorInfo += "请填写求职类型!";

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

@@ -159,7 +159,29 @@ public class JobUserServiceImpl implements JobUserService {
     @Override
     public int save(JobUserVo data, String userId) {
         int result = 0;
+
         PcJobuser dbData = pcJobuserMapper.selectByPrimaryKey(data.getJobUserID());
+        PcJobuserExample emp = new PcJobuserExample();
+        PcJobuserExample.Criteria cir = emp.or();
+        //验证身份证是否已经录入
+        if (dbData != null){
+            cir.andJobuserIDNotEqualTo(data.getJobUserID());
+        }
+        cir.andIdentityNumberEqualTo(data.getIdentityNumber());
+        if(pcJobuserMapper.selectByExample(emp).size()>0){
+            throw new BaseException("500","该身份证号已绑定其他人员");
+        }
+
+        //验证联系电话是否已经录入
+        cir = emp.or();
+        if (dbData != null){
+            cir.andJobuserIDNotEqualTo(data.getJobUserID());
+        }
+        cir.andUserMobileEqualTo(data.getUserMobile());
+        if(pcJobuserMapper.selectByExample(emp).size()>0){
+            throw new BaseException("500","该联系电话已绑定其他人员");
+        }
+
         if (dbData == null) {
             dbData = new PcJobuser();
             dbData.setJobuserID(data.getJobUserID());

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

@@ -27,10 +27,10 @@ public class RecommendMgtServiceImpl implements RecommendMgtService {
     private StringUtils stringUtils;
 
     @Override
-    public PageInfo<RecommendMgtVo> getList(Integer page, Integer rows, String name, String companyName, Integer recommendType, Integer entryState, String pushName, String professionID) {
+    public PageInfo<RecommendMgtVo> getList(Integer page, Integer rows, String name, String companyName, Integer recommendType, Integer entryState, String pushName, String professionName) {
         PageHelper.startPage(page, rows);
 
-        List<RecommendMgtVo> list = recommendMgtCQuery.getRecommendMgtList(name, companyName, recommendType, entryState, pushName, professionID);
+        List<RecommendMgtVo> list = recommendMgtCQuery.getRecommendMgtList(name, companyName, recommendType, entryState, pushName, professionName);
 
         PageInfo<RecommendMgtVo> result = new PageInfo(list);
 

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

@@ -7,7 +7,7 @@ import java.util.List;
 
 public interface JobHuntService {
 
-    PageInfo<JobHuntVo> getList(Integer pageIndex, Integer pageSize,List<String> jobHuntIDList, String jobUserID, String jobUserName, String workName,
+    PageInfo<JobHuntVo> getList(Integer pageIndex, Integer pageSize,List<String> jobHuntIDList, String jobUserID, String jobUserName, String professionName,
                                 Integer minWorkYear, Integer maxWorkYear, Integer jobHuntTypeID, Integer jobUserTypeID,
                                 BigDecimal minSalary, BigDecimal maxSalary, Integer isAccomplish);
 

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

@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import java.util.List;
 
 public interface RecommendMgtService {
-    PageInfo<RecommendMgtVo> getList(Integer page, Integer rows, String name, String companyName, Integer recommendType, Integer entryState, String pushName, String professionId);
+    PageInfo<RecommendMgtVo> getList(Integer page, Integer rows, String name, String companyName, Integer recommendType, Integer entryState, String pushName, String professionName);
 
     /**
      * 修改入职状态

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

@@ -13,7 +13,7 @@
         left join (select * from sys_dictionary_item where DictionaryCode ='JobHuntType') dic_huntJobType on jobHunt.JobHuntType = dic_huntJobType.value
         where 1=1
         <if test="jobHuntIDList != '' and jobHuntIDList != null">
-            and jobHuntId in (${jobHuntIDList})
+            and jobHunt.JobHuntID in (${jobHuntIDList})
         </if>
         <if test="jobUserID != '' and jobUserID != null">
             and jobHunt.jobUserID = #{jobUserID}
@@ -21,8 +21,8 @@
         <if test="jobUserName != '' and jobUserName != null">
             and jobUser.name like Concat('%',#{jobUserName},'%')
         </if>
-        <if test="workName != '' and workName != null">
-            and jobHunt.workName like Concat('%',#{workName},'%')
+        <if test="professionName != '' and professionName != null">
+            and profession.ProfessionName like Concat('%',#{professionName},'%')
         </if>
         <if test="minWorkYear != '' and minWorkYear != null">
             and jobHunt.workYear <![CDATA[ >= ]]> #{minWorkYear}

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

@@ -35,8 +35,8 @@
             <if test="pushName != '' and pushName != null">
                 and g.Name like Concat('%',#{pushName},'%')
             </if>
-            <if test="professionID != '' and professionID != null">
-                and b.ProfessionID = #{professionID}
+            <if test="professionName != '' and professionName != null">
+                and f.ProfessionName like Concat('%',#{professionName},'%')
             </if>
         </where>
         order by a.createtime desc

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

@@ -13,8 +13,8 @@
           </a-form-item>
         </a-col>
         <a-col :span="6">
-          <a-form-item label="工种名称" :label-col="{ span: 8 }" name="workName">
-            <a-input v-model:value="searchParamsState.workName" placeholder="" />
+          <a-form-item label="求职岗位" :label-col="{ span: 8 }" name="professionName">
+            <a-input v-model:value="searchParamsState.professionName" placeholder="" />
           </a-form-item>
         </a-col>
         <a-col :span="8">
@@ -161,7 +161,7 @@ import Recommend from "@/views/jobUserManager/jobhunt/recommend.vue";
         pageIndex: 1,
         pageSize: 20,
         jobUserName: null,
-        workName:null,
+        professionName:null,
         minWorkYear: null,
         maxWorkYear: null,
         jobHuntTypeID: null,
@@ -185,7 +185,7 @@ import Recommend from "@/views/jobUserManager/jobhunt/recommend.vue";
             `${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: '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'), },
@@ -214,7 +214,7 @@ import Recommend from "@/views/jobUserManager/jobhunt/recommend.vue";
         url: '/jobUserService/jobHunt/importJobHunt',
         columns: [
           {cnName: '姓名', enName: 'jobUserName', width: 100},
-          {cnName: '工种名称', enName: 'workName', width: 100},
+          // {cnName: '工种名称', enName: 'workName', width: 100},
           {cnName: '求职类型', enName: 'jobHuntType', width: 100},
           {cnName: '人才类型', enName: 'jobUserType', width: 100},
           {cnName: '最低月薪(元)', enName: 'minSalary', width: 100},

+ 3 - 3
vue/src/views/jobUserManager/recommendMgt/index.vue

@@ -73,8 +73,8 @@
           </a-form-item>
         </a-col>
         <a-col :span="6">
-          <a-form-item label="岗位" :label-col="{ span: 8 }" name="professionId">
-            <a-input v-model:value="searchParamsState.professionId" placeholder=""/>
+          <a-form-item label="岗位" :label-col="{ span: 8 }" name="professionName">
+            <a-input v-model:value="searchParamsState.professionName" placeholder=""/>
           </a-form-item>
         </a-col>
       </a-row>
@@ -135,7 +135,7 @@ export default defineComponent({
       recommendType: null,
       entryState: null,
       pushName: '',
-      professionId: null
+      professionName: ''
     });
     const formState = reactive({
       total: 0,