Browse Source

代码提交

xiao547607 4 years ago
parent
commit
45e5ea1329

+ 6 - 2
common/src/main/java/com/jpsoft/employment/modules/manage/entity/JobFair.java

@@ -42,8 +42,10 @@ public class JobFair {
     @JsonFormat(pattern = "yyyy-MM-dd",timezone ="GMT+8")
 	    @ApiModelProperty(value = "结束时间")
     private Date endTime;
-        @ApiModelProperty(value = "入场时间段")
-    private String admissionPeriod;
+        @ApiModelProperty(value = "入场时间段起")
+    private String admissionPeriodStart;
+    @ApiModelProperty(value = "入场时间段止")
+    private String admissionPeriodEnd;
         @ApiModelProperty(value = "简介")
     private String introduce;
         @ApiModelProperty(value = "宣传图片")
@@ -52,4 +54,6 @@ public class JobFair {
     private String videoUrl;
     @ApiModelProperty(value = "招聘会状态")
     private String status;
+    @ApiModelProperty(value = "招聘会状态")
+    private String statusN;
 }

+ 2 - 0
common/src/main/java/com/jpsoft/employment/modules/manage/entity/SeatManage.java

@@ -38,6 +38,8 @@ public class SeatManage {
     private String template;
         @ApiModelProperty(value = "企业ID")
     private String companyId;
+    @ApiModelProperty(value = "企业ID")
+    private String companyName;
         @ApiModelProperty(value = "介绍")
     private String introduce;
         @ApiModelProperty(value = "图片地址")

+ 26 - 5
common/src/main/resources/mapper/manage/JobFair.xml

@@ -13,7 +13,8 @@
 			<result property="name" column="name_" />
 			<result property="startTime" column="start_time" />
 			<result property="endTime" column="end_time" />
-			<result property="admissionPeriod" column="admission_period" />
+			<result property="admissionPeriodStart" column="admission_period_start" />
+			<result property="admissionPeriodEnd" column="admission_period_end" />
 			<result property="introduce" column="introduce_" />
 			<result property="imgUrls" column="img_urls" />
 			<result property="videoUrl" column="video_url" />
@@ -27,7 +28,7 @@
 	-->
 	<![CDATA[
 		insert into manage_job_fair
-	    (id_,create_time,create_by,update_time,update_by,del_flag,name_,start_time,end_time,admission_period,introduce_,img_urls,video_url,status_)
+	    (id_,create_time,create_by,update_time,update_by,del_flag,name_,start_time,end_time,admission_period_start,admission_period_end,introduce_,img_urls,video_url,status_)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -39,7 +40,8 @@
 ,#{name,jdbcType=VARCHAR}
 ,#{startTime,jdbcType= TIMESTAMP }
 ,#{endTime,jdbcType= TIMESTAMP }
-,#{admissionPeriod,jdbcType=VARCHAR}
+,#{admissionPeriodStart,jdbcType=VARCHAR}
+,#{admissionPeriodEnd,jdbcType=VARCHAR}
 ,#{introduce,jdbcType= NUMERIC }
 ,#{imgUrls,jdbcType= NUMERIC }
 ,#{videoUrl,jdbcType=VARCHAR}
@@ -77,9 +79,12 @@
 				<if test="endTime!=null">
 		end_time=#{endTime,jdbcType= TIMESTAMP },
 		</if>
-				<if test="admissionPeriod!=null">
-		admission_period=#{admissionPeriod,jdbcType=VARCHAR},
+				<if test="admissionPeriodStart!=null">
+		admission_period_start=#{admissionPeriodStart,jdbcType=VARCHAR},
 		</if>
+			<if test="admissionPeriodEnd!=null">
+				admission_period_end=#{admissionPeriodEnd,jdbcType=VARCHAR},
+			</if>
 				<if test="introduce!=null">
 		introduce_=#{introduce,jdbcType= NUMERIC },
 		</if>
@@ -113,11 +118,27 @@
 			<if test="searchParams.id != null">
 				and ID_ like #{searchParams.id}
 			</if>
+			<if test="searchParams.startTime != null">
+				<![CDATA[
+				and start_time >= #{searchParams.startTime}
+				]]>
+			</if>
+			<if test="searchParams.endTime != null">
+				<![CDATA[
+				and start_time <= #{searchParams.endTime}
+				]]>
+			</if>
 			<if test="searchParams.nowDate != null">
 				<![CDATA[
 				and start_time >= #{searchParams.nowDate}
 				]]>
 			</if>
+			<if test="searchParams.name != null">
+				and name_ like #{searchParams.name}
+			</if>
+			<if test="searchParams.status != null">
+				and status_ = #{searchParams.status}
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 	        ${sort.name} ${sort.order}

+ 3 - 0
common/src/main/resources/mapper/manage/SeatManage.xml

@@ -109,6 +109,9 @@
 			<if test="searchParams.id != null">
 				and ID_ like #{searchParams.id}
 			</if>
+			<if test="searchParams.seatNum != null">
+				and seat_num like #{searchParams.seatNum}
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 	        ${sort.name} ${sort.order}

+ 28 - 4
web/src/main/java/com/jpsoft/employment/modules/manage/controller/JobFairController.java

@@ -7,12 +7,15 @@ import com.jpsoft.employment.modules.common.dto.Sort;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
 import com.jpsoft.employment.modules.manage.entity.JobFair;
 import com.jpsoft.employment.modules.manage.service.JobFairService;
+import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
+import org.joda.time.DateTime;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
@@ -28,6 +31,9 @@ public class JobFairController {
     @Autowired
     private JobFairService jobFairService;
 
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
+
     @ApiOperation(value="创建空记录")
     @GetMapping("create")
     public MessageResult<JobFair> create(){
@@ -197,7 +203,10 @@ public class JobFairController {
     @ApiOperation(value="列表")
     @RequestMapping(value = "pageList",method = RequestMethod.POST)
     public MessageResult<Map> pageList(
-            String id,
+            String name,
+            String status,
+            @DateTimeFormat(pattern = "yyyy-MM-dd") Date startTime,
+            @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime,
             @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
             @RequestParam(value="pageSize",defaultValue="20") int pageSize,
             @RequestAttribute String subject){
@@ -210,13 +219,28 @@ public class JobFairController {
         Map<String,Object> searchParams = new HashMap<>();
 
         List<Sort> sortList = new ArrayList<>();
-        sortList.add(new Sort("id_","asc"));
+        sortList.add(new Sort("start_time","asc"));
+
+        if (startTime!=null){
+            searchParams.put("startTime",startTime);
+        }
 
-        if (StringUtils.isNotEmpty(id)) {
-            searchParams.put("id","%" + id + "%");
+        if (endTime!=null){
+            searchParams.put("endTime",endTime);
+        }
+
+        if(StringUtils.isNotEmpty(name)) {
+            searchParams.put("name", "%" + name + "%");
+        }
+
+        if(StringUtils.isNotEmpty(status)) {
+            searchParams.put("status", status);
         }
 
         Page<JobFair> page = jobFairService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+        for(JobFair jobFair : page.getResult()){
+           jobFair.setStatusN(dataDictionaryService.findNameByCatalogNameAndValue("招聘会状态",jobFair.getStatus()));
+        }
 
         msgResult.setResult(true);
         msgResult.setData(PojoUtils.pageWrapper(page));

+ 17 - 4
web/src/main/java/com/jpsoft/employment/modules/manage/controller/SeatManageController.java

@@ -1,6 +1,8 @@
 package com.jpsoft.employment.modules.manage.controller;
 
 import com.github.pagehelper.Page;
+import com.jpsoft.employment.modules.base.entity.Company;
+import com.jpsoft.employment.modules.base.service.CompanyService;
 import com.jpsoft.employment.modules.common.utils.PojoUtils;
 import com.jpsoft.employment.modules.common.dto.Sort;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
@@ -27,6 +29,9 @@ public class SeatManageController {
     @Autowired
     private SeatManageService seatManageService;
 
+    @Autowired
+    private CompanyService companyService;
+
     @ApiOperation(value="创建空记录")
     @GetMapping("create")
     public MessageResult<SeatManage> create(){
@@ -196,7 +201,7 @@ public class SeatManageController {
     @ApiOperation(value="列表")
     @RequestMapping(value = "pageList",method = RequestMethod.POST)
     public MessageResult<Map> pageList(
-            String id,
+            String seatNum,
             @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
             @RequestParam(value="pageSize",defaultValue="20") int pageSize,
             @RequestAttribute String subject){
@@ -209,13 +214,21 @@ public class SeatManageController {
         Map<String,Object> searchParams = new HashMap<>();
 
         List<Sort> sortList = new ArrayList<>();
-        sortList.add(new Sort("id_","asc"));
+        sortList.add(new Sort("seat_num","asc"));
 
-        if (StringUtils.isNotEmpty(id)) {
-            searchParams.put("id","%" + id + "%");
+        if (StringUtils.isNotEmpty(seatNum)) {
+            searchParams.put("seatNum","%" + seatNum + "%");
         }
 
         Page<SeatManage> page = seatManageService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+        for(SeatManage seatManage:page){
+            if(StringUtils.isNotEmpty(seatManage.getCompanyId())) {
+                Company company = companyService.get(seatManage.getCompanyId());
+                if(company != null){
+                    seatManage.setCompanyName(company.getName());
+                }
+            }
+        }
 
         msgResult.setResult(true);
         msgResult.setData(PojoUtils.pageWrapper(page));