|
|
@ -6,9 +6,14 @@ 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.loanfile.LoanFile; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanfinbank.*; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformation; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationQuery; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationVo; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService; |
|
|
|
import com.yxt.common.base.config.component.FileUploadComponent; |
|
|
|
import com.yxt.common.base.service.MybatisBaseService; |
|
|
@ -52,6 +57,8 @@ public class LoanFinBankService extends MybatisBaseService<LoanFinBankMapper, Lo |
|
|
|
private FileUploadComponent fileUploadComponent; |
|
|
|
@Autowired |
|
|
|
private LoanFileService loanFileService; |
|
|
|
@Autowired |
|
|
|
private SysUserFeign sysUserFeign; |
|
|
|
|
|
|
|
public PagerVo<LoanFinBank> listPage(PagerQuery<LoanFinBankQuery> pq) { |
|
|
|
LoanFinBankQuery query = pq.getParams(); |
|
|
@ -87,9 +94,59 @@ public class LoanFinBankService extends MybatisBaseService<LoanFinBankMapper, Lo |
|
|
|
} |
|
|
|
|
|
|
|
public PagerVo<LoanFinBankVo> listPageVo(PagerQuery<LoanFinBankQuery> pq) { |
|
|
|
LoanFinBankQuery query = pq.getParams(); |
|
|
|
QueryWrapper<LoanFinBank> qw = createQueryWrapper(query); |
|
|
|
IPage<LoanFinBank> page = PagerUtil.queryToPage(pq); |
|
|
|
LoanFinBankQuery pagerQuery = pq.getParams(); |
|
|
|
QueryWrapper<LoanFinBank> qw = new QueryWrapper<>(); |
|
|
|
//=======================
|
|
|
|
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|
|
|
privilegeQuery.setOrgPath(pagerQuery.getOrgPath()); |
|
|
|
privilegeQuery.setMenuSid(pagerQuery.getMenuSid()); |
|
|
|
privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl()); |
|
|
|
privilegeQuery.setUserSid(pagerQuery.getUserSid()); |
|
|
|
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|
|
|
if (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("orgSidPath", orgSidPath); |
|
|
|
} else if ("2".equals(orgLevelKey)) { |
|
|
|
orgSidPath = orgSidPath.substring(0, i2); |
|
|
|
qw.like("orgSidPath", orgSidPath); |
|
|
|
} else if ("3".equals(orgLevelKey)) { |
|
|
|
orgSidPath = orgSidPath.substring(0, i3); |
|
|
|
qw.like("orgSidPath", orgSidPath); |
|
|
|
} else if ("4".equals(orgLevelKey)) { |
|
|
|
orgSidPath = orgSidPath.substring(0, i4); |
|
|
|
qw.like("orgSidPath", orgSidPath); |
|
|
|
} else if ("5".equals(orgLevelKey)) { |
|
|
|
qw.eq("createBySid", pagerQuery.getUserSid()); |
|
|
|
} else { |
|
|
|
PagerVo<LoanFinBankVo> p = new PagerVo<>(); |
|
|
|
return p; |
|
|
|
} |
|
|
|
} else { |
|
|
|
PagerVo<LoanFinBankVo> p = new PagerVo<>(); |
|
|
|
return p; |
|
|
|
} |
|
|
|
//=======================
|
|
|
|
if (StringUtils.isNotBlank(pagerQuery.getManageName())) { |
|
|
|
qw.like("bankName", pagerQuery.getManageName()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(pagerQuery.getName())) { |
|
|
|
qw.like("contactor", pagerQuery.getName()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(pagerQuery.getMobile())) { |
|
|
|
qw.like("mobile", pagerQuery.getMobile()); |
|
|
|
} |
|
|
|
qw.eq("isDelete", 0); |
|
|
|
qw.orderByDesc("createTime"); |
|
|
|
IPage<LoanFinBankVo> pagging = baseMapper.selectPageVo(page, qw); |
|
|
|
PagerVo<LoanFinBankVo> p = PagerUtil.pageToVo(pagging, null); |
|
|
|
return p; |
|
|
|