This commit is contained in:
hejiayang
2025-12-06 19:40:13 +08:00
parent fb78ec7693
commit a9128bcc60
2 changed files with 11 additions and 6 deletions
@@ -215,10 +215,12 @@
<if test="vo.startTime != null and vo.endTime !=''"> <if test="vo.startTime != null and vo.endTime !=''">
<choose> <choose>
<when test="vo.payTimeStatus == 1"> <when test="vo.payTimeStatus == 1">
and a.pay_time between #{vo.startTime} and #{vo.endTime} and DATE_FORMAT(a.pay_time,'%Y-%m-%d') &gt;= DATE_FORMAT(#{vo.startTime},'%Y-%m-%d')
and DATE_FORMAT(a.pay_time,'%Y-%m-%d') &lt;= DATE_FORMAT(#{vo.endTime},'%Y-%m-%d')
</when> </when>
<when test="vo.payTimeStatus == 2"> <when test="vo.payTimeStatus == 2">
and a.create_time between #{vo.startTime} and #{vo.endTime} and DATE_FORMAT(a.create_time,'%Y-%m-%d') &gt;= DATE_FORMAT(#{vo.startTime},'%Y-%m-%d')
and DATE_FORMAT(a.create_time,'%Y-%m-%d') &lt;= DATE_FORMAT(#{vo.endTime},'%Y-%m-%d')
</when> </when>
</choose> </choose>
</if> </if>
@@ -287,10 +289,12 @@
<if test="vo.startTime != null and vo.endTime !=''"> <if test="vo.startTime != null and vo.endTime !=''">
<choose> <choose>
<when test="vo.payTimeStatus == 1"> <when test="vo.payTimeStatus == 1">
and a.pay_time between #{vo.startTime} and #{vo.endTime} and DATE_FORMAT(a.pay_time,'%Y-%m-%d') &gt;= DATE_FORMAT(#{vo.startTime},'%Y-%m-%d')
and DATE_FORMAT(a.pay_time,'%Y-%m-%d') &lt;= DATE_FORMAT(#{vo.endTime},'%Y-%m-%d')
</when> </when>
<when test="vo.payTimeStatus == 2"> <when test="vo.payTimeStatus == 2">
and a.create_time between #{vo.startTime} and #{vo.endTime} and DATE_FORMAT(a.create_time,'%Y-%m-%d') &gt;= DATE_FORMAT(#{vo.startTime},'%Y-%m-%d')
and DATE_FORMAT(a.create_time,'%Y-%m-%d') &lt;= DATE_FORMAT(#{vo.endTime},'%Y-%m-%d')
</when> </when>
</choose> </choose>
</if> </if>
@@ -319,13 +319,14 @@ public class StClientMemberLevelDeductRuleServiceImpl extends JeecgServiceImpl<S
.values() .values()
.stream() .stream()
.flatMap(group -> { .flatMap(group -> {
//(stRfidVo.getSecondChargeFlag() == null || stRfidVo.getSecondChargeFlag() == 0) && (stRfidVo.getIsCustom() == null || stRfidVo.getIsCustom() == 0)
// 分离二次扣费和非二次扣费数据 // 分离二次扣费和非二次扣费数据
List<StRfidVo> secondCharge = group.stream() List<StRfidVo> secondCharge = group.stream()
.filter(vo -> vo.getSecondChargeFlag() != null && vo.getSecondChargeFlag() == 1) .filter(vo -> (vo.getSecondChargeFlag() != null && vo.getSecondChargeFlag() == 1) || (vo.getIsCustom() != null && vo.getIsCustom() == 1) )
.collect(Collectors.toList()); .collect(Collectors.toList());
List<StRfidVo> nonSecondCharge = group.stream() List<StRfidVo> nonSecondCharge = group.stream()
.filter(vo -> vo.getSecondChargeFlag() == null || vo.getSecondChargeFlag() == 0) .filter(vo -> (vo.getSecondChargeFlag() == null || vo.getSecondChargeFlag() == 0) && (vo.getIsCustom() == null || vo.getIsCustom() == 0))
.collect(Collectors.toList()); .collect(Collectors.toList());
// 非二次扣费数据只保留一条 // 非二次扣费数据只保留一条