commit
5f6bcc2e4c
@ -48,6 +48,11 @@ public class ExcelUtils {
|
|||||||
cellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
|
cellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
|
||||||
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||||
|
|
||||||
|
int fieldTypeSize = 0;
|
||||||
|
if (CollectionUtils.isNotEmpty(fieldTypes)) {
|
||||||
|
fieldTypeSize = fieldTypes.size();
|
||||||
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(details)) {
|
if (CollectionUtils.isNotEmpty(details)) {
|
||||||
for (int i = 0; i < details.size(); i++) {
|
for (int i = 0; i < details.size(); i++) {
|
||||||
Row row = curSheet.createRow(i);
|
Row row = curSheet.createRow(i);
|
||||||
@ -56,7 +61,7 @@ public class ExcelUtils {
|
|||||||
for (int j = 0; j < rowData.size(); j++) {
|
for (int j = 0; j < rowData.size(); j++) {
|
||||||
Cell cell = row.createCell(j);
|
Cell cell = row.createCell(j);
|
||||||
// with DataType
|
// with DataType
|
||||||
if (i > 0 && (fieldTypes.get(j).equals(DeTypeConstants.DE_INT) || fieldTypes.get(j).equals(DeTypeConstants.DE_FLOAT)) && StringUtils.isNotEmpty(rowData.get(j))) {
|
if (i > 0 && j < fieldTypeSize && (fieldTypes.get(j).equals(DeTypeConstants.DE_INT) || fieldTypes.get(j).equals(DeTypeConstants.DE_FLOAT)) && StringUtils.isNotEmpty(rowData.get(j))) {
|
||||||
cell.setCellValue(Double.valueOf(rowData.get(j)));
|
cell.setCellValue(Double.valueOf(rowData.get(j)));
|
||||||
} else {
|
} else {
|
||||||
cell.setCellValue(rowData.get(j));
|
cell.setCellValue(rowData.get(j));
|
||||||
|
|||||||
@ -41,6 +41,7 @@ public class MapTransferService {
|
|||||||
private static final String FULL_FILE_SUFFIX = "_full.json";
|
private static final String FULL_FILE_SUFFIX = "_full.json";
|
||||||
|
|
||||||
private static final List<String> coverFileNameList = new ArrayList<>();
|
private static final List<String> coverFileNameList = new ArrayList<>();
|
||||||
|
private static final List<String> globalCoverFileNameList = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
@ -48,6 +49,7 @@ public class MapTransferService {
|
|||||||
MATCH_TYPES.add("map");
|
MATCH_TYPES.add("map");
|
||||||
MATCH_TYPES.add("buddle-map");
|
MATCH_TYPES.add("buddle-map");
|
||||||
coverFileNameList.add("350200_full.json");
|
coverFileNameList.add("350200_full.json");
|
||||||
|
globalCoverFileNameList.add("000000000_full.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
@ -74,12 +76,11 @@ public class MapTransferService {
|
|||||||
File chinaRootDir = new File(chinaRootPath);
|
File chinaRootDir = new File(chinaRootPath);
|
||||||
File[] files = chinaRootDir.listFiles();
|
File[] files = chinaRootDir.listFiles();
|
||||||
if (ArrayUtils.isEmpty(files)) return;
|
if (ArrayUtils.isEmpty(files)) return;
|
||||||
|
moveGlobalFile();
|
||||||
Map<String, List<File>> listMap = Arrays.stream(files).filter(FileUtil::isFile).collect(Collectors.groupingBy(this::fileType));
|
Map<String, List<File>> listMap = Arrays.stream(files).filter(FileUtil::isFile).collect(Collectors.groupingBy(this::fileType));
|
||||||
if (ObjectUtils.isEmpty(listMap)) return;
|
if (ObjectUtils.isEmpty(listMap)) return;
|
||||||
moveFiles(listMap, BORDER_KEY);
|
moveFiles(listMap, BORDER_KEY);
|
||||||
moveFiles(listMap, FULL_KEY);
|
moveFiles(listMap, FULL_KEY);
|
||||||
moveGlobalFile();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void moveFiles(Map<String, List<File>> listMap, String fileType) {
|
private void moveFiles(Map<String, List<File>> listMap, String fileType) {
|
||||||
@ -110,7 +111,7 @@ public class MapTransferService {
|
|||||||
String targetPath = targetDirPath + fileName;
|
String targetPath = targetDirPath + fileName;
|
||||||
|
|
||||||
File targetFile = new File(targetPath);
|
File targetFile = new File(targetPath);
|
||||||
if (!targetFile.exists()) {
|
if (globalCoverFileNameList.contains(fileName) || !targetFile.exists()) {
|
||||||
FileUtil.move(sourceFile, targetFile, true);
|
FileUtil.move(sourceFile, targetFile, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -198,8 +198,9 @@ const checkCasRedirect = (response) => {
|
|||||||
}
|
}
|
||||||
const resData = response.data
|
const resData = response.data
|
||||||
const routine = resData.hasOwnProperty('success')
|
const routine = resData.hasOwnProperty('success')
|
||||||
|
const resStr = typeof resData === 'string'
|
||||||
const redirectUrl = response?.request?.responseURL
|
const redirectUrl = response?.request?.responseURL
|
||||||
if (resData && !routine && resData.startsWith('<!') && redirectUrl?.includes('cas/login')) {
|
if (resData && !routine && resStr && resData.startsWith('<!') && redirectUrl?.includes('cas/login')) {
|
||||||
store.dispatch('user/logout').finally(() => {
|
store.dispatch('user/logout').finally(() => {
|
||||||
location.reload()
|
location.reload()
|
||||||
})
|
})
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user