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
02465905
Commit
02465905
authored
Aug 06, 2025
by
zhuxiang
Browse files
Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # src/main/java/com/platform/service/ExcelDataService.java
parents
bc7e75ba
0d1758a7
Changes
7
Show whitespace changes
Inline
Side-by-side
src/main/java/com/platform/mapper/ExcelDataMapper.java
View file @
02465905
...
@@ -34,4 +34,6 @@ public interface ExcelDataMapper extends BaseMapper<ExcelDataEntity> {
...
@@ -34,4 +34,6 @@ public interface ExcelDataMapper extends BaseMapper<ExcelDataEntity> {
List
<
ExcelDataEntity
>
relationPage
(
@Param
(
"oneselfAccountList"
)
List
<
String
>
oneselfAccountList
,
@Param
(
"otherAccountList"
)
List
<
String
>
otherAccountList
);
List
<
ExcelDataEntity
>
relationPage
(
@Param
(
"oneselfAccountList"
)
List
<
String
>
oneselfAccountList
,
@Param
(
"otherAccountList"
)
List
<
String
>
otherAccountList
);
List
<
ExcelDataEntity
>
queryInfoList
(
CaseDTO
caseDTO
);
List
<
ExcelDataEntity
>
queryInfoList
(
CaseDTO
caseDTO
);
List
<
AssociationVO
>
queryAccountTemporary
(
@Param
(
"userName"
)
String
userName
,
@Param
(
"caseId"
)
String
caseId
);
List
<
ExcelDataEntity
>
accountCashFlow
(
UserDTO
userDTO
);
}
}
src/main/java/com/platform/model/dto/UserDTO.java
View file @
02465905
...
@@ -12,6 +12,9 @@ import java.util.List;
...
@@ -12,6 +12,9 @@ import java.util.List;
@Data
@Data
public
class
UserDTO
extends
UserEntity
{
public
class
UserDTO
extends
UserEntity
{
@ApiModelProperty
(
value
=
"1、查人 2、查账号"
)
private
String
identifier
;
private
List
<
UserAccountEntity
>
userAccountList
;
private
List
<
UserAccountEntity
>
userAccountList
;
@ApiModelProperty
(
value
=
"对方用户名"
)
@ApiModelProperty
(
value
=
"对方用户名"
)
...
@@ -30,6 +33,7 @@ public class UserDTO extends UserEntity {
...
@@ -30,6 +33,7 @@ public class UserDTO extends UserEntity {
private
String
otherName
;
private
String
otherName
;
private
String
oldName
;
private
String
oldName
;
private
String
newName
;
private
String
newName
;
}
}
src/main/java/com/platform/model/entity/ExcelDataEntity.java
View file @
02465905
...
@@ -49,7 +49,7 @@ public class ExcelDataEntity {
...
@@ -49,7 +49,7 @@ public class ExcelDataEntity {
@ApiModelProperty
(
"交易流水号"
)
@ApiModelProperty
(
"交易流水号"
)
private
String
serial
;
private
String
serial
;
@ApiModelProperty
(
"收款方银行卡所属银行
名称
"
)
@ApiModelProperty
(
"收款方银行卡所属银行
卡号
"
)
@TableField
(
"payee_bank_card"
)
@TableField
(
"payee_bank_card"
)
private
String
payeeBankCard
;
private
String
payeeBankCard
;
...
...
src/main/java/com/platform/service/ExcelDataService.java
View file @
02465905
...
@@ -59,5 +59,9 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
...
@@ -59,5 +59,9 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
List
<
ExcelDataEntity
>
queryListByPayUserName
(
ExcelDataDTO
excelDataDTO
);
List
<
ExcelDataEntity
>
queryListByPayUserName
(
ExcelDataDTO
excelDataDTO
);
List
<
ExcelDataEntity
>
queryListByPayeeName
(
String
oldName
,
String
caseId
);
List
<
AssociationVO
>
queryAccountTemporary
(
String
userName
,
String
caseId
);
List
<
ExcelDataEntity
>
accountCashFlow
(
UserDTO
userDTO
);
List
<
ExcelDataEntity
>
queryListByPayeeName
(
String
oldName
,
int
caseId
);
List
<
ExcelDataEntity
>
queryListByPayeeName
(
String
oldName
,
int
caseId
);
}
}
src/main/java/com/platform/service/impl/ExcelDataServiceImpl.java
View file @
02465905
...
@@ -106,4 +106,14 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
...
@@ -106,4 +106,14 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
.
eq
(
ExcelDataEntity:
:
getCaseId
,
caseId
)
.
eq
(
ExcelDataEntity:
:
getCaseId
,
caseId
)
.
eq
(
ExcelDataEntity:
:
getPayeeName
,
oldName
));
.
eq
(
ExcelDataEntity:
:
getPayeeName
,
oldName
));
}
}
@Override
public
List
<
AssociationVO
>
queryAccountTemporary
(
String
userName
,
String
caseId
)
{
return
baseMapper
.
queryAccountTemporary
(
userName
,
caseId
);
}
@Override
public
List
<
ExcelDataEntity
>
accountCashFlow
(
UserDTO
userDTO
)
{
return
baseMapper
.
accountCashFlow
(
userDTO
);
}
}
}
src/main/java/com/platform/service/impl/UserServiceImpl.java
View file @
02465905
...
@@ -24,6 +24,7 @@ import com.platform.service.UserRelationService;
...
@@ -24,6 +24,7 @@ import com.platform.service.UserRelationService;
import
com.platform.service.UserService
;
import
com.platform.service.UserService
;
import
com.platform.utils.DozerUtils
;
import
com.platform.utils.DozerUtils
;
import
com.platform.utils.IdCardUtils
;
import
com.platform.utils.IdCardUtils
;
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
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
...
@@ -44,10 +45,71 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -44,10 +45,71 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
@Override
@Override
public
UserVO
getDetail
(
String
userName
,
String
caseId
)
{
public
UserVO
getDetail
(
String
userName
,
String
caseId
)
{
UserEntity
userEntity
=
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
UserEntity
>()
UserEntity
userEntity
=
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
UserEntity
>()
.
eq
(
UserEntity:
:
getUserName
,
userName
));
.
eq
(
UserEntity:
:
getUserName
,
userName
)
.
eq
(
UserEntity:
:
getCaseId
,
caseId
)
);
if
(
ObjectUtils
.
isEmpty
(
userEntity
))
{
if
(
ObjectUtils
.
isEmpty
(
userEntity
))
{
return
null
;
return
account
(
userName
,
caseId
);
}
else
{
return
personnel
(
userName
,
caseId
,
userEntity
);
}
}
private
UserVO
account
(
String
userName
,
String
caseId
)
{
UserVO
userVO
=
new
UserVO
();
userVO
.
setUserName
(
userName
);
userVO
.
setCaseId
(
caseId
);
//本人账号数量
HashSet
<
String
>
account
=
Sets
.
newHashSet
();
//查询关联资金
List
<
AssociationVO
>
financialTransactions
=
excelDataService
.
queryAccountTemporary
(
userName
,
caseId
);
Map
<
String
,
List
<
AssociationVO
>>
detailsFunds
=
Maps
.
newHashMap
();
for
(
AssociationVO
financialTransaction
:
financialTransactions
)
{
if
(
financialTransaction
.
getDirection
().
equals
(
"出账"
))
{
if
(
detailsFunds
.
containsKey
(
financialTransaction
.
getPayee
()))
{
financialTransaction
.
setRelationDesc
(
detailsFunds
.
get
(
financialTransaction
.
getPayee
()).
size
()
+
"、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
+
financialTransaction
.
getPayee
()
+
"->"
+
financialTransaction
.
getPayment
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
detailsFunds
.
get
(
financialTransaction
.
getPayee
()).
add
(
financialTransaction
);
account
.
add
(
financialTransaction
.
getPayment
());
}
else
{
List
<
AssociationVO
>
list
=
new
ArrayList
<>();
financialTransaction
.
setRelationDesc
(
"1、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
+
financialTransaction
.
getPayee
()
+
"->"
+
financialTransaction
.
getPayment
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
list
.
add
(
financialTransaction
);
detailsFunds
.
put
(
financialTransaction
.
getPayee
(),
list
);
account
.
add
(
financialTransaction
.
getPayment
());
}
}
else
if
(
financialTransaction
.
getDirection
().
equals
(
"入账"
))
{
if
(
detailsFunds
.
containsKey
(
financialTransaction
.
getPayment
()))
{
financialTransaction
.
setRelationDesc
(
detailsFunds
.
get
(
financialTransaction
.
getPayment
()).
size
()
+
"、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
+
financialTransaction
.
getPayee
()
+
"->"
+
financialTransaction
.
getPayment
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
detailsFunds
.
get
(
financialTransaction
.
getPayment
()).
add
(
financialTransaction
);
account
.
add
(
financialTransaction
.
getPayee
());
}
else
{
List
<
AssociationVO
>
list
=
new
ArrayList
<>();
financialTransaction
.
setRelationDesc
(
"1、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
+
financialTransaction
.
getPayee
()
+
"->"
+
financialTransaction
.
getPayment
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
list
.
add
(
financialTransaction
);
detailsFunds
.
put
(
financialTransaction
.
getPayment
(),
list
);
account
.
add
(
financialTransaction
.
getPayee
());
}
}
}
//关联人员数量
userVO
.
setHeadcount
(
detailsFunds
.
size
());
//关联交易次数
int
quantity
=
0
;
for
(
AssociationVO
financialTransaction
:
financialTransactions
)
{
quantity
+=
financialTransaction
.
getNum
();
}
userVO
.
setQuantity
(
quantity
);
//本人账户数量
userVO
.
setAccountNum
(
account
.
size
());
//明细
userVO
.
setDetailsFunds
(
detailsFunds
);
return
userVO
;
}
}
@NotNull
private
UserVO
personnel
(
String
userName
,
String
caseId
,
UserEntity
userEntity
)
{
UserVO
userVO
=
DozerUtils
.
convertBean
(
userEntity
,
UserVO
.
class
);
UserVO
userVO
=
DozerUtils
.
convertBean
(
userEntity
,
UserVO
.
class
);
if
(
userVO
!=
null
)
{
if
(
userVO
!=
null
)
{
//查看用户账户列表
//查看用户账户列表
...
@@ -143,7 +205,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -143,7 +205,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
@Override
@Override
public
List
<
ExcelDataEntity
>
cashFlow
(
UserDTO
userDTO
)
{
public
List
<
ExcelDataEntity
>
cashFlow
(
UserDTO
userDTO
)
{
List
<
ExcelDataEntity
>
excelDataList
=
excelDataService
.
cashFlow
(
userDTO
);
List
<
ExcelDataEntity
>
excelDataList
=
null
;
if
(
"1"
.
equals
(
userDTO
.
getIdentifier
()))
{
excelDataList
=
excelDataService
.
cashFlow
(
userDTO
);
}
else
if
(
"2"
.
equals
(
userDTO
.
getIdentifier
()))
{
excelDataList
=
excelDataService
.
accountCashFlow
(
userDTO
);
}
else
{
return
null
;
}
for
(
ExcelDataEntity
excelDataEntity
:
excelDataList
)
{
for
(
ExcelDataEntity
excelDataEntity
:
excelDataList
)
{
if
(
"出账"
.
equals
(
excelDataEntity
.
getDirection
()))
{
if
(
"出账"
.
equals
(
excelDataEntity
.
getDirection
()))
{
excelDataEntity
.
setSelfAccount
(
excelDataEntity
.
getPayAccount
());
excelDataEntity
.
setSelfAccount
(
excelDataEntity
.
getPayAccount
());
...
...
src/main/resources/com/platform/mapper/ExcelDataMapper.xml
View file @
02465905
...
@@ -182,4 +182,54 @@
...
@@ -182,4 +182,54 @@
and u.label like concat('%',#{label},'%')
and u.label like concat('%',#{label},'%')
</if>
</if>
</select>
</select>
<select
id=
"queryAccountTemporary"
resultType=
"com.platform.model.vo.AssociationVO"
>
select
min(time) as startTime,
max(time) as endTime,
sum(amount) as totalAmount,
payee_account as payee,
payment_account as payment,
count(*) as num,
direction
from excel_data
where case_id = #{caseId}
and payee_name = #{userName}
group by
payee_account,
payment_account,
direction
</select>
<select
id=
"accountCashFlow"
resultType=
"com.platform.model.entity.ExcelDataEntity"
>
select id,
directory_id,
type,
direction,
time,
amount,
serial,
payee_bank_card,
payee_account,
payee_merchant,
payee_name,
payment_bank_name,
payment_bank_card,
payment_account,
ip,
mac,
external_channel,
pay_account,
remark,
case_id,
pay_user_name,
use_flag,
file_id
from excel_data
where case_id = #{caseId}
and payee_name = #{userName}
and (
payee_account = #{otherUserName}
or
payment_account = #{otherUserName}
)
</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