feat: 발주기관별시추정보관리사이트기능개선(FUR-001) - 관리시추정보현황및건설현장조회시, 전체내용을입력하지않고일부분만입력해도검색이되도록개선
parent
ddeaf7a19a
commit
e6bfd33c93
|
|
@ -1,58 +1,28 @@
|
|||
package geoinfo.drilling.inquiry;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
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.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.jfree.util.Log;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
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.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
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.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 ictway.comm.util.parseData;
|
||||
import ictway.comm.util.strUtil;
|
||||
import ictway.comm.web.WebUtil;
|
||||
import ictway.whois.whoisSMS;
|
||||
|
||||
@Controller
|
||||
public class DrillingInquiryController {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ public interface DrillingInquiryMapper {
|
|||
|
||||
public Long sPCntTblCsiByKeyword(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 spGetProjectMbr(HashMap<String, Object> params) throws SQLException;
|
||||
public List<EgovMap> drillingInquiryAutocompleteList(HashMap<String, Object> params) throws SQLException;
|
||||
|
|
|
|||
|
|
@ -70,12 +70,32 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
|
|||
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);
|
||||
List<EgovMap> datas = drillingInquiryMapper.spGetTblCsiByKeyword(params);
|
||||
|
||||
|
||||
|
||||
String constStateCodeKey = "constStateCode";
|
||||
String constStateCodeKey = "constStateCode";
|
||||
String constCompanyCodeKey = "constCompanyCode";
|
||||
String projectStateCodeKey = "projectStateCode";
|
||||
String crtDtKey = "crtDt";
|
||||
|
|
|
|||
|
|
@ -847,5 +847,29 @@ public final class MyUtil {
|
|||
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 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#{masterCompanyThCode, jdbcType=VARCHAR},
|
||||
#{masterCompanyName, jdbcType=VARCHAR},
|
||||
#{constCompanyName, jdbcType=VARCHAR},
|
||||
#{constComCodes, jdbcType=VARCHAR},
|
||||
#{constCompanyAdmin, jdbcType=VARCHAR},
|
||||
#{constCompanyTel, jdbcType=VARCHAR},
|
||||
NULL
|
||||
|
|
@ -24,12 +25,33 @@
|
|||
|
||||
<select id="spGetTblCsiByKeyword" parameterType="map" resultType="egovMap">
|
||||
SELECT * FROM TABLE(SP_GET_TBL_CSI_BY_KEYWORD(
|
||||
#{constTag, jdbcType=VARCHAR},#{constName, jdbcType=VARCHAR},#{constStartDate, jdbcType=VARCHAR},#{constEndDate, jdbcType=VARCHAR},#{constStateCode, jdbcType=VARCHAR},
|
||||
#{masterCompanyOCode, jdbcType=VARCHAR},#{masterCompanyTwCode, jdbcType=VARCHAR},#{masterCompanyThCode, jdbcType=VARCHAR}, #{masterCompanyName, jdbcType=VARCHAR},
|
||||
#{constCompanyName, jdbcType=VARCHAR},#{constCompanyAdmin, jdbcType=VARCHAR},#{constCompanyTel, jdbcType=VARCHAR},NULL,
|
||||
#{constTag, jdbcType=VARCHAR},
|
||||
#{constName, jdbcType=VARCHAR},
|
||||
#{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}))
|
||||
</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 SP_GET_CONST_COMPANY_NAME(#{constCompanyCode}) FROM DUAL
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue