Browse Source

Merge remote-tracking branch 'origin/master'

ljy121 1 năm trước cách đây
mục cha
commit
8fa880ff25

+ 1 - 1
client/src/views/OaSystem/projectCenter/projectBook/projectBook.vue

@@ -15,7 +15,7 @@
       </div>
       <div class="form">
         <span class="formSpan">责任部门:</span>
-        <DeptTree v-model="queryParams['deptId']" />
+        <DeptTree v-model="queryParams['deptId']" placeholder="请选择部门" />
       </div>
       <div class="form form-time-range">
         <span class="formSpan">立项时间:</span>

+ 35 - 26
client_h5/src/pages/home/index.vue

@@ -39,6 +39,11 @@ const navMenus = reactive<MenuItem[]>([
     icon: "../assets/images/wdzb_icon.png",
     path: "myWeeklyLogs",
   },
+  {
+    title: "我收到的",
+    icon: "../assets/images/zbtx_icon.png",
+    path: "myReceive",
+  },
 ]);
 interface ProcessMenuItem extends MenuItem {
   instanceId: string;
@@ -49,25 +54,25 @@ const processMenus: ProcessMenuItem[] = [
     title: "请假申请",
     corner: 0,
     instanceId: "018c1f593f2c09477b1b8c1080b6000b",
-    subTitle: '各类型请假申请'
+    subTitle: "各类型请假申请",
   },
   {
     title: "出差申请",
     corner: 0,
     instanceId: "018c389986fb0947969a8c33d89b000a",
-    subTitle: '出差时间、事由等'
+    subTitle: "出差时间、事由等",
   },
   {
     title: "考勤说明条",
     corner: 0,
     instanceId: "018c24045d65094794178c23e986001e",
-    subTitle: '考勤遗漏说明情况'
+    subTitle: "考勤遗漏说明情况",
   },
   {
     title: "借款申请",
     corner: 0,
     instanceId: "018e36519fd70a0796ba8dd062c80830",
-    subTitle: '借款项目、金额等'
+    subTitle: "借款项目、金额等",
   },
 ];
 
@@ -79,9 +84,9 @@ const personMenus = reactive<MenuItem[]>([
   },
   {
     title: "通知公告",
-    path: 'notice',
+    path: "notice",
     icon: "../assets/images/tzgg_icon.png",
-    corner: 0
+    corner: 0,
   },
 ]);
 const router = useRouter();
@@ -91,26 +96,26 @@ const router = useRouter();
 const initAttendCount = async () => {
   const result = await getAttendCount({
     userId: getStoreObject("_userInfo", "id"),
-    isMobile: true
-  })
+    isMobile: true,
+  });
   if (result) {
-    navMenus[0]['corner'] = result?.data
+    navMenus[0]["corner"] = result?.data;
   }
-}
-initAttendCount()
+};
+initAttendCount();
 /**
  * 获取通知公告角标
  */
- async function queryNoticeAndLearnCount() {
-  const urlApi = `/admin-api/adm/noticeAndLearn/readNo/count?type=1`
-   const result = await request.get(urlApi)
-   personMenus[1]['corner'] = result?.data
+async function queryNoticeAndLearnCount() {
+  const urlApi = `/admin-api/adm/noticeAndLearn/readNo/count?type=1`;
+  const result = await request.get(urlApi);
+  personMenus[1]["corner"] = result?.data;
 }
-queryNoticeAndLearnCount()
+queryNoticeAndLearnCount();
 const toPageHandle = (path: string) => {
   router.push({
-    path
-  })
+    path,
+  });
 };
 const toProcessHandle = (item: ProcessMenuItem): void => {
   createProcessByModalId({
@@ -118,17 +123,17 @@ const toProcessHandle = (item: ProcessMenuItem): void => {
   }).then((result: any) => {
     if (typeof result === "string") {
       //@ts-ignore
-      const arr = result.split(window?.locationBaseUrl)
+      const arr = result.split(window?.locationBaseUrl);
       if (arr.length > 1) {
-        router.push(arr[1])
+        router.push(arr[1]);
       }
     }
   });
 };
 const getAssetURL = (image: string) => {
-  const url = window.location.origin
-  return new URL(`${image}`, url + '/html_h5/assets/images/').href
-}
+  const url = window.location.origin;
+  return new URL(`${image}`, url + "/html_h5/assets/images/").href;
+};
 </script>
 
 <template>
@@ -136,7 +141,9 @@ const getAssetURL = (image: string) => {
     <div class="header">
       <div class="nav">
         <div class="login_info">
-          <img :src="userStore.userInfo.avatar || getAssetURL('user_log.jpg')" />
+          <img
+            :src="userStore.userInfo.avatar || getAssetURL('user_log.jpg')"
+          />
           <span>{{ userStore.userInfo.nickname }}</span>
         </div>
       </div>
@@ -148,7 +155,9 @@ const getAssetURL = (image: string) => {
         >
           <img :src="getAssetsURI(item['icon'])" />
           <p class="title">{{ item["title"] }}</p>
-          <span class="corner" v-if="item['corner'] && item['corner'] > 0">{{ item["corner"] }}</span>
+          <span class="corner" v-if="item['corner'] && item['corner'] > 0">{{
+            item["corner"]
+          }}</span>
         </li>
       </ul>
     </div>
@@ -162,7 +171,7 @@ const getAssetURL = (image: string) => {
             @click="toProcessHandle(item)"
           >
             <span class="title">{{ item["title"] }}</span>
-            <span class="sub_title">{{ item['subTitle'] }}</span>
+            <span class="sub_title">{{ item["subTitle"] }}</span>
           </li>
         </ul>
       </div>

+ 149 - 0
client_h5/src/pages/myLogs/Receive/index.vue

@@ -0,0 +1,149 @@
+import { isHidden } from 'vant/lib/utils'; import { format } from 'path'; import
+{ spawn } from 'child_process';
+<template>
+  <div class="my-receive-log-list">
+    <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
+      <van-list
+        v-model:loading="loading"
+        :finished="finished"
+        :finished-text="`共${total}条,移动端最多展示50条`"
+        @load="onLoad"
+      >
+        <div
+          class="log-card"
+          v-for="(item, index) in list"
+          :key="index"
+          @click="toDetail(item)"
+        >
+          <div class="title">
+            {{ item.userNickname ?? "匿名" }}的{{
+              item.reportType == "weekly" ? "周报" : "日报"
+            }}
+          </div>
+          <div>
+            <span class="label">开始日期:</span
+            >{{ moment(item.reportStartDate).format("YYYY-MM-DD") }}
+          </div>
+          <div>
+            <span class="label">结束日期:</span
+            >{{ moment(item.reportEndDate).format("YYYY-MM-DD") }}
+          </div>
+          <div class="label">本周完成工作:</div>
+          <div class="van-multi-ellipsis--l2">
+            <div>{{ item.reportContent }}</div>
+          </div>
+          <div class="label">工作量分配:</div>
+          <div class="work-list">
+            <div v-for="work in item.workload" :key="work.id" class="work-item">
+              {{ `(${work.workTime}小时)${work.projectName}` }}
+            </div>
+          </div>
+        </div>
+      </van-list>
+    </van-pull-refresh>
+  </div>
+</template>
+<script lang="ts" setup>
+/**
+ * @description 我收到的日志
+ */
+import { ref, computed, toRefs } from "vue";
+import { List } from "vant";
+import { http } from "../http";
+import moment from "moment";
+
+onMounted(async () => {
+  await onLoad();
+});
+
+const list = ref([]);
+const loading = ref(false);
+const finished = ref(false);
+const refreshing = ref(false);
+const total = ref(0);
+
+const onLoad = async () => {
+  if (refreshing.value) {
+    list.value = [];
+    refreshing.value = false;
+  }
+  const pageNo = Math.ceil(list.value.length / 10) + 1;
+  const receiveList = await http.getMyReceive({
+    pageNo,
+    pageSize: 10,
+  });
+  const { list: dataSource, total: totalNum } = receiveList;
+
+  if (!refreshing.value) {
+    list.value.push(
+      ...dataSource.filter(
+        (item) => !list.value.find((existing) => existing.id === item.id)
+      )
+    );
+  } else {
+    list.value.push(...dataSource);
+  }
+
+  total.value = totalNum;
+  loading.value = false;
+
+  if (list.value.length >= 50 || list.value.length >= totalNum) {
+    finished.value = true;
+  }
+};
+
+const onRefresh = async () => {
+  // 清空列表数据
+  finished.value = false;
+  // 重新加载数据
+  // 将 loading 设置为 true,表示处于加载状态
+  loading.value = true;
+  await onLoad();
+};
+
+// 查看详情
+const { push } = useRouter();
+const toDetail = (detail) => {
+  push({
+    path: "/logsDetail",
+    query: {
+      id: detail.id,
+      detail: JSON.stringify({
+        ...detail,
+        comments: [],
+      }),
+    },
+  });
+};
+</script>
+<style scoped lang="scss">
+.my-receive-log-list {
+  width: 100%;
+  height: 100%;
+  background-color: #f1f2f3;
+  overflow: scroll;
+  .log-card {
+    margin: 15px;
+    background-color: #fff;
+    border-radius: 10px;
+    padding: 10px 15px;
+    .title {
+      font-size: 16px;
+      font-weight: bold;
+      margin-bottom: 8px;
+    }
+    .label {
+      color: #838485;
+    }
+    .work-list {
+      max-height: 42px;
+      overflow: hidden;
+    }
+    .work-item {
+      white-space: nowrap; /* 禁止文字换行 */
+      overflow: hidden; /* 隐藏超出容器范围的内容 */
+      text-overflow: ellipsis; /* 使用省略号表示被截断的文本 */
+    }
+  }
+}
+</style>

+ 13 - 0
client_h5/src/pages/myLogs/http.ts

@@ -14,6 +14,7 @@ const api = {
   deleteComment: "/admin-api/adm/reportComment/delete", // 删除周日报评论
   addComment: "/admin-api/adm/reportComment/send", // 添加周日报评论
   logList: "/admin-api/adm/report/list", // 获取周报日志列表
+  receiveList: "/admin-api/adm/report/page/me", // 我收到的周日报
 };
 
 const userInfo = getUserInfo();
@@ -154,4 +155,16 @@ export const http = {
     });
     return result.msg == "success" ? result.data : [];
   },
+  // 我收到的日志
+  getMyReceive: async (params: { pageNo: number; pageSize: number }) => {
+    const result: any = await request.get(api.receiveList, {
+      params,
+    });
+    return result.msg == "success"
+      ? result.data
+      : {
+          list: [],
+          total: 0,
+        };
+  },
 };

+ 8 - 0
client_h5/src/router/routes.ts

@@ -197,6 +197,14 @@ const routes: RouteRecordRaw[] = [
         },
         component: () => import("@/pages/myLogs/Weekly/MyLogs.vue"),
       },
+      {
+        path: "myReceive",
+        name: "myReceive",
+        meta: {
+          title: "我收到的",
+        },
+        component: () => import("@/pages/myLogs/Receive/index.vue"),
+      },
       {
         path: "project",
         name: "project",

+ 3 - 1
zjugis-business/src/main/java/com/zjugis/business/flow/loan/service/LoanFlowServiceImpl.java

@@ -124,7 +124,9 @@ public class LoanFlowServiceImpl implements LoanFlowService {
         Loan updateObj = LoanConvert.INSTANCE.convert(updateReqVO);
         loanDao.updateById(updateObj);
         //更新流程描述
-        updateDesc(updateReqVO);
+        if(updateReqVO.getInstanceId()!=null){
+            updateDesc(updateReqVO);
+        }
     }
     private void updateDesc(LoanUpdateReqVO updateReqVO) {
         Loan entity = findByInstanceId(updateReqVO.getInstanceId());

+ 2 - 2
zjugis-business/src/main/resources/templates/AttendanceNote/js/index.js

@@ -122,7 +122,7 @@
                     + '</td>'
                     + '<td>'
                     + '<div class="form-item">'
-                    + '<div class="z-comp-input" name="AttendanceNoteTimeDO[0]$bz1">'
+                    + '<div class="z-comp-input" name="AttendanceNoteTimeDO[' + i + ']$bz1">'
                     + '<input type="text" value="">'
                     + '</div>'
                     + '</div>'
@@ -293,7 +293,7 @@
             + '</td>'
             + '<td>'
             + '<div class="form-item">'
-            + '<div class="z-comp-input" name="AttendanceNoteTimeDO[0]$bz1">'
+            + '<div class="z-comp-input" name="AttendanceNoteTimeDO[' + index + ']$bz1">'
             + '<input type="text" value="">'
             + '</div>'
             + '</div>'

+ 32 - 4
zjugis-module-adm/zjugis-module-adm-biz/src/main/java/com/zjugis/module/adm/service/report/ReportServiceImpl.java

@@ -204,15 +204,29 @@ public class ReportServiceImpl implements ReportService {
         if (CollectionUtil.isEmpty(userReportReceiveList)) {
             return new PageResult<>();
         }
-        List<Long> reportIdList = userReportReceiveList.stream().map(ReportReceiveRespVO::getReportId).collect(Collectors.toList());
+        List<Long> reportIdList = userReportReceiveList.stream().filter(c -> c.getReportId() != null).map(ReportReceiveRespVO::getReportId).distinct().collect(Collectors.toList());
 
         //获取报告分页列表
         LambdaQueryWrapper<ReportDO> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(ReportDO::getDeleted, 0);
         queryWrapper.eq(ReportDO::getIsTemp, 0);
-        queryWrapper.in(ReportDO::getId, reportIdList);
+//        queryWrapper.in(ReportDO::getId, reportIdList);
+        // 每1000个元素分一个List (oracle的in最多接收1000)
+        int chunkSize = 1000;
+        List<List<Long>> reportIdGroupList = IntStream.range(0, (reportIdList.size() + chunkSize - 1) / chunkSize).mapToObj(i -> reportIdList.subList(i * chunkSize, Math.min((i + 1) * chunkSize, reportIdList.size()))).collect(Collectors.toList());
+        int lastIndex = reportIdGroupList.size() - 1;
+        queryWrapper.and(qw -> {
+            for (int i = 0; i <= lastIndex; i++) {
+                List<Long> idList = reportIdGroupList.get(i);
+                qw.in(ReportDO::getId, idList);
+                // 判断是否是最后一个元素
+                if (i != lastIndex) {
+                    qw.or();
+                }
+            }
+        });
         queryWrapper.eq(StrUtil.isNotBlank(reqVO.getReportType()), ReportDO::getReportType, reqVO.getReportType());
-        queryWrapper.orderByDesc(ReportDO::getFillingDate);
+        queryWrapper.orderByDesc(ReportDO::getCreateTime);
         if (reqVO.getReportYear() != null) {
             if (StrUtil.isNotBlank(reqVO.getReportType())) {
                 if ("daily".equals(reqVO.getReportType())) {
@@ -236,12 +250,26 @@ public class ReportServiceImpl implements ReportService {
         List<ReportRespVO> reportList = reportPageResult.getList();
         List<Long> reportIds = reportList.stream().map(ReportRespVO::getId).collect(Collectors.toList());
         Set<String> userIdList = reportList.stream().map(ReportRespVO::getUserId).collect(Collectors.toSet());
+        //获取所有用户信息
         Map<String, AdminUserRespDTO> userMap = adminUserApi.getAllUserMap();
+        List<AdminUserRespDTO> userInfoList = userMap.values().stream().collect(Collectors.toList());
+
         //工作量
         List<ReportWorkloadRespVO> workloadDetailList = reportWorkloadService.getReportWorkloadByRIds(reportIds, userIdList);
+
+        //报告所有接收人
+        List<ReportReceiveRespVO> reportReceiveList = reportReceiveService.getReportReceiveList(reportIds);
+
         reportList.forEach(report -> {
+            report.setUserNickname(userMap.get(report.getUserId()) == null ? null : userMap.get(report.getUserId()).getNickname());
+
+            //工作量
             report.setWorkload(workloadDetailList.stream().filter(load -> load.getReportId().equals(report.getId())).collect(Collectors.toList()));
-            report.setUserNickname(userMap.get(report.getUserId()).getNickname());
+
+            //接收人信息
+            List<String> receiveIds = reportReceiveList.stream().filter(receive -> receive.getReportId().equals(report.getId())).map(ReportReceiveRespVO::getReceiveUserId).collect(Collectors.toList());
+            report.setReceiveIds(receiveIds);
+            report.setReceiveNames(userInfoList.stream().filter(user -> receiveIds.contains(user.getId())).map(AdminUserRespDTO::getNickname).collect(Collectors.toList()));
         });
         return reportPageResult;
     }