|
|
@@ -102,25 +102,27 @@ public class HlgAccountServiceImpl extends ServiceImpl<HlgAccountMapper, HlgAcco
|
|
|
QueryWrapper<HlgCompany> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.eq("sys_org_code", sysUser.getOrgCode());
|
|
|
HlgCompany hlgCompany = hlgCompanyService.getOne(queryWrapper);
|
|
|
- if (hlgCompany.getIsCpOn() == 1) {
|
|
|
- //A-B账户
|
|
|
- QueryWrapper<HlgCpAccount> queryWrapper1 = new QueryWrapper<>();
|
|
|
- queryWrapper1.eq("company_id", hlgCompany.getId());
|
|
|
- HlgCpAccount hlgCpAccount = hlgCpAccountService.getOne(queryWrapper1);
|
|
|
- //平台服务商信息
|
|
|
- HlgCompany hlgCompanyB = hlgCompanyService.getById(hlgCpAccount.getCpCompanyId());
|
|
|
- //new一个账户对象,用于存放A-B数据
|
|
|
- HlgAccount hlgAccount1 = new HlgAccount();
|
|
|
- //区别于A-C的account表
|
|
|
- hlgAccount1.setId(0);
|
|
|
- hlgAccount1.setSubcontractorName(hlgCompanyB.getCompanyName());
|
|
|
- hlgAccount1.setBalance(hlgCpAccount.getBalance());
|
|
|
- hlgAccount1.setIsLock(hlgCompanyB.getIsLock() == 0 ? 1 : 0);
|
|
|
- hlgAccount1.setServiceRate(hlgCompany.getCpServiceRate());
|
|
|
- //区别于A-C的account表
|
|
|
- hlgAccount1.setSubcontractorId(0);
|
|
|
- hlgAccount1.setCompanyId(hlgCompany.getId());
|
|
|
- list.add(hlgAccount1);
|
|
|
+ if (hlgCompany != null) {
|
|
|
+ if (hlgCompany.getIsCpOn() == 1) {
|
|
|
+ //A-B账户
|
|
|
+ QueryWrapper<HlgCpAccount> queryWrapper1 = new QueryWrapper<>();
|
|
|
+ queryWrapper1.eq("company_id", hlgCompany.getId());
|
|
|
+ HlgCpAccount hlgCpAccount = hlgCpAccountService.getOne(queryWrapper1);
|
|
|
+ //平台服务商信息
|
|
|
+ HlgCompany hlgCompanyB = hlgCompanyService.getById(hlgCpAccount.getCpCompanyId());
|
|
|
+ //new一个账户对象,用于存放A-B数据
|
|
|
+ HlgAccount hlgAccount1 = new HlgAccount();
|
|
|
+ //区别于A-C的account表
|
|
|
+ hlgAccount1.setId(0);
|
|
|
+ hlgAccount1.setSubcontractorName(hlgCompanyB.getCompanyName());
|
|
|
+ hlgAccount1.setBalance(hlgCpAccount.getBalance());
|
|
|
+ hlgAccount1.setIsLock(hlgCompanyB.getIsLock() == 0 ? 1 : 0);
|
|
|
+ hlgAccount1.setServiceRate(hlgCompany.getCpServiceRate());
|
|
|
+ //区别于A-C的account表
|
|
|
+ hlgAccount1.setSubcontractorId(0);
|
|
|
+ hlgAccount1.setCompanyId(hlgCompany.getId());
|
|
|
+ list.add(hlgAccount1);
|
|
|
+ }
|
|
|
}
|
|
|
return list;
|
|
|
}
|