赵士淞
2023-04-12 bc645363114f95c0e51ecbe6e526b9a9745ee3ba
文本变更
1 files modified
4 ■■■■■ changed files
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capital/service/impl/CapitalAccountCompanyServiceImpl.java 4 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capital/service/impl/CapitalAccountCompanyServiceImpl.java
@@ -143,10 +143,10 @@
        List<CapitalAccountCompany> capitalAccountCompanyList = capitalAccountCompanyRepository.findByProjectDistinguishAndAccountTypeAndAccountYear(resources.getProjectDistinguish(), resources.getAccountType(), resources.getAccountYear());
        // 判断结果集长度
        if (capitalAccountCompanyList.size() > 1) {
            throw new BadRequestException("每个年度同类型公司流账户只能有一个!");
            throw new BadRequestException("每个年度项目区分+账户类型组合公司流账户只能有一个!");
        } else if (capitalAccountCompanyList.size() == 1) {
            if (resources.getId() == null || capitalAccountCompanyList.get(0).getId().longValue() != resources.getId().longValue()) {
                throw new BadRequestException("每个年度同类型公司流账户只能有一个!");
                throw new BadRequestException("每个年度项目区分+账户类型组合公司流账户只能有一个!");
            }
        }
    }