|
@@ -876,13 +876,15 @@ public class SubjectChangeServiceImpl extends BaseServiceImpl<Integer, SubjectCh
|
|
|
|
|
|
}
|
|
|
|
|
|
- String goodsIds = subjectChange.getChangeAccessories();
|
|
|
- if(subjectChange.getChangeMusical() != null){
|
|
|
- goodsIds = goodsIds + "," + subjectChange.getChangeMusical();
|
|
|
- }
|
|
|
-
|
|
|
+ subjectChange.setChangeAccessoriesGoods(goodsDao.findGoodsByIds(subjectChange.getChangeAccessories()));
|
|
|
+
|
|
|
BigDecimal goodsPrice = BigDecimal.ZERO;
|
|
|
- List<Goods> goodies = goodsDao.findGoodsByIds(goodsIds);
|
|
|
+ List<Goods> goodies = new ArrayList<Goods>(subjectChange.getChangeAccessoriesGoods());
|
|
|
+
|
|
|
+ subjectChange.setChangeMusicalGoods(goodsDao.get(subjectChange.getChangeMusical()));
|
|
|
+
|
|
|
+ goodies.add(subjectChange.getChangeMusicalGoods());
|
|
|
+
|
|
|
for (Goods goods : goodies) {
|
|
|
goodsPrice = goodsPrice.add(goods.getDiscountPrice());
|
|
|
}
|