lizeyu před 11 měsíci
rodič
revize
9a57fda1aa

+ 39 - 0
doc/待更新脚本

@@ -2,5 +2,44 @@
 -- 2024-4-28
 ALTER TABLE pc_company CHANGE ProfessionID IndustryID VARCHAR(50);
 
+
+--2024.4.30 选择标签
+create table pc_label(
+LabelID varchar(50) primary key not null COMMENT '标签id',
+LabelName varchar(50) COMMENT '标签名',
+LabelType int COMMENT '标签类型 1-基础标签 2-自定义标签',
+BigType int COMMENT '大类型 1-企业 2-人员',
+SortNo int COMMENT '排序号',
+CreateUserID varchar(50) COMMENT '创建人',
+CreateTime datetime COMMENT '创建时间',
+ModifyUserID varchar(50) COMMENT '修改人',
+ModifyTime datetime COMMENT '修改时间'
+) COMMENT '企业、人员标签表';
+
+
+create table pc_label_jobuser(
+LabelID varchar(50) not null COMMENT '标签id',
+JobuserID varchar(50) not null COMMENT '人员id'
+) COMMENT '人员标签表';
+alter table pc_label_jobuser add index pc_label_jobuser_LabelID(LabelID);
+alter table pc_label_jobuser add index pc_label_jobuser_JobuserID(JobuserID);
+
+create table pc_label_company(
+LabelID varchar(50) not null COMMENT '标签id',
+CompanyID varchar(50) not null COMMENT '企业id'
+) COMMENT '企业标签表';
+alter table pc_label_company add index pc_label_company_LabelID(LabelID);
+alter table pc_label_company add index pc_label_company_CompanyID(CompanyID);
+
+
+ INSERT INTO `sys_dictionary` (`DictionaryCode`, `Name`, `OrderNo`, `RecordStatus`) VALUES
+ ('LabelType', '标签类型', 100, 1),
+ ('BigType', '企业人员类型', 101, 1);
+ INSERT INTO `sys_dictionary_item` (`DictionaryItemID`, `Code`, `DictionaryCode`, `Value`, `Name`, `OrderNo`, `RecordStatus`, `IsEditable`) VALUES
+ ('f06c44b6-a77a-11ed-a6c5-7085c2a00000', '', 'LabelType', 1, '基础标签', 0, 1, 0),
+ ('f06c44b6-a77a-11ed-a6c5-7085c2a00001', '', 'LabelType', 2, '自定义标签', 1, 1, 0),
+ ('f06c44b6-a77a-11ed-a6c5-7085c2a00002', '', 'BigType', 1, '企业', 0, 1, 0),
+ ('f06c44b6-a77a-11ed-a6c5-7085c2a00003', '', 'BigType', 2, '人员', 1, 1, 0);
+
 -- 2024-4-30
 ALTER TABLE pc_company MODIFY RegisteredCapital DECIMAL(10, 2);

+ 22 - 0
src/main/java/com/hz/employmentsite/mapper/PcLabelCompanyMapper.java

@@ -0,0 +1,22 @@
+package com.hz.employmentsite.mapper;
+
+import com.hz.employmentsite.model.PcLabelCompany;
+import com.hz.employmentsite.model.PcLabelCompanyExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface PcLabelCompanyMapper {
+    long countByExample(PcLabelCompanyExample example);
+
+    int deleteByExample(PcLabelCompanyExample example);
+
+    int insert(PcLabelCompany row);
+
+    int insertSelective(PcLabelCompany row);
+
+    List<PcLabelCompany> selectByExample(PcLabelCompanyExample example);
+
+    int updateByExampleSelective(@Param("row") PcLabelCompany row, @Param("example") PcLabelCompanyExample example);
+
+    int updateByExample(@Param("row") PcLabelCompany row, @Param("example") PcLabelCompanyExample example);
+}

+ 1 - 1
src/main/java/com/hz/employmentsite/mapper/cquery/LabelCQuery.java

@@ -11,5 +11,5 @@ public interface LabelCQuery {
 
     List<LabelVo> getUserLabelList(@Param("jobUserID") String jobUserID);
 
-//    List<LabelVo> getCompanyLabelList(@Param("id") String id);
+    List<LabelVo> getCompanyLabelList(@Param("companyID") String companyID);
 }

+ 23 - 0
src/main/java/com/hz/employmentsite/model/PcLabelCompany.java

@@ -0,0 +1,23 @@
+package com.hz.employmentsite.model;
+
+public class PcLabelCompany {
+    private String labelID;
+
+    private String companyID;
+
+    public String getLabelID() {
+        return labelID;
+    }
+
+    public void setLabelID(String labelID) {
+        this.labelID = labelID == null ? null : labelID.trim();
+    }
+
+    public String getCompanyID() {
+        return companyID;
+    }
+
+    public void setCompanyID(String companyID) {
+        this.companyID = companyID == null ? null : companyID.trim();
+    }
+}

+ 339 - 0
src/main/java/com/hz/employmentsite/model/PcLabelCompanyExample.java

@@ -0,0 +1,339 @@
+package com.hz.employmentsite.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class PcLabelCompanyExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public PcLabelCompanyExample() {
+        oredCriteria = new ArrayList<>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andLabelIDIsNull() {
+            addCriterion("LabelID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelIDIsNotNull() {
+            addCriterion("LabelID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelIDEqualTo(String value) {
+            addCriterion("LabelID =", value, "labelID");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelIDNotEqualTo(String value) {
+            addCriterion("LabelID <>", value, "labelID");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelIDGreaterThan(String value) {
+            addCriterion("LabelID >", value, "labelID");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelIDGreaterThanOrEqualTo(String value) {
+            addCriterion("LabelID >=", value, "labelID");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelIDLessThan(String value) {
+            addCriterion("LabelID <", value, "labelID");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelIDLessThanOrEqualTo(String value) {
+            addCriterion("LabelID <=", value, "labelID");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelIDLike(String value) {
+            addCriterion("LabelID like", value, "labelID");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelIDNotLike(String value) {
+            addCriterion("LabelID not like", value, "labelID");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelIDIn(List<String> values) {
+            addCriterion("LabelID in", values, "labelID");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelIDNotIn(List<String> values) {
+            addCriterion("LabelID not in", values, "labelID");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelIDBetween(String value1, String value2) {
+            addCriterion("LabelID between", value1, value2, "labelID");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelIDNotBetween(String value1, String value2) {
+            addCriterion("LabelID not between", value1, value2, "labelID");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDIsNull() {
+            addCriterion("CompanyID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDIsNotNull() {
+            addCriterion("CompanyID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDEqualTo(String value) {
+            addCriterion("CompanyID =", value, "companyID");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDNotEqualTo(String value) {
+            addCriterion("CompanyID <>", value, "companyID");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDGreaterThan(String value) {
+            addCriterion("CompanyID >", value, "companyID");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDGreaterThanOrEqualTo(String value) {
+            addCriterion("CompanyID >=", value, "companyID");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDLessThan(String value) {
+            addCriterion("CompanyID <", value, "companyID");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDLessThanOrEqualTo(String value) {
+            addCriterion("CompanyID <=", value, "companyID");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDLike(String value) {
+            addCriterion("CompanyID like", value, "companyID");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDNotLike(String value) {
+            addCriterion("CompanyID not like", value, "companyID");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDIn(List<String> values) {
+            addCriterion("CompanyID in", values, "companyID");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDNotIn(List<String> values) {
+            addCriterion("CompanyID not in", values, "companyID");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDBetween(String value1, String value2) {
+            addCriterion("CompanyID between", value1, value2, "companyID");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyIDNotBetween(String value1, String value2) {
+            addCriterion("CompanyID not between", value1, value2, "companyID");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 2 - 0
src/main/java/com/hz/employmentsite/services/impl/baseSettings/LabelImpl.java

@@ -62,6 +62,8 @@ public class LabelImpl implements LabelService {
             model.setSortNo(model.getSortNo());
             model.setCreateTime(new Date());
             model.setCreateUserID(userId);
+            model.setModifyTime(new Date());
+            model.setModifyUserID(userId);
 
             return pcLabelMapper.insert(model);
         }else{

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

@@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.filter.exception.BaseException;
 import com.hz.employmentsite.mapper.*;
 import com.hz.employmentsite.mapper.cquery.CompanyCQuery;
+import com.hz.employmentsite.mapper.cquery.LabelCQuery;
 import com.hz.employmentsite.model.*;
 import com.hz.employmentsite.services.service.companyService.CompanyService;
 import com.hz.employmentsite.services.service.companyService.FirmService;
@@ -18,10 +19,7 @@ import org.springframework.stereotype.Service;
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.UUID;
+import java.util.*;
 import java.util.stream.Collectors;
 
 @Service("CompanyService")
@@ -57,6 +55,12 @@ public class CompanyServiceImpl implements CompanyService {
     @Autowired
     private IndustryService industryService;
 
+    @Autowired
+    private PcLabelCompanyMapper pcLabelCompanyMapper;
+
+    @Autowired
+    private LabelCQuery labelCQuery;
+
     @Override
     public PageInfo<CompanyVo> getList(Integer pageIndex, Integer pageSize,
                                        List<String> companyIDList, String companyName,
@@ -195,6 +199,18 @@ public class CompanyServiceImpl implements CompanyService {
             dbData.setTagID(data.getTagID());
             result = pcCompanyMapper.updateByPrimaryKeySelective(dbData);
         }
+
+        if(data.listLabel.size()>0){
+            PcLabelCompanyExample labelEmp = new PcLabelCompanyExample();
+            labelEmp.or().andCompanyIDEqualTo(data.getCompanyID());
+            pcLabelCompanyMapper.deleteByExample(labelEmp);
+            data.listLabel.forEach(x->{
+                PcLabelCompany labelModel = new PcLabelCompany();
+                labelModel.setCompanyID(data.getCompanyID());
+                labelModel.setLabelID(x.getLabelID());
+                pcLabelCompanyMapper.insert(labelModel);
+            });
+        }
         return result;
     }
 
@@ -219,13 +235,16 @@ public class CompanyServiceImpl implements CompanyService {
 
     @Override
     public CompanyVo getDataById(String id) {
-        List<String> ids = new ArrayList<>();
         if (stringUtils.IsNullOrEmpty(id)) {
             return null;
-        }else{
-            ids.add(id);
         }
-        return companyCQuery.getList(stringUtils.ListToInSql(ids), null, null, null, null, null, null, null, null, null, null, null).stream().findFirst().orElse(null);
+
+        CompanyVo data = companyCQuery.getList(stringUtils.ListToInSql(Arrays.asList(id)), null, null, null, null, null, null, null, null, null, null, null).stream().findFirst().orElse(null);
+        if(data!=null){
+            data.listLabel = labelCQuery.getCompanyLabelList(id);
+        }
+
+        return data;
     }
 
     @Override

+ 1 - 1
src/main/java/com/hz/employmentsite/services/impl/jobUserManager/JobUserServiceImpl.java

@@ -88,7 +88,7 @@ public class JobUserServiceImpl implements JobUserService {
     public JobUserVo getDataById(String id) {
 
         if (stringUtils.IsNullOrEmpty(id)) {
-            throw new BaseException("","id为空");
+            return null;
         }
 
         JobUserVo data = jobUserCQuery.selectJobUserList(stringUtils.ListToInSql(Arrays.asList(id)), null, null, null, null, null, null, null, null,null,null,null,null).stream().findFirst().orElse(null);

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

@@ -4,9 +4,11 @@ import com.hz.employmentsite.util.datarange.annotations.CompanyID;
 import com.hz.employmentsite.util.datarange.annotations.InstitutionID;
 import com.hz.employmentsite.util.datarange.annotations.RegionID;
 import com.hz.employmentsite.util.datarange.annotations.SiteID;
+import com.hz.employmentsite.vo.baseSettings.LabelVo;
 import lombok.Data;
 
 import java.util.Date;
+import java.util.List;
 
 @Data
 public class CompanyVo {
@@ -106,4 +108,6 @@ public class CompanyVo {
 
     public String loginUserID;
 
+    public List<LabelVo> listLabel;
+
 }

+ 1 - 0
src/main/resources/generatorConfig.xml

@@ -103,6 +103,7 @@
     <table schema="" tableName="pc_label"><property name="useActualColumnNames" value="true"/></table>
         <table schema="" tableName="pc_label_jobuser"><property name="useActualColumnNames" value="true"/></table>
 
+        <table schema="" tableName="pc_label_company"><property name="useActualColumnNames" value="true"/></table>
         -->
 <!--        <table schema="" tableName="pc_jobuser"><property name="useActualColumnNames" value="true"/></table>-->
 <!--        <table schema="" tableName="pc_education"><property name="useActualColumnNames" value="true"/></table>-->

+ 140 - 0
src/main/resources/mapping/PcLabelCompanyMapper.xml

@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hz.employmentsite.mapper.PcLabelCompanyMapper">
+  <resultMap id="BaseResultMap" type="com.hz.employmentsite.model.PcLabelCompany">
+    <result column="LabelID" jdbcType="VARCHAR" property="labelID" />
+    <result column="CompanyID" jdbcType="VARCHAR" property="companyID" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    LabelID, CompanyID
+  </sql>
+  <select id="selectByExample" parameterType="com.hz.employmentsite.model.PcLabelCompanyExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from pc_label_company
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <delete id="deleteByExample" parameterType="com.hz.employmentsite.model.PcLabelCompanyExample">
+    delete from pc_label_company
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.hz.employmentsite.model.PcLabelCompany">
+    insert into pc_label_company (LabelID, CompanyID)
+    values (#{labelID,jdbcType=VARCHAR}, #{companyID,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.hz.employmentsite.model.PcLabelCompany">
+    insert into pc_label_company
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="labelID != null">
+        LabelID,
+      </if>
+      <if test="companyID != null">
+        CompanyID,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="labelID != null">
+        #{labelID,jdbcType=VARCHAR},
+      </if>
+      <if test="companyID != null">
+        #{companyID,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.hz.employmentsite.model.PcLabelCompanyExample" resultType="java.lang.Long">
+    select count(*) from pc_label_company
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update pc_label_company
+    <set>
+      <if test="row.labelID != null">
+        LabelID = #{row.labelID,jdbcType=VARCHAR},
+      </if>
+      <if test="row.companyID != null">
+        CompanyID = #{row.companyID,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update pc_label_company
+    set LabelID = #{row.labelID,jdbcType=VARCHAR},
+      CompanyID = #{row.companyID,jdbcType=VARCHAR}
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+</mapper>

+ 9 - 2
src/main/resources/mapping/cquery/LabelCQuery.xml

@@ -26,9 +26,16 @@
     </select>
     <select id="getUserLabelList" resultType="com.hz.employmentsite.vo.baseSettings.LabelVo">
         select b.LabelID,b.LabelName,b.LabelType,b.BigType,b.SortNo
-        from pc_label_jobuser a
-        left join pc_label b on a.LabelID = b.LabelID
+        from pc_label b
+        left join pc_label_jobuser a on b.LabelID = a.LabelID
         where JobUserID = #{jobUserID}
         order by b.SortNo
     </select>
+    <select id="getCompanyLabelList" resultType="com.hz.employmentsite.vo.baseSettings.LabelVo">
+        select b.LabelID,b.LabelName,b.LabelType,b.BigType,b.SortNo
+        from pc_label b
+        left join pc_label_company a on b.LabelID = a.LabelID
+        where CompanyID = #{companyID}
+        order by b.SortNo
+    </select>
 </mapper>

+ 1 - 1
vue/src/router/asyncModules/basesettings.ts

@@ -12,7 +12,7 @@ export default {
   'baseSettings/user/edit': () => import('@/views/baseSettings/siteUser/edit.vue'),
   'baseSettings/user/detail': () => import('@/views/baseSettings/siteUser/detail.vue'),
   'baseSettings/positionmap/index': () => import('@/views/baseSettings/positionMap/index.vue'),
-  'baseSettings/label/user/index': () => import('@/views/baseSettings/label/user/index.vue'),
+  'baseSettings/label/userIndex': () => import('@/views/baseSettings/label/userIndex.vue'),
   'baseSettings/label/add': () => import('@/views/baseSettings/label/edit.vue'),
   'baseSettings/label/edit': () => import('@/views/baseSettings/label/edit.vue'),
 };

+ 18 - 21
vue/src/views/baseSettings/label/selectLabel.vue

@@ -14,7 +14,8 @@
       <a-divider orientation="left">基础标签</a-divider>
       <a-row :gutter="24">
         <a-col :span="24">
-          <a-button :style="{marginLeft: '10px',background:item.check?'#1890ff':'#fff'}" v-for="item in basicsLabelList" @click="item.check=!item.check">
+          <a-button :style="{marginLeft: '10px',background:item.check?'#1890ff':'#fff'}" v-for="item in basicsLabelList"
+                    @click="item.check=!item.check">
             {{ item.labelName }}
           </a-button>
         </a-col>
@@ -22,7 +23,8 @@
       <a-divider orientation="left">自定义标签</a-divider>
       <a-row :gutter="24">
         <a-col :span="24">
-          <a-button :style="{marginLeft: '10px',background:item.check?'#1890ff':'#fff'}" v-for="item in customLabelList" @click="item.check=!item.check">
+          <a-button :style="{marginLeft: '10px',background:item.check?'#1890ff':'#fff'}" v-for="item in customLabelList"
+                    @click="item.check=!item.check">
             {{ item.labelName }}
           </a-button>
         </a-col>
@@ -71,20 +73,22 @@ export default defineComponent({
       visible.value = false;
     };
 
-    const loadData = () => {
-      basicsLabelList.value=[];
-      customLabelList.value=[];
-      getLabelList({pageIndex: 1, pageSize: 9999, bigType: props.bigType}).then((result: any) => {
-        result.list.forEach((x: any) => {
+    const loadData = async () => {
+      basicsLabelList.value = [];
+      customLabelList.value = [];
+      const result: any = await getLabelList({pageIndex: 1, pageSize: 9999, bigType: props.bigType})
+
+      result.list.forEach((x: any) => {
+        if(props.listLabel){
           x.check = props.listLabel.findIndex((f: any) => f.labelID == x.labelID) >= 0;
+        }
 
-          if (x.labelType === 1) {
-            basicsLabelList.value.push(x);
-          } else {
-            customLabelList.value.push(x);
-          }
-        })
-      });
+        if (x.labelType === 1) {
+          basicsLabelList.value.push(x);
+        } else {
+          customLabelList.value.push(x);
+        }
+      })
     }
 
     return {
@@ -103,10 +107,3 @@ export default defineComponent({
   },
 })
 </script>
-<style lang="less">
-button[ant-click-animating-without-extra-node]:after {
-  border: 0 none;
-  opacity: 0;
-  animation:none 0 ease 0 1 normal;
-}
-</style>

+ 1 - 3
vue/src/views/baseSettings/label/user/index.vue

@@ -92,9 +92,7 @@ export default defineComponent({
       {title: '修改人', dataIndex: 'modifyUserName', key: 'modifyUserName', align: "center"},
       {
         title: '修改时间', dataIndex: 'modifyTime', key: 'modifyTime', align: "center",
-        customRender: (item: any) => {
-          return dayjs(item.modifyTime).format("YYYY-MM-DD HH:mm:ss");
-        }
+        customRender: (item: any) => dayjs(item.record.modifyTime).format("YYYY-MM-DD HH:mm:ss")
       },
       {title: '操作', key: 'operation', fixed: 'right', width: 150, align: "center"},
     ];

+ 6 - 0
vue/src/views/companyService/company/detail.vue

@@ -41,6 +41,11 @@
       <a-descriptions-item label="企业规模">{{ companyInfo.companyModel }}</a-descriptions-item>
       <a-descriptions-item label="用工情况(人)">{{ companyInfo.workSituation }}</a-descriptions-item>
       <a-descriptions-item label="参保人数(人)">{{ companyInfo.insuredCount }}</a-descriptions-item>
+      <a-descriptions-item :span="3" label="标签">
+        <a-button style="margin: 0px 5px 5px 0px;" v-for="item in companyInfo.listLabel">
+          {{ item.labelName }}
+        </a-button>
+      </a-descriptions-item>
       <a-descriptions-item :span="3" label="经营范围">{{ companyInfo.businScope }}</a-descriptions-item>
       <a-descriptions-item :span="3" label="企业简介">{{ companyInfo.companyDesc }}</a-descriptions-item>
     </a-descriptions>
@@ -89,6 +94,7 @@ const companyInfo = reactive({
   estateCategoryName: "",
   tagName: "",
   website: "",
+  listLabel: null,
   bonus: "",
   modifyUserName: "",
   modifyTime: ""

+ 27 - 1
vue/src/views/companyService/company/edit.vue

@@ -345,6 +345,18 @@
           </a-form-item>
         </a-col>
       </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="标签" :label-col="{ span: 2 }" name="listLabel" >
+            <a-button style="margin: 0px 5px 5px 0px;" v-for="item in dataModel.listLabel">
+              {{ item.labelName }}
+            </a-button>
+            <a-button @click="onSelectModel">
+              <plus-circle-outlined/>选择标签
+            </a-button>
+          </a-form-item>
+        </a-col>
+      </a-row>
       <a-row>
         <a-col class="table-bottom-a1" span="24">
           <a-form-item :label-col="{span:24}" name="businScope" label="经营范围">
@@ -367,6 +379,7 @@
         <a-button type="primary" html-type="submit">提交</a-button>
       </a-form-item>
     </a-form>
+    <select-label ref="refSelectModel" :list-label="dataModel.listLabel" :big-type="1" @selectLabelChecks="selectLabelChecks"></select-label>
   </div>
 </template>
 <style>
@@ -387,6 +400,7 @@ import dayjs from "dayjs";
 import {message} from "ant-design-vue";
 import {useUserStore} from "@/store/modules/user";
 import {get} from "@/api/common";
+import SelectLabel from "@/views/baseSettings/label/selectLabel.vue";
 
 interface FormState {
   dataModel: any;
@@ -394,7 +408,7 @@ interface FormState {
 
 export default defineComponent(
   {
-    components: {BUploadFile},
+    components: {BUploadFile,SelectLabel},
     setup() {
       const userStore = useUserStore();
       const userInfo = ref(userStore.getUserInfo)
@@ -408,6 +422,7 @@ export default defineComponent(
       const fileList = ref();
       const operationType = ref("");
       const normalBtnLoading = ref(false);
+      const refSelectModel = ref();
       const setFileList = (files) => {
         fileList.value = files;
       };
@@ -618,6 +633,14 @@ export default defineComponent(
         })
       }
 
+      const onSelectModel = ()=>{
+        refSelectModel.value.show();
+      }
+
+      const selectLabelChecks = (list: any)=>{
+        formState.dataModel.listLabel = list;
+      }
+
       const loadData = (id: any) => {
         getAllSites();
         getRegionList();
@@ -657,6 +680,9 @@ export default defineComponent(
         showDateTime,
         regionChange,
         setFileList,
+        onSelectModel,
+        selectLabelChecks,
+        refSelectModel,
         shortageStatusList,
         userInfo,
         estateCategoryList,

+ 1 - 1
vue/src/views/jobUserManager/jobuser/edit.vue

@@ -375,7 +375,7 @@
       <a-row :gutter="24">
         <a-col :span="24">
           <a-form-item label="标签" :label-col="{ span: 2 }" name="listLabel" >
-            <a-button style="margin-right: 10px;" v-for="item in dataModel.listLabel">
+            <a-button style="margin: 0px 5px 5px 0px;" v-for="item in dataModel.listLabel">
               {{ item.labelName }}
             </a-button>
             <a-button @click="onSelectModel">