Compare commits
	
		
			No commits in common. "634f657163d7348126664477f022edd8cc97bece" and "9d6fd9b7a886b4e92e3d6f762fefff80053ad152" have entirely different histories.
		
	
	
		
			634f657163
			...
			9d6fd9b7a8
		
	
		|  | @ -1596,26 +1596,14 @@ public class BonusSettleRangeHandle extends BonusSettleHandle { | |||
|             return null; | ||||
|         } | ||||
| 
 | ||||
|         // 区域收益,商品价格 * 0.5% * 商品数量 | ||||
|         // 处理区域收益 -- 计算比例为 0.5% | ||||
|         BigDecimal benefitIncome = BigDecimal.ZERO; | ||||
|         if (EOrderType.RETAIL_REGISTER.getValue() == saOrder.getOrderType() | ||||
|                 || EOrderType.RETAIL_UPGRADE.getValue() == saOrder.getOrderType()) { | ||||
|             // 注册、升级订单, 区域收益 = 商品价格 * 0.5% * 商品数量 | ||||
|             for (SaOrderWaresExt saOrderWaresExt : saOrder.getOrderWaresExtList()) { | ||||
|                 // 商品最终价格 | ||||
|                 BigDecimal waresPrice = saOrderWaresExt.getWaresPrice(); | ||||
|                 // 商品数量 | ||||
|                 BigDecimal waresQuantityBig = new BigDecimal(saOrderWaresExt.getWaresQuantity()); | ||||
|                 // 单个商品价格 | ||||
|                 BigDecimal waresOnePrice = waresPrice.divide(waresQuantityBig, 6, RoundingMode.FLOOR); | ||||
| 
 | ||||
|                 benefitIncome = benefitIncome.add(waresOnePrice.multiply(RetailConstants.SAME_RATIO).setScale(6, BigDecimal.ROUND_HALF_UP).multiply(waresQuantityBig)); | ||||
|             } | ||||
|         } else if (EOrderType.RETAIL_REPURCHASE.getValue() == saOrder.getOrderType()) { | ||||
|             // 复购订单, 区域收益 = 复购区域分红 * 商品数量 | ||||
|             for (SaOrderWaresExt saOrderWaresExt : saOrder.getOrderWaresExtList()) { | ||||
|                 benefitIncome = benefitIncome.add(saOrderWaresExt.getAreaIncome().multiply(new BigDecimal(saOrderWaresExt.getWaresQuantity()))); | ||||
|             } | ||||
|         // 计算业绩(此处作为比例) | ||||
|         BigDecimal calAchieve = BigDecimal.ZERO; | ||||
|         for (SaOrderWaresExt saOrderWaresExt : saOrder.getOrderWaresExtList()) { | ||||
|             benefitIncome = benefitIncome.add(saOrderWaresExt.getWaresPrice().multiply(RetailConstants.SAME_RATIO)).setScale(6, BigDecimal.ROUND_HALF_UP); | ||||
|             calAchieve = calAchieve.add(saOrderWaresExt.getWaresPrice()); | ||||
|         } | ||||
|         CuMemberBonusDetail cuMemberBonusDetail = packageBenefitIncome(bonusConfigDTO, period, cuMemberBonusMap, null, RetailConstants.SAME_RATIO, benefitIncome, | ||||
|                 cuMemberRetailRangeExt, EBonusItems.RETAIL_AREA_INCOME.getValue(), BonusMsgConstants.RETAIL_AREA_INCOME); | ||||
|  |  | |||
|  | @ -60,7 +60,6 @@ | |||
|             <result column="PK_WARES" property="pkWares"/> | ||||
|             <result column="WARES_PRICE" property="waresPrice"/> | ||||
|             <result column="WARES_CODE" property="waresCode"/> | ||||
|             <result column="AREA_INCOME" property="areaIncome"/> | ||||
|         </collection> | ||||
|         <collection property="orderItemsExtList" ofType="com.hzs.common.domain.sale.ext.SaOrderItemsExt"> | ||||
|             <result column="SI_ITEMS_ID" property="pkId"/> | ||||
|  | @ -154,8 +153,7 @@ | |||
|         nvl(st.pk_wares,0) pk_wares, | ||||
|         nvl(st.wares_price,0) wares_price, | ||||
|         nvl(bw.wares_code,'~') wares_code, | ||||
|         nvl(st.wares_quantity,0) wares_quantity, | ||||
|         nvl(bw.area_income, 0) area_income | ||||
|         nvl(st.wares_quantity,0) wares_quantity | ||||
|         from sa_order so | ||||
|         left join sa_order_wares st | ||||
|         on so.pk_id = st.pk_order and st.wares_price > 0 | ||||
|  |  | |||
|  | @ -4,8 +4,6 @@ import com.hzs.common.domain.sale.order.SaOrderWares; | |||
| import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | ||||
| 
 | ||||
| import java.math.BigDecimal; | ||||
| 
 | ||||
| @EqualsAndHashCode(callSuper = true) | ||||
| @Data | ||||
| public class SaOrderWaresExt extends SaOrderWares { | ||||
|  | @ -15,9 +13,4 @@ public class SaOrderWaresExt extends SaOrderWares { | |||
|      */ | ||||
|     private String waresCode; | ||||
| 
 | ||||
|     /** | ||||
|      * 复购区域分红 | ||||
|      */ | ||||
|     private BigDecimal areaIncome; | ||||
| 
 | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue