| | |
| | | |
| | | //团体人数 |
| | | int tramNum = 0; |
| | | if (null != rightList && rightList.size() > 0) { |
| | | if (null != rightList && !rightList.isEmpty()) { |
| | | String teamNo = PinyinUtil.getFirstLetter(dwDept.getDwName(), "") + DateUtil.format(new Date(), "yyMMddHHmmss"); |
| | | for (TjReservation reservation : rightList) { |
| | | TjDwGrouping dwGrouping = dwGroupingService.getById(reservation.getGroupingId()); |
| | |
| | | Date date = new Date(); |
| | | |
| | | //异步数据 |
| | | // asyncService.addNewReservationConfirm(rightList); |
| | | asyncService.saveNewReservationConfirm(rightList); |
| | | |
| | | //体检单位部门 |
| | |
| | | |
| | | TjDwGrouping dwGrouping = dwGroupingService.getById(reservation.getGroupingId()); |
| | | |
| | | // TjDwDept dwDept = dwDeptService.getById(dwGrouping.getDwDeptId()); |
| | | |
| | | LambdaQueryWrapper<TjReservation> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjReservation::getIdCard, reservation.getIdCard()); |
| | |
| | | |
| | | reservation.setPacId(dwGrouping.getId()); |
| | | compPay = compPay.add(dwGrouping.getYsPrice()); |
| | | // reservation.setTjType(String.valueOf(1)); |
| | | reservation.setTeamNo(teamNo); |
| | | reservation.setYxts(dto.getYxts()); |
| | | tjReservationService.save(reservation); |
| | |
| | | DateUtil.between(date, DateUtil.endOfDay(DateUtil.offsetDay(reservation.getReservationTime(), dto.getYxts())), DateUnit.MS))); |
| | | } |
| | | |
| | | LambdaQueryWrapper<TjCompPay> wq0 = new LambdaQueryWrapper<>(); |
| | | /* LambdaQueryWrapper<TjCompPay> wq0 = new LambdaQueryWrapper<>(); |
| | | wq0.eq(TjCompPay::getCompId, dto.getDwId()); |
| | | wq0.eq(TjCompPay::getTeamNo, teamNo); |
| | | TjCompPay one = compPayService.getOne(wq0); |
| | |
| | | tjCompPay.setPaidIn(new BigDecimal("0.00")); |
| | | tjCompPay.setDifference(tjCompPay.getCopeWith().subtract(BigDecimal.valueOf(0.00))); |
| | | compPayService.save(tjCompPay); |
| | | } |
| | | }*/ |
| | | |
| | | // .filter(a-> null != a.getPacId()) |
| | | |
| | | Map<String, List<TjReservation>> collect = rightList.stream().collect(Collectors.groupingBy(TjReservation::getPacId)); |
| | | /* Map<String, List<TjReservation>> collect = rightList.stream().collect(Collectors.groupingBy(TjReservation::getPacId)); |
| | | |
| | | if (!collect.isEmpty()) { |
| | | for (Map.Entry<String, List<TjReservation>> entry : collect.entrySet()) { |
| | | LambdaQueryWrapper<TjTeamSelectRecord> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjTeamSelectRecord::getTeamNo, teamNo); |
| | | wq.eq(TjTeamSelectRecord::getPacId, entry.getKey()); |
| | | wq.eq(TjTeamSelectRecord::getCompId, dto.getDwId()); |
| | | TjTeamSelectRecord recordServiceOne = selectRecordService.getOne(wq); |
| | | if (null != recordServiceOne) { |
| | |
| | | selectRecordService.save(selectRecord); |
| | | } |
| | | } |
| | | } |
| | | }*/ |
| | | return AjaxResult.success("预约成功"); |
| | | } |
| | | return AjaxResult.error("请选择预约对象"); |