zjh
2023-10-13 906328ba3f842f5f86cb5bd60e09a8a7f6d2ac93
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjFlowingWaterController.java
@@ -418,7 +418,7 @@
                                tjRefundVo.setTjName(MatchUtils.hideCusName(customer.getCusName()));
                                tjRefundVo.setTjPhone(MatchUtils.hidePhoneNum(customer.getCusPhone()));
                                tjRefundVo.setSex(String.valueOf(customer.getCusSex()));
                                tjRefundVo.setIdCard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
                               if(null !=customer.getCusIdcard()) tjRefundVo.setIdCard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
                                DictComp dictComp = compService.getById(order.getFirmId());
                                if(null !=dictComp){
                                    tjRefundVo.setTjComp(dictComp.getCnName());
@@ -539,18 +539,28 @@
                if (null != tjProjectList && tjProjectList.size() > 0) {
                    for (TjProject project : tjProjectList) {
                        if (project.getProParentId() == 0) {
                            LambdaQueryWrapper<TbTransition> wqq1 = new LambdaQueryWrapper<>();
                            wqq1.eq(TbTransition::getCusId, customerService.getById(order.getUserId()).getCusIdcard());
                            wqq1.eq(TbTransition::getParentProId, project.getProId());
                            List<TbTransition> tbTransitionList = transitionService.list(wqq1);
                            BigDecimal bigDecimal = new BigDecimal("0.00");
                            BigDecimal bigDecimal1 = new BigDecimal("0.00");
                            for (TbTransition transition : tbTransitionList) {
                                 bigDecimal = bigDecimal.add(transition.getNowPrice());
                                 bigDecimal1=bigDecimal1.add(transition.getOrdPrice());
                            //                            LambdaQueryWrapper<TbTransition> wqq1 = new LambdaQueryWrapper<>();
//                            wqq1.eq(TbTransition::getCusId, customerService.getById(order.getUserId()).getCusIdcard());
//                            wqq1.eq(TbTransition::getParentProId, project.getProId());
//                            List<TbTransition> tbTransitionList = transitionService.list(wqq1);
//                            BigDecimal bigDecimal = new BigDecimal("0.00");
//                            BigDecimal bigDecimal1 = new BigDecimal("0.00");
//                            for (TbTransition transition : tbTransitionList) {
//                                 bigDecimal = bigDecimal.add(transition.getNowPrice());
//                                 bigDecimal1=bigDecimal1.add(transition.getOrdPrice());
//                            }
//                            project.setProPrice(bigDecimal.setScale(0,BigDecimal.ROUND_UP));
//                            project.setProOrdPrice(bigDecimal1);
                            BigDecimal decimal = transitionService.getTbTransitionPriceAndOrdPrice(customerService.getById(order.getUserId()).getCusIdcard(),
                                    project.getProId());
                            String s = tjFlowingWaterService.getDiscount(OrderId);
                            if(null !=decimal){
                                project.setProPrice(decimal.setScale(2));
                                project.setProOrdPrice(decimal.multiply(new BigDecimal(s)).setScale(2));
                            }else {
                                project.setProPrice(new BigDecimal("0.00"));
                                project.setProOrdPrice(new BigDecimal("0.00"));
                            }
                            project.setProPrice(bigDecimal.setScale(0,BigDecimal.ROUND_UP));
                            project.setProOrdPrice(bigDecimal1);
                        }
                    }
                }