Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
relation
Commits
3f245470
Commit
3f245470
authored
Aug 15, 2025
by
zhuxiang
Browse files
团体画布优化
parent
cab07481
Changes
9
Show whitespace changes
Inline
Side-by-side
src/main/java/com/platform/controller/GroupController.java
View file @
3f245470
...
@@ -73,7 +73,7 @@ public class GroupController extends BaseController {
...
@@ -73,7 +73,7 @@ public class GroupController extends BaseController {
}
}
@GetMapping
(
"/draw/{groupId}"
)
@GetMapping
(
"/draw/{groupId}"
)
public
Result
draw
(
@PathVariable
Str
in
g
groupId
)
{
public
Result
draw
(
@PathVariable
in
t
groupId
)
{
return
Result
.
data
(
groupDetailService
.
draw
(
groupId
));
return
Result
.
data
(
groupDetailService
.
draw
(
groupId
));
}
}
...
...
src/main/java/com/platform/mapper/ExcelDataMapper.java
View file @
3f245470
...
@@ -38,4 +38,6 @@ public interface ExcelDataMapper extends BaseMapper<ExcelDataEntity> {
...
@@ -38,4 +38,6 @@ public interface ExcelDataMapper extends BaseMapper<ExcelDataEntity> {
List
<
ExcelDataEntity
>
accountCashFlow
(
UserDTO
userDTO
);
List
<
ExcelDataEntity
>
accountCashFlow
(
UserDTO
userDTO
);
List
<
ExcelDataEntity
>
queryListByPayeeNameAndPayUserName
(
@Param
(
"payeeName"
)
String
payeeName
,
@Param
(
"caseId"
)
int
caseId
);
List
<
ExcelDataEntity
>
queryListByPayeeNameAndPayUserName
(
@Param
(
"payeeName"
)
String
payeeName
,
@Param
(
"caseId"
)
int
caseId
);
List
<
ExcelDataVO
>
queryListByGroupId
(
CaseDTO
caseDTO
);
}
}
src/main/java/com/platform/mapper/GroupDetailMapper.java
View file @
3f245470
...
@@ -22,5 +22,5 @@ public interface GroupDetailMapper extends BaseMapper<GroupDetailEntity> {
...
@@ -22,5 +22,5 @@ public interface GroupDetailMapper extends BaseMapper<GroupDetailEntity> {
* @param groupId
* @param groupId
* @return
* @return
*/
*/
List
<
String
>
queryUserList
(
Str
in
g
groupId
);
List
<
String
>
queryUserList
(
in
t
groupId
);
}
}
src/main/java/com/platform/model/dto/CaseDTO.java
View file @
3f245470
...
@@ -53,4 +53,6 @@ public class CaseDTO extends CasesEntity {
...
@@ -53,4 +53,6 @@ public class CaseDTO extends CasesEntity {
private
String
nodeType
;
private
String
nodeType
;
private
List
<
NodeEntity
>
nodeList
;
private
List
<
NodeEntity
>
nodeList
;
private
int
groupId
;
}
}
src/main/java/com/platform/service/ExcelDataService.java
View file @
3f245470
...
@@ -69,4 +69,6 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
...
@@ -69,4 +69,6 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
void
deleteByPayeeName
(
String
nodeName
);
void
deleteByPayeeName
(
String
nodeName
);
List
<
ExcelDataEntity
>
queryListByPayeeNameAndPayUserName
(
String
payeeName
,
int
caseId
);
List
<
ExcelDataEntity
>
queryListByPayeeNameAndPayUserName
(
String
payeeName
,
int
caseId
);
List
<
ExcelDataVO
>
queryListByGroupId
(
CaseDTO
caseDTO
);
}
}
src/main/java/com/platform/service/GroupDetailService.java
View file @
3f245470
...
@@ -21,7 +21,7 @@ public interface GroupDetailService extends IService<GroupDetailEntity> {
...
@@ -21,7 +21,7 @@ public interface GroupDetailService extends IService<GroupDetailEntity> {
List
<
GroupDetailEntity
>
queryMacDetail
(
String
mac
);
List
<
GroupDetailEntity
>
queryMacDetail
(
String
mac
);
GraphVO
draw
(
Str
in
g
groupId
);
GraphVO
draw
(
in
t
groupId
);
void
personExport
(
GroupDetailDTO
groupDetailDTO
,
HttpServletResponse
httpServletResponse
);
void
personExport
(
GroupDetailDTO
groupDetailDTO
,
HttpServletResponse
httpServletResponse
);
...
...
src/main/java/com/platform/service/impl/ExcelDataServiceImpl.java
View file @
3f245470
...
@@ -124,6 +124,11 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
...
@@ -124,6 +124,11 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
return
baseMapper
.
queryListByPayeeNameAndPayUserName
(
payeeName
,
caseId
);
return
baseMapper
.
queryListByPayeeNameAndPayUserName
(
payeeName
,
caseId
);
}
}
@Override
public
List
<
ExcelDataVO
>
queryListByGroupId
(
CaseDTO
caseDTO
)
{
return
baseMapper
.
queryListByGroupId
(
caseDTO
);
}
@Override
@Override
public
List
<
AssociationVO
>
queryAccountTemporary
(
UserDTO
userDTO
)
{
public
List
<
AssociationVO
>
queryAccountTemporary
(
UserDTO
userDTO
)
{
return
baseMapper
.
queryAccountTemporary
(
userDTO
);
return
baseMapper
.
queryAccountTemporary
(
userDTO
);
...
...
src/main/java/com/platform/service/impl/GroupDetailServiceImpl.java
View file @
3f245470
...
@@ -69,7 +69,7 @@ public class GroupDetailServiceImpl extends ServiceImpl<GroupDetailMapper, Group
...
@@ -69,7 +69,7 @@ public class GroupDetailServiceImpl extends ServiceImpl<GroupDetailMapper, Group
}
}
@Override
@Override
public
GraphVO
draw
(
Str
in
g
groupId
)
{
public
GraphVO
draw
(
in
t
groupId
)
{
//查看group信息
//查看group信息
GroupEntity
groupEntity
=
groupService
.
getById
(
groupId
);
GroupEntity
groupEntity
=
groupService
.
getById
(
groupId
);
if
(
groupEntity
==
null
)
{
if
(
groupEntity
==
null
)
{
...
@@ -82,12 +82,16 @@ public class GroupDetailServiceImpl extends ServiceImpl<GroupDetailMapper, Group
...
@@ -82,12 +82,16 @@ public class GroupDetailServiceImpl extends ServiceImpl<GroupDetailMapper, Group
// 使用Map来存储边的信息,键为payer-payee组合,值为Edge对象
// 使用Map来存储边的信息,键为payer-payee组合,值为Edge对象
Map
<
String
,
EdgeVO
>
edgeMap
=
new
HashMap
<>();
Map
<
String
,
EdgeVO
>
edgeMap
=
new
HashMap
<>();
Map
<
String
,
String
>
personMap
=
new
HashMap
<>();
// 使用Set去重
// 使用Set去重
Set
<
String
>
uniqueNodes
=
new
HashSet
<>();
Set
<
String
>
uniqueNodes
=
new
HashSet
<>();
//根据团体id查看团体明细
//根据团体id查看团体明细
List
<
String
>
userList
=
baseMapper
.
queryUserList
(
groupId
);
List
<
String
>
userList
=
baseMapper
.
queryUserList
(
groupId
);
if
(
CollUtil
.
isNotEmpty
(
userList
))
{
if
(
CollUtil
.
isNotEmpty
(
userList
))
{
userList
.
forEach
(
userName
->
personMap
.
put
(
userName
,
"个人"
));
CaseDTO
caseDTO
=
new
CaseDTO
();
CaseDTO
caseDTO
=
new
CaseDTO
();
CaseRuleConfigEntity
caseRuleConfigEntity
=
caseRuleConfigService
.
getByCaseId
(
groupEntity
.
getCaseId
());
CaseRuleConfigEntity
caseRuleConfigEntity
=
caseRuleConfigService
.
getByCaseId
(
groupEntity
.
getCaseId
());
if
(
caseRuleConfigEntity
!=
null
)
{
if
(
caseRuleConfigEntity
!=
null
)
{
...
@@ -100,8 +104,9 @@ public class GroupDetailServiceImpl extends ServiceImpl<GroupDetailMapper, Group
...
@@ -100,8 +104,9 @@ public class GroupDetailServiceImpl extends ServiceImpl<GroupDetailMapper, Group
caseDTO
.
setPrincipal
(
caseRuleConfigEntity
.
getPrincipal
());
caseDTO
.
setPrincipal
(
caseRuleConfigEntity
.
getPrincipal
());
caseDTO
.
setWhiteFlag
(
caseRuleConfigEntity
.
isWhiteFlag
());
caseDTO
.
setWhiteFlag
(
caseRuleConfigEntity
.
isWhiteFlag
());
caseDTO
.
setId
(
groupEntity
.
getCaseId
());
caseDTO
.
setId
(
groupEntity
.
getCaseId
());
caseDTO
.
setGroupId
(
groupId
);
}
}
List
<
ExcelDataVO
>
excelDataEntityList
=
filterExcelData
(
userList
,
caseDTO
);
List
<
ExcelDataVO
>
excelDataEntityList
=
filterExcelData
(
caseDTO
,
personMap
);
// 遍历结果集
// 遍历结果集
...
@@ -152,8 +157,8 @@ public class GroupDetailServiceImpl extends ServiceImpl<GroupDetailMapper, Group
...
@@ -152,8 +157,8 @@ public class GroupDetailServiceImpl extends ServiceImpl<GroupDetailMapper, Group
return
null
;
return
null
;
}
}
private
List
<
ExcelDataVO
>
filterExcelData
(
List
<
String
>
userList
,
CaseDTO
caseDTO
)
{
private
List
<
ExcelDataVO
>
filterExcelData
(
CaseDTO
caseDTO
,
Map
<
String
,
String
>
personMap
)
{
List
<
ExcelDataVO
>
excelDataEntityList
=
excelDataService
.
queryListBy
PayUserList
(
userList
,
caseDTO
);
List
<
ExcelDataVO
>
excelDataEntityList
=
excelDataService
.
queryListBy
GroupId
(
caseDTO
);
if
(
CollUtil
.
isEmpty
(
excelDataEntityList
))
{
if
(
CollUtil
.
isEmpty
(
excelDataEntityList
))
{
return
excelDataEntityList
;
return
excelDataEntityList
;
}
}
...
@@ -163,6 +168,14 @@ public class GroupDetailServiceImpl extends ServiceImpl<GroupDetailMapper, Group
...
@@ -163,6 +168,14 @@ public class GroupDetailServiceImpl extends ServiceImpl<GroupDetailMapper, Group
while
(
iterator
.
hasNext
())
{
while
(
iterator
.
hasNext
())
{
ExcelDataEntity
excelDataEntity
=
iterator
.
next
();
ExcelDataEntity
excelDataEntity
=
iterator
.
next
();
String
payer
=
excelDataEntity
.
getPayUserName
();
String
payee
=
excelDataEntity
.
getPayeeName
();
if
(
personMap
.
get
(
payer
)
==
null
||
personMap
.
get
(
payee
)
==
null
)
{
iterator
.
remove
();
continue
;
}
// 过滤付款人类型
// 过滤付款人类型
if
(
caseDTO
.
getPrincipal
()
!=
null
)
{
if
(
caseDTO
.
getPrincipal
()
!=
null
)
{
if
(
caseDTO
.
getPrincipal
()
==
1
&&
excelDataEntity
.
getPayeeName
().
contains
(
"公司"
))
{
if
(
caseDTO
.
getPrincipal
()
==
1
&&
excelDataEntity
.
getPayeeName
().
contains
(
"公司"
))
{
...
...
src/main/resources/com/platform/mapper/ExcelDataMapper.xml
View file @
3f245470
...
@@ -320,4 +320,38 @@
...
@@ -320,4 +320,38 @@
and
and
(ed.payee_name = #{payeeName} or ed.pay_user_name = #{payeeName})
(ed.payee_name = #{payeeName} or ed.pay_user_name = #{payeeName})
</select>
</select>
<select
id=
"queryListByGroupId"
resultType=
"com.platform.model.vo.ExcelDataVO"
>
select
ed.pay_user_name payUserName,
ed.payee_name payeeName,
SUM(ed.amount) amount,
COUNT(*) AS transactionCount,
Max(u.label) label
from
group_detail gd
left join
excel_data ed
on
gd.user_name = ed.pay_user_name or gd.user_name = ed.payee_name
left join
user u
on
gd.user_name = u.user_name
where
ed.use_flag = 1
and
ed.user_flag = 1
and
gd.group_id = #{groupId}
and
ed.case_id = #{id}
<if
test=
"startTime != null"
>
and time >= #{startTime}
</if>
<if
test=
"endTime != null"
>
and time
<
= #{endTime}
</if>
group by ed.pay_user_name,ed.payee_name
</select>
</mapper>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment