Merge branch 'tolag3'
This commit is contained in:
commit
4b428efd7f
74
src/main/java/kcc/com/srch/service/SearchVO.java
Normal file
74
src/main/java/kcc/com/srch/service/SearchVO.java
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
package kcc.com.srch.service;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
import kcc.com.cmm.ComDefaultVO;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class SearchVO extends ComDefaultVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* application 시작
|
||||||
|
*/
|
||||||
|
@JsonProperty("RCEPT_NO")
|
||||||
|
private String rceptNo;
|
||||||
|
|
||||||
|
@JsonProperty("COMPANY_CEO")
|
||||||
|
private String companyCeo;
|
||||||
|
|
||||||
|
@JsonProperty("APPLCNT_COMPANY")
|
||||||
|
private String applcntCompany;
|
||||||
|
|
||||||
|
@JsonProperty("RESPONDENT_CEO")
|
||||||
|
private String respondentCeo;
|
||||||
|
|
||||||
|
@JsonProperty("RESPONDENT_COMPANY")
|
||||||
|
private String respondentCompany;
|
||||||
|
|
||||||
|
@JsonProperty("REG_DT")
|
||||||
|
private String regDt;
|
||||||
|
|
||||||
|
@JsonProperty("CASE_GUBUN")
|
||||||
|
private String caseGubun;
|
||||||
|
|
||||||
|
@JsonProperty("MEMBER_NAME")
|
||||||
|
private String memberName;
|
||||||
|
|
||||||
|
@JsonProperty("ATTACH")
|
||||||
|
private String attach;
|
||||||
|
|
||||||
|
@JsonProperty("URL")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@JsonProperty("CONTACT_HP")
|
||||||
|
private String contactHp;
|
||||||
|
|
||||||
|
@JsonProperty("P_CONTACT_HP")
|
||||||
|
private String pContactHp;
|
||||||
|
|
||||||
|
@JsonProperty("APPLICATION_OBJ")
|
||||||
|
private String applicationObj;
|
||||||
|
|
||||||
|
@JsonProperty("ROAD_ADDR")
|
||||||
|
private String roadAddr;
|
||||||
|
|
||||||
|
@JsonProperty("DOC_CHECK")
|
||||||
|
private String docCheck;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* application 끝
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
26
src/main/java/kcc/com/srch/web/SearchController.java
Normal file
26
src/main/java/kcc/com/srch/web/SearchController.java
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package kcc.com.srch.web;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import seed.utils.FairnetUtils;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class SearchController {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(SearchController.class);
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping(value = "/cmm/srch/Search.do")
|
||||||
|
public String totalSearch(
|
||||||
|
) throws Exception {
|
||||||
|
|
||||||
|
Map<String, Object> application = FairnetUtils.searchApplication("application", "테스트", "-1", "1");
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -19,10 +19,14 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.ibm.icu.text.SimpleDateFormat;
|
import com.ibm.icu.text.SimpleDateFormat;
|
||||||
|
|
||||||
|
import kcc.com.srch.service.SearchVO;
|
||||||
import kcc.let.uat.uia.service.CertVO;
|
import kcc.let.uat.uia.service.CertVO;
|
||||||
|
|
||||||
public class FairnetUtils {
|
public class FairnetUtils {
|
||||||
@ -314,4 +318,68 @@ public class FairnetUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @methodName : searchApplication
|
||||||
|
* @author : JunHo Lee
|
||||||
|
* @date : 2024.12.02
|
||||||
|
* @description :
|
||||||
|
* @param searchType :
|
||||||
|
* application - 조정신청
|
||||||
|
* , board - teamboard
|
||||||
|
* , completed - 종료건
|
||||||
|
* , conference - 협의회
|
||||||
|
* , counsel - 상담
|
||||||
|
* , process - 조정 진행중
|
||||||
|
* @param searchKeyword : 검색어
|
||||||
|
* @param pagingSize : 페이징 크기 (무한: -1)
|
||||||
|
* @param page : 페이지
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Map<String, Object> searchApplication(
|
||||||
|
String searchType
|
||||||
|
, String searchKeyword
|
||||||
|
, String pagingSize
|
||||||
|
, String page
|
||||||
|
) {
|
||||||
|
|
||||||
|
SearchGlobalSet searchGlobalSet = new SearchGlobalSet();
|
||||||
|
|
||||||
|
Map<String, Object> result = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
RestTemplate restTemplate = new RestTemplate();
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
String url = searchGlobalSet.getHost()
|
||||||
|
+ "/srch_resultjson?"
|
||||||
|
// + "w=application"
|
||||||
|
+ "w=" + searchType
|
||||||
|
// + "&q=테스트"
|
||||||
|
+ "&q=" + searchKeyword
|
||||||
|
// + "&outmax=-1"
|
||||||
|
+ "&outmax=" + pagingSize
|
||||||
|
+ "§ion="
|
||||||
|
// + "&pg=1"
|
||||||
|
+ "&pg=" + page;
|
||||||
|
try {
|
||||||
|
String response = restTemplate.getForObject(url, String.class);
|
||||||
|
JsonNode root = objectMapper.readTree(response);
|
||||||
|
JsonNode listNode = root.path("section_list")
|
||||||
|
.path(0)
|
||||||
|
.path("section")
|
||||||
|
.path(0);
|
||||||
|
// .path("att_list");
|
||||||
|
if (listNode.path("att_list").isArray()) {
|
||||||
|
List<SearchVO> searchList = objectMapper.convertValue(
|
||||||
|
listNode.path("att_list"), new TypeReference<List<SearchVO>>() {}
|
||||||
|
);
|
||||||
|
result.put("totcnt", listNode.get("totcnt"));
|
||||||
|
result.put("list", searchList);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
20
src/main/java/seed/utils/SearchGlobalSet.java
Normal file
20
src/main/java/seed/utils/SearchGlobalSet.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package seed.utils;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class SearchGlobalSet {
|
||||||
|
|
||||||
|
private static String host;
|
||||||
|
|
||||||
|
@Value("#{globalSettings['search.host']}")
|
||||||
|
public void setHost(String host) {
|
||||||
|
SearchGlobalSet.host = host;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getHost() {
|
||||||
|
return host;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -236,4 +236,7 @@ Globals.Innorix.License=dev
|
|||||||
email.smtpHost=mail.kofair.or.kr
|
email.smtpHost=mail.kofair.or.kr
|
||||||
email.smtpPort=25
|
email.smtpPort=25
|
||||||
email.username=caseadmin@kofair.or.kr
|
email.username=caseadmin@kofair.or.kr
|
||||||
email.password=@caseadmin2024
|
email.password=@caseadmin2024
|
||||||
|
|
||||||
|
#\uac80\uc0c9\uc194\ub8e8\uc158
|
||||||
|
search.host=http://192.168.0.60:7578
|
||||||
@ -242,3 +242,6 @@ email.smtpHost=mail.kofair.or.kr
|
|||||||
email.smtpPort=25
|
email.smtpPort=25
|
||||||
email.username=caseadmin@kofair.or.kr
|
email.username=caseadmin@kofair.or.kr
|
||||||
email.password=@caseadmin2024
|
email.password=@caseadmin2024
|
||||||
|
|
||||||
|
#\uac80\uc0c9\uc194\ub8e8\uc158
|
||||||
|
search.host=http://192.168.0.60:7578
|
||||||
@ -415,4 +415,7 @@ Globals.Innorix.License=svr
|
|||||||
email.smtpHost=mail.kofair.or.kr
|
email.smtpHost=mail.kofair.or.kr
|
||||||
email.smtpPort=25
|
email.smtpPort=25
|
||||||
email.username=caseadmin@kofair.or.kr
|
email.username=caseadmin@kofair.or.kr
|
||||||
email.password=@caseadmin2024
|
email.password=@caseadmin2024
|
||||||
|
|
||||||
|
#\uac80\uc0c9\uc194\ub8e8\uc158
|
||||||
|
search.host=http://192.168.0.60:7578
|
||||||
Loading…
Reference in New Issue
Block a user