|
@@ -15,10 +15,8 @@ import com.muchinfo.mtp3common.vo.ExportResult;
|
|
|
import com.muchinfo.mtp3common.vo.PageResult;
|
|
import com.muchinfo.mtp3common.vo.PageResult;
|
|
|
import com.muchinfo.mtp3common.enumtype.SysConstants;
|
|
import com.muchinfo.mtp3common.enumtype.SysConstants;
|
|
|
import com.muchinfo.mtp3common.enumtype.Constants;
|
|
import com.muchinfo.mtp3common.enumtype.Constants;
|
|
|
-import com.muchinfo.mtp3interface.mapper.IReckonDaydividecountdetailMapper;
|
|
|
|
|
-import com.muchinfo.mtp3interface.mapper.ISystemmanagerMapper;
|
|
|
|
|
-import com.muchinfo.mtp3interface.mapper.ITaaccountMapper;
|
|
|
|
|
-import com.muchinfo.mtp3interface.mapper.IUseraccountMapper;
|
|
|
|
|
|
|
+import com.muchinfo.mtp3interface.mapper.*;
|
|
|
|
|
+import com.muchinfo.mtp3pojos.entity.ReckonDaytaaccount;
|
|
|
import com.muchinfo.mtp3pojos.entity.Systemmanager;
|
|
import com.muchinfo.mtp3pojos.entity.Systemmanager;
|
|
|
import com.muchinfo.mtp3pojos.entity.Useraccount;
|
|
import com.muchinfo.mtp3pojos.entity.Useraccount;
|
|
|
import com.muchinfo.mtp3pojos.vo.query.position.PositionSumSheetResult;
|
|
import com.muchinfo.mtp3pojos.vo.query.position.PositionSumSheetResult;
|
|
@@ -51,13 +49,15 @@ public class ReportFormServiceImpl implements IReportFormService {
|
|
|
private IReckonDaydividecountdetailMapper detailMapper;
|
|
private IReckonDaydividecountdetailMapper detailMapper;
|
|
|
@Resource
|
|
@Resource
|
|
|
private ITaaccountMapper iTaaccountMapper;
|
|
private ITaaccountMapper iTaaccountMapper;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private IReckonDaytaaccountMapper iReckonDaytaaccountMapper;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public PageResult<ShareAmountQueryResult> selectShareAmount(ShareAmountQueryParam param, HttpServletRequest request) {
|
|
public PageResult<ShareAmountQueryResult> selectShareAmount(ShareAmountQueryParam param, HttpServletRequest request) {
|
|
|
Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
|
|
Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
|
|
|
- if(systemmanager.getReletype()!= 1){
|
|
|
|
|
|
|
+ if (systemmanager.getReletype() != 1) {
|
|
|
param.setAreaid(systemmanager.getAreauserid());
|
|
param.setAreaid(systemmanager.getAreauserid());
|
|
|
- param.setAreaname(iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",systemmanager.getAreauserid())).getAccountname());
|
|
|
|
|
|
|
+ param.setAreaname(iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", systemmanager.getAreauserid())).getAccountname());
|
|
|
}
|
|
}
|
|
|
Object devidetype = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, SysConstants.SYSPARAM_CODE_DIVIDE);
|
|
Object devidetype = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, SysConstants.SYSPARAM_CODE_DIVIDE);
|
|
|
if (devidetype == null || "1".equals(devidetype.toString())) {
|
|
if (devidetype == null || "1".equals(devidetype.toString())) {
|
|
@@ -78,15 +78,15 @@ public class ReportFormServiceImpl implements IReportFormService {
|
|
|
IPage<ShareAmountQueryResult> resultIPage;
|
|
IPage<ShareAmountQueryResult> resultIPage;
|
|
|
|
|
|
|
|
if (param.getCycletype() == null || param.getCycletype() == 0) {
|
|
if (param.getCycletype() == null || param.getCycletype() == 0) {
|
|
|
- resultIPage = detailMapper.queryDayDivide(page,param);
|
|
|
|
|
- }else{
|
|
|
|
|
|
|
+ resultIPage = detailMapper.queryDayDivide(page, param);
|
|
|
|
|
+ } else {
|
|
|
if (param.getCycletype() == 2 && param.getQuarter() != null) {
|
|
if (param.getCycletype() == 2 && param.getQuarter() != null) {
|
|
|
- param.setTradedate(param.getTradedate()+param.getQuarter());
|
|
|
|
|
|
|
+ param.setTradedate(param.getTradedate() + param.getQuarter());
|
|
|
}
|
|
}
|
|
|
- if (param.getCycletype() == 4 && param.getTradedate().length() == 8){
|
|
|
|
|
|
|
+ if (param.getCycletype() == 4 && param.getTradedate().length() == 8) {
|
|
|
param.setCycletime(param.getTradedate());
|
|
param.setCycletime(param.getTradedate());
|
|
|
}
|
|
}
|
|
|
- resultIPage = detailMapper.queryReportDivide(page,param);
|
|
|
|
|
|
|
+ resultIPage = detailMapper.queryReportDivide(page, param);
|
|
|
}
|
|
}
|
|
|
PageResult<ShareAmountQueryResult> pageResult = new PageResult<>();
|
|
PageResult<ShareAmountQueryResult> pageResult = new PageResult<>();
|
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
@@ -104,7 +104,7 @@ public class ReportFormServiceImpl implements IReportFormService {
|
|
|
public AjaxResult<RefUserResult> queryRefUserSelect(String searchcode, HttpServletRequest request) {
|
|
public AjaxResult<RefUserResult> queryRefUserSelect(String searchcode, HttpServletRequest request) {
|
|
|
Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
|
|
Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
|
|
|
Long refereeuserid = systemmanager.getAreauserid();
|
|
Long refereeuserid = systemmanager.getAreauserid();
|
|
|
- List<RefUserResult> results = iTaaccountMapper.queryRefUserSelect(searchcode,refereeuserid);
|
|
|
|
|
|
|
+ List<RefUserResult> results = iTaaccountMapper.queryRefUserSelect(searchcode, refereeuserid);
|
|
|
return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, results);
|
|
return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, results);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -114,10 +114,10 @@ public class ReportFormServiceImpl implements IReportFormService {
|
|
|
// 周数不足两位前面补0 #5732 推荐成交报表-周报表查不到数据 -- 重构成公共函数
|
|
// 周数不足两位前面补0 #5732 推荐成交报表-周报表查不到数据 -- 重构成公共函数
|
|
|
param.setCycletime(DateTimeUtils.getYearWeekNum(param.getCycletime()));
|
|
param.setCycletime(DateTimeUtils.getYearWeekNum(param.getCycletime()));
|
|
|
} else {
|
|
} else {
|
|
|
- param.setCycletime(formatDate(param.getCycletype(),param.getCycletime(),param.getQuarter()));
|
|
|
|
|
|
|
+ param.setCycletime(formatDate(param.getCycletype(), param.getCycletime(), param.getQuarter()));
|
|
|
}
|
|
}
|
|
|
IPage<TradeQueryResult> page = new Page<>(param.getPageNum(), param.getPageSize());
|
|
IPage<TradeQueryResult> page = new Page<>(param.getPageNum(), param.getPageSize());
|
|
|
- IPage<TradeQueryResult> resultIPage = detailMapper.queryTrade(page,param);
|
|
|
|
|
|
|
+ IPage<TradeQueryResult> resultIPage = detailMapper.queryTrade(page, param);
|
|
|
PageResult<TradeQueryResult> pageResult = new PageResult<>();
|
|
PageResult<TradeQueryResult> pageResult = new PageResult<>();
|
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
|
pageResult.setMessage(Constants.Deal_Success_Message);
|
|
pageResult.setMessage(Constants.Deal_Success_Message);
|
|
@@ -147,9 +147,9 @@ public class ReportFormServiceImpl implements IReportFormService {
|
|
|
IPage<OrgReportQueryResult> resultIPage;
|
|
IPage<OrgReportQueryResult> resultIPage;
|
|
|
if (param.getCycletype() == 0) {
|
|
if (param.getCycletype() == 0) {
|
|
|
//日报表
|
|
//日报表
|
|
|
- resultIPage = detailMapper.queryOrgReckonSum(page,param);
|
|
|
|
|
|
|
+ resultIPage = detailMapper.queryOrgReckonSum(page, param);
|
|
|
} else {
|
|
} else {
|
|
|
- resultIPage = detailMapper.queryOrgReportSum(page,param);
|
|
|
|
|
|
|
+ resultIPage = detailMapper.queryOrgReportSum(page, param);
|
|
|
}
|
|
}
|
|
|
PageResult<OrgReportQueryResult> pageResult = new PageResult<>();
|
|
PageResult<OrgReportQueryResult> pageResult = new PageResult<>();
|
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
@@ -214,9 +214,9 @@ public class ReportFormServiceImpl implements IReportFormService {
|
|
|
IPage<InvestorReportQueryResult> page = new Page<>(param.getPageNum(), param.getPageSize());
|
|
IPage<InvestorReportQueryResult> page = new Page<>(param.getPageNum(), param.getPageSize());
|
|
|
IPage<InvestorReportQueryResult> resultIPage;
|
|
IPage<InvestorReportQueryResult> resultIPage;
|
|
|
if (param.getCycletype() == 0) {
|
|
if (param.getCycletype() == 0) {
|
|
|
- resultIPage = detailMapper.queryReckonDayTa(page,param);
|
|
|
|
|
|
|
+ resultIPage = detailMapper.queryReckonDayTa(page, param);
|
|
|
} else {
|
|
} else {
|
|
|
- resultIPage = detailMapper.queryReportTa(page,param);
|
|
|
|
|
|
|
+ resultIPage = detailMapper.queryReportTa(page, param);
|
|
|
}
|
|
}
|
|
|
PageResult<InvestorReportQueryResult> pageResult = new PageResult<>();
|
|
PageResult<InvestorReportQueryResult> pageResult = new PageResult<>();
|
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
@@ -230,22 +230,20 @@ public class ReportFormServiceImpl implements IReportFormService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public PageResult<TaAccountMsgResult> taaccountReportQuery(TaAccountReportParam param, HttpServletRequest request) {
|
|
|
|
|
- if(param.getCycletype() == 4){
|
|
|
|
|
|
|
+ public PageResult<ReckonDaytaaccount> taaccountReportQuery(TaAccountReportParam param, HttpServletRequest request) {
|
|
|
|
|
+ if (param.getCycletype() == 4) {
|
|
|
// 周数不足两位前面补0 #5732 推荐成交报表-周报表查不到数据 -- 重构成公共函数
|
|
// 周数不足两位前面补0 #5732 推荐成交报表-周报表查不到数据 -- 重构成公共函数
|
|
|
String cycletime = DateTimeUtils.getYearWeekNum(param.getCycletime());
|
|
String cycletime = DateTimeUtils.getYearWeekNum(param.getCycletime());
|
|
|
param.setCycletime(cycletime);
|
|
param.setCycletime(cycletime);
|
|
|
- }else{
|
|
|
|
|
- param.setCycletime(formatDate(param.getCycletype(),param.getCycletime(),param.getQuarter()));
|
|
|
|
|
- }
|
|
|
|
|
- IPage<TaAccountMsgResult> page = new Page<>(param.getPageNum(), param.getPageSize());
|
|
|
|
|
- IPage<TaAccountMsgResult> resultIPage;
|
|
|
|
|
- if (param.getCycletype() == 0) {
|
|
|
|
|
- resultIPage = detailMapper.daytaaccountreport(page,param);
|
|
|
|
|
} else {
|
|
} else {
|
|
|
- resultIPage = detailMapper.taaccountreport(page,param);
|
|
|
|
|
|
|
+ param.setCycletime(formatDate(param.getCycletype(), param.getCycletime(), param.getQuarter()));
|
|
|
}
|
|
}
|
|
|
- PageResult<TaAccountMsgResult> pageResult = new PageResult<>();
|
|
|
|
|
|
|
+ IPage<ReckonDaytaaccount> page = new Page<>(param.getPageNum(), param.getPageSize());
|
|
|
|
|
+ IPage<ReckonDaytaaccount> resultIPage = iReckonDaytaaccountMapper.selectPage(page, new QueryWrapper<ReckonDaytaaccount>()
|
|
|
|
|
+ .eq(param.getAccountid() != null, "accountid", param.getAccountid())
|
|
|
|
|
+ .eq(StringUtils.isNotBlank(param.getCycletime()), "reckondate", param.getCycletime())
|
|
|
|
|
+ .eq(param.getCycletype() != null, ("cycletype"), param.getCycletype()));
|
|
|
|
|
+ PageResult<ReckonDaytaaccount> pageResult = new PageResult<>();
|
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
|
pageResult.setMessage(Constants.Deal_Success_Message);
|
|
pageResult.setMessage(Constants.Deal_Success_Message);
|
|
|
pageResult.setPages(resultIPage.getPages());
|
|
pageResult.setPages(resultIPage.getPages());
|
|
@@ -258,19 +256,19 @@ public class ReportFormServiceImpl implements IReportFormService {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public PageResult<HolderTotalResult> holdertotalquery(TaAccountReportParam param, HttpServletRequest request) {
|
|
public PageResult<HolderTotalResult> holdertotalquery(TaAccountReportParam param, HttpServletRequest request) {
|
|
|
- if(param.getCycletype() == 4){
|
|
|
|
|
|
|
+ if (param.getCycletype() == 4) {
|
|
|
// 周数不足两位前面补0 #5732 推荐成交报表-周报表查不到数据 -- 重构成公共函数
|
|
// 周数不足两位前面补0 #5732 推荐成交报表-周报表查不到数据 -- 重构成公共函数
|
|
|
String cycletime = DateTimeUtils.getYearWeekNum(param.getCycletime());
|
|
String cycletime = DateTimeUtils.getYearWeekNum(param.getCycletime());
|
|
|
param.setCycletime(cycletime);
|
|
param.setCycletime(cycletime);
|
|
|
- }else{
|
|
|
|
|
- param.setCycletime(formatDate(param.getCycletype(),param.getCycletime(),param.getQuarter()));
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ param.setCycletime(formatDate(param.getCycletype(), param.getCycletime(), param.getQuarter()));
|
|
|
}
|
|
}
|
|
|
IPage<HolderTotalResult> page = new Page<>(param.getPageNum(), param.getPageSize());
|
|
IPage<HolderTotalResult> page = new Page<>(param.getPageNum(), param.getPageSize());
|
|
|
IPage<HolderTotalResult> resultIPage;
|
|
IPage<HolderTotalResult> resultIPage;
|
|
|
if (param.getCycletype() == 0) {
|
|
if (param.getCycletype() == 0) {
|
|
|
- resultIPage = detailMapper.daytradeposition(page,param);
|
|
|
|
|
|
|
+ resultIPage = detailMapper.daytradeposition(page, param);
|
|
|
} else {
|
|
} else {
|
|
|
- resultIPage = detailMapper.tradeposition(page,param);
|
|
|
|
|
|
|
+ resultIPage = detailMapper.tradeposition(page, param);
|
|
|
}
|
|
}
|
|
|
PageResult<HolderTotalResult> pageResult = new PageResult<>();
|
|
PageResult<HolderTotalResult> pageResult = new PageResult<>();
|
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
@@ -285,19 +283,19 @@ public class ReportFormServiceImpl implements IReportFormService {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public PageResult<WrPositionResult> wrpositionquery(TaAccountReportParam param, HttpServletRequest request) {
|
|
public PageResult<WrPositionResult> wrpositionquery(TaAccountReportParam param, HttpServletRequest request) {
|
|
|
- if(param.getCycletype() == 4){
|
|
|
|
|
|
|
+ if (param.getCycletype() == 4) {
|
|
|
// 周数不足两位前面补0 #5732 推荐成交报表-周报表查不到数据 -- 重构成公共函数
|
|
// 周数不足两位前面补0 #5732 推荐成交报表-周报表查不到数据 -- 重构成公共函数
|
|
|
String cycletime = DateTimeUtils.getYearWeekNum(param.getCycletime());
|
|
String cycletime = DateTimeUtils.getYearWeekNum(param.getCycletime());
|
|
|
param.setCycletime(cycletime);
|
|
param.setCycletime(cycletime);
|
|
|
- }else{
|
|
|
|
|
- param.setCycletime(formatDate(param.getCycletype(),param.getCycletime(),param.getQuarter()));
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ param.setCycletime(formatDate(param.getCycletype(), param.getCycletime(), param.getQuarter()));
|
|
|
}
|
|
}
|
|
|
IPage<WrPositionResult> page = new Page<>(param.getPageNum(), param.getPageSize());
|
|
IPage<WrPositionResult> page = new Page<>(param.getPageNum(), param.getPageSize());
|
|
|
IPage<WrPositionResult> resultIPage;
|
|
IPage<WrPositionResult> resultIPage;
|
|
|
if (param.getCycletype() == 0) {
|
|
if (param.getCycletype() == 0) {
|
|
|
- resultIPage = detailMapper.daywrposition(page,param);
|
|
|
|
|
|
|
+ resultIPage = detailMapper.daywrposition(page, param);
|
|
|
} else {
|
|
} else {
|
|
|
- resultIPage = detailMapper.wrposition(page,param);
|
|
|
|
|
|
|
+ resultIPage = detailMapper.wrposition(page, param);
|
|
|
}
|
|
}
|
|
|
PageResult<WrPositionResult> pageResult = new PageResult<>();
|
|
PageResult<WrPositionResult> pageResult = new PageResult<>();
|
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
@@ -310,7 +308,7 @@ public class ReportFormServiceImpl implements IReportFormService {
|
|
|
return pageResult;
|
|
return pageResult;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private String formatDate(Integer cycletype ,String cycletime,Integer quarter) {
|
|
|
|
|
|
|
+ private String formatDate(Integer cycletype, String cycletime, Integer quarter) {
|
|
|
String rdate = null;
|
|
String rdate = null;
|
|
|
if (cycletype == 0) {
|
|
if (cycletype == 0) {
|
|
|
//日报表
|
|
//日报表
|