|  | @@ -446,6 +446,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 | 
	
		
			
				|  |  |                      if(!groupType.containsKey("GROUP")){
 | 
	
		
			
				|  |  |                          throw new BizException("乐器提供方式不存在");
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  | +                    goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.GROUP);
 | 
	
		
			
				|  |  |                      remitFee = new BigDecimal((String) groupType.get("GROUP"));
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  if (registerPayDto.getGoodsGroups().get(goodsGroup.getId()).equals("LEASE")) {
 | 
	
	
		
			
				|  | @@ -613,6 +614,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 | 
	
		
			
				|  |  |          BigDecimal instrumentFee = BigDecimal.ZERO;
 | 
	
		
			
				|  |  |          BigDecimal accessoriesFee = BigDecimal.ZERO;
 | 
	
		
			
				|  |  |          BigDecimal otherFee = BigDecimal.ZERO;
 | 
	
		
			
				|  |  | +        BigDecimal remitFee = BigDecimal.ZERO;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          //乐器及打包辅件
 | 
	
	
		
			
				|  | @@ -666,6 +668,43 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 | 
	
		
			
				|  |  |                      courseFee.subtract(goodsGroup.getRemissionCourseFee());
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +        } else if (registerPayDto.getGoodsGroups() != null && registerPayDto.getGoodsGroups().size() > 0) {
 | 
	
		
			
				|  |  | +            String goodsGroupIds = registerPayDto.getGoodsGroups().keySet().stream().map(Object::toString).collect(Collectors.joining(","));
 | 
	
		
			
				|  |  | +            goodsGroups = musicGroupSubjectGoodsGroupService.findGoodsGroupByIds(goodsGroupIds);
 | 
	
		
			
				|  |  | +            for (MusicGroupSubjectGoodsGroup goodsGroup : goodsGroups) {
 | 
	
		
			
				|  |  | +                Map groupType = JSONObject.parseObject(goodsGroup.getKitGroupPurchaseTypeJson(), HashMap.class);
 | 
	
		
			
				|  |  | +                if (registerPayDto.getGoodsGroups().get(goodsGroup.getId()).equals("GROUP")) {
 | 
	
		
			
				|  |  | +                    if(!groupType.containsKey("GROUP")){
 | 
	
		
			
				|  |  | +                        throw new BizException("乐器提供方式不存在");
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.GROUP);
 | 
	
		
			
				|  |  | +                    remitFee = new BigDecimal((String) groupType.get("GROUP"));
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                if (registerPayDto.getGoodsGroups().get(goodsGroup.getId()).equals("LEASE")) {
 | 
	
		
			
				|  |  | +                    if(!groupType.containsKey("LEASE")){
 | 
	
		
			
				|  |  | +                        throw new BizException("乐器提供方式不存在");
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    goodsGroup.setPrice(goodsGroup.getDepositFee());
 | 
	
		
			
				|  |  | +                    goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.LEASE);
 | 
	
		
			
				|  |  | +                    remitFee = new BigDecimal((String) groupType.get("LEASE"));
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                if (registerPayDto.getGoodsGroups().get(goodsGroup.getId()).equals("FREE")) {
 | 
	
		
			
				|  |  | +                    if(!groupType.containsKey("FREE")){
 | 
	
		
			
				|  |  | +                        throw new BizException("乐器提供方式不存在");
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    goodsGroup.setPrice(new BigDecimal(0));
 | 
	
		
			
				|  |  | +                    remitFee = new BigDecimal((String) groupType.get("FREE"));
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                if(goodsGroup.getType().equals(GoodsType.INSTRUMENT)){
 | 
	
		
			
				|  |  | +                    instrumentFee = instrumentFee.add(goodsGroup.getPrice());
 | 
	
		
			
				|  |  | +                }else if(goodsGroup.getType().equals(GoodsType.ACCESSORIES)) {
 | 
	
		
			
				|  |  | +                    accessoriesFee = accessoriesFee.add(goodsGroup.getPrice());
 | 
	
		
			
				|  |  | +                }else {
 | 
	
		
			
				|  |  | +                    otherFee = otherFee.add(goodsGroup.getPrice());
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                orderAmount = orderAmount.add(goodsGroup.getPrice());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            orderAmount = orderAmount.subtract(remitFee);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          //单独辅件
 |