Sfoglia il codice sorgente

求职管理,招聘管理,共享用工,培训信息,新闻信息等功能页面

yanliming 2 anni fa
parent
commit
9f96136503

+ 18 - 1
common/src/main/java/com/jpsoft/employment/modules/base/entity/JobInformationInfo.java

@@ -42,7 +42,7 @@ public class JobInformationInfo {
 	private String method;
 
 	@ApiModelProperty(value = "工作经验")
-	private Integer workExperience;
+	private String workExperience;
 
 	@ApiModelProperty(value = "学历")
 	private String education;
@@ -73,4 +73,21 @@ public class JobInformationInfo {
 	@Transient
 	@ApiModelProperty(value = "真实姓名")
 	private String personName;
+
+	@Transient
+	@ApiModelProperty(value = "意向行业翻译")
+	private String intendedIndustriesN;
+
+
+	@Transient
+	@ApiModelProperty(value = "结算方式翻译")
+	private String methodN;
+
+	@Transient
+	@ApiModelProperty(value = "工作经验翻译")
+	private String workExperienceN;
+
+	@Transient
+	@ApiModelProperty(value = "学历翻译")
+	private String educationN;
 }

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

@@ -7,6 +7,7 @@ import java.math.BigDecimal;
 
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.springframework.data.annotation.Transient;
 import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 
@@ -75,4 +76,18 @@ public class RecruitInformationInfo {
 
 	@ApiModelProperty(value = "是否删除")
 	private Boolean delFlag;
+
+
+
+	@Transient
+	@ApiModelProperty(value = "企业名称")
+	private String enterpriseName;
+
+	@Transient
+	@ApiModelProperty(value = "行业翻译")
+	private String industryN;
+
+	@Transient
+	@ApiModelProperty(value = "结算方式翻译")
+	private String settlementMethodN;
 }

+ 6 - 0
common/src/main/java/com/jpsoft/employment/modules/base/entity/ShareWorksInfo.java

@@ -7,6 +7,7 @@ import java.math.BigDecimal;
 
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.springframework.data.annotation.Transient;
 import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 
@@ -52,4 +53,9 @@ public class ShareWorksInfo {
 
 	@ApiModelProperty(value = "是否删除")
 	private Boolean delFlag;
+
+
+	@Transient
+	@ApiModelProperty(value = "类型翻译")
+	private String typeN;
 }

+ 11 - 0
common/src/main/java/com/jpsoft/employment/modules/base/entity/TrainingInfo.java

@@ -7,6 +7,7 @@ import java.math.BigDecimal;
 
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.springframework.data.annotation.Transient;
 import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 
@@ -49,4 +50,14 @@ public class TrainingInfo {
 
 	@ApiModelProperty(value = "是否删除")
 	private Boolean delFlag;
+
+	@ApiModelProperty(value = "企业ID")
+	private String enterpriseId;
+
+	@ApiModelProperty(value = "状态")
+	private String status;
+
+	@Transient
+	@ApiModelProperty(value = "企业名称")
+	private String enterpriseName;
 }

+ 2 - 2
common/src/main/resources/mapper/base/JobInformationInfo.xml

@@ -40,7 +40,7 @@
 ,#{intendedPosition,jdbcType=VARCHAR}
 ,#{hopeSalary,jdbcType= NUMERIC }
 ,#{method,jdbcType=VARCHAR}
-,#{workExperience,jdbcType= NUMERIC }
+,#{workExperience,jdbcType= VARCHAR }
 ,#{education,jdbcType=VARCHAR}
 ,#{status,jdbcType=VARCHAR}
 ,#{createBy,jdbcType=VARCHAR}
@@ -79,7 +79,7 @@
 		method_=#{method,jdbcType=VARCHAR},
 		</if>
 				<if test="workExperience!=null">
-		work_experience=#{workExperience,jdbcType= NUMERIC },
+		work_experience=#{workExperience,jdbcType= VARCHAR },
 		</if>
 				<if test="education!=null">
 		education_=#{education,jdbcType=VARCHAR},

+ 15 - 5
common/src/main/resources/mapper/base/TrainingInfo.xml

@@ -14,8 +14,10 @@
 			<result property="updateBy" column="update_by" />
 			<result property="updateTime" column="update_time" />
 			<result property="delFlag" column="del_flag" />
+			<result property="enterpriseId" column="enterprise_id" />
+			<result property="status" column="status_" />
 			</resultMap>
-	<insert id="insert" parameterType="TrainingInfo">
+	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.TrainingInfo">
 	<!--
 	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
 		select sys_guid() from dual
@@ -23,7 +25,7 @@
 	-->
 	<![CDATA[
 		insert into base_training_info
-	    (id_,name_,title_,content_,file_,create_by,create_time,update_by,update_time,del_flag)
+	    (id_,name_,title_,content_,file_,create_by,create_time,update_by,update_time,del_flag,enterprise_id,status_)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -36,13 +38,15 @@
 ,#{updateBy,jdbcType=VARCHAR}
 ,#{updateTime,jdbcType= TIMESTAMP }
 ,#{delFlag,jdbcType= NUMERIC }
+,#{enterpriseId,jdbcType=VARCHAR}
+,#{status,jdbcType=VARCHAR}
 		)
 	]]>
 	</insert>
 	<delete id="delete" parameterType="string">
 		delete from base_training_info where id_=#{id,jdbcType=VARCHAR}
 	</delete>
-	<update id="update" parameterType="TrainingInfo">
+	<update id="update" parameterType="com.jpsoft.employment.modules.base.entity.TrainingInfo">
 		update base_training_info
 		<set>
 				<if test="name!=null">
@@ -72,12 +76,17 @@
 				<if test="delFlag!=null">
 		del_flag=#{delFlag,jdbcType= NUMERIC },
 		</if>
+			<if test="enterpriseId!=null">
+				enterprise_id=#{enterpriseId,jdbcType=VARCHAR},
+			</if>
+			<if test="status!=null">
+				status_=#{status,jdbcType=VARCHAR},
+			</if>
 		</set>
 	where id_=#{id}
 	</update>
 	<select id="get" parameterType="string" resultMap="TrainingInfoMap">
-		select 
-id_,name_,title_,content_,file_,create_by,create_time,update_by,update_time,del_flag		from base_training_info where id_=#{0}
+		select * from base_training_info where id_=#{0}
 	</select>
 	<select id="exist" parameterType="string" resultType="int">
 		select count(*) from base_training_info where id_=#{0}
@@ -90,6 +99,7 @@ id_,name_,title_,content_,file_,create_by,create_time,update_by,update_time,del_
 			select * from base_training_info
 		]]>
 		<where>
+			del_flag = false
 			<if test="searchParams.id != null">
 				and ID_ like #{searchParams.id}
 			</if>

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

@@ -8,6 +8,7 @@ import com.jpsoft.employment.modules.common.utils.PojoUtils;
 import com.jpsoft.employment.modules.common.dto.Sort;
 import com.jpsoft.employment.modules.base.entity.JobInformationInfo;
 import com.jpsoft.employment.modules.base.service.JobInformationInfoService;
+import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -29,6 +30,9 @@ public class JobInformationInfoController {
 
     @Autowired
     private PersonInfoService personInfoService;
+
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
 	
 	
 	@ApiOperation(value="创建空记录")
@@ -228,6 +232,27 @@ public class JobInformationInfoController {
             if(personInfo!=null){
                 jobInformationInfo.setPersonName(personInfo.getRealName());
             }
+
+            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);
+            }
         }
 
 
@@ -236,4 +261,37 @@ public class JobInformationInfoController {
 
         return msgResult;
     }
+
+
+
+    @ApiOperation(value="审核信息")
+    @PostMapping("check/{id}")
+    public MessageResult<JobInformationInfo> check(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<JobInformationInfo> msgResult = new MessageResult<>();
+
+        try {
+
+            JobInformationInfo jobInformationInfo = jobInformationInfoService.get(id);
+            jobInformationInfo.setStatus("1");
+            jobInformationInfo.setUpdateBy(subject);
+            jobInformationInfo.setUpdateTime(new Date());
+
+            int affectCount = jobInformationInfoService.update(jobInformationInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库审核失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
 }

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

@@ -1,11 +1,14 @@
 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.service.EnterpriseInfoService;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
 import com.jpsoft.employment.modules.common.utils.PojoUtils;
 import com.jpsoft.employment.modules.common.dto.Sort;
 import com.jpsoft.employment.modules.base.entity.RecruitInformationInfo;
 import com.jpsoft.employment.modules.base.service.RecruitInformationInfoService;
+import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -24,6 +27,12 @@ public class RecruitInformationInfoController {
 
     @Autowired
     private RecruitInformationInfoService recruitInformationInfoService;
+
+    @Autowired
+    private EnterpriseInfoService enterpriseInfoService;
+
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
 	
 	
 	@ApiOperation(value="创建空记录")
@@ -219,6 +228,25 @@ public class RecruitInformationInfoController {
         Page<RecruitInformationInfo> page = recruitInformationInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
 
 
+        for (RecruitInformationInfo recruitInformationInfo:page) {
+            EnterpriseInfo enterpriseInfo = enterpriseInfoService.get(recruitInformationInfo.getEnterpriseId());
+            if(enterpriseInfo!=null){
+                recruitInformationInfo.setEnterpriseName(enterpriseInfo.getName());
+            }
+
+            String industryN = dataDictionaryService.findNameByCatalogNameAndValue("意向行业",recruitInformationInfo.getIndustry());
+            if(StringUtils.isNotEmpty(industryN)){
+                recruitInformationInfo.setIndustryN(industryN);
+            }
+
+            String settlementMethodN = dataDictionaryService.findNameByCatalogNameAndValue("结算方式",recruitInformationInfo.getSettlementMethod());
+            if(StringUtils.isNotEmpty(settlementMethodN)){
+                recruitInformationInfo.setSettlementMethodN(settlementMethodN);
+            }
+
+        }
+
+
         msgResult.setResult(true);
         msgResult.setData(PojoUtils.pageWrapper(page));
 

+ 47 - 0
web/src/main/java/com/jpsoft/employment/modules/base/controller/ShareWorksInfoController.java

@@ -6,6 +6,7 @@ import com.jpsoft.employment.modules.common.utils.PojoUtils;
 import com.jpsoft.employment.modules.common.dto.Sort;
 import com.jpsoft.employment.modules.base.entity.ShareWorksInfo;
 import com.jpsoft.employment.modules.base.service.ShareWorksInfoService;
+import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -24,6 +25,9 @@ public class ShareWorksInfoController {
 
     @Autowired
     private ShareWorksInfoService shareWorksInfoService;
+
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
 	
 	
 	@ApiOperation(value="创建空记录")
@@ -104,6 +108,7 @@ public class ShareWorksInfoController {
         try {
 		    shareWorksInfo.setUpdateBy(subject);
             shareWorksInfo.setUpdateTime(new Date());
+            shareWorksInfo.setStatus("0");
 		
             int affectCount = shareWorksInfoService.update(shareWorksInfo);
 
@@ -219,9 +224,51 @@ public class ShareWorksInfoController {
         Page<ShareWorksInfo> page = shareWorksInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
 
 
+        for (ShareWorksInfo shareWorksInfo:page) {
+            String typeN = dataDictionaryService.findNameByCatalogNameAndValue("共享用工类型",shareWorksInfo.getType());
+            if(StringUtils.isNotEmpty(typeN)){
+                shareWorksInfo.setTypeN(typeN);
+            }
+
+        }
+
+
         msgResult.setResult(true);
         msgResult.setData(PojoUtils.pageWrapper(page));
 
         return msgResult;
     }
+
+
+
+    @ApiOperation(value="审核信息")
+    @PostMapping("check/{id}")
+    public MessageResult<ShareWorksInfo> check(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<ShareWorksInfo> msgResult = new MessageResult<>();
+
+        try {
+
+            ShareWorksInfo shareWorksInfo = shareWorksInfoService.get(id);
+            shareWorksInfo.setStatus("1");
+            shareWorksInfo.setUpdateBy(subject);
+            shareWorksInfo.setUpdateTime(new Date());
+
+            int affectCount = shareWorksInfoService.update(shareWorksInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库审核失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
 }

+ 45 - 1
web/src/main/java/com/jpsoft/employment/modules/base/controller/TrainingInfoController.java

@@ -1,6 +1,8 @@
 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.service.EnterpriseInfoService;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
 import com.jpsoft.employment.modules.common.utils.PojoUtils;
 import com.jpsoft.employment.modules.common.dto.Sort;
@@ -24,6 +26,9 @@ public class TrainingInfoController {
 
     @Autowired
     private TrainingInfoService trainingInfoService;
+
+    @Autowired
+    private EnterpriseInfoService enterpriseInfoService;
 	
 	
 	@ApiOperation(value="创建空记录")
@@ -209,7 +214,7 @@ public class TrainingInfoController {
         Map<String,Object> searchParams = new HashMap<>();
 
         List<Sort> sortList = new ArrayList<>();
-        sortList.add(new Sort("id_","asc"));
+        sortList.add(new Sort("create_time","desc"));
 
         if (StringUtils.isNotEmpty(id)) {
             searchParams.put("id","%" + id + "%");
@@ -218,10 +223,49 @@ public class TrainingInfoController {
 
         Page<TrainingInfo> page = trainingInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
 
+        for (TrainingInfo trainingInfo:page) {
+            EnterpriseInfo enterpriseInfo = enterpriseInfoService.get(trainingInfo.getEnterpriseId());
+            if(enterpriseInfo!=null){
+                trainingInfo.setEnterpriseName(enterpriseInfo.getName());
+            }
+        }
+
 
         msgResult.setResult(true);
         msgResult.setData(PojoUtils.pageWrapper(page));
 
         return msgResult;
     }
+
+
+    @ApiOperation(value="审核信息")
+    @PostMapping("check/{id}")
+    public MessageResult<TrainingInfo> check(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<TrainingInfo> msgResult = new MessageResult<>();
+
+        try {
+
+            TrainingInfo trainingInfo = trainingInfoService.get(id);
+            trainingInfo.setStatus("1");
+            trainingInfo.setUpdateBy(subject);
+            trainingInfo.setUpdateTime(new Date());
+
+            int affectCount = trainingInfoService.update(trainingInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库审核失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
 }