| | |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationImportErrorVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import com.panzhihua.common.utlis.ListUtils; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @description: 社区楼栋导入监听 |
| | |
| | | */ |
| | | @Slf4j |
| | | public class ComMngBuildingExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | |
| | | private CommunityService communityService; |
| | | |
| | | private GridService gridService; |
| | |
| | | } |
| | | |
| | | //根据list中的IdCard城市来去重 |
| | | List<ComMngBuildingExcelVO> newVoList = voList.stream().filter(ListUtils.distinctByKey(ComMngBuildingExcelVO::getName)).collect(Collectors.toList()); |
| | | R r = communityService.listSaveBuildingExcelVO(newVoList, communityId, 123141L); |
| | | // List<ComMngBuildingExcelVO> newVoList = voList.stream().filter(ListUtils.distinctByKey(ComMngBuildingExcelVO::getName)).collect(Collectors.toList()); |
| | | R r = communityService.listSaveBuildingExcelVO(voList, communityId); |
| | | if (!R.isOk(r)) { |
| | | String errMsg = r.getMsg(); |
| | | List<ComMngPopulationImportErrorVO> errorList = JSON.parseArray(errMsg, ComMngPopulationImportErrorVO.class); |