Przeglądaj źródła

feat: 岗位推荐的企业下拉框查询所有企业

zhangying 2 miesięcy temu
rodzic
commit
bde1e0435b

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

@@ -64,6 +64,12 @@ public class CompanyController {
         return RespGenerstor.success(result);
     }
 
+    @ResponseBody
+    @GetMapping("/getAllList")
+    public BaseResponse<PageInfo<CompanyVo>> getAllList() {
+        return RespGenerstor.success(companyService.getAllList());
+    }
+
     @ResponseBody
     @GetMapping("/getFirmNameLikeList")
     public BaseResponse<PageInfo<PcFirm>> getFirmNameLikeList(@RequestParam("pageIndex") int pageIndex, @RequestParam("pageSize") int pageSize,

+ 3 - 0
src/main/java/com/hz/employmentsite/mapper/cquery/CompanyCQuery.java

@@ -1,6 +1,7 @@
 package com.hz.employmentsite.mapper.cquery;
 
 import com.hz.employmentsite.model.PcFirm;
+import com.hz.employmentsite.vo.companyService.AllCompanyVo;
 import com.hz.employmentsite.vo.companyService.CompanyVo;
 import com.hz.employmentsite.vo.dataMap.CompanyPostMapVo;
 import com.hz.employmentsite.vo.signin.SigninVo;
@@ -20,6 +21,8 @@ public interface CompanyCQuery {
                             @Param("industryID") String industryID, @Param("isAllCompany") boolean isAllCompany,
                             @Param("createUserName") String createUserName);
 
+    List<AllCompanyVo> getAllList();
+
     List<PcFirm> getFirmNameLikeList(@Param("firmName") String firmName);
 
     /**

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

@@ -17,6 +17,7 @@ import com.hz.employmentsite.util.RegexUtils;
 import com.hz.employmentsite.util.StringUtils;
 import com.hz.employmentsite.util.ip.IpUtils;
 import com.hz.employmentsite.vo.baseSettings.LabelVo;
+import com.hz.employmentsite.vo.companyService.AllCompanyVo;
 import com.hz.employmentsite.vo.companyService.AppCompanyPostVo;
 import com.hz.employmentsite.vo.companyService.CompanyVo;
 import com.hz.employmentsite.vo.companyService.PostVo;
@@ -116,6 +117,11 @@ public class CompanyServiceImpl implements CompanyService {
         return result;
     }
 
+    @Override
+    public List<AllCompanyVo> getAllList() {
+        return companyCQuery.getAllList();
+    }
+
     @Override
     public PageInfo<PcFirm> getFirmNameLikeList(Integer pageIndex, Integer pageSize, String firmName) {
 //        PageHelper.startPage(pageIndex, pageSize);

+ 3 - 0
src/main/java/com/hz/employmentsite/services/service/companyService/CompanyService.java

@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.model.PcCompany;
 import com.hz.employmentsite.model.PcFirm;
 import com.hz.employmentsite.model.PcSite;
+import com.hz.employmentsite.vo.companyService.AllCompanyVo;
 import com.hz.employmentsite.vo.companyService.AppCompanyPostVo;
 import com.hz.employmentsite.vo.companyService.CompanyVo;
 import com.hz.employmentsite.vo.dataMap.CompanyPostMapVo;
@@ -23,6 +24,8 @@ public interface CompanyService {
                                 String siteID, Date startDate, Date endDate, String postCountSorter,
                                 String companyTypeID,String industryID, String createUserName);
 
+    List<AllCompanyVo> getAllList();
+
     PageInfo<PcFirm> getFirmNameLikeList(Integer pageIndex, Integer pageSize, String PcFirm);
 
     List<PcCompany> getCompanyBySiteIDList(String siteID);

+ 126 - 0
src/main/java/com/hz/employmentsite/vo/companyService/AllCompanyVo.java

@@ -0,0 +1,126 @@
+package com.hz.employmentsite.vo.companyService;
+
+import com.hz.employmentsite.model.PcCreditRecord;
+import com.hz.employmentsite.util.datarange.annotations.InstitutionID;
+import com.hz.employmentsite.vo.baseSettings.LabelVo;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 为岗位推荐设计查询时无数据权限,可查询全部的企业
+ */
+@Data
+public class AllCompanyVo {
+
+    public String companyID;
+
+    public String siteID;
+
+    public String regionCode;
+
+    public String streetCode;
+
+    public String companyName;
+
+    public String companyCode;
+
+    public Integer companyModel;
+    public String  companyModelType;
+
+    public String companyModelStr;
+
+    public String workSituation;
+
+    public Integer companyType;
+    public String  companyTypeName;
+
+    public String  companyTypeStr;
+
+    public String companyAddress;
+
+    public String userName;
+
+    public String userMobile;
+
+    public String companyEmail;
+
+    public String frName;
+
+    public Date validDate;
+    public String validDateStr;
+
+    public Integer recordStatus;
+    public String recordStatusName;
+
+    public String createUserID;
+    public String createUserName;
+
+    public Date createTime;
+
+    public String modifyUserID;
+
+    public String modifyUserName;
+
+    public Date modifyTime;
+
+    public String SiteName;
+
+    public String regionName;
+
+    public String streetName;
+
+    public String businScope;
+
+    public String companyDesc;
+
+    public int postCount;
+
+    public String longitude;
+    public String latitude;
+
+    public Date establishmentTime;
+    public BigDecimal registeredCapital;
+    public Integer registeredCapitalType;
+    public String RegisteredCapitalTypeName;
+    public String registeredCapitalTypeStr;
+    public String signInPoliticalArea;
+    public String signInPoliticalAreaName;
+
+    public String industryID;
+    public String industryName;
+    public String showIndustryName;
+    public Integer estateCategoryID;
+    public String estateCategoryName;
+    public Integer tagID;
+    public String tagName;
+
+    public String website;
+    public String bonus;
+    public String openId;
+
+    public String errorMessage;
+
+    public Integer insuredCount;
+
+    public Integer isShortage;
+    public String isShortageName;
+    @InstitutionID
+    public String institutionID;
+
+    public String loginUserID;
+
+    public List<LabelVo> listLabel;
+
+    public List<PcCreditRecord> creditRecordList;
+
+    // JSON列表数据
+    public String labelList;
+    public String postList;
+
+    // 经纬度直线距离
+    public BigDecimal distance;
+
+}

+ 6 - 0
src/main/resources/mapping/cquery/CompanyCQuery.xml

@@ -101,6 +101,12 @@
             company.CreateTime desc
         </if>
     </select>
+
+    <select id="getAllList" resultType="com.hz.employmentsite.vo.companyService.AllCompanyVo">
+        select company.*
+        from pc_company company
+    </select>
+
     <select id="getFirmNameLikeList" resultType="com.hz.employmentsite.model.PcFirm">
         select id,FirmName
         from pc_firm

+ 13 - 0
vue/src/api/companyService/company.ts

@@ -14,6 +14,19 @@ export function getList(params: any) {
   );
 }
 
+export function getAllList() {
+  return request<object>(
+    {
+      url: "companyService/company/getAllList",
+      method: 'get',
+      params: {},
+    },
+    {
+      isNew: true,
+    },
+  );
+}
+
 export function getCompanyById(id: string, loginUserID: any,isAllCompany: boolean) {
   return request({
     url: 'companyService/company/getCompanyByID',

+ 8 - 5
vue/src/views/jobUserManager/jobhunt/recommend.vue

@@ -206,13 +206,13 @@ import {getRecommendCompanyPostList, addRecommend,getProfessionLikeList, getComp
 import {getPaginationTotalTitle} from '@/utils/common';
 import dayjs from 'dayjs';
 import {message, SelectProps} from "ant-design-vue";
-import {get} from "@/api/common";
 import {debounce} from "lodash-es";
 import {getAllSite} from "@/api/baseSettings/siteInfo";
 import {getRegionCodeList} from '@/api/system/area/index';
 import {getSysDictionaryList} from "@/api/system/dictionary";
 import CompanyDetailModel from "./companyDetail.vue";
 import PostDetailModel from "./postDetail.vue";
+import {getAllList} from "@/api/companyService/company";
 
 export default defineComponent({
   name: 'RecommendCompanyPostList',
@@ -235,10 +235,6 @@ export default defineComponent({
     const recommendPostWhereList = ref([{label:'岗位',value:1},{label:'相关行业',value:2}] as any);
     const jobUserID = ref();
 
-    get('companyService/company/getList', {pageIndex: 1, pageSize: 9999}).then(result => {
-      companyList.value = result.list;
-    });
-
     function companyChange(value: any) {
       getCompanyProfessionLikeList({
         pageIndex: 1,
@@ -251,6 +247,12 @@ export default defineComponent({
       })
     }
 
+    function getCompanyList() {
+      getAllList().then((result: any) => {
+        companyList.value = result;
+      })
+    }
+
     const getCultureLevelList = async function () {
       const data: any = await getSysDictionaryList("CultureLevel");
       cultureLevelList.value = data;
@@ -431,6 +433,7 @@ export default defineComponent({
 
     const loadData = async function () {
       formState.loading = true;
+      await getCompanyList();
       await getCultureLevelList();
       await getWorkYearTypeList();
       await getAllSites();