Procházet zdrojové kódy

feat: 驿站地图调整

zhangying před 9 měsíci
rodič
revize
ea1013abbf

+ 4 - 2
src/main/java/com/hz/employmentsite/controller/baseSettings/SiteInfoController.java

@@ -133,8 +133,10 @@ public class SiteInfoController {
      * 查询驿站的登记企业、岗位、求职者数量
      */
     @GetMapping("/dataCount")
-    public BaseResponse<Map> findSiteDataCount(@RequestParam String siteID){
-        Map<String, Object> result = siteInfoService.findSiteDataCount(siteID);
+    public BaseResponse<Map> findSiteDataCount(@RequestParam String siteID,
+                                               @RequestParam(required = false) String year,
+                                               @RequestParam(required = false) String month){
+        Map<String, Object> result = siteInfoService.findSiteDataCount(siteID, year, month);
         return RespGenerstor.success(result);
     }
 

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

@@ -18,7 +18,7 @@ public interface SiteInfoCQuery {
     /**
      * 查询驿站的登记企业、岗位、求职者数量
      */
-    Map<String, Object> findSiteDataCount(@Param("siteID") String siteID);
+    Map<String, Object> findSiteDataCount(@Param("siteID") String siteID, @Param("year") String year, @Param("month") String month);
 
     List<SiteInfoVo> getDataMapList(@Param("siteName") String siteName, @Param("regionCode") String regionCode,
                                     @Param("streetCode") String streetCode);

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

@@ -222,8 +222,8 @@ public class SiteInfoImpl implements SiteInfoService {
     }
 
     @Override
-    public Map<String, Object> findSiteDataCount(String siteID) {
-        return siteInfoCQuery.findSiteDataCount(siteID);
+    public Map<String, Object> findSiteDataCount(String siteID, String year, String month) {
+        return siteInfoCQuery.findSiteDataCount(siteID, year, month);
     }
 
     @Override

+ 1 - 1
src/main/java/com/hz/employmentsite/services/service/baseSettings/SiteInfoService.java

@@ -31,7 +31,7 @@ public interface SiteInfoService {
 
     Integer delete(List<String> idList);
 
-    Map<String, Object> findSiteDataCount(String siteID);
+    Map<String, Object> findSiteDataCount(String siteID, String year, String month);
 
     PageInfo<SiteInfoVo> getDataMapList(int pageIndex, int pageSize, String siteName, String regionCode, String streetCode);
 }

+ 3 - 0
src/main/java/com/hz/employmentsite/vo/baseSettings/SiteInfoVo.java

@@ -36,6 +36,9 @@ public class SiteInfoVo {
     @InstitutionID
     public String institutionID;
     public String institutionName;
+    public String institutionAddress;
+    public String institutionFzrName;
+    public String institutionFzrMobile;
     public List<SiteUserVo> manageUsers;
     public String siteUsers;
     public String remark;

+ 99 - 40
src/main/resources/mapping/cquery/SiteInfoCQuery.xml

@@ -66,52 +66,111 @@
 
     <select id="findSiteDataCount" resultType="Map">
         SELECT
-                (SELECT COUNT(1) FROM pc_company WHERE SiteID = #{siteID}) AS companyCount,
-                (SELECT COUNT(1) FROM pc_post post LEFT JOIN pc_company company ON post.CompanyID = company.CompanyID WHERE SiteID = #{siteID}) AS postCount,
-                (SELECT COUNT(1) FROM pc_jobuser WHERE SiteID = #{siteID}) AS jobUserCount;
+            (
+                SELECT
+                    COUNT( 1 )
+                FROM pc_company
+                WHERE
+                    SiteID = #{siteID}
+                    <if test="year!='' and year!=null">
+                        AND YEAR ( CreateTime ) = #{year}
+                    </if>
+                    <if test="month!='' and month!=null">
+                        AND MONTH ( CreateTime ) = #{month}
+                    </if>
+            ) AS companyCount,
+	        (
+                SELECT
+                    COUNT( 1 )
+                FROM
+                    pc_post post
+                    LEFT JOIN pc_company company ON post.CompanyID = company.CompanyID
+                WHERE
+                    SiteID = #{siteID}
+                    <if test="year!='' and year!=null">
+                        AND YEAR ( post.CreateTime ) = #{year}
+                    </if>
+                    <if test="month!='' and month!=null">
+                        AND MONTH ( post.CreateTime ) = #{month}
+                    </if>
+            ) AS postCount,
+            (
+                SELECT
+                    COUNT( 1 )
+                FROM pc_jobuser
+                WHERE
+                    SiteID = #{siteID}
+                    <if test="year!='' and year!=null">
+                        AND YEAR ( CreateTime ) = #{year}
+                    </if>
+                    <if test="month!='' and month!=null">
+                        AND MONTH ( CreateTime ) = #{month}
+                    </if>
+            ) AS jobUserCount,
+            (
+                SELECT
+                    COUNT( jobFairs.JobfairsID )
+                FROM
+                    `pc_jobfairs` jobFairs
+                    LEFT JOIN pc_site_user siteUser ON siteUser.UserID = jobFairs.CreateUserID
+                    LEFT JOIN pc_site site ON site.SiteID = siteUser.SiteID
+                WHERE
+                    site.SiteID = #{siteID}
+                    <if test="year!='' and year!=null">
+                        AND YEAR ( jobFairs.CreateTime ) = #{year}
+                    </if>
+                    <if test="month!='' and month!=null">
+                        AND MONTH ( jobFairs.CreateTime ) = #{month}
+                    </if>
+            ) AS jobFairsCount;
     </select>
 
     <select id="getDataMapList" resultType="com.hz.employmentsite.vo.baseSettings.SiteInfoVo">
         SELECT
-        site.SiteID,
-        site.SiteCode,
-        site.SiteName,
-        site.DetailAddress,
-        site.FzrName,
-        site.FzrMobile,
-        site.SiteLongitude,
-        site.SiteLatitude,
-        region.`name` AS RegionName,
-        street.`name` AS StreetName,
-        siteUserStr.siteUsers
+            site.SiteID,
+            site.SiteCode,
+            site.SiteName,
+            site.DetailAddress,
+            site.FzrName,
+            site.FzrMobile,
+            site.SiteLongitude,
+            site.SiteLatitude,
+            region.`name` AS RegionName,
+            street.`name` AS StreetName,
+            siteUserStr.siteUsers,
+            instituion.CompanyName AS institutionName,
+            instituion.CompanyAddress AS institutionAddress,
+            instituion.FzrName AS institutionFzrName,
+            instituion.FzrMobile AS institutionFzrMobile
         FROM
-        pc_site site
-        LEFT JOIN pc_site_institution inSites ON site.SiteID = inSites.SiteID
-        LEFT JOIN area_code region ON site.RegionCode = region.`CODE`
-        LEFT JOIN area_code street ON site.StreetCode = street.`CODE`
-        LEFT JOIN (
-        SELECT
-        siteTemp.siteID,
-        GROUP_CONCAT( SiteUserName SEPARATOR ',' ) AS siteUsers
-        FROM
-        pc_site_user siteUser
-        LEFT JOIN sys_user sysUser ON siteUser.UserID = sysUser.UserID
-        LEFT JOIN pc_site siteTemp ON siteTemp.SiteID = siteUser.SiteID
-        WHERE
-        sysUser.RecordStatus = 1
-        GROUP BY
-        siteTemp.SiteID
-        ) siteUserStr ON siteUserStr.SiteID = site.SiteID
+            pc_site site
+            LEFT JOIN pc_site_institution inSites ON site.SiteID = inSites.SiteID
+            LEFT JOIN pc_institution instituion ON inSites.InstitutionID = instituion.InstitutionID
+            LEFT JOIN area_code region ON site.RegionCode = region.`CODE`
+            LEFT JOIN area_code street ON site.StreetCode = street.`CODE`
+            LEFT JOIN (
+            SELECT
+            siteTemp.siteID,
+            GROUP_CONCAT( SiteUserName SEPARATOR ',' ) AS siteUsers
+            FROM
+            pc_site_user siteUser
+            LEFT JOIN sys_user sysUser ON siteUser.UserID = sysUser.UserID
+            LEFT JOIN pc_site siteTemp ON siteTemp.SiteID = siteUser.SiteID
+            WHERE
+            sysUser.RecordStatus = 1
+            GROUP BY
+            siteTemp.SiteID
+            ) siteUserStr ON siteUserStr.SiteID = site.SiteID
         where 1=1
-        <if test="siteName!='' and siteName!=null">
-            and siteName like Concat('%',#{siteName},'%')
-        </if>
-        <if test="regionCode!='' and regionCode!=null">
-            and regionCode like Concat('%',#{regionCode},'%')
-        </if>
-        <if test="streetCode!='' and streetCode!=null">
-            and streetCode like Concat('%',#{streetCode},'%')
-        </if>
+            <if test="siteName!='' and siteName!=null">
+                and siteName like Concat('%',#{siteName},'%')
+            </if>
+            <if test="regionCode!='' and regionCode!=null">
+                and regionCode like Concat('%',#{regionCode},'%')
+            </if>
+            <if test="streetCode!='' and streetCode!=null">
+                and streetCode like Concat('%',#{streetCode},'%')
+            </if>
         order by site.CreateTime DESC
     </select>
 </mapper>

+ 6 - 2
vue/src/api/baseSettings/siteInfo.ts

@@ -114,12 +114,16 @@ export function delSite(data: any) {
   );
 }
 
-export function findSiteDataCount(siteID: string) {
+export function findSiteDataCount(siteID: string, year: any, month: any) {
   return request<object>(
     {
       url: 'siteInfo/dataCount',
       method: 'get',
-      params: {siteID: siteID},
+      params: {
+        siteID,
+        year,
+        month
+      },
     },
     {
       isNew: true,

+ 52 - 1
vue/src/assets/css/common.css

@@ -2,6 +2,10 @@ button {
   border: none;
 }
 
+.w-full {
+  width: 100%;
+}
+
 .font-size-12 {
   font-size: 12px;
 }
@@ -22,22 +26,48 @@ button {
   font-weight: 400;
 }
 
+.font-weight-500 {
+  font-weight: 500 !important;
+}
+
 .font-weight-600 {
   font-weight: 600;
 }
 
 .font-weight-700 {
-  font-weight: 700;
+  font-weight: 700 !important;
+}
+
+.font-weight-800 {
+  font-weight: 800;
 }
 
 .line-height-20 {
   line-height: 20px;
 }
 
+.text-align-center {
+  text-align: center;
+}
+
+.white-space-normal {
+  word-wrap: break-word;
+  word-break: break-all;
+  white-space: normal;
+}
+
 .margin-top-10 {
   margin-top: 10px;
 }
 
+.margin-left-3 {
+  margin-left: 3px;
+}
+
+.margin-right-3 {
+  margin-right: 3px;
+}
+
 .margin-bottom-8 {
   margin-bottom: 8px;
 }
@@ -54,6 +84,14 @@ button {
   margin-bottom: 10px;
 }
 
+.padding-top-10 {
+  padding-top: 10px;
+}
+
+.padding-left-10 {
+  padding-left: 10px;
+}
+
 .cursor-pointer {
   cursor: pointer;
 }
@@ -70,6 +108,19 @@ button {
   align-items: center;
 }
 
+.items-start {
+  align-items: flex-start;
+}
+
+.grid-cols-2 {
+  display: grid;
+  grid-template-columns: repeat(2, minmax(0, 1fr));
+}
+
+.gap-y-1 {
+  row-gap: 0.25rem;
+}
+
 .triangle-up {
   width: 0;
   height: 0;

binární
vue/src/assets/images/th1.png


+ 156 - 16
vue/src/views/dataMap/siteDataMap.vue

@@ -125,15 +125,88 @@
       </div>
       <!-- 驿站详情 -->
       <div class="site-info-box" v-if="searchType == 'site' && nowCheckSite.siteID != null">
-        <p class="font-size-16 font-weight-600 margin-bottom-10">{{ nowCheckSite.siteName }}</p>
-        <p class="margin-bottom-3">驿站编号:{{ nowCheckSite.siteCode }}</p>
-        <p class="margin-bottom-3">地点:{{ nowCheckSite.detailAddress }}</p>
-        <p class="margin-bottom-3">联系电话:{{ nowCheckSite.fzrMobile }}</p>
-        <p class="margin-bottom-8">站长:{{ nowCheckSite.fzrName }}</p>
-        <p class="margin-bottom-3">企业:{{ siteDataCount.companyCount }}家</p>
-        <p class="margin-bottom-3">岗位:{{ siteDataCount.postCount }}个</p>
-        <p class="margin-bottom-3">登记求职人员:{{ siteDataCount.jobUserCount }}人</p>
-        <p class="margin-bottom-3">站点工作人员:{{ nowCheckSite.siteUsers.length }}人</p>
+        <p class="font-size-16 font-weight-600 margin-bottom-10 text-align-center">
+          {{ nowCheckSite.siteName }}
+          ({{ nowCheckSite.siteCode }})
+        </p>
+        <div class="w-full flex-box items-start margin-bottom-3">
+          <img :src="th" alt="" style="width: 23px; height: 20px;" class="margin-right-3"/>
+          <span class="font-size-14 white-space-normal">{{ nowCheckSite.detailAddress }}</span>
+        </div>
+        <div class="avt-info margin-top-10">
+          <img :src="avtO1" alt="">
+          <div>
+            <p>{{ nowCheckSite.fzrName }}(站长)</p>
+            <p>{{ nowCheckSite.fzrMobile }}</p>
+          </div>
+        </div>
+        <a-divider></a-divider>
+        <div class="w-full flex-box font-weight-800">
+          <div class="left-item-flag"></div>
+          建站以来累计
+        </div>
+        <div class="w-full margin-bottom-10 grid-cols-2 text-align-center padding-top-10 gap-y-1">
+          <div>
+            <p class="font-size-18 font-weight-700 ">{{ siteDataCount.allCount.companyCount }}</p>
+            <p class="font-size-12 font-weight-500">服务企业</p>
+          </div>
+          <div>
+            <p class="font-size-18 font-weight-700 ">{{ siteDataCount.allCount.postCount }}</p>
+            <p class="font-size-12 font-weight-500">收集岗位</p>
+          </div>
+          <div>
+            <p class="font-size-18 font-weight-700 ">{{ siteDataCount.allCount.jobUserCount }}</p>
+            <p class="font-size-12 font-weight-500">服务求职人员(人次)</p>
+          </div>
+          <div>
+            <p class="font-size-18 font-weight-700 ">{{ siteDataCount.allCount.jobFairsCount }}</p>
+            <p class="font-size-12 font-weight-500">开展公共就业服务活动(场)</p>
+          </div>
+        </div>
+        <div class="w-full flex-box font-weight-800">
+          <div class="left-item-flag"></div>
+          本年以来累计
+        </div>
+        <div class="w-full margin-bottom-10 grid-cols-2 text-align-center padding-top-10 gap-y-1">
+          <div>
+            <p class="font-size-18 font-weight-700 ">{{ siteDataCount.yearCount.companyCount }}</p>
+            <p class="font-size-12 font-weight-500">服务企业</p>
+          </div>
+          <div>
+            <p class="font-size-18 font-weight-700 ">{{ siteDataCount.yearCount.postCount }}</p>
+            <p class="font-size-12 font-weight-500">收集岗位</p>
+          </div>
+          <div>
+            <p class="font-size-18 font-weight-700 ">{{ siteDataCount.yearCount.jobUserCount }}</p>
+            <p class="font-size-12 font-weight-500">服务求职人员(人次)</p>
+          </div>
+          <div>
+            <p class="font-size-18 font-weight-700 ">{{ siteDataCount.yearCount.jobFairsCount }}</p>
+            <p class="font-size-12 font-weight-500">开展公共就业服务活动(场)</p>
+          </div>
+        </div>
+        <div class="w-full flex-box font-weight-800">
+          <div class="left-item-flag"></div>
+          本月以来累计
+        </div>
+        <div class="w-full margin-bottom-10 grid-cols-2 text-align-center padding-top-10 gap-y-1">
+          <div>
+            <p class="font-size-18 font-weight-700 ">{{ siteDataCount.monthCount.companyCount }}</p>
+            <p class="font-size-12 font-weight-500">服务企业</p>
+          </div>
+          <div>
+            <p class="font-size-18 font-weight-700 ">{{ siteDataCount.monthCount.postCount }}</p>
+            <p class="font-size-12 font-weight-500">收集岗位</p>
+          </div>
+          <div>
+            <p class="font-size-18 font-weight-700 ">{{ siteDataCount.monthCount.jobUserCount }}</p>
+            <p class="font-size-12 font-weight-500">服务求职人员(人次)</p>
+          </div>
+          <div>
+            <p class="font-size-18 font-weight-700 ">{{ siteDataCount.monthCount.jobFairsCount }}</p>
+            <p class="font-size-12 font-weight-500">开展公共就业服务活动(场)</p>
+          </div>
+        </div>
       </div>
       <!-- 驿站人员信息详情 -->
       <div class="site-user-info-box" v-if="searchType == 'siteUser' && nowCheckSiteUser.siteUserID != null">
@@ -179,6 +252,9 @@ import {getRegionCodeList, getStreetCodeList} from "@/api/system/area/index";
 import {findSiteDataCount, getDataMapList, getSiteList} from "@/api/baseSettings/siteInfo";
 import thIcon from "@/assets/images/blueTh.png"
 import {findUserDataCount, getSiteUserDataMapList} from "@/api/baseSettings/userInfo";
+import avtO1 from "@/assets/images/avt01.png";
+import th from "@/assets/images/th1.png";
+import dayjs from "dayjs";
 
 const T = (window as any).T;
 const zoom = 9;
@@ -219,7 +295,26 @@ const nowCheckSite = ref<any>({siteID: null})
 // 鼠标经过的站点
 const nowMouseenterSite = ref<any>({siteID: null});
 // 驿站的业务数据
-const siteDataCount = ref<any>({})
+const siteDataCount = reactive({
+  allCount: {
+    companyCount: 0,
+    postCount: 0,
+    jobUserCount: 0,
+    jobFairsCount: 0,
+  },
+  yearCount: {
+    companyCount: 0,
+    postCount: 0,
+    jobUserCount: 0,
+    jobFairsCount: 0,
+  },
+  monthCount: {
+    companyCount: 0,
+    postCount: 0,
+    jobUserCount: 0,
+    jobFairsCount: 0,
+  }
+})
 // 选中的站点
 const nowCheckSiteUser = ref<any>({siteUserID: null})
 // 鼠标经过的站点
@@ -447,8 +542,19 @@ function computeMarkerSize(zoomLevel: any) {
 // 选择站点
 function checkSite(site: any) {
   // 查询业务数据数量
-  findSiteDataCount(site.siteID).then((result: any) => {
-    siteDataCount.value = result;
+  let year = dayjs().format("YYYY");
+  let month = dayjs().format("MM");
+  // 全部
+  findSiteDataCount(site.siteID, null, null).then((result: any) => {
+    siteDataCount.allCount = result;
+  })
+  // 当年
+  findSiteDataCount(site.siteID, year, null).then((result: any) => {
+    siteDataCount.yearCount = result;
+  })
+  // 当月
+  findSiteDataCount(site.siteID, year, month).then((result: any) => {
+    siteDataCount.monthCount = result;
   })
   nowCheckSite.value = JSON.parse(JSON.stringify(site));
   // 关闭地图上的其他信息弹窗
@@ -459,12 +565,16 @@ function checkSite(site: any) {
     if (searchType.value == 'site') {
       let winHtml = `
             <div >
-                <p style="line-height: 12px; font-size: 14px; font-weight: 600">${site.siteName}</p>
-                <span style="line-height: 12px;">驿站编号:${site.siteCode}</span>
+                <p style="line-height: 12px; font-size: 14px; font-weight: 600">${site.siteName}(${site.siteCode})</p>
+                <span style="line-height: 12px;">所属区县:${site.regionName}</span>
                 <br>
-                <span style="line-height: 12px;">驿站地址:${site.detailAddress}</span>
+                <span style="line-height: 12px;">运营公司:${site.institutionName}</span>
                 <br>
-                <span style="line-height: 12px;">站点工作人员:${site.siteUsers.length}人</span>
+                <span style="line-height: 12px;">运营公司地址:${site.institutionAddress}</span>
+                <br>
+                <span style="line-height: 12px;">联系人:${site.institutionFzrName}</span>
+                <br>
+                <span style="line-height: 12px;">联系电话:${site.institutionFzrMobile}</span>
             </div>
           `;
       (map as any).openInfoWindow(winHtml, new T.LngLat(site.siteLongitude, site.siteLatitude), {
@@ -626,6 +736,36 @@ export default {
     margin-bottom: 3px;
   }
 
+  .avt-info {
+    display: flex;
+    align-items: center;
+
+    img {
+      width: 36px;
+      height: 36px;
+      margin-right: 10px;
+    }
+
+    .contact-name {
+      font-size: 14px;
+      color: #292934;
+    }
+
+    .contact-mobile {
+      font-size: 12px;
+      color: #6A6F75;
+    }
+
+  }
+
+  .left-item-flag {
+    height: 20px;
+    width: 3px;
+    border-radius: 8px;
+    margin-right: 7px;
+    background: linear-gradient(180deg, #fff, #0094ff);
+  }
+
   .ant-btn, .ant-input {
     border: none !important;
   }