fix: 智聪记账管理,新增睡眠账户统计功能,优化展示余额。
This commit is contained in:
@@ -2,8 +2,11 @@ package com.intc.invest.controller;
|
||||
|
||||
import com.intc.common.core.web.controller.BaseController;
|
||||
import com.intc.common.core.web.domain.AjaxResult;
|
||||
import com.intc.common.core.web.page.TableDataInfo;
|
||||
import com.intc.invest.domain.dto.AccountsDto;
|
||||
import com.intc.invest.domain.dto.AnalysisDto;
|
||||
import com.intc.invest.domain.vo.AccountCalendarVo;
|
||||
import com.intc.invest.domain.vo.AccountsVo;
|
||||
import com.intc.invest.service.IStatisticAnalysisService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -170,6 +173,17 @@ public class StatisticAnalysisController extends BaseController {
|
||||
return AjaxResult.success(resultMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询睡眠账户统计列表
|
||||
*/
|
||||
@ApiOperation(value="查询睡眠账户统计列表",response = AccountsVo.class)
|
||||
@GetMapping("/sleepAccountsList")
|
||||
public TableDataInfo sleepAccountsList(AccountsDto accountsDto)
|
||||
{
|
||||
startPage();
|
||||
List<AccountsVo> list = iStatisticAnalysisService.selectAccountsList(accountsDto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
package com.intc.invest.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.intc.invest.domain.Accounts;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 记账账户Vo对象 accounts
|
||||
*
|
||||
@@ -46,4 +50,12 @@ public class AccountsVo extends Accounts
|
||||
private String advicePosNames;
|
||||
|
||||
|
||||
/** 最新交易时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date recentDealTime;
|
||||
|
||||
@ApiModelProperty(value="距上次交易时间间隔")
|
||||
private String duration;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -95,4 +95,14 @@ public interface StatisticAnalysisMapper {
|
||||
@DataScope(businessAlias = "t")
|
||||
public List<AccountsDebitPosVo> selectPosStaticList(AccountsDto accountsDto);
|
||||
|
||||
/**
|
||||
* 查询记账账户列表
|
||||
*
|
||||
* @param accountsDto 记账账户
|
||||
* @return 记账账户集合
|
||||
*/
|
||||
@DataScope(businessAlias = "a")
|
||||
public List<AccountsVo> selectAccountsList(AccountsDto accountsDto);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.intc.invest.service;
|
||||
|
||||
import com.intc.invest.domain.dto.AccountsDto;
|
||||
import com.intc.invest.domain.dto.AnalysisDto;
|
||||
import com.intc.invest.domain.vo.AccountCalendarVo;
|
||||
import com.intc.invest.domain.vo.AccountsVo;
|
||||
import com.intc.invest.domain.vo.CreditReportAnalysisVO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -53,4 +55,13 @@ public interface IStatisticAnalysisService {
|
||||
|
||||
public Map<String, Object> getPosStatics(AnalysisDto analysisDto);
|
||||
|
||||
/**
|
||||
* 查询睡眠账户列表
|
||||
*
|
||||
* @param accountsDto 记账账户
|
||||
* @return 记账账户集合
|
||||
*/
|
||||
public List<AccountsVo> selectAccountsList(AccountsDto accountsDto);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.intc.invest.service.IAccountsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -90,6 +91,11 @@ public class AccountsServiceImpl implements IAccountsService
|
||||
if(!"null".equals(String.valueOf(accounts.getPayDate()))) {
|
||||
accounts.setPayDateName(accounts.getPayDate()+"号");
|
||||
}
|
||||
String daysBetween="无交易记录";
|
||||
if(accounts.getRecentDealTime()!=null){
|
||||
daysBetween = DateUtils.timeDistance(new Date(),accounts.getRecentDealTime());
|
||||
}
|
||||
accounts.setDuration(daysBetween);
|
||||
}
|
||||
return accountsList;
|
||||
}
|
||||
|
||||
@@ -3230,4 +3230,58 @@ public class StatisticAnalysisImpl implements IStatisticAnalysisService {
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询记账账户列表
|
||||
*
|
||||
* @param accountsDto 记账账户
|
||||
* @return 记账账户
|
||||
*/
|
||||
@Override
|
||||
public List<AccountsVo> selectAccountsList(AccountsDto accountsDto)
|
||||
{
|
||||
List<AccountsVo> accountsList=statisticAnalysisMapper.selectAccountsList(accountsDto);
|
||||
//修改名称加卡号
|
||||
for (AccountsVo accounts : accountsList) {
|
||||
String typeName="";
|
||||
switch (accounts.getType()){
|
||||
case "1" :
|
||||
typeName="储蓄账户-";
|
||||
break;
|
||||
case "2" :
|
||||
typeName="信用卡账户-";
|
||||
break;
|
||||
case "3" :
|
||||
typeName="借贷账户-";
|
||||
break;
|
||||
case "5" :
|
||||
typeName="投资账户-";
|
||||
break;
|
||||
case "6" :
|
||||
typeName="POS机账户-";
|
||||
break;
|
||||
}
|
||||
if(accounts.getCode()!=null){
|
||||
accounts.setNameCodeAvailableLimit(accounts.getName()+"("+ StringUtils.getLastNumberChars(4,accounts.getCode()+")")+"-可用额度("+accounts.getAvailableLimit()+")");
|
||||
accounts.setTypeNameCodeAvailableLimit(typeName+accounts.getName()+"("+ StringUtils.getLastNumberChars(4,accounts.getCode()+")")+"-可用额度("+accounts.getAvailableLimit()+")");
|
||||
accounts.setNameCode(accounts.getName()+"("+ StringUtils.getLastNumberChars(4,accounts.getCode()+")"));
|
||||
}else {
|
||||
accounts.setNameCodeAvailableLimit(accounts.getName());
|
||||
accounts.setTypeNameCodeAvailableLimit(typeName+accounts.getName());
|
||||
accounts.setNameCode(accounts.getName());
|
||||
}
|
||||
if(!"null".equals(String.valueOf(accounts.getBillDate()))) {
|
||||
accounts.setBillDateName(accounts.getBillDate()+"号");
|
||||
}
|
||||
if(!"null".equals(String.valueOf(accounts.getPayDate()))) {
|
||||
accounts.setPayDateName(accounts.getPayDate()+"号");
|
||||
}
|
||||
String daysBetween="无交易记录";
|
||||
if(accounts.getRecentDealTime()!=null){
|
||||
daysBetween = DateUtils.timeDistance(new Date(),accounts.getRecentDealTime());
|
||||
}
|
||||
accounts.setDuration(daysBetween);
|
||||
}
|
||||
return accountsList;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user