| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.util.DigestUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @GetMapping("/newGetTjPat") |
| | | @ApiOperation(value = "查询his数据库返回新的数据") |
| | | public AjaxResult newGetTjPat() { |
| | | List<Map<String, Object>> maps = testMapper.newGetTjPat(); |
| | | public AjaxResult newGetTjPat(@RequestParam(required = false)String pacCode, |
| | | @RequestParam(required = false)String pacName, |
| | | @RequestParam(required = false)String pacRemark) { |
| | | List<Map<String, Object>> maps = testMapper.newGetTjPat(pacCode,pacName,pacRemark); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | return AjaxResult.success(maps); |
| | | } |
| | |
| | | if(null==ltkjTjPat){ |
| | | tjvLtkjvtjpatService.save(tjPatByIdCard); |
| | | } |
| | | } |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | //再根据身份证号写customer表 |
| | | TjCustomer tjCustomer = tjCustomerService.getTjCustomerByCusIdCard(cusIdcard); |
| | | if(null == tjCustomer){ |
| | | testMapper.getTjPatByCusId(cusIdcard); |
| | | LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>(); |
| | | qw.eq(TjCustomer::getCusIdcard, cusIdcard); |
| | | TjCustomer customer = tjCustomerService.getOne(qw); |
| | | customer.setReservationId(customer.getCardId()); |
| | | extracted(customer); |
| | | return success(customer); |
| | | }else { |
| | | tjCustomer.setReservationId(tjCustomer.getCardId()); |
| | | extracted(tjCustomer); |
| | | return success(tjCustomer); |
| | | } |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | //再根据身份证号写customer表 |
| | | TjCustomer tjCustomer = tjCustomerService.getTjCustomerByCusIdCard(cusIdcard); |
| | | if(null == tjCustomer){ |
| | | testMapper.getTjPatByCusId(cusIdcard); |
| | | LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>(); |
| | | qw.eq(TjCustomer::getCusIdcard, cusIdcard); |
| | | TjCustomer customer = tjCustomerService.getOne(qw); |
| | | customer.setReservationId(customer.getCardId()); |
| | | extracted(customer); |
| | | return success(customer); |
| | | }else { |
| | | tjCustomer.setReservationId(tjCustomer.getCardId()); |
| | | extracted(tjCustomer); |
| | | return success(tjCustomer); |
| | | } |
| | | |
| | | } |
| | | } |
| | | //end====2023.12.12 |
| | | LambdaQueryWrapper<TjReservation> wq = new LambdaQueryWrapper<>(); |