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
8eedeb12
Commit
8eedeb12
authored
Aug 03, 2025
by
zhuxiang
Browse files
优化
parent
9589e2d2
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/platform/model/dto/CaseDTO.java
View file @
8eedeb12
...
...
@@ -40,8 +40,6 @@ public class CaseDTO extends CasesEntity {
private
String
payUserName
;
private
String
fileName
;
private
String
nodeName
;
private
String
label
;
...
...
src/main/java/com/platform/model/vo/EdgeVO.java
View file @
8eedeb12
...
...
@@ -11,8 +11,12 @@ public class EdgeVO {
private
String
source
;
private
String
sourceType
;
private
String
target
;
private
String
targetType
;
private
String
relation
;
// 总汇款笔数
private
int
totalTransactions
;
...
...
@@ -30,7 +34,13 @@ public class EdgeVO {
public
EdgeVO
(
String
source
,
String
target
,
int
totalTransactions
,
double
totalAmount
,
String
groupId
,
String
ip
,
String
mac
,
String
account
)
{
this
.
source
=
source
;
this
.
sourceType
=
"个人"
;
this
.
target
=
target
;
if
(
target
.
contains
(
"公司"
))
{
this
.
targetType
=
"银联"
;
}
else
{
this
.
targetType
=
"个人"
;
}
this
.
totalTransactions
=
totalTransactions
;
this
.
totalAmount
=
totalAmount
;
this
.
groupId
=
groupId
;
...
...
@@ -42,7 +52,13 @@ public class EdgeVO {
public
EdgeVO
(
String
id
,
String
source
,
String
target
,
int
totalTransactions
,
double
totalAmount
)
{
this
.
id
=
id
;
this
.
source
=
source
;
this
.
sourceType
=
"个人"
;
this
.
target
=
target
;
if
(
target
.
contains
(
"公司"
))
{
this
.
targetType
=
"银联"
;
}
else
{
this
.
targetType
=
"个人"
;
}
this
.
totalTransactions
=
totalTransactions
;
this
.
totalAmount
=
totalAmount
;
}
...
...
src/main/java/com/platform/model/vo/NodeVO.java
View file @
8eedeb12
...
...
@@ -7,6 +7,14 @@ public class NodeVO {
private
String
node
;
private
int
nodeNum
;
private
String
label
;
private
String
nodeType
;
private
String
bankCode
;
private
int
degree
;
public
NodeVO
(
String
node
)
{
...
...
src/main/java/com/platform/service/CasesService.java
View file @
8eedeb12
...
...
@@ -7,6 +7,7 @@ import com.platform.model.entity.CasesEntity;
import
com.platform.model.vo.CaseVO
;
import
com.platform.model.vo.ExcelDataVO
;
import
com.platform.model.vo.GraphVO
;
import
com.platform.model.vo.NodeVO
;
import
java.util.List
;
...
...
@@ -58,7 +59,7 @@ public interface CasesService extends IService<CasesEntity> {
*/
GraphVO
draw
(
CaseDTO
caseDTO
);
List
<
ExcelData
VO
>
info
(
CaseDTO
caseDTO
);
List
<
Node
VO
>
info
(
CaseDTO
caseDTO
);
/**
* 新增编辑
...
...
src/main/java/com/platform/service/UserService.java
View file @
8eedeb12
...
...
@@ -6,7 +6,6 @@ import com.platform.model.entity.ExcelDataEntity;
import
com.platform.model.entity.UserEntity
;
import
com.platform.model.vo.EveryoneVO
;
import
com.platform.model.vo.UserVO
;
import
com.sun.org.apache.xpath.internal.operations.Bool
;
import
java.util.List
;
...
...
src/main/java/com/platform/service/impl/CaseServiceImpl.java
View file @
8eedeb12
...
...
@@ -370,7 +370,7 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
}
@Override
public
List
<
ExcelData
VO
>
info
(
CaseDTO
caseDTO
)
{
public
List
<
Node
VO
>
info
(
CaseDTO
caseDTO
)
{
// 使用Set去重
Set
<
String
>
uniqueNodes
=
new
HashSet
<>();
// 使用Map来统计每个人关联的节点数量
...
...
@@ -426,7 +426,25 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
}
}
}
return
groupedObjects
;
List
<
NodeVO
>
result
=
Lists
.
newArrayList
();
groupedObjects
.
forEach
(
excelDataVO
->{
NodeVO
person
=
new
NodeVO
();
person
.
setNode
(
excelDataVO
.
getPayUserName
());
person
.
setNodeNum
(
excelDataVO
.
getNodeNum
());
person
.
setLabel
(
excelDataVO
.
getLabel
());
person
.
setNodeType
(
"个人"
);
result
.
add
(
person
);
NodeVO
org
=
new
NodeVO
();
if
(
StringUtils
.
isNotBlank
(
excelDataVO
.
getPayeeName
())
&&
excelDataVO
.
getPayeeName
().
contains
(
"公司"
)){
org
.
setNode
(
excelDataVO
.
getPayeeName
());
org
.
setNodeNum
(
excelDataVO
.
getNodeNum
());
org
.
setBankCode
(
excelDataVO
.
getPayeeBankCard
());
org
.
setNodeType
(
"银联"
);
result
.
add
(
org
);
}
});
return
result
;
}
// 节点过滤逻辑
...
...
src/main/resources/com/platform/mapper/ExcelDataMapper.xml
View file @
8eedeb12
...
...
@@ -21,10 +21,7 @@
and ed.id = #{id}
</if>
<if
test=
"payUserName != null and payUserName != ''"
>
and ed.pay_user_name like concat('%',#{payUserName},'%')
</if>
<if
test=
"fileName != null and fileName != ''"
>
and fu.file_name like concat('%',#{fileName},'%')
and (ed.pay_user_name like concat('%',#{payUserName},'%') or fu.file_name like concat('%',#{fileName},'%')
</if>
</where>
group by
...
...
@@ -46,7 +43,7 @@
and
case_id = #{id}
<if
test=
"startTime != null and endTime != ''"
>
and time
betwenn
#{startTime} and #{endTime}
and time
BETWEEN
#{startTime} and #{endTime}
</if>
</select>
<select
id=
"selectFinancialTransactions"
resultType=
"com.platform.model.vo.AssociationVO"
>
...
...
@@ -72,6 +69,7 @@
ed.pay_user_name,
ed.payee_name payeeName,
ed.remark,
ed.payee_bank_card,
ed.external_channel,
ed.amount,
u.label
...
...
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