修改收益分配和老师端BUG

master
xiaoCJ
parent a925ecdc7a
commit 1674feb723

@ -75,8 +75,8 @@ public class ClassScoreController {
@AnonymousAccess
@GetMapping("/importExcel")
@ApiOperation("成绩管理/导出") //目前只导出提交了报告的学生的数据
public void importExcel(HttpServletResponse response, @RequestParam String schoolId) {
classScoreService.importExcel(response, schoolId);
public void importExcel(HttpServletResponse response, @RequestParam String classId) {
classScoreService.importExcel(response, classId);
}
@AnonymousAccess

@ -483,8 +483,9 @@ public class ProfitDistributionServiceImpl implements ProfitDistributionService
// 第一轮归还劣后级LP本金和银行利息
profitDistribution.setRoundSubordinatedLp(subordinatedLp);
profitDistribution.setRoundOwnFunds(rightOwnFunds);
profitDistribution.setRoundBankLoan(rightBankLoan);
residualIncome = residualIncome.subtract(subordinatedLp).subtract(rightBankLoan); //剩余收益
residualIncome = residualIncome.subtract(subordinatedLp).subtract(rightBankLoan).subtract(rightOwnFunds); //剩余收益
//2.剩余收益分配比例为自有资金25%优先级LP 30%劣后级LP 45%
BigDecimal twoRightOwnFunds = residualIncome.multiply(BigDecimal.valueOf(0.25)).setScale(2, RoundingMode.HALF_UP);//剩余自有资金
BigDecimal twoRightFundraisingAmount = residualIncome.multiply(BigDecimal.valueOf(0.3)).setScale(2, RoundingMode.HALF_UP);//剩余自有资金

@ -213,9 +213,9 @@ public class ClassScoreServiceImpl implements ClassScoreService {
* @Date 2023/11/27
*/
@Override
public void importExcel(HttpServletResponse response, String schoolId) {
public void importExcel(HttpServletResponse response, String classId) {
UserExample userTableExample = new UserExample();
userTableExample.createCriteria().andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4);
userTableExample.createCriteria().andClassIdEqualTo(classId).andRoleIdEqualTo(4);
List<User> userTables = userMapper.selectByExample(userTableExample);
List<UserDto> userDtoList = new ArrayList<>();
for (User userTable : userTables) {
@ -224,10 +224,10 @@ public class ClassScoreServiceImpl implements ClassScoreService {
Flow flow = flowMapper.selectByPrimaryKey(userTable.getUserid());
String flowId = flow.getFlowId();
TrainingReportExample trainingReportExample = new TrainingReportExample();
trainingReportExample.createCriteria().andFlowIdEqualTo(flowId).andSchoolIdEqualTo(schoolId);
trainingReportExample.createCriteria().andFlowIdEqualTo(flowId).andStepEqualTo(Constant.TZBG);
List<TrainingReport> trainingReports = reportMapper.selectByExample(trainingReportExample);
PerformanceScoreExample performanceScoreExample = new PerformanceScoreExample();
performanceScoreExample.createCriteria().andFlowIdEqualTo(flowId).andSchoolIdEqualTo(schoolId);
performanceScoreExample.createCriteria().andFlowIdEqualTo(flowId).andClassIdEqualTo(classId);
List<PerformanceScore> performanceScores = performanceScoreMapper.selectByExample(performanceScoreExample);
if (performanceScores.isEmpty()) {
continue;

@ -23,7 +23,7 @@ public interface ClassScoreService {
PageInfo<UserDto> getStudentScoreDetails(Integer index, Integer size, String schoolId, String classId, String studentIdOrName);
void importExcel(HttpServletResponse response, String schoolId);
void importExcel(HttpServletResponse response, String classId);
ResultEntity<HttpStatus> autoScore(String schoolId);

Loading…
Cancel
Save