|
|
@@ -1760,21 +1760,30 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
String nstartTime = null;
|
|
|
String nendTime = null;
|
|
|
boolean lastYear = TimeExchange.CompareDate(TimeExchange.getDate(), TimeExchange.getYear() + "-07-01", "yyyy-MM-dd");
|
|
|
+
|
|
|
+// 获取年份
|
|
|
+ String yearStr="";
|
|
|
+
|
|
|
if (yearId == null) {
|
|
|
Integer yearInt = Integer.valueOf(TimeExchange.getYear());
|
|
|
//当前时间小于本年度的7月1日 说明要查去年的数据
|
|
|
if (lastYear) {
|
|
|
+ yearStr=(yearInt - 1) +"级新生";
|
|
|
nstartTime = (yearInt - 1) + "-06-01";
|
|
|
nendTime = yearInt + "-06-01";
|
|
|
} else {
|
|
|
+ yearStr=yearInt +"级新生";
|
|
|
nstartTime = yearInt + "-06-01";
|
|
|
nendTime = (yearInt + 1) + "-06-01";
|
|
|
}
|
|
|
} else {
|
|
|
+ yearStr=yearId +"级新生";
|
|
|
nstartTime = yearId + "-06-01";
|
|
|
nendTime = (yearId + 1) + "-06-01";
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
//获取学生总数
|
|
|
int enrollmentTotal = welcomeStudentService.studentTotalCount(collegeId, nstartTime, nendTime);
|
|
|
//录取总数
|
|
|
@@ -1782,27 +1791,57 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
//queryWrapper.eq(WelcomeStudent::getIdenType,1);
|
|
|
//int enrollmentTotal = 8085;//welcomeStudentService.count(queryWrapper);
|
|
|
|
|
|
- //缴费人数
|
|
|
+ //全部缴费人数
|
|
|
int payCount = welcomeStudentService.payCount(collegeId, nstartTime, nendTime);
|
|
|
- //缴费率
|
|
|
+
|
|
|
+ //全部缴费率
|
|
|
Double rate = enrollmentTotal <= 0 ? 0 : ((double) payCount / enrollmentTotal) * 100;
|
|
|
String payRate = String.format("%.2f", rate);
|
|
|
|
|
|
+// 部分缴费人数,支付状态未缴费,并且实付金额大于0
|
|
|
+ int portionPayCount = welcomeStudentService.payPortionCount(collegeId, nstartTime, nendTime);
|
|
|
+
|
|
|
+ // 部分缴费率
|
|
|
+ Double portionRate = enrollmentTotal <= 0 ? 0 : ((double) portionPayCount / enrollmentTotal) * 100;
|
|
|
+ String portionPayRate = String.format("%.2f", portionRate);
|
|
|
+
|
|
|
+// 总缴费人数(包括部分缴费人数)
|
|
|
+ int totalPayCount =payCount+portionPayCount;
|
|
|
+
|
|
|
+// 总缴费率(包括部分缴费)
|
|
|
+ Double totalRate=enrollmentTotal <= 0 ? 0 : ((double) totalPayCount / enrollmentTotal) * 100;
|
|
|
+ String totalPayRate = String.format("%.2f", totalRate);
|
|
|
+
|
|
|
+
|
|
|
+// 现场报到总人数
|
|
|
+ int registrationCount = welcomeStudentService.registrationCount(collegeId, nstartTime, nendTime);
|
|
|
+ Double result = enrollmentTotal <= 0 ? 0 : ((double) registrationCount / enrollmentTotal) * 100;
|
|
|
+ String registrationRate = String.format("%.2f", result);
|
|
|
+
|
|
|
+// 未报道人数
|
|
|
+ int notRegistrationCount=enrollmentTotal-registrationCount;
|
|
|
+
|
|
|
+// 已缴费但未现场报到人数
|
|
|
+ int payNotRegistrationCount=welcomeStudentService.payNotRegistrationCount(collegeId, nstartTime, nendTime);
|
|
|
+
|
|
|
+// 已缴费但未现场报到比率
|
|
|
+ Double payNotReportCountRate = enrollmentTotal <= 0 ? 0 : ((double) payNotRegistrationCount / enrollmentTotal) * 100;
|
|
|
+ String payNotRegistrationRate = String.format("%.2f", payNotReportCountRate);
|
|
|
|
|
|
//已入住寝室数
|
|
|
- LambdaQueryWrapper<WelcomeBed> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(WelcomeBed::getIsCheck, 1)
|
|
|
- .eq(WelcomeBed::getRetentionState, 1)
|
|
|
- .eq(ObjectUtils.isNotEmpty(collegeId), WelcomeBed::getCollegeId, collegeId);
|
|
|
- wrapper.between(WelcomeBed::getCreateTime, nstartTime, nendTime);
|
|
|
- int checkInBedTotal = welcomeBedService.count(wrapper);
|
|
|
+// LambdaQueryWrapper<WelcomeBed> wrapper = new LambdaQueryWrapper<>();
|
|
|
+// wrapper.eq(WelcomeBed::getIsCheck, 1)
|
|
|
+// .eq(WelcomeBed::getRetentionState, 1)
|
|
|
+// .eq(ObjectUtils.isNotEmpty(collegeId), WelcomeBed::getCollegeId, collegeId);
|
|
|
+// wrapper.between(WelcomeBed::getCreateTime, nstartTime, nendTime);
|
|
|
+// int checkInBedTotal = welcomeBedService.count(wrapper);
|
|
|
|
|
|
//报到率
|
|
|
//BigDecimal total = new BigDecimal(enrollmentTotal);
|
|
|
//BigDecimal bedTotal = new BigDecimal(checkInBedTotal);
|
|
|
//BigDecimal bigDecimal = bedTotal.divide(total).setScale(4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
|
|
|
- Double result = enrollmentTotal <= 0 ? 0 : ((double) checkInBedTotal / enrollmentTotal) * 100;
|
|
|
- String registrationRate = String.format("%.2f", result);
|
|
|
+// Double result = enrollmentTotal <= 0 ? 0 : ((double) checkInBedTotal / enrollmentTotal) * 100;
|
|
|
+// String registrationRate = String.format("%.2f", result);
|
|
|
|
|
|
|
|
|
LocalDateTime start = LocalDateTime.now().withHour(0).withMinute(0).withSecond(0);
|
|
|
@@ -1821,14 +1860,39 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
Integer hCarTotal = wss != null && wss.size() > 0 ? (wss.get(0).getHjhCarNum() == null ? 0 : wss.get(0).getHjhCarNum()) : 0;
|
|
|
|
|
|
StudentOverviewVo vo = new StudentOverviewVo();
|
|
|
+// 总人数
|
|
|
vo.setEnrollmentTotal(enrollmentTotal);
|
|
|
+// 年份字段
|
|
|
+ vo.setYearStr(yearStr);
|
|
|
+// 现场报到人数
|
|
|
+ vo.setRegistrationCount(registrationCount);
|
|
|
+// 现场报到率
|
|
|
+ vo.setRegistrationRate(registrationRate);
|
|
|
+// 未报到人数
|
|
|
+ vo.setNotRegistrationCount(notRegistrationCount);
|
|
|
+// 总缴费人数(包括部分缴费)
|
|
|
+ vo.setTotalPayCount(totalPayCount);
|
|
|
+// 总缴费率(包括部分缴费)
|
|
|
+ vo.setTotalPayRate(totalPayRate);
|
|
|
+// 全部缴费人数
|
|
|
vo.setPayCount(payCount);
|
|
|
+// 全部缴费率
|
|
|
vo.setPayRate(payRate);
|
|
|
- vo.setCheckInBedTotal(checkInBedTotal);
|
|
|
- vo.setRegistrationRate(registrationRate);
|
|
|
+// 部分缴费人数
|
|
|
+ vo.setPortionPayCount(portionPayCount);
|
|
|
+// 部分缴费率
|
|
|
+ vo.setPortionPayRate(portionPayRate);
|
|
|
+// 已缴费未报到人数
|
|
|
+ vo.setPayNotRegistrationCount(payNotRegistrationCount);
|
|
|
+// 已缴费未报到率
|
|
|
+ vo.setPayNotRegistrationRate(payNotRegistrationRate);
|
|
|
+// 黄家湖当日剩余总数
|
|
|
vo.setHCarTotal(hCarTotal - hVisitorTotal);
|
|
|
+// 黄家湖当日预定数
|
|
|
vo.setHVisitorTotal(hVisitorTotal);
|
|
|
+// 墨轩湖当日剩余数
|
|
|
vo.setMCarTotal(mCarTotal - mVisitorTotal);
|
|
|
+// 墨轩湖当日预定数
|
|
|
vo.setMVisitorTotal(mVisitorTotal);
|
|
|
return CommonResult.ok(vo);
|
|
|
}
|