|
@@ -70,6 +70,8 @@ public class SubjectChangeServiceImpl extends BaseServiceImpl<Integer, SubjectCh
|
|
|
private GoodsService goodsService;
|
|
|
@Autowired
|
|
|
private StudentInstrumentService studentInstrumentService;
|
|
|
+ @Autowired
|
|
|
+ private MusicGroupPurchaseListDao musicGroupPurchaseListDao;
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
|
|
@@ -121,8 +123,10 @@ public class SubjectChangeServiceImpl extends BaseServiceImpl<Integer, SubjectCh
|
|
|
throw new BizException("声部更改已缴费,请勿重复缴费");
|
|
|
}
|
|
|
|
|
|
- MusicGroup musicGroup = musicGroupDao.get(subjectChange.getMusicGroupId());
|
|
|
- if (!musicGroup.getStatus().equals(MusicGroupStatusEnum.APPLY) && !musicGroup.getStatus().equals(MusicGroupStatusEnum.PAY)) {
|
|
|
+ HashSet<String> musicGroupIds = new HashSet<>();
|
|
|
+ musicGroupIds.add(subjectChange.getMusicGroupId());
|
|
|
+ List<MusicGroupPurchaseList> musicGroupPurchaseListCount = musicGroupPurchaseListDao.getCount(musicGroupIds);
|
|
|
+ if (musicGroupPurchaseListCount.size() > 0) {
|
|
|
throw new BizException("乐团当前状态不能缴声部更改费用");
|
|
|
}
|
|
|
BigDecimal amount = subjectChange.getGoodsMargin().add(subjectChange.getCourseMargin());
|
|
@@ -249,7 +253,7 @@ public class SubjectChangeServiceImpl extends BaseServiceImpl<Integer, SubjectCh
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(subjectChange.getChangeAccessories())) {
|
|
|
goodsIds += StringUtils.isNotBlank(goodsIds) ? "," + subjectChange.getChangeAccessories() : subjectChange.getChangeAccessories();
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
subjectChange.setChangeAccessories(null);
|
|
|
}
|
|
|
BigDecimal goodsPrice = BigDecimal.ZERO;
|