Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cmeeting
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
翟斌
cmeeting
Commits
12f463eb
提交
12f463eb
authored
7月 23, 2025
作者:
张开石
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、修改统计纪要模板使用情况接口
父级
8f1afb93
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
61 行增加
和
37 行删除
+61
-37
src/main/java/com/cmeeting/controller/StatisticsController.java
+17
-0
src/main/java/com/cmeeting/mapper/primary/MeetingInfoMapper.java
+4
-3
src/main/java/com/cmeeting/mapper/secondary/SysUserSysMapper.java
+4
-2
src/main/java/com/cmeeting/service/impl/MeetingInfoServiceImpl.java
+21
-22
src/main/resources/mapper/primary/MeetingInfoMapper.xml
+10
-3
src/main/resources/mapper/secondary/SysUserSysMapper.xml
+5
-7
没有找到文件。
src/main/java/com/cmeeting/controller/StatisticsController.java
浏览文件 @
12f463eb
...
...
@@ -45,4 +45,21 @@ public class StatisticsController {
return
R
.
ok
(
list
);
}
/**
* 纪要模板使用情况的统计
* @param searchValue 用户部门或工号
* @param createTimeStart 开始时间
* @param createTimeEnd 结束时间
* @return
*/
@GetMapping
(
"/exportRecordTemplateUsingInfo"
)
public
R
exportRecordTemplateUsingInfo
(
String
searchValue
,
@RequestParam
(
"createTimeStart"
)
Date
createTimeStart
,
@RequestParam
(
"createTimeEnd"
)
Date
createTimeEnd
)
{
List
<
Map
<
String
,
String
>>
list
=
meetingInfoService
.
statistics
(
searchValue
,
createTimeStart
,
createTimeEnd
);
return
R
.
ok
(
list
);
}
}
src/main/java/com/cmeeting/mapper/primary/MeetingInfoMapper.java
浏览文件 @
12f463eb
...
...
@@ -2,12 +2,10 @@ package com.cmeeting.mapper.primary;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.cmeeting.pojo.MeetingInfo
;
import
com.cmeeting.vo.MeetingInfoVO
;
import
com.cmeeting.vo.TencentMeetingVO
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -20,15 +18,18 @@ public interface MeetingInfoMapper extends BaseMapper<MeetingInfo> {
/**
* 统计
*
* @param startTime
* @param endTime
* @param dateList
* @param userIdList
* @return
*/
@MapKey
(
"host_uid"
)
List
<
Map
<
String
,
String
>>
statistics
(
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"dateList"
)
List
<
String
>
dateList
);
@Param
(
"dateList"
)
List
<
String
>
dateList
,
@Param
(
"userIdList"
)
List
<
String
>
userIdList
);
// List<MeetingInfo> selectList(MeetingInfoVO vo);
...
...
src/main/java/com/cmeeting/mapper/secondary/SysUserSysMapper.java
浏览文件 @
12f463eb
...
...
@@ -44,9 +44,11 @@ public interface SysUserSysMapper extends BaseMapper<SysUserSync> {
/**
* 获取用户信息
* @param userIdList
*
* @param searchValue
* @return
*/
@MapKey
(
"userId"
)
List
<
Map
<
String
,
String
>>
selectParamByUserIdList
(
@Param
(
"userIdList"
)
List
<
String
>
userIdList
);
List
<
Map
<
String
,
String
>>
selectParamByUserIdList
(
@Param
(
"tenantId"
)
String
tenantId
,
@Param
(
"searchValue"
)
String
searchValue
);
}
src/main/java/com/cmeeting/service/impl/MeetingInfoServiceImpl.java
浏览文件 @
12f463eb
...
...
@@ -10,8 +10,6 @@ import cn.hutool.core.date.DateField;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.NumberUtil
;
import
cn.hutool.poi.excel.ExcelUtil
;
import
cn.hutool.poi.excel.ExcelWriter
;
import
com.alibaba.fastjson2.JSON
;
import
com.alibaba.fastjson2.JSONArray
;
import
com.alibaba.fastjson2.JSONObject
;
...
...
@@ -86,6 +84,8 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
private
String
tencentAdminUserId
;
@Value
(
value
=
"${llm.api-addr}"
)
private
String
llmApiAddr
;
@Value
(
"${permission.tenantId}"
)
public
String
permissionTenantId
;
@Resource
private
ProcessLogService
processLogService
;
@Resource
...
...
@@ -269,46 +269,45 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
List
<
String
>
dateList
=
DateUtil
.
rangeToList
(
createTimeStart
,
createTimeEnd
,
DateField
.
DAY_OF_YEAR
).
stream
()
.
map
(
date
->
DateUtil
.
format
(
date
,
"yyyy-MM-dd"
))
.
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
String
>>
userInfoList
=
sysUserSysMapper
.
selectParamByUserIdList
(
permissionTenantId
,
searchValue
);
List
<
String
>
userIdList
=
userInfoList
.
stream
().
map
(
map
->
map
.
get
(
"userId"
)).
collect
(
Collectors
.
toList
());
String
startTime
=
DateUtil
.
format
(
createTimeStart
,
"yyyy-MM-dd"
);
String
endTime
=
DateUtil
.
format
(
createTimeEnd
,
"yyyy-MM-dd"
);
List
<
Map
<
String
,
String
>>
list
=
meetingInfoMapper
.
statistics
(
startTime
,
endTime
,
dateList
);
List
<
String
>
userIdList
=
list
.
stream
().
map
(
map
->
map
.
get
(
"userId"
)).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
String
>>
userInfoList
=
sysUserSysMapper
.
selectParamByUserIdList
(
userIdList
);
for
(
Map
<
String
,
String
>
map
:
list
)
{
String
userId
=
map
.
get
(
"userId"
);
userInfoList
.
stream
().
filter
(
userInfo
->
userInfo
.
get
(
"userId"
).
equals
(
userId
)).
findFirst
().
ifPresent
(
userInfo
->
{
map
.
put
(
"name"
,
userInfo
.
get
(
"name"
));
map
.
put
(
"deptName"
,
userInfo
.
get
(
"deptName"
));
});
List
<
Map
<
String
,
String
>>
statisticsList
=
meetingInfoMapper
.
statistics
(
startTime
,
endTime
,
dateList
,
userIdList
);
for
(
Map
<
String
,
String
>
userInfo
:
userInfoList
)
{
String
userId
=
userInfo
.
get
(
"userId"
);
statisticsList
.
stream
().
filter
(
statistics
->
statistics
.
get
(
"userId"
).
equals
(
userId
)).
findFirst
().
ifPresent
(
userInfo:
:
putAll
);
// 横向加法
Integer
sum
=
map
.
values
().
stream
()
Integer
sum
=
userInfo
.
values
().
stream
()
// 小于4是为了和用户编号区分开
.
filter
(
value
->
NumberUtil
.
isNumber
(
value
)
&&
value
.
length
()
<
4
)
.
map
(
value
->
Integer
.
parseInt
(
value
))
.
reduce
(
Integer:
:
sum
)
.
orElse
(
0
);
map
.
put
(
"sum"
,
sum
.
toString
());
userInfo
.
put
(
"sum"
,
sum
.
toString
());
}
userInfoList
.
removeIf
(
map
->
!
map
.
containsKey
(
"host_uid"
));
// 初始化一行用来纵向加和
Map
<
String
,
String
>
m
ap
=
new
LinkedHashMap
<>();
for
(
String
key
:
l
ist
.
get
(
0
).
keySet
())
{
m
ap
.
put
(
key
,
""
);
Map
<
String
,
String
>
lastRowM
ap
=
new
LinkedHashMap
<>();
for
(
String
key
:
userInfoL
ist
.
get
(
0
).
keySet
())
{
lastRowM
ap
.
put
(
key
,
""
);
}
for
(
Map
<
String
,
String
>
stringMap
:
l
ist
)
{
for
(
Map
<
String
,
String
>
stringMap
:
userInfoL
ist
)
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
stringMap
.
entrySet
())
{
String
key
=
entry
.
getKey
();
String
value
=
entry
.
getValue
();
if
(
NumberUtil
.
isNumber
(
value
)
&&
value
.
length
()
<
4
)
{
map
.
put
(
key
,
String
.
valueOf
(
NumberUtil
.
add
(
m
ap
.
get
(
key
),
value
)));
lastRowMap
.
put
(
key
,
String
.
valueOf
(
NumberUtil
.
add
(
lastRowM
ap
.
get
(
key
),
value
)));
}
}
}
m
ap
.
put
(
"userId"
,
"总计"
);
list
.
add
(
m
ap
);
lastRowM
ap
.
put
(
"userId"
,
"总计"
);
userInfoList
.
add
(
lastRowM
ap
);
return
l
ist
;
return
userInfoL
ist
;
}
/**
...
...
src/main/resources/mapper/primary/MeetingInfoMapper.xml
浏览文件 @
12f463eb
...
...
@@ -34,7 +34,6 @@
select meeting_id,sub_meeting_id from cmt_meeting_info
</select>
<select
id=
"statistics"
resultType=
"java.util.LinkedHashMap"
>
SELECT
userid.wid as userId,
...
...
@@ -52,8 +51,16 @@
WHERE
date_format(sync_time, '%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
GROUP BY host_uid, date_format(sync_time, '%Y-%m-%d')
) AS t
join userid ON userid.tid COLLATE utf8mb4_general_ci = t.host_uid COLLATE utf8mb4_general_ci
) AS t,
userid
where
userid.tid COLLATE utf8mb4_general_ci = t.host_uid COLLATE utf8mb4_general_ci
<if
test=
"userIdList.size > 0"
>
and userid.wid in
<foreach
item=
"userId"
collection=
"userIdList"
open=
"("
separator=
","
close=
")"
index=
"index"
>
#{userId}
</foreach>
</if>
GROUP BY t.host_uid, userid.wid
</select>
...
...
src/main/resources/mapper/secondary/SysUserSysMapper.xml
浏览文件 @
12f463eb
...
...
@@ -149,19 +149,17 @@
<select
id=
"selectParamByUserIdList"
resultType=
"java.util.Map"
>
SELECT
sys_user_sync
.user_id as userId
,
sys_user_sync
_category.`name` as deptName
,
sys_user_sync.`name`,
sys_user_sync
_category.`name` as deptName
sys_user_sync
.user_id as userId
FROM
sys_user_sync,
sys_user_sync_category
<where>
sys_user_sync.tenant_id = #{tenantId}
and sys_user_sync.dept_id = sys_user_sync_category.dept_id
<if
test=
"userIdList.size > 0"
>
and sys_user_sync.user_id in
<foreach
item=
"userId"
collection=
"userIdList"
index=
"index"
separator=
","
close=
")"
open=
"("
>
#{userId}
</foreach>
<if
test=
"searchValue != null and searchValue != ''"
>
and (sys_user_sync.user_id like concat('%',#{searchValue},'%') or sys_user_sync.name like concat('%',#{searchValue},'%') or sys_user_sync_category.name like concat('%',#{searchValue},'%'))
</if>
</where>
</select>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论