|
|
@@ -16,7 +16,9 @@ import com.ym.mec.biz.dal.page.MusicGroupPaymentCalenderQueryInfo;
|
|
|
import com.ym.mec.biz.event.source.GroupEventSource;
|
|
|
import com.ym.mec.biz.event.source.SendSeoMessageSource;
|
|
|
import com.ym.mec.biz.service.*;
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
+import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
import com.ym.mec.common.page.PageInfo;
|
|
|
import com.ym.mec.common.service.IdGeneratorService;
|
|
|
@@ -26,9 +28,11 @@ import com.ym.mec.util.collection.MapUtil;
|
|
|
import com.ym.mec.util.date.DateUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
+import org.springframework.ui.ModelMap;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
@@ -147,12 +151,12 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
throw new BizException("请登录");
|
|
|
}
|
|
|
// 所有缴费项目已完成排课才能创建下一个缴费项目
|
|
|
- String organBatchNo = musicGroupPaymentStudentCourseDetailDao.getUnUseBatchNoWithStudentAndCourseTypeAndCourseMinutes(musicGroupId, null, null, musicGroupPaymentCalenderDto.getIgnoreBatchNoList());
|
|
|
+ /*String organBatchNo = musicGroupPaymentStudentCourseDetailDao.getUnUseBatchNoWithStudentAndCourseTypeAndCourseMinutes(musicGroupId, null, null, musicGroupPaymentCalenderDto.getIgnoreBatchNoList());
|
|
|
if (StringUtils.isNoneBlank(organBatchNo)) {
|
|
|
if (StringUtils.isEmpty(musicGroupPaymentCalenderDto.getBatchNo()) || !musicGroupPaymentCalenderDto.getBatchNo().equals(organBatchNo)) {
|
|
|
throw new BizException("当前乐团存在未排课的缴费项目,请先完成排课再操作");
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
List<MusicGroupPaymentCalenderStudentDetail> calenderStudentDetails = musicGroupPaymentCalenderDto.getMusicGroupPaymentCalenderStudentDetails();
|
|
|
|
|
|
@@ -222,7 +226,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public String create1(MusicGroupPaymentBaseCalender musicGroupPaymentBaseCalender) {
|
|
|
+ public HttpResponseResult<ModelMap> create1(MusicGroupPaymentBaseCalender musicGroupPaymentBaseCalender) {
|
|
|
checkObjectNull(musicGroupPaymentBaseCalender, o -> {
|
|
|
throw new BizException("参数校验异常");
|
|
|
});
|
|
|
@@ -237,19 +241,13 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
throw new BizException("请登录");
|
|
|
});
|
|
|
|
|
|
-// if(musicGroupPaymentBaseCalender.getCalenderActivityList() == null
|
|
|
-// && musicGroupPaymentBaseCalender.getCalenderMember() == null
|
|
|
-// && musicGroupPaymentBaseCalender.getMusicGroupPaymentCalenderCourseSettingsList() == null
|
|
|
-// && musicGroupPaymentBaseCalender.getMusicRepair() == null){
|
|
|
-// throw new BizException("请选择一个缴费项目");
|
|
|
-// }
|
|
|
if (musicGroup.getStatus() != MusicGroupStatusEnum.PROGRESS && musicGroup.getStatus() != MusicGroupStatusEnum.PRE_BUILD_FEE) {
|
|
|
throw new BizException("创建缴费失败:已存在缴费项目");
|
|
|
}
|
|
|
// 所有缴费项目已完成排课才能创建下一个缴费项目
|
|
|
String orignBatchNo = musicGroupPaymentStudentCourseDetailDao.getUnUseBatchNoWithStudentAndCourseTypeAndCourseMinutes(musicGroupId, null, null, null);
|
|
|
- if (StringUtils.isNoneBlank(orignBatchNo)) {
|
|
|
- throw new BizException("当前乐团存在未排课的缴费项目,请先完成排课再操作");
|
|
|
+ if (!musicGroupPaymentBaseCalender.getConfirmCreate() && StringUtils.isNoneBlank(orignBatchNo)) {
|
|
|
+ return BaseController.failed(HttpStatus.MULTI_STATUS,"当前乐团存在未排课的缴费项目,请再次确认操作");
|
|
|
}
|
|
|
|
|
|
// 不是进行中,只能创建一次缴费
|
|
|
@@ -426,7 +424,9 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
executor.shutdown();
|
|
|
}
|
|
|
}
|
|
|
- return batchNo;
|
|
|
+ ModelMap map = new ModelMap(1);
|
|
|
+ map.put("musicGroupPaymentCalenderBatchNo", batchNo);
|
|
|
+ return BaseController.succeed(map);
|
|
|
}
|
|
|
|
|
|
//校验缴费项目进行中加学员
|
|
|
@@ -1221,7 +1221,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public String merge1(MusicGroupPaymentBaseCalender musicGroupPaymentBaseCalender) {
|
|
|
+ public HttpResponseResult<ModelMap> merge1(MusicGroupPaymentBaseCalender musicGroupPaymentBaseCalender) {
|
|
|
del(musicGroupPaymentBaseCalender.getCalenderId());
|
|
|
return create1(musicGroupPaymentBaseCalender);
|
|
|
}
|