소스 이상 충돌 정리
This commit is contained in:
parent
0f84dc08fd
commit
4b44dc0acf
@ -194,98 +194,103 @@ public class NlibSearchServiceImpl implements NlibSearchService{
|
|||||||
{
|
{
|
||||||
//주제분야 , 자료유형 ,생산기관 별 카운트
|
//주제분야 , 자료유형 ,생산기관 별 카운트
|
||||||
tmpList = (JsonArray) tmp.get("CategoryGroup");
|
tmpList = (JsonArray) tmp.get("CategoryGroup");
|
||||||
|
if(tmpList != null)
|
||||||
for( k=0; k < tmpList.size(); k++){
|
|
||||||
filterObject = (JsonObject) tmpList.get(k);
|
|
||||||
|
|
||||||
if(filterObject.get("SUBJECT_CATE") != null)
|
|
||||||
{
|
|
||||||
subjectList = (JsonArray) filterObject.get("SUBJECT_CATE");
|
|
||||||
}
|
|
||||||
if(filterObject.get("DIV_CATE") != null)
|
|
||||||
{
|
|
||||||
typeList = (JsonArray) filterObject.get("DIV_CATE");
|
|
||||||
}
|
|
||||||
if(filterObject.get("ORG_NM") != null)
|
|
||||||
{
|
|
||||||
orgList = (JsonArray) filterObject.get("ORG_NM");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(subjectList.size()>0)
|
|
||||||
{
|
{
|
||||||
filterObject =(JsonObject) subjectList.get(0);
|
for( k=0; k < tmpList.size(); k++){
|
||||||
filterObject = (JsonObject) filterObject.get("Categories");
|
filterObject = (JsonObject) tmpList.get(k);
|
||||||
subjectList = (JsonArray) filterObject.get("Category");
|
|
||||||
};
|
|
||||||
if(typeList.size()>0)
|
|
||||||
{
|
|
||||||
filterObject =(JsonObject) typeList.get(0);
|
|
||||||
filterObject = (JsonObject) filterObject.get("Categories");
|
|
||||||
typeList = (JsonArray) filterObject.get("Category");
|
|
||||||
};
|
|
||||||
if(orgList.size()>0)
|
|
||||||
{
|
|
||||||
filterObject =(JsonObject) orgList.get(0);
|
|
||||||
filterObject = (JsonObject) filterObject.get("Categories");
|
|
||||||
orgList = (JsonArray) filterObject.get("Category");
|
|
||||||
};
|
|
||||||
for(k = 0; k < subjectList.size(); k++){
|
|
||||||
HashMap<String,String> temp = new HashMap<String,String>();
|
|
||||||
filterObject = (JsonObject)subjectList.get(k);
|
|
||||||
nameTemp = filterObject.get("Name").getAsString();
|
|
||||||
//상위코드값
|
|
||||||
code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^"));
|
|
||||||
temp.put("category_nm_up",code_up);
|
|
||||||
|
|
||||||
//코드값
|
if(filterObject.get("SUBJECT_CATE") != null)
|
||||||
code = nameTemp.substring(nameTemp.lastIndexOf("@")+1);
|
{
|
||||||
temp.put("category_nm",code);
|
subjectList = (JsonArray) filterObject.get("SUBJECT_CATE");
|
||||||
temp.put("category_cnt",filterObject.get("Count").getAsString());
|
}
|
||||||
subjectMap.add(temp);
|
if(filterObject.get("DIV_CATE") != null)
|
||||||
}
|
{
|
||||||
for(k = 0; k < typeList.size(); k++){
|
typeList = (JsonArray) filterObject.get("DIV_CATE");
|
||||||
HashMap<String,String> temp = new HashMap<String,String>();
|
}
|
||||||
filterObject = (JsonObject)typeList.get(k);
|
if(filterObject.get("ORG_NM") != null)
|
||||||
nameTemp = filterObject.get("Name").getAsString();
|
{
|
||||||
//상위코드값
|
orgList = (JsonArray) filterObject.get("ORG_NM");
|
||||||
code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^"));
|
}
|
||||||
temp.put("class_nm_up",code_up);
|
}
|
||||||
|
if(subjectList.size()>0)
|
||||||
|
{
|
||||||
|
filterObject =(JsonObject) subjectList.get(0);
|
||||||
|
filterObject = (JsonObject) filterObject.get("Categories");
|
||||||
|
subjectList = (JsonArray) filterObject.get("Category");
|
||||||
|
};
|
||||||
|
if(typeList.size()>0)
|
||||||
|
{
|
||||||
|
filterObject =(JsonObject) typeList.get(0);
|
||||||
|
filterObject = (JsonObject) filterObject.get("Categories");
|
||||||
|
typeList = (JsonArray) filterObject.get("Category");
|
||||||
|
};
|
||||||
|
if(orgList.size()>0)
|
||||||
|
{
|
||||||
|
filterObject =(JsonObject) orgList.get(0);
|
||||||
|
filterObject = (JsonObject) filterObject.get("Categories");
|
||||||
|
orgList = (JsonArray) filterObject.get("Category");
|
||||||
|
};
|
||||||
|
for(k = 0; k < subjectList.size(); k++){
|
||||||
|
HashMap<String,String> temp = new HashMap<String,String>();
|
||||||
|
filterObject = (JsonObject)subjectList.get(k);
|
||||||
|
nameTemp = filterObject.get("Name").getAsString();
|
||||||
|
//상위코드값
|
||||||
|
code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^"));
|
||||||
|
temp.put("category_nm_up",code_up);
|
||||||
|
|
||||||
//코드값
|
//코드값
|
||||||
code = nameTemp.substring(nameTemp.lastIndexOf("@")+1);
|
code = nameTemp.substring(nameTemp.lastIndexOf("@")+1);
|
||||||
temp.put("class_nm",code);
|
temp.put("category_nm",code);
|
||||||
temp.put("class_cnt",filterObject.get("Count").getAsString());
|
temp.put("category_cnt",filterObject.get("Count").getAsString());
|
||||||
typeMap.add(temp);
|
subjectMap.add(temp);
|
||||||
}
|
}
|
||||||
for(k = 0; k < orgList.size(); k++){
|
for(k = 0; k < typeList.size(); k++){
|
||||||
HashMap<String,String> temp = new HashMap<String,String>();
|
HashMap<String,String> temp = new HashMap<String,String>();
|
||||||
filterObject = (JsonObject)orgList.get(k);
|
filterObject = (JsonObject)typeList.get(k);
|
||||||
nameTemp = filterObject.get("Name").getAsString();
|
nameTemp = filterObject.get("Name").getAsString();
|
||||||
if(!"null".equals(nameTemp)) {
|
//상위코드값
|
||||||
temp.put("org_nm",nameTemp);
|
code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^"));
|
||||||
temp.put("org_cnt",filterObject.get("Count").getAsString());
|
temp.put("class_nm_up",code_up);
|
||||||
orgMap.add(temp);
|
|
||||||
}
|
//코드값
|
||||||
|
code = nameTemp.substring(nameTemp.lastIndexOf("@")+1);
|
||||||
|
temp.put("class_nm",code);
|
||||||
|
temp.put("class_cnt",filterObject.get("Count").getAsString());
|
||||||
|
typeMap.add(temp);
|
||||||
|
}
|
||||||
|
for(k = 0; k < orgList.size(); k++){
|
||||||
|
HashMap<String,String> temp = new HashMap<String,String>();
|
||||||
|
filterObject = (JsonObject)orgList.get(k);
|
||||||
|
nameTemp = filterObject.get("Name").getAsString();
|
||||||
|
if(!"null".equals(nameTemp)) {
|
||||||
|
temp.put("org_nm",nameTemp);
|
||||||
|
temp.put("org_cnt",filterObject.get("Count").getAsString());
|
||||||
|
orgMap.add(temp);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = (JsonObject) tmp.get("DocumentSet");
|
tmp = (JsonObject) tmp.get("DocumentSet");
|
||||||
searchVO.setTotalCount(tmp.get("TotalCount").getAsString());
|
searchVO.setTotalCount(tmp.get("TotalCount").getAsString());
|
||||||
colArray = (JsonArray) tmp.get("Document");
|
colArray = (JsonArray) tmp.get("Document");
|
||||||
|
|
||||||
//vo list로 json list 파싱
|
if(colArray != null)
|
||||||
for(j=0;j<colArray.size();j++){
|
{
|
||||||
tmp = (JsonObject)colArray.get(j);
|
//vo list로 json list 파싱
|
||||||
tmp = (JsonObject) tmp.get("Field");
|
for(j=0;j<colArray.size();j++){
|
||||||
|
tmp = (JsonObject)colArray.get(j);
|
||||||
|
tmp = (JsonObject) tmp.get("Field");
|
||||||
|
|
||||||
CollectionVO vo = new CollectionVO();
|
CollectionVO vo = new CollectionVO();
|
||||||
vo.setMasterId(tmp.get("MASTER_ID").getAsString());
|
vo.setMasterId(tmp.get("MASTER_ID").getAsString());
|
||||||
|
|
||||||
|
|
||||||
list.add(vo);
|
list.add(vo);
|
||||||
|
|
||||||
/*vo = gson.fromJson(tmp, NlibSearchCollectionVO.class);*/
|
/*vo = gson.fromJson(tmp, NlibSearchCollectionVO.class);*/
|
||||||
/* NlibSearchCollectionVO vo = new NlibSearchCollectionVO();
|
/* NlibSearchCollectionVO vo = new NlibSearchCollectionVO();
|
||||||
vo.setMasterId(tmp.get); = gson.fromJson(tmp, NlibSearchCollectionVO.class);*/
|
vo.setMasterId(tmp.get); = gson.fromJson(tmp, NlibSearchCollectionVO.class);*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user