@@ -2328,6 +2328,7 @@ public class ExportServiceImpl implements ExportService {
feeByTypeMap = feeByType.stream().collect(Collectors.groupingBy(StudentPaymentOrderExportDto::getId));
childRepairMap = MapUtil.convertIntegerMap(sellOrderDao.queryChildRepair(otherOrderIds));
}
+ //阳光、善学、坚韧、做更好的自己
List<Integer> organIds = studentPaymentOrderExportDtos.stream().map(e -> e.getOrganId()).distinct().collect(Collectors.toList());
Map<Integer, String> userOrganNameMap = organizationService.getMap("organization","id_","name_",organIds,managerDownload.getTenantId(),Integer.class,String.class);
//按分部分组
@@ -767,7 +767,10 @@
FROM student_payment_order spo
LEFT JOIN student_payment_order_detail spod on spo.id_ = spod.payment_order_id_
LEFT JOIN sporadic_charge_info sci on spo.music_group_id_ = sci.id_
- WHERE spo.tenant_id_ = 1 AND DATE_FORMAT(spo.create_time_,'%Y-%m') = #{month} AND spo.status_ = 'SUCCESS'
+ left join music_group mg ON mg.id_ = spo.music_group_id_ AND spo.group_type_ = 'MUSIC' AND spo.type_ = 'APPLY'
+ where ((mg.musical_instruments_provide_status_ = 1 AND mg.musical_instruments_provide_time_ = #{month}) OR
+ (DATE_FORMAT(spo.pay_time_,'%Y-%m') = #{month} AND (mg.musical_instruments_provide_status_ IS NULL OR mg.musical_instruments_provide_status_ = 1)))
+ AND spo.tenant_id_ = 1 AND spo.status_ = 'SUCCESS'
ORDER BY spo.id_ ASC
</select>
<resultMap id="SporadicChargeInfoDtoMap" type="com.ym.mec.biz.dal.dto.SporadicChargeInfoDto">