|
@@ -68,8 +68,11 @@ public class AccountRunningWaterServiceImpl extends ServiceImpl<AccountRunningWa
|
|
|
@Autowired
|
|
|
private TaxRefundDetailsService taxRefundDetailsService;
|
|
|
|
|
|
- @Override
|
|
|
- public Page<AccountRunningWaterVo> getPage(AccountRunningWaterSelectDto dto) {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分页条件抽取
|
|
|
+ */
|
|
|
+ private QueryWrapper<Object> getPageWrapper(AccountRunningWaterSelectDto dto){
|
|
|
QueryWrapper<Object> wrapper = Wrappers.query();
|
|
|
// 资金账户
|
|
|
wrapper.eq(ObjectUtil.isNotEmpty(dto.getAccountManagementId()), "arw.account_management_id", dto.getAccountManagementId());
|
|
@@ -107,7 +110,11 @@ public class AccountRunningWaterServiceImpl extends ServiceImpl<AccountRunningWa
|
|
|
else {
|
|
|
wrapper.orderByDesc("arw.transaction_time", "arw.id");
|
|
|
}
|
|
|
-
|
|
|
+ return wrapper;
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public Page<AccountRunningWaterVo> getPage(AccountRunningWaterSelectDto dto) {
|
|
|
+ QueryWrapper<Object> wrapper = getPageWrapper(dto);
|
|
|
Page<AccountRunningWaterVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
List<AccountRunningWaterVo> records = page.getRecords();
|
|
|
//赋值归属公司名称
|
|
@@ -477,15 +484,16 @@ public class AccountRunningWaterServiceImpl extends ServiceImpl<AccountRunningWa
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, List<AccountRunningWaterVo>> getTotal() {
|
|
|
+ public Map<String, List<AccountRunningWaterVo>> getTotal(AccountRunningWaterSelectDto dto) {
|
|
|
+ QueryWrapper<Object> wrapper = getPageWrapper(dto);
|
|
|
+ wrapper.groupBy("arw.currency");
|
|
|
+ wrapper.groupBy("arw.`status`");
|
|
|
+
|
|
|
Map<String, List<AccountRunningWaterVo>> map = new HashMap<>();
|
|
|
map.put("income", new ArrayList<>());
|
|
|
map.put("expenditure", new ArrayList<>());
|
|
|
|
|
|
- List<AccountRunningWaterVo> totalList = baseMapper.getTotal(IWrapper.<AccountRunningWater>getWrapper()
|
|
|
- .groupBy("arw.currency")
|
|
|
- .groupBy("arw.`status`")
|
|
|
- );
|
|
|
+ List<AccountRunningWaterVo> totalList = baseMapper.getTotal(wrapper);
|
|
|
if (ObjectUtil.isEmpty(totalList)) {
|
|
|
return map;
|
|
|
}
|