|
@@ -14,10 +14,7 @@ import com.template.model.request.InsertWelcomeBedRequest;
|
|
|
import com.template.model.request.UpdateWelcomeBedRequest;
|
|
import com.template.model.request.UpdateWelcomeBedRequest;
|
|
|
import com.template.model.result.CommonResult;
|
|
import com.template.model.result.CommonResult;
|
|
|
import com.template.model.result.PageUtils;
|
|
import com.template.model.result.PageUtils;
|
|
|
-import com.template.model.vo.BedDetailsVo;
|
|
|
|
|
-import com.template.model.vo.ListVo;
|
|
|
|
|
-import com.template.model.vo.StudentPageVo;
|
|
|
|
|
-import com.template.model.vo.WelcomeBedCheckVo;
|
|
|
|
|
|
|
+import com.template.model.vo.*;
|
|
|
import com.template.services.*;
|
|
import com.template.services.*;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFRow;
|
|
import org.apache.poi.hssf.usermodel.HSSFRow;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
|
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
|
@@ -684,5 +681,43 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
}
|
|
|
return CommonResult.ok(vo);
|
|
return CommonResult.ok(vo);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public CommonResult batchOperationBed(BatchOperationBedVo batchOperationVo) {
|
|
|
|
|
+ List<Integer> bedIds = batchOperationVo.getBedIds();
|
|
|
|
|
+ LambdaQueryWrapper<WelcomeBed> wrapper=new LambdaQueryWrapper<>();
|
|
|
|
|
+ wrapper.in(WelcomeBed::getId,bedIds);
|
|
|
|
|
+ List<WelcomeBed> list = welcomeBedService.list(wrapper);
|
|
|
|
|
+ if (ObjectUtils.isNotEmpty(list)) {
|
|
|
|
|
+ for (WelcomeBed welcomeBed : list) {
|
|
|
|
|
+ welcomeBed.setRetentionState(batchOperationVo.getRetentionState());
|
|
|
|
|
+ }
|
|
|
|
|
+ welcomeBedService.updateBatchById(list);
|
|
|
|
|
+ }
|
|
|
|
|
+ return CommonResult.ok();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public CommonResult checkIn(CheckInVo checkInVo) {
|
|
|
|
|
+ List<WelcomeStudent> list=welcomeStudentService.getStudent(checkInVo);
|
|
|
|
|
+ if (ObjectUtils.isEmpty(list)) {
|
|
|
|
|
+ return CommonResult.fail("暂无该学生");
|
|
|
|
|
+ }else if (list.size()>1){
|
|
|
|
|
+ return CommonResult.fail("该录取号有多个学生,请检查修改后在试");
|
|
|
|
|
+ }
|
|
|
|
|
+ WelcomeStudent welcomeStudent = list.get(0);
|
|
|
|
|
+ WelcomeBed bed = welcomeBedService.getBedById(checkInVo.getBedId());
|
|
|
|
|
+ if (ObjectUtils.isEmpty(bed)) {
|
|
|
|
|
+ return CommonResult.fail("不存在该床铺");
|
|
|
|
|
+ }
|
|
|
|
|
+ bed.setIsCheck(1);
|
|
|
|
|
+ bed.setStudentCard(welcomeStudent.getCardId());
|
|
|
|
|
+ bed.setCardNum(welcomeStudent.getAdmissNum());
|
|
|
|
|
+ bed.setClassstrId(welcomeStudent.getClassstrId());
|
|
|
|
|
+ bed.setClassstr(welcomeStudent.getClassstr());
|
|
|
|
|
+ bed.setName(welcomeStudent.getName());
|
|
|
|
|
+ welcomeBedService.updateWelcomeBed(bed);
|
|
|
|
|
+ return CommonResult.ok();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|