Browse Source

岗位信息查询页面显示

Liudijing 1 year ago
parent
commit
f510b933f1

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

@@ -0,0 +1,31 @@
+package com.hz.employmentsite.controller.companyService;
+
+import com.github.pagehelper.PageInfo;
+import com.hz.employmentsite.filter.exception.BaseResponse;
+import com.hz.employmentsite.filter.exception.RespGenerstor;
+import com.hz.employmentsite.services.service.companyService.PostService;
+import com.hz.employmentsite.vo.companyService.PostVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping(value = "/api/companyService/post")
+public class PostController {
+    @Autowired
+    private PostService postService;
+
+    @ResponseBody
+    @GetMapping("/getList")
+    public BaseResponse getList(@RequestParam("pageIndex") int pageIndex, @RequestParam("pageSize") int pageSize,
+                                @RequestParam(required = false) String postName,
+                                @RequestParam(required = false) Integer minCount,
+                                @RequestParam(required = false) Integer maxCount,
+                                @RequestParam(required = false) String companyName,
+                                @RequestParam(required = false) Integer recordStatus,
+                                @RequestParam(required = false) String workNmae) {
+
+        PageInfo<PostVo> result = postService.getList(pageIndex, pageSize,postName, minCount, maxCount,companyName,recordStatus,workNmae);
+        return RespGenerstor.success(result);
+    }
+
+}

+ 12 - 0
src/main/java/com/hz/employmentsite/mapper/cquery/PostCQuery.java

@@ -0,0 +1,12 @@
+package com.hz.employmentsite.mapper.cquery;
+
+import com.hz.employmentsite.vo.companyService.PostVo;
+import com.hz.employmentsite.vo.jobUserManager.JobhuntVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface PostCQuery {
+    List<PostVo> selectPostList(@Param("postName") String postName, @Param("minCount")Integer minCount, @Param("maxCount")Integer maxCount,
+                                @Param("companyName")String companyName, @Param("RecordStatus") Integer RecordStatus, @Param("WorkNmae")String WorkNmae);
+}

+ 26 - 0
src/main/java/com/hz/employmentsite/services/impl/companyService/PostServiceImpl.java

@@ -0,0 +1,26 @@
+package com.hz.employmentsite.services.impl.companyService;
+
+import com.github.pagehelper.PageInfo;
+import com.hz.employmentsite.mapper.cquery.JobhuntCQuery;
+import com.hz.employmentsite.mapper.cquery.PostCQuery;
+import com.hz.employmentsite.services.service.companyService.PostService;
+import com.hz.employmentsite.vo.companyService.PostVo;
+import com.hz.employmentsite.vo.jobUserManager.JobhuntVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service("PostService")
+public class PostServiceImpl implements PostService {
+    @Autowired
+    private PostCQuery postCQuery;
+
+    @Override
+    public PageInfo<PostVo> getList(Integer page, Integer rows, String postName, Integer minCount, Integer maxCount, String companyName, int recordStatus, String workNmae) {
+        List<PostVo> list = postCQuery.selectPostList(postName, minCount, maxCount, companyName, recordStatus, workNmae);
+        PageInfo<PostVo> result = new PageInfo(list);
+        return result;
+
+    }
+}

+ 8 - 0
src/main/java/com/hz/employmentsite/services/service/companyService/PostService.java

@@ -0,0 +1,8 @@
+package com.hz.employmentsite.services.service.companyService;
+
+import com.github.pagehelper.PageInfo;
+import com.hz.employmentsite.vo.companyService.PostVo;
+
+public interface PostService {
+    PageInfo<PostVo> getList(Integer page, Integer rows, String postName, Integer minCount, Integer maxCount, String companyName,int RecordStatus,String WorkNmae);
+}

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

@@ -0,0 +1,62 @@
+package com.hz.employmentsite.vo.companyService;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class PostVo {
+    public String postID;
+
+    public String workCode;
+
+    public String workNmae;
+
+    public Integer recruitCount;
+
+    public String companyID;
+
+    public String postName;
+
+    public Integer recordStatus;
+
+    public String workNature;
+
+    public Integer validDay;
+
+    public Integer workYear;
+
+    public String cultureRank;
+
+    public BigDecimal maxSalary;
+
+    public BigDecimal minSalary;
+
+    public String welfare;
+
+    public String userName;
+
+    public String userMobile;
+
+    public String postEmial;
+
+    public Integer workTime;
+
+    public Boolean isTrail;
+
+    public Date trailtime;
+
+    public BigDecimal trailMaxSalary;
+
+    public BigDecimal trailMinSalary;
+
+    public String createUserID;
+
+    public Date createTime;
+
+    public String modifyUserID;
+
+    public Date modifyTime;
+
+    public String postDesc;
+
+    public String companyName;
+}

+ 29 - 0
src/main/resources/mapping/cquery/PostCQuery.xml

@@ -0,0 +1,29 @@
+<?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.cquery.PostCQuery">
+    <select id="selectPostList" resultType="com.hz.employmentsite.vo.companyService.PostVo">
+        select post.*,company.CompanyName from pc_post post
+        left join pc_company company
+        on post.CompanyID = company.CompanyID
+        <where>
+            <if test="postName != '' and postName != null">
+                and post.postName like Concat('%',#{postName},'%')
+            </if>
+            <if test="minCount != null and minCount != ''">
+                and post.RecruitCount >= #{minCount}
+            </if>
+            <if test="maxCount != null and maxCount != ''">
+                and post.RecruitCount <![CDATA[ <= ]]> #{maxCount}
+            </if>
+            <if test="companyName != null and companyName != ''">
+                and company.CompanyName like Concat('%',#{companyName},'%')
+            </if>
+            <if test="RecordStatus != null and RecordStatus != ''">
+                and post.RecordStatus = #{RecordStatus}
+            </if>
+            <if test="WorkNmae != null and WorkNmae != ''">
+                and post.WorkNmae like Concat('%', #{WorkNmae},'%')
+            </if>
+        </where>
+    </select>
+</mapper>

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

@@ -0,0 +1,30 @@
+import {request} from "@/utils/request";
+
+
+export function getList(params: any) {
+  return request<object>(
+    {
+      url: "companyService/post/getList",
+      method: 'get',
+      params: params,
+    },
+    {
+      isNew: true,
+    },
+  );
+}
+
+export function del(data: any) {
+  return request<object>(
+    {
+      url: "companyService/post/delete",
+      method: 'post',
+      data: data,
+    },
+    {
+      isNew: true,
+      successMsg: '删除成功!',
+      errorMsg: '删除失败!'
+    },
+  );
+}

+ 72 - 82
vue/src/views/companyService/post/index.vue

@@ -1,78 +1,53 @@
 <template>
   <div class="card-search">
-    <a-form ref="formRef" name="advanced_search"  class="ant-advanced-search-form" :model="searchParams" >
+    <a-form ref="formRef" name="advanced_search" class="ant-advanced-search-form" :model="searchParams">
       <a-row :gutter="24">
         <a-col :span="6">
-          <a-form-item label="企业名称" :label-col="{span:6}" name="CompanyName">
-            <a-input v-model:value="searchParams.companyName" placeholder=""/>
+          <a-form-item label="岗位名称" :label-col="{span:6}" name="postName">
+            <a-input v-model:value="searchParams.postName" placeholder=""/>
           </a-form-item>
         </a-col>
-        <a-col :span="7">
-          <a-form-item label="企业地址" :label-col="{span:7}" name="CompanyAddress">
-            <a-input v-model:value="searchParams.companyAddress" placeholder=""/>
-<!--<a-range-picker format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']" @change="onRangeChange"/>-->
+        <a-col :span="6">
+          <a-form-item label="" :label-col="{span:3}" name="">
+            <label style="margin-left:26px;">招聘人数:</label>
+            <a-input type="number" v-model:value="searchParams.minCount" style="width: 30%;margin-right: 10px;" placeholder=""/>
+            <a-input type="number" v-model:value="searchParams.maxCount" style="width: 30%;"  placeholder=""/>
           </a-form-item>
         </a-col>
         <a-col :span="6">
-          <a-form-item label="负责人名称" :label-col="{span:6}" name="DutyUserName">
-            <a-input v-model:value="searchParams.dutyUserName" placeholder=""/>
-<!--            <a-select  ref="select"  v-model:value="searchParamsState.collegeID" :options="collegeList"
-                       :field-names="{label:'name',value:'collegeID'}"  @change="loadData"  functioncode="T014000" :allow-clear="true"  >
-            </a-select>-->
+          <a-form-item label="招聘企业" :label-col="{span:6}" name="companyName">
+            <a-input v-model:value="searchParams.companyName" placeholder=""/>
           </a-form-item>
         </a-col>
-      <a-col :span="5" style="text-align: right">
+        <a-col :span="5" style="text-align: right">
           <a-button type="primary" html-type="submit" @click="onSearch">查询</a-button>
-<!--          <a style="font-size: 12px" @click="expand = !expand">
-            <template v-if="expand">
-              <UpOutlined/>
-            </template>
-            <template v-else>
-              <DownOutlined/>
-            </template>
-            {{ expand ? '收缩' : '展开' }}
-          </a>-->
         </a-col>
       </a-row>
-<!--      <a-row :gutter="24" v-show="expand">
+      <a-row>
         <a-col :span="6">
-          <a-form-item label="问题描述" :label-col="{span:6}" name="ProblemDesc">
-            <a-input v-model:value="searchParamsState.problemDesc" placeholder=""/>
-          </a-form-item>
-        </a-col>
-        <a-col :span="7">
-          <a-form-item label="问题特性" :label-col="{span:7}" name="ProblemCharacteristics">
+          <a-form-item label="岗位状态" :label-col="{span:6}" name="RecordStatus">
             <a-select
               ref="select"
-              v-model:value="searchParamsState.problemCharacteristics"
-              :options="problemAttrList"
-              :field-names="{label:'name',value:'value'}"
+              v-model:value="searchParams.RecordStatus"
+              :options="postRecordlist"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
               @change="loadData"
-              :allow-clear="true" >
+            >
             </a-select>
           </a-form-item>
         </a-col>
         <a-col :span="6">
-          <a-form-item label="是否解决" :label-col="{span:6}" name="IsResolve">
-            <a-select
-              ref="select"
-              v-model:value="searchParamsState.isResolve"
-              :options="resolveList"
-              :field-names="{label:'resolveName',value:'resolveID'}"
-              @change="loadData"
-              :allow-clear="true" >
-            </a-select>
+          <a-form-item label="工种名称" :label-col="{span:6}" name="WorkNmae">
+            <a-input v-model:value="searchParams.WorkNmae" placeholder=""/>
           </a-form-item>
         </a-col>
-        <a-col :span="5" style="text-align: left">
-        </a-col>
-      </a-row>-->
+      </a-row>
       <a-row class="edit-operation">
         <a-col :span="24" style="text-align: right">
-<!--functioncode="T014001"-->
-          <a-button type="primary" html-type="submit" @click='onOperates(null,"新增",false)' >新增</a-button>
-<!--          <BExportExcel :title="'导出'" :filename="'问题台账记录'" :url="'stitution/export'"
-                        :params="{...searchParams,isExport: true, rows:100000}"></BExportExcel>-->
+          <a-button type="primary" html-type="submit" @click='onOperates(null,"新增",false)'>新增</a-button>
+          <a-button type="primary" html-type="submit" @click='importPost()'>导入</a-button>
+          <a-button type="primary" html-type="submit" @click='exportPost()'>导出</a-button>
         </a-col>
       </a-row>
     </a-form>
@@ -86,14 +61,13 @@
         <template #bodyCell="{ column, text, record }">
           <template v-if="column.key === 'operation'">
             <div class="table-operation">
-              <a-button type="link" size="small" @click='onOperates(record.institutionID,"修改",false)' >编辑</a-button>
-              <a-button type="link" size="small" @click="onDel(record)" >删除</a-button>
+              <a-button type="link" size="small" @click='onOperates(record.institutionID,"修改",false)'>编辑</a-button>
+              <a-button type="link" size="small" @click="onDel(record)">删除</a-button>
             </div>
           </template>
         </template>
       </a-table>
     </div>
-    <InstitutionEditForm ref="institutionEditModelRef" :loadData="loadData"></InstitutionEditForm>
   </div>
 </template>
 
@@ -102,24 +76,23 @@ import {reactive, ref, computed, defineComponent, createVNode} from 'vue';
 import {DownOutlined, ExclamationCircleOutlined, UpOutlined} from '@ant-design/icons-vue';
 import type {FormInstance} from 'ant-design-vue';
 import type {TableColumnsType, TableProps} from 'ant-design-vue';
-import {getList, del} from '@/api/baseSettings/institution';
-import InstitutionEditForm from "@/views/baseSettings/institution/edit.vue";
+import {getList, del} from '@/api/companyService/post';
 import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
 import {getPaginationTotalTitle} from "@/utils/common";
 import {message, Modal} from "ant-design-vue";
-
+import dayjs from 'dayjs';
 export default defineComponent({
-  name: 'InstitutionList',
-  components: {InstitutionEditForm, DownOutlined, UpOutlined, BExportExcel},
+  name: 'PostList',
+  components: { DownOutlined, UpOutlined, BExportExcel},
   setup() {
     const formRef = ref<FormInstance>();
     const searchParams = reactive({
       pageIndex: 1,
       pageSize: 20,
-      primaryKey:'',
-      companyName: '',
-      companyAddress: '',
-      dutyUserName:''
+      primaryKey: '',
+      minCount:0,
+      maxCount:0,
+      recordStatus:1
     });
     const formState = reactive({
       total: 0,
@@ -127,18 +100,33 @@ export default defineComponent({
       loading: false
     });
     const columns: TableColumnsType = [
-      {title: '序号', align: "center",key: 'institutionID',customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`},
-      {title: '企业名称', dataIndex: 'companyName', key: 'companyName', align: "center"},
-      {title: '企业地址', dataIndex: 'companyAddress', key: 'companyAddress',width:120, align: "center"},
-      {title: '负责人姓名', dataIndex: 'fzrName', key: 'fzrName', align: "center"},
-      {title: '负责人电话', dataIndex: 'fzrMobile', key: 'fzrMobile', align: "center"},
-      {title: '法人姓名', dataIndex: 'frName', key: 'frName', align: "center"},
-      {title: '法人电话', dataIndex: 'frMobile', key: 'frMobile', align: "center"},
-      {title: '企业机构代码', dataIndex: 'companyCode', key: 'companyCode', align: "center"},
-      {title: '管理驿站数量', dataIndex: 'siteCount', key: 'siteCount', align: "center",
-        /*customRender:  ({record}) => record.resolveDate == null?"":dayjs(record.resolveDate).format('YYYY-MM-DD')*/
+      {
+        title: '序号',
+        align: "center",
+        key: 'institutionID',
+        customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`
+      },
+      {title: '岗位名称', dataIndex: 'postName', key: 'postName', align: "center"},
+      {title: '招聘人数', dataIndex: 'recruitCount', key: 'recruitCount', width: 120, align: "center"},
+      {
+        title: '有效开始日期', dataIndex: 'createTime', key: 'createTime', align: "center", customRender: (item) => {
+          return item.record.createTime==null?"": (dayjs(item.record.createTime).format('YYYY-MM-DD'))
+        }
+      },
+      {title: '有效期(天)', dataIndex: 'validDay', key: 'validDay', align: "center"},
+      {title: '招聘企业', dataIndex: 'companyName', key: 'companyName', align: "center"},
+      {title: '岗位状态', dataIndex: 'recordStatus', key: 'recordStatus', align: "center"},
+      {title: '工种名称', dataIndex: 'workNmae', key: 'workNmae', align: "center"},
+      {title: '文化程度', dataIndex: 'cultureRank', key: 'cultureRank', align: "center"},
+      {
+        title: '薪酬', dataIndex: 'siteCount', key: 'siteCount', align: "center", customRender: (item) => {
+          const salary = `${item.record.minSalary}~${item.record.maxSalary}`
+          return salary;
+        }
       },
-      {title: '操作', key: 'operation', fixed: 'right',width:170, align: "center"},
+      {title: '联系人', dataIndex: 'userName', key: 'userName', align: "center"},
+      {title: '联系电话', dataIndex: 'userMobile', key: 'userMobile', align: "center"},
+      {title: '操作', key: 'operation', fixed: 'right', width: 170, align: "center"},
     ];
     const pagination = computed(() => ({
       total: formState.total,
@@ -149,12 +137,6 @@ export default defineComponent({
     }));
 
     const dataList = ref([]);
-    /*const problemAttrList = ref<SelectProps['options']>();
-    const collegeList = ref<SelectProps['options']>();
-    const resolveList = ref([{resolveName:"是",resolveID:1},{resolveName:"否",resolveID:0}]);*/
-    const institutionEditModelRef = ref();
-
-
     const loadData = async function () {
       formState.loading = true;
       const result: any = await getList(searchParams);
@@ -178,7 +160,7 @@ export default defineComponent({
       loadData();
     }
 
-    const onDel= (item: any) => {
+    const onDel = (item: any) => {
       if (item) {
         formState.selectedRowKeys.push(item.InstitutionID as never)
       }
@@ -207,8 +189,14 @@ export default defineComponent({
       });
     };
 
-    const onOperates = (id: string,operation:string,isDetail:boolean) => {
-      institutionEditModelRef.value.show(id,operation,isDetail);
+    const importPost = () => {
+      console.log('导入');
+    }
+    const exportPost = () => {
+      console.log('导出');
+    }
+    const onOperates = () => {
+      console.log('新增');
     };
 
     return {
@@ -218,11 +206,12 @@ export default defineComponent({
       columns,
       pagination,
       dataList,
-      institutionEditModelRef,
       handleTableChange,
       onSelectChange,
       onSearch,
       onOperates,
+      importPost,
+      exportPost,
       onDel,
       loadData
     };
@@ -236,3 +225,4 @@ export default defineComponent({
   }
 });
 </script>
+<style lang="less" scoped></style>