Pārlūkot izejas kodu

Merge branch 'master' of http://39.98.153.250:9080/bowintek/EmploymentSite

pengjing 5 mēneši atpakaļ
vecāks
revīzija
e081443538

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

@@ -16,6 +16,7 @@ import com.hz.employmentsite.util.ExcelHelper;
 import com.hz.employmentsite.vo.companyService.AppCompanyPostVo;
 import com.hz.employmentsite.vo.companyService.CompanyVo;
 import com.hz.employmentsite.vo.dataMap.CompanyPostMapVo;
+import com.hz.employmentsite.vo.signin.SigninVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -251,4 +252,15 @@ public class CompanyController {
         return RespGenerstor.success(result);
     }
 
+    /**
+     * 查询企业的打卡服务记录
+     * @param companyID 企业ID
+     * @return 企业的打卡服务信息
+     */
+    @GetMapping("/allSignin")
+    public BaseResponse getCompanySigninList(@RequestParam(required = false) String companyID) {
+        List<SigninVo> signinList = companyService.getCompanySigninList(companyID);
+        return RespGenerstor.success(signinList);
+    }
+
 }

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

@@ -3,6 +3,7 @@ package com.hz.employmentsite.mapper.cquery;
 import com.hz.employmentsite.model.PcFirm;
 import com.hz.employmentsite.vo.companyService.CompanyVo;
 import com.hz.employmentsite.vo.dataMap.CompanyPostMapVo;
+import com.hz.employmentsite.vo.signin.SigninVo;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;
@@ -56,4 +57,11 @@ public interface CompanyCQuery {
                                                     @Param("regionCode") String regionCode, @Param("siteID") String siteID,
                                                     @Param("latitude") Double latitude, @Param("longitude") Double longitude,
                                                     @Param("createTimeBy") String createTimeBy);
+
+    /**
+     * 查询企业的打卡服务记录
+     * @param companyID 企业ID
+     * @return 打卡记录
+     */
+    List<SigninVo> getCompanySigninList(@Param("companyID") String companyID);
 }

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

@@ -21,6 +21,7 @@ import com.hz.employmentsite.vo.companyService.AppCompanyPostVo;
 import com.hz.employmentsite.vo.companyService.CompanyVo;
 import com.hz.employmentsite.vo.companyService.PostVo;
 import com.hz.employmentsite.vo.dataMap.CompanyPostMapVo;
+import com.hz.employmentsite.vo.signin.SigninVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -857,4 +858,15 @@ public class CompanyServiceImpl implements CompanyService {
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
         return resultDate.format(formatter);
     }
+
+    /**
+     * 查询企业的打卡服务记录
+     *
+     * @param companyID 企业ID
+     * @return 打卡记录
+     */
+    @Override
+    public List<SigninVo> getCompanySigninList(String companyID) {
+        return companyCQuery.getCompanySigninList(companyID);
+    }
 }

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

@@ -7,6 +7,7 @@ import com.hz.employmentsite.model.PcSite;
 import com.hz.employmentsite.vo.companyService.AppCompanyPostVo;
 import com.hz.employmentsite.vo.companyService.CompanyVo;
 import com.hz.employmentsite.vo.dataMap.CompanyPostMapVo;
+import com.hz.employmentsite.vo.signin.SigninVo;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.Date;
@@ -77,4 +78,11 @@ public interface CompanyService {
                                                         String regionCode, String siteID,
                                                         Double latitude, Double longitude,
                                                         String createTimeBy);
+
+    /**
+     * 查询企业的打卡服务记录
+     * @param companyID 企业ID
+     * @return 打卡记录
+     */
+    List<SigninVo> getCompanySigninList(String companyID);
 }

+ 2 - 0
src/main/java/com/hz/employmentsite/vo/dataMap/CompanyPostMapVo.java

@@ -69,4 +69,6 @@ public class CompanyPostMapVo {
     private String industryName;
 
     private String siteName;
+
+    private Integer signinCount;
 }

+ 18 - 0
src/main/java/com/hz/employmentsite/vo/signin/SigninVo.java

@@ -0,0 +1,18 @@
+package com.hz.employmentsite.vo.signin;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Date;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class SigninVo {
+    private Date signinTime;
+
+    private String siteName;
+
+    private String signinUserName;
+}

+ 18 - 1
src/main/resources/mapping/cquery/CompanyCQuery.xml

@@ -141,7 +141,8 @@
             postCounts.postCount,
             creditRecordCounts.creditRecordCount,
             industry.industryName,
-            site.siteName
+            site.siteName,
+            signinCounts.signinCount
         FROM
             pc_company company
             LEFT JOIN sys_dictionary_item cmodel ON company.CompanyModel = cmodel.`Value`
@@ -151,6 +152,7 @@
             LEFT JOIN sys_user company_user ON company.CreateUserID = company_user.UserID
             LEFT JOIN ( SELECT CompanyID, COUNT( 1 ) AS postCount FROM pc_post GROUP BY CompanyID ) AS postCounts ON company.CompanyID = postCounts.CompanyID
             LEFT JOIN ( SELECT CompanyID, COUNT(1) AS creditRecordCount FROM pc_credit_record GROUP BY CompanyID) AS creditRecordCounts ON company.CompanyID = creditRecordCounts.CompanyID
+            LEFT JOIN ( SELECT CompanyID, COUNT( 1 ) AS signinCount FROM pc_signin GROUP BY CompanyID ) AS signinCounts ON company.CompanyID = signinCounts.CompanyID
             LEFT JOIN pc_industry industry ON company.IndustryID = industry.industryId
             LEFT JOIN pc_site site ON company.siteID = site.siteID
         WHERE 1=1
@@ -257,4 +259,19 @@
         ORDER BY
         post.CreateTime DESC, distance DESC, CompanyID
     </select>
+
+    <select id="getCompanySigninList" resultType="com.hz.employmentsite.vo.signin.SigninVo">
+        SELECT
+            signinTime,
+            site.SiteName,
+            createUser.`Name` AS signinUserName
+        FROM
+            `pc_signin` signin
+                LEFT JOIN pc_site site ON signin.SiteID = site.SiteID
+                LEFT JOIN sys_user createUser ON signin.CreateUserID = createUser.UserID
+        WHERE
+            signin.CompanyID = #{companyID}
+        ORDER BY
+            signin.SigninTime DESC
+    </select>
 </mapper>

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

@@ -108,3 +108,16 @@ export function getDataMapListByPostName(params: any) {
     },
   );
 }
+
+export function getCompanySigninList(companyID: any) {
+  return request<object>(
+    {
+      url: "companyService/company/allSignin",
+      method: 'get',
+      params: {companyID},
+    },
+    {
+      isNew: true,
+    },
+  );
+}

BIN
vue/src/assets/images/greenTh.png


+ 108 - 45
vue/src/views/dataMap/companyDataMap.vue

@@ -95,6 +95,7 @@
             <div class="company-data-box"
                  :class="{
                   'check-company': (nowCheckCompany.companyID == company.companyID || nowMouseenterCompany.companyID == company.companyID) && company.creditRecordCount == null,
+                  'check-company-green': (nowCheckCompany.companyID == company.companyID || nowMouseenterCompany.companyID == company.companyID) && company.signinCount >= 1 && !company.creditRecordCount,
                   'check-company-red': (nowCheckCompany.companyID == company.companyID || nowMouseenterCompany.companyID == company.companyID) && company.creditRecordCount >= 1,
                  }"
                  v-if="companyList.length > 0 && searchType == 'company'" v-for="(company,index) in companyList"
@@ -232,59 +233,80 @@
               暂无标签
             </div>
           </div>
+          <a-radio-group v-model:value="dataType" button-style="solid" size="small"
+                         style="margin-bottom: 10px">
+            <a-radio-button value="post">岗位</a-radio-button>
+            <a-radio-button value="signin">服务记录</a-radio-button>
+          </a-radio-group>
           <!-- 岗位列表 -->
-          <div class="list-box">
-            <div class="list-post-box  margin-bottom-10" v-if="postList.length > 0"
-                 v-for="(post, postIndex) in postList"
-                 :key="postIndex">
-              <div class="post-title">
-                <span>{{ post.professionName }}</span>
-                <span class="post-salary">{{ showSalary(post.minSalary, post.maxSalary) }}</span>
-              </div>
-              <p class="label-text">
-                招聘人数:{{ post.recruitCount }}
-              </p>
-              <p class="label-text">
-                招聘日期:
-                {{ dayjs(post.startTime).format("YYYY-MM-DD") }}
-                至
-                {{ dayjs(post.endTime).format("YYYY-MM-DD") }}
-              </p>
-              <!-- 岗位要求 -->
-              <div class="post-desc-box">
-                <div class="label-text post-desc" :ref="el => postDescBoxRef[postIndex] = el"
-                     :class="{'post-desc-max-height': post.descExpanded}">
-                  岗位要求:{{ post.postDesc }}
+          <div v-if="dataType == 'post'" class="dataType-box">
+            <div class="list-box">
+              <div class="list-post-box  margin-bottom-10" v-if="postList.length > 0"
+                   v-for="(post, postIndex) in postList"
+                   :key="postIndex">
+                <div class="post-title">
+                  <span>{{ post.professionName }}</span>
+                  <span class="post-salary">{{ showSalary(post.minSalary, post.maxSalary) }}</span>
                 </div>
-                <div v-if="showLaunchBtnBox(postDescBoxRef,postIndex,36)">
+                <p class="label-text">
+                  招聘人数:{{ post.recruitCount }}
+                </p>
+                <p class="label-text">
+                  招聘日期:
+                  {{ dayjs(post.startTime).format("YYYY-MM-DD") }}
+                  至
+                  {{ dayjs(post.endTime).format("YYYY-MM-DD") }}
+                </p>
+                <!-- 岗位要求 -->
+                <div class="post-desc-box">
+                  <div class="label-text post-desc" :ref="el => postDescBoxRef[postIndex] = el"
+                       :class="{'post-desc-max-height': post.descExpanded}">
+                    岗位要求:{{ post.postDesc }}
+                  </div>
+                  <div v-if="showLaunchBtnBox(postDescBoxRef,postIndex,36)">
                 <span class="launch-btn" v-if="post.descExpanded"
                       @click.stop="post.descExpanded = false">展开</span>
-                  <span class="launch-btn " v-else @click.stop="post.descExpanded = true">收起</span>
+                    <span class="launch-btn " v-else @click.stop="post.descExpanded = true">收起</span>
+                  </div>
                 </div>
-              </div>
-              <!-- 标签 -->
-              <div class="company-label-box" v-if="post.labelList && post.labelList.length > 0"
-                   :ref="el => postLabelBoxRef[postIndex] = el" :class="{'label-box-max-height': post.labelExpanded}">
-                <a-tag v-for="(label, labelIndex) in post.labelList" :key="labelIndex">
-                  {{ label.labelName }}
-                </a-tag>
-                <div v-if="showLaunchBtnBox(postLabelBoxRef,postIndex,50)">
+                <!-- 标签 -->
+                <div class="company-label-box" v-if="post.labelList && post.labelList.length > 0"
+                     :ref="el => postLabelBoxRef[postIndex] = el" :class="{'label-box-max-height': post.labelExpanded}">
+                  <a-tag v-for="(label, labelIndex) in post.labelList" :key="labelIndex">
+                    {{ label.labelName }}
+                  </a-tag>
+                  <div v-if="showLaunchBtnBox(postLabelBoxRef,postIndex,50)">
                 <span class="launch-btn" v-if="post.labelExpanded"
                       @click.stop="post.labelExpanded = false">展开</span>
-                  <span class="launch-btn" v-else @click.stop="post.labelExpanded = true">收起</span>
+                    <span class="launch-btn" v-else @click.stop="post.labelExpanded = true">收起</span>
+                  </div>
                 </div>
               </div>
+              <div v-else class="empty-box">
+                <a-empty/>
+              </div>
             </div>
-            <div v-else class="empty-box">
-              <a-empty/>
+            <!-- 分页控件 -->
+            <div class="pagination-box">
+              <span>共{{ postTotal }}个</span>
+              <a-pagination v-model:current="postSearchParams.pageIndex" :total="postTotal"
+                            v-model:pageSize="postSearchParams.pageSize"
+                            show-less-items @change="postPaginationChange" simple :show-size-changer="false"/>
             </div>
           </div>
-          <!-- 分页控件 -->
-          <div class="pagination-box">
-            <span>共{{ postTotal }}个</span>
-            <a-pagination v-model:current="postSearchParams.pageIndex" :total="postTotal"
-                          v-model:pageSize="postSearchParams.pageSize"
-                          show-less-items @change="postPaginationChange" simple :show-size-changer="false"/>
+          <div v-if="dataType == 'signin'" class="dataType-box">
+            <!-- 服务记录时间轴 -->
+            <div v-if="signinList.length > 0" class="signin-list">
+              <a-timeline>
+                <a-timeline-item v-for="(signin, key) in signinList" :key="key" position="left">
+                  <p>{{ dayjs(signin.signinTime).format('YYYY-MM-DD') }}</p>
+                  <p>{{ signin.siteName }}{{ signin.signinUserName }}进行走访服务</p>
+                </a-timeline-item>
+              </a-timeline>
+            </div>
+            <div v-else class="empty-box">
+              <a-empty description="暂无服务记录"/>
+            </div>
           </div>
         </div>
         <div v-if="searchType == 'post'"
@@ -346,13 +368,14 @@ import {onMounted, reactive, ref} from "vue";
 import huiZhouGeoJSON from "./geo";
 import {getPosition, setBoundary} from "@/utils/position";
 import redThIcon from "@/assets/images/redTh1.png";
-import redThIcon3 from "@/assets/images/redTh4.png";
+import redThIcon4 from "@/assets/images/redTh4.png";
 import blueThIcon from "@/assets/images/blueTh1.png";
+import greenThIcon from "@/assets/images/greenTh.png";
 import {message, type SelectProps} from "ant-design-vue";
 import {getSysDictionaryList} from "@/api/system/dictionary";
 import {getSiteByID, getSiteList} from "@/api/baseSettings/siteInfo";
 import {getRegionCodeList} from "@/api/system/area/index";
-import {getDataMapList, getDataMapListByPostName} from "@/api/companyService/company";
+import {getCompanySigninList, getDataMapList, getDataMapListByPostName} from "@/api/companyService/company";
 import {getCompanyMapPostList} from "@/api/companyService/post";
 import dayjs from "dayjs";
 import avtO1 from "@/assets/images/avt01.png";
@@ -404,6 +427,10 @@ const postSearchParams = reactive({
 const postList = ref<Array<any>>([]);
 // 岗位分页总条数
 const postTotal = ref(0);
+// 当前选中的企业的打卡服务记录
+const signinList = ref<Array<any>>([])
+// 企业详情显示内容tab
+const dataType = ref("post");
 
 // 范围列表
 const rangeList = [
@@ -624,7 +651,12 @@ function setCompanyMarker(setCenter: boolean) {
       iconAnchor: sizeData.iconAnchor
     })
     const icon_red = new T.Icon({
-      iconUrl: redThIcon3,
+      iconUrl: redThIcon4,
+      iconSize: new T.Point(sizeData.iconSize, sizeData.iconSize),
+      iconAnchor: sizeData.iconAnchor
+    })
+    const icon_green = new T.Icon({
+      iconUrl: greenThIcon,
       iconSize: new T.Point(sizeData.iconSize, sizeData.iconSize),
       iconAnchor: sizeData.iconAnchor
     })
@@ -638,6 +670,11 @@ function setCompanyMarker(setCenter: boolean) {
             icon: icon_blue
           }); // 创建标注
         }
+        if (item.signinCount >= 1) {
+          marker = new T.Marker(point, {
+            icon: icon_green
+          }); // 创建标注
+        }
         if (item.creditRecordCount >= 1) {
           marker = new T.Marker(point, {
             icon: icon_red
@@ -785,6 +822,7 @@ const checkCompanyChange = async (company: any, funE: any) => {
     });
   }
   await findPostList();
+  await findCompanySigninList();
 }
 
 // 企业信息鼠标移入移出事件
@@ -806,6 +844,13 @@ async function findPostList() {
   })
 }
 
+// 查询企业的打卡服务记录
+async function findCompanySigninList() {
+  await getCompanySigninList(nowCheckCompany.value.companyID).then((result: any) => {
+    signinList.value = result;
+  })
+}
+
 // 企业分页器页码变更事件
 function postPaginationChange() {
   findPostList();
@@ -1090,6 +1135,10 @@ export default {
         .check-company-red {
           border: 1px solid red;
         }
+
+        .check-company-green {
+          border: 1px solid #00ff00;
+        }
       }
     }
 
@@ -1106,6 +1155,20 @@ export default {
     right: 0;
     border-radius: 10px;
 
+    .dataType-box {
+      height: 72%;
+
+      .signin-list {
+        width: 100%;
+        height: 100%;
+        overflow: hidden;
+        overflow-y: auto;
+        padding: 15px;
+        background-color: white;
+        border-radius: 10px;
+      }
+    }
+
     .company-info-post-list {
       width: 100%;
       height: 100%;
@@ -1175,7 +1238,7 @@ export default {
     }
 
     .list-box {
-      height: calc(100% - 260px);
+      height: calc(100% - 40px);
 
       .list-post-box {
         padding: 8px;

+ 1 - 1
vue/src/views/dataMap/jobUserDataMap.vue

@@ -505,7 +505,7 @@ function checkJobUser(jobUser: any) {
       autoPan: true,
       maxHeight: 400,
       maxWidth: 500,
-      offset: new T.Point(10, 0)
+      offset: new T.Point(-5, -15)
     });
   }
 }