| | |
| | | |
| | | @Override |
| | | public R listSaveMngRealCompanyExcelVO(List<ComMngRealCompanyExcelVO> list, Long communityId) { |
| | | StringBuffer message = new StringBuffer(); |
| | | List<ComMngRealCompanyDO> dbComMngRealCompany = comMngRealCompanyDAO.selectList(new QueryWrapper<ComMngRealCompanyDO>().lambda()); |
| | | List<ComMngRealCompanyDO> comMngRealCompanyDOS = new ArrayList<>(); |
| | | list.forEach(l->{ |
| | | Integer count = comMngRealCompanyDAO.selectCount(new QueryWrapper<ComMngRealCompanyDO>().lambda().eq(ComMngRealCompanyDO::getCreditCode,l.getCreditCode())); |
| | | if(count==0){ |
| | | ComMngRealCompanyDO realCompany = dbComMngRealCompany.stream().filter(db -> db.getCreditCode().equals(l.getCreditCode())).findFirst().orElse(null); |
| | | if (realCompany == null) { |
| | | ComMngRealCompanyDO comMngRealCompanyDO = new ComMngRealCompanyDO(); |
| | | BeanUtils.copyProperties(l,comMngRealCompanyDO); |
| | | comMngRealCompanyDO.setCommunityId(communityId); |