|
@ -326,44 +326,45 @@ public class IcPartymemberStyleServiceImpl extends BaseServiceImpl<IcPartymember |
|
|
iterator.remove(); |
|
|
iterator.remove(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (CollectionUtils.isEmpty(result)) { |
|
|
/*if (CollectionUtils.isEmpty(result)) { |
|
|
/*Collections.sort(numList); |
|
|
Collections.sort(numList); |
|
|
String subList = numList.stream().map(String::valueOf).collect(Collectors.joining("、")); |
|
|
String subList = numList.stream().map(String::valueOf).collect(Collectors.joining("、")); |
|
|
return new Result().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "第" + subList + "行未成功!");*/ |
|
|
return new Result().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "第" + subList + "行未成功!"); |
|
|
erroeImport(fileList); |
|
|
}*/ |
|
|
return; |
|
|
if (!CollectionUtils.isEmpty(result)) { |
|
|
} |
|
|
List<IcPartymemberStyleImageEntity> imageList = new ArrayList<>(); |
|
|
List<IcPartymemberStyleImageEntity> imageList = new ArrayList<>(); |
|
|
List<IcPartymemberStyleEntity> list = result.stream().map(item -> { |
|
|
List<IcPartymemberStyleEntity> list = result.stream().map(item -> { |
|
|
IcPartymemberStyleEntity entity = new IcPartymemberStyleEntity(); |
|
|
IcPartymemberStyleEntity entity = new IcPartymemberStyleEntity(); |
|
|
entity.setId(UUID.randomUUID().toString().replace("-", "")); |
|
|
entity.setId(UUID.randomUUID().toString().replace("-", "")); |
|
|
entity.setCustomerId(tokenDto.getCustomerId()); |
|
|
entity.setCustomerId(tokenDto.getCustomerId()); |
|
|
entity.setAgencyId(staffInfoCache.getAgencyId()); |
|
|
entity.setAgencyId(staffInfoCache.getAgencyId()); |
|
|
entity.setGridId(gridMap.get(item.getGridName())); |
|
|
entity.setGridId(gridMap.get(item.getGridName())); |
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(entity.getGridId()); |
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(entity.getGridId()); |
|
|
if (null != gridInfo) { |
|
|
if (null != gridInfo) { |
|
|
entity.setGridPids(gridInfo.getPids()); |
|
|
entity.setGridPids(gridInfo.getPids()); |
|
|
} |
|
|
} |
|
|
entity.setName(item.getName()); |
|
|
entity.setName(item.getName()); |
|
|
entity.setMainDeed(item.getMainDeed()); |
|
|
entity.setMainDeed(item.getMainDeed()); |
|
|
IcPartymemberStyleCategoryDictEntity dictEntity=categoryDictMap.get(item.getCategoryName()); |
|
|
IcPartymemberStyleCategoryDictEntity dictEntity=categoryDictMap.get(item.getCategoryName()); |
|
|
entity.setCategoryId(null == dictEntity ? StrConstant.EPMETY_STR : dictEntity.getId()); |
|
|
entity.setCategoryId(null == dictEntity ? StrConstant.EPMETY_STR : dictEntity.getId()); |
|
|
entity.setCategoryCode(null == dictEntity ? StrConstant.EPMETY_STR : dictEntity.getCategoryCode()); |
|
|
entity.setCategoryCode(null == dictEntity ? StrConstant.EPMETY_STR : dictEntity.getCategoryCode()); |
|
|
AtomicInteger i = new AtomicInteger(); |
|
|
AtomicInteger i = new AtomicInteger(); |
|
|
return entity; |
|
|
return entity; |
|
|
}).collect(Collectors.toList()); |
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|
insertBatch(list); |
|
|
insertBatch(list); |
|
|
icPartymemberStyleImageService.insertBatch(imageList); |
|
|
icPartymemberStyleImageService.insertBatch(imageList); |
|
|
|
|
|
|
|
|
/*String str = String.format("共%s条,成功导入%s条。", numList.size() + result.size(), numList.size() + result.size() - numList.size()); |
|
|
/*String str = String.format("共%s条,成功导入%s条。", numList.size() + result.size(), numList.size() + result.size() - numList.size()); |
|
|
if (numList.size() > NumConstant.ZERO) { |
|
|
if (numList.size() > NumConstant.ZERO) { |
|
|
Collections.sort(numList); |
|
|
Collections.sort(numList); |
|
|
String subList = numList.stream().map(String::valueOf).collect(Collectors.joining("、")); |
|
|
String subList = numList.stream().map(String::valueOf).collect(Collectors.joining("、")); |
|
|
log.warn(str + "第" + subList + "行未成功!"); |
|
|
log.warn(str + "第" + subList + "行未成功!"); |
|
|
return new Result().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), str + "第" + subList + "行未成功!"); |
|
|
return new Result().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), str + "第" + subList + "行未成功!"); |
|
|
} |
|
|
} |
|
|
return new Result().ok(str);*/ |
|
|
return new Result().ok(str);*/ |
|
|
|
|
|
} |
|
|
|
|
|
//生成导入失败数据对应的文件,修改任务状态
|
|
|
String url = erroeImport(fileList); |
|
|
String url = erroeImport(fileList); |
|
|
upImportTask(url, taskId, tokenDto.getUserId(), true); |
|
|
upImportTask(url, taskId, tokenDto.getUserId(), true); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|