Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

ljy121 1 gadu atpakaļ
vecāks
revīzija
39627a4bac

+ 12 - 2
client/src/components/UserSelect/index.vue

@@ -88,7 +88,7 @@ const checkOnChange = (data) => {
 }
 </script>
 <template>
-  <div>
+  <div class="user-select">
     <el-select
       v-if="construction === 'simple'"
       filterable
@@ -121,4 +121,14 @@ const checkOnChange = (data) => {
     />
   </div>
 </template>
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+.user-select {
+  :deep(.select-trigger) {
+    max-height: 60px;
+  }
+  :deep(.el-select__tags) {
+    max-height: 56px;
+    overflow-y: scroll;
+  }
+}
+</style>

+ 5 - 0
client/src/views/OaSystem/home/components/daily/index.vue

@@ -114,6 +114,11 @@ const backgroundColorObj = {
 </script>
 <style scoped lang="scss">
 .log-list {
+  :deep(.el-calendar__body) {
+    padding: 0 !important;
+    max-height: 330px;
+  }
+
   .title {
     width: 100%;
     height: 48px;

+ 7 - 2
client/src/views/OaSystem/mineCenter/rightChild/myLoan.vue

@@ -179,8 +179,13 @@ const handleCurrentChange = (pageNo: number) => {
 }
 const operateClick = (row: any) => {
   router.push({
-    path: '/projectDetail',
-    query: { id: row.projectId, contractId: row.id }
+    path: '/processLook',
+    query: {
+      url:
+        `${
+          import.meta.env.VITE_PROCESS_DETAIL_URI
+        }/IFlowInstance/redirectFlowPage?flowInstanceId=` + row.instanceId
+    }
   })
 }
 const tableData = ref<Array<any>>([])

+ 50 - 0
client/src/views/OaSystem/personnelManagement/CompletionRate/index.vue

@@ -3,6 +3,16 @@
     <div class="title">
       <div>各板块/部门周日报完成率</div>
       <div>
+        <el-button
+          class="remind-btn"
+          type="primary"
+          plain
+          round
+          :disabled="isDisabled"
+          @click="handleClick"
+        >
+          {{ isDisabled ? `请稍候 (${countdown}s)` : '一键催报' }}
+        </el-button>
         <el-date-picker
           v-model="selectDate"
           type="month"
@@ -213,6 +223,43 @@ const handleView = (row) => {
     )
   }
 }
+
+/** 一键催报 ↓ */
+const isDisabled = ref(false)
+const countdown = ref(0)
+
+const sendRemind = () => {
+  const searchDate = selectDate.value ?? moment().format('YYYY-MM')
+  request
+    .get({
+      url: '/adm/reportStatistics/sendFillRemind',
+      params: {
+        year: moment(searchDate).format('YYYY'),
+        month: moment(searchDate).format('M')
+      }
+    })
+    .then(() => {
+      ElMessage.success('已成功向未填报周日报员工发送催报消息!')
+    })
+    .catch(() => {
+      ElMessage.error('催报消息发送失败,请稍后重试!')
+    })
+}
+
+const handleClick = () => {
+  if (!isDisabled.value) {
+    isDisabled.value = true
+    countdown.value = 15
+    sendRemind()
+    const timer = setInterval(() => {
+      countdown.value -= 1
+      if (countdown.value <= 0) {
+        clearInterval(timer)
+        isDisabled.value = false
+      }
+    }, 1000)
+  }
+}
 </script>
 <style scoped lang="scss">
 .title {
@@ -222,6 +269,9 @@ const handleView = (row) => {
   color: #121518;
   display: flex;
   justify-content: space-between;
+  .remind-btn {
+    margin-right: 50px;
+  }
 }
 
 .table-box {

+ 17 - 8
client/src/views/OaSystem/personnelManagement/ProjectStatistics/projectForm.vue

@@ -4,12 +4,16 @@
       <el-input v-model="queryParams.projectName" clearable />
     </el-form-item>
     <el-form-item label="人员:" class="form">
-      <UserSelect
+      <!-- <UserSelect
         ref="userSelectRef"
         construction="simple"
         :multiple="false"
         :onChange="onChangeUser"
-      />
+      /> -->
+      <UserOrgTree v-model="queryParams.userId" placeholder="请选择人员" />
+    </el-form-item>
+    <el-form-item label="部门:" class="form">
+      <DeptTree v-model="queryParams.deptId" />
     </el-form-item>
     <el-form-item label="月份:" class="form">
       <el-date-picker
@@ -38,19 +42,23 @@
 import { Search } from '@element-plus/icons-vue'
 import moment from 'moment'
 import request from '@/config/axios'
-import UserSelect from '@/components/UserSelect/index.vue'
+// import UserSelect from '@/components/UserSelect/index.vue'
 import ExportToExcel from '@/components/ExportToExcel/index.vue'
 import PubsubService from '@/utils/PubsubService'
+import UserOrgTree from '@/views/OaSystem/components/UserOrgTree/index.vue'
+import DeptTree from '@/views/OaSystem/components/DeptTree/index.vue'
 
 interface IQuery {
   projectName: string // 项目名称
   userId: string // 人员
   date: string // 日期
+  deptId: string // 部门id,组件暂不支持多选
 }
 const queryParams = reactive<IQuery>({
   projectName: '',
   userId: '',
-  date: moment().format('YYYY-MM')
+  date: moment().format('YYYY-MM'),
+  deptId: ''
 })
 
 // 查询
@@ -60,6 +68,7 @@ const onSearchHandle: () => void = () => {
     year: moment(queryParams.date).format('YYYY'),
     month: moment(queryParams.date).format('M'),
     userId: queryParams.userId ?? '',
+    deptId: queryParams.deptId ?? '',
     projectName: queryParams.projectName ?? ''
   }
 
@@ -71,9 +80,9 @@ const onSearchHandle: () => void = () => {
 }
 
 // 切换人员
-const onChangeUser = (user) => {
-  queryParams.userId = user
-}
+// const onChangeUser = (user) => {
+//   queryParams.userId = user
+// }
 
 onMounted(() => {
   getAllData()
@@ -138,7 +147,7 @@ const getExportData = (data) => {
 
 <style scoped lang="scss">
 .project-name {
-  width: 400px !important;
+  width: 300px !important;
 }
 .search-button {
   display: flex;

+ 1 - 0
client/src/views/OaSystem/personnelManagement/ProjectStatistics/projectTable.vue

@@ -70,6 +70,7 @@ const getDataSource = (params?) => {
         year: params?.year ?? moment().format('YYYY'),
         month: params?.month ?? moment().format('M'),
         userId: params?.userId ?? '',
+        deptId: params?.deptId ? [params.deptId] : [],
         projectName: params?.projectName ?? '',
         pageNo: pageNo.value,
         pageSize: 20

+ 47 - 41
client_h5/src/App.vue

@@ -1,61 +1,67 @@
 <script setup lang="ts">
-import { useUserStoreWithOut, UserInterface } from "@/stores/modules/user"
-import { getAuthCode } from 'dingtalk-jsapi'; 
+import { useUserStoreWithOut, UserInterface } from "@/stores/modules/user";
+import { getAuthCode } from "dingtalk-jsapi";
 import reqest from "@/utils/request";
-import { useDictStoreWithOut } from '@/utils/dict';
+import { useDictStoreWithOut } from "@/utils/dict";
 
 const userStore = useUserStoreWithOut();
 
 const initUserInfoHandler = async () => {
-    const code: string = await getDDAuthCode() as string
-    const userIdResult = await getUserIdByDD({code})
+  const code: string = (await getDDAuthCode()) as string;
+  const userIdResult = await getUserIdByDD({ code });
   if (userIdResult && userIdResult?.data) {
-        localStorage.setItem("ACCESS_TOKEN", userIdResult?.data.accessToken)
-        useDictStoreWithOut()
-        const userResult = await getUserInfoById()
-        if (userResult && userResult?.data) { 
-            const userInfo: UserInterface = {
-                id: userResult?.data.user.id,
-                nickname: userResult?.data.user.nickname,
-                signatureUrl: userResult?.data.user.signatureUrl
-            }
-            userStore.setUser(userInfo)
-            localStorage.setItem("_userInfo", JSON.stringify(userInfo))
-        }
+    localStorage.setItem("ACCESS_TOKEN", userIdResult?.data.accessToken);
+    useDictStoreWithOut();
+    const userResult = await getUserInfoById();
+    if (userResult && userResult?.data) {
+      const userInfo: UserInterface = {
+        id: userResult?.data.user.id,
+        nickname: userResult?.data.user.nickname,
+        deptId: userResult?.data.user.deptId,
+        deptName: userResult?.data.user.deptName,
+        signatureUrl: userResult?.data.user.signatureUrl,
+      };
+      userStore.setUser(userInfo);
+      localStorage.setItem("_userInfo", JSON.stringify(userInfo));
     }
-}
-initUserInfoHandler()
+  }
+};
+initUserInfoHandler();
 function getDDAuthCode() {
-    return new Promise((resolve, reject) => {
-        getAuthCode({
-            corpId: 'ding65143abf9aeea2ec',
-            success: (res: any) => {
-                const { code } = res;
-                if (code) {
-                    resolve(code);
-                }
-            },
-            fail: (ex: any) => {
-                reject(ex);
-            },
-            complete: () => {},
-        });
+  return new Promise((resolve, reject) => {
+    getAuthCode({
+      corpId: "ding65143abf9aeea2ec",
+      success: (res: any) => {
+        const { code } = res;
+        if (code) {
+          resolve(code);
+        }
+      },
+      fail: (ex: any) => {
+        reject(ex);
+      },
+      complete: () => {},
     });
+  });
 }
 interface UserIdParam {
-    code: string
+  code: string;
 }
 const getUserIdByDD = async (data: Required<UserIdParam>) => {
-  return reqest.post(`/app-api/system/auth/login-ding?code=${data.code}`, null, {
-    headers: {
-      isAuth: false
+  return reqest.post(
+    `/app-api/system/auth/login-ding?code=${data.code}`,
+    null,
+    {
+      headers: {
+        isAuth: false,
+      },
     }
-  })
-}
+  );
+};
 //@ts-ignore
 const getUserInfoById = async () => {
-    return reqest.get('/admin-api/system/auth/get-permission-info')
-}
+  return reqest.get("/admin-api/system/auth/get-permission-info");
+};
 </script>
 
 <template>

+ 2 - 1
client_h5/src/pages/myLogs/Daily/MyLogs.vue

@@ -31,7 +31,8 @@ onMounted(async () => {
 
   logList.map((item: any) => {
     const date = item.reportStartDate;
-    logObj.value[date] = item;
+    const dateKey = moment(date).format("YYYY-MM-DD");
+    logObj.value[dateKey] = item;
   });
   const workDayList = await http.getWorkDayList(
     moment(minDate).format("YYYY-MM-DD HH:mm:ss"),

+ 3 - 1
client_h5/src/pages/myLogs/Daily/index.vue

@@ -93,7 +93,9 @@ const isFillLog = async () => {
     moment(today.value).format("M")
   );
   const searchLog = searchList.find(
-    (item: any) => item.reportStartDate == today.value
+    (item: any) =>
+      moment(item.reportStartDate).format("YYYY-MM-DD") ==
+      moment(today.value).format("YYYY-MM-DD")
   );
   if (searchLog) {
     push(`/logsDetail?id=${searchLog.id}`);

+ 1 - 1
client_h5/src/pages/myLogs/components/ProjectList.vue

@@ -126,7 +126,7 @@ const timerClick = (timer: any) => {
 
 <style scoped lang="scss">
 .project-tabs {
-  max-height: 350px;
+  max-height: 280px;
   overflow-y: scroll;
 }
 </style>

+ 21 - 18
client_h5/src/stores/modules/user.ts

@@ -1,26 +1,29 @@
 import { defineStore } from "pinia";
 
 export interface UserInterface {
-    id: string  //用户ID
-    nickname: string    //用户昵称
-    signatureUrl: string  //用户前面
+  id: string; //用户ID
+  nickname: string; //用户昵称
+  deptId: string; // 用户部门id
+  deptName: string; // 用户部门id
+  signatureUrl: string; //用户前面
 }
 const UserStore = defineStore("UserStore", {
-    state: () => ({
-        userInfo: {
-            id: "",
-            nickname: "",
-            signatureUrl: ""
-        } as UserInterface
-    }),
-    actions: {
-        setUser(user: UserInterface) {
-            this.userInfo = user;
-        }
-    }
+  state: () => ({
+    userInfo: {
+      id: "",
+      nickname: "",
+      deptId: "",
+      deptName: "",
+      signatureUrl: "",
+    } as UserInterface,
+  }),
+  actions: {
+    setUser(user: UserInterface) {
+      this.userInfo = user;
+    },
+  },
 });
 
-
 export const useUserStoreWithOut = () => {
-    return UserStore();
-}
+  return UserStore();
+};

+ 1 - 1
client_h5/src/utils/tools.ts

@@ -15,5 +15,5 @@ export const getUserInfo = () => {
   };
   // 从localStorage中获取用户信息并返回
   return JSON.parse(localStorage.getItem("_userInfo") as string);
-  // return JSON.parse(localStorage.getItem("_userInfo") as string) ?? userInfo;
+  // return userInfo;
 };

+ 16 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/usemoney/event/UseMoneyEvent.java

@@ -544,7 +544,23 @@ public class UseMoneyEvent extends BaseController {
             if (StringUtils.isNotBlank(flowInstanceId)) {
                 UseMoneyDO entity = useMoneyService.findByInstanceId(flowInstanceId);
                 Project project = projectService.selectById(entity.getProjectId());
+                String specialWorker = "24565da0-c60e-41d5-9eb5-351c8450a871,95bebd5f-04ef-4c4c-a5f1-11f30e64601c";//陈磊&&韩贤华
+                String specialWorker2 = "24565da0-c60e-41d5-9eb5-351c8450a871,95bebd5f-04ef-4c4c-a5f1-11f30e64601c,7de1813e-e0b2-413b-8b0a-d993db7670e4";//陈磊&&韩贤华&&姜德进
                 List<Map<String, String>> userMaps = new ArrayList<>();
+                if(project.getId().equals("9a7660bd-c0ce-491c-9f50-e29052e41635")&& specialWorker.contains(entity.getUserId())){
+                    //卓一瑞
+                    HashMap<String, String> map = new HashMap<>();
+                    map.put("id","d05dc4f4-ead4-4925-9aaa-0c4d3bc470b6");
+                    userMaps.add(map);
+                    return ok(userMaps);
+                }
+                if (project.getId().equals("2fb1677d-3ed3-49fb-b8c3-021f5c495deb") && specialWorker2.contains(entity.getUserId())){
+                    //卓一瑞
+                    HashMap<String, String> map = new HashMap<>();
+                    map.put("id","d05dc4f4-ead4-4925-9aaa-0c4d3bc470b6");
+                    userMaps.add(map);
+                    return ok(userMaps);
+                }
                 if(StringUtils.isNotBlank(project.getZrbmId())){
                     DeptRespDTO deptRespDTO = deptApi.getDept(project.getZrbmId()).getCheckedData();
                     if(deptRespDTO != null && StringUtils.isNotBlank(deptRespDTO.getLeaderUserId())){

+ 5 - 1
zjugis-module-adm/zjugis-module-adm-biz/src/main/java/com/zjugis/module/adm/controller/admin/report/dto/statistics/ReportWorkloadStatisticReqDTO.java

@@ -4,6 +4,7 @@ import com.zjugis.framework.common.pojo.PageParam;
 import lombok.Data;
 
 import javax.validation.constraints.NotNull;
+import java.util.Set;
 
 /**
  * @Author:zjq
@@ -28,7 +29,10 @@ public class ReportWorkloadStatisticReqDTO extends PageParam {
      */
     @NotNull(message = "月份不能为空")
     private Short month;
-
+    /**
+     * 部门id
+     */
+    private Set<String> deptId;
 
     /**
      * 用户id

+ 3 - 0
zjugis-module-adm/zjugis-module-adm-biz/src/main/java/com/zjugis/module/adm/service/report/ReportServiceImpl.java

@@ -664,6 +664,9 @@ public class ReportServiceImpl implements ReportService {
         if (StrUtil.isNotBlank(reportWorkloadStatisticReqDTO.getUserId())) {
             queryWrapper.eq("USER_ID", reportWorkloadStatisticReqDTO.getUserId());
         }
+        if (CollectionUtil.isNotEmpty(reportWorkloadStatisticReqDTO.getDeptId())) {
+            queryWrapper.in("DEPT_ID", reportWorkloadStatisticReqDTO.getDeptId());
+        }
         //根据项目名称模糊查询项目ID
         ProjectDto projectDto = new ProjectDto();
         projectDto.setPageNo(1);