|
@@ -47,6 +47,7 @@ import java.io.IOException;
|
|
|
import java.io.InputStream;
|
|
import java.io.InputStream;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
import java.math.BigInteger;
|
|
import java.math.BigInteger;
|
|
|
|
|
+import java.math.RoundingMode;
|
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
@@ -1469,36 +1470,49 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
@Override
|
|
@Override
|
|
|
public CommonResult studentOverview() {
|
|
public CommonResult studentOverview() {
|
|
|
|
|
|
|
|
- QueryWrapper<WelcomeStudent> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
- queryWrapper.eq("iden_type", 1);
|
|
|
|
|
- queryWrapper.eq("fill_status", "已填报");
|
|
|
|
|
-// 报到总数
|
|
|
|
|
- int studentTotal = welcomeStudentService.count(queryWrapper);
|
|
|
|
|
-// 寝室总数
|
|
|
|
|
- int dormitoryTotal = welcomeDormitoryService.count(new QueryWrapper<>());
|
|
|
|
|
|
|
+// 录取总数
|
|
|
|
|
+ LambdaQueryWrapper<WelcomeStudent> queryWrapper=new LambdaQueryWrapper<>();
|
|
|
|
|
+ queryWrapper.eq(WelcomeStudent::getIdenType,1);
|
|
|
|
|
+ int enrollmentTotal = welcomeStudentService.count(queryWrapper);
|
|
|
|
|
|
|
|
|
|
+// 缴费人数
|
|
|
int payCount = welcomeStudentService.payCount();
|
|
int payCount = welcomeStudentService.payCount();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 已入住寝室数
|
|
// 已入住寝室数
|
|
|
- LambdaQueryWrapper<WelcomeDormitory> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
- wrapper.ne(WelcomeDormitory::getStatus, 2);
|
|
|
|
|
- int count = welcomeDormitoryService.count(wrapper);
|
|
|
|
|
|
|
+ LambdaQueryWrapper<WelcomeBed> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
+ wrapper.eq(WelcomeBed::getIsCheck, 1)
|
|
|
|
|
+ .eq(WelcomeBed::getRetentionState,1);
|
|
|
|
|
+ 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 registrationRate = bigDecimal.doubleValue();
|
|
|
|
|
+
|
|
|
|
|
|
|
|
LocalDateTime start = LocalDateTime.now().withHour(0).withMinute(0).withSecond(0);
|
|
LocalDateTime start = LocalDateTime.now().withHour(0).withMinute(0).withSecond(0);
|
|
|
LocalDateTime end = start.plusDays(1);
|
|
LocalDateTime end = start.plusDays(1);
|
|
|
- DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
- Integer visitorTotal = welcomeVisitorService.countTotal(start, end);
|
|
|
|
|
|
|
+ Integer mVisitorTotal = welcomeVisitorService.countTotal(start, end,1);
|
|
|
|
|
+ Integer hVisitorTotal = welcomeVisitorService.countTotal(start, end,2);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
List<WelcomeSetting> wss = welcomeSettingService.list(null);
|
|
List<WelcomeSetting> wss = welcomeSettingService.list(null);
|
|
|
- Integer carTotal = wss != null && wss.size() > 0 ? (wss.get(0).getMxhCarNum() == null ? 0 : wss.get(0).getMxhCarNum()) : 0;
|
|
|
|
|
|
|
+// 墨轩湖总车辆数
|
|
|
|
|
+ Integer mCarTotal = wss != null && wss.size() > 0 ? (wss.get(0).getMxhCarNum() == null ? 0 : wss.get(0).getMxhCarNum()) : 0;
|
|
|
|
|
+// 黄家湖总车辆数
|
|
|
|
|
+ Integer hCarTotal = wss != null && wss.size() > 0 ? (wss.get(0).getHjhCarNum() == null ? 0 : wss.get(0).getHjhCarNum()) : 0;
|
|
|
|
|
|
|
|
StudentOverviewVo vo = new StudentOverviewVo();
|
|
StudentOverviewVo vo = new StudentOverviewVo();
|
|
|
- vo.setEnrollmentTotal(6532);
|
|
|
|
|
- vo.setStudentTotal(studentTotal);
|
|
|
|
|
|
|
+ vo.setEnrollmentTotal(enrollmentTotal);
|
|
|
vo.setPayCount(payCount);
|
|
vo.setPayCount(payCount);
|
|
|
- vo.setDormitoryTotal(dormitoryTotal);
|
|
|
|
|
- vo.setCheckInTotal(count);
|
|
|
|
|
- vo.setVisitorTotal(visitorTotal);
|
|
|
|
|
- vo.setCarTotal(carTotal);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ vo.setCheckInBedTotal(checkInBedTotal);
|
|
|
|
|
+ vo.setRegistrationRate(registrationRate);
|
|
|
|
|
+ vo.setHCarTotal(hCarTotal);
|
|
|
|
|
+ vo.setHVisitorTotal(hVisitorTotal);
|
|
|
|
|
+ vo.setMCarTotal(mCarTotal);
|
|
|
|
|
+ vo.setMVisitorTotal(mVisitorTotal);
|
|
|
return CommonResult.ok(vo);
|
|
return CommonResult.ok(vo);
|
|
|
}
|
|
}
|
|
|
|
|
|