|
|
@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
@ -61,6 +62,29 @@ public class VtbVerificationDataController { |
|
|
|
return R.byEmptyList(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取活动的核销情况合计 |
|
|
|
* @param query |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@GetMapping("pageActivityCheckSum") |
|
|
|
public R<?> getActivityDataSum(VtbActivityCheckSo query){ |
|
|
|
VtbActivityCheckDTO dto = new VtbActivityCheckDTO(); |
|
|
|
List<VtbActivityCheckDTO> list = new ArrayList<>(); |
|
|
|
Long count = verReportMapper.countActiveAndVtbDataAmount(query); |
|
|
|
if(count>0) { |
|
|
|
List<Long> activityIds = verReportMapper.getActiveIdsForDataAmount(query); |
|
|
|
query.setActivityIds(activityIds); |
|
|
|
list = verReportMapper.pageActiveAndVtbDataAmount(query); |
|
|
|
dto.setActivityAmount(list.stream().map(a->a.getActivityAmount()).reduce(BigDecimal.ZERO,BigDecimal::add)); |
|
|
|
dto.setCheckedAmount(list.stream().map(a->a.getCheckedAmount()).reduce(BigDecimal.ZERO,BigDecimal::add)); |
|
|
|
dto.setCheckingAmount(list.stream().map(a->a.getCheckingAmount()).reduce(BigDecimal.ZERO,BigDecimal::add)); |
|
|
|
dto.setNotCheckAmount(list.stream().map(a->a.getNotCheckAmount()).reduce(BigDecimal.ZERO,BigDecimal::add)); |
|
|
|
dto.setReleaseAmount(list.stream().map(a->a.getReleaseAmount()).reduce(BigDecimal.ZERO,BigDecimal::add)); |
|
|
|
} |
|
|
|
return R.ok(dto); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取活动的核销情况(导出) |
|
|
|
* @param query |
|
|
@ -106,6 +130,33 @@ public class VtbVerificationDataController { |
|
|
|
return R.byEmptyList(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取核销的支付信息合计 |
|
|
|
* @param query |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@GetMapping("pageVerificationCheckSum") |
|
|
|
public R<?> getVerificationDataSum(VtbVerificationCheckSo query){ |
|
|
|
VtbVerificationDTO dto = new VtbVerificationDTO(); |
|
|
|
List<VtbVerificationDTO> list = new ArrayList<>(); |
|
|
|
|
|
|
|
Long count = verPayReportMapper.countVerificationCheck(query); |
|
|
|
if(count>0) { |
|
|
|
List<Long> ids = verPayReportMapper.getVerificationIdsForPay(query); |
|
|
|
if(ids.size()==0){ |
|
|
|
ids.add(0L); |
|
|
|
} |
|
|
|
query.setVtbIds(ids); |
|
|
|
|
|
|
|
list = verPayReportMapper.pageVerificationCheck(query); |
|
|
|
dto.setAmount(list.stream().map(a->a.getAmount()).reduce(BigDecimal.ZERO,BigDecimal::add)); |
|
|
|
dto.setPayAmount(list.stream().map(a->a.getPayAmount()).reduce(BigDecimal.ZERO,BigDecimal::add)); |
|
|
|
dto.setNotPayAmount(list.stream().map(a->a.getNotPayAmount()).reduce(BigDecimal.ZERO,BigDecimal::add)); |
|
|
|
dto.setUnpayAmount(list.stream().map(a->a.getUnpayAmount()).reduce(BigDecimal.ZERO,BigDecimal::add)); |
|
|
|
} |
|
|
|
return R.ok(dto); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取核销的支付信息(导出) |
|
|
|
* @param query |
|
|
|