Ver Fonte

招聘信息显示未查看数量角标
求职信息显示未查看数量角标

yanliming há 2 anos atrás
pai
commit
7ef88bf8b3
15 ficheiros alterados com 179 adições e 1 exclusões
  1. 1 0
      common/src/main/java/com/jpsoft/employment/modules/base/dao/JobEnterpriseRelationDAO.java
  2. 2 0
      common/src/main/java/com/jpsoft/employment/modules/base/dao/RecruitPersonRelationDAO.java
  3. 5 0
      common/src/main/java/com/jpsoft/employment/modules/base/entity/JobEnterpriseRelation.java
  4. 17 0
      common/src/main/java/com/jpsoft/employment/modules/base/entity/JobInformationInfo.java
  5. 4 0
      common/src/main/java/com/jpsoft/employment/modules/base/entity/RecruitInformationInfo.java
  6. 1 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/JobEnterpriseRelationService.java
  7. 2 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/RecruitPersonRelationService.java
  8. 6 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/impl/JobEnterpriseRelationServiceImpl.java
  9. 6 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/impl/RecruitPersonRelationServiceImpl.java
  10. 6 0
      common/src/main/resources/mapper/base/JobEnterpriseRelation.xml
  11. 6 0
      common/src/main/resources/mapper/base/RecruitPersonRelation.xml
  12. 26 1
      web/src/main/java/com/jpsoft/employment/modules/base/controller/JobEnterpriseRelationController.java
  13. 9 0
      web/src/main/java/com/jpsoft/employment/modules/base/controller/JobInformationInfoController.java
  14. 8 0
      web/src/main/java/com/jpsoft/employment/modules/base/controller/RecruitInformationInfoController.java
  15. 80 0
      web/src/main/java/com/jpsoft/employment/modules/base/controller/RecruitPersonRelationController.java

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/JobEnterpriseRelationDAO.java

@@ -18,5 +18,6 @@ public interface JobEnterpriseRelationDAO {
 	List<JobEnterpriseRelation> searchMobile(Map<String, Object> searchParams, List<Sort> sortList);
 
 	List<JobEnterpriseRelation> findByEnterpriseId(String enterpriseId);
+	Integer countByJobInformationId(String jobInformationId);
 	JobEnterpriseRelation findByEnterpriseIdAndJobInformationId(String enterpriseId,String jobInformationId);
 }

+ 2 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/RecruitPersonRelationDAO.java

@@ -19,4 +19,6 @@ public interface RecruitPersonRelationDAO {
 	RecruitPersonRelation findByRecruitIdAndPersonId(String recruitId,String personId);
 
 	List<RecruitPersonRelation> findByPersonId(String personId);
+
+	Integer isReadCountByRecruit(String recruitId);
 }

+ 5 - 0
common/src/main/java/com/jpsoft/employment/modules/base/entity/JobEnterpriseRelation.java

@@ -73,4 +73,9 @@ public class JobEnterpriseRelation {
 	@Transient
 	@ApiModelProperty(value = "受邀人信息")
 	private PersonInfo workPersonInfo;
+
+	@Transient
+	@ApiModelProperty(value = "招聘企业岗位")
+	private String recruitPositionName;
+
 }

+ 17 - 0
common/src/main/java/com/jpsoft/employment/modules/base/entity/JobInformationInfo.java

@@ -82,6 +82,10 @@ public class JobInformationInfo {
 	@ApiModelProperty(value = "真实姓名")
 	private String personName;
 
+	@Transient
+	@ApiModelProperty(value = "手机号码")
+	private String personPhone;
+
 	@Transient
 	@ApiModelProperty(value = "意向行业翻译")
 	private String intendedIndustriesN;
@@ -112,10 +116,23 @@ public class JobInformationInfo {
 	@ApiModelProperty(value = "年龄")
 	private Integer age;
 
+	@Transient
+	@ApiModelProperty(value = "是否已读")
+	private Boolean isRead;
+
+	@Transient
+	@ApiModelProperty(value = "是否已读状态是否修改")
+	private Boolean isReadStatus;
+
 	@Transient
 	@ApiModelProperty(value = "性别")
 	private String gender;
 
 	@ApiModelProperty(value = "居住地")
 	private String address;
+
+	@Transient
+	@ApiModelProperty(value = "是否已读数量")
+	private Integer isReadNumber;
+
 }

+ 4 - 0
common/src/main/java/com/jpsoft/employment/modules/base/entity/RecruitInformationInfo.java

@@ -97,4 +97,8 @@ public class RecruitInformationInfo {
 	@Transient
 	@ApiModelProperty(value = "结算方式翻译")
 	private String settlementMethodN;
+
+	@Transient
+	@ApiModelProperty(value = "未读数量")
+	private Integer isReadNumber;
 }

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/JobEnterpriseRelationService.java

@@ -17,4 +17,5 @@ public interface JobEnterpriseRelationService {
 	Page<JobEnterpriseRelation> pageSearchMobile(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
 	List<JobEnterpriseRelation> findByEnterpriseId(String enterpriseId);
 	JobEnterpriseRelation findByEnterpriseIdAndJobInformationId(String enterpriseId,String jobInformationId);
+	Integer countByJobInformationId(String jobInformationId);
 }

+ 2 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/RecruitPersonRelationService.java

@@ -18,4 +18,6 @@ public interface RecruitPersonRelationService {
 	RecruitPersonRelation findByRecruitIdAndPersonId(String recruitId,String personId);
 
 	List<RecruitPersonRelation> findByPersonId(String personId);
+
+	Integer isReadCountByRecruit(String recruitId);
 }

+ 6 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/JobEnterpriseRelationServiceImpl.java

@@ -86,4 +86,10 @@ public class JobEnterpriseRelationServiceImpl implements JobEnterpriseRelationSe
 	public JobEnterpriseRelation findByEnterpriseIdAndJobInformationId(String enterpriseId,String jobInformationId){
 		return jobEnterpriseRelationDAO.findByEnterpriseIdAndJobInformationId(enterpriseId,jobInformationId);
 	}
+
+
+	@Override
+	public Integer countByJobInformationId(String jobInformationId){
+		return jobEnterpriseRelationDAO.countByJobInformationId(jobInformationId);
+	}
 }

+ 6 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/RecruitPersonRelationServiceImpl.java

@@ -86,4 +86,10 @@ public class RecruitPersonRelationServiceImpl implements RecruitPersonRelationSe
 	public List<RecruitPersonRelation> findByPersonId(String personId){
 		return recruitPersonRelationDAO.findByPersonId(personId);
 	}
+
+
+	@Override
+	public Integer isReadCountByRecruit(String recruitId){
+		return recruitPersonRelationDAO.isReadCountByRecruit(recruitId);
+	}
 }

+ 6 - 0
common/src/main/resources/mapper/base/JobEnterpriseRelation.xml

@@ -134,6 +134,12 @@
 	<select id="findByEnterpriseId" resultMap="JobEnterpriseRelationMap">
 		select * from base_job_enterprise_relation where del_flag = 0 and enterprise_id = #{enterpriseId}
 	</select>
+	<select id="countByJobInformationId" resultType="java.lang.Integer">
+		select count(*) from base_job_enterprise_relation
+		where del_flag = 0
+		and job_information_id = #{jobInformationId}
+		and is_read=false
+	</select>
 	<select id="findByEnterpriseIdAndJobInformationId" resultMap="JobEnterpriseRelationMap">
 		select * from base_job_enterprise_relation where del_flag = 0 and enterprise_id = #{enterpriseId}  and job_information_id = #{jobInformationId}
 	</select>

+ 6 - 0
common/src/main/resources/mapper/base/RecruitPersonRelation.xml

@@ -121,6 +121,12 @@
 		select * from base_recruit_person_relation where del_flag = 0 and work_person_id = #{personId}
 		order by create_time desc
 	</select>
+	<select id="isReadCountByRecruit" resultType="java.lang.Integer">
+		select count(*) from base_recruit_person_relation
+		where del_flag = 0
+		and recruit_information_id = #{0}
+		and is_read = false
+	</select>
 
 	<select id="searchMobile" parameterType="hashmap" resultMap="RecruitPersonRelationMap">
 		<![CDATA[

+ 26 - 1
web/src/main/java/com/jpsoft/employment/modules/base/controller/JobEnterpriseRelationController.java

@@ -2,7 +2,9 @@ package com.jpsoft.employment.modules.base.controller;
 
 import com.github.pagehelper.Page;
 import com.jpsoft.employment.modules.base.entity.EnterpriseInfo;
+import com.jpsoft.employment.modules.base.entity.RecruitInformationInfo;
 import com.jpsoft.employment.modules.base.service.EnterpriseInfoService;
+import com.jpsoft.employment.modules.base.service.RecruitInformationInfoService;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
 import com.jpsoft.employment.modules.common.utils.PojoUtils;
 import com.jpsoft.employment.modules.common.dto.Sort;
@@ -30,6 +32,9 @@ public class JobEnterpriseRelationController {
 
     @Autowired
     private EnterpriseInfoService enterpriseInfoService;
+
+    @Autowired
+    private RecruitInformationInfoService recruitInformationInfoService;
 	
 	
 	@ApiOperation(value="创建空记录")
@@ -221,6 +226,8 @@ public class JobEnterpriseRelationController {
             searchParams.put("informationId", informationId);
         }
 
+        int updateCount = 0;
+
 
         Page<JobEnterpriseRelation> page = jobEnterpriseRelationService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
 
@@ -230,11 +237,29 @@ public class JobEnterpriseRelationController {
                 jobEnterpriseRelation.setEnterpriseName(enterpriseInfo.getName());
                 jobEnterpriseRelation.setEnterpriseAddress(enterpriseInfo.getAddress());
             }
+
+
+            RecruitInformationInfo recruitInformationInfo = recruitInformationInfoService.get(jobEnterpriseRelation.getRecruitInformationId());
+
+            if(recruitInformationInfo!=null){
+                jobEnterpriseRelation.setRecruitPositionName(recruitInformationInfo.getPositionName());
+            }
+
+            if(jobEnterpriseRelation.getIsRead()==null||!jobEnterpriseRelation.getIsRead()){
+                jobEnterpriseRelation.setIsRead(true);
+                jobEnterpriseRelation.setUpdateBy(subject);
+                jobEnterpriseRelation.setUpdateTime(new Date());
+
+                updateCount += jobEnterpriseRelationService.update(jobEnterpriseRelation);
+            }
         }
 
+        Map map = PojoUtils.pageWrapper(page);
+
+        map.put("updateCount",updateCount);
 
         msgResult.setResult(true);
-        msgResult.setData(PojoUtils.pageWrapper(page));
+        msgResult.setData(map);
 
         return msgResult;
     }

+ 9 - 0
web/src/main/java/com/jpsoft/employment/modules/base/controller/JobInformationInfoController.java

@@ -1,7 +1,9 @@
 package com.jpsoft.employment.modules.base.controller;
 
 import com.github.pagehelper.Page;
+import com.jpsoft.employment.modules.base.entity.JobEnterpriseRelation;
 import com.jpsoft.employment.modules.base.entity.PersonInfo;
+import com.jpsoft.employment.modules.base.service.JobEnterpriseRelationService;
 import com.jpsoft.employment.modules.base.service.PersonInfoService;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
 import com.jpsoft.employment.modules.common.utils.PojoUtils;
@@ -33,6 +35,9 @@ public class JobInformationInfoController {
 
     @Autowired
     private DataDictionaryService dataDictionaryService;
+
+    @Autowired
+    private JobEnterpriseRelationService jobEnterpriseRelationService;
 	
 	
 	@ApiOperation(value="创建空记录")
@@ -279,6 +284,10 @@ public class JobInformationInfoController {
             if(StringUtils.isNotEmpty(educationN)){
                 jobInformationInfo.setEducationN(educationN);
             }
+
+            Integer isReadNumber = jobEnterpriseRelationService.countByJobInformationId(jobInformationInfo.getId());
+
+            jobInformationInfo.setIsReadNumber(isReadNumber);
         }
 
 

+ 8 - 0
web/src/main/java/com/jpsoft/employment/modules/base/controller/RecruitInformationInfoController.java

@@ -4,6 +4,7 @@ import com.github.pagehelper.Page;
 import com.jpsoft.employment.config.OSSConfig;
 import com.jpsoft.employment.modules.base.entity.EnterpriseInfo;
 import com.jpsoft.employment.modules.base.service.EnterpriseInfoService;
+import com.jpsoft.employment.modules.base.service.RecruitPersonRelationService;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
 import com.jpsoft.employment.modules.common.utils.OSSUtil;
 import com.jpsoft.employment.modules.common.utils.POIUtils;
@@ -44,6 +45,9 @@ public class RecruitInformationInfoController {
     @Autowired
     private DataDictionaryService dataDictionaryService;
 
+    @Autowired
+    private RecruitPersonRelationService recruitPersonRelationService;
+
     @Autowired
     private OSSConfig ossConfig;
 	
@@ -281,6 +285,10 @@ public class RecruitInformationInfoController {
                 recruitInformationInfo.setSettlementMethodN(settlementMethodN);
             }
 
+            Integer isReadNumber = recruitPersonRelationService.isReadCountByRecruit(recruitInformationInfo.getId());
+
+            recruitInformationInfo.setIsReadNumber(isReadNumber);
+
         }
 
 

+ 80 - 0
web/src/main/java/com/jpsoft/employment/modules/base/controller/RecruitPersonRelationController.java

@@ -1,8 +1,10 @@
 package com.jpsoft.employment.modules.base.controller;
 
 import com.github.pagehelper.Page;
+import com.jpsoft.employment.modules.base.entity.JobInformationInfo;
 import com.jpsoft.employment.modules.base.entity.PersonInfo;
 import com.jpsoft.employment.modules.base.entity.RecruitInformationInfo;
+import com.jpsoft.employment.modules.base.service.JobInformationInfoService;
 import com.jpsoft.employment.modules.base.service.PersonInfoService;
 import com.jpsoft.employment.modules.base.service.RecruitInformationInfoService;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
@@ -10,6 +12,7 @@ import com.jpsoft.employment.modules.common.utils.PojoUtils;
 import com.jpsoft.employment.modules.common.dto.Sort;
 import com.jpsoft.employment.modules.base.entity.RecruitPersonRelation;
 import com.jpsoft.employment.modules.base.service.RecruitPersonRelationService;
+import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -32,6 +35,12 @@ public class RecruitPersonRelationController {
     @Autowired
     private PersonInfoService personInfoService;
 
+    @Autowired
+    private JobInformationInfoService jobInformationInfoService;
+
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
+
 
     @ApiOperation(value = "创建空记录")
     @GetMapping("create")
@@ -245,4 +254,75 @@ public class RecruitPersonRelationController {
 
         return msgResult;
     }
+
+
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("jobInformationDetail/{id}")
+    public MessageResult<JobInformationInfo> jobInformationDetail(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<JobInformationInfo> msgResult = new MessageResult<>();
+
+        try {
+            RecruitPersonRelation recruitPersonRelation = recruitPersonRelationService.get(id);
+
+
+            JobInformationInfo jobInformationInfo = jobInformationInfoService.get(recruitPersonRelation.getJobInformationId());
+
+            if (jobInformationInfo != null) {
+                //修改是否读取状态
+                if(recruitPersonRelation.getIsRead()==null||!recruitPersonRelation.getIsRead()){
+                    recruitPersonRelation.setIsRead(true);
+                    recruitPersonRelation.setUpdateBy(subject);
+                    recruitPersonRelation.setUpdateTime(new Date());
+                    recruitPersonRelationService.update(recruitPersonRelation);
+
+                    jobInformationInfo.setIsReadStatus(true);
+                }
+
+
+                PersonInfo personInfo = personInfoService.get(jobInformationInfo.getPersonId());
+                if(personInfo!=null){
+                    jobInformationInfo.setPersonName(personInfo.getRealName());
+                    jobInformationInfo.setPersonPhone(personInfo.getPhone());
+                }
+
+                String intendedIndustriesN = dataDictionaryService.findNameByCatalogNameAndValue("意向行业",jobInformationInfo.getIntendedIndustries());
+                if(StringUtils.isNotEmpty(intendedIndustriesN)){
+                    jobInformationInfo.setIntendedIndustriesN(intendedIndustriesN);
+                }
+
+                String methodN = dataDictionaryService.findNameByCatalogNameAndValue("结算方式",jobInformationInfo.getMethod());
+                if(StringUtils.isNotEmpty(methodN)){
+                    jobInformationInfo.setMethodN(methodN);
+                }
+
+                String workExperienceN = dataDictionaryService.findNameByCatalogNameAndValue("工作经验",jobInformationInfo.getWorkExperience());
+                if(StringUtils.isNotEmpty(workExperienceN)){
+                    jobInformationInfo.setWorkExperienceN(workExperienceN);
+                }
+
+
+                String educationN = dataDictionaryService.findNameByCatalogNameAndValue("学历",jobInformationInfo.getEducation());
+                if(StringUtils.isNotEmpty(educationN)){
+                    jobInformationInfo.setEducationN(educationN);
+                }
+
+                jobInformationInfo.setIsRead(true);
+
+                msgResult.setResult(true);
+                msgResult.setData(jobInformationInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
 }