|
@@ -148,9 +148,9 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
@Autowired
|
|
@Autowired
|
|
private SysUserCashAccountLogService sysUserCashAccountLogService;
|
|
private SysUserCashAccountLogService sysUserCashAccountLogService;
|
|
@Autowired
|
|
@Autowired
|
|
- private MemberFeeSettingDao memberFeeSettingDao;
|
|
|
|
|
|
+ private OrganizationService organizationService;
|
|
@Autowired
|
|
@Autowired
|
|
- private MemberFeeSettingService memberFeeSettingService;
|
|
|
|
|
|
+ private TenantConfigService tenantConfigService;
|
|
|
|
|
|
private static Map<Integer, Map<Integer, List<Integer>>> schoolSubjectTeachersMap;
|
|
private static Map<Integer, Map<Integer, List<Integer>>> schoolSubjectTeachersMap;
|
|
|
|
|
|
@@ -3460,12 +3460,27 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
if (Objects.isNull(order)) {
|
|
if (Objects.isNull(order)) {
|
|
throw new BizException("订单不存在");
|
|
throw new BizException("订单不存在");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //查询财务章 如果分部有企业信息,就用分部上的企业信息,否则用机构上的企业信息
|
|
|
|
+ String financeChops;
|
|
|
|
+ Organization organizationDto = organizationService.get(order.getOrganId());
|
|
|
|
+ if (organizationDto == null || StringUtils.isBlank(organizationDto.getCorporateName()) || StringUtils.isBlank(organizationDto.getCorporateCode())) {
|
|
|
|
+ TenantConfig tenantConfig = tenantConfigService.queryByTenantId(order.getTenantId());
|
|
|
|
+ if (tenantConfig == null) {
|
|
|
|
+ throw new BizException("机构配置信息查询失败");
|
|
|
|
+ }
|
|
|
|
+ financeChops = tenantConfig.getCorporateFinanceChops();
|
|
|
|
+ } else {
|
|
|
|
+ financeChops = organizationDto.getCorporateFinancialSeal();
|
|
|
|
+ }
|
|
|
|
+
|
|
PracticeBuyResultDto practiceBuyResult = new PracticeBuyResultDto();
|
|
PracticeBuyResultDto practiceBuyResult = new PracticeBuyResultDto();
|
|
practiceBuyResult.setOrderNo(orderNo);
|
|
practiceBuyResult.setOrderNo(orderNo);
|
|
practiceBuyResult.setStatus(order.getStatus());
|
|
practiceBuyResult.setStatus(order.getStatus());
|
|
practiceBuyResult.setCreateTime(order.getCreateTime());
|
|
practiceBuyResult.setCreateTime(order.getCreateTime());
|
|
practiceBuyResult.setPrice(order.getExpectAmount());
|
|
practiceBuyResult.setPrice(order.getExpectAmount());
|
|
practiceBuyResult.setType(order.getType().getCode());
|
|
practiceBuyResult.setType(order.getType().getCode());
|
|
|
|
+ practiceBuyResult.setFinanceChops(financeChops);
|
|
|
|
|
|
if (order.getGroupType().equals(GroupType.GOODS_SELL)) {
|
|
if (order.getGroupType().equals(GroupType.GOODS_SELL)) {
|
|
practiceBuyResult.setDetail(studentGoodsSellDao.getStudentGoodsSellDto(orderNo));
|
|
practiceBuyResult.setDetail(studentGoodsSellDao.getStudentGoodsSellDto(orderNo));
|
|
@@ -4901,17 +4916,17 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
String activeConfig = sysConfigDao.findConfigValue("cloud_teacher_active_config");
|
|
String activeConfig = sysConfigDao.findConfigValue("cloud_teacher_active_config");
|
|
List<Cloud2022ActivityDto> cloud2022ActivityDtos = JSONArray.parseArray(activeConfig, Cloud2022ActivityDto.class);
|
|
List<Cloud2022ActivityDto> cloud2022ActivityDtos = JSONArray.parseArray(activeConfig, Cloud2022ActivityDto.class);
|
|
List<Cloud2022ActivityDto> activityDtos = cloud2022ActivityDtos.stream().filter(e -> e.getOrganId().contains(sysUser.getOrganId().toString())).collect(Collectors.toList());
|
|
List<Cloud2022ActivityDto> activityDtos = cloud2022ActivityDtos.stream().filter(e -> e.getOrganId().contains(sysUser.getOrganId().toString())).collect(Collectors.toList());
|
|
- if(org.apache.commons.collections.CollectionUtils.isEmpty(activityDtos)){
|
|
|
|
|
|
+ if (org.apache.commons.collections.CollectionUtils.isEmpty(activityDtos)) {
|
|
return BaseController.failed(HttpStatus.EXPECTATION_FAILED, "您没有排课资格,请联系指导老师");
|
|
return BaseController.failed(HttpStatus.EXPECTATION_FAILED, "您没有排课资格,请联系指导老师");
|
|
}
|
|
}
|
|
//是否还有购买资格
|
|
//是否还有购买资格
|
|
Integer activityId = Integer.parseInt(activityDtos.get(0).getActivityId());
|
|
Integer activityId = Integer.parseInt(activityDtos.get(0).getActivityId());
|
|
Integer noCourseNum = activityUserMapperService.getStudentNoCourseNum(sysUser.getId(), activityId);
|
|
Integer noCourseNum = activityUserMapperService.getStudentNoCourseNum(sysUser.getId(), activityId);
|
|
List<ActivityUserMapper> activityUserMappers = activityUserMapperService.findByStudentIdList(activityId, sysUser.getId().toString(), "GIVE_PRACTICE");
|
|
List<ActivityUserMapper> activityUserMappers = activityUserMapperService.findByStudentIdList(activityId, sysUser.getId().toString(), "GIVE_PRACTICE");
|
|
- if(org.apache.commons.collections.CollectionUtils.isEmpty(activityUserMappers)){
|
|
|
|
|
|
+ if (org.apache.commons.collections.CollectionUtils.isEmpty(activityUserMappers)) {
|
|
return BaseController.failed(HttpStatus.EXPECTATION_FAILED, "您没有排课资格,请联系指导老师");
|
|
return BaseController.failed(HttpStatus.EXPECTATION_FAILED, "您没有排课资格,请联系指导老师");
|
|
}
|
|
}
|
|
- if(noCourseNum == null || noCourseNum <= 0){
|
|
|
|
|
|
+ if (noCourseNum == null || noCourseNum <= 0) {
|
|
return BaseController.failed(HttpStatus.EXPECTATION_FAILED, "您没有排课资格,请联系指导老师");
|
|
return BaseController.failed(HttpStatus.EXPECTATION_FAILED, "您没有排课资格,请联系指导老师");
|
|
}
|
|
}
|
|
if (Objects.isNull(practiceGroupBuyParams.getUserId())) {
|
|
if (Objects.isNull(practiceGroupBuyParams.getUserId())) {
|