|
|
|
@ -144,16 +144,19 @@ public class AccountController {
|
|
|
|
|
public void createFund() throws SQLException {
|
|
|
|
|
|
|
|
|
|
List<Student> students = studentService.getValues(null);
|
|
|
|
|
int i =0;
|
|
|
|
|
if (students != null && students.size() > 0) {
|
|
|
|
|
for (Student student : students) {
|
|
|
|
|
Connection connection = openConn();
|
|
|
|
|
String username = student.getStudentSn();
|
|
|
|
|
StudentAccountAssetAllocationQuery query = new StudentAccountAssetAllocationQuery();
|
|
|
|
|
query.setStudentId(student.getStudentId());
|
|
|
|
|
// List<StudentAccountAssetAllocation> studentAccountAssetAllocations = studentAccountAssetAllocationService.getValuesByQuery(query);
|
|
|
|
|
// List<StudentAccountAssetAllocation> studentAccountAssetAllocations = studentAccountAssetAllocationService.getInfoByStudentId(student.getStudentId());
|
|
|
|
|
// if (studentAccountAssetAllocations != null && studentAccountAssetAllocations.size() > 0) {
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
System.out.println("已处理------------->"+i++);
|
|
|
|
|
Connection connection = openConn();
|
|
|
|
|
String username = student.getStudentSn();
|
|
|
|
|
StudentAccountAssetAllocationQuery query = new StudentAccountAssetAllocationQuery();
|
|
|
|
|
// query.setStudentId();
|
|
|
|
|
|
|
|
|
|
String sql = "SELECT\n" +
|
|
|
|
|
" EduUsers.UserName,\n" +
|
|
|
|
|
" EduAssetAllocation.ApplicationId,\n" +
|
|
|
|
@ -203,6 +206,10 @@ public class AccountController {
|
|
|
|
|
} else if (applicationId == 4) {
|
|
|
|
|
allocationQuery.setApplicationId(Long.valueOf(4));
|
|
|
|
|
allocationQuery.setName(AccountTypeEnum.P2P_ACCOUNT);
|
|
|
|
|
StudentAccountCrowdfundingSystem info = studentAccountCrowdfundingSystemService.getInfo(student.getStudentId());
|
|
|
|
|
if(info!=null){
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
Connection connection1 = openConn();
|
|
|
|
|
String sql1 = "SELECT\n" +
|
|
|
|
|
" ExaP2PAssetAllocation.Id,\n" +
|
|
|
|
@ -234,6 +241,8 @@ public class AccountController {
|
|
|
|
|
PreparedStatement preparedStatement1 = connection1.prepareStatement(sql1);
|
|
|
|
|
ResultSet resultSet1 = preparedStatement1.executeQuery();
|
|
|
|
|
while (resultSet1.next()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StudentAccountP2pSystem studentAccountP2pSystem = new StudentAccountP2pSystem();
|
|
|
|
|
BigDecimal InitialCapital1 = resultSet1.getBigDecimal("InitialCapital");
|
|
|
|
|
BigDecimal InitialInvestmentCapital1 = resultSet1.getBigDecimal("InitialInvestmentCapital");
|
|
|
|
@ -276,6 +285,10 @@ public class AccountController {
|
|
|
|
|
} else if (applicationId == 5) {
|
|
|
|
|
allocationQuery.setApplicationId(Long.valueOf(5));
|
|
|
|
|
allocationQuery.setName(AccountTypeEnum.CROWDFUNDING_ACCOUNT);
|
|
|
|
|
|
|
|
|
|
StudentAccountCrowdfundingSystem info = studentAccountCrowdfundingSystemService.getInfo(student.getStudentId());
|
|
|
|
|
if(info!=null)continue;
|
|
|
|
|
|
|
|
|
|
Connection connection1 = openConn();
|
|
|
|
|
String sql1 = "SELECT\n" +
|
|
|
|
|
" ExaTheRaiseAssetAllocation.Id,\n" +
|
|
|
|
@ -341,6 +354,9 @@ public class AccountController {
|
|
|
|
|
} else if (applicationId == 16) {
|
|
|
|
|
allocationQuery.setApplicationId(Long.valueOf(16));
|
|
|
|
|
allocationQuery.setName(AccountTypeEnum.EQUITY_FUND_INVESTMENT_ACCOUNT);
|
|
|
|
|
|
|
|
|
|
// List<StudentAccountMockTradingSystem> byStudentId = studentAccountMockTradingSystemService.getByStudentId(student.getStudentId());
|
|
|
|
|
// if(byStudentId!=null&&byStudentId.size()>0)continue;
|
|
|
|
|
Connection connection1 = openConn();
|
|
|
|
|
String sql1 = "SELECT\n" +
|
|
|
|
|
" ExaMNJYAssetAllocation.Id,\n" +
|
|
|
|
@ -419,6 +435,10 @@ public class AccountController {
|
|
|
|
|
allocationQuery.setApplicationId(Long.valueOf(18));
|
|
|
|
|
allocationQuery.setName(AccountTypeEnum.EQUITY_INVESTMENT_ACCOUNT);
|
|
|
|
|
|
|
|
|
|
StudentAccountEquityInvestmentSystemQuery query1 = new StudentAccountEquityInvestmentSystemQuery();
|
|
|
|
|
query1.setStudentId(student.getStudentId());
|
|
|
|
|
// List<StudentAccountEquityInvestmentSystem> valuesByQuery = studentAccountEquityInvestmentSystemService.getInfo(student.getStudentId());
|
|
|
|
|
// if (valuesByQuery != null && valuesByQuery.size() > 0) continue;
|
|
|
|
|
Connection connection1 = openConn();
|
|
|
|
|
String sql1 = "SELECT\n" +
|
|
|
|
|
" ExaPEVCAssetAllocation.Id,\n" +
|
|
|
|
|