| | |
| | | |
| | | model.addAttribute("item", tStudentDto); |
| | | if (tStudentDto.getLateralSurface()!=null&&!tStudentDto.equals("")) { |
| | | String[] pics = tStudentDto.getLateralSurface().split(";"); |
| | | model.addAttribute("pic1", pics[0]); |
| | | System.out.println("=====pic1==" + pics[0]); |
| | | if (pics.length > 1) { |
| | | model.addAttribute("pic2", pics[1]); |
| | | System.out.println("=====pic2==" + pics[1]); |
| | | } |
| | | if (pics.length > 2) { |
| | | model.addAttribute("pic3", pics[2]); |
| | | System.out.println("=====pic3==" + pics[2]); |
| | | } |
| | | // String[] pics = tStudentDto.getLateralSurface().split(";"); |
| | | // model.addAttribute("pic1", pics[0]); |
| | | // System.out.println("=====pic1==" + pics[0]); |
| | | // if (pics.length > 1) { |
| | | // model.addAttribute("pic2", pics[1]); |
| | | // System.out.println("=====pic2==" + pics[1]); |
| | | // } |
| | | // if (pics.length > 2) { |
| | | // model.addAttribute("pic3", pics[2]); |
| | | // System.out.println("=====pic3==" + pics[2]); |
| | | // } |
| | | model.addAttribute("images",tStudentDto.getLateralSurface()); |
| | | } |
| | | |
| | | |
| | |
| | | @RequestMapping("/getUseTime/{tStudentId}") |
| | | @ResponseBody |
| | | public ResultUtil getMax(@PathVariable("tStudentId") Integer tStudentId) { |
| | | Date useTime = courseStuddentClient.getUseTime(tStudentId); |
| | | Date vali = studentClient.getById(tStudentId); |
| | | |
| | | // Date useTime = courseStuddentClient.getUseTime(tStudentId); |
| | | Map<String, Date> map = new HashMap<>(); |
| | | map.put("useTime",useTime); |
| | | map.put("useTime",vali); |
| | | |
| | | return new ResultUtil<>(0,0,null,map,null); |
| | | } |
| | |
| | | // 需要过滤体验课 |
| | | List<ClassListDto> classListDtos = courseStuddentClient.listClass(tStudentId); |
| | | for (ClassListDto classListDto : classListDtos) { |
| | | classListDto.setHasClassHours(classListDto.getTotalClassHours()-classListDto.getLaveClassHours()); |
| | | if (classListDto.getClassType()==2){ |
| | | classListDto.setTotalClassHours(null); |
| | | classListDto.setHasClassHours(null); |
| | | classListDto.setLaveClassHours(null); |
| | | continue; |
| | | } |
| | | classListDto.setHasClassHours(classListDto.getTotalClassHours()-classListDto.getLaveClassHours()); |
| | | |
| | | } |
| | | Map<String,List<ClassListDto>> map = new HashMap<>(); |
| | | map.put("items",classListDtos); |
| | |
| | | @ResponseBody |
| | | |
| | | public ResultUtil update(@RequestBody TStudent tStudent) { |
| | | String lateralSurface = tStudent.getImage1()+";"+tStudent.getImage2()+";"+tStudent.getImage3(); |
| | | List<String> strings = new ArrayList<>(); |
| | | if (!tStudent.getImage1().isEmpty()){ |
| | | strings.add(tStudent.getImage1()); |
| | | } |
| | | if (!tStudent.getImage2().isEmpty()){ |
| | | strings.add(tStudent.getImage2()); |
| | | } |
| | | if (!tStudent.getImage3().isEmpty()){ |
| | | strings.add(tStudent.getImage3()); |
| | | } |
| | | String result = String.join(";", strings); |
| | | |
| | | System.out.println("=======lateralSurface======>?"+lateralSurface); |
| | | tStudent.setLateralSurface(lateralSurface); |
| | | System.out.println("学员体测表的值"+lateralSurface); |
| | | |
| | | // |
| | | // String lateralSurface = tStudent.getImage1()+";"+tStudent.getImage2()+";"+tStudent.getImage3(); |
| | | // |
| | | // System.out.println("=======lateralSurface======>?"+lateralSurface); |
| | | tStudent.setLateralSurface(result); |
| | | System.out.println("学员体测表的值"+result); |
| | | itStudentService.update(tStudent); |
| | | // appUserClient.updateStudent(tStudent); |
| | | return new ResultUtil(0,0,"编辑成功"); |
| | |
| | | |
| | | updateTimeDto updateTimeDto =new updateTimeDto(date1,id); |
| | | System.out.println("======updateTimeDto=====>"+updateTimeDto); |
| | | courseStuddentClient.updateUseDate(updateTimeDto); |
| | | // courseStuddentClient.updateUseDate(updateTimeDto); |
| | | |
| | | studentClient.update(updateTimeDto); |
| | | |
| | | |
| | | CreateHistoryDto historyDto = new CreateHistoryDto(); |