Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-link-report
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-link-report
Commits
35e47a1f
提交
35e47a1f
authored
3月 31, 2025
作者:
吕本才
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、修改分组保存时,增加分类name,2、增加自定义报表,名称为空的问题
上级
41343864
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
66 行增加
和
64 行删除
+66
-64
CustomerGroupCoreController.java
...k/report/controller/core/CustomerGroupCoreController.java
+5
-5
CustomerGroupDao.java
...ain/java/com/link/report/domain/dao/CustomerGroupDao.java
+3
-3
CustomerReportDao.java
...in/java/com/link/report/domain/dao/CustomerReportDao.java
+3
-3
CustomerGroupDaoImpl.java
...com/link/report/domain/dao/impl/CustomerGroupDaoImpl.java
+10
-11
CustomerReportDaoImpl.java
...om/link/report/domain/dao/impl/CustomerReportDaoImpl.java
+4
-9
CustomerReportGroup.java
...va/com/link/report/domain/entity/CustomerReportGroup.java
+1
-0
CustomerGroupAddVo.java
...java/com/link/report/pojo/request/CustomerGroupAddVo.java
+10
-2
CustomerReportAddVo.java
...ava/com/link/report/pojo/request/CustomerReportAddVo.java
+2
-2
CustomerGroupService.java
...in/java/com/link/report/service/CustomerGroupService.java
+3
-4
CustomerGroupServiceImpl.java
...om/link/report/service/impl/CustomerGroupServiceImpl.java
+12
-12
CustomerReportGroupServiceImpl.java
...k/report/service/impl/CustomerReportGroupServiceImpl.java
+1
-1
CustomerReportServiceImpl.java
...m/link/report/service/impl/CustomerReportServiceImpl.java
+12
-12
没有找到文件。
src/main/java/com/link/report/controller/core/CustomerGroupCoreController.java
浏览文件 @
35e47a1f
package
com
.
link
.
report
.
controller
.
core
;
import
com.link.report.pojo.request.Customer
Report
AddVo
;
import
com.link.report.pojo.request.Customer
Group
AddVo
;
import
com.link.report.service.CustomerGroupService
;
import
com.sfa.common.core.domain.R
;
import
com.sfa.common.security.annotation.RequiresPermissions
;
...
...
@@ -21,15 +21,15 @@ public class CustomerGroupCoreController {
@RequiresPermissions
(
"bi:supply:list"
)
@PostMapping
(
"/group/insertOrUpdate"
)
public
R
save
(
@RequestBody
Customer
ReportAddVo
customerReport
AddVo
)
{
groupService
.
save
(
customer
Report
AddVo
);
public
R
save
(
@RequestBody
Customer
GroupAddVo
customerGroup
AddVo
)
{
groupService
.
save
(
customer
Group
AddVo
);
return
R
.
ok
();
}
@RequiresPermissions
(
"bi:supply:list"
)
@DeleteMapping
(
"/group/delete"
)
public
R
delete
(
Customer
ReportAddVo
customerReport
AddVo
)
{
groupService
.
delete
(
customer
Report
AddVo
);
public
R
delete
(
Customer
GroupAddVo
customerGroup
AddVo
)
{
groupService
.
delete
(
customer
Group
AddVo
);
return
R
.
ok
();
}
...
...
src/main/java/com/link/report/domain/dao/CustomerGroupDao.java
浏览文件 @
35e47a1f
package
com
.
link
.
report
.
domain
.
dao
;
import
com.link.report.domain.wq.CustomerGroupQueryWq
;
import
com.link.report.pojo.request.Customer
Report
AddVo
;
import
com.link.report.pojo.request.Customer
Group
AddVo
;
import
com.link.report.pojo.response.CustomerGroupDto
;
import
java.util.List
;
...
...
@@ -9,9 +9,9 @@ import java.util.List;
public
interface
CustomerGroupDao
{
List
<
CustomerGroupDto
>
queryList
(
CustomerGroupQueryWq
wq
);
void
insert
(
Customer
ReportAddVo
customerReport
AddVo
);
void
insert
(
Customer
GroupAddVo
customerGroup
AddVo
);
void
update
(
Customer
ReportAddVo
customerReport
AddVo
);
void
update
(
Customer
GroupAddVo
customerGroup
AddVo
);
void
delete
(
String
groupId
);
}
src/main/java/com/link/report/domain/dao/CustomerReportDao.java
浏览文件 @
35e47a1f
package
com
.
link
.
report
.
domain
.
dao
;
import
com.link.report.domain.
wq.CustomerReportAddWq
;
import
com.link.report.domain.
entity.CustomerReport
;
import
com.link.report.domain.wq.CustomerReportQueryWq
;
import
com.link.report.pojo.response.CustomerReportListDto
;
import
java.util.List
;
public
interface
CustomerReportDao
{
void
insert
(
CustomerReport
AddWq
wq
);
void
insert
(
CustomerReport
report
);
void
update
(
CustomerReport
AddWq
wq
);
void
update
(
CustomerReport
report
);
List
<
CustomerReportListDto
>
queryCustomerReportList
(
CustomerReportQueryWq
wq
);
}
src/main/java/com/link/report/domain/dao/impl/CustomerGroupDaoImpl.java
浏览文件 @
35e47a1f
...
...
@@ -7,7 +7,7 @@ import com.link.report.domain.dao.CustomerGroupDao;
import
com.link.report.domain.entity.CustomerGroup
;
import
com.link.report.domain.mapper.CustomerGroupMapper
;
import
com.link.report.domain.wq.CustomerGroupQueryWq
;
import
com.link.report.pojo.request.Customer
Report
AddVo
;
import
com.link.report.pojo.request.Customer
Group
AddVo
;
import
com.link.report.pojo.response.CustomerGroupDto
;
import
com.sfa.common.core.utils.bean.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -45,20 +45,19 @@ public class CustomerGroupDaoImpl implements CustomerGroupDao {
}
@Override
public
void
insert
(
Customer
ReportAddVo
customerReport
AddVo
)
{
CustomerGroup
customerGroup
=
BeanUtils
.
transitionDto
(
customer
Report
AddVo
,
CustomerGroup
.
class
);
customerGroup
.
setName
(
customer
Report
AddVo
.
getGroupName
());
customerGroup
.
setCategoryName
(
customer
Report
AddVo
.
getCategoryName
());
public
void
insert
(
Customer
GroupAddVo
customerGroup
AddVo
)
{
CustomerGroup
customerGroup
=
BeanUtils
.
transitionDto
(
customer
Group
AddVo
,
CustomerGroup
.
class
);
customerGroup
.
setName
(
customer
Group
AddVo
.
getGroupName
());
customerGroup
.
setCategoryName
(
customer
Group
AddVo
.
getCategoryName
());
groupMapper
.
insert
(
customerGroup
);
}
@Override
public
void
update
(
CustomerReportAddVo
customerReportAddVo
)
{
CustomerGroup
customerGroup
=
BeanUtils
.
transitionDto
(
customerReportAddVo
,
CustomerGroup
.
class
);
customerGroup
.
setId
(
customerReportAddVo
.
getGroupId
());
customerGroup
.
setName
(
customerReportAddVo
.
getGroupName
());
customerGroup
.
setCategoryName
(
customerReportAddVo
.
getCategoryName
());
public
void
update
(
CustomerGroupAddVo
customerGroupAddVo
)
{
CustomerGroup
customerGroup
=
BeanUtils
.
transitionDto
(
customerGroupAddVo
,
CustomerGroup
.
class
);
customerGroup
.
setId
(
customerGroupAddVo
.
getGroupId
());
customerGroup
.
setName
(
customerGroupAddVo
.
getGroupName
());
customerGroup
.
setCategoryName
(
customerGroupAddVo
.
getCategoryName
());
groupMapper
.
updateById
(
customerGroup
);
}
...
...
src/main/java/com/link/report/domain/dao/impl/CustomerReportDaoImpl.java
浏览文件 @
35e47a1f
...
...
@@ -6,10 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.link.report.domain.dao.CustomerReportDao
;
import
com.link.report.domain.entity.CustomerReport
;
import
com.link.report.domain.mapper.CustomerReportMapper
;
import
com.link.report.domain.wq.CustomerReportAddWq
;
import
com.link.report.domain.wq.CustomerReportQueryWq
;
import
com.link.report.pojo.response.CustomerReportListDto
;
import
com.sfa.common.core.utils.bean.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
...
...
@@ -25,16 +23,13 @@ public class CustomerReportDaoImpl implements CustomerReportDao {
private
CustomerReportMapper
customerReportMapper
;
@Override
public
void
insert
(
CustomerReportAddWq
wq
)
{
CustomerReport
entity
=
BeanUtils
.
transitionDto
(
wq
,
CustomerReport
.
class
);
customerReportMapper
.
insert
(
entity
);
public
void
insert
(
CustomerReport
report
)
{
customerReportMapper
.
insert
(
report
);
}
@Override
public
void
update
(
CustomerReportAddWq
wq
)
{
CustomerReport
entity
=
BeanUtils
.
transitionDto
(
wq
,
CustomerReport
.
class
);
customerReportMapper
.
updateById
(
entity
);
public
void
update
(
CustomerReport
report
)
{
customerReportMapper
.
updateById
(
report
);
}
@Override
...
...
src/main/java/com/link/report/domain/entity/CustomerReportGroup.java
浏览文件 @
35e47a1f
...
...
@@ -9,6 +9,7 @@ import java.util.Date;
public
class
CustomerReportGroup
{
private
String
id
;
private
String
reportId
;
private
String
categoryName
;
private
Integer
reportType
;
private
String
groupId
;
private
String
createBy
;
...
...
src/main/java/com/link/report/pojo/request/CustomerGroupAddVo.java
浏览文件 @
35e47a1f
...
...
@@ -9,6 +9,14 @@ import lombok.Data;
*/
@Data
public
class
CustomerGroupAddVo
{
private
String
id
;
private
String
name
;
private
String
groupId
;
private
String
groupName
;
private
String
previewUrl
;
private
String
categoryName
;
private
Long
createUserId
;
private
Long
updateUserId
;
private
String
createBy
;
private
String
updateBy
;
}
src/main/java/com/link/report/pojo/request/CustomerReportAddVo.java
浏览文件 @
35e47a1f
...
...
@@ -9,8 +9,8 @@ import lombok.Data;
*/
@Data
public
class
CustomerReportAddVo
{
private
String
groupI
d
;
private
String
groupN
ame
;
private
String
i
d
;
private
String
n
ame
;
private
String
previewUrl
;
private
String
categoryName
;
...
...
src/main/java/com/link/report/service/CustomerGroupService.java
浏览文件 @
35e47a1f
package
com
.
link
.
report
.
service
;
import
com.link.report.pojo.request.CustomerReportAddVo
;
import
com.link.report.pojo.request.CustomerGroupAddVo
;
public
interface
CustomerGroupService
{
void
save
(
Customer
ReportAddVo
customerReport
AddVo
);
void
save
(
Customer
GroupAddVo
customerGroup
AddVo
);
void
delete
(
Customer
ReportAddVo
customerReport
AddVo
);
void
delete
(
Customer
GroupAddVo
customerGroup
AddVo
);
void
convert
();
}
src/main/java/com/link/report/service/impl/CustomerGroupServiceImpl.java
浏览文件 @
35e47a1f
...
...
@@ -5,7 +5,7 @@ import com.link.report.domain.dao.CustomerGroupDao;
import
com.link.report.domain.dao.CustomerReportGroupDao
;
import
com.link.report.domain.entity.CustomerReportGroup
;
import
com.link.report.domain.wq.CustomerGroupQueryWq
;
import
com.link.report.pojo.request.Customer
Report
AddVo
;
import
com.link.report.pojo.request.Customer
Group
AddVo
;
import
com.link.report.pojo.response.CustomerGroupDto
;
import
com.link.report.service.CustomerGroupService
;
import
com.sfa.common.core.constant.SecurityConstants
;
...
...
@@ -34,7 +34,7 @@ public class CustomerGroupServiceImpl implements CustomerGroupService {
private
RemoteUserService
remoteUserService
;
@Override
public
void
save
(
Customer
Report
AddVo
customerReportAddVo
)
{
public
void
save
(
Customer
Group
AddVo
customerReportAddVo
)
{
Long
userId
=
SecurityUtils
.
getUserId
();
String
userName
=
SecurityUtils
.
getUsername
();
customerReportAddVo
.
setCreateBy
(
userName
);
...
...
@@ -49,7 +49,7 @@ public class CustomerGroupServiceImpl implements CustomerGroupService {
}
@Override
public
void
delete
(
Customer
Report
AddVo
customerReportAddVo
)
{
public
void
delete
(
Customer
Group
AddVo
customerReportAddVo
)
{
groupDao
.
delete
(
customerReportAddVo
.
getGroupId
());
}
...
...
@@ -73,19 +73,19 @@ public class CustomerGroupServiceImpl implements CustomerGroupService {
CustomerGroupDto
customerGroupDto
=
dtoMap
.
get
(
groupId
);
if
(
ObjectUtil
.
isNotEmpty
(
customerGroupDto
))
{
// 匹配到了
Customer
ReportAddVo
customerReportAddVo
=
new
CustomerReport
AddVo
();
customerReport
AddVo
.
setCategoryName
(
customerGroupDto
.
getCategoryName
());
customerReport
AddVo
.
setGroupName
(
customerGroupDto
.
getGroupName
());
customerReport
AddVo
.
setCreateBy
(
customerReportGroup
.
getCreateBy
());
customerReport
AddVo
.
setUpdateBy
(
customerReportGroup
.
getUpdateBy
());
Customer
GroupAddVo
groupAddVo
=
new
CustomerGroup
AddVo
();
group
AddVo
.
setCategoryName
(
customerGroupDto
.
getCategoryName
());
group
AddVo
.
setGroupName
(
customerGroupDto
.
getGroupName
());
group
AddVo
.
setCreateBy
(
customerReportGroup
.
getCreateBy
());
group
AddVo
.
setUpdateBy
(
customerReportGroup
.
getUpdateBy
());
R
<
LoginUser
>
userResult
=
remoteUserService
.
getUserInfo
(
customerReportGroup
.
getCreateBy
(),
SecurityConstants
.
INNER
)
;
Long
userid
=
userResult
.
getData
().
getSysUser
().
getUserId
();
customerReport
AddVo
.
setCreateUserId
(
userid
);
customerReport
AddVo
.
setUpdateUserId
(
userid
);
groupDao
.
insert
(
customerReport
AddVo
);
group
AddVo
.
setCreateUserId
(
userid
);
group
AddVo
.
setUpdateUserId
(
userid
);
groupDao
.
insert
(
group
AddVo
);
// 修改数据
customerReportGroup
.
setGroupId
(
customerReport
AddVo
.
getGroupId
());
customerReportGroup
.
setGroupId
(
group
AddVo
.
getGroupId
());
// 更新 分组id
reportGroupDao
.
update
(
customerReportGroup
);
}
...
...
src/main/java/com/link/report/service/impl/CustomerReportGroupServiceImpl.java
浏览文件 @
35e47a1f
...
...
@@ -36,7 +36,7 @@ public class CustomerReportGroupServiceImpl implements CustomerReportGroupServic
@Override
public
List
<
CustomerReportGroupResDto
>
queryList
(
CustomerReportQueryListVo
vo
)
{
CustomerGroupQueryWq
wq
=
new
CustomerGroupQueryWq
();
//
wq.setCategoryName(vo.getCategoryName());
wq
.
setCategoryName
(
vo
.
getCategoryName
());
wq
.
setCreateUserId
(
SecurityUtils
.
getLoginUser
().
getUserid
());
// 先查询分组
List
<
CustomerGroupDto
>
groupDtos
=
customerGroupDao
.
queryList
(
wq
);
...
...
src/main/java/com/link/report/service/impl/CustomerReportServiceImpl.java
浏览文件 @
35e47a1f
...
...
@@ -2,7 +2,7 @@ package com.link.report.service.impl;
import
cn.hutool.core.util.ObjectUtil
;
import
com.link.report.domain.dao.CustomerReportDao
;
import
com.link.report.domain.
wq.CustomerReportAddWq
;
import
com.link.report.domain.
entity.CustomerReport
;
import
com.link.report.domain.wq.CustomerReportQueryWq
;
import
com.link.report.pojo.request.CustomerReportAddVo
;
import
com.link.report.pojo.request.ReportShareListVo
;
...
...
@@ -26,19 +26,19 @@ public class CustomerReportServiceImpl implements CustomerReportService {
@Override
public
void
save
(
CustomerReportAddVo
customerReportAddVo
)
{
CustomerReport
AddWq
wq
=
new
CustomerReportAddWq
();
BeanUtils
.
copyProperties
(
customerReportAddVo
,
wq
);
wq
.
setName
(
customerReportAddVo
.
getGroup
Name
());
wq
.
setPreviewUrl
(
customerReportAddVo
.
getPreviewUrl
());
wq
.
setCreateBy
(
SecurityUtils
.
getUsername
());
wq
.
setUpdateBy
(
SecurityUtils
.
getUsername
());
wq
.
setCreateUserId
(
SecurityUtils
.
getUserId
());
wq
.
setUpdateUserId
(
SecurityUtils
.
getUserId
());
CustomerReport
customerReport
=
new
CustomerReport
();
BeanUtils
.
copyProperties
(
customerReportAddVo
,
customerReport
);
customerReport
.
setName
(
customerReportAddVo
.
get
Name
());
customerReport
.
setPreviewUrl
(
customerReportAddVo
.
getPreviewUrl
());
customerReport
.
setCreateBy
(
SecurityUtils
.
getUsername
());
customerReport
.
setUpdateBy
(
SecurityUtils
.
getUsername
());
customerReport
.
setCreateUserId
(
SecurityUtils
.
getUserId
());
customerReport
.
setUpdateUserId
(
SecurityUtils
.
getUserId
());
if
(
ObjectUtil
.
isNotEmpty
(
wq
.
getId
()))
{
customerReportDao
.
update
(
wq
);
if
(
ObjectUtil
.
isNotEmpty
(
customerReport
.
getId
()))
{
customerReportDao
.
update
(
customerReport
);
}
else
{
customerReportDao
.
insert
(
wq
);
customerReportDao
.
insert
(
customerReport
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论