zjh
2 天以前 3982f0bc9ee436235ba546d356c5554250ed9963
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCompPayController.java
@@ -300,18 +300,29 @@
    @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);
                 }
             }