|
@@ -169,8 +169,8 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
List<WelcomeFamily> wfs = new ArrayList<>();
|
|
List<WelcomeFamily> wfs = new ArrayList<>();
|
|
|
if (isr.getFvs() != null && isr.getFvs().size() > 0) {
|
|
if (isr.getFvs() != null && isr.getFvs().size() > 0) {
|
|
|
for (InsertFamilyRequest family : isr.getFvs()) {
|
|
for (InsertFamilyRequest family : isr.getFvs()) {
|
|
|
- if(!(StringUtils.hasText(family.getFamilyShip()) && StringUtils.hasText(family.getName())
|
|
|
|
|
- && StringUtils.hasText(family.getWorkUnit()) && StringUtils.hasText(family.getPhone()))){
|
|
|
|
|
|
|
+ if (!(StringUtils.hasText(family.getFamilyShip()) && StringUtils.hasText(family.getName())
|
|
|
|
|
+ && StringUtils.hasText(family.getWorkUnit()) && StringUtils.hasText(family.getPhone()))) {
|
|
|
return CommonResult.fail("家庭成员信息不能为空!");
|
|
return CommonResult.fail("家庭成员信息不能为空!");
|
|
|
}
|
|
}
|
|
|
WelcomeFamily wf = new WelcomeFamily();
|
|
WelcomeFamily wf = new WelcomeFamily();
|
|
@@ -188,7 +188,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
List<WelcomeAccompany> was = new ArrayList<>();
|
|
List<WelcomeAccompany> was = new ArrayList<>();
|
|
|
if (isr.getAvs() != null && isr.getAvs().size() > 0) {
|
|
if (isr.getAvs() != null && isr.getAvs().size() > 0) {
|
|
|
for (InsertAccompanyRequest accompany : isr.getAvs()) {
|
|
for (InsertAccompanyRequest accompany : isr.getAvs()) {
|
|
|
- if(!(StringUtils.hasText(accompany.getName()) && StringUtils.hasText(accompany.getPhone()))){
|
|
|
|
|
|
|
+ if (!(StringUtils.hasText(accompany.getName()) && StringUtils.hasText(accompany.getPhone()))) {
|
|
|
return CommonResult.fail("陪同人员信息不能为空!");
|
|
return CommonResult.fail("陪同人员信息不能为空!");
|
|
|
}
|
|
}
|
|
|
WelcomeAccompany wa = new WelcomeAccompany();
|
|
WelcomeAccompany wa = new WelcomeAccompany();
|
|
@@ -204,7 +204,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
//region 宿舍信息
|
|
//region 宿舍信息
|
|
|
WelcomeBed bedData = welcomeBedService.queryBedData(isr.getSchool(), isr.getBuildId(), isr.getDormitoryId(), Integer.valueOf(isr.getBed()));
|
|
WelcomeBed bedData = welcomeBedService.queryBedData(isr.getSchool(), isr.getBuildId(), isr.getDormitoryId(), Integer.valueOf(isr.getBed()));
|
|
|
if (bedData != null) {
|
|
if (bedData != null) {
|
|
|
- if(StringUtils.hasText(bedData.getStudentCard())){
|
|
|
|
|
|
|
+ if (StringUtils.hasText(bedData.getStudentCard())) {
|
|
|
return CommonResult.fail("当前床位已被他人入住,无法入住");
|
|
return CommonResult.fail("当前床位已被他人入住,无法入住");
|
|
|
}
|
|
}
|
|
|
bedData.setStudentCard(isr.getCardId());
|
|
bedData.setStudentCard(isr.getCardId());
|
|
@@ -324,8 +324,8 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
List<WelcomeFamily> wfs = new ArrayList<>();
|
|
List<WelcomeFamily> wfs = new ArrayList<>();
|
|
|
if (usr.getFvs() != null && usr.getFvs().size() > 0) {
|
|
if (usr.getFvs() != null && usr.getFvs().size() > 0) {
|
|
|
for (InsertFamilyRequest family : usr.getFvs()) {
|
|
for (InsertFamilyRequest family : usr.getFvs()) {
|
|
|
- if(!(StringUtils.hasText(family.getFamilyShip()) && StringUtils.hasText(family.getName())
|
|
|
|
|
- && StringUtils.hasText(family.getWorkUnit()) && StringUtils.hasText(family.getPhone()))){
|
|
|
|
|
|
|
+ if (!(StringUtils.hasText(family.getFamilyShip()) && StringUtils.hasText(family.getName())
|
|
|
|
|
+ && StringUtils.hasText(family.getWorkUnit()) && StringUtils.hasText(family.getPhone()))) {
|
|
|
return CommonResult.fail("家庭成员信息不能为空!");
|
|
return CommonResult.fail("家庭成员信息不能为空!");
|
|
|
}
|
|
}
|
|
|
WelcomeFamily wf = new WelcomeFamily();
|
|
WelcomeFamily wf = new WelcomeFamily();
|
|
@@ -343,7 +343,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
List<WelcomeAccompany> was = new ArrayList<>();
|
|
List<WelcomeAccompany> was = new ArrayList<>();
|
|
|
if (usr.getAvs() != null && usr.getAvs().size() > 0) {
|
|
if (usr.getAvs() != null && usr.getAvs().size() > 0) {
|
|
|
for (InsertAccompanyRequest accompany : usr.getAvs()) {
|
|
for (InsertAccompanyRequest accompany : usr.getAvs()) {
|
|
|
- if(!(StringUtils.hasText(accompany.getName()) && StringUtils.hasText(accompany.getPhone()))){
|
|
|
|
|
|
|
+ if (!(StringUtils.hasText(accompany.getName()) && StringUtils.hasText(accompany.getPhone()))) {
|
|
|
return CommonResult.fail("陪同人员信息不能为空!");
|
|
return CommonResult.fail("陪同人员信息不能为空!");
|
|
|
}
|
|
}
|
|
|
WelcomeAccompany wa = new WelcomeAccompany();
|
|
WelcomeAccompany wa = new WelcomeAccompany();
|
|
@@ -360,7 +360,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
List<WelcomeBed> bedDatas = new ArrayList<>();
|
|
List<WelcomeBed> bedDatas = new ArrayList<>();
|
|
|
WelcomeBed bedData = welcomeBedService.queryBedData(usr.getSchool(), usr.getBuildId(), usr.getDormitoryId(), Integer.valueOf(usr.getBed()));
|
|
WelcomeBed bedData = welcomeBedService.queryBedData(usr.getSchool(), usr.getBuildId(), usr.getDormitoryId(), Integer.valueOf(usr.getBed()));
|
|
|
if (bedData != null) {//新床位
|
|
if (bedData != null) {//新床位
|
|
|
- if(StringUtils.hasText(bedData.getStudentCard()) && !bedData.getStudentCard().equals(student.getCardId())){
|
|
|
|
|
|
|
+ if (StringUtils.hasText(bedData.getStudentCard()) && !bedData.getStudentCard().equals(student.getCardId())) {
|
|
|
return CommonResult.fail("当前床位已被他人入住,无法入住");
|
|
return CommonResult.fail("当前床位已被他人入住,无法入住");
|
|
|
}
|
|
}
|
|
|
if (!StringUtils.hasText(bedData.getStudentCard())) {
|
|
if (!StringUtils.hasText(bedData.getStudentCard())) {
|
|
@@ -589,7 +589,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
ws.setAdmissNum(icr.getAdmissNum());
|
|
ws.setAdmissNum(icr.getAdmissNum());
|
|
|
ws.setName(icr.getName());
|
|
ws.setName(icr.getName());
|
|
|
ws.setPicture(icr.getPicture());
|
|
ws.setPicture(icr.getPicture());
|
|
|
- ws.setCardId(icr.getCardId());
|
|
|
|
|
|
|
+ //ws.setCardId(icr.getCardId());
|
|
|
ws.setSex(icr.getSex());
|
|
ws.setSex(icr.getSex());
|
|
|
ws.setBirthday(icr.getBirthday());
|
|
ws.setBirthday(icr.getBirthday());
|
|
|
ws.setCollegeId(icr.getCollegeId());
|
|
ws.setCollegeId(icr.getCollegeId());
|
|
@@ -627,7 +627,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
List<WelcomeFamily> wfs = new ArrayList<>();
|
|
List<WelcomeFamily> wfs = new ArrayList<>();
|
|
|
if (icr.getFvs() != null && icr.getFvs().size() > 0) {
|
|
if (icr.getFvs() != null && icr.getFvs().size() > 0) {
|
|
|
for (FamilyVo fv : icr.getFvs()) {
|
|
for (FamilyVo fv : icr.getFvs()) {
|
|
|
- if(!(StringUtils.hasText(fv.getName()) && StringUtils.hasText(fv.getPhone()) && StringUtils.hasText(fv.getWorkUnit()) && StringUtils.hasText(fv.getFamilyShip()))){
|
|
|
|
|
|
|
+ if (!(StringUtils.hasText(fv.getName()) && StringUtils.hasText(fv.getPhone()) && StringUtils.hasText(fv.getWorkUnit()) && StringUtils.hasText(fv.getFamilyShip()))) {
|
|
|
return CommonResult.fail("家庭成员信息不能为空!");
|
|
return CommonResult.fail("家庭成员信息不能为空!");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -645,7 +645,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
List<WelcomeAccompany> was = new ArrayList<>();
|
|
List<WelcomeAccompany> was = new ArrayList<>();
|
|
|
if (icr.getAvs() != null && icr.getAvs().size() > 0) {
|
|
if (icr.getAvs() != null && icr.getAvs().size() > 0) {
|
|
|
for (AccompanyVo av : icr.getAvs()) {
|
|
for (AccompanyVo av : icr.getAvs()) {
|
|
|
- if(!(StringUtils.hasText(av.getName()) && StringUtils.hasText(av.getPhone()))){
|
|
|
|
|
|
|
+ if (!(StringUtils.hasText(av.getName()) && StringUtils.hasText(av.getPhone()))) {
|
|
|
return CommonResult.fail("家庭成员信息不能为空!");
|
|
return CommonResult.fail("家庭成员信息不能为空!");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -659,33 +659,49 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
System.out.println("信息采集1");
|
|
System.out.println("信息采集1");
|
|
|
- boolean resultWs = welcomeStudentService.saveOrUpdate(ws);
|
|
|
|
|
- System.out.println("信息采集1.2");
|
|
|
|
|
- if (!resultWs) {
|
|
|
|
|
- System.out.println("信息采集1.1");
|
|
|
|
|
- logger.error("采集学生信息失败,ws参数:" + JSON.toJSON(ws));
|
|
|
|
|
- throw new Exception("采集学生信息失败!");
|
|
|
|
|
- //return CommonResult.fail("采集学生信息失败1");
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (ws.getId() != null) {
|
|
|
|
|
+ int update = welcomeStudentService.updateWelcomeStudent(ws);
|
|
|
|
|
+ if (update < 0) {
|
|
|
|
|
+ System.out.println("信息采集1.1");
|
|
|
|
|
+ logger.error("采集学生信息失败,ws参数:" + JSON.toJSON(ws));
|
|
|
|
|
+ throw new Exception("采集学生信息失败!");
|
|
|
|
|
+ //return CommonResult.fail("采集学生信息失败1");
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ int insert = welcomeStudentService.insertWelcomeStudent(ws);
|
|
|
|
|
+ if (insert < 0) {
|
|
|
|
|
+ System.out.println("信息采集1.2");
|
|
|
|
|
+ logger.error("采集学生信息失败,ws参数:" + JSON.toJSON(ws));
|
|
|
|
|
+ throw new Exception("采集学生信息失败!");
|
|
|
|
|
+ //return CommonResult.fail("采集学生信息失败1");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
System.out.println("信息采集2");
|
|
System.out.println("信息采集2");
|
|
|
- boolean resultWf = welcomeFamilyService.saveBatch(wfs);
|
|
|
|
|
- System.out.println("信息采集1.3");
|
|
|
|
|
- if (!resultWf) {
|
|
|
|
|
- System.out.println("信息采集1.4");
|
|
|
|
|
- logger.error("采集学生信息失败,wfs参数:" + JSON.toJSON(wfs));
|
|
|
|
|
- throw new Exception("采集学生信息失败!");
|
|
|
|
|
- //return CommonResult.fail("采集学生信息失败2");
|
|
|
|
|
|
|
+ if (wfs != null && wfs.size() > 0) {
|
|
|
|
|
+ boolean resultWf = welcomeFamilyService.saveBatch(wfs);
|
|
|
|
|
+ System.out.println("信息采集1.3");
|
|
|
|
|
+ if (!resultWf) {
|
|
|
|
|
+ System.out.println("信息采集1.4");
|
|
|
|
|
+ logger.error("采集学生信息失败,wfs参数:" + JSON.toJSON(wfs));
|
|
|
|
|
+ throw new Exception("采集学生信息失败!");
|
|
|
|
|
+ //return CommonResult.fail("采集学生信息失败2");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
System.out.println("信息采集3");
|
|
System.out.println("信息采集3");
|
|
|
- boolean resultWa = welcomeAccompanyService.saveBatch(was);
|
|
|
|
|
- System.out.println("信息采集1.5");
|
|
|
|
|
- if (!resultWa) {
|
|
|
|
|
- System.out.println("信息采集1.6");
|
|
|
|
|
- logger.error("采集学生信息失败,was参数:" + JSON.toJSON(was));
|
|
|
|
|
- throw new Exception("采集学生信息失败!");
|
|
|
|
|
- //return CommonResult.fail("采集学生信息失败3");
|
|
|
|
|
|
|
+ if (was != null && was.size() > 0) {
|
|
|
|
|
+ boolean resultWa = welcomeAccompanyService.saveBatch(was);
|
|
|
|
|
+ System.out.println("信息采集1.5");
|
|
|
|
|
+ if (!resultWa) {
|
|
|
|
|
+ System.out.println("信息采集1.6");
|
|
|
|
|
+ logger.error("采集学生信息失败,was参数:" + JSON.toJSON(was));
|
|
|
|
|
+ throw new Exception("采集学生信息失败!");
|
|
|
|
|
+ //return CommonResult.fail("采集学生信息失败3");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
logger.error(e.getMessage());
|
|
logger.error(e.getMessage());
|
|
|
throw new Exception("采集失败!");
|
|
throw new Exception("采集失败!");
|
|
@@ -939,7 +955,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
WelcomeStudent studentData = new WelcomeStudent();
|
|
WelcomeStudent studentData = new WelcomeStudent();
|
|
|
|
|
|
|
|
String assNum = dataFormatter.formatCellValue(row.getCell(1));//录取号
|
|
String assNum = dataFormatter.formatCellValue(row.getCell(1));//录取号
|
|
|
- if(!StringUtils.hasText(assNum)){
|
|
|
|
|
|
|
+ if (!StringUtils.hasText(assNum)) {
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
studentData.setAdmissNum(assNum);
|
|
studentData.setAdmissNum(assNum);
|
|
@@ -1201,7 +1217,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
|
|
|
|
|
String assNum = dataFormatter.formatCellValue(row.getCell(1));//录取号
|
|
String assNum = dataFormatter.formatCellValue(row.getCell(1));//录取号
|
|
|
|
|
|
|
|
- if(!StringUtils.hasText(assNum)){
|
|
|
|
|
|
|
+ if (!StringUtils.hasText(assNum)) {
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
studentData.setAdmissNum(assNum);
|
|
studentData.setAdmissNum(assNum);
|
|
@@ -1403,25 +1419,25 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
public CommonResult studentOverview() {
|
|
public CommonResult studentOverview() {
|
|
|
|
|
|
|
|
QueryWrapper<WelcomeStudent> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<WelcomeStudent> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("iden_type",1);
|
|
|
|
|
- queryWrapper.eq("fill_status","已填报");
|
|
|
|
|
|
|
+ queryWrapper.eq("iden_type", 1);
|
|
|
|
|
+ queryWrapper.eq("fill_status", "已填报");
|
|
|
// 报到总数
|
|
// 报到总数
|
|
|
int studentTotal = welcomeStudentService.count(queryWrapper);
|
|
int studentTotal = welcomeStudentService.count(queryWrapper);
|
|
|
// 寝室总数
|
|
// 寝室总数
|
|
|
int dormitoryTotal = welcomeDormitoryService.count(new QueryWrapper<>());
|
|
int dormitoryTotal = welcomeDormitoryService.count(new QueryWrapper<>());
|
|
|
|
|
|
|
|
- int payCount=welcomeStudentService.payCount();
|
|
|
|
|
|
|
+ int payCount = welcomeStudentService.payCount();
|
|
|
// 已入住寝室数
|
|
// 已入住寝室数
|
|
|
- LambdaQueryWrapper<WelcomeDormitory> wrapper=new LambdaQueryWrapper<>();
|
|
|
|
|
- wrapper.ne(WelcomeDormitory::getStatus,2);
|
|
|
|
|
|
|
+ LambdaQueryWrapper<WelcomeDormitory> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
+ wrapper.ne(WelcomeDormitory::getStatus, 2);
|
|
|
int count = welcomeDormitoryService.count(wrapper);
|
|
int count = welcomeDormitoryService.count(wrapper);
|
|
|
|
|
|
|
|
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");
|
|
DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
- Integer visitorTotal=welcomeVisitorService.countTotal(start,end);
|
|
|
|
|
|
|
+ Integer visitorTotal = welcomeVisitorService.countTotal(start, end);
|
|
|
List<WelcomeSetting> wss = welcomeSettingService.list(null);
|
|
List<WelcomeSetting> wss = welcomeSettingService.list(null);
|
|
|
- Integer carTotal =wss !=null && wss.size() > 0 ? wss.get(0).getCarNum() : 0;
|
|
|
|
|
|
|
+ Integer carTotal = wss != null && wss.size() > 0 ? wss.get(0).getCarNum() : 0;
|
|
|
|
|
|
|
|
StudentOverviewVo vo = new StudentOverviewVo();
|
|
StudentOverviewVo vo = new StudentOverviewVo();
|
|
|
vo.setEnrollmentTotal(6532);
|
|
vo.setEnrollmentTotal(6532);
|
|
@@ -1477,10 +1493,10 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
List<WelcomeSchool> list = welcomeSchoolService.list(new QueryWrapper<>());
|
|
List<WelcomeSchool> list = welcomeSchoolService.list(new QueryWrapper<>());
|
|
|
for (WelcomeSchool welcomeSchool : list) {
|
|
for (WelcomeSchool welcomeSchool : list) {
|
|
|
Integer schoolId = welcomeSchool.getId();
|
|
Integer schoolId = welcomeSchool.getId();
|
|
|
- List<WelcomeBuild> builds=welcomeBuildService.getBuild(schoolId);
|
|
|
|
|
|
|
+ List<WelcomeBuild> builds = welcomeBuildService.getBuild(schoolId);
|
|
|
for (WelcomeBuild build : builds) {
|
|
for (WelcomeBuild build : builds) {
|
|
|
Integer buildId = build.getId();
|
|
Integer buildId = build.getId();
|
|
|
- StudentStayVo vo =welcomeDormitoryService.getTotalCount(buildId);
|
|
|
|
|
|
|
+ StudentStayVo vo = welcomeDormitoryService.getTotalCount(buildId);
|
|
|
vo.setSchoolName(welcomeSchool.getSchool());
|
|
vo.setSchoolName(welcomeSchool.getSchool());
|
|
|
vo.setBuildName(build.getBuild());
|
|
vo.setBuildName(build.getBuild());
|
|
|
vos.add(vo);
|
|
vos.add(vo);
|
|
@@ -1491,7 +1507,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public CommonResult queryStudentByToken( String userId) {
|
|
|
|
|
|
|
+ public CommonResult queryStudentByToken(String userId) {
|
|
|
WelcomeStudent student = welcomeStudentService.getManageById(Integer.valueOf(userId));
|
|
WelcomeStudent student = welcomeStudentService.getManageById(Integer.valueOf(userId));
|
|
|
return CommonResult.ok(student);
|
|
return CommonResult.ok(student);
|
|
|
}
|
|
}
|