| | |
| | | } |
| | | map.put("parentName", projectService.getById(entry.getKey()).getProName()); |
| | | map.put("list", entry.getValue()); |
| | | List<TbTransition> tbTransitionList = entry.getValue(); |
| | | if (null != tbTransitionList && tbTransitionList.size() > 0) { |
| | | BigDecimal money1 = new BigDecimal("0.00"); |
| | | BigDecimal money2 = new BigDecimal("0.00"); |
| | | for (TbTransition tbTransition : tbTransitionList) { |
| | | money1 = money1.add(tbTransition.getOrdPrice()); |
| | | money2 = money2.add(tbTransition.getNowPrice()); |
| | | // if (tbTransition.getOrdPrice().compareTo(BigDecimal.valueOf(0)) == 0 || tbTransition.getNowPrice().compareTo(BigDecimal.valueOf(0)) == 0) { |
| | | // tbTransition.setDiscount("0"); |
| | | // } else { |
| | | // tbTransition.setDiscount((tbTransition.getNowPrice()).divide(tbTransition.getOrdPrice(), BigDecimal.ROUND_CEILING).toString()); |
| | | // List<TbTransition> tbTransitionList = entry.getValue(); |
| | | // if (null != tbTransitionList && tbTransitionList.size() > 0) { |
| | | // BigDecimal money1 = new BigDecimal("0.00"); |
| | | // BigDecimal money2 = new BigDecimal("0.00"); |
| | | // for (TbTransition tbTransition : tbTransitionList) { |
| | | // money1 = money1.add(tbTransition.getOrdPrice()); |
| | | // money2 = money2.add(tbTransition.getNowPrice()); |
| | | // } |
| | | // if (null != tbTransition.getPacId()) { |
| | | // tbTransition.setPacPrice(tjPackageService.getById(tbTransition.getPacId()).getPrice()); |
| | | // map.put("ordPrice", money1); |
| | | // map.put("nowPrice", money2); |
| | | // } |
| | | // if (null != tbTransition.getParentProId()) { |
| | | // tbTransition.setPacPrice(projectService.getTjProjectById(String.valueOf(tbTransition.getParentProId())).getProPrice()); |
| | | // } |
| | | } |
| | | // map.put("ordPrice", money1.setScale(Integer.parseInt(configService.selectConfigByKey("sys.price.save")), Integer.parseInt(configService.selectConfigByKey("sys.price")))); |
| | | // map.put("nowPrice", money2.setScale(Integer.parseInt(configService.selectConfigByKey("sys.price.save")), Integer.parseInt(configService.selectConfigByKey("sys.price")))); |
| | | map.put("ordPrice", money1); |
| | | map.put("nowPrice", money2); |
| | | } |
| | | TjPackageProject project = tjPackageProjectService.getOne(new LambdaQueryWrapper<TjPackageProject>().eq(TjPackageProject::getPacId, pacId) |
| | | .eq(TjPackageProject::getProId, entry.getKey())); |
| | | map.put("ordPrice", project.getPriceNow()); |
| | | map.put("nowPrice", projectService.getById(entry.getKey()).getPriceNow()); |
| | | list.add(map); |
| | | } |
| | | return list; |