补贴导入修改
This commit is contained in:
parent
e050c9a70c
commit
1092be44f6
|
|
@ -23,7 +23,7 @@ public class AccImportOperationWalletPreCheckVO {
|
|||
private List<AccBatchOperationWallerErrorVO> errVOList;
|
||||
@ApiModelProperty("校验无效用户信息集合")
|
||||
private List<AccImportOperationWallerErrorVO> invalidVOList;
|
||||
|
||||
private List<AccInfoDetailsVO> accInfoVOList;
|
||||
private List<Map<Long,BigDecimal>> sucVoListMap;
|
||||
@ApiModelProperty("操作金额")
|
||||
private BigDecimal amount;
|
||||
|
|
|
|||
|
|
@ -493,6 +493,7 @@ public class AccSubServiceImpl implements AccSubService {
|
|||
java.util.Map<String,BigDecimal> userCodeAmountMap = accImportDTOList.stream()
|
||||
.collect(Collectors.toMap(AccImportDTO::getUserCode, AccImportDTO::getAmount, (v1, v2) -> v1));
|
||||
List<AccInfoDetailsVO> accInfoVOList = accInfoService.queryAccInfoByUserCodes(userCodes);
|
||||
List<AccInfoDetailsVO> accInfoDetailsVOList = new ArrayList<>();
|
||||
if (CollUtil.isEmpty(accInfoVOList)) {
|
||||
throw new ServiceException("批量补贴查询到的用户为空");
|
||||
}
|
||||
|
|
@ -507,6 +508,7 @@ public class AccSubServiceImpl implements AccSubService {
|
|||
Map<Long,BigDecimal> maps = new HashMap<>();
|
||||
maps.put(accInfo.getUserId(),userCodeAmountMap.get(accInfo.getUserCode()).movePointRight(2));
|
||||
sucVoListMap.add(maps);
|
||||
accInfoDetailsVOList.add(accInfo);
|
||||
} catch (Exception ex) {
|
||||
errVOList.add(createErrorVO(accInfo, userCodeAmountMap.get(accInfo.getUserCode()).movePointRight(2), ex.getMessage()));
|
||||
}
|
||||
|
|
@ -515,7 +517,7 @@ public class AccSubServiceImpl implements AccSubService {
|
|||
java.util.Set<String> mainUserCodes = accInfoVOList.stream()
|
||||
.map(AccInfoDetailsVO::getUserCode)
|
||||
.collect(Collectors.toSet());
|
||||
// 找出次集合中不在主集合中的元素
|
||||
// 找出次集合中不在主集合中的元素
|
||||
List<AccImportDTO> newCollection = accImportDTOList.stream()
|
||||
.filter(vo -> !mainUserCodes.contains(vo.getUserCode()))
|
||||
.collect(Collectors.toList());
|
||||
|
|
@ -536,6 +538,7 @@ public class AccSubServiceImpl implements AccSubService {
|
|||
result.setInvalidVOList(errorVOS);
|
||||
result.setValidUserIdList(sucVoList);
|
||||
result.setSucVoListMap(sucVoListMap);
|
||||
result.setAccInfoVOList(accInfoDetailsVOList);
|
||||
BigDecimal amount = accImportDTOList.stream()
|
||||
.map(AccImportDTO::getAmount)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
|
|
|||
Loading…
Reference in New Issue