Forráskód Böngészése

feat: 驿站统计报表

zhangying 2 hónapja
szülő
commit
24e13b8ac7

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

@@ -0,0 +1,3 @@
+INSERT INTO sys_function_code VALUES ('T010506', '驿站统计报表', 'T0105', 6);
+INSERT INTO `sys_menu` VALUES ('T010506', 6, '驿站统计报表', NULL, 'views/statistics/SiteStatistics', '/siteStatistics', 'T0105', NULL, 0, 1, 1, 'T010506', 1, NULL, NULL);
+insert into sys_role_sys_function_code (`RoleID`, `FunctionCode`) values('20afde90-a81a-11ed-a6c5-7085c2a9999e','T010506');

+ 21 - 1
src/main/java/com/hz/employmentsite/controller/statistics/StatisticsController.java

@@ -12,7 +12,6 @@ import com.hz.employmentsite.vo.statistics.SystemDataCount;
 import com.hz.employmentsite.vo.statistics.company.ModelCompanyCount;
 import com.hz.employmentsite.vo.statistics.jobUser.*;
 import org.apache.poi.ss.util.CellRangeAddress;
-import org.apache.poi.xssf.usermodel.XSSFCellStyle;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -217,6 +216,27 @@ public class StatisticsController {
         return RespGenerstor.success(siteServiceCount);
     }
 
+    /**
+     * 查询重点人员在各区县的分布情况
+     */
+    @GetMapping("/personTypeCountInRegion")
+    public BaseResponse getPersonTypeCountInRegion(@RequestParam(required = false) Integer keyPersonTypeID, @RequestParam(required = false) Date startDate,
+                                                 @RequestParam(required = false) Date endDate, @RequestParam(required = false) String regionCode,
+                                                 @RequestParam(required = false)String siteID) {
+        return RespGenerstor.success(statisticsService.findPersonTypeCountInRegion(keyPersonTypeID, startDate, endDate, regionCode, siteID));
+    }
+
+    /**
+     * 查询重点人员在求职人员的性别,年龄,学历的分布情况
+     */
+    @GetMapping("/personTypeCountInJobUserData")
+    public BaseResponse getPersonTypeCountInJobUserData(@RequestParam(required = false) Integer keyPersonTypeID, @RequestParam(required = false) Date startDate,
+                                                        @RequestParam(required = false) Date endDate, @RequestParam(required = false) String regionCode,
+                                                        @RequestParam(required = false)String siteID) {
+        return RespGenerstor.success(statisticsService.findPersonTypeCountInJobUserData(keyPersonTypeID, startDate, endDate, regionCode, siteID));
+    }
+
+
     /**
      * 导出指定时间段的系统使用情况
      *

+ 28 - 0
src/main/java/com/hz/employmentsite/mapper/cquery/StatisticsCQuery.java

@@ -185,4 +185,32 @@ public interface StatisticsCQuery {
     List<SiteServiceCount> findSitePostServiceCount(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
     List<SiteServiceCount> findSiteJobUserServiceCount(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
     List<SiteServiceCount> findSitePostRecruitServiceCount(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
+
+    /**
+     * 查询重点人员在各驿站的分布情况
+     */
+    List<PersonTypeJobUserCount> findPersonTypeCountInRegion(@Param("keyPersonTypeID") Integer keyPersonTypeID, @Param("startDate") Date startDate,
+                                                           @Param("endDate") Date endDate, @Param("regionCode") String regionCode,
+                                                           @Param("siteID") String siteID);
+
+    /**
+     * 查询重点人员在求职人员性别的分布情况
+     */
+    List<PersonTypeJobUserCount> findPersonTypeCountInSex(@Param("keyPersonTypeID") Integer keyPersonTypeID, @Param("startDate") Date startDate,
+                                                             @Param("endDate") Date endDate, @Param("regionCode") String regionCode,
+                                                             @Param("siteID") String siteID);
+
+    /**
+     * 查询重点人员在求职人员年龄段的分布情况
+     */
+    List<PersonTypeJobUserCount> findPersonTypeCountInAgeRange(@Param("keyPersonTypeID") Integer keyPersonTypeID, @Param("startDate") Date startDate,
+                                                          @Param("endDate") Date endDate, @Param("regionCode") String regionCode,
+                                                          @Param("siteID") String siteID);
+
+    /**
+     * 查询重点人员在求职人员学历的分布情况
+     */
+    List<PersonTypeJobUserCount> findPersonTypeCountInCultureRank(@Param("keyPersonTypeID") Integer keyPersonTypeID, @Param("startDate") Date startDate,
+                                                               @Param("endDate") Date endDate, @Param("regionCode") String regionCode,
+                                                               @Param("siteID") String siteID);
 }

+ 26 - 1
src/main/java/com/hz/employmentsite/services/impl/statistics/StatisticsServiceImpl.java

@@ -3,6 +3,7 @@ package com.hz.employmentsite.services.impl.statistics;
 import com.hz.employmentsite.mapper.cquery.JobUserServiceCQuery;
 import com.hz.employmentsite.mapper.cquery.StatisticsCQuery;
 import com.hz.employmentsite.services.service.statistics.StatisticsService;
+import com.hz.employmentsite.services.service.system.CityAreaService;
 import com.hz.employmentsite.util.DateUtils;
 import com.hz.employmentsite.util.StringUtils;
 import com.hz.employmentsite.vo.jobUserManager.JobUserServiceVo;
@@ -34,6 +35,9 @@ public class StatisticsServiceImpl implements StatisticsService {
     @Autowired
     private JobUserServiceCQuery jobUserServiceCQuery;
 
+    @Autowired
+    private CityAreaService cityAreaService;
+
     /**
      * 查询指定时间段系统使用情况
      *
@@ -353,7 +357,7 @@ public class StatisticsServiceImpl implements StatisticsService {
                 String cultureName = cultureEntry.getValue();
                 if (!existingRanks.contains(cultureRank)) {
                     // 插入默认的数据
-                    result.add(new PersonTypeJobUserCount(keyPersonTypeID, keyTypeName, cultureRank, cultureName, 0));
+                    result.add(new PersonTypeJobUserCount(keyPersonTypeID, keyTypeName, cultureRank, cultureName, null, null, null, null, null, null, null, 0));
                 }
             }
         }
@@ -618,4 +622,25 @@ public class StatisticsServiceImpl implements StatisticsService {
         });
         return new ArrayList<>(resultMap.values());
     }
+
+    /**
+     * 查询重点人员在各驿站的分布情况
+     */
+    @Override
+    public List<PersonTypeJobUserCount> findPersonTypeCountInRegion(Integer keyPersonTypeID, Date startDate, Date endDate, String regionCode, String siteID) {
+        return statisticsCQuery.findPersonTypeCountInRegion(keyPersonTypeID, startDate, endDate, regionCode, siteID);
+    }
+
+    /**
+     * 查询重点人员在求职人员的性别,年龄,学历的分布情况
+     */
+    @Override
+    public List<PersonTypeJobUserCount> findPersonTypeCountInJobUserData(Integer keyPersonTypeID, Date startDate, Date endDate, String regionCode, String siteID) {
+        List<PersonTypeJobUserCount> personTypeCountList = new ArrayList<>();
+        personTypeCountList.addAll(statisticsCQuery.findPersonTypeCountInSex(keyPersonTypeID, startDate, endDate, regionCode, siteID)); // 性别情况
+        personTypeCountList.addAll(statisticsCQuery.findPersonTypeCountInAgeRange(keyPersonTypeID, startDate, endDate, regionCode, siteID)); // 年龄段情况
+        personTypeCountList.addAll(statisticsCQuery.findPersonTypeCountInCultureRank(keyPersonTypeID, startDate, endDate, regionCode, siteID)); // 学历情况
+        return personTypeCountList;
+
+    }
 }

+ 12 - 0
src/main/java/com/hz/employmentsite/services/service/statistics/StatisticsService.java

@@ -110,4 +110,16 @@ public interface StatisticsService {
      * 查询各驿站的服务数量
      */
     List<SiteServiceCount> findSiteServiceCount(Date startDate, Date endDate);
+
+    /**
+     * 查询重点人员在各驿站的分布情况
+     */
+    List<PersonTypeJobUserCount> findPersonTypeCountInRegion(Integer keyPersonTypeID, Date startDate, Date endDate,
+                                                           String regionCode, String siteID);
+
+    /**
+     * 查询重点人员在求职人员的性别,年龄,学历的分布情况
+     */
+    List<PersonTypeJobUserCount> findPersonTypeCountInJobUserData(Integer keyPersonTypeID, Date startDate, Date endDate,
+                                                                  String regionCode, String siteID);
 }

+ 14 - 0
src/main/java/com/hz/employmentsite/vo/statistics/jobUser/PersonTypeJobUserCount.java

@@ -16,5 +16,19 @@ public class PersonTypeJobUserCount {
 
     private String cultureName;
 
+    private String siteID;
+
+    private String siteName;
+
+    private String regionCode;
+
+    private String regionName;
+
+    private Integer genderID;
+
+    private String genderName;
+
+    private String ageRange;
+
     private int jobUserCount;
 }

+ 161 - 0
src/main/resources/mapping/cquery/StatisticsCQuery.xml

@@ -865,4 +865,165 @@
             site.SiteID,
             site.SiteName
     </select>
+
+    <select id="findPersonTypeCountInRegion" resultType="com.hz.employmentsite.vo.statistics.jobUser.PersonTypeJobUserCount">
+        SELECT
+            jobuser.KeyPersonTypeID,
+            keytype.`Name` AS KeyTypeName,
+            site.RegionCode,
+            area.`name` AS regionName,
+            COUNT( 1 ) AS jobUserCount
+        FROM
+            `pc_jobuser` jobuser
+                LEFT JOIN sys_dictionary_item keytype ON jobuser.KeyPersonTypeID = keytype.`Value`
+                AND keytype.DictionaryCode = 'KeyPersonType'
+                LEFT JOIN pc_site site ON jobuser.SiteID = site.SiteID
+                LEFT JOIN area_code area ON site.RegionCode = area.`code`
+        WHERE
+            1=1
+            <if test="keyPersonTypeID != null">
+                and jobuser.KeyPersonTypeID = #{keyPersonTypeID}
+            </if>
+            <if test="startDate != null">
+                and DATE(jobuser.CreateTime) <![CDATA[ >= ]]> DATE(#{startDate})
+            </if>
+            <if test="endDate != null ">
+                and DATE(jobuser.CreateTime) <![CDATA[ <= ]]> DATE(#{endDate})
+            </if>
+            <if test="regionCode != null and regionCode != ''">
+                and site.RegionCode = #{regionCode}
+            </if>
+            <if test="siteID != null and siteID != ''">
+                and jobuser.siteID = #{siteID}
+            </if>
+        GROUP BY
+            jobuser.KeyPersonTypeID,
+            keytype.`Name`,
+            site.RegionCode,
+            area.`name`
+        ORDER BY
+            jobuser.KeyPersonTypeID DESC
+    </select>
+
+    <select id="findPersonTypeCountInSex" resultType="com.hz.employmentsite.vo.statistics.jobUser.PersonTypeJobUserCount">
+        SELECT
+            jobuser.KeyPersonTypeID,
+            keytype.`Name` AS KeyTypeName,
+            gender.`Value` AS genderID,
+            gender.`name` AS genderName,
+            COUNT( 1 ) AS jobUserCount
+        FROM
+            `pc_jobuser` jobuser
+                LEFT JOIN sys_dictionary_item keytype ON jobuser.KeyPersonTypeID = keytype.`Value`
+                AND keytype.DictionaryCode = 'KeyPersonType'
+                LEFT JOIN sys_dictionary_item gender ON jobuser.Sex = gender.`Value`
+                AND gender.DictionaryCode = 'Gender'
+                LEFT JOIN pc_site site ON jobuser.SiteID = site.SiteID
+                LEFT JOIN area_code area ON site.RegionCode = area.`code`
+        WHERE
+            1=1
+            <if test="keyPersonTypeID != null">
+                and jobuser.KeyPersonTypeID = #{keyPersonTypeID}
+            </if>
+            <if test="startDate != null">
+                and DATE(jobuser.CreateTime) <![CDATA[ >= ]]> DATE(#{startDate})
+            </if>
+            <if test="endDate != null ">
+                and DATE(jobuser.CreateTime) <![CDATA[ <= ]]> DATE(#{endDate})
+            </if>
+            <if test="regionCode != null and regionCode != ''">
+                and site.RegionCode = #{regionCode}
+            </if>
+            <if test="siteID != null and siteID != ''">
+                and jobuser.siteID = #{siteID}
+            </if>
+        GROUP BY
+            jobuser.KeyPersonTypeID,
+            keytype.`Name`,
+            gender.`Value`,
+            gender.`name`
+        ORDER BY
+            jobuser.KeyPersonTypeID DESC
+    </select>
+
+    <select id="findPersonTypeCountInAgeRange" resultType="com.hz.employmentsite.vo.statistics.jobUser.PersonTypeJobUserCount">
+        SELECT
+            jobuser.KeyPersonTypeID,
+            keytype.`Name` AS KeyTypeName,
+            CASE
+            WHEN TIMESTAMPDIFF(YEAR, BirthDay, CURDATE()) BETWEEN 18 AND 20 THEN '18-20岁'
+            WHEN TIMESTAMPDIFF(YEAR, BirthDay, CURDATE()) BETWEEN 21 AND 30 THEN '21-30岁'
+            WHEN TIMESTAMPDIFF(YEAR, BirthDay, CURDATE()) BETWEEN 31 AND 40 THEN '31-40岁'
+            WHEN TIMESTAMPDIFF(YEAR, BirthDay, CURDATE()) BETWEEN 41 AND 50 THEN '41-50岁'
+            WHEN TIMESTAMPDIFF(YEAR, BirthDay, CURDATE()) BETWEEN 51 AND 60 THEN '51-60岁'
+            END AS AgeRange,
+            COUNT( 1 ) AS jobUserCount
+        FROM
+            `pc_jobuser` jobuser
+                LEFT JOIN sys_dictionary_item keytype ON jobuser.KeyPersonTypeID = keytype.`Value`
+                AND keytype.DictionaryCode = 'KeyPersonType'
+                LEFT JOIN pc_site site ON jobuser.SiteID = site.SiteID
+                LEFT JOIN area_code area ON site.RegionCode = area.`code`
+        WHERE
+            1=1
+            <if test="keyPersonTypeID != null">
+                and jobuser.KeyPersonTypeID = #{keyPersonTypeID}
+            </if>
+            <if test="startDate != null">
+                and DATE(jobuser.CreateTime) <![CDATA[ >= ]]> DATE(#{startDate})
+            </if>
+            <if test="endDate != null ">
+                and DATE(jobuser.CreateTime) <![CDATA[ <= ]]> DATE(#{endDate})
+            </if>
+            <if test="regionCode != null and regionCode != ''">
+                and site.RegionCode = #{regionCode}
+            </if>
+            <if test="siteID != null and siteID != ''">
+                and jobuser.siteID = #{siteID}
+            </if>
+        GROUP BY
+            jobuser.KeyPersonTypeID,
+            keytype.`Name`,
+            AgeRange
+        ORDER BY
+            jobuser.KeyPersonTypeID DESC
+    </select>
+
+    <select id="findPersonTypeCountInCultureRank" resultType="com.hz.employmentsite.vo.statistics.jobUser.PersonTypeJobUserCount">
+        SELECT
+            jobuser.KeyPersonTypeID,
+            keytype.`Name` AS KeyTypeName,
+            jobuser.CultureRank,
+            culture.`Name` AS CultureName,
+            COUNT( 1 ) AS jobUserCount
+        FROM
+            `pc_jobuser` jobuser
+                LEFT JOIN sys_dictionary_item keytype ON jobuser.KeyPersonTypeID = keytype.`Value`
+                AND keytype.DictionaryCode = 'KeyPersonType'
+                LEFT JOIN sys_dictionary_item culture ON jobuser.CultureRank = culture.`Value`
+                AND culture.DictionaryCode = 'HighestDegree'
+        WHERE
+            1=1
+            <if test="keyPersonTypeID != null">
+                and jobuser.KeyPersonTypeID = #{keyPersonTypeID}
+            </if>
+            <if test="startDate != null">
+                and DATE(jobuser.CreateTime) <![CDATA[ >= ]]> DATE(#{startDate})
+            </if>
+            <if test="endDate != null ">
+                and DATE(jobuser.CreateTime) <![CDATA[ <= ]]> DATE(#{endDate})
+            </if>
+            <if test="regionCode != null and regionCode != ''">
+                and site.RegionCode = #{regionCode}
+            </if>
+            <if test="siteID != null and siteID != ''">
+                and jobuser.siteID = #{siteID}
+            </if>
+        GROUP BY
+            jobuser.KeyPersonTypeID,
+            keytype.`Name`,
+            jobuser.CultureRank
+        ORDER BY
+            jobuser.KeyPersonTypeID DESC
+    </select>
 </mapper>

+ 32 - 0
vue/src/api/statistics/index.ts

@@ -292,3 +292,35 @@ export function getSiteServiceCount(params: any) {
     },
   );
 }
+
+/**
+ * 查询重点人员在各区县的分布情况
+ */
+export function getPersonTypeCountInRegion(params: any) {
+  return request<object>(
+    {
+      url: 'statistics/personTypeCountInRegion',
+      method: 'get',
+      params: params,
+    },
+    {
+      isNew: true,
+    },
+  );
+}
+
+/**
+ * 查询重点人员在求职人员的性别,年龄,学历的分布情况
+ */
+export function getPersonTypeCountInJobUserData(params: any) {
+  return request<object>(
+    {
+      url: 'statistics/personTypeCountInJobUserData',
+      method: 'get',
+      params: params,
+    },
+    {
+      isNew: true,
+    },
+  );
+}

+ 1 - 0
vue/src/router/asyncModules/statistics.ts

@@ -3,4 +3,5 @@ export default {
   'views/statistics/MonthSystemApplyCount': () => import('@/views/statistics/MonthSystemApplyCount.vue'),
   'views/statistics/JobUserCount': () => import('@/views/statistics/JobUserCount.vue'),
   'views/statistics/YearSystemApplyCount': () => import('@/views/statistics/YearSystemApplyCount.vue'),
+  'views/statistics/SiteStatistics': () => import('@/views/statistics/SiteStatistics.vue'),
 };

+ 436 - 0
vue/src/views/statistics/SiteStatistics.vue

@@ -0,0 +1,436 @@
+<template>
+  <div class="card-search">
+    <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: 8 }" name="keyPersonTypeID">
+            <a-select
+              ref="select"
+              v-model:value="searchParams.keyPersonTypeID"
+              :options="keyPersonTypeList"
+              :field-names="{ label: 'name', value: 'value' }"
+              :allow-clear="true"
+              @change="onFinish"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="6">
+          <a-form-item label="统计周期" :label-col="{ span: 8 }" name="emphasisTypeId">
+            <a-range-picker format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']" v-model:value="reportDate"
+                            @change="onRangeChange"/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="6">
+          <a-form-item label="所属县区" :label-col="{span:8}" name="regionCode">
+            <a-select
+              ref="select"
+              v-model:value="searchParams.regionCode"
+              :options="regionList"
+              :field-names="{ label: 'name', value: 'code' }"
+              :allow-clear="true"
+              @change="onFinish"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="6" style="text-align: left">
+          <a-button type="primary" html-type="submit" @click="onFinish">查询</a-button>
+          <a-button
+            style="margin: 0 8px"
+            @click="
+              () => {
+                formRef.resetFields();
+                onFinish();
+              }
+            ">重置
+          </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-col :span="6">
+          <a-form-item label="所属驿站" :label-col="{ span: 8 }" name="siteID">
+            <a-select
+              ref="select"
+              v-model:value="searchParams.siteID"
+              :options="siteList"
+              :field-names="{ label: 'siteName', value: 'siteID' }"
+              :allow-clear="true"
+              @change="onFinish"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+    <!-- 操作按钮 -->
+    <a-row class="edit-operation" style="margin-bottom: 20px">
+      <a-col :span="24" class="flex-space-between">
+        <div>
+          <a-radio-group v-model:value="searchType" button-style="solid" @change="searchTypeChange">
+            <a-radio-button value="personTypeByJobUser">重点人员类别分布情况</a-radio-button>
+            <a-radio-button value="personTypeByRegion">各区县重点人员类别分布情况</a-radio-button>
+          </a-radio-group>
+        </div>
+        <div>
+        </div>
+      </a-col>
+    </a-row>
+    <!-- 数据展示 -->
+    <!-- 重点人员类别在求职人员的性别,年龄,学历的分布情况 -->
+    <div v-show="searchType == 'personTypeByJobUser'">
+      <a-table :columns="personTypeInJobUserDataTableColumns" :data-source="personTypeInJobUserDataList"
+               :scroll="{ x:'100%' }"
+               :loading="searchLoading"
+               :pagination="false"
+               bordered>
+      </a-table>
+    </div>
+    <!-- 各区县重点人员类别分布情况 -->
+    <div v-show="searchType == 'personTypeByRegion'">
+      <a-table :columns="personTypeInRegionTableColumns" :data-source="personTypeInRegionList" :scroll="{ x:'100%' }"
+               :loading="searchLoading"
+               :pagination="false"
+               bordered>
+      </a-table>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import {onMounted, reactive, ref} from "vue";
+import {DownOutlined, UpOutlined} from "@ant-design/icons-vue";
+import {getSysDictionaryList} from "@/api/system/dictionary";
+import type {RangeValue} from "ant-design-vue/es/vc-picker/interface";
+import dayjs from "dayjs";
+import {get} from "@/api/common";
+import {getSiteList} from "@/api/baseSettings/siteInfo";
+import {getPersonTypeCountInJobUserData, getPersonTypeCountInRegion} from "@/api/statistics";
+
+const searchParams = reactive({
+  keyPersonTypeID: null,
+  startDate: "",
+  endDate: "",
+  regionCode: "",
+  siteID: ""
+})
+const formRef = ref();
+const expand = ref(false);
+const keyPersonTypeList = ref([])
+const reportDate = ref<RangeValue<any>>();
+const regionList = ref<Array<any>>([]);
+const siteList = ref();
+const searchType = ref("personTypeByJobUser");
+const searchLoading = ref(false);
+const personTypeInRegionKeyTemp = [];
+const personTypeInRegionTableColumns = ref([{
+  title: '人员类别', dataIndex: 'keyTypeName', key: 'keyTypeName', align: "center", width: 280
+},]);
+const personTypeInRegionList = ref<Array<any>>([])
+const personTypeInJobUserDataKeyTemp = ['gander1', 'gander2', 'age18-20岁', 'age21-30岁', 'age31-40岁', 'age41-50岁', 'age51-60岁', "cultureRank1", "cultureRank2", "cultureRank3", "cultureRank4", "cultureRank5"];
+const personTypeInJobUserDataTableColumns = ref([
+  {
+    title: '人员类别', dataIndex: 'keyTypeName', key: 'keyTypeName', align: "center", width: 280
+  },
+  {
+    title: '性别', dataIndex: 'sex', key: 'sex', align: "center",
+    children: [
+      {
+        title: '男',
+        dataIndex: 'gander1',
+        key: 'gander1',
+        align: "center"
+      },
+      {
+        title: '女',
+        dataIndex: 'gander2',
+        key: 'gander2',
+        align: "center"
+      },
+    ]
+  },
+  {
+    title: '年龄', dataIndex: 'age', key: 'age', align: "center",
+    children: [
+      {
+        title: '18-20岁',
+        dataIndex: 'age18-20岁',
+        key: 'age18-20岁',
+        align: "center"
+      }, {
+        title: '21-30岁',
+        dataIndex: 'age21-30岁',
+        key: 'age21-30岁',
+        align: "center"
+      }, {
+        title: '31-40岁',
+        dataIndex: 'age31-40岁',
+        key: 'age31-40岁',
+        align: "center"
+      }, {
+        title: '41-50岁',
+        dataIndex: 'age41-50岁',
+        key: 'age41-50岁',
+        align: "center"
+      }, {
+        title: '51-60岁',
+        dataIndex: 'age51-60岁',
+        key: 'age51-60岁',
+        align: "center"
+      },
+    ]
+  },
+  {
+    title: '文化程度', dataIndex: 'cultureRank', key: 'cultureRank', align: "center",
+    children: [
+      {
+        title: '初中及以下',
+        dataIndex: 'cultureRank1',
+        key: 'cultureRank1',
+        width: 130,
+        align: "center"
+      }, {
+        title: '高中、中职、中技',
+        dataIndex: 'cultureRank2',
+        key: 'cultureRank2',
+        width: 130,
+        align: "center"
+      }, {
+        title: '大专',
+        dataIndex: 'cultureRank3',
+        key: 'cultureRank3',
+        width: 130,
+        align: "center"
+      }, {
+        title: '本科',
+        dataIndex: 'cultureRank4',
+        key: 'cultureRank4',
+        width: 130,
+        align: "center"
+      }, {
+        title: '硕士及以上',
+        dataIndex: 'cultureRank5',
+        key: 'cultureRank5',
+        width: 130,
+        align: "center"
+      },
+    ]
+  },
+]);
+const personTypeInJobUserDataList = ref<Array<any>>([])
+
+function onFinish() {
+  searchTypeChange();
+}
+
+const getKeyPersonTypeList = () => {
+  getSysDictionaryList('KeyPersonType').then((data) => {
+    keyPersonTypeList.value = data;
+  });
+};
+
+// 时间段变更事件
+const onRangeChange = (dateString: [string, string]) => {
+  searchParams.startDate = dateString != null ? dayjs(dateString[0]).format("YYYY-MM-DD") : "";
+  searchParams.endDate = dateString != null ? dayjs(dateString[1]).format("YYYY-MM-DD") : "";
+  onFinish();
+};
+
+function getRegionList() {
+  get('system/area/getCityList', {}).then(data => {
+    regionList.value = data;
+    // 生成各区县重点人员类别分布情况的表格定义
+    data.forEach((region) => {
+      personTypeInRegionTableColumns.value.push({
+        title: region.name,
+        dataIndex: "region" + region.code,
+        key: "region" + region.code,
+        align: "center"
+      })
+      personTypeInRegionKeyTemp.push("region" + region.code)
+    })
+  });
+}
+
+function getAllSites() {
+  getSiteList({pageIndex: 1, pageSize: 9999}).then((result: any) => {
+    siteList.value = result.list;
+  })
+}
+
+function searchTypeChange() {
+  if (searchType.value == "personTypeByJobUser") {
+    searchLoading.value = true;
+    personTypeInJobUserDataList.value = []
+    getPersonTypeCountInJobUserData({...searchParams}).then((result: any) => {
+      // 初始化合计数据
+      let count = {
+        keyPersonTypeID: -1,
+        keyTypeName: "合计",
+      }
+      personTypeInJobUserDataKeyTemp.forEach(key => {
+        count[key] = 0; // 指定字段赋值为0
+      })
+      result.forEach((resItem: any) => {
+        // 查询获取人员类别数据的下标,保证每种人员类别只存在一条数据
+        const findIndex = personTypeInJobUserDataList.value.findIndex((find: any) => find.keyPersonTypeID == resItem.keyPersonTypeID);
+        if (findIndex > -1) {
+          // 人员类型已存在,修改这条数据
+          if (resItem.genderID != null) {
+            // 性别分布
+            personTypeInJobUserDataList.value[findIndex]['gander' + resItem.genderID] = resItem.jobUserCount;
+            count['gander' + resItem.genderID] += resItem.jobUserCount; // 计算合计
+          } else if (resItem.ageRange != null) {
+            // 年龄分布
+            personTypeInJobUserDataList.value[findIndex]['age' + resItem.ageRange] = resItem.jobUserCount;
+            count['age' + resItem.ageRange] += resItem.jobUserCount; // 计算合计
+          } else if (resItem.cultureRank != null) {
+            // 学历分布
+            let cultureRankKey;
+            switch (resItem.cultureRank) {
+              case 11:
+              case 14:
+                cultureRankKey = 'cultureRank5'; // 硕士以上
+                break;
+              case 21:
+                cultureRankKey = 'cultureRank4'; // 大学本科
+                break;
+              case 31:
+                cultureRankKey = 'cultureRank3'; // 大学专科
+                break;
+              case 41:
+              case 44:
+              case 47:
+              case 61:
+              case 100:
+                cultureRankKey = 'cultureRank2'; // 高中、中职、中技
+                break;
+              default:
+                cultureRankKey = 'cultureRank1'; // 初中及以下
+                break;
+            }
+            personTypeInJobUserDataList.value[findIndex][cultureRankKey] += resItem.jobUserCount;
+            count[cultureRankKey] += resItem.jobUserCount; // 计算合计
+          }
+        } else {
+          // 不存在,新增一条数据
+          const newData = {
+            keyPersonTypeID: resItem.keyPersonTypeID,
+            keyTypeName: resItem.keyTypeName
+          }
+          personTypeInJobUserDataKeyTemp.forEach(key => {
+            newData[key] = 0; // 指定字段赋值为0
+          })
+          if (resItem.genderID != null) {
+            newData['gander' + resItem.genderID] = resItem.jobUserCount; // 性别分布情况
+            count['gander' + resItem.genderID] += resItem.jobUserCount; // 计算合计
+          } else if (resItem.ageRange != null) {
+            newData['age' + resItem.ageRange] = resItem.jobUserCount; // 年龄分布情况
+            count['age' + resItem.ageRange] += resItem.jobUserCount; // 计算合计
+          } else if (resItem.cultureRank != null) {
+            // 学历分布
+            let cultureRankKey;
+            switch (resItem.cultureRank) {
+              case 11:
+              case 14:
+                cultureRankKey = 'cultureRank5'; // 硕士以上
+                break;
+              case 21:
+                cultureRankKey = 'cultureRank4'; // 大学本科
+                break;
+              case 31:
+                cultureRankKey = 'cultureRank3'; // 大学专科
+                break;
+              case 41:
+              case 44:
+              case 47:
+              case 61:
+              case 100:
+                cultureRankKey = 'cultureRank2'; // 高中、中职、中技
+                break;
+              default:
+                cultureRankKey = 'cultureRank1'; // 初中及以下
+                break;
+            }
+            newData[cultureRankKey] += resItem.jobUserCount;
+            count[cultureRankKey] += resItem.jobUserCount; // 计算合计
+          }
+          personTypeInJobUserDataList.value.push(newData);
+        }
+      })
+      personTypeInJobUserDataList.value.push(count);
+    }).finally(() => {
+      searchLoading.value = false;
+    })
+  }
+  if (searchType.value == "personTypeByRegion") {
+    searchLoading.value = true;
+    personTypeInRegionList.value = [];
+    getPersonTypeCountInRegion({...searchParams}).then((result: any) => {
+      let count = {
+        keyPersonTypeID: -1,
+        keyTypeName: "合计",
+      }
+      personTypeInRegionKeyTemp.forEach(key => {
+        count[key] = 0;
+      })
+      result.forEach((item: any) => {
+        const key = 'region' + item.regionCode;
+        const findIndex = personTypeInRegionList.value.findIndex((find: any) => find.keyPersonTypeID == item.keyPersonTypeID);
+        if (findIndex > -1) {
+          personTypeInRegionList.value[findIndex][key] = item.jobUserCount;
+          count[key] += item.jobUserCount;
+        } else {
+          let newData = {
+            keyPersonTypeID: item.keyPersonTypeID,
+            keyTypeName: item.keyTypeName,
+          }
+          personTypeInRegionKeyTemp.forEach(key => {
+            newData[key] = 0;
+          })
+          // 将当前循环到的元素的求职人数赋值
+          newData[key] = item.jobUserCount;
+          // 计算合计
+          count[key] += item.jobUserCount;
+          personTypeInRegionList.value.push(newData);
+        }
+      });
+      personTypeInRegionList.value.push(count);
+    }).finally(() => {
+      searchLoading.value = false;
+    })
+  }
+}
+
+onMounted(() => {
+  getKeyPersonTypeList();
+  getRegionList();
+  getAllSites();
+  onFinish();
+})
+</script>
+
+<script lang="ts">
+// 设置页面名称进行组件缓存
+export default {
+  name: "SiteStatistics",
+}
+</script>
+
+<style scoped>
+
+</style>