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
7a585a64
"...platform/git@gitlab.ruzhoukj.com:wujipeng/relation.git" did not exist on "81020ede6a2bea2aa1cb557dc818740772f4eb47"
Commit
7a585a64
authored
Aug 05, 2025
by
zhuxiang
Browse files
增加商户转个人接口
parent
70d1ca13
Changes
12
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/platform/controller/CaseController.java
View file @
7a585a64
...
@@ -2,6 +2,7 @@ package com.platform.controller;
...
@@ -2,6 +2,7 @@ package com.platform.controller;
import
com.platform.model.dto.CaseDTO
;
import
com.platform.model.dto.CaseDTO
;
import
com.platform.model.dto.ExcelDataDTO
;
import
com.platform.model.dto.ExcelDataDTO
;
import
com.platform.model.dto.UserDTO
;
import
com.platform.model.resp.Result
;
import
com.platform.model.resp.Result
;
import
com.platform.model.vo.CaseVO
;
import
com.platform.model.vo.CaseVO
;
import
com.platform.page.TableDataInfo
;
import
com.platform.page.TableDataInfo
;
...
@@ -91,4 +92,9 @@ public class CaseController extends BaseController {
...
@@ -91,4 +92,9 @@ public class CaseController extends BaseController {
public
Result
info
(
@RequestBody
CaseDTO
caseDTO
)
{
public
Result
info
(
@RequestBody
CaseDTO
caseDTO
)
{
return
Result
.
data
(
caseService
.
info
(
caseDTO
));
return
Result
.
data
(
caseService
.
info
(
caseDTO
));
}
}
@PutMapping
(
"/updateMerchantToPerson"
)
public
Result
updateMerchantToPerson
(
@RequestBody
UserDTO
userDTO
)
{
return
Result
.
data
(
caseService
.
updateMerchantToPerson
(
userDTO
));
}
}
}
src/main/java/com/platform/controller/GroupController.java
View file @
7a585a64
package
com.platform.controller
;
package
com.platform.controller
;
import
com.platform.model.dto.GroupDetailDTO
;
import
com.platform.model.dto.GroupDetailDTO
;
import
com.platform.model.entity.GroupEntity
;
import
com.platform.model.resp.Result
;
import
com.platform.model.resp.Result
;
import
com.platform.page.TableDataInfo
;
import
com.platform.page.TableDataInfo
;
import
com.platform.service.GroupDetailService
;
import
com.platform.service.GroupDetailService
;
import
com.platform.service.GroupService
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -12,6 +14,8 @@ import javax.annotation.Resource;
...
@@ -12,6 +14,8 @@ import javax.annotation.Resource;
@RequestMapping
(
"/group"
)
@RequestMapping
(
"/group"
)
public
class
GroupController
extends
BaseController
{
public
class
GroupController
extends
BaseController
{
@Resource
private
GroupService
groupService
;
@Resource
@Resource
private
GroupDetailService
groupDetailService
;
private
GroupDetailService
groupDetailService
;
...
@@ -48,4 +52,8 @@ public class GroupController extends BaseController {
...
@@ -48,4 +52,8 @@ public class GroupController extends BaseController {
return
Result
.
data
(
groupDetailService
.
draw
(
groupId
));
return
Result
.
data
(
groupDetailService
.
draw
(
groupId
));
}
}
@PutMapping
(
"/update/groupName"
)
public
Result
updateGroupName
(
@RequestBody
GroupEntity
groupEntity
)
{
return
Result
.
data
(
groupService
.
updateGroupName
(
groupEntity
));
}
}
}
src/main/java/com/platform/model/dto/UserDTO.java
View file @
7a585a64
...
@@ -29,4 +29,7 @@ public class UserDTO extends UserEntity {
...
@@ -29,4 +29,7 @@ public class UserDTO extends UserEntity {
@ApiModelProperty
(
value
=
"对方id"
)
@ApiModelProperty
(
value
=
"对方id"
)
private
String
otherName
;
private
String
otherName
;
private
String
oldName
;
private
String
newName
;
}
}
src/main/java/com/platform/service/CasesService.java
View file @
7a585a64
...
@@ -3,9 +3,9 @@ package com.platform.service;
...
@@ -3,9 +3,9 @@ package com.platform.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.platform.model.dto.CaseDTO
;
import
com.platform.model.dto.CaseDTO
;
import
com.platform.model.dto.ExcelDataDTO
;
import
com.platform.model.dto.ExcelDataDTO
;
import
com.platform.model.dto.UserDTO
;
import
com.platform.model.entity.CasesEntity
;
import
com.platform.model.entity.CasesEntity
;
import
com.platform.model.vo.CaseVO
;
import
com.platform.model.vo.CaseVO
;
import
com.platform.model.vo.ExcelDataVO
;
import
com.platform.model.vo.GraphVO
;
import
com.platform.model.vo.GraphVO
;
import
com.platform.model.vo.NodeVO
;
import
com.platform.model.vo.NodeVO
;
...
@@ -78,4 +78,6 @@ public interface CasesService extends IService<CasesEntity> {
...
@@ -78,4 +78,6 @@ public interface CasesService extends IService<CasesEntity> {
Boolean
removeBatchCase
(
List
<
String
>
ids
);
Boolean
removeBatchCase
(
List
<
String
>
ids
);
boolean
updateUserUse
(
ExcelDataDTO
excelDataDTO
);
boolean
updateUserUse
(
ExcelDataDTO
excelDataDTO
);
boolean
updateMerchantToPerson
(
UserDTO
userDTO
);
}
}
src/main/java/com/platform/service/ExcelDataService.java
View file @
7a585a64
...
@@ -58,4 +58,6 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
...
@@ -58,4 +58,6 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
List
<
ExcelDataEntity
>
queryInfoList
(
CaseDTO
caseDTO
);
List
<
ExcelDataEntity
>
queryInfoList
(
CaseDTO
caseDTO
);
List
<
ExcelDataEntity
>
queryListByPayUserName
(
ExcelDataDTO
excelDataDTO
);
List
<
ExcelDataEntity
>
queryListByPayUserName
(
ExcelDataDTO
excelDataDTO
);
List
<
ExcelDataEntity
>
queryListByPayeeName
(
String
oldName
,
String
caseId
);
}
}
src/main/java/com/platform/service/GroupService.java
View file @
7a585a64
...
@@ -11,4 +11,6 @@ public interface GroupService extends IService<GroupEntity> {
...
@@ -11,4 +11,6 @@ public interface GroupService extends IService<GroupEntity> {
void
saveGroup
(
int
id
,
List
<
GroupVO
>
groups
);
void
saveGroup
(
int
id
,
List
<
GroupVO
>
groups
);
List
<
GroupVO
>
queryByCaseId
(
Integer
id
);
List
<
GroupVO
>
queryByCaseId
(
Integer
id
);
boolean
updateGroupName
(
GroupEntity
groupEntity
);
}
}
src/main/java/com/platform/service/UserService.java
View file @
7a585a64
...
@@ -30,4 +30,8 @@ public interface UserService extends IService<UserEntity> {
...
@@ -30,4 +30,8 @@ public interface UserService extends IService<UserEntity> {
EveryoneVO
relationPage
(
UserDTO
userDTO
);
EveryoneVO
relationPage
(
UserDTO
userDTO
);
Boolean
delete
(
String
userName
);
Boolean
delete
(
String
userName
);
UserEntity
getByUserName
(
String
newName
);
List
<
String
>
queryListByCaseId
(
Integer
id
);
}
}
src/main/java/com/platform/service/impl/CaseServiceImpl.java
View file @
7a585a64
...
@@ -5,10 +5,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -5,10 +5,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.platform.mapper.CaseMapper
;
import
com.platform.mapper.CaseMapper
;
import
com.platform.model.dto.CaseDTO
;
import
com.platform.model.dto.CaseDTO
;
import
com.platform.model.dto.ExcelDataDTO
;
import
com.platform.model.dto.ExcelDataDTO
;
import
com.platform.model.entity.CasesEntity
;
import
com.platform.model.dto.UserDTO
;
import
com.platform.model.entity.ExcelDataEntity
;
import
com.platform.model.entity.*
;
import
com.platform.model.entity.GroupDetailEntity
;
import
com.platform.model.entity.UserRelationEntity
;
import
com.platform.model.vo.*
;
import
com.platform.model.vo.*
;
import
com.platform.service.*
;
import
com.platform.service.*
;
import
com.platform.utils.StringUtils
;
import
com.platform.utils.StringUtils
;
...
@@ -23,6 +21,8 @@ import java.util.stream.Collectors;
...
@@ -23,6 +21,8 @@ import java.util.stream.Collectors;
@Service
@Service
public
class
CaseServiceImpl
extends
ServiceImpl
<
CaseMapper
,
CasesEntity
>
implements
CasesService
{
public
class
CaseServiceImpl
extends
ServiceImpl
<
CaseMapper
,
CasesEntity
>
implements
CasesService
{
@Resource
private
UserService
userService
;
@Resource
@Resource
private
NodeService
nodeService
;
private
NodeService
nodeService
;
@Resource
@Resource
...
@@ -38,15 +38,22 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
...
@@ -38,15 +38,22 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
@Override
@Override
public
List
<
CaseVO
>
queryDataList
(
CaseDTO
caseDTO
)
{
public
List
<
CaseVO
>
queryDataList
(
CaseDTO
caseDTO
)
{
//查看案件关联的用户
List
<
String
>
userList
=
userService
.
queryListByCaseId
(
caseDTO
.
getId
());
//查看案件所有的excelData
//查看案件所有的excelData
List
<
ExcelDataVO
>
excelDataEntityList
=
excelDataService
.
queryByCaseId
(
caseDTO
);
List
<
ExcelDataVO
>
excelDataEntityList
=
excelDataService
.
queryByCaseId
(
caseDTO
);
excelDataEntityList
.
forEach
(
excelDataEntity
->
{
excelDataEntityList
.
forEach
(
excelDataEntity
->
{
if
(
StringUtils
.
isNull
(
excelDataEntity
.
getPayUserName
()))
{
if
(
StringUtils
.
isNull
(
excelDataEntity
.
getPayUserName
()))
{
excelDataEntity
.
setPayUserName
(
"无对应人员的数据"
);
excelDataEntity
.
setPayUserName
(
"无对应人员的数据"
);
}
}
});
});
Map
<
String
,
List
<
ExcelDataVO
>>
groupedMap
=
new
HashMap
<>();
// 调用分组方法
// 调用分组方法
Map
<
String
,
List
<
ExcelDataVO
>>
groupedMap
=
groupByPayUserName
(
excelDataEntityList
);
userList
.
forEach
(
userName
->
groupedMap
.
put
(
userName
,
Lists
.
newArrayList
()));
groupByPayUserName
(
groupedMap
,
excelDataEntityList
);
//初始化集合
//初始化集合
List
<
CaseVO
>
caseVOList
=
Lists
.
newArrayList
();
List
<
CaseVO
>
caseVOList
=
Lists
.
newArrayList
();
//遍历groupedMap
//遍历groupedMap
...
@@ -382,6 +389,29 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
...
@@ -382,6 +389,29 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
return
excelDataService
.
updateBatchById
(
excelDataEntityList
);
return
excelDataService
.
updateBatchById
(
excelDataEntityList
);
}
}
@Override
public
boolean
updateMerchantToPerson
(
UserDTO
userDTO
)
{
List
<
ExcelDataEntity
>
excelDataEntityList
=
excelDataService
.
queryListByPayeeName
(
userDTO
.
getOldName
(),
userDTO
.
getCaseId
());
if
(
CollUtil
.
isNotEmpty
(
excelDataEntityList
))
{
excelDataEntityList
.
forEach
(
excelDataEntity
->
excelDataEntity
.
setPayeeName
(
userDTO
.
getNewName
()));
excelDataService
.
updateBatchById
(
excelDataEntityList
);
}
//格局新名查看用户数据
UserEntity
userEntity
=
userService
.
getByUserName
(
userDTO
.
getNewName
());
if
(
userEntity
==
null
)
{
//新增用户
userEntity
=
new
UserEntity
();
userEntity
.
setUserName
(
userDTO
.
getNewName
());
userEntity
.
setSex
(
userDTO
.
getSex
());
userEntity
.
setIdCard
(
userDTO
.
getIdCard
());
userEntity
.
setBasicInfo
(
userDTO
.
getBasicInfo
());
userEntity
.
setAge
(
userDTO
.
getAge
());
userEntity
.
setCaseId
(
userDTO
.
getCaseId
());
userService
.
save
(
userEntity
);
}
return
false
;
}
@Override
@Override
public
List
<
NodeVO
>
info
(
CaseDTO
caseDTO
)
{
public
List
<
NodeVO
>
info
(
CaseDTO
caseDTO
)
{
// 使用Set去重
// 使用Set去重
...
@@ -483,9 +513,8 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
...
@@ -483,9 +513,8 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
members
.
contains
(
edge
.
getTarget
()));
members
.
contains
(
edge
.
getTarget
()));
}
}
private
Map
<
String
,
List
<
ExcelDataVO
>>
groupByPayUserName
(
List
<
ExcelDataVO
>
excelDataVOList
)
{
private
Map
<
String
,
List
<
ExcelDataVO
>>
groupByPayUserName
(
Map
<
String
,
List
<
ExcelDataVO
>>
groupedMap
,
Map
<
String
,
List
<
ExcelDataVO
>>
groupedMap
=
new
HashMap
<>();
List
<
ExcelDataVO
>
excelDataVOList
)
{
for
(
ExcelDataVO
obj
:
excelDataVOList
)
{
for
(
ExcelDataVO
obj
:
excelDataVOList
)
{
String
key
=
obj
.
getPayUserName
();
// 获取A字段的值作为键
String
key
=
obj
.
getPayUserName
();
// 获取A字段的值作为键
if
(!
groupedMap
.
containsKey
(
key
))
{
if
(!
groupedMap
.
containsKey
(
key
))
{
...
...
src/main/java/com/platform/service/impl/ExcelDataServiceImpl.java
View file @
7a585a64
...
@@ -99,4 +99,11 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
...
@@ -99,4 +99,11 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
.
eq
(
ExcelDataEntity:
:
getCaseId
,
excelDataDTO
.
getCaseId
())
.
eq
(
ExcelDataEntity:
:
getCaseId
,
excelDataDTO
.
getCaseId
())
.
eq
(
ExcelDataEntity:
:
getPayUserName
,
excelDataDTO
.
getPayUserName
()));
.
eq
(
ExcelDataEntity:
:
getPayUserName
,
excelDataDTO
.
getPayUserName
()));
}
}
@Override
public
List
<
ExcelDataEntity
>
queryListByPayeeName
(
String
oldName
,
String
caseId
)
{
return
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
ExcelDataEntity
>()
.
eq
(
ExcelDataEntity:
:
getCaseId
,
caseId
)
.
eq
(
ExcelDataEntity:
:
getPayeeName
,
oldName
));
}
}
}
src/main/java/com/platform/service/impl/GroupServiceImpl.java
View file @
7a585a64
...
@@ -29,11 +29,11 @@ public class GroupServiceImpl extends ServiceImpl<GroupMapper, GroupEntity> impl
...
@@ -29,11 +29,11 @@ public class GroupServiceImpl extends ServiceImpl<GroupMapper, GroupEntity> impl
groupDetailService
.
remove
(
new
LambdaQueryWrapper
<
GroupDetailEntity
>()
groupDetailService
.
remove
(
new
LambdaQueryWrapper
<
GroupDetailEntity
>()
.
eq
(
GroupDetailEntity:
:
getCaseId
,
id
));
.
eq
(
GroupDetailEntity:
:
getCaseId
,
id
));
//保存新的案例团体和
//保存新的案例团体和
groups
.
forEach
(
groupVO
->
{
for
(
int
i
=
0
;
i
<
groups
.
size
();
i
++)
{
//初始化团体实体
GroupVO
groupVO
=
groups
.
get
(
i
);
GroupEntity
groupEntity
=
new
GroupEntity
();
GroupEntity
groupEntity
=
new
GroupEntity
();
groupEntity
.
setGroupSize
(
groupVO
.
getGroupSize
());
groupEntity
.
setGroupSize
(
groupVO
.
getGroupSize
());
groupEntity
.
setGroupName
(
groupVO
.
getGroupName
()
);
groupEntity
.
setGroupName
(
"团体"
+
1
);
groupEntity
.
setCaseId
(
id
);
groupEntity
.
setCaseId
(
id
);
groupEntity
.
setTotalAmount
(
groupVO
.
getTotalAmount
());
groupEntity
.
setTotalAmount
(
groupVO
.
getTotalAmount
());
groupEntity
.
setTotalTransactions
(
groupVO
.
getTotalTransactions
());
groupEntity
.
setTotalTransactions
(
groupVO
.
getTotalTransactions
());
...
@@ -49,7 +49,7 @@ public class GroupServiceImpl extends ServiceImpl<GroupMapper, GroupEntity> impl
...
@@ -49,7 +49,7 @@ public class GroupServiceImpl extends ServiceImpl<GroupMapper, GroupEntity> impl
groupDetailService
.
saveBatch
(
groupDetailList
);
groupDetailService
.
saveBatch
(
groupDetailList
);
}
}
groupVO
.
setGroupDetailList
(
null
);
groupVO
.
setGroupDetailList
(
null
);
}
);
}
}
}
@Override
@Override
...
@@ -57,4 +57,15 @@ public class GroupServiceImpl extends ServiceImpl<GroupMapper, GroupEntity> impl
...
@@ -57,4 +57,15 @@ public class GroupServiceImpl extends ServiceImpl<GroupMapper, GroupEntity> impl
return
DozerUtils
.
convertList
(
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
GroupEntity
>()
return
DozerUtils
.
convertList
(
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
GroupEntity
>()
.
eq
(
GroupEntity:
:
getCaseId
,
id
)),
GroupVO
.
class
);
.
eq
(
GroupEntity:
:
getCaseId
,
id
)),
GroupVO
.
class
);
}
}
@Override
public
boolean
updateGroupName
(
GroupEntity
groupEntity
)
{
//查看信息
GroupEntity
groupEntityNew
=
getById
(
groupEntity
.
getId
());
if
(
groupEntityNew
!=
null
)
{
groupEntityNew
.
setGroupName
(
groupEntity
.
getGroupName
());
return
updateById
(
groupEntityNew
);
}
return
false
;
}
}
}
src/main/java/com/platform/service/impl/UserServiceImpl.java
View file @
7a585a64
...
@@ -28,10 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -28,10 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
@Service
@Service
public
class
UserServiceImpl
extends
ServiceImpl
<
UserMapper
,
UserEntity
>
implements
UserService
{
public
class
UserServiceImpl
extends
ServiceImpl
<
UserMapper
,
UserEntity
>
implements
UserService
{
...
@@ -44,7 +41,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -44,7 +41,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
private
ExcelDataService
excelDataService
;
private
ExcelDataService
excelDataService
;
@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
));
UserVO
userVO
=
DozerUtils
.
convertBean
(
userEntity
,
UserVO
.
class
);
UserVO
userVO
=
DozerUtils
.
convertBean
(
userEntity
,
UserVO
.
class
);
...
@@ -55,41 +52,41 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -55,41 +52,41 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
}
}
List
<
UserRelationEntity
>
relationShipList
=
userRelationService
.
list
(
new
LambdaQueryWrapper
<
UserRelationEntity
>()
List
<
UserRelationEntity
>
relationShipList
=
userRelationService
.
list
(
new
LambdaQueryWrapper
<
UserRelationEntity
>()
.
eq
(
UserRelationEntity:
:
getUserName
,
userEntity
.
getUserName
()).
eq
(
UserRelationEntity:
:
getCaseId
,
caseId
));
.
eq
(
UserRelationEntity:
:
getUserName
,
userEntity
.
getUserName
()).
eq
(
UserRelationEntity:
:
getCaseId
,
caseId
));
if
(!
ObjectUtils
.
isEmpty
(
relationShipList
)){
if
(!
ObjectUtils
.
isEmpty
(
relationShipList
))
{
userVO
.
setRelationShipList
(
relationShipList
);
userVO
.
setRelationShipList
(
relationShipList
);
}
}
//本人账号数量
//本人账号数量
HashSet
<
String
>
account
=
Sets
.
newHashSet
();
HashSet
<
String
>
account
=
Sets
.
newHashSet
();
//查询关联资金
//查询关联资金
List
<
AssociationVO
>
financialTransactions
=
excelDataService
.
selectFinancialTransactions
(
userName
,
caseId
);
List
<
AssociationVO
>
financialTransactions
=
excelDataService
.
selectFinancialTransactions
(
userName
,
caseId
);
Map
<
String
,
List
<
AssociationVO
>>
detailsFunds
=
Maps
.
newHashMap
();
Map
<
String
,
List
<
AssociationVO
>>
detailsFunds
=
Maps
.
newHashMap
();
for
(
AssociationVO
financialTransaction
:
financialTransactions
)
{
for
(
AssociationVO
financialTransaction
:
financialTransactions
)
{
if
(
financialTransaction
.
getDirection
().
equals
(
"出账"
)){
if
(
financialTransaction
.
getDirection
().
equals
(
"出账"
))
{
if
(
detailsFunds
.
containsKey
(
financialTransaction
.
getPayee
())){
if
(
detailsFunds
.
containsKey
(
financialTransaction
.
getPayee
()))
{
financialTransaction
.
setRelationDesc
(
detailsFunds
.
get
(
financialTransaction
.
getPayee
()).
size
()
+
"、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
financialTransaction
.
setRelationDesc
(
detailsFunds
.
get
(
financialTransaction
.
getPayee
()).
size
()
+
"、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
+
financialTransaction
.
getPayee
()
+
"->"
+
financialTransaction
.
getPayment
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
+
financialTransaction
.
getPayee
()
+
"->"
+
financialTransaction
.
getPayment
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
detailsFunds
.
get
(
financialTransaction
.
getPayee
()).
add
(
financialTransaction
);
detailsFunds
.
get
(
financialTransaction
.
getPayee
()).
add
(
financialTransaction
);
account
.
add
(
financialTransaction
.
getPayment
());
account
.
add
(
financialTransaction
.
getPayment
());
}
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
.
getPayee
()
+
"->"
+
financialTransaction
.
getPayment
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
+
financialTransaction
.
getPayee
()
+
"->"
+
financialTransaction
.
getPayment
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
list
.
add
(
financialTransaction
);
list
.
add
(
financialTransaction
);
detailsFunds
.
put
(
financialTransaction
.
getPayee
(),
list
);
detailsFunds
.
put
(
financialTransaction
.
getPayee
(),
list
);
account
.
add
(
financialTransaction
.
getPayment
());
account
.
add
(
financialTransaction
.
getPayment
());
}
}
}
else
if
(
financialTransaction
.
getDirection
().
equals
(
"入账"
)){
}
else
if
(
financialTransaction
.
getDirection
().
equals
(
"入账"
))
{
if
(
detailsFunds
.
containsKey
(
financialTransaction
.
getPayment
())){
if
(
detailsFunds
.
containsKey
(
financialTransaction
.
getPayment
()))
{
financialTransaction
.
setRelationDesc
(
detailsFunds
.
get
(
financialTransaction
.
getPayment
()).
size
()
+
"、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
financialTransaction
.
setRelationDesc
(
detailsFunds
.
get
(
financialTransaction
.
getPayment
()).
size
()
+
"、"
+
financialTransaction
.
getStartTime
()
+
"-"
+
financialTransaction
.
getEndTime
()
+
financialTransaction
.
getPayee
()
+
"->"
+
financialTransaction
.
getPayment
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
+
financialTransaction
.
getPayee
()
+
"->"
+
financialTransaction
.
getPayment
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
detailsFunds
.
get
(
financialTransaction
.
getPayment
()).
add
(
financialTransaction
);
detailsFunds
.
get
(
financialTransaction
.
getPayment
()).
add
(
financialTransaction
);
account
.
add
(
financialTransaction
.
getPayee
());
account
.
add
(
financialTransaction
.
getPayee
());
}
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
.
getPayee
()
+
"->"
+
financialTransaction
.
getPayment
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
+
financialTransaction
.
getPayee
()
+
"->"
+
financialTransaction
.
getPayment
()
+
","
+
financialTransaction
.
getTotalAmount
()
+
",交易"
+
financialTransaction
.
getNum
()
+
"次"
);
list
.
add
(
financialTransaction
);
list
.
add
(
financialTransaction
);
detailsFunds
.
put
(
financialTransaction
.
getPayment
(),
list
);
detailsFunds
.
put
(
financialTransaction
.
getPayment
(),
list
);
account
.
add
(
financialTransaction
.
getPayee
());
account
.
add
(
financialTransaction
.
getPayee
());
}
}
}
}
...
@@ -112,7 +109,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -112,7 +109,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
@Override
@Override
public
boolean
updateUser
(
UserDTO
userDTO
)
{
public
boolean
updateUser
(
UserDTO
userDTO
)
{
List
<
UserRelationEntity
>
relationShipList
=
userDTO
.
getRelationShipList
();
List
<
UserRelationEntity
>
relationShipList
=
userDTO
.
getRelationShipList
();
if
(!
ObjectUtils
.
isEmpty
(
relationShipList
)){
if
(!
ObjectUtils
.
isEmpty
(
relationShipList
))
{
userRelationService
.
saveOrUpdateBatch
(
relationShipList
);
userRelationService
.
saveOrUpdateBatch
(
relationShipList
);
}
}
updateById
(
userDTO
);
updateById
(
userDTO
);
...
@@ -132,7 +129,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -132,7 +129,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
public
Boolean
add
(
UserDTO
userDTO
)
{
public
Boolean
add
(
UserDTO
userDTO
)
{
//解析身份证号
//解析身份证号
Map
<
String
,
String
>
idCardInfo
=
IdCardUtils
.
parseIdCardInfo
(
userDTO
.
getIdCard
());
Map
<
String
,
String
>
idCardInfo
=
IdCardUtils
.
parseIdCardInfo
(
userDTO
.
getIdCard
());
if
(
MapUtil
.
isNotEmpty
(
idCardInfo
)){
if
(
MapUtil
.
isNotEmpty
(
idCardInfo
))
{
userDTO
.
setAge
(
Integer
.
parseInt
(
idCardInfo
.
get
(
"age"
)));
userDTO
.
setAge
(
Integer
.
parseInt
(
idCardInfo
.
get
(
"age"
)));
userDTO
.
setSex
(
idCardInfo
.
get
(
"sex"
));
userDTO
.
setSex
(
idCardInfo
.
get
(
"sex"
));
userDTO
.
setIdType
(
"身份证"
);
userDTO
.
setIdType
(
"身份证"
);
...
@@ -159,10 +156,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -159,10 +156,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
public
List
<
ExcelDataEntity
>
cashFlow
(
UserDTO
userDTO
)
{
public
List
<
ExcelDataEntity
>
cashFlow
(
UserDTO
userDTO
)
{
List
<
ExcelDataEntity
>
excelDataList
=
excelDataService
.
cashFlow
(
userDTO
);
List
<
ExcelDataEntity
>
excelDataList
=
excelDataService
.
cashFlow
(
userDTO
);
for
(
ExcelDataEntity
excelDataEntity
:
excelDataList
)
{
for
(
ExcelDataEntity
excelDataEntity
:
excelDataList
)
{
if
(
"出账"
.
equals
(
excelDataEntity
.
getDirection
())){
if
(
"出账"
.
equals
(
excelDataEntity
.
getDirection
()))
{
excelDataEntity
.
setSelfAccount
(
excelDataEntity
.
getPayAccount
());
excelDataEntity
.
setSelfAccount
(
excelDataEntity
.
getPayAccount
());
excelDataEntity
.
setAssociationAccount
(
excelDataEntity
.
getPayeeAccount
());
excelDataEntity
.
setAssociationAccount
(
excelDataEntity
.
getPayeeAccount
());
}
else
if
(
"入账"
.
equals
(
excelDataEntity
.
getDirection
())){
}
else
if
(
"入账"
.
equals
(
excelDataEntity
.
getDirection
()))
{
excelDataEntity
.
setSelfAccount
(
excelDataEntity
.
getPayeeAccount
());
excelDataEntity
.
setSelfAccount
(
excelDataEntity
.
getPayeeAccount
());
excelDataEntity
.
setAssociationAccount
(
excelDataEntity
.
getPayAccount
());
excelDataEntity
.
setAssociationAccount
(
excelDataEntity
.
getPayAccount
());
}
}
...
@@ -174,10 +171,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -174,10 +171,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
public
EveryoneVO
relationPage
(
UserDTO
userDTO
)
{
public
EveryoneVO
relationPage
(
UserDTO
userDTO
)
{
EveryoneVO
everyoneVO
=
new
EveryoneVO
();
EveryoneVO
everyoneVO
=
new
EveryoneVO
();
UserEntity
oneself
=
getOne
(
new
LambdaQueryWrapper
<
UserEntity
>()
UserEntity
oneself
=
getOne
(
new
LambdaQueryWrapper
<
UserEntity
>()
.
eq
(
UserEntity:
:
getUserName
,
userDTO
.
getUserName
()).
eq
(
UserEntity:
:
getCaseId
,
userDTO
.
getCaseId
()),
false
);
.
eq
(
UserEntity:
:
getUserName
,
userDTO
.
getUserName
()).
eq
(
UserEntity:
:
getCaseId
,
userDTO
.
getCaseId
()),
false
);
UserEntity
other
=
getOne
(
new
LambdaQueryWrapper
<
UserEntity
>()
UserEntity
other
=
getOne
(
new
LambdaQueryWrapper
<
UserEntity
>()
.
eq
(
UserEntity:
:
getUserName
,
userDTO
.
getOtherName
()).
eq
(
UserEntity:
:
getCaseId
,
userDTO
.
getCaseId
()),
false
);
.
eq
(
UserEntity:
:
getUserName
,
userDTO
.
getOtherName
()).
eq
(
UserEntity:
:
getCaseId
,
userDTO
.
getCaseId
()),
false
);
if
(
ObjectUtils
.
isEmpty
(
oneself
)
||
ObjectUtils
.
isEmpty
(
other
)){
if
(
ObjectUtils
.
isEmpty
(
oneself
)
||
ObjectUtils
.
isEmpty
(
other
))
{
throw
new
BusinessException
(
"用户不存在"
);
throw
new
BusinessException
(
"用户不存在"
);
}
}
//标题
//标题
...
@@ -187,16 +184,16 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -187,16 +184,16 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
.
eq
(
UserRelationEntity:
:
getUserName
,
userDTO
.
getUserName
())
.
eq
(
UserRelationEntity:
:
getUserName
,
userDTO
.
getUserName
())
.
eq
(
UserRelationEntity:
:
getOtherName
,
userDTO
.
getOtherName
()));
.
eq
(
UserRelationEntity:
:
getOtherName
,
userDTO
.
getOtherName
()));
//指认关系
//指认关系
if
(
ObjectUtils
.
isEmpty
(
userRelation
)){
if
(
ObjectUtils
.
isEmpty
(
userRelation
))
{
everyoneVO
.
setRelation
(
userRelation
);
everyoneVO
.
setRelation
(
userRelation
);
}
}
//查询账户
//查询账户
List
<
String
>
oneselfAccountList
=
userAccountService
.
queryUserAccountList
(
oneself
.
getUserName
());
List
<
String
>
oneselfAccountList
=
userAccountService
.
queryUserAccountList
(
oneself
.
getUserName
());
List
<
String
>
otherAccountList
=
userAccountService
.
queryUserAccountList
(
oneself
.
getUserName
());
List
<
String
>
otherAccountList
=
userAccountService
.
queryUserAccountList
(
oneself
.
getUserName
());
PageHelper
.
startPage
(
userDTO
.
getPageNum
(),
userDTO
.
getPageSize
());
PageHelper
.
startPage
(
userDTO
.
getPageNum
(),
userDTO
.
getPageSize
());
List
<
ExcelDataEntity
>
details
=
excelDataService
.
relationPage
(
oneselfAccountList
,
otherAccountList
);
List
<
ExcelDataEntity
>
details
=
excelDataService
.
relationPage
(
oneselfAccountList
,
otherAccountList
);
everyoneVO
.
setDetails
(
details
);
everyoneVO
.
setDetails
(
details
);
PageHelper
.
clearPage
();
PageHelper
.
clearPage
();
return
everyoneVO
;
return
everyoneVO
;
...
@@ -212,4 +209,19 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -212,4 +209,19 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
userRelationService
.
remove
(
new
LambdaQueryWrapper
<
UserRelationEntity
>().
eq
(
UserRelationEntity:
:
getOtherName
,
userName
));
userRelationService
.
remove
(
new
LambdaQueryWrapper
<
UserRelationEntity
>().
eq
(
UserRelationEntity:
:
getOtherName
,
userName
));
return
remove
(
new
LambdaQueryWrapper
<
UserEntity
>().
eq
(
UserEntity:
:
getUserName
,
userName
));
return
remove
(
new
LambdaQueryWrapper
<
UserEntity
>().
eq
(
UserEntity:
:
getUserName
,
userName
));
}
}
@Override
public
UserEntity
getByUserName
(
String
newName
)
{
return
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
UserEntity
>()
.
eq
(
UserEntity:
:
getUserName
,
newName
));
}
@Override
public
List
<
String
>
queryListByCaseId
(
Integer
id
)
{
List
<
UserEntity
>
userEntityList
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
UserEntity
>()
.
eq
(
UserEntity:
:
getCaseId
,
id
));
Set
<
String
>
userNameList
=
new
HashSet
<>();
userEntityList
.
forEach
(
userEntity
->
userNameList
.
add
(
userEntity
.
getUserName
()));
return
new
ArrayList
<>(
userNameList
);
}
}
}
src/main/resources/com/platform/mapper/ExcelDataMapper.xml
View file @
7a585a64
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
</where>
</where>
group by
group by
ed.file_id,ed.pay_user_name,fu.file_name,fu.path,ed.use_flag,ed.user_flag
ed.file_id,ed.pay_user_name,fu.file_name,fu.path,ed.use_flag,ed.user_flag
order by ed.user_flag DESC
</select>
</select>
<select
id=
"queryList"
resultType=
"com.platform.model.entity.ExcelDataEntity"
>
<select
id=
"queryList"
resultType=
"com.platform.model.entity.ExcelDataEntity"
>
...
...
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