|
|
@ -188,14 +188,31 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward |
|
|
|
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); |
|
|
|
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); |
|
|
|
queryWrappertm.eq("enroll_code",awardPersion.getEnrollCode()); |
|
|
|
queryWrappertm.eq("enroll_code",awardPersion.getEnrollCode()); |
|
|
|
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm); |
|
|
|
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm); |
|
|
|
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); |
|
|
|
if(listtm.size()>1){ |
|
|
|
awardPersion.setStudentname(sysUser.getRealname()); |
|
|
|
TeamManagement teamManagement1 = new TeamManagement(); |
|
|
|
awardPersion.setStudentcode(sysUser.getUsername()); |
|
|
|
QueryWrapper<TeamManagement> queryWrappertm1 = QueryGenerator.initQueryWrapper(teamManagement1, req.getParameterMap()); |
|
|
|
awardPersionService.save(awardPersion); |
|
|
|
queryWrappertm1.eq("enroll_code",awardPersion.getEnrollCode()); |
|
|
|
AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP()); |
|
|
|
queryWrappertm1.eq("captain","1"); |
|
|
|
annualCompPoint.setIsPj(1); |
|
|
|
List<TeamManagement> listtm1 = teamManagementService.list(queryWrappertm1); |
|
|
|
annualCompPointService.updateById(annualCompPoint); |
|
|
|
SysUser sysUser = sysUserService.getById(listtm1.get(0).getUserId()); |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
awardPersion.setStudentname(sysUser.getRealname()); |
|
|
|
|
|
|
|
awardPersion.setStudentcode(sysUser.getUsername()); |
|
|
|
|
|
|
|
awardPersionService.save(awardPersion); |
|
|
|
|
|
|
|
AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP()); |
|
|
|
|
|
|
|
annualCompPoint.setIsPj(1); |
|
|
|
|
|
|
|
annualCompPointService.updateById(annualCompPoint); |
|
|
|
|
|
|
|
return Result.OK("添加成功!"); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); |
|
|
|
|
|
|
|
awardPersion.setStudentname(sysUser.getRealname()); |
|
|
|
|
|
|
|
awardPersion.setStudentcode(sysUser.getUsername()); |
|
|
|
|
|
|
|
awardPersionService.save(awardPersion); |
|
|
|
|
|
|
|
AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP()); |
|
|
|
|
|
|
|
annualCompPoint.setIsPj(1); |
|
|
|
|
|
|
|
annualCompPointService.updateById(annualCompPoint); |
|
|
|
|
|
|
|
return Result.OK("添加成功!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -229,11 +246,25 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward |
|
|
|
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); |
|
|
|
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); |
|
|
|
queryWrappertm.eq("enroll_code",awardPersion.getEnrollCode()); |
|
|
|
queryWrappertm.eq("enroll_code",awardPersion.getEnrollCode()); |
|
|
|
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm); |
|
|
|
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm); |
|
|
|
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); |
|
|
|
if(listtm.size()>1){ |
|
|
|
awardPersion.setStudentname(sysUser.getRealname()); |
|
|
|
TeamManagement teamManagement1 = new TeamManagement(); |
|
|
|
awardPersion.setStudentcode(sysUser.getUsername()); |
|
|
|
QueryWrapper<TeamManagement> queryWrappertm1 = QueryGenerator.initQueryWrapper(teamManagement1, req.getParameterMap()); |
|
|
|
awardPersionService.updateById(awardPersion); |
|
|
|
queryWrappertm1.eq("enroll_code",awardPersion.getEnrollCode()); |
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
queryWrappertm1.eq("captain","1"); |
|
|
|
|
|
|
|
List<TeamManagement> listtm1 = teamManagementService.list(queryWrappertm1); |
|
|
|
|
|
|
|
SysUser sysUser = sysUserService.getById(listtm1.get(0).getUserId()); |
|
|
|
|
|
|
|
awardPersion.setStudentname(sysUser.getRealname()); |
|
|
|
|
|
|
|
awardPersion.setStudentcode(sysUser.getUsername()); |
|
|
|
|
|
|
|
awardPersionService.updateById(awardPersion); |
|
|
|
|
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); |
|
|
|
|
|
|
|
awardPersion.setStudentname(sysUser.getRealname()); |
|
|
|
|
|
|
|
awardPersion.setStudentcode(sysUser.getUsername()); |
|
|
|
|
|
|
|
awardPersionService.updateById(awardPersion); |
|
|
|
|
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -421,36 +452,73 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward |
|
|
|
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, request.getParameterMap()); |
|
|
|
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, request.getParameterMap()); |
|
|
|
queryWrappertm.eq("enroll_code",list.get(i).getEnrollCode()); |
|
|
|
queryWrappertm.eq("enroll_code",list.get(i).getEnrollCode()); |
|
|
|
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm); |
|
|
|
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm); |
|
|
|
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); |
|
|
|
if(listtm.size()>1){ |
|
|
|
if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){ |
|
|
|
TeamManagement teamManagement1 = new TeamManagement(); |
|
|
|
list.get(i).setAwardsort(1); |
|
|
|
QueryWrapper<TeamManagement> queryWrappertm1 = QueryGenerator.initQueryWrapper(teamManagement1, request.getParameterMap()); |
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
queryWrappertm1.eq("enroll_code",list.get(i).getEnrollCode()); |
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
queryWrappertm1.eq("captain","1"); |
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
List<TeamManagement> listtm1 = teamManagementService.list(queryWrappertm1); |
|
|
|
}else if(listaca.get(0).getSecondPrize().equals(list.get(i).getAwardname())){ |
|
|
|
SysUser sysUser = sysUserService.getById(listtm1.get(0).getUserId()); |
|
|
|
list.get(i).setAwardsort(2); |
|
|
|
if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){ |
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
list.get(i).setAwardsort(1); |
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
}else if(listaca.get(0).getThirdPrize().equals(list.get(i).getAwardname())){ |
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
list.get(i).setAwardsort(3); |
|
|
|
}else if(listaca.get(0).getSecondPrize().equals(list.get(i).getAwardname())){ |
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
list.get(i).setAwardsort(2); |
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
}else if(listaca.get(0).getFourthPrize().equals(list.get(i).getAwardname())){ |
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
list.get(i).setAwardsort(4); |
|
|
|
}else if(listaca.get(0).getThirdPrize().equals(list.get(i).getAwardname())){ |
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
list.get(i).setAwardsort(3); |
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
}else if(listaca.get(0).getFifthPrize().equals(list.get(i).getAwardname())){ |
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
list.get(i).setAwardsort(5); |
|
|
|
}else if(listaca.get(0).getFourthPrize().equals(list.get(i).getAwardname())){ |
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
list.get(i).setAwardsort(4); |
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
|
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
|
|
|
|
}else if(listaca.get(0).getFifthPrize().equals(list.get(i).getAwardname())){ |
|
|
|
|
|
|
|
list.get(i).setAwardsort(5); |
|
|
|
|
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
|
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
|
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
return Result.error("文件导入失败:第"+(i+1)+"行奖项名称不存在"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}else { |
|
|
|
}else { |
|
|
|
return Result.error("文件导入失败:第"+(i+1)+"行奖项名称不存在"); |
|
|
|
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); |
|
|
|
|
|
|
|
if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){ |
|
|
|
|
|
|
|
list.get(i).setAwardsort(1); |
|
|
|
|
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
|
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
|
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
|
|
|
|
}else if(listaca.get(0).getSecondPrize().equals(list.get(i).getAwardname())){ |
|
|
|
|
|
|
|
list.get(i).setAwardsort(2); |
|
|
|
|
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
|
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
|
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
|
|
|
|
}else if(listaca.get(0).getThirdPrize().equals(list.get(i).getAwardname())){ |
|
|
|
|
|
|
|
list.get(i).setAwardsort(3); |
|
|
|
|
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
|
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
|
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
|
|
|
|
}else if(listaca.get(0).getFourthPrize().equals(list.get(i).getAwardname())){ |
|
|
|
|
|
|
|
list.get(i).setAwardsort(4); |
|
|
|
|
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
|
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
|
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
|
|
|
|
}else if(listaca.get(0).getFifthPrize().equals(list.get(i).getAwardname())){ |
|
|
|
|
|
|
|
list.get(i).setAwardsort(5); |
|
|
|
|
|
|
|
list.get(i).setAwardid(listaca.get(0).getId()); |
|
|
|
|
|
|
|
list.get(i).setStudentcode(sysUser.getUsername()); |
|
|
|
|
|
|
|
list.get(i).setStudentname(sysUser.getRealname()); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
return Result.error("文件导入失败:第"+(i+1)+"行奖项名称不存在"); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
//update-begin-author:taoyan date:20190528 for:批量插入数据
|
|
|
|
//update-begin-author:taoyan date:20190528 for:批量插入数据
|
|
|
|
long start = System.currentTimeMillis(); |
|
|
|
long start = System.currentTimeMillis(); |
|
|
|