Ver código fonte

fix: 就业活动调整

zhangying 8 meses atrás
pai
commit
20e27d5ab0

+ 12 - 0
doc/待更新脚本.txt

@@ -0,0 +1,12 @@
+-- 2024-7-8 就业活动类型字典
+INSERT INTO `sys_dictionary` VALUES ('JobFairActivityType', '就业活动类型', 109, 1);
+INSERT INTO `sys_dictionary_item` VALUES ('1ecc5294-51f6-4a10-add2-e63f7ac78001', '', 'JobFairActivityType', 1, '招聘活动', 1, 1, 1);
+INSERT INTO `sys_dictionary_item` VALUES ('1ecc5294-51f6-4a10-add2-e63f7ac78002', '', 'JobFairActivityType', 2, '职业指导活动', 2, 1, 1);
+INSERT INTO `sys_dictionary_item` VALUES ('1ecc5294-51f6-4a10-add2-e63f7ac78003', '', 'JobFairActivityType', 3, '政策宣传活动', 3, 1, 1);
+INSERT INTO `sys_dictionary_item` VALUES ('1ecc5294-51f6-4a10-add2-e63f7ac78004', '', 'JobFairActivityType', 4, '对接活动', 4, 1, 1);
+INSERT INTO `sys_dictionary_item` VALUES ('1ecc5294-51f6-4a10-add2-e63f7ac78005', '', 'JobFairActivityType', 5, '求职者对接活动', 5, 1, 1);
+INSERT INTO `sys_dictionary_item` VALUES ('1ecc5294-51f6-4a10-add2-e63f7ac78006', '', 'JobFairActivityType', 6, '其他活动', 6, 1, 1);
+
+-- 2024-7-8 就业活动增加字段
+ALTER TABLE `pc_jobfairs` ADD COLUMN `ActivityType` int NULL COMMENT '招聘活动类型' AFTER `JobFariDesc`;
+ALTER TABLE `pc_jobfairs` ADD COLUMN `SiteID` varchar(50) NULL COMMENT '所属驿站' AFTER `RegionCode`;

+ 12 - 1
h5app/src/views/pages/jobFair/detail.vue

@@ -15,6 +15,10 @@
           <ion-label>活动名称</ion-label>
           <ion-text>{{ jobFair.dataModel.name }}</ion-text>
         </div>
+        <div class="form-detail">
+          <ion-label>活动类型</ion-label>
+          <ion-text>{{ jobFair.dataModel.activityTypeName }}</ion-text>
+        </div>
         <div class="form-detail">
           <ion-label>主办单位</ion-label>
           <ion-text>{{ jobFair.dataModel.zbUnit }}</ion-text>
@@ -35,7 +39,8 @@
         </div>
         <div class="form-detail">
           <ion-label>活动时间</ion-label>
-          <ion-text>{{ dayjs(jobFair.dataModel.startTime).format("YYYY-MM-DD") }} 至
+          <ion-text v-if="jobFair.dataModel.startTime && jobFair.dataModel.endTime">
+            {{ dayjs(jobFair.dataModel.startTime).format("YYYY-MM-DD") }} 至
             {{ dayjs(jobFair.dataModel.endTime).format("YYYY-MM-DD") }}
           </ion-text>
         </div>
@@ -51,6 +56,10 @@
           <ion-label>所属县区</ion-label>
           <ion-text>{{ jobFair.dataModel.regionName }}</ion-text>
         </div>
+        <div class="form-detail">
+          <ion-label>所属驿站</ion-label>
+          <ion-text>{{ jobFair.dataModel.siteName }}</ion-text>
+        </div>
         <div class="form-detail">
           <ion-label>摊位数</ion-label>
           <ion-text>{{ jobFair.dataModel.boothCount }}</ion-text>
@@ -92,6 +101,7 @@ const jobFair = reactive({
   dataModel: {
     jobfairsID: "",
     name: "",
+    activityTypeName: "",
     zbUnit: "",
     cbUnit: "",
     address: "",
@@ -101,6 +111,7 @@ const jobFair = reactive({
     userName: "",
     userMrobile: "",
     regionName: "",
+    siteName: "",
     boothCount: "",
     displayCount: "",
     isMake: "",

+ 25 - 0
src/main/java/com/hz/employmentsite/model/PcJobfairs.java

@@ -1,5 +1,8 @@
 package com.hz.employmentsite.model;
 
+import com.hz.employmentsite.util.datarange.annotations.RegionID;
+import com.hz.employmentsite.util.datarange.annotations.SiteID;
+
 import java.math.BigDecimal;
 import java.util.Date;
 
@@ -72,10 +75,16 @@ public class PcJobfairs {
 
     private Integer boothCount;
 
+    @RegionID
     private String regionCode;
 
+    @SiteID
+    private String siteID;
+
     private String jobFariDesc;
 
+    private Integer activityType;
+
     public String getJobfairsID() {
         return jobfairsID;
     }
@@ -356,6 +365,14 @@ public class PcJobfairs {
         this.regionCode = regionCode == null ? null : regionCode.trim();
     }
 
+    public String getSiteID() {
+        return siteID;
+    }
+
+    public void setSiteID(String siteID) {
+        this.siteID = siteID == null ? null : siteID.trim();
+    }
+
     public String getJobFariDesc() {
         return jobFariDesc;
     }
@@ -363,4 +380,12 @@ public class PcJobfairs {
     public void setJobFariDesc(String jobFariDesc) {
         this.jobFariDesc = jobFariDesc == null ? null : jobFariDesc.trim();
     }
+
+    public Integer getActivityType() {
+        return activityType;
+    }
+
+    public void setActivityType(Integer activityType) {
+        this.activityType = activityType;
+    }
 }

+ 130 - 0
src/main/java/com/hz/employmentsite/model/PcJobfairsExample.java

@@ -2426,6 +2426,76 @@ public class PcJobfairsExample {
             return (Criteria) this;
         }
 
+        public Criteria andSiteIDIsNull() {
+            addCriterion("SiteID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSiteIDIsNotNull() {
+            addCriterion("SiteID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSiteIDEqualTo(String value) {
+            addCriterion("SiteID =", value, "siteID");
+            return (Criteria) this;
+        }
+
+        public Criteria andSiteIDNotEqualTo(String value) {
+            addCriterion("SiteID <>", value, "siteID");
+            return (Criteria) this;
+        }
+
+        public Criteria andSiteIDGreaterThan(String value) {
+            addCriterion("SiteID >", value, "siteID");
+            return (Criteria) this;
+        }
+
+        public Criteria andSiteIDGreaterThanOrEqualTo(String value) {
+            addCriterion("SiteID >=", value, "siteID");
+            return (Criteria) this;
+        }
+
+        public Criteria andSiteIDLessThan(String value) {
+            addCriterion("SiteID <", value, "siteID");
+            return (Criteria) this;
+        }
+
+        public Criteria andSiteIDLessThanOrEqualTo(String value) {
+            addCriterion("SiteID <=", value, "siteID");
+            return (Criteria) this;
+        }
+
+        public Criteria andSiteIDLike(String value) {
+            addCriterion("SiteID like", value, "siteID");
+            return (Criteria) this;
+        }
+
+        public Criteria andSiteIDNotLike(String value) {
+            addCriterion("SiteID not like", value, "siteID");
+            return (Criteria) this;
+        }
+
+        public Criteria andSiteIDIn(List<String> values) {
+            addCriterion("SiteID in", values, "siteID");
+            return (Criteria) this;
+        }
+
+        public Criteria andSiteIDNotIn(List<String> values) {
+            addCriterion("SiteID not in", values, "siteID");
+            return (Criteria) this;
+        }
+
+        public Criteria andSiteIDBetween(String value1, String value2) {
+            addCriterion("SiteID between", value1, value2, "siteID");
+            return (Criteria) this;
+        }
+
+        public Criteria andSiteIDNotBetween(String value1, String value2) {
+            addCriterion("SiteID not between", value1, value2, "siteID");
+            return (Criteria) this;
+        }
+
         public Criteria andJobFariDescIsNull() {
             addCriterion("JobFariDesc is null");
             return (Criteria) this;
@@ -2495,6 +2565,66 @@ public class PcJobfairsExample {
             addCriterion("JobFariDesc not between", value1, value2, "jobFariDesc");
             return (Criteria) this;
         }
+
+        public Criteria andActivityTypeIsNull() {
+            addCriterion("ActivityType is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andActivityTypeIsNotNull() {
+            addCriterion("ActivityType is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andActivityTypeEqualTo(Integer value) {
+            addCriterion("ActivityType =", value, "activityType");
+            return (Criteria) this;
+        }
+
+        public Criteria andActivityTypeNotEqualTo(Integer value) {
+            addCriterion("ActivityType <>", value, "activityType");
+            return (Criteria) this;
+        }
+
+        public Criteria andActivityTypeGreaterThan(Integer value) {
+            addCriterion("ActivityType >", value, "activityType");
+            return (Criteria) this;
+        }
+
+        public Criteria andActivityTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("ActivityType >=", value, "activityType");
+            return (Criteria) this;
+        }
+
+        public Criteria andActivityTypeLessThan(Integer value) {
+            addCriterion("ActivityType <", value, "activityType");
+            return (Criteria) this;
+        }
+
+        public Criteria andActivityTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("ActivityType <=", value, "activityType");
+            return (Criteria) this;
+        }
+
+        public Criteria andActivityTypeIn(List<Integer> values) {
+            addCriterion("ActivityType in", values, "activityType");
+            return (Criteria) this;
+        }
+
+        public Criteria andActivityTypeNotIn(List<Integer> values) {
+            addCriterion("ActivityType not in", values, "activityType");
+            return (Criteria) this;
+        }
+
+        public Criteria andActivityTypeBetween(Integer value1, Integer value2) {
+            addCriterion("ActivityType between", value1, value2, "activityType");
+            return (Criteria) this;
+        }
+
+        public Criteria andActivityTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("ActivityType not between", value1, value2, "activityType");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

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

@@ -56,6 +56,7 @@ public class JobFairsServiceImpl implements JobFairsService {
         jobfairs.setUserName(jobFairsVo.getUserName());
         jobfairs.setUserMrobile(jobFairsVo.getUserMrobile());
         jobfairs.setRegionCode(jobFairsVo.getRegionCode());
+        jobfairs.setSiteID(jobFairsVo.getSiteID());
         jobfairs.setBoothCount(jobFairsVo.getBoothCount());
         jobfairs.setDisplayCount(jobFairsVo.getDisplayCount());
         jobfairs.setIsMake(jobFairsVo.getIsMake());
@@ -63,6 +64,7 @@ public class JobFairsServiceImpl implements JobFairsService {
         jobfairs.setLatitude(jobFairsVo.getLatitude());
         jobfairs.setCarLine(jobFairsVo.getCarLine());
         jobfairs.setJobFariDesc(jobFairsVo.getJobFariDesc());
+        jobfairs.setActivityType(jobFairsVo.getActivityType());
 
         if (selData == null) {
             // 添加

+ 85 - 1
src/main/java/com/hz/employmentsite/vo/jobUserManager/JobFairsVo.java

@@ -1,9 +1,93 @@
 package com.hz.employmentsite.vo.jobUserManager;
 
 import com.hz.employmentsite.model.PcJobfairs;
+import com.hz.employmentsite.util.datarange.annotations.RegionID;
+import com.hz.employmentsite.util.datarange.annotations.SiteID;
 import lombok.Data;
 
+import java.math.BigDecimal;
+import java.util.Date;
+
 @Data
 public class JobFairsVo extends PcJobfairs {
-    public String regionName;
+    private String jobfairsID;
+
+    private String name;
+
+    private String area;
+
+    private String address;
+
+    private String carLine;
+
+    private String userName;
+
+    private String userMrobile;
+
+    private BigDecimal rent;
+
+    private Date startTime;
+
+    private Date endTime;
+
+    private String desc;
+
+    private String placeImg;
+
+    private String lineImg;
+
+    private String placeNature;
+
+    private Integer displayCount;
+
+    private String displayDesc;
+
+    private String displayArea;
+
+    private String planImg;
+
+    private Integer placeColumn;
+
+    private Integer placeRow;
+
+    private String zbUnit;
+
+    private String xbUnit;
+
+    private String cbUnit;
+
+    private Boolean isMake;
+
+    private Boolean isSendEmail;
+
+    private Boolean isOffsite;
+
+    private String createUserID;
+
+    private Date createTime;
+
+    private String modifyUserID;
+
+    private Date modifyTime;
+
+    private Integer companyCount;
+
+    private String longitude;
+
+    private String latitude;
+
+    private Integer boothCount;
+
+    @RegionID
+    private String regionCode;
+    private String regionName;
+
+    @SiteID
+    private String siteID;
+    private String siteName;
+
+    private String jobFariDesc;
+
+    private Integer activityType;
+    private String activityTypeName;
 }

+ 163 - 132
src/main/resources/mapping/PcJobfairsMapper.xml

@@ -2,42 +2,44 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.hz.employmentsite.mapper.PcJobfairsMapper">
   <resultMap id="BaseResultMap" type="com.hz.employmentsite.model.PcJobfairs">
-    <id column="JobfairsID" jdbcType="VARCHAR" property="jobfairsID"/>
-    <result column="Name" jdbcType="VARCHAR" property="name"/>
-    <result column="Area" jdbcType="VARCHAR" property="area"/>
-    <result column="Address" jdbcType="VARCHAR" property="address"/>
-    <result column="CarLine" jdbcType="VARCHAR" property="carLine"/>
-    <result column="UserName" jdbcType="VARCHAR" property="userName"/>
-    <result column="UserMrobile" jdbcType="VARCHAR" property="userMrobile"/>
-    <result column="Rent" jdbcType="DECIMAL" property="rent"/>
-    <result column="StartTime" jdbcType="TIMESTAMP" property="startTime"/>
-    <result column="EndTime" jdbcType="TIMESTAMP" property="endTime"/>
-    <result column="Desc" jdbcType="VARCHAR" property="desc"/>
-    <result column="PlaceImg" jdbcType="VARCHAR" property="placeImg"/>
-    <result column="LineImg" jdbcType="VARCHAR" property="lineImg"/>
-    <result column="PlaceNature" jdbcType="VARCHAR" property="placeNature"/>
-    <result column="DisplayCount" jdbcType="INTEGER" property="displayCount"/>
-    <result column="DisplayDesc" jdbcType="VARCHAR" property="displayDesc"/>
-    <result column="DisplayArea" jdbcType="VARCHAR" property="displayArea"/>
-    <result column="PlanImg" jdbcType="VARCHAR" property="planImg"/>
-    <result column="PlaceColumn" jdbcType="INTEGER" property="placeColumn"/>
-    <result column="PlaceRow" jdbcType="INTEGER" property="placeRow"/>
-    <result column="ZbUnit" jdbcType="VARCHAR" property="zbUnit"/>
-    <result column="XbUnit" jdbcType="VARCHAR" property="xbUnit"/>
-    <result column="CbUnit" jdbcType="VARCHAR" property="cbUnit"/>
-    <result column="IsMake" jdbcType="BIT" property="isMake"/>
-    <result column="IsSendEmail" jdbcType="BIT" property="isSendEmail"/>
-    <result column="IsOffsite" jdbcType="BIT" property="isOffsite"/>
-    <result column="CreateUserID" jdbcType="VARCHAR" property="createUserID"/>
-    <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime"/>
-    <result column="ModifyUserID" jdbcType="VARCHAR" property="modifyUserID"/>
-    <result column="ModifyTime" jdbcType="TIMESTAMP" property="modifyTime"/>
-    <result column="CompanyCount" jdbcType="INTEGER" property="companyCount"/>
-    <result column="Longitude" jdbcType="VARCHAR" property="longitude"/>
-    <result column="Latitude" jdbcType="VARCHAR" property="latitude"/>
-    <result column="BoothCount" jdbcType="INTEGER" property="boothCount"/>
-    <result column="RegionCode" jdbcType="VARCHAR" property="regionCode"/>
-    <result column="JobFariDesc" jdbcType="VARCHAR" property="jobFariDesc"/>
+    <id column="JobfairsID" jdbcType="VARCHAR" property="jobfairsID" />
+    <result column="Name" jdbcType="VARCHAR" property="name" />
+    <result column="Area" jdbcType="VARCHAR" property="area" />
+    <result column="Address" jdbcType="VARCHAR" property="address" />
+    <result column="CarLine" jdbcType="VARCHAR" property="carLine" />
+    <result column="UserName" jdbcType="VARCHAR" property="userName" />
+    <result column="UserMrobile" jdbcType="VARCHAR" property="userMrobile" />
+    <result column="Rent" jdbcType="DECIMAL" property="rent" />
+    <result column="StartTime" jdbcType="TIMESTAMP" property="startTime" />
+    <result column="EndTime" jdbcType="TIMESTAMP" property="endTime" />
+    <result column="Desc" jdbcType="VARCHAR" property="desc" />
+    <result column="PlaceImg" jdbcType="VARCHAR" property="placeImg" />
+    <result column="LineImg" jdbcType="VARCHAR" property="lineImg" />
+    <result column="PlaceNature" jdbcType="VARCHAR" property="placeNature" />
+    <result column="DisplayCount" jdbcType="INTEGER" property="displayCount" />
+    <result column="DisplayDesc" jdbcType="VARCHAR" property="displayDesc" />
+    <result column="DisplayArea" jdbcType="VARCHAR" property="displayArea" />
+    <result column="PlanImg" jdbcType="VARCHAR" property="planImg" />
+    <result column="PlaceColumn" jdbcType="INTEGER" property="placeColumn" />
+    <result column="PlaceRow" jdbcType="INTEGER" property="placeRow" />
+    <result column="ZbUnit" jdbcType="VARCHAR" property="zbUnit" />
+    <result column="XbUnit" jdbcType="VARCHAR" property="xbUnit" />
+    <result column="CbUnit" jdbcType="VARCHAR" property="cbUnit" />
+    <result column="IsMake" jdbcType="BIT" property="isMake" />
+    <result column="IsSendEmail" jdbcType="BIT" property="isSendEmail" />
+    <result column="IsOffsite" jdbcType="BIT" property="isOffsite" />
+    <result column="CreateUserID" jdbcType="VARCHAR" property="createUserID" />
+    <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="ModifyUserID" jdbcType="VARCHAR" property="modifyUserID" />
+    <result column="ModifyTime" jdbcType="TIMESTAMP" property="modifyTime" />
+    <result column="CompanyCount" jdbcType="INTEGER" property="companyCount" />
+    <result column="Longitude" jdbcType="VARCHAR" property="longitude" />
+    <result column="Latitude" jdbcType="VARCHAR" property="latitude" />
+    <result column="BoothCount" jdbcType="INTEGER" property="boothCount" />
+    <result column="RegionCode" jdbcType="VARCHAR" property="regionCode" />
+    <result column="SiteID" jdbcType="VARCHAR" property="siteID" />
+    <result column="JobFariDesc" jdbcType="VARCHAR" property="jobFariDesc" />
+    <result column="ActivityType" jdbcType="INTEGER" property="activityType" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -98,12 +100,11 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    JobfairsID
-    , `Name`, Area, Address, CarLine, UserName, UserMrobile, Rent, StartTime,
+    JobfairsID, `Name`, Area, Address, CarLine, UserName, UserMrobile, Rent, StartTime,
     EndTime, `Desc`, PlaceImg, LineImg, PlaceNature, DisplayCount, DisplayDesc, DisplayArea,
     PlanImg, PlaceColumn, PlaceRow, ZbUnit, XbUnit, CbUnit, IsMake, IsSendEmail, IsOffsite, 
     CreateUserID, CreateTime, ModifyUserID, ModifyTime, CompanyCount, Longitude, Latitude, 
-    BoothCount, RegionCode, JobFariDesc
+    BoothCount, RegionCode, SiteID, JobFariDesc, ActivityType
   </sql>
   <select id="selectByExample" parameterType="com.hz.employmentsite.model.PcJobfairsExample" resultMap="BaseResultMap">
     select
@@ -137,29 +138,31 @@
   </delete>
   <insert id="insert" parameterType="com.hz.employmentsite.model.PcJobfairs">
     insert into pc_jobfairs (JobfairsID, `Name`, Area,
-                             Address, CarLine, UserName,
-                             UserMrobile, Rent, StartTime,
-                             EndTime, `Desc`, PlaceImg,
-                             LineImg, PlaceNature, DisplayCount,
-                             DisplayDesc, DisplayArea, PlanImg,
-                             PlaceColumn, PlaceRow, ZbUnit,
-                             XbUnit, CbUnit, IsMake,
-                             IsSendEmail, IsOffsite, CreateUserID,
-                             CreateTime, ModifyUserID, ModifyTime,
-                             CompanyCount, Longitude, Latitude,
-                             BoothCount, RegionCode, JobFariDesc)
-    values (#{jobfairsID,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR},
-            #{address,jdbcType=VARCHAR}, #{carLine,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR},
-            #{userMrobile,jdbcType=VARCHAR}, #{rent,jdbcType=DECIMAL}, #{startTime,jdbcType=TIMESTAMP},
-            #{endTime,jdbcType=TIMESTAMP}, #{desc,jdbcType=VARCHAR}, #{placeImg,jdbcType=VARCHAR},
-            #{lineImg,jdbcType=VARCHAR}, #{placeNature,jdbcType=VARCHAR}, #{displayCount,jdbcType=INTEGER},
-            #{displayDesc,jdbcType=VARCHAR}, #{displayArea,jdbcType=VARCHAR}, #{planImg,jdbcType=VARCHAR},
-            #{placeColumn,jdbcType=INTEGER}, #{placeRow,jdbcType=INTEGER}, #{zbUnit,jdbcType=VARCHAR},
-            #{xbUnit,jdbcType=VARCHAR}, #{cbUnit,jdbcType=VARCHAR}, #{isMake,jdbcType=BIT},
-            #{isSendEmail,jdbcType=BIT}, #{isOffsite,jdbcType=BIT}, #{createUserID,jdbcType=VARCHAR},
-            #{createTime,jdbcType=TIMESTAMP}, #{modifyUserID,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP},
-            #{companyCount,jdbcType=INTEGER}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR},
-            #{boothCount,jdbcType=INTEGER}, #{regionCode,jdbcType=VARCHAR}, #{jobFariDesc,jdbcType=VARCHAR})
+      Address, CarLine, UserName, 
+      UserMrobile, Rent, StartTime, 
+      EndTime, `Desc`, PlaceImg,
+      LineImg, PlaceNature, DisplayCount, 
+      DisplayDesc, DisplayArea, PlanImg, 
+      PlaceColumn, PlaceRow, ZbUnit, 
+      XbUnit, CbUnit, IsMake, 
+      IsSendEmail, IsOffsite, CreateUserID, 
+      CreateTime, ModifyUserID, ModifyTime, 
+      CompanyCount, Longitude, Latitude, 
+      BoothCount, RegionCode, SiteID, 
+      JobFariDesc, ActivityType)
+    values (#{jobfairsID,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}, 
+      #{address,jdbcType=VARCHAR}, #{carLine,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, 
+      #{userMrobile,jdbcType=VARCHAR}, #{rent,jdbcType=DECIMAL}, #{startTime,jdbcType=TIMESTAMP}, 
+      #{endTime,jdbcType=TIMESTAMP}, #{desc,jdbcType=VARCHAR}, #{placeImg,jdbcType=VARCHAR}, 
+      #{lineImg,jdbcType=VARCHAR}, #{placeNature,jdbcType=VARCHAR}, #{displayCount,jdbcType=INTEGER}, 
+      #{displayDesc,jdbcType=VARCHAR}, #{displayArea,jdbcType=VARCHAR}, #{planImg,jdbcType=VARCHAR}, 
+      #{placeColumn,jdbcType=INTEGER}, #{placeRow,jdbcType=INTEGER}, #{zbUnit,jdbcType=VARCHAR}, 
+      #{xbUnit,jdbcType=VARCHAR}, #{cbUnit,jdbcType=VARCHAR}, #{isMake,jdbcType=BIT}, 
+      #{isSendEmail,jdbcType=BIT}, #{isOffsite,jdbcType=BIT}, #{createUserID,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{modifyUserID,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, 
+      #{companyCount,jdbcType=INTEGER}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, 
+      #{boothCount,jdbcType=INTEGER}, #{regionCode,jdbcType=VARCHAR}, #{siteID,jdbcType=VARCHAR}, 
+      #{jobFariDesc,jdbcType=VARCHAR}, #{activityType,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.hz.employmentsite.model.PcJobfairs">
     insert into pc_jobfairs
@@ -269,9 +272,15 @@
       <if test="regionCode != null">
         RegionCode,
       </if>
+      <if test="siteID != null">
+        SiteID,
+      </if>
       <if test="jobFariDesc != null">
         JobFariDesc,
       </if>
+      <if test="activityType != null">
+        ActivityType,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="jobfairsID != null">
@@ -379,9 +388,15 @@
       <if test="regionCode != null">
         #{regionCode,jdbcType=VARCHAR},
       </if>
+      <if test="siteID != null">
+        #{siteID,jdbcType=VARCHAR},
+      </if>
       <if test="jobFariDesc != null">
         #{jobFariDesc,jdbcType=VARCHAR},
       </if>
+      <if test="activityType != null">
+        #{activityType,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.hz.employmentsite.model.PcJobfairsExample" resultType="java.lang.Long">
@@ -498,9 +513,15 @@
       <if test="row.regionCode != null">
         RegionCode = #{row.regionCode,jdbcType=VARCHAR},
       </if>
+      <if test="row.siteID != null">
+        SiteID = #{row.siteID,jdbcType=VARCHAR},
+      </if>
       <if test="row.jobFariDesc != null">
         JobFariDesc = #{row.jobFariDesc,jdbcType=VARCHAR},
       </if>
+      <if test="row.activityType != null">
+        ActivityType = #{row.activityType,jdbcType=INTEGER},
+      </if>
     </set>
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -509,41 +530,43 @@
   <update id="updateByExample" parameterType="map">
     update pc_jobfairs
     set JobfairsID = #{row.jobfairsID,jdbcType=VARCHAR},
-    `Name` = #{row.name,jdbcType=VARCHAR},
-    Area = #{row.area,jdbcType=VARCHAR},
-    Address = #{row.address,jdbcType=VARCHAR},
-    CarLine = #{row.carLine,jdbcType=VARCHAR},
-    UserName = #{row.userName,jdbcType=VARCHAR},
-    UserMrobile = #{row.userMrobile,jdbcType=VARCHAR},
-    Rent = #{row.rent,jdbcType=DECIMAL},
-    StartTime = #{row.startTime,jdbcType=TIMESTAMP},
-    EndTime = #{row.endTime,jdbcType=TIMESTAMP},
-    `Desc` = #{row.desc,jdbcType=VARCHAR},
-    PlaceImg = #{row.placeImg,jdbcType=VARCHAR},
-    LineImg = #{row.lineImg,jdbcType=VARCHAR},
-    PlaceNature = #{row.placeNature,jdbcType=VARCHAR},
-    DisplayCount = #{row.displayCount,jdbcType=INTEGER},
-    DisplayDesc = #{row.displayDesc,jdbcType=VARCHAR},
-    DisplayArea = #{row.displayArea,jdbcType=VARCHAR},
-    PlanImg = #{row.planImg,jdbcType=VARCHAR},
-    PlaceColumn = #{row.placeColumn,jdbcType=INTEGER},
-    PlaceRow = #{row.placeRow,jdbcType=INTEGER},
-    ZbUnit = #{row.zbUnit,jdbcType=VARCHAR},
-    XbUnit = #{row.xbUnit,jdbcType=VARCHAR},
-    CbUnit = #{row.cbUnit,jdbcType=VARCHAR},
-    IsMake = #{row.isMake,jdbcType=BIT},
-    IsSendEmail = #{row.isSendEmail,jdbcType=BIT},
-    IsOffsite = #{row.isOffsite,jdbcType=BIT},
-    CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
-    CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
-    ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
-    ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
-    CompanyCount = #{row.companyCount,jdbcType=INTEGER},
-    Longitude = #{row.longitude,jdbcType=VARCHAR},
-    Latitude = #{row.latitude,jdbcType=VARCHAR},
-    BoothCount = #{row.boothCount,jdbcType=INTEGER},
-    RegionCode = #{row.regionCode,jdbcType=VARCHAR},
-    JobFariDesc = #{row.jobFariDesc,jdbcType=VARCHAR}
+      `Name` = #{row.name,jdbcType=VARCHAR},
+      Area = #{row.area,jdbcType=VARCHAR},
+      Address = #{row.address,jdbcType=VARCHAR},
+      CarLine = #{row.carLine,jdbcType=VARCHAR},
+      UserName = #{row.userName,jdbcType=VARCHAR},
+      UserMrobile = #{row.userMrobile,jdbcType=VARCHAR},
+      Rent = #{row.rent,jdbcType=DECIMAL},
+      StartTime = #{row.startTime,jdbcType=TIMESTAMP},
+      EndTime = #{row.endTime,jdbcType=TIMESTAMP},
+      `Desc` = #{row.desc,jdbcType=VARCHAR},
+      PlaceImg = #{row.placeImg,jdbcType=VARCHAR},
+      LineImg = #{row.lineImg,jdbcType=VARCHAR},
+      PlaceNature = #{row.placeNature,jdbcType=VARCHAR},
+      DisplayCount = #{row.displayCount,jdbcType=INTEGER},
+      DisplayDesc = #{row.displayDesc,jdbcType=VARCHAR},
+      DisplayArea = #{row.displayArea,jdbcType=VARCHAR},
+      PlanImg = #{row.planImg,jdbcType=VARCHAR},
+      PlaceColumn = #{row.placeColumn,jdbcType=INTEGER},
+      PlaceRow = #{row.placeRow,jdbcType=INTEGER},
+      ZbUnit = #{row.zbUnit,jdbcType=VARCHAR},
+      XbUnit = #{row.xbUnit,jdbcType=VARCHAR},
+      CbUnit = #{row.cbUnit,jdbcType=VARCHAR},
+      IsMake = #{row.isMake,jdbcType=BIT},
+      IsSendEmail = #{row.isSendEmail,jdbcType=BIT},
+      IsOffsite = #{row.isOffsite,jdbcType=BIT},
+      CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
+      CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
+      ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
+      ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
+      CompanyCount = #{row.companyCount,jdbcType=INTEGER},
+      Longitude = #{row.longitude,jdbcType=VARCHAR},
+      Latitude = #{row.latitude,jdbcType=VARCHAR},
+      BoothCount = #{row.boothCount,jdbcType=INTEGER},
+      RegionCode = #{row.regionCode,jdbcType=VARCHAR},
+      SiteID = #{row.siteID,jdbcType=VARCHAR},
+      JobFariDesc = #{row.jobFariDesc,jdbcType=VARCHAR},
+      ActivityType = #{row.activityType,jdbcType=INTEGER}
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -653,49 +676,57 @@
       <if test="regionCode != null">
         RegionCode = #{regionCode,jdbcType=VARCHAR},
       </if>
+      <if test="siteID != null">
+        SiteID = #{siteID,jdbcType=VARCHAR},
+      </if>
       <if test="jobFariDesc != null">
         JobFariDesc = #{jobFariDesc,jdbcType=VARCHAR},
       </if>
+      <if test="activityType != null">
+        ActivityType = #{activityType,jdbcType=INTEGER},
+      </if>
     </set>
     where JobfairsID = #{jobfairsID,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.hz.employmentsite.model.PcJobfairs">
     update pc_jobfairs
-    set `Name`       = #{name,jdbcType=VARCHAR},
-        Area         = #{area,jdbcType=VARCHAR},
-        Address      = #{address,jdbcType=VARCHAR},
-        CarLine      = #{carLine,jdbcType=VARCHAR},
-        UserName     = #{userName,jdbcType=VARCHAR},
-        UserMrobile  = #{userMrobile,jdbcType=VARCHAR},
-        Rent         = #{rent,jdbcType=DECIMAL},
-        StartTime    = #{startTime,jdbcType=TIMESTAMP},
-        EndTime      = #{endTime,jdbcType=TIMESTAMP},
-        `Desc`       = #{desc,jdbcType=VARCHAR},
-        PlaceImg     = #{placeImg,jdbcType=VARCHAR},
-        LineImg      = #{lineImg,jdbcType=VARCHAR},
-        PlaceNature  = #{placeNature,jdbcType=VARCHAR},
-        DisplayCount = #{displayCount,jdbcType=INTEGER},
-        DisplayDesc  = #{displayDesc,jdbcType=VARCHAR},
-        DisplayArea  = #{displayArea,jdbcType=VARCHAR},
-        PlanImg      = #{planImg,jdbcType=VARCHAR},
-        PlaceColumn  = #{placeColumn,jdbcType=INTEGER},
-        PlaceRow     = #{placeRow,jdbcType=INTEGER},
-        ZbUnit       = #{zbUnit,jdbcType=VARCHAR},
-        XbUnit       = #{xbUnit,jdbcType=VARCHAR},
-        CbUnit       = #{cbUnit,jdbcType=VARCHAR},
-        IsMake       = #{isMake,jdbcType=BIT},
-        IsSendEmail  = #{isSendEmail,jdbcType=BIT},
-        IsOffsite    = #{isOffsite,jdbcType=BIT},
-        CreateUserID = #{createUserID,jdbcType=VARCHAR},
-        CreateTime   = #{createTime,jdbcType=TIMESTAMP},
-        ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
-        ModifyTime   = #{modifyTime,jdbcType=TIMESTAMP},
-        CompanyCount = #{companyCount,jdbcType=INTEGER},
-        Longitude    = #{longitude,jdbcType=VARCHAR},
-        Latitude     = #{latitude,jdbcType=VARCHAR},
-        BoothCount   = #{boothCount,jdbcType=INTEGER},
-        RegionCode   = #{regionCode,jdbcType=VARCHAR},
-        JobFariDesc  = #{jobFariDesc,jdbcType=VARCHAR}
+    set `Name` = #{name,jdbcType=VARCHAR},
+      Area = #{area,jdbcType=VARCHAR},
+      Address = #{address,jdbcType=VARCHAR},
+      CarLine = #{carLine,jdbcType=VARCHAR},
+      UserName = #{userName,jdbcType=VARCHAR},
+      UserMrobile = #{userMrobile,jdbcType=VARCHAR},
+      Rent = #{rent,jdbcType=DECIMAL},
+      StartTime = #{startTime,jdbcType=TIMESTAMP},
+      EndTime = #{endTime,jdbcType=TIMESTAMP},
+      `Desc` = #{desc,jdbcType=VARCHAR},
+      PlaceImg = #{placeImg,jdbcType=VARCHAR},
+      LineImg = #{lineImg,jdbcType=VARCHAR},
+      PlaceNature = #{placeNature,jdbcType=VARCHAR},
+      DisplayCount = #{displayCount,jdbcType=INTEGER},
+      DisplayDesc = #{displayDesc,jdbcType=VARCHAR},
+      DisplayArea = #{displayArea,jdbcType=VARCHAR},
+      PlanImg = #{planImg,jdbcType=VARCHAR},
+      PlaceColumn = #{placeColumn,jdbcType=INTEGER},
+      PlaceRow = #{placeRow,jdbcType=INTEGER},
+      ZbUnit = #{zbUnit,jdbcType=VARCHAR},
+      XbUnit = #{xbUnit,jdbcType=VARCHAR},
+      CbUnit = #{cbUnit,jdbcType=VARCHAR},
+      IsMake = #{isMake,jdbcType=BIT},
+      IsSendEmail = #{isSendEmail,jdbcType=BIT},
+      IsOffsite = #{isOffsite,jdbcType=BIT},
+      CreateUserID = #{createUserID,jdbcType=VARCHAR},
+      CreateTime = #{createTime,jdbcType=TIMESTAMP},
+      ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
+      ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
+      CompanyCount = #{companyCount,jdbcType=INTEGER},
+      Longitude = #{longitude,jdbcType=VARCHAR},
+      Latitude = #{latitude,jdbcType=VARCHAR},
+      BoothCount = #{boothCount,jdbcType=INTEGER},
+      RegionCode = #{regionCode,jdbcType=VARCHAR},
+      SiteID = #{siteID,jdbcType=VARCHAR},
+      JobFariDesc = #{jobFariDesc,jdbcType=VARCHAR},
+      ActivityType = #{activityType,jdbcType=INTEGER}
     where JobfairsID = #{jobfairsID,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 4 - 1
src/main/resources/mapping/cquery/JobFairsCQuery.xml

@@ -2,9 +2,12 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.hz.employmentsite.mapper.cquery.JobFairsCQuery">
     <select id="getList" resultType="com.hz.employmentsite.vo.jobUserManager.JobFairsVo">
-        SELECT jobFairs.*, region.Name as regionName
+        SELECT jobFairs.*, region.Name as regionName, site.siteName, actType.`name` as activityTypeName
         FROM `pc_jobfairs` jobFairs
         LEFT JOIN area_code region on jobFairs.RegionCode = region.code
+        LEFT JOIN pc_site site on jobFairs.siteID = site.SiteID
+        left join sys_dictionary_item actType on jobFairs.ActivityType = actType.`value` and
+        actType.DictionaryCode='JobFairActivityType'
         where 1 = 1
         <if test="jobFairsIDList != '' and jobFairsIDList != null">
             and jobFairs.JobfairsID in (${jobFairsIDList})

+ 68 - 21
vue/src/views/jobUserManager/jobFair/edit.vue

@@ -30,10 +30,16 @@
           </a-form-item>
         </a-col>
         <a-col :span="8">
-          <a-form-item label="企业数量" name="companyCount" :label-col="{span:7}"
-                       :rules="[{ required: true,message:'请输入企业数量!' }]">
-            <a-input-number :min="1" v-model:value="formData.companyCount" placeholder="请输入企业数量"
-                            style="width: 100%" :controls="false"/>
+          <a-form-item label="活动类型" :label-col="{span:7}" name="activityType"
+                       :rules="[{ required: true, message: '请选择活动类型!' }]">
+            <a-select
+              ref="select"
+              v-model:value="formData.activityType"
+              :options="ActivityTypeList"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
+            >
+            </a-select>
           </a-form-item>
         </a-col>
         <a-col :span="9">
@@ -73,20 +79,20 @@
       </a-row>
       <a-row type="flex">
         <a-col :span="7">
-          <a-form-item label="摊位数" name="boothCount" :label-col="{span:8}"
-                       :rules="[{ required: true, message: '请输入摊位数!' }]">
-            <a-input-number :min="1" v-model:value="formData.boothCount" placeholder="请输入企业数量"
-                            style="width: 100%" :controls="false"/>
+          <a-form-item label="所属驿站" :label-col="{span:8}" name="siteID"
+                       :rules="[{ required: true, message: '请选择所属驿站!' }]">
+            <a-select
+              ref="select"
+              v-model:value="formData.siteID"
+              :options="siteList"
+              :field-names="{ label: 'siteName', value: 'siteID' }"
+              :allow-clear="true"
+              @change="siteChange"
+            >
+            </a-select>
           </a-form-item>
         </a-col>
         <a-col :span="8">
-          <a-form-item label="展位总数" name="displayCount" :label-col="{span:7}"
-                       :rules="[{ required: true,message:'请输入展位总数!' }]">
-            <a-input-number :min="1" v-model:value="formData.displayCount" placeholder="请输入企业数量"
-                            style="width: 100%" :controls="false"/>
-          </a-form-item>
-        </a-col>
-        <a-col :span="9">
           <a-form-item label="是否制作海报" name="isMake"
                        :label-col="{span:7}" :rules="[{ required: true,message:'请选择确定是否制作海报!' }]">
             <a-select
@@ -98,16 +104,24 @@
             </a-select>
           </a-form-item>
         </a-col>
+        <a-col :span="9">
+          <a-form-item label="企业数量" name="companyCount" :label-col="{span:7}">
+            <a-input-number :min="1" v-model:value="formData.companyCount" placeholder="请输入企业数量"
+                            style="width: 100%" :controls="false"/>
+          </a-form-item>
+        </a-col>
       </a-row>
       <a-row type="flex">
         <a-col :span="7">
-          <a-form-item label="经度" name="longitude" :label-col="{span:8}">
-            <a-input-number style="width: 100%" :controls="false" v-model:value="formData.longitude"  disabled />
+          <a-form-item label="摊位数" name="boothCount" :label-col="{span:8}">
+            <a-input-number :min="1" v-model:value="formData.boothCount" placeholder="请输入摊位数"
+                            style="width: 100%" :controls="false"/>
           </a-form-item>
         </a-col>
         <a-col :span="8">
-          <a-form-item label="纬度" name="latitude" :label-col="{span:7}">
-            <a-input-number style="width: 100%" :controls="false" v-model:value="formData.latitude"  disabled/>
+          <a-form-item label="展位总数" name="displayCount" :label-col="{span:7}">
+            <a-input-number :min="1" v-model:value="formData.displayCount" placeholder="请输入展位总数"
+                            style="width: 100%" :controls="false"/>
           </a-form-item>
         </a-col>
         <a-col :span="9">
@@ -146,10 +160,15 @@ import {useTabsViewStore} from "@/store/modules/tabsView";
 import {useRouter} from "vue-router";
 import dayjs from "dayjs";
 import BUploadFile from "@/components/file/uploadFile.vue";
+import {getSysDictionaryList} from "@/api/system/dictionary";
+import {getSiteByID, getSiteList} from "@/api/baseSettings/siteInfo";
+import {useUserStore} from "@/store/modules/user";
 
 const tabsViewStore = useTabsViewStore();
 const router = useRouter();
 const fullPath = router.currentRoute.value.fullPath;
+const userStore = useUserStore();
+const userInfo = ref(userStore.getUserInfo);
 
 const formData = reactive({
   jobfairsID: "",
@@ -163,6 +182,7 @@ const formData = reactive({
   endTime: "",
   userName: "",
   userMrobile: "",
+  siteID: "",
   regionCode: "",
   boothCount: "",
   isMake: "",
@@ -170,17 +190,22 @@ const formData = reactive({
   latitude: "",
   carLine: "",
   jobFariDesc: "",
-  jobFairDate: new Array<any>()
+  jobFairDate: new Array<any>(),
+  activityType: ""
 })
 const bodyLoading = ref(false);
 const regionList = ref<SelectProps['options']>();
+const siteList = ref<any>([]);
+const ActivityTypeList = ref<SelectProps['options']>();
 const fileList = ref([]);
 const isAllowCommit = ref<boolean>(false);
 
 // 加载数据
 async function loadData(jobFairId: string) {
   bodyLoading.value = true;
-  await getRegionList()
+  await getRegionList();
+  await getAllSites();
+  await getActivityTypeList();
   await getJobFairById(jobFairId).then((result) => {
     Object.keys(result).forEach((key) => {
       formData[key] = result[key];
@@ -192,6 +217,10 @@ async function loadData(jobFairId: string) {
     if (result.endTime) {
       formData.jobFairDate.push(dayjs(result.endTime, 'YYYY-MM-DD'));
     }
+    if (!result.siteID) {
+      formData.siteID = userInfo.value.siteID;
+      siteChange();
+    }
   }).finally(() => {
     bodyLoading.value = false;
   })
@@ -238,12 +267,30 @@ const getRegionList = async function () {
   regionList.value = await getRegionCodeList();
 }
 
+const getAllSites = async () => {
+  getSiteList({pageIndex: 1, pageSize: 9999}).then((result: any) => {
+    siteList.value = result.list;
+  })
+}
+
+const getActivityTypeList = async () => {
+  getSysDictionaryList('JobFairActivityType').then((data) => {
+    ActivityTypeList.value = data;
+  });
+};
+
 const onJobFairDateChange = (dateString: any) => {
   formData.jobFairDate = dateString;
   formData.startTime = dateString ? dateString[0].format("YYYY-MM-DD") : '';
   formData.endTime = dateString ? dateString[1].format("YYYY-MM-DD") : '';
 }
 
+// 所属驿站变更关联区县
+const siteChange = async function () {
+  const curSiteData: any = await getSiteByID(formData.siteID);
+  formData.regionCode = curSiteData.regionCode;
+}
+
 const setFileList = (files: any) => {
   fileList.value = files;
 };