| | |
| | | @GetMapping("/getTjCompPay") |
| | | @ApiOperation(value = "根据团队体检编号和套餐id获取结账信息") |
| | | public AjaxResult getTjCompPay(@RequestParam @ApiParam(value = "团队编号") String teamNo, |
| | | @RequestParam(required = false) @ApiParam(value = "单位id") String pacId) { |
| | | @RequestParam @ApiParam(value = "套餐id") String pacId) { |
| | | |
| | | try { |
| | | LambdaQueryWrapper<TjCompPay> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjCompPay::getTeamNo, teamNo); |
| | | wq.eq(TjCompPay::getCompId, pacId); |
| | | wq.eq(TjCompPay::getPacId, pacId); |
| | | List<TjCompPay> tjCompPays = compPayService.list(wq); |
| | | if(null !=tjCompPays && !tjCompPays.isEmpty()){ |
| | | for (TjCompPay pay : tjCompPays) { |
| | | LambdaQueryWrapper<TjCompPayInfo> wqInfo = new LambdaQueryWrapper<>(); |
| | | wqInfo.eq(TjCompPayInfo::getTjCompPayId, pay.getId()); |
| | | List<TjCompPayInfo> payInfos = payInfoService.list(wqInfo); |
| | | if(null !=payInfos && !payInfos.isEmpty()){ |
| | | for (TjCompPayInfo info : payInfos) { |
| | | TjOrder order = orderService.getOrderByTjNum(info.getTjh()); |
| | | if(null != order){ |
| | | TjCustomer tjCustomer = customerService.getById(order.getUserId()); |
| | | if (null != tjCustomer) { |
| | | info.setName(tjCustomer.getCusName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | pay.setPayInfo(payInfos); |
| | | } |
| | | } |