|
|
|
@ -952,5 +952,80 @@ public class AccountController {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation("智云2.0接口:修改PEVC资金")
|
|
|
|
|
@PostMapping("updatePEVCAssetAllocations.json")
|
|
|
|
|
public JsonResult updatePEVCAssetAllocations(Integer userId, Double amount, Double totalAsset) {
|
|
|
|
|
if (userId != null) {
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation("智云2.0接口:UpdatePevcInvestAmount")
|
|
|
|
|
@PostMapping("updatePevcInvestAmount.json")
|
|
|
|
|
public JsonResult updatePevcInvestAmount(Integer userId,
|
|
|
|
|
Double amount,
|
|
|
|
|
Double TotalAsset,
|
|
|
|
|
Double zyInvestAmount,
|
|
|
|
|
Double yxInvestAmount,
|
|
|
|
|
Double lhInvestAmount,
|
|
|
|
|
Double bankInvestAmount) {
|
|
|
|
|
if (userId != null) {
|
|
|
|
|
CoreUser user = userService.findByOldId(Long.valueOf(userId));
|
|
|
|
|
if (user != null) {
|
|
|
|
|
Student student = studentService.getByUserId(user.getId());
|
|
|
|
|
List<StudentAccountEquityInvestmentSystem> info = studentAccountEquityInvestmentSystemService.getInfo(student.getStudentId());
|
|
|
|
|
StudentAccountEquityInvestmentSystem system = info.get(0);
|
|
|
|
|
system.setTotalCollectAssets(BigDecimal.valueOf(amount));
|
|
|
|
|
system.setOwnInvestmentAssets(BigDecimal.valueOf(zyInvestAmount));
|
|
|
|
|
system.setLpInvestmentAssets(BigDecimal.valueOf(yxInvestAmount));
|
|
|
|
|
system.setGlInvestmentAssets(BigDecimal.valueOf(lhInvestAmount));
|
|
|
|
|
system.setBankLoanInvestment(BigDecimal.valueOf(bankInvestAmount));
|
|
|
|
|
studentAccountEquityInvestmentSystemService.updateTemplate(system);
|
|
|
|
|
|
|
|
|
|
StudentAccountAssetAllocation allocation = studentAccountAssetAllocationService.getByApplicationIdAndStudentId(18L, student.getStudentId());
|
|
|
|
|
if (allocation != null) {
|
|
|
|
|
allocation.setAvailableFunds(BigDecimal.valueOf(amount));
|
|
|
|
|
allocation.setTotalAssetsOfSubAccounts(BigDecimal.valueOf(TotalAsset));
|
|
|
|
|
double investAmount = zyInvestAmount + yxInvestAmount + lhInvestAmount + bankInvestAmount;
|
|
|
|
|
allocation.setInvestmentFunds(BigDecimal.valueOf(investAmount));
|
|
|
|
|
studentAccountAssetAllocationService.updateTemplate(allocation);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation("智云2.0接口:GetUserNameByUserId")
|
|
|
|
|
@GetMapping("getUserNameByUserId")
|
|
|
|
|
public JsonResult getUserNameByUserId(Integer userId) {
|
|
|
|
|
if (userId != null) {
|
|
|
|
|
CoreUser user = userService.findByOldId(Long.valueOf(userId));
|
|
|
|
|
if (user != null) {
|
|
|
|
|
return JsonResult.success(user.getName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation("智云2.0接口:GetClassNameByClassId")
|
|
|
|
|
@GetMapping("getClassNameByClassId")
|
|
|
|
|
public JsonResult getClassNameByClassId(Integer classId) {
|
|
|
|
|
if (classId != null) {
|
|
|
|
|
SchoolClass schoolClass = schoolClassService.getByOldId(Long.valueOf(classId));
|
|
|
|
|
if (schoolClass != null) {
|
|
|
|
|
return JsonResult.success(schoolClass.getClassName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|