feat: 발주기관별시추정보관리사이트기능개선(FUR-001) - 관리시추정보현황및건설현장조회시, 전체내용을입력하지않고일부분만입력해도검색이되도록개선

main
thkim 2025-08-11 11:49:21 +09:00
parent ddeaf7a19a
commit e6bfd33c93
5 changed files with 71 additions and 34 deletions

View File

@ -1,58 +1,28 @@
package geoinfo.drilling.inquiry; package geoinfo.drilling.inquiry;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.jfree.util.Log;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject; import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import geoinfo.com.WebConfirm;
import geoinfo.drilling.input.service.DrillingInputService;
import geoinfo.drilling.inquiry.service.DrillingInquiryService; import geoinfo.drilling.inquiry.service.DrillingInquiryService;
import geoinfo.map.mapControl.service.MapControlService;
import geoinfo.regi.selectClassInfo.service.SelectClassService;
import geoinfo.regi.status.service.RegiPageService;
import geoinfo.regi.util.exportGeotechnicalPointShp2;
import geoinfo.util.MyUtil; import geoinfo.util.MyUtil;
import ictway.comm.util.parseData;
import ictway.comm.util.strUtil;
import ictway.comm.web.WebUtil;
import ictway.whois.whoisSMS;
@Controller @Controller
public class DrillingInquiryController { public class DrillingInquiryController {

View File

@ -12,6 +12,7 @@ public interface DrillingInquiryMapper {
public Long sPCntTblCsiByKeyword(HashMap<String, Object> params) throws SQLException; public Long sPCntTblCsiByKeyword(HashMap<String, Object> params) throws SQLException;
public List<EgovMap> spGetTblCsiByKeyword(HashMap<String, Object> params) throws SQLException; public List<EgovMap> spGetTblCsiByKeyword(HashMap<String, Object> params) throws SQLException;
public String getComCodes(HashMap<String, Object> params) throws SQLException;
public String spGetConstCompanyName(Long constCompanyCode) throws SQLException; public String spGetConstCompanyName(Long constCompanyCode) throws SQLException;
public String spGetProjectMbr(HashMap<String, Object> params) throws SQLException; public String spGetProjectMbr(HashMap<String, Object> params) throws SQLException;
public List<EgovMap> drillingInquiryAutocompleteList(HashMap<String, Object> params) throws SQLException; public List<EgovMap> drillingInquiryAutocompleteList(HashMap<String, Object> params) throws SQLException;

View File

@ -70,6 +70,26 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
try { try {
try { try {
String keyName = "constName";
params.put(keyName, MyUtil.removeBlank( params.get(keyName) ));
keyName = "constCompanyAdmin";
params.put(keyName, MyUtil.removeBlank( params.get(keyName) ));
keyName = "constCompanyTel";
params.put(keyName, MyUtil.removeBlank( params.get(keyName) ));
keyName = "constCompanyName";
params.put(keyName, MyUtil.removeBlank( params.get(keyName) ));
keyName = "constComCodes";
if( params.get("constCompanyName") != null && !MyUtil.getStringFromObject(params.get("constCompanyName")).trim().isEmpty() ) {
params.put(keyName, drillingInquiryMapper.getComCodes(params));
} else {
params.put(keyName, null);
}
Long count = drillingInquiryMapper.sPCntTblCsiByKeyword(params); Long count = drillingInquiryMapper.sPCntTblCsiByKeyword(params);
List<EgovMap> datas = drillingInquiryMapper.spGetTblCsiByKeyword(params); List<EgovMap> datas = drillingInquiryMapper.spGetTblCsiByKeyword(params);

View File

@ -847,5 +847,29 @@ public final class MyUtil {
return params; return params;
} }
/**
* return
* @param target
* @return
* @throws Exception
*/
public static String removeBlank( Object target ) throws Exception {
String str = getStringFromObject( target );
if( str != null ) {
str = str.replaceAll("\\s", "");
}
return str;
}
public static String removeBlank( String target ) throws Exception {
return removeBlank( (Object) target );
}
} }

View File

@ -16,6 +16,7 @@
#{masterCompanyThCode, jdbcType=VARCHAR}, #{masterCompanyThCode, jdbcType=VARCHAR},
#{masterCompanyName, jdbcType=VARCHAR}, #{masterCompanyName, jdbcType=VARCHAR},
#{constCompanyName, jdbcType=VARCHAR}, #{constCompanyName, jdbcType=VARCHAR},
#{constComCodes, jdbcType=VARCHAR},
#{constCompanyAdmin, jdbcType=VARCHAR}, #{constCompanyAdmin, jdbcType=VARCHAR},
#{constCompanyTel, jdbcType=VARCHAR}, #{constCompanyTel, jdbcType=VARCHAR},
NULL NULL
@ -24,12 +25,33 @@
<select id="spGetTblCsiByKeyword" parameterType="map" resultType="egovMap"> <select id="spGetTblCsiByKeyword" parameterType="map" resultType="egovMap">
SELECT * FROM TABLE(SP_GET_TBL_CSI_BY_KEYWORD( SELECT * FROM TABLE(SP_GET_TBL_CSI_BY_KEYWORD(
#{constTag, jdbcType=VARCHAR},#{constName, jdbcType=VARCHAR},#{constStartDate, jdbcType=VARCHAR},#{constEndDate, jdbcType=VARCHAR},#{constStateCode, jdbcType=VARCHAR}, #{constTag, jdbcType=VARCHAR},
#{masterCompanyOCode, jdbcType=VARCHAR},#{masterCompanyTwCode, jdbcType=VARCHAR},#{masterCompanyThCode, jdbcType=VARCHAR}, #{masterCompanyName, jdbcType=VARCHAR}, #{constName, jdbcType=VARCHAR},
#{constCompanyName, jdbcType=VARCHAR},#{constCompanyAdmin, jdbcType=VARCHAR},#{constCompanyTel, jdbcType=VARCHAR},NULL, #{constStartDate, jdbcType=VARCHAR},
#{constEndDate, jdbcType=VARCHAR},
#{constStateCode, jdbcType=VARCHAR},
#{masterCompanyOCode, jdbcType=VARCHAR},
#{masterCompanyTwCode, jdbcType=VARCHAR},
#{masterCompanyThCode, jdbcType=VARCHAR},
#{masterCompanyName, jdbcType=VARCHAR},
#{constCompanyName, jdbcType=VARCHAR},
#{constComCodes, jdbcType=VARCHAR},
#{constCompanyAdmin, jdbcType=VARCHAR},
#{constCompanyTel, jdbcType=VARCHAR},
NULL,
2,2,#{nCount},#{nPage})) 2,2,#{nCount},#{nPage}))
</select> </select>
<select id="getComCodes" parameterType="map" resultType="String">
SELECT
LISTAGG(COM_CODE, ',') WITHIN GROUP (
ORDER BY COM_CODE) AS COM_CODES
FROM
TBL_CONST_COMPANY
WHERE
REPLACE(COM_NAME, ' ', '') LIKE '%' || #{constCompanyName} || '%'
</select>
<select id="spGetConstCompanyName" parameterType="Long" resultType="String"> <select id="spGetConstCompanyName" parameterType="Long" resultType="String">
SELECT SP_GET_CONST_COMPANY_NAME(#{constCompanyCode}) FROM DUAL SELECT SP_GET_CONST_COMPANY_NAME(#{constCompanyCode}) FROM DUAL
</select> </select>