| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.ltkj.common.core.controller.BaseController; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | |
| | | /** |
| | | * 查询体检预约列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('reservation:reservation:list')") |
| | | //@PreAuthorize("@ss.hasPermi('reservation:reservation:list')") |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "查询体检预约列表接口(默认)") |
| | | public TableDataInfo list(TjReservation tjReservation) { |
| | |
| | | */ |
| | | @GetMapping(value = "/{id}") |
| | | @ApiOperation(value = "根据预约id获取预约详情") |
| | | public AjaxResult getInfo(@PathVariable("id") @ApiParam(value = "预约id") Integer id) { |
| | | public AjaxResult getInfo(@PathVariable("id") @ApiParam(value = "预约id") String id) { |
| | | TjReservation tjReservation = tjReservationService.selectTjReservationById(id); |
| | | if (null != tjReservation) { |
| | | if (null != tjReservation.getPacId()) { |
| | |
| | | @PostMapping("/tjReappoint") |
| | | @ApiOperation(value = "体检预约修改接口") |
| | | public AjaxResult tjReappoint(@RequestBody TjReservation tjReservation) { |
| | | TjReservation reservation = tjReservationService.getById(tjReservation.getId()); |
| | | |
| | | if (tjReservation.getIsExpire() == 1) { |
| | | return AjaxResult.error("预约已过期不可修改"); |
| | | } |
| | | tjReservation.setIdCard(reservation.getIdCard()); |
| | | tjReservation.setPhoe(reservation.getPhoe()); |
| | | tjReservation.setName(reservation.getName()); |
| | | if (tjReservationService.updateById(tjReservation)) { |
| | | return AjaxResult.success("操作成功"); |
| | | } |
| | |
| | | |
| | | @PostMapping("/newReservationConfirm") |
| | | @ApiOperation(value = "团体预约确认接口 (新版本)") |
| | | @Transactional |
| | | public AjaxResult newReservationConfirm(@RequestBody ConfirmDto dto) { |
| | | //预约的所有人 |
| | | List<TjReservation> rightList = dto.getReservations(); |
| | |
| | | TjDwDept dwDept = dwDeptService.getById(dto.getDwDeptId()); |
| | | |
| | | //异步数据 |
| | | asyncService.addNewReservationConfirm(rightList); |
| | | // asyncService.addNewReservationConfirm(rightList); |
| | | asyncService.saveNewReservationConfirm(rightList); |
| | | |
| | | //团体人数合计价格 |
| | | BigDecimal compPay=new BigDecimal("0.00"); |