Преглед изворни кода

企业信息页面调整
岗位信息页面调整

liudijing пре 10 месеци
родитељ
комит
f1a567e84a

+ 2 - 1
src/main/java/com/hz/employmentsite/controller/companyService/CompanyController.java

@@ -52,7 +52,8 @@ public class CompanyController {
             data = new CompanyVo();
             data.companyID=UUID.randomUUID().toString();
             data.recordStatus =1;
-            data.validTime="长期";
+            data.validTime="2099-12-31";
+            data.isShortage=1;
         }
         return RespGenerstor.success(data);
     }

+ 6 - 0
src/main/java/com/hz/employmentsite/controller/companyService/PostController.java

@@ -76,6 +76,12 @@ public class PostController {
         return RespGenerstor.success(result);
     }
 
+    @PostMapping("/savePostList")
+    public  BaseResponse<Integer> savePostList(@RequestBody List<PostVo> data){
+        var result=postService.savePostList(data,accountService.getLoginUserID());
+        return RespGenerstor.success(result);
+    }
+
     @GetMapping("/getPostByID")
     public BaseResponse<PostVo> getPostByID(@RequestParam(required = false) String id) {
         var data = postService.getDataById(id);

+ 10 - 0
src/main/java/com/hz/employmentsite/model/PcCompany.java

@@ -45,6 +45,8 @@ public class PcCompany {
 
     private Date modifyTime;
 
+    private Integer isShortage;
+
     public String getCompanyID() {
         return companyID;
     }
@@ -212,4 +214,12 @@ public class PcCompany {
     public void setModifyTime(Date modifyTime) {
         this.modifyTime = modifyTime;
     }
+
+    public Integer getIsShortage() {
+        return isShortage;
+    }
+
+    public void setIsShortage(Integer isShortage) {
+        this.isShortage = isShortage;
+    }
 }

+ 60 - 0
src/main/java/com/hz/employmentsite/model/PcCompanyExample.java

@@ -1524,6 +1524,66 @@ public class PcCompanyExample {
             addCriterion("ModifyTime not between", value1, value2, "modifyTime");
             return (Criteria) this;
         }
+
+        public Criteria andIsShortageIsNull() {
+            addCriterion("IsShortage is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsShortageIsNotNull() {
+            addCriterion("IsShortage is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsShortageEqualTo(Integer value) {
+            addCriterion("IsShortage =", value, "isShortage");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsShortageNotEqualTo(Integer value) {
+            addCriterion("IsShortage <>", value, "isShortage");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsShortageGreaterThan(Integer value) {
+            addCriterion("IsShortage >", value, "isShortage");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsShortageGreaterThanOrEqualTo(Integer value) {
+            addCriterion("IsShortage >=", value, "isShortage");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsShortageLessThan(Integer value) {
+            addCriterion("IsShortage <", value, "isShortage");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsShortageLessThanOrEqualTo(Integer value) {
+            addCriterion("IsShortage <=", value, "isShortage");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsShortageIn(List<Integer> values) {
+            addCriterion("IsShortage in", values, "isShortage");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsShortageNotIn(List<Integer> values) {
+            addCriterion("IsShortage not in", values, "isShortage");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsShortageBetween(Integer value1, Integer value2) {
+            addCriterion("IsShortage between", value1, value2, "isShortage");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsShortageNotBetween(Integer value1, Integer value2) {
+            addCriterion("IsShortage not between", value1, value2, "isShortage");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 30 - 0
src/main/java/com/hz/employmentsite/model/PcPost.java

@@ -58,6 +58,12 @@ public class PcPost {
 
     private Date validTime;
 
+    private Date startTime;
+
+    private Date endTime;
+
+    private String jobPlace;
+
     private String postDesc;
 
     public String getPostID() {
@@ -276,6 +282,30 @@ public class PcPost {
         this.validTime = validTime;
     }
 
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getJobPlace() {
+        return jobPlace;
+    }
+
+    public void setJobPlace(String jobPlace) {
+        this.jobPlace = jobPlace == null ? null : jobPlace.trim();
+    }
+
     public String getPostDesc() {
         return postDesc;
     }

+ 190 - 0
src/main/java/com/hz/employmentsite/model/PcPostExample.java

@@ -1845,6 +1845,196 @@ public class PcPostExample {
             addCriterion("ValidTime not between", value1, value2, "validTime");
             return (Criteria) this;
         }
+
+        public Criteria andStartTimeIsNull() {
+            addCriterion("StartTime is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeIsNotNull() {
+            addCriterion("StartTime is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeEqualTo(Date value) {
+            addCriterion("StartTime =", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeNotEqualTo(Date value) {
+            addCriterion("StartTime <>", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeGreaterThan(Date value) {
+            addCriterion("StartTime >", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("StartTime >=", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeLessThan(Date value) {
+            addCriterion("StartTime <", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeLessThanOrEqualTo(Date value) {
+            addCriterion("StartTime <=", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeIn(List<Date> values) {
+            addCriterion("StartTime in", values, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeNotIn(List<Date> values) {
+            addCriterion("StartTime not in", values, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeBetween(Date value1, Date value2) {
+            addCriterion("StartTime between", value1, value2, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeNotBetween(Date value1, Date value2) {
+            addCriterion("StartTime not between", value1, value2, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeIsNull() {
+            addCriterion("EndTime is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeIsNotNull() {
+            addCriterion("EndTime is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeEqualTo(Date value) {
+            addCriterion("EndTime =", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeNotEqualTo(Date value) {
+            addCriterion("EndTime <>", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeGreaterThan(Date value) {
+            addCriterion("EndTime >", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("EndTime >=", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeLessThan(Date value) {
+            addCriterion("EndTime <", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeLessThanOrEqualTo(Date value) {
+            addCriterion("EndTime <=", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeIn(List<Date> values) {
+            addCriterion("EndTime in", values, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeNotIn(List<Date> values) {
+            addCriterion("EndTime not in", values, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeBetween(Date value1, Date value2) {
+            addCriterion("EndTime between", value1, value2, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeNotBetween(Date value1, Date value2) {
+            addCriterion("EndTime not between", value1, value2, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceIsNull() {
+            addCriterion("JobPlace is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceIsNotNull() {
+            addCriterion("JobPlace is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceEqualTo(String value) {
+            addCriterion("JobPlace =", value, "jobPlace");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceNotEqualTo(String value) {
+            addCriterion("JobPlace <>", value, "jobPlace");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceGreaterThan(String value) {
+            addCriterion("JobPlace >", value, "jobPlace");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceGreaterThanOrEqualTo(String value) {
+            addCriterion("JobPlace >=", value, "jobPlace");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceLessThan(String value) {
+            addCriterion("JobPlace <", value, "jobPlace");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceLessThanOrEqualTo(String value) {
+            addCriterion("JobPlace <=", value, "jobPlace");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceLike(String value) {
+            addCriterion("JobPlace like", value, "jobPlace");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceNotLike(String value) {
+            addCriterion("JobPlace not like", value, "jobPlace");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceIn(List<String> values) {
+            addCriterion("JobPlace in", values, "jobPlace");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceNotIn(List<String> values) {
+            addCriterion("JobPlace not in", values, "jobPlace");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceBetween(String value1, String value2) {
+            addCriterion("JobPlace between", value1, value2, "jobPlace");
+            return (Criteria) this;
+        }
+
+        public Criteria andJobPlaceNotBetween(String value1, String value2) {
+            addCriterion("JobPlace not between", value1, value2, "jobPlace");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 2 - 2
src/main/java/com/hz/employmentsite/services/impl/companyService/CompanyServiceImpl.java

@@ -9,13 +9,11 @@ import com.hz.employmentsite.mapper.PcPostMapper;
 import com.hz.employmentsite.mapper.PcSiteMapper;
 import com.hz.employmentsite.mapper.cquery.CompanyCQuery;
 import com.hz.employmentsite.model.*;
-import com.hz.employmentsite.services.impl.system.DictionaryServiceImpl;
 import com.hz.employmentsite.services.service.companyService.CompanyService;
 import com.hz.employmentsite.services.service.system.DictionaryService;
 import com.hz.employmentsite.util.StringUtils;
 import com.hz.employmentsite.vo.companyService.AppCompanyPostVo;
 import com.hz.employmentsite.vo.companyService.CompanyVo;
-import com.hz.employmentsite.vo.jobUserManager.JobHuntVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -75,6 +73,7 @@ public class CompanyServiceImpl implements CompanyService {
 //            dbData.setCompanyID(UUID.randomUUID().toString());
             dbData.setCompanyID(data.getCompanyID());
             dbData.setCompanyName(data.getCompanyName());
+            dbData.setIsShortage(data.getIsShortage());
             dbData.setCompanyCode(data.getCompanyCode());
             dbData.setSiteID(data.getSiteID());
             dbData.setRegionCode(data.getRegionCode());
@@ -101,6 +100,7 @@ public class CompanyServiceImpl implements CompanyService {
         } else {
             dbData.setCompanyName(data.getCompanyName());
             dbData.setCompanyCode(data.getCompanyCode());
+            dbData.setIsShortage(data.getIsShortage());
             dbData.setSiteID(data.getSiteID());
             dbData.setRegionCode(data.getRegionCode());
             dbData.setStreetCode(data.getStreetCode());

+ 16 - 1
src/main/java/com/hz/employmentsite/services/impl/companyService/PostServiceImpl.java

@@ -95,7 +95,7 @@ public class PostServiceImpl implements PostService {
 
 
     @Override
-    public Integer save(PostVo data, String userId) {
+    public int save(PostVo data, String userId) {
         int result = 0;
         PcPost dbData = null;
         Boolean isExist = data.getPostID() != null;
@@ -135,6 +135,9 @@ public class PostServiceImpl implements PostService {
             dbData.setTrailMinSalary(data.getTrailMinSalary());
             dbData.setCreateTime(new Date());
             dbData.setCreateUserID(userId);
+            dbData.setJobPlace(data.getJobPlace());
+            dbData.setStartTime(data.getStartTime());
+            dbData.setEndTime(data.getEndTime());
             result = pcPostMapper.insert(dbData);
         } else {
             dbData.setWorkCode(data.getWorkCode());
@@ -163,11 +166,23 @@ public class PostServiceImpl implements PostService {
             dbData.setTrailMinSalary(data.getTrailMinSalary());
             dbData.setModifyTime(new Date());
             dbData.setModifyUserID(userId);
+            dbData.setJobPlace(data.getJobPlace());
+            dbData.setStartTime(data.getStartTime());
+            dbData.setEndTime(data.getEndTime());
             result = pcPostMapper.updateByPrimaryKeySelective(dbData);
         }
         return result;
     }
 
+    @Override
+    public int savePostList(List<PostVo> data, String userId) {
+        int rows=0;
+         for(PostVo post :data){
+             rows+=this.save(post,userId);
+         }
+         return rows;
+    }
+
     @Override
     public int delete(String id) {
         int result = 0;

+ 2 - 1
src/main/java/com/hz/employmentsite/services/service/companyService/PostService.java

@@ -10,7 +10,8 @@ public interface PostService {
     PageInfo<PostVo> getList(Integer page, Integer rows, String postID,String postName, Integer minCount, Integer maxCount, String companyName,String RecordStatus,String WorkName,String companyID);
     PageInfo<RecommendPostVo> getCommendPostList(Integer page, Integer rows, String jobUserID);
     Integer saveCommendPost(RecommendPostVo data, String userId);
-    Integer save(PostVo data, String userId);
+    int save(PostVo data, String userId);
+    int savePostList(List<PostVo> data, String userId);
     int delete(String id);
     PostVo getDataById(String id);
     List<PostVo> importPost(List<PostVo> dataList, String userID);

+ 2 - 0
src/main/java/com/hz/employmentsite/vo/companyService/CompanyVo.java

@@ -66,4 +66,6 @@ public class CompanyVo {
 
     public Integer insuredCount;
 
+    public Integer isShortage;
+
 }

+ 6 - 0
src/main/java/com/hz/employmentsite/vo/companyService/PostVo.java

@@ -76,5 +76,11 @@ public class PostVo {
 
     public  String errorMessage;
 
+    public String jobPlace;
+
+    public Date startTime;
+
+    public Date endTime;
+
 
 }

+ 25 - 5
src/main/resources/mapping/PcCompanyMapper.xml

@@ -23,6 +23,7 @@
     <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" />
     <result column="ModifyUserID" jdbcType="VARCHAR" property="modifyUserID" />
     <result column="ModifyTime" jdbcType="TIMESTAMP" property="modifyTime" />
+    <result column="IsShortage" jdbcType="INTEGER" property="isShortage" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.hz.employmentsite.model.PcCompanyWithBLOBs">
     <result column="BusinScope" jdbcType="LONGVARCHAR" property="businScope" />
@@ -89,7 +90,8 @@
   <sql id="Base_Column_List">
     CompanyID, SiteID, RegionCode, InsuredCount, StreetCode, CompanyName, CompanyCode, 
     CompanyModel, WorkSituation, CompanyType, Address, UserName, UserMobile, CompanyEmail, 
-    FrName, ValidTime, RecordStatus, CreateUserID, CreateTime, ModifyUserID, ModifyTime
+    FrName, ValidTime, RecordStatus, CreateUserID, CreateTime, ModifyUserID, ModifyTime, 
+    IsShortage
   </sql>
   <sql id="Blob_Column_List">
     BusinScope, CompanyDesc
@@ -150,7 +152,8 @@
       UserMobile, CompanyEmail, FrName, 
       ValidTime, RecordStatus, CreateUserID, 
       CreateTime, ModifyUserID, ModifyTime, 
-      BusinScope, CompanyDesc)
+      IsShortage, BusinScope, CompanyDesc
+      )
     values (#{companyID,jdbcType=VARCHAR}, #{siteID,jdbcType=VARCHAR}, #{regionCode,jdbcType=VARCHAR}, 
       #{insuredCount,jdbcType=INTEGER}, #{streetCode,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, 
       #{companyCode,jdbcType=VARCHAR}, #{companyModel,jdbcType=INTEGER}, #{workSituation,jdbcType=VARCHAR}, 
@@ -158,7 +161,8 @@
       #{userMobile,jdbcType=VARCHAR}, #{companyEmail,jdbcType=VARCHAR}, #{frName,jdbcType=VARCHAR}, 
       #{validTime,jdbcType=VARCHAR}, #{recordStatus,jdbcType=INTEGER}, #{createUserID,jdbcType=VARCHAR}, 
       #{createTime,jdbcType=TIMESTAMP}, #{modifyUserID,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, 
-      #{businScope,jdbcType=LONGVARCHAR}, #{companyDesc,jdbcType=LONGVARCHAR})
+      #{isShortage,jdbcType=INTEGER}, #{businScope,jdbcType=LONGVARCHAR}, #{companyDesc,jdbcType=LONGVARCHAR}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.hz.employmentsite.model.PcCompanyWithBLOBs">
     insert into pc_company
@@ -226,6 +230,9 @@
       <if test="modifyTime != null">
         ModifyTime,
       </if>
+      <if test="isShortage != null">
+        IsShortage,
+      </if>
       <if test="businScope != null">
         BusinScope,
       </if>
@@ -297,6 +304,9 @@
       <if test="modifyTime != null">
         #{modifyTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="isShortage != null">
+        #{isShortage,jdbcType=INTEGER},
+      </if>
       <if test="businScope != null">
         #{businScope,jdbcType=LONGVARCHAR},
       </if>
@@ -377,6 +387,9 @@
       <if test="row.modifyTime != null">
         ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="row.isShortage != null">
+        IsShortage = #{row.isShortage,jdbcType=INTEGER},
+      </if>
       <if test="row.businScope != null">
         BusinScope = #{row.businScope,jdbcType=LONGVARCHAR},
       </if>
@@ -411,6 +424,7 @@
       CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
       ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
       ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
+      IsShortage = #{row.isShortage,jdbcType=INTEGER},
       BusinScope = #{row.businScope,jdbcType=LONGVARCHAR},
       CompanyDesc = #{row.companyDesc,jdbcType=LONGVARCHAR}
     <if test="example != null">
@@ -439,7 +453,8 @@
       CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
       CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
       ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
-      ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP}
+      ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
+      IsShortage = #{row.isShortage,jdbcType=INTEGER}
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -507,6 +522,9 @@
       <if test="modifyTime != null">
         ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="isShortage != null">
+        IsShortage = #{isShortage,jdbcType=INTEGER},
+      </if>
       <if test="businScope != null">
         BusinScope = #{businScope,jdbcType=LONGVARCHAR},
       </if>
@@ -538,6 +556,7 @@
       CreateTime = #{createTime,jdbcType=TIMESTAMP},
       ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
       ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
+      IsShortage = #{isShortage,jdbcType=INTEGER},
       BusinScope = #{businScope,jdbcType=LONGVARCHAR},
       CompanyDesc = #{companyDesc,jdbcType=LONGVARCHAR}
     where CompanyID = #{companyID,jdbcType=VARCHAR}
@@ -563,7 +582,8 @@
       CreateUserID = #{createUserID,jdbcType=VARCHAR},
       CreateTime = #{createTime,jdbcType=TIMESTAMP},
       ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
-      ModifyTime = #{modifyTime,jdbcType=TIMESTAMP}
+      ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
+      IsShortage = #{isShortage,jdbcType=INTEGER}
     where CompanyID = #{companyID,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 56 - 3
src/main/resources/mapping/PcPostMapper.xml

@@ -29,6 +29,9 @@
     <result column="ModifyUserID" jdbcType="VARCHAR" property="modifyUserID" />
     <result column="ModifyTime" jdbcType="TIMESTAMP" property="modifyTime" />
     <result column="ValidTime" jdbcType="TIMESTAMP" property="validTime" />
+    <result column="StartTime" jdbcType="TIMESTAMP" property="startTime" />
+    <result column="EndTime" jdbcType="TIMESTAMP" property="endTime" />
+    <result column="JobPlace" jdbcType="VARCHAR" property="jobPlace" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.hz.employmentsite.model.PcPost">
     <result column="PostDesc" jdbcType="LONGVARCHAR" property="postDesc" />
@@ -95,7 +98,7 @@
     PostID, WorkCode, WorkName, RecruitCount, CompanyID, PostName, RecordStatus, WorkNature, 
     ValidDay, WorkYear, CultureRank, MaxSalary, MinSalary, Welfare, UserName, UserMobile, 
     PostEmail, WorkTime, IsTrail, Trailtime, TrailMaxSalary, TrailMinSalary, CreateUserID, 
-    CreateTime, ModifyUserID, ModifyTime, ValidTime
+    CreateTime, ModifyUserID, ModifyTime, ValidTime, StartTime, EndTime, JobPlace
   </sql>
   <sql id="Blob_Column_List">
     PostDesc
@@ -158,6 +161,7 @@
       IsTrail, Trailtime, TrailMaxSalary, 
       TrailMinSalary, CreateUserID, CreateTime, 
       ModifyUserID, ModifyTime, ValidTime, 
+      StartTime, EndTime, JobPlace, 
       PostDesc)
     values (#{postID,jdbcType=VARCHAR}, #{workCode,jdbcType=VARCHAR}, #{workName,jdbcType=VARCHAR}, 
       #{recruitCount,jdbcType=INTEGER}, #{companyID,jdbcType=VARCHAR}, #{postName,jdbcType=VARCHAR}, 
@@ -168,6 +172,7 @@
       #{isTrail,jdbcType=BIT}, #{trailtime,jdbcType=INTEGER}, #{trailMaxSalary,jdbcType=DECIMAL}, 
       #{trailMinSalary,jdbcType=DECIMAL}, #{createUserID,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
       #{modifyUserID,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{validTime,jdbcType=TIMESTAMP}, 
+      #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{jobPlace,jdbcType=VARCHAR}, 
       #{postDesc,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.hz.employmentsite.model.PcPost">
@@ -254,6 +259,15 @@
       <if test="validTime != null">
         ValidTime,
       </if>
+      <if test="startTime != null">
+        StartTime,
+      </if>
+      <if test="endTime != null">
+        EndTime,
+      </if>
+      <if test="jobPlace != null">
+        JobPlace,
+      </if>
       <if test="postDesc != null">
         PostDesc,
       </if>
@@ -340,6 +354,15 @@
       <if test="validTime != null">
         #{validTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="startTime != null">
+        #{startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endTime != null">
+        #{endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="jobPlace != null">
+        #{jobPlace,jdbcType=VARCHAR},
+      </if>
       <if test="postDesc != null">
         #{postDesc,jdbcType=LONGVARCHAR},
       </if>
@@ -435,6 +458,15 @@
       <if test="row.validTime != null">
         ValidTime = #{row.validTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="row.startTime != null">
+        StartTime = #{row.startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="row.endTime != null">
+        EndTime = #{row.endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="row.jobPlace != null">
+        JobPlace = #{row.jobPlace,jdbcType=VARCHAR},
+      </if>
       <if test="row.postDesc != null">
         PostDesc = #{row.postDesc,jdbcType=LONGVARCHAR},
       </if>
@@ -472,6 +504,9 @@
       ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
       ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
       ValidTime = #{row.validTime,jdbcType=TIMESTAMP},
+      StartTime = #{row.startTime,jdbcType=TIMESTAMP},
+      EndTime = #{row.endTime,jdbcType=TIMESTAMP},
+      JobPlace = #{row.jobPlace,jdbcType=VARCHAR},
       PostDesc = #{row.postDesc,jdbcType=LONGVARCHAR}
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -505,7 +540,10 @@
       CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
       ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
       ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
-      ValidTime = #{row.validTime,jdbcType=TIMESTAMP}
+      ValidTime = #{row.validTime,jdbcType=TIMESTAMP},
+      StartTime = #{row.startTime,jdbcType=TIMESTAMP},
+      EndTime = #{row.endTime,jdbcType=TIMESTAMP},
+      JobPlace = #{row.jobPlace,jdbcType=VARCHAR}
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -591,6 +629,15 @@
       <if test="validTime != null">
         ValidTime = #{validTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="startTime != null">
+        StartTime = #{startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endTime != null">
+        EndTime = #{endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="jobPlace != null">
+        JobPlace = #{jobPlace,jdbcType=VARCHAR},
+      </if>
       <if test="postDesc != null">
         PostDesc = #{postDesc,jdbcType=LONGVARCHAR},
       </if>
@@ -625,6 +672,9 @@
       ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
       ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
       ValidTime = #{validTime,jdbcType=TIMESTAMP},
+      StartTime = #{startTime,jdbcType=TIMESTAMP},
+      EndTime = #{endTime,jdbcType=TIMESTAMP},
+      JobPlace = #{jobPlace,jdbcType=VARCHAR},
       PostDesc = #{postDesc,jdbcType=LONGVARCHAR}
     where PostID = #{postID,jdbcType=VARCHAR}
   </update>
@@ -655,7 +705,10 @@
       CreateTime = #{createTime,jdbcType=TIMESTAMP},
       ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
       ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
-      ValidTime = #{validTime,jdbcType=TIMESTAMP}
+      ValidTime = #{validTime,jdbcType=TIMESTAMP},
+      StartTime = #{startTime,jdbcType=TIMESTAMP},
+      EndTime = #{endTime,jdbcType=TIMESTAMP},
+      JobPlace = #{jobPlace,jdbcType=VARCHAR}
     where PostID = #{postID,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 2 - 1
src/main/resources/mapping/cquery/PostCQuery.xml

@@ -32,7 +32,7 @@
         <if test="companyID != null and companyID != ''">
             and post.CompanyID = #{companyID}
         </if>
-
+          order by post.CreateTime desc
     </select>
     <select id="selectRecommendPostList" resultType="com.hz.employmentsite.vo.companyService.RecommendPostVo">
         select post.*,recommend.recommendID,jobhunt.JobUserID,recommend.isRead,recommend.isSendNotes,company.CompanyName,company.InsuredCount  from
@@ -41,5 +41,6 @@
                 left join (select * from pc_recommend where JobUserID= #{jobUserID}) recommend on post.PostID = recommend.PostID
                 left join pc_jobhunt jobhunt on post.PostID = jobhunt.PostID
         where jobhunt.JobUserID = #{jobUserID}
+        order by post.CreateTime desc
     </select>
 </mapper>

+ 12 - 0
vue/src/api/companyService/post.ts

@@ -36,6 +36,18 @@ export function save(data: any) {
   })
 }
 
+export  function  savePostList(data:any){
+  return request({
+    url: 'companyService/post/savePostList',
+    method: 'post',
+    data: data
+  }, {
+    isNew: true,
+    successMsg: '提交成功!',
+    errorMsg: '提交失败!'
+  });
+}
+
 export function del(id: any) {
   return request<object>(
     {

+ 11 - 6
vue/src/views/companyService/company/edit.vue

@@ -88,13 +88,13 @@
           <a-form-item
             label="是否缺工"
             :label-col="{ span: 8 }"
-            name="recordStatus"
+            name="isShortage"
             :rules="[{ required: true, message: '请选择是否缺工!' }]"
           >
             <a-select
               ref="select"
-              v-model:value="dataModel.recordStatus"
-              :options="companyStatusList"
+              v-model:value="dataModel.isShortage"
+              :options="shortageStatusList"
               :field-names="{ label: 'name', value: 'value' }"
             >
             </a-select>
@@ -293,6 +293,11 @@ export default defineComponent(
         {value: 1, name: '在营'},
         {value: 0, name: '停业'},
       ]);
+      const shortageStatusList = ref<SelectProps['options']>([
+        {value: 1, name: '是'},
+        {value: 0, name: '否'},
+      ]);
+
       const regionList = ref<SelectProps['options']>();
       const streetList = ref<SelectProps['options']>();
       const companyModelList = ref<SelectProps['options']>();
@@ -344,7 +349,7 @@ export default defineComponent(
       const onFinish = () => {
         console.log(showPicker.value);
         if (showPicker.value === '1') {
-          formState.dataModel.validTime = '长期';
+          formState.dataModel.validTime = '2099-12-31';
         } else {
           formState.dataModel.validTime = showDateTime.value;
         }
@@ -360,12 +365,11 @@ export default defineComponent(
         getCompanyModelList();
         getCompanyById(id).then(result => {
           formState.dataModel = result;
-          showPicker.value = formState.dataModel.validTime == '长期' ? '1' : '2';
+          showPicker.value = formState.dataModel.validTime == '2099-12-31' ? '1' : '2';
           if (showPicker.value === '1')
             showDateTime.value = dayjs(new Date().toLocaleDateString().replaceAll("/", "-"));
           else
             showDateTime.value = formState.dataModel.validTime;
-          console.log(showDateTime);
           changeCity();
         })
       };
@@ -385,6 +389,7 @@ export default defineComponent(
         changeCity,
         showDateTime,
         regionChange,
+        shortageStatusList
       }
     },
     created() {

+ 308 - 266
vue/src/views/companyService/post/edit.vue

@@ -1,281 +1,275 @@
 <template>
   <div class="card-edit">
-    <a-form :model="dataModel" autocomplete="off" @finish="onFinish">
-      <a-divider orientation="left">岗位信息管理</a-divider>
-
-      <a-row :gutter="24">
-        <a-col :span="8">
-          <a-form-item
-            label="岗位名称"
-            :label-col="{ span: 6 }"
-            name="postName"
-            :rules="[{ required: true, message: '请输入岗位名称!' }]"
-          >
-            <a-input v-model:value="dataModel.postName" placeholder=""/>
-          </a-form-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-item
-            label="有效开始时间"
-            :label-col="{ span: 6 }"
-            name="validTime"
-            :rules="[{ required: true, message: '请输入招聘有效开始时间' }]"
-          >
-            <a-date-picker
-              v-model:value="dataModel.validTime"
-              picker="date"
-              value-format="YYYY-MM-DD"
-            />
-          </a-form-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-item
-            label="有效期(天)"
-            :label-col="{ span: 6 }"
-            name="validDay"
-            :rules="[{ required: true, message: '请输入有效期(天)!' }]"
-          >
-            <a-input v-model:value="dataModel.validDay" placeholder=""/>
-          </a-form-item>
-        </a-col>
-      </a-row>
-
-
-      <a-row :gutter="24">
-        <a-col :span="8">
-          <a-form-item
-            label="岗位状态"
-            :label-col="{ span: 6 }"
-            name="recordStatus"
-            :rules="[{ required: true, message: '请岗位状态!' }]"
-          >
-            <a-select
-              ref="select"
-              v-model:value="dataModel.recordStatus"
-              :options="postStatusList"
-              :field-names="{ label: 'name', value: 'value' }"
-            >
-            </a-select>
-          </a-form-item>
-        </a-col>
-        <a-col :span="8">
+    <!--      <a-divider orientation="left">关联企业信息</a-divider>-->
+    <a-form :model="postCompany" autocomplete="off">
+      <h1>关联企业信息</h1>
+      <a-row>
+        <a-col flex="800px">
           <a-form-item
-            label="所属企业"
-            :label-col="{ span: 6 }"
-            name="companyID"
-            :rules="[{ required: true, message: '请选择企业!' }]"
+            label="企业名称"
+            :label-col="{ span: 3}"
+            name="companyId"
+            :rules="[{ required: true, message: '请输入企业名称!' }]"
           >
             <a-select
               ref="select"
-              v-model:value="dataModel.companyID"
-              :options="companyList"
-              :field-names="{ label: 'companyName', value: 'companyID' }"
+              show-search optionFilterProp="label"
+              v-model:value="postCompany.companyId"
             >
+              <a-select-option v-for="item in companyList" :label="item.companyName" :value="item.companyID"
+                               :key="item.companyID">
+                <span>{{ item.companyName }}</span>
+              </a-select-option>
             </a-select>
           </a-form-item>
         </a-col>
-        <a-col :span="8">
-          <a-form-item
-            label="工作性质"
-            :label-col="{ span: 6 }"
-            name="workNature"
-            :rules="[{ required: true, message: '请输入工作性质!' }]"
-          >
-            <a-input v-model:value="dataModel.workNature" placeholder=""/>
-          </a-form-item>
-        </a-col>
       </a-row>
+    </a-form>
+    <a-row>
+      <a-col :span="2">
+        <h1>岗位管理</h1>
+      </a-col>
+      <a-col :span="22" style="text-align: right;">
+        <Space>
+          <a-button @click="addPost">
+            <template #icon>
+              <plus-circle-outlined/>
+            </template>
+            新增
+          </a-button>
+        </Space>
+      </a-col>
+    </a-row>
+    <!--      <a-divider orientation="left">岗位管理</a-divider>-->
+    <div v-for="(item,index) in postDataList" style="border: 1px solid;margin-bottom: 20px;" :key="index">
+      <h1>基础信息</h1>
+      <a-form :model="item" autocomplete="off">
+        <a-row :gutter="24">
+          <a-col flex="400px">
+            <a-form-item
+              label="岗位名称"
+              :label-col="{ span: 6 }"
+              :wrapper-col="{ span: 18 }"
+              name="postName"
+              :rules="[{ required: true, message: '请输入岗位名称!' }]"
+            >
+              <a-input v-model:value="item.postName" placeholder=""/>
+            </a-form-item>
+          </a-col>
+          <a-col flex="400px">
+            <a-form-item
+              label="招聘人数"
+              :label-col="{ span: 6 }"
+              :wrapper-col="{ span: 18 }"
+              name="recruitCount"
+              :rules="[{ required: true, message: '请输入招聘人数!' }]"
+            >
+              <a-input v-model:value="item.recruitCount" placeholder=""/>
+            </a-form-item>
+          </a-col>
+          <a-col flex="300px" :offset="1">
+            <a-form-item
+              label="招聘日期"
+              :label-col="{ span: 8 }"
+              name="startTime"
+              :rules="[{ required: true, message: '请输入招聘开始时间' }]"
+            >
+              <a-date-picker
+                v-model:value="item.startTime"
+                picker="date"
+                value-format="YYYY-MM-DD"
+              />
+            </a-form-item>
+          </a-col>
+          至
+          <a-col flex="200px">
+            <a-form-item
+              name="endTime"
+              :rules="[{ required: true, message: '请输入招聘结束时间' }]"
+            >
+              <a-date-picker
+                v-model:value="item.endTime"
+                picker="date"
+                value-format="YYYY-MM-DD"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
 
+        <a-row>
+          <a-col class="table-bottom-a1" span="22">
+            <a-form-item :label-col="{span:2}" name="jobPlace" label="招聘地点"
+                         :rules="[{ required: true, message: '请输入招聘地点' }]"
+            >
+              <a-textarea v-model:value="item.jobPlace" placeholder="" :rows="4"/>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <h1>其他信息</h1>
+        <a-row>
+          <a-col flex="300px" style="margin-left: 3px;">
+            <a-form-item
+              label="岗位月薪(元)"
+              name="maxSalary"
+              :label-col="{span:9}"
+              :rules="[{ required: false, message: '请输入金额!' }]"
+            >
+              <a-input v-model:value="item.maxSalary" placeholder="请输入金额"/>
+            </a-form-item>
+          </a-col>
+          &nbsp; 至 &nbsp;
+          <a-col flex="200px">
+            <a-form-item
+              :label-col="{ span: 6 }"
+              name="minSalary"
+              :rules="[{ required: false, message: '请输入金额' }]"
+            >
+              <a-input v-model:value="item.minSalary" placeholder="请输入金额"/>
+            </a-form-item>
+          </a-col>
+          <a-col flex="400px">
+            <a-form-item
+              label="是否试用期"
+              :label-col="{ span: 9 }"
+              name="isTrail"
+              :rules="[{ required: false, message: '请选择是否试用期!' }]"
+            >
+              <a-select
+                ref="select"
+                v-model:value="item.isTrail"
+                :options="trialStatusList"
+                :field-names="{ label: 'name', value: 'value' }"
+              >
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col flex="400px" :offset="1">
+            <a-form-item
+              label="试用期时长(月)"
+              :label-col="{ span: 9 }"
+              name="trailtime"
+              :rules="[{ required: false, message: '请选择试用期时长!' }]"
+            >
+              <a-input v-model:value="item.trailtime" placeholder=""/>
+            </a-form-item>
+          </a-col>
+        </a-row>
 
-      <a-row :gutter="24">
-        <a-col :span="8">
-          <a-form-item
-            label="工作年限"
-            :label-col="{ span: 6 }"
-            name="workYear"
-            :rules="[{ required: true, message: '请输入工作年限!' }]"
-          >
-            <a-input v-model:value="dataModel.workYear" placeholder=""/>
-          </a-form-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-item
-            label="招聘人数"
-            :label-col="{ span: 6 }"
-            name="recruitCount"
-            :rules="[{ required: true, message: '请输入招聘人数!' }]"
-          >
-            <a-input v-model:value="dataModel.recruitCount" placeholder=""/>
-          </a-form-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-item
-            label="文化程度"
-            :label-col="{ span: 6 }"
-            name="cultureRank"
-            :rules="[{ required: true, message: '请选择文化程度!' }]"
-          >
-            <a-select
-              ref="select"
-              v-model:value="dataModel.cultureRank"
-              :options="cultureLevelList"
-              :field-names="{ label: 'name', value: 'value' }"
+        <a-row>
+          <a-col flex="300px" style="margin-left: 3px;">
+            <a-form-item
+              label="试用期(元)"
+              name="trailMaxSalary"
+              :label-col="{span:9}"
+              :rules="[{ required: false, message: '请输入金额!' }]"
             >
-            </a-select>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="8">
-          <a-form-item
-            label="最高薪酬"
-            :label-col="{ span: 6 }"
-            name="maxSalary"
-            :rules="[{ required: true, message: '请输入最高薪酬!' }]"
-          >
-            <a-input v-model:value="dataModel.maxSalary" placeholder=""/>
-          </a-form-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-item
-            label="最低薪酬"
-            :label-col="{ span: 6 }"
-            name="minSalary"
-            :rules="[{ required: true, message: '请输入最低薪酬!' }]"
-          >
-            <a-input v-model:value="dataModel.minSalary" placeholder=""/>
-          </a-form-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-item
-            label="福利待遇"
-            :label-col="{ span: 6 }"
-            name="welfare"
-            :rules="[{ required: true, message: '请输入福利待遇!' }]"
-          >
-            <a-input v-model:value="dataModel.welfare" placeholder=""/>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="8">
-          <a-form-item
-            label="联系人"
-            :label-col="{ span: 6 }"
-            name="userName"
-            :rules="[{ required: true, message: '请选择联系人!' }]"
-          >
-            <a-input v-model:value="dataModel.userName" placeholder=""/>
-          </a-form-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-item
-            label="联系电话"
-            :label-col="{ span: 6 }"
-            name="userMobile"
-            :rules="[{ required: true, message: '请输入联系电话!' }]"
-          >
-            <a-input v-model:value="dataModel.userMobile" placeholder=""/>
-          </a-form-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-item
-            label="邮箱"
-            :label-col="{ span: 6 }"
-            name="postEmail"
-            :rules="[{ required: true, message: '请输入邮箱!' }]"
-          >
-            <a-input v-model:value="dataModel.postEmail" placeholder=""/>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="8">
-          <a-form-item
-            label="工作时长"
-            :label-col="{ span: 6 }"
-            name="workTime"
-            :rules="[{ required: true, message: '请输入工作时长!' }]"
-          >
-            <a-input v-model:value="dataModel.workTime" placeholder=""/>
-          </a-form-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-item
-            label="是否试用期"
-            :label-col="{ span: 6 }"
-            name="isTrail"
-            :rules="[{ required: true, message: '请选择是否试用期!' }]"
-          >
-            <a-select
-              ref="select"
-              v-model:value="dataModel.isTrail"
-              :options="trialStatusList"
-              :field-names="{ label: 'name', value: 'value' }"
+              <a-input v-model:value="item.trailMaxSalary" placeholder="请输入金额"/>
+            </a-form-item>
+          </a-col>
+          &nbsp; 至 &nbsp;
+          <a-col flex="200px">
+            <a-form-item
+              :label-col="{ span: 6 }"
+              name="trailMinSalary"
+              :rules="[{ required: false, message: '请输入金额' }]"
             >
-            </a-select>
-          </a-form-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-item
-            label="试用期时长(月)"
-            :label-col="{ span: 6 }"
-            name="trailtime"
-            :rules="[{ required: true, message: '请选择试用期时长!' }]"
-          >
-            <a-input v-model:value="dataModel.trailtime" placeholder=""/>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="8">
-          <a-form-item
-            label="试用期最高薪酬"
-            :label-col="{ span: 6 }"
-            name="trailMaxSalary"
-            :rules="[{ required: true, message: '请输入试用期最高薪酬!' }]"
-          >
-            <a-input v-model:value="dataModel.trailMaxSalary" placeholder=""/>
-          </a-form-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-item
-            label="试用期最低薪酬"
-            :label-col="{ span: 6 }"
-            name="trailMinSalary"
-            :rules="[{ required: true, message: '请输入试用期最低薪酬!' }]"
-          >
-            <a-input v-model:value="dataModel.trailMinSalary" placeholder=""/>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-divider orientation="left">其他信息</a-divider>
-      <a-row>
-        <a-col class="table-bottom-a1">
-          <a-form-item :label-col="{span:8}" label="" name="postDesc">
-            <a-textarea v-model:value="dataModel.postDesc" placeholder="岗位描述" :rows="4"/>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-form-item class="buttom-btns">
-        <a-button @click="onClose">取消</a-button>
-        <a-button type="primary" html-type="submit">提交</a-button>
-      </a-form-item>
-    </a-form>
+              <a-input v-model:value="item.trailMinSalary" placeholder="请输入金额"/>
+            </a-form-item>
+          </a-col>
+          <a-col flex="400px">
+            <a-form-item
+              label="工作年限"
+              :label-col="{ span: 9 }"
+              name="workYear"
+              :rules="[{ required: false, message: '请选择工作年限!' }]"
+            >
+              <a-select
+                ref="select"
+                v-model:value="item.workYear"
+                :options="WorkYearTypelList"
+                :field-names="{ label: 'name', value: 'value' }"
+              >
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col flex="400px" :offset="1">
+            <a-form-item
+              label="学历要求"
+              :label-col="{ span: 9 }"
+              name="trailtime"
+              :rules="[{ required: false, message: '请选择试用期时长!' }]"
+            >
+              <a-select
+                ref="select"
+                v-model:value="item.cultureRank"
+                :options="cultureLevelList"
+                :field-names="{ label: 'name', value: 'value' }"
+              >
+              </a-select>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col class="table-bottom-a1" span="22">
+            <a-form-item :label-col="{span:2}" name="welfare" label="福利待遇">
+              <a-textarea v-model:value="item.welfare" placeholder="" :rows="4"/>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col class="table-bottom-a1" span="22">
+            <a-form-item :label-col="{span:2}" name="postDesc" label="其他要求">
+              <a-textarea v-model:value="item.postDesc" placeholder="" :rows="4"/>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col style="text-align: right;" span="23">
+            <a-button type="danger" @click="delPostItem(index)">删除</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <a-form-item class="buttom-btns">
+      <a-button @click="onClose">取消</a-button>
+      <a-button type="primary" @click="onFinish">提交</a-button>
+    </a-form-item>
   </div>
 </template>
 
 <script lang="ts">
-import {defineComponent, reactive, ref, toRefs} from 'vue';
+// import {defineComponent, reactive, ref, toRefs} from 'vue';
+import {defineComponent, reactive, ref} from 'vue';
 import {useRouter} from 'vue-router';
-import {save, getPostByID} from '@/api/companyService/post'
+// import {save, getPostByID,savePostList} from '@/api/companyService/post'
+import {savePostList} from '@/api/companyService/post'
 import type {SelectProps} from 'ant-design-vue';
 import {useTabsViewStore} from '@/store/modules/tabsView';
 import BUploadFile from '@/components/file/uploadFile.vue';
 import {get} from '@/api/common';
 
-interface FormState {
-  dataModel: any;
+interface postModel {
+  postName: string | null,
+  recruitCount: number | null,
+  startTime: string | null,
+  endTime: string | null,
+  jobPlace: string | null,
+  maxSalary: number | null,
+  minSalary: number | null,
+  isTrail: number | null,
+  trailtime: string | null,
+  trailMaxSalary: number | null,
+  trailMinSalary: number | null,
+  workYear: number | null,
+  cultureRank: number | null,
+  welfare: string | null,
+  postDesc: string | null,
+  companyID: string | null
+  recordStatus: number | null,
+}
+
+interface companyModel {
+  companyId: string | null;
 }
 
 export default defineComponent(
@@ -283,21 +277,51 @@ export default defineComponent(
     name: 'PostEdit',
     components: {BUploadFile},
     setup() {
-      const formState = reactive<FormState>({dataModel: {}});
+      const postCompany=reactive<companyModel>({companyId:null});//关联企业信息
       const router = useRouter();
       const fullpath = router.currentRoute.value.fullPath;
       const tabsViewStore = useTabsViewStore();
 
-
       const cultureLevelList = ref<SelectProps['options']>();
+      const WorkYearTypelList = ref<SelectProps['options']>();
       const companyList = ref<SelectProps['options']>();
       const postStatusList = [{name: '启用', value: 1}, {name: '停用', value: 0}];
       const trialStatusList = [{name: '是', value: true}, {name: '否', value: false}];
 
+      const postDataList = ref<postModel[]>([]);
+      const addPost = () => {
+        (postDataList.value as any[]).push({
+          postName: '',
+          recruitCount: null,
+          startTime: null,
+          endTime: null,
+          jobPlace: null,
+          maxSalary: null,
+          minSalary: null,
+          isTrail: null,
+          trailtime: null,
+          trailMaxSalary: null,
+          trailMinSalary: null,
+          workYear: null,
+          cultureRank: null,
+          welfare: null,
+          postDesc: null,
+          companyID: null
+        });
+      }
+
+      const delPostItem = (index) => {
+        (postDataList.value as any[]).splice(index, 1);
+      }
+
       get('system/dictionary/getDictionaryItemByCodeList', {code: 'CultureLevel'}).then(result => {
         cultureLevelList.value = result;
       });
 
+      get('system/dictionary/getDictionaryItemByCodeList', {code: 'WorkYearType'}).then(result => {
+        WorkYearTypelList.value = result;
+      });
+
       get('companyService/company/getList', {pageIndex: 1, pageSize: 999}).then(result => {
         companyList.value = result.list;
         console.log(companyList);
@@ -310,7 +334,11 @@ export default defineComponent(
       };
 
       const onFinish = () => {
-        save(formState.dataModel).then((result) => {
+        postDataList.value.forEach(item => {
+          item.companyID = postCompany.companyId + "";
+          item.recordStatus = 1;
+        })
+        savePostList(postDataList.value).then((result) => {
           if (result) {
             tabsViewStore.closeCurrentTab(fullpath);
             tabsViewStore.addTabByPath('/companyService/post/index', {reload: 1});
@@ -318,27 +346,41 @@ export default defineComponent(
         });
       }
 
-      const loadData = (id: any) => {
-        getPostByID(id).then(result => {
-          formState.dataModel = result;
-        })
-      };
+      // const loadData = (id: any) => {
+      //   getPostByID(id).then(result => {
+      //     formState.dataModel = result;
+      //   })
+      // };
 
       return {
-        ...toRefs(formState),
-        loadData,
+        // ...toRefs(formState),
+        // loadData,
         onClose,
         onFinish,
         companyList,
         postStatusList,
         trialStatusList,
-        cultureLevelList
+        cultureLevelList,
+        postDataList,
+        addPost,
+        WorkYearTypelList,
+        delPostItem,
+        postCompany
       }
     },
     created() {
-      const id = history.state.params?.id;
-      this.loadData(id);
+      // const id = history.state.params?.id;
+      // this.loadData(id);
     }
   })
 </script>
 
+<style>
+h1 {
+  font-size: 18px;
+  font-weight: bold;
+  color: rgb(24, 144, 255);
+  margin-bottom: 10px;
+}
+</style>
+

+ 29 - 7
vue/src/views/companyService/post/index.vue

@@ -18,7 +18,15 @@
         </a-col>
         <a-col :span="6">
           <a-form-item label="招聘企业" :label-col="{span:6}" name="companyName">
-            <a-input v-model:value="searchParams.companyName" placeholder=""/>
+            <!--            <a-input v-model:value="searchParams.companyName" placeholder=""/>-->
+            <a-select ref="select" @change="loadData"
+                      show-search optionFilterProp="label"
+                      v-model:value="searchParams.companyName">
+              <a-select-option v-for="item in companyList" :label="item.companyName" :value="item.companyName"
+                               :key="item.companyID">
+                <span>{{ item.companyName }}</span>
+              </a-select-option>
+            </a-select>
           </a-form-item>
         </a-col>
         <a-col :span="6" style="text-align: left">
@@ -30,13 +38,14 @@
                 formRef.resetFields();
                 loadData();
               }
-            ">重置</a-button>
+            ">重置
+          </a-button>
           <a style="font-size: 12px" @click="expand = !expand">
             <template v-if="expand">
-              <UpOutlined />
+              <UpOutlined/>
             </template>
             <template v-else>
-              <DownOutlined />
+              <DownOutlined/>
             </template>
             {{ expand ? '收缩' : '展开' }}
           </a>
@@ -100,7 +109,7 @@
 import {reactive, ref, computed, defineComponent, createVNode} from 'vue';
 import {DownOutlined, UpOutlined} from '@ant-design/icons-vue';
 import type {FormInstance} from 'ant-design-vue';
-import {Modal} from 'ant-design-vue';
+import {Modal, SelectProps} from 'ant-design-vue';
 import type {TableColumnsType, TableProps} from 'ant-design-vue';
 import {getList, del} from '@/api/companyService/post';
 import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
@@ -111,6 +120,7 @@ import dayjs from 'dayjs';
 import {useRoute} from 'vue-router';
 import {useTabsViewStore} from "@/store/modules/tabsView";
 import type {ImportProps} from "@/components/basic/excel/importExcel/ImportProps";
+import {get} from "@/api/common";
 
 export default defineComponent({
   components: {DownOutlined, UpOutlined, BExportExcel, BImportExcel},
@@ -125,6 +135,7 @@ export default defineComponent({
       recordStatus: null
     });
     const expand = ref(false);
+    const companyList = ref<SelectProps['options']>();
     const postStatusList = [{name: '启用', value: 1}, {name: '停用', value: 0}];
     const importOptions = ref<ImportProps>({
       title: '导入',
@@ -188,7 +199,7 @@ export default defineComponent({
       {title: '文化程度', dataIndex: 'cultureLevelName', key: 'cultureLevelName', align: "center"},
       {
         title: '薪酬', dataIndex: 'siteCount', key: 'siteCount', align: "center", customRender: (item) => {
-          const salary = `${item.record.minSalary??""}~${item.record.maxSalary??""}`
+          const salary = `${item.record.minSalary ?? ""}~${item.record.maxSalary ?? ""}`
           return salary;
         }
       },
@@ -230,6 +241,14 @@ export default defineComponent({
       loadData();
     };
 
+    const getCompanyList = () => {
+      console.log('getCompanyList');
+      get('companyService/company/getList', {pageIndex: 1, pageSize: 999}).then(result => {
+        companyList.value = result.list;
+        console.log(companyList.value);
+      })
+    }
+
     const onSelectChange = (selectedRowKeys: any) => {
       formState.selectedRowKeys = selectedRowKeys;
     };
@@ -283,11 +302,14 @@ export default defineComponent({
       onAdd,
       onEdit,
       expand,
-      postStatusList
+      postStatusList,
+      getCompanyList,
+      companyList
     };
   },
   created() {
     this.loadData();
+    this.getCompanyList();
   },
   activated() {
     const route = useRoute();