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
50b142a8
Commit
50b142a8
authored
Oct 13, 2025
by
zhuxiang
Browse files
Merge remote-tracking branch 'origin/dev' into dev
parents
692bd8a3
b2e10d81
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/platform/model/vo/AssociationVO.java
View file @
50b142a8
...
@@ -45,4 +45,6 @@ public class AssociationVO {
...
@@ -45,4 +45,6 @@ public class AssociationVO {
private
String
payeeName
;
private
String
payeeName
;
private
String
payUserName
;
private
String
payUserName
;
private
String
paymentBankName
;
private
String
paymentAccount
;
}
}
src/main/java/com/platform/service/impl/UserServiceImpl.java
View file @
50b142a8
...
@@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil;
...
@@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.map.MapUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.github.pagehelper.PageHelper
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
...
@@ -20,6 +19,7 @@ import com.platform.model.vo.UserVO;
...
@@ -20,6 +19,7 @@ import com.platform.model.vo.UserVO;
import
com.platform.service.*
;
import
com.platform.service.*
;
import
com.platform.utils.DozerUtils
;
import
com.platform.utils.DozerUtils
;
import
com.platform.utils.IdCardUtils
;
import
com.platform.utils.IdCardUtils
;
import
com.platform.utils.StringUtils
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.NotNull
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -114,6 +114,17 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -114,6 +114,17 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
if
(
userVO
!=
null
)
{
if
(
userVO
!=
null
)
{
//查看用户账户列表
//查看用户账户列表
List
<
UserAccountEntity
>
userAccountEntityList
=
userAccountService
.
queryListByUserName
(
userDTO
.
getUserName
());
List
<
UserAccountEntity
>
userAccountEntityList
=
userAccountService
.
queryListByUserName
(
userDTO
.
getUserName
());
if
(
userAccountEntityList
.
isEmpty
())
{
List
<
AssociationVO
>
financialTransactions
=
excelDataService
.
queryAccountTemporary
(
userDTO
);
for
(
AssociationVO
financialTransaction
:
financialTransactions
)
{
userAccountEntityList
.
add
(
UserAccountEntity
.
builder
()
.
userName
(
userDTO
.
getUserName
())
.
account
(
financialTransaction
.
getPaymentBankName
())
.
caseId
(
userDTO
.
getCaseId
())
.
code
(
financialTransaction
.
getPaymentAccount
())
.
build
());
}
}
userVO
.
setUserAccountList
(
userAccountEntityList
);
userVO
.
setUserAccountList
(
userAccountEntityList
);
}
}
List
<
UserRelationEntity
>
relationShipList
=
userRelationService
.
list
(
new
LambdaQueryWrapper
<
UserRelationEntity
>()
List
<
UserRelationEntity
>
relationShipList
=
userRelationService
.
list
(
new
LambdaQueryWrapper
<
UserRelationEntity
>()
...
@@ -127,32 +138,37 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -127,32 +138,37 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
List
<
AssociationVO
>
financialTransactions
=
excelDataService
.
selectFinancialTransactions
(
userDTO
);
List
<
AssociationVO
>
financialTransactions
=
excelDataService
.
selectFinancialTransactions
(
userDTO
);
Map
<
String
,
List
<
AssociationVO
>>
detailsFunds
=
Maps
.
newHashMap
();
Map
<
String
,
List
<
AssociationVO
>>
detailsFunds
=
Maps
.
newHashMap
();
for
(
AssociationVO
financialTransaction
:
financialTransactions
)
{
for
(
AssociationVO
financialTransaction
:
financialTransactions
)
{
String
name
=
financialTransaction
.
getPayeeName
().
equals
(
userDTO
.
getUserName
())
?
financialTransaction
.
getPayUserName
()
:
financialTransaction
.
getPayeeName
();
// Handle potential null keys
if
(
name
==
null
)
{
name
=
"未知用户"
;
}
if
(
"出账"
.
equals
(
financialTransaction
.
getDirection
()))
{
if
(
"出账"
.
equals
(
financialTransaction
.
getDirection
()))
{
if
(
detailsFunds
.
containsKey
(
financialTransaction
.
getPayeeName
()
))
{
if
(
detailsFunds
.
containsKey
(
name
))
{
financialTransaction
.
setRelationDesc
(
detailsFunds
.
get
(
financialTransaction
.
getPayeeName
()).
size
()
+
"、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
financialTransaction
.
setRelationDesc
(
detailsFunds
.
get
(
financialTransaction
.
getPayeeName
()).
size
()
+
"、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
+
financialTransaction
.
getPayeeName
()
+
"->"
+
financialTransaction
.
getPayUserName
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
+
financialTransaction
.
getPayeeName
()
+
"->"
+
financialTransaction
.
getPayUserName
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
detailsFunds
.
get
(
financialTransaction
.
getPayeeName
()
).
add
(
financialTransaction
);
detailsFunds
.
get
(
name
).
add
(
financialTransaction
);
account
.
add
(
financialTransaction
.
getPayUserName
());
account
.
add
(
financialTransaction
.
getPayUserName
());
}
else
{
}
else
{
List
<
AssociationVO
>
list
=
new
ArrayList
<>();
List
<
AssociationVO
>
list
=
new
ArrayList
<>();
financialTransaction
.
setRelationDesc
(
"1、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
financialTransaction
.
setRelationDesc
(
"1、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
+
financialTransaction
.
getPayeeName
()
+
"->"
+
financialTransaction
.
getPayUserName
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
+
financialTransaction
.
getPayeeName
()
+
"->"
+
financialTransaction
.
getPayUserName
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
list
.
add
(
financialTransaction
);
list
.
add
(
financialTransaction
);
detailsFunds
.
put
(
financialTransaction
.
getPayeeName
()
,
list
);
detailsFunds
.
put
(
name
,
list
);
account
.
add
(
financialTransaction
.
getPayUserName
());
account
.
add
(
financialTransaction
.
getPayUserName
());
}
}
}
else
if
(
"入账"
.
equals
(
financialTransaction
.
getDirection
()))
{
}
else
if
(
"入账"
.
equals
(
financialTransaction
.
getDirection
()))
{
if
(
detailsFunds
.
containsKey
(
financialTransaction
.
getPayUserName
()
))
{
if
(
detailsFunds
.
containsKey
(
name
))
{
financialTransaction
.
setRelationDesc
(
detailsFunds
.
get
(
financialTransaction
.
getPayUserName
()).
size
()
+
"、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
financialTransaction
.
setRelationDesc
(
detailsFunds
.
get
(
financialTransaction
.
getPayUserName
()).
size
()
+
"、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
+
financialTransaction
.
getPayeeName
()
+
"<-"
+
financialTransaction
.
getPayUserName
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
+
financialTransaction
.
getPayeeName
()
+
"<-"
+
financialTransaction
.
getPayUserName
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
detailsFunds
.
get
(
financialTransaction
.
getPayUserName
()
).
add
(
financialTransaction
);
detailsFunds
.
get
(
name
).
add
(
financialTransaction
);
account
.
add
(
financialTransaction
.
getPayeeName
());
account
.
add
(
financialTransaction
.
getPayeeName
());
}
else
{
}
else
{
List
<
AssociationVO
>
list
=
new
ArrayList
<>();
List
<
AssociationVO
>
list
=
new
ArrayList
<>();
financialTransaction
.
setRelationDesc
(
"1、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
financialTransaction
.
setRelationDesc
(
"1、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
+
financialTransaction
.
getPayeeName
()
+
"<-"
+
financialTransaction
.
getPayUserName
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
+
financialTransaction
.
getPayeeName
()
+
"<-"
+
financialTransaction
.
getPayUserName
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
list
.
add
(
financialTransaction
);
list
.
add
(
financialTransaction
);
detailsFunds
.
put
(
financialTransaction
.
getPayeeName
()
,
list
);
detailsFunds
.
put
(
name
,
list
);
account
.
add
(
financialTransaction
.
getPayeeName
());
account
.
add
(
financialTransaction
.
getPayeeName
());
}
}
}
}
...
@@ -230,6 +246,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -230,6 +246,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
@Override
@Override
public
List
<
ExcelDataEntity
>
cashFlow
(
UserDTO
userDTO
)
{
public
List
<
ExcelDataEntity
>
cashFlow
(
UserDTO
userDTO
)
{
String
userName
=
userDTO
.
getUserName
();
String
otherUserName
=
userDTO
.
getOtherUserName
();
CaseRuleConfigEntity
byCaseId
=
caseRuleConfigService
.
getByCaseId
(
userDTO
.
getCaseId
());
CaseRuleConfigEntity
byCaseId
=
caseRuleConfigService
.
getByCaseId
(
userDTO
.
getCaseId
());
userDTO
.
setMinTransaction
(
byCaseId
.
getMinTransaction
());
userDTO
.
setMinTransaction
(
byCaseId
.
getMinTransaction
());
userDTO
.
setMaxTransaction
(
byCaseId
.
getMaxTransaction
());
userDTO
.
setMaxTransaction
(
byCaseId
.
getMaxTransaction
());
...
@@ -245,6 +263,19 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -245,6 +263,19 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
excelDataEntity
.
setAssociationAccount
(
excelDataEntity
.
getPayAccount
());
excelDataEntity
.
setAssociationAccount
(
excelDataEntity
.
getPayAccount
());
}
}
}
}
userDTO
.
setUserName
(
otherUserName
);
userDTO
.
setOtherUserName
(
userName
);
List
<
ExcelDataEntity
>
excelDataList1
=
excelDataService
.
cashFlow
(
userDTO
);
for
(
ExcelDataEntity
excelDataEntity
:
excelDataList1
)
{
if
(
"入账"
.
equals
(
excelDataEntity
.
getDirection
()))
{
excelDataEntity
.
setSelfAccount
(
excelDataEntity
.
getPayAccount
());
excelDataEntity
.
setAssociationAccount
(
excelDataEntity
.
getPayeeAccount
());
}
else
if
(
"出账"
.
equals
(
excelDataEntity
.
getDirection
()))
{
excelDataEntity
.
setSelfAccount
(
excelDataEntity
.
getPayeeAccount
());
excelDataEntity
.
setAssociationAccount
(
excelDataEntity
.
getPayAccount
());
}
}
excelDataList
.
addAll
(
excelDataList1
);
return
excelDataList
;
return
excelDataList
;
}
}
...
...
src/main/resources/application.yml
View file @
50b142a8
...
@@ -6,7 +6,7 @@ spring:
...
@@ -6,7 +6,7 @@ spring:
username
:
root
username
:
root
password
:
admin123456
password
:
admin123456
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://127.0.0.1:330
6
/relation?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
url
:
jdbc:mysql://127.0.0.1:330
7
/relation?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
#spring:
#spring:
# datasource:
# datasource:
...
...
src/main/resources/com/platform/mapper/ExcelDataMapper.xml
View file @
50b142a8
...
@@ -251,6 +251,8 @@
...
@@ -251,6 +251,8 @@
sum(amount) as totalAmount,
sum(amount) as totalAmount,
payee_name as payeeName,
payee_name as payeeName,
pay_user_name as payUserName,
pay_user_name as payUserName,
payment_bank_name as paymentBankName,
payment_account as paymentAccount,
count(*) as num,
count(*) as num,
direction
direction
from excel_data
from excel_data
...
@@ -265,7 +267,9 @@
...
@@ -265,7 +267,9 @@
group by
group by
payee_name,
payee_name,
pay_user_name,
pay_user_name,
direction
direction,
payment_bank_name,
payment_account
HAVING 1=1
HAVING 1=1
<if
test=
"minAmount != null"
>
<if
test=
"minAmount != null"
>
and sum(amount) >= #{minAmount}
and sum(amount) >= #{minAmount}
...
...
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