|
|
@@ -7,6 +7,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.template.annotation.AWelcomeLevelLog;
|
|
|
+import com.template.annotation.AWelcomeLog;
|
|
|
+import com.template.annotation.AWelcomeLogMode;
|
|
|
+import com.template.annotation.AWelcomeTypeLog;
|
|
|
import com.template.api.WelcomeStudentControllerAPI;
|
|
|
import com.template.common.utils.*;
|
|
|
import com.template.model.enumModel.eFileType;
|
|
|
@@ -106,6 +110,10 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
private static Logger logger = LoggerFactory.getLogger(WelcomeStudentController.class);
|
|
|
|
|
|
@Override
|
|
|
+ @AWelcomeLog("新增学生信息管理")
|
|
|
+ @AWelcomeTypeLog("新增")
|
|
|
+ @AWelcomeLogMode("学生信息管理")
|
|
|
+ @AWelcomeLevelLog("信息")
|
|
|
@Transactional(rollbackFor = {Exception.class})
|
|
|
public CommonResult insertStudentInfo(InsertStudentRequest isr, BindingResult bindingResult) throws Exception {
|
|
|
|
|
|
@@ -285,6 +293,10 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @AWelcomeLog("编辑学生信息管理")
|
|
|
+ @AWelcomeTypeLog("编辑")
|
|
|
+ @AWelcomeLogMode("学生信息管理")
|
|
|
+ @AWelcomeLevelLog("信息")
|
|
|
public CommonResult updateStudentInfo(updateStudentRequest usr, BindingResult bindingResult) throws Exception {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -478,7 +490,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public CommonResult queryPageStudents(String userId, int currentPage, int pageCount, Integer collegeId, Integer majorId, Integer classstrId, String trafficMethod, String name, String fillStatus, Integer isRegistered,Integer isPay,Integer isCheck,String school,String batchValue,Integer carNumber) {
|
|
|
+ public CommonResult queryPageStudents(String userId, int currentPage, int pageCount, Integer collegeId, Integer majorId, Integer classstrId, String trafficMethod, String name, String fillStatus, Integer isRegistered, Integer isPay, Integer isCheck, String school, String batchValue, Integer carNumber) {
|
|
|
IPage<StudentPageVo> pages = new Page<>();
|
|
|
PageUtils<StudentPageVo> result = new PageUtils<>(pages);
|
|
|
WelcomeAccount wa = welcomeAccountService.getManageById(userId);
|
|
|
@@ -496,7 +508,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
collegeIds.add(String.valueOf(collegeId));
|
|
|
}
|
|
|
}
|
|
|
- result = welcomeStudentService.queryStudentPageList(currentPage, pageCount, collegeIds, majorId, classstrId, trafficMethod, name, fillStatus, isRegistered,isPay,isCheck,school,batchValue,carNumber);
|
|
|
+ result = welcomeStudentService.queryStudentPageList(currentPage, pageCount, collegeIds, majorId, classstrId, trafficMethod, name, fillStatus, isRegistered, isPay, isCheck, school, batchValue, carNumber);
|
|
|
return CommonResult.ok(result);
|
|
|
}
|
|
|
|
|
|
@@ -623,6 +635,10 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @AWelcomeLog("采集学生信息管理")
|
|
|
+ @AWelcomeTypeLog("编辑")
|
|
|
+ @AWelcomeLogMode("学生信息管理")
|
|
|
+ @AWelcomeLevelLog("信息")
|
|
|
@Transactional(rollbackFor = {Exception.class})
|
|
|
public CommonResult infoCollection(InfoCollectionRequest icr, BindingResult bindingResult) throws Exception {
|
|
|
logger.info("采集学生信息失败,icr参数:" + JSON.toJSON(icr));
|
|
|
@@ -804,6 +820,10 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @AWelcomeLog("删除学生信息管理")
|
|
|
+ @AWelcomeTypeLog("删除")
|
|
|
+ @AWelcomeLogMode("学生信息管理")
|
|
|
+ @AWelcomeLevelLog("警告")
|
|
|
@Transactional(rollbackFor = {Exception.class})
|
|
|
public CommonResult deleteStudentInfo(int id) throws Exception {
|
|
|
System.out.println("删除了学生信息:" + id);
|
|
|
@@ -867,6 +887,10 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @AWelcomeLog("导入学生信息管理")
|
|
|
+ @AWelcomeTypeLog("导入")
|
|
|
+ @AWelcomeLogMode("学生信息管理")
|
|
|
+ @AWelcomeLevelLog("信息")
|
|
|
public CommonResult importStudentExcel(MultipartFile file) throws IOException, ParseException {
|
|
|
System.out.println("导入学生信息");
|
|
|
if (file.isEmpty() || file.getSize() == 0) {
|
|
|
@@ -1523,7 +1547,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void welcomeStudentExport(String userId, HttpServletResponse response, Integer collegeId, Integer majorId, Integer classstrId, String trafficMethod, String name, String fillStatus,Integer isRegistered,Integer isPay,Integer isCheck,String school,String batchValue,Integer carNumber) {
|
|
|
+ public void welcomeStudentExport(String userId, HttpServletResponse response, Integer collegeId, Integer majorId, Integer classstrId, String trafficMethod, String name, String fillStatus, Integer isRegistered, Integer isPay, Integer isCheck, String school, String batchValue, Integer carNumber) {
|
|
|
Workbook workbook = new XSSFWorkbook();
|
|
|
Sheet sheet = workbook.createSheet("学生信息");
|
|
|
WelcomeAccount wa = welcomeAccountService.getManageById(userId);
|
|
|
@@ -1542,8 +1566,10 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- List<StudentPageVo> result = welcomeStudentService.queryStudentList(collegeIds, majorId, classstrId, trafficMethod, name, fillStatus,isRegistered,isPay,isCheck,school,batchValue,carNumber);
|
|
|
+ List<StudentPageVo> result = welcomeStudentService.queryStudentList(collegeIds, majorId, classstrId, trafficMethod, name, fillStatus, isRegistered, isPay, isCheck, school, batchValue, carNumber);
|
|
|
//导出
|
|
|
+ DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ DateTimeFormatter dateTimeFormatter2 = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
|
|
Row headerRow = sheet.createRow(0);
|
|
|
headerRow.createCell(0).setCellValue("序号");
|
|
|
@@ -1565,6 +1591,8 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
headerRow.createCell(16).setCellValue("学生手机号");
|
|
|
headerRow.createCell(17).setCellValue("家长名称");
|
|
|
headerRow.createCell(18).setCellValue("家长手机号");
|
|
|
+ headerRow.createCell(19).setCellValue("到站日期");
|
|
|
+ headerRow.createCell(20).setCellValue("是否已报到");
|
|
|
|
|
|
for (int i = 0; i < result.size(); i++) {
|
|
|
StudentPageVo studentData = result.get(i);
|
|
|
@@ -1588,6 +1616,20 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
dataRow.createCell(16).setCellValue(studentData.getPhone());
|
|
|
dataRow.createCell(17).setCellValue(studentData.getFamilyName());
|
|
|
dataRow.createCell(18).setCellValue(studentData.getFamilyPhone());
|
|
|
+ if (ObjectUtils.isNotEmpty(studentData.getArrvieDate())) {
|
|
|
+ String arrvieDate = LocalDateTime.parse(studentData.getArrvieDate(), dateTimeFormatter1).toLocalDate().format(dateTimeFormatter2);
|
|
|
+ dataRow.createCell(19).setCellValue(arrvieDate);
|
|
|
+ }
|
|
|
+ String registered="未报到";
|
|
|
+ if (ObjectUtils.isNotEmpty(studentData.getIsRegistered())) {
|
|
|
+ Integer isRegistered1 = studentData.getIsRegistered();
|
|
|
+ if (isRegistered1==1) {
|
|
|
+ registered="已报到";
|
|
|
+ }else if (isRegistered1==2){
|
|
|
+ registered="未报到";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ dataRow.createCell(20).setCellValue(registered);
|
|
|
}
|
|
|
// 将工作簿写入文件
|
|
|
ExcelUtils.excelDownload(workbook, "学生信息.xlsx", response);
|
|
|
@@ -1596,7 +1638,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
@Override
|
|
|
public CommonResult studentOverview(Integer collegeId) {
|
|
|
// 获取学生总数
|
|
|
- int enrollmentTotal=welcomeStudentService.studentTotalCount(collegeId);
|
|
|
+ int enrollmentTotal = welcomeStudentService.studentTotalCount(collegeId);
|
|
|
// 录取总数
|
|
|
// LambdaQueryWrapper<WelcomeStudent> queryWrapper=new LambdaQueryWrapper<>();
|
|
|
// queryWrapper.eq(WelcomeStudent::getIdenType,1);
|
|
|
@@ -1613,7 +1655,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
LambdaQueryWrapper<WelcomeBed> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.eq(WelcomeBed::getIsCheck, 1)
|
|
|
.eq(WelcomeBed::getRetentionState, 1)
|
|
|
- .eq(ObjectUtils.isNotEmpty(collegeId),WelcomeBed::getCollegeId,collegeId);
|
|
|
+ .eq(ObjectUtils.isNotEmpty(collegeId), WelcomeBed::getCollegeId, collegeId);
|
|
|
int checkInBedTotal = welcomeBedService.count(wrapper);
|
|
|
|
|
|
// 报到率
|
|
|
@@ -1656,7 +1698,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
@Override
|
|
|
public CommonResult studentRegister(Integer collegeId) {
|
|
|
// 学生总数
|
|
|
- int enrollmentTotal=welcomeStudentService.studentTotalCount(collegeId);
|
|
|
+ int enrollmentTotal = welcomeStudentService.studentTotalCount(collegeId);
|
|
|
// 获取总数
|
|
|
Integer count = welcomeStudentService.totalCount(collegeId);
|
|
|
// 获取比例
|
|
|
@@ -1937,6 +1979,10 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @AWelcomeLog("学生报到")
|
|
|
+ @AWelcomeTypeLog("编辑")
|
|
|
+ @AWelcomeLogMode("学生信息管理")
|
|
|
+ @AWelcomeLevelLog("信息")
|
|
|
public CommonResult isRegistered(WelcomeStudent welcomeStudent) {
|
|
|
boolean update = welcomeStudentService.updateById(welcomeStudent);
|
|
|
return update ? CommonResult.ok() : CommonResult.fail();
|
|
|
@@ -1945,7 +1991,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
@Override
|
|
|
public CommonResult levelRegister(Integer collegeId) {
|
|
|
// 获取学生总数
|
|
|
- int enrollmentTotal=welcomeStudentService.studentTotalCount(collegeId);
|
|
|
+ int enrollmentTotal = welcomeStudentService.studentTotalCount(collegeId);
|
|
|
|
|
|
// 获取报到总数
|
|
|
Integer count = welcomeStudentService.totalCount(collegeId);
|
|
|
@@ -1958,16 +2004,16 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
vo.setRate(rate);
|
|
|
vo.setTotalCount(enrollmentTotal);
|
|
|
|
|
|
- String bk="本科";
|
|
|
- String zsb="专升本";
|
|
|
- String zk="专科";
|
|
|
+ String bk = "本科";
|
|
|
+ String zsb = "专升本";
|
|
|
+ String zk = "专科";
|
|
|
|
|
|
// 获取总本科人数
|
|
|
- Integer bkCount = welcomeStudentService.getLevelTotalCount(bk,collegeId);
|
|
|
+ Integer bkCount = welcomeStudentService.getLevelTotalCount(bk, collegeId);
|
|
|
// 获取总专升本人数
|
|
|
- Integer zsbCount = welcomeStudentService.getLevelTotalCount(zsb,collegeId);
|
|
|
+ Integer zsbCount = welcomeStudentService.getLevelTotalCount(zsb, collegeId);
|
|
|
// 获取总专科人数
|
|
|
- Integer zkCount = welcomeStudentService.getLevelTotalCount(zk,collegeId);
|
|
|
+ Integer zkCount = welcomeStudentService.getLevelTotalCount(zk, collegeId);
|
|
|
|
|
|
List<StudentRegisterVo> vos = welcomeStudentService.levelRegister(collegeId);
|
|
|
HashMap<String, StudentRegisterVo> map = new HashMap<>();
|
|
|
@@ -1978,12 +2024,12 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
String rate1 = String.format("%.2f", result1);
|
|
|
studentRegisterVo.setRate(rate1);
|
|
|
studentRegisterVo.setTotalCount(bkCount);
|
|
|
- }else if (studentRegisterVo.getName().equals(zsb)){
|
|
|
+ } else if (studentRegisterVo.getName().equals(zsb)) {
|
|
|
Double result1 = ((double) count1 / zsbCount) * 100;
|
|
|
String rate1 = String.format("%.2f", result1);
|
|
|
studentRegisterVo.setRate(rate1);
|
|
|
studentRegisterVo.setTotalCount(zsbCount);
|
|
|
- }else if (studentRegisterVo.getName().equals(zk)){
|
|
|
+ } else if (studentRegisterVo.getName().equals(zk)) {
|
|
|
Double result1 = ((double) count1 / zkCount) * 100;
|
|
|
String rate1 = String.format("%.2f", result1);
|
|
|
studentRegisterVo.setRate(rate1);
|