|
|
@@ -283,14 +283,27 @@ public class HlwCompanyAccountDetailServiceImpl extends ServiceImpl<HlwCompanyAc
|
|
|
HlwCompany hlwCompany = hlwCompanyService.getByCompanyCode(hlwCompanyAccount.getCompanyCode());
|
|
|
if (hlwCompany != null) {
|
|
|
hlwCompanyAccount.setCompanyId(hlwCompany.getId());
|
|
|
- if (hlwCompanyAccount.getPageSize() == -1) {
|
|
|
- list = baseMapper.detailListNoPage(hlwCompanyAccount);
|
|
|
- return Result.ok(list);
|
|
|
+ //获取企业账户
|
|
|
+ QueryWrapper<HlwCompanyAccount> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("application_id", hlwCompanyAccount.getApplicationId());
|
|
|
+ queryWrapper.eq("company_id", hlwCompanyAccount.getCompanyId());
|
|
|
+ if (hlwCompanyAccount.getCpType() == 1) {
|
|
|
+ queryWrapper.eq("subcontractor_id", hlwCompanyAccount.getSubcontractorId());
|
|
|
} else {
|
|
|
- Page<HlwCompanyAccountDetail> page = new Page<HlwCompanyAccountDetail>(hlwCompanyAccount.getPageNo(), hlwCompanyAccount.getPageSize());
|
|
|
- list = baseMapper.detailList(page, hlwCompanyAccount);
|
|
|
- pageList = page.setRecords(list);
|
|
|
- return Result.ok(pageList);
|
|
|
+ queryWrapper.eq("cp_id", hlwCompanyAccount.getSubcontractorId());
|
|
|
+ }
|
|
|
+ HlwCompanyAccount hlwCompanyAccountDto = hlwCompanyAccountService.getOne(queryWrapper);
|
|
|
+ if (hlwCompanyAccountDto != null) {
|
|
|
+ hlwCompanyAccount.setId(hlwCompanyAccountDto.getId());
|
|
|
+ if (hlwCompanyAccount.getPageSize() == -1) {
|
|
|
+ list = baseMapper.detailListNoPage(hlwCompanyAccount);
|
|
|
+ return Result.ok(list);
|
|
|
+ } else {
|
|
|
+ Page<HlwCompanyAccountDetail> page = new Page<HlwCompanyAccountDetail>(hlwCompanyAccount.getPageNo(), hlwCompanyAccount.getPageSize());
|
|
|
+ list = baseMapper.detailList(page, hlwCompanyAccount);
|
|
|
+ pageList = page.setRecords(list);
|
|
|
+ return Result.ok(pageList);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return Result.error("暂无数据");
|