| | |
| | | */ |
| | | @PostMapping("/population/import") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R listSavePopulationExcelVO(@RequestBody List<ComMngPopulationServeExcelVO> list, @RequestParam(value = "communityId") Long communityId) throws Exception { |
| | | public R listSavePopulationExcelVO(@RequestBody List<ComMngPopulationServeExcelVO> list, @RequestParam(value = "communityId") Long communityId){ |
| | | return comMngPopulationService.listSavePopulation(list, communityId); |
| | | } |
| | | |
| | |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R listSavePopulation(List<ComMngPopulationServeExcelVO> list, Long communityId) throws Exception; |
| | | R listSavePopulation(List<ComMngPopulationServeExcelVO> list, Long communityId); |
| | | |
| | | /** |
| | | * 确认导入实有人口(有则更新,无则新建) |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R listSavePopulation(List<ComMngPopulationServeExcelVO> list, Long communityId) throws Exception { |
| | | public R listSavePopulation(List<ComMngPopulationServeExcelVO> list, Long communityId){ |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationMistakeExcelVO> mistakes = new ArrayList<>(); |
| | | try { |
| | |
| | | }catch (Exception e){ |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | | } |
| | | |
| | | //如果有错误,返回错误 |
| | | //暂时注释,等客户完成任务需要恢复 |
| | | /*if(!populationImportErrorVOList.isEmpty()){ |
| | | return R.fail(JSON.toJSONString(populationImportErrorVOList)); |
| | | } |
| | | this.saveBatch(populationDOList);*/ |
| | | |
| | | log.info("处理完成导入数据"); |
| | | |
| | | if (!mistakes.isEmpty()) { |