|
|
|
@ -959,11 +959,18 @@ public class AccountController {
|
|
|
|
|
CoreUser user = userService.findByOldId(Long.valueOf(userId));
|
|
|
|
|
if (user != null) {
|
|
|
|
|
Student student = studentService.getByUserId(user.getId());
|
|
|
|
|
StudentAccountAssetAllocation allocation = studentAccountAssetAllocationService.getByApplicationIdAndStudentId(18L, student.getStudentId());
|
|
|
|
|
if (allocation != null) {
|
|
|
|
|
allocation.setAvailableFunds(BigDecimal.valueOf(amount));
|
|
|
|
|
allocation.setTotalAssetsOfSubAccounts(BigDecimal.valueOf(totalAsset));
|
|
|
|
|
studentAccountAssetAllocationService.updateTemplate(allocation);
|
|
|
|
|
List<StudentAccountEquityInvestmentSystem> allocations = studentAccountEquityInvestmentSystemService.getInfo(student.getStudentId());
|
|
|
|
|
|
|
|
|
|
if (allocations != null) {
|
|
|
|
|
StudentAccountEquityInvestmentSystem allocation = allocations.get(0);
|
|
|
|
|
allocation.setTotalCollectAssets(BigDecimal.valueOf(amount));
|
|
|
|
|
studentAccountEquityInvestmentSystemService.updateTemplate(allocation);
|
|
|
|
|
}
|
|
|
|
|
StudentAccountAssetAllocation assetAllocation = studentAccountAssetAllocationService.getByApplicationIdAndStudentId(18L, student.getStudentId());
|
|
|
|
|
if (assetAllocation != null) {
|
|
|
|
|
assetAllocation.setAvailableFunds(BigDecimal.valueOf(amount));
|
|
|
|
|
assetAllocation.setTotalAssetsOfSubAccounts(BigDecimal.valueOf(totalAsset));
|
|
|
|
|
studentAccountAssetAllocationService.updateTemplate(assetAllocation);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|