|
@ -157,7 +157,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
group1 = new IndexGroupTemplateEntity(); |
|
|
group1 = new IndexGroupTemplateEntity(); |
|
|
group1.setIndexId(indexDictEntity.getId()); |
|
|
group1.setIndexId(indexDictEntity.getId()); |
|
|
group1.setParentIndexGroupId("0"); |
|
|
group1.setParentIndexGroupId("0"); |
|
|
group1.setId(UniqueIdGenerator.generate()); |
|
|
group1.setId(UniqueIdGenerator.generate24()); |
|
|
group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), true, 4)); |
|
|
group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), true, 4)); |
|
|
group1.setAllIndexCodePath(index.getAllIndexCodePath(0)); |
|
|
group1.setAllIndexCodePath(index.getAllIndexCodePath(0)); |
|
|
indexGroupMap.put(index.getLevel1Index(), group1); |
|
|
indexGroupMap.put(index.getLevel1Index(), group1); |
|
@ -173,7 +173,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
group2 = new IndexGroupTemplateEntity(); |
|
|
group2 = new IndexGroupTemplateEntity(); |
|
|
group2.setIndexId(indexDictEntity.getId()); |
|
|
group2.setIndexId(indexDictEntity.getId()); |
|
|
group2.setParentIndexGroupId(group1.getId()); |
|
|
group2.setParentIndexGroupId(group1.getId()); |
|
|
group2.setId(UniqueIdGenerator.generate()); |
|
|
group2.setId(UniqueIdGenerator.generate24()); |
|
|
group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); |
|
|
group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); |
|
|
group2.setAllIndexCodePath(index.getAllIndexCodePath(3)); |
|
|
group2.setAllIndexCodePath(index.getAllIndexCodePath(3)); |
|
|
indexGroupMap.put(level4IndexDetailKey, group2); |
|
|
indexGroupMap.put(level4IndexDetailKey, group2); |
|
@ -184,7 +184,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
templateEntity.setIndexGroupId(group1.getId()); |
|
|
templateEntity.setIndexGroupId(group1.getId()); |
|
|
templateEntity.setIndexId(indexDictEntity.getId()); |
|
|
templateEntity.setIndexId(indexDictEntity.getId()); |
|
|
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); |
|
|
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); |
|
|
templateEntity.setId(UniqueIdGenerator.generate()); |
|
|
templateEntity.setId(UniqueIdGenerator.generate24()); |
|
|
templateEntity.setCorrelation(index.getCorrelation()); |
|
|
templateEntity.setCorrelation(index.getCorrelation()); |
|
|
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(3)); |
|
|
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(3)); |
|
|
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); |
|
|
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); |
|
@ -202,7 +202,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
templateEntity.setIndexGroupId(group2.getId()); |
|
|
templateEntity.setIndexGroupId(group2.getId()); |
|
|
templateEntity.setIndexId(indexDictEntity.getId()); |
|
|
templateEntity.setIndexId(indexDictEntity.getId()); |
|
|
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); |
|
|
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); |
|
|
templateEntity.setId(UniqueIdGenerator.generate()); |
|
|
templateEntity.setId(UniqueIdGenerator.generate24()); |
|
|
templateEntity.setCorrelation(index.getCorrelation()); |
|
|
templateEntity.setCorrelation(index.getCorrelation()); |
|
|
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(4)); |
|
|
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(4)); |
|
|
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); |
|
|
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); |
|
@ -217,7 +217,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
group1 = new IndexGroupTemplateEntity(); |
|
|
group1 = new IndexGroupTemplateEntity(); |
|
|
group1.setIndexId(indexDictEntity.getId()); |
|
|
group1.setIndexId(indexDictEntity.getId()); |
|
|
group1.setParentIndexGroupId("0"); |
|
|
group1.setParentIndexGroupId("0"); |
|
|
group1.setId(UniqueIdGenerator.generate()); |
|
|
group1.setId(UniqueIdGenerator.generate24()); |
|
|
group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); |
|
|
group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); |
|
|
group1.setAllIndexCodePath(index.getAllIndexCodePath(0)); |
|
|
group1.setAllIndexCodePath(index.getAllIndexCodePath(0)); |
|
|
indexGroupMap.put(index.getLevel1Index(), group1); |
|
|
indexGroupMap.put(index.getLevel1Index(), group1); |
|
@ -232,7 +232,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
group2 = new IndexGroupTemplateEntity(); |
|
|
group2 = new IndexGroupTemplateEntity(); |
|
|
group2.setIndexId(indexDictEntity.getId()); |
|
|
group2.setIndexId(indexDictEntity.getId()); |
|
|
group2.setParentIndexGroupId(group1.getId()); |
|
|
group2.setParentIndexGroupId(group1.getId()); |
|
|
group2.setId(UniqueIdGenerator.generate()); |
|
|
group2.setId(UniqueIdGenerator.generate24()); |
|
|
group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); |
|
|
group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); |
|
|
group2.setAllIndexCodePath(index.getAllIndexCodePath(1)); |
|
|
group2.setAllIndexCodePath(index.getAllIndexCodePath(1)); |
|
|
indexGroupMap.put(level2IndexGroupKey, group2); |
|
|
indexGroupMap.put(level2IndexGroupKey, group2); |
|
@ -243,7 +243,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
templateEntity.setIndexGroupId(group2.getId()); |
|
|
templateEntity.setIndexGroupId(group2.getId()); |
|
|
templateEntity.setIndexId(indexDictEntity.getId()); |
|
|
templateEntity.setIndexId(indexDictEntity.getId()); |
|
|
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); |
|
|
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); |
|
|
templateEntity.setId(UniqueIdGenerator.generate()); |
|
|
templateEntity.setId(UniqueIdGenerator.generate24()); |
|
|
templateEntity.setCorrelation(index.getCorrelation()); |
|
|
templateEntity.setCorrelation(index.getCorrelation()); |
|
|
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(1)); |
|
|
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(1)); |
|
|
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); |
|
|
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); |
|
@ -260,7 +260,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
templateEntity.setIndexGroupId(group2.getId()); |
|
|
templateEntity.setIndexGroupId(group2.getId()); |
|
|
templateEntity.setIndexId(indexDictEntity.getId()); |
|
|
templateEntity.setIndexId(indexDictEntity.getId()); |
|
|
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); |
|
|
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); |
|
|
templateEntity.setId(UniqueIdGenerator.generate()); |
|
|
templateEntity.setId(UniqueIdGenerator.generate24()); |
|
|
templateEntity.setCorrelation(index.getCorrelation()); |
|
|
templateEntity.setCorrelation(index.getCorrelation()); |
|
|
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(4)); |
|
|
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(4)); |
|
|
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); |
|
|
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); |
|
@ -289,7 +289,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
private void buildIndexDicEntity(IndexModel data, IndexDictEntity entity, IndexDictEntity entity2, IndexDictEntity entity3, IndexDictEntity entity4, IndexDictEntity entity5) { |
|
|
private void buildIndexDicEntity(IndexModel data, IndexDictEntity entity, IndexDictEntity entity2, IndexDictEntity entity3, IndexDictEntity entity4, IndexDictEntity entity5) { |
|
|
|
|
|
|
|
|
if (!indexDicMap.containsKey(data.getLevel1Index())) { |
|
|
if (!indexDicMap.containsKey(data.getLevel1Index())) { |
|
|
entity.setId(UniqueIdGenerator.generate()); |
|
|
entity.setId(UniqueIdGenerator.generate24()); |
|
|
entity.setIndexName(data.getLevel1Index()); |
|
|
entity.setIndexName(data.getLevel1Index()); |
|
|
entity.setCorrelation(data.getCorrelation()); |
|
|
entity.setCorrelation(data.getCorrelation()); |
|
|
entity.setLevel("1"); |
|
|
entity.setLevel("1"); |
|
@ -297,7 +297,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
indexDicMap.put(data.getLevel1Index(), entity); |
|
|
indexDicMap.put(data.getLevel1Index(), entity); |
|
|
} |
|
|
} |
|
|
if (!indexDicMap.containsKey(data.getLevel2Index())) { |
|
|
if (!indexDicMap.containsKey(data.getLevel2Index())) { |
|
|
entity2.setId(UniqueIdGenerator.generate()); |
|
|
entity2.setId(UniqueIdGenerator.generate24()); |
|
|
entity2.setIndexName(data.getLevel2Index()); |
|
|
entity2.setIndexName(data.getLevel2Index()); |
|
|
entity2.setCorrelation(data.getCorrelation()); |
|
|
entity2.setCorrelation(data.getCorrelation()); |
|
|
entity2.setLevel("2"); |
|
|
entity2.setLevel("2"); |
|
@ -305,7 +305,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
indexDicMap.put(data.getLevel2Index(), entity2); |
|
|
indexDicMap.put(data.getLevel2Index(), entity2); |
|
|
} |
|
|
} |
|
|
if (!indexDicMap.containsKey(data.getLevel3Index())) { |
|
|
if (!indexDicMap.containsKey(data.getLevel3Index())) { |
|
|
entity3.setId(UniqueIdGenerator.generate()); |
|
|
entity3.setId(UniqueIdGenerator.generate24()); |
|
|
entity3.setIndexName(data.getLevel3Index()); |
|
|
entity3.setIndexName(data.getLevel3Index()); |
|
|
entity3.setCorrelation(data.getCorrelation()); |
|
|
entity3.setCorrelation(data.getCorrelation()); |
|
|
entity3.setLevel("3"); |
|
|
entity3.setLevel("3"); |
|
@ -313,7 +313,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
indexDicMap.put(data.getLevel3Index(), entity3); |
|
|
indexDicMap.put(data.getLevel3Index(), entity3); |
|
|
} |
|
|
} |
|
|
if (!indexDicMap.containsKey(data.getLevel4Index())) { |
|
|
if (!indexDicMap.containsKey(data.getLevel4Index())) { |
|
|
entity4.setId(UniqueIdGenerator.generate()); |
|
|
entity4.setId(UniqueIdGenerator.generate24()); |
|
|
entity4.setIndexName(data.getLevel4Index()); |
|
|
entity4.setIndexName(data.getLevel4Index()); |
|
|
entity4.setCorrelation(data.getCorrelation()); |
|
|
entity4.setCorrelation(data.getCorrelation()); |
|
|
entity4.setLevel("4"); |
|
|
entity4.setLevel("4"); |
|
@ -321,7 +321,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
indexDicMap.put(data.getLevel4Index(), entity4); |
|
|
indexDicMap.put(data.getLevel4Index(), entity4); |
|
|
} |
|
|
} |
|
|
if (!indexDicMap.containsKey(data.getLevel5Index())) { |
|
|
if (!indexDicMap.containsKey(data.getLevel5Index())) { |
|
|
entity5.setId(UniqueIdGenerator.generate()); |
|
|
entity5.setId(UniqueIdGenerator.generate24()); |
|
|
entity5.setIndexName(data.getLevel5Index()); |
|
|
entity5.setIndexName(data.getLevel5Index()); |
|
|
entity5.setCorrelation(data.getCorrelation()); |
|
|
entity5.setCorrelation(data.getCorrelation()); |
|
|
entity5.setLevel("5"); |
|
|
entity5.setLevel("5"); |
|
|