|
|
@ -7,6 +7,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
|
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanfundday.LoanFundDayVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanpushfundhistory.LoanPushFundHistory; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanpushfundhistory.LoanPushFundHistoryPdfVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanpushfundhistory.LoanPushFundHistoryQuery; |
|
|
@ -44,7 +47,8 @@ public class LoanPushFundHistoryService extends MybatisBaseService<LoanPushFundH |
|
|
|
private SysOrganizationFeign sysOrganizationFeign; |
|
|
|
@Autowired |
|
|
|
private DocPdfComponent docPdfComponent; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private SysUserFeign sysUserFeign; |
|
|
|
public int saveLists(List<LoanPushFundHistory> list) { |
|
|
|
return baseMapper.saveLists(list); |
|
|
|
} |
|
|
@ -52,9 +56,48 @@ public class LoanPushFundHistoryService extends MybatisBaseService<LoanPushFundH |
|
|
|
public PagerVo<LoanPushFundHistoryVo> listPage(PagerQuery<LoanPushFundHistoryQuery> pq) { |
|
|
|
LoanPushFundHistoryQuery pagerQuery = pq.getParams(); |
|
|
|
QueryWrapper<LoanPushFundHistory> qw = new QueryWrapper<>(); |
|
|
|
ResultBean<String> orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(pagerQuery.getOrgPath()); |
|
|
|
if (orgSidByPath.getSuccess()) { |
|
|
|
qw.eq("a.useOrgSid", orgSidByPath.getData()); |
|
|
|
if (StringUtils.isNotBlank(pagerQuery.getMenuUrl())) { |
|
|
|
//=======================
|
|
|
|
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|
|
|
privilegeQuery.setOrgPath(pagerQuery.getOrgPath()); |
|
|
|
privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl()); |
|
|
|
privilegeQuery.setUserSid(pagerQuery.getUserSid()); |
|
|
|
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|
|
|
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
|
|
|
String orgSidPath = pagerQuery.getOrgPath(); |
|
|
|
orgSidPath = orgSidPath + "/"; |
|
|
|
int i1 = orgSidPath.indexOf("/"); |
|
|
|
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|
|
|
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|
|
|
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|
|
|
String orgLevelKey = defaultIdReltBean.getData(); |
|
|
|
if ("1".equals(orgLevelKey)) { |
|
|
|
// orgSidPath = orgSidPath.substring(0, i1);
|
|
|
|
// qw.like("lrd.orgSidPath", orgSidPath);
|
|
|
|
} else if ("2".equals(orgLevelKey)) { |
|
|
|
// orgSidPath = orgSidPath.substring(0, i2);
|
|
|
|
// qw.like("lrd.orgSidPath", orgSidPath);
|
|
|
|
} else if ("3".equals(orgLevelKey)) { |
|
|
|
ResultBean<String> orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(pagerQuery.getOrgPath()); |
|
|
|
if (orgSidByPath.getSuccess()) { |
|
|
|
qw.eq("a.useOrgSid", orgSidByPath.getData()); |
|
|
|
} |
|
|
|
// orgSidPath = orgSidPath.substring(0, i3);
|
|
|
|
// qw.like("lrd.orgSidPath", orgSidPath);
|
|
|
|
} else if ("4".equals(orgLevelKey)) { |
|
|
|
orgSidPath = orgSidPath.substring(0, i4); |
|
|
|
// qw.like("lrd.orgSidPath", orgSidPath);
|
|
|
|
} else if ("5".equals(orgLevelKey)) { |
|
|
|
// qw.eq("lrd.createBySid", pagerQuery.getUserSid());
|
|
|
|
} else { |
|
|
|
PagerVo<LoanPushFundHistoryVo> p = new PagerVo<>(); |
|
|
|
return p; |
|
|
|
} |
|
|
|
} else { |
|
|
|
PagerVo<LoanPushFundHistoryVo> p = new PagerVo<>(); |
|
|
|
return p; |
|
|
|
} |
|
|
|
} |
|
|
|
String startDate = pagerQuery.getStartTimes(); |
|
|
|
String endDate = pagerQuery.getEndTimes(); |
|
|
|