| | |
| | | |
| | | @Override |
| | | public void invoke(ComMngVillageServeExcelVO comMngVillageServeExcelVO, AnalysisContext analysisContext) { |
| | | /*list.add(comMngVillageServeExcelVO); |
| | | list.add(comMngVillageServeExcelVO); |
| | | // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM |
| | | if (list.size() >= BATCH_COUNT) { |
| | | log.info("excel导入数据【{}】", JSONObject.toJSONString(list)); |
| | |
| | | } |
| | | //清空list |
| | | list.clear(); |
| | | }*/ |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | /* log.info("excel导入数据【{}】", JSONObject.toJSONString(list)); |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { log.info("excel导入数据【{}】", JSONObject.toJSONString(list)); |
| | | //确保最后遗留的数据保存在数据库中 |
| | | R r = this.communityService.listSaveVillageServeExcelVO(list, this.communityId); |
| | | if (!R.isOk(r)) { |
| | | throw new ServiceException(r.getMsg()); |
| | | }*/ |
| | | } |
| | | |
| | | } |
| | | } |