feat: 발주기관 소속 시추공만 보이도록 수정
parent
427aeddfd2
commit
e4b077eb20
|
|
@ -183,6 +183,80 @@ public class DrillingInquiryController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
System.out.println(
|
||||||
|
"\n--------------------------------------------------------------\n" +
|
||||||
|
request.getRequestURI() + " OUT:" +
|
||||||
|
"\n--------------------------------------------------------------\n" +
|
||||||
|
"jSONOResponse.toJSONString():[" + jSONOResponse.toJSONString() + "]\n" +
|
||||||
|
"\n--------------------------------------------------------------\n"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
int contentLength = 0;
|
||||||
|
try {
|
||||||
|
contentLength = jSONOResponse.toJSONString().getBytes("UTF-8").length;
|
||||||
|
} catch (UnsupportedEncodingException e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
response.setStatus(HttpServletResponse.SC_OK);
|
||||||
|
response.setCharacterEncoding("UTF-8");
|
||||||
|
response.setHeader("Content-Type", "application/json; charset=utf-8");
|
||||||
|
response.setContentLength(contentLength); // Content-Length 설정
|
||||||
|
try {
|
||||||
|
response.getWriter().print(jSONOResponse);
|
||||||
|
} catch (IOException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 발주기관에 소속된 프로젝트 코드 목록을 조회한다.
|
||||||
|
* @param request
|
||||||
|
* @param params
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/drilling/inquiry/project-codes.do", method = RequestMethod.GET, produces = { "application/json; charset=utf-8" })
|
||||||
|
@ResponseBody
|
||||||
|
public ResponseEntity<JSONObject> drillingInquiryProjectCodes (
|
||||||
|
HttpServletRequest request,
|
||||||
|
@RequestParam HashMap<String, Object> params,
|
||||||
|
HttpServletResponse response
|
||||||
|
) {
|
||||||
|
|
||||||
|
System.out.println(
|
||||||
|
"\n--------------------------------------------------------------\n" +
|
||||||
|
request.getRequestURI() + " IN:" +
|
||||||
|
"\n--------------------------------------------------------------\n" +
|
||||||
|
"params" + params.toString() + "\n" +
|
||||||
|
"\n--------------------------------------------------------------\n"
|
||||||
|
);
|
||||||
|
|
||||||
|
JSONObject jSONOResponse = null;
|
||||||
|
try {
|
||||||
|
jSONOResponse = drillingInquiryService.drillingInquiryProjectCodes( request, params );
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
jSONOResponse = new JSONObject();
|
||||||
|
String strTxt =
|
||||||
|
"---------- BUG REPORTING START ----------" + "\n" +
|
||||||
|
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||||
|
"params:[\n" + params.toString() + "\n]\n" +
|
||||||
|
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||||
|
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||||
|
"---------- BUG REPORTING END ----------" + "\n" +
|
||||||
|
"";
|
||||||
|
System.out.println(strTxt);
|
||||||
|
jSONOResponse.put("resultCode", -1);
|
||||||
|
jSONOResponse.put("result", "false");
|
||||||
|
jSONOResponse.put("message", e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
System.out.println(
|
System.out.println(
|
||||||
"\n--------------------------------------------------------------\n" +
|
"\n--------------------------------------------------------------\n" +
|
||||||
request.getRequestURI() + " OUT:" +
|
request.getRequestURI() + " OUT:" +
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ public interface DrillingInquiryMapper {
|
||||||
public List<EgovMap> drillingInquiryAutocompleteList(HashMap<String, Object> params) throws SQLException;
|
public List<EgovMap> drillingInquiryAutocompleteList(HashMap<String, Object> params) throws SQLException;
|
||||||
public EgovMap getItemByProjectCode(HashMap<String, Object> params) throws SQLException;
|
public EgovMap getItemByProjectCode(HashMap<String, Object> params) throws SQLException;
|
||||||
public EgovMap getTblMasterCompanyMbrByComCode(HashMap<String, Object> params) throws SQLException;
|
public EgovMap getTblMasterCompanyMbrByComCode(HashMap<String, Object> params) throws SQLException;
|
||||||
|
public List<EgovMap> drillingInquiryProjectCodes(HashMap<String, Object> params) throws SQLException;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||||
|
|
||||||
public interface DrillingInquiryService {
|
public interface DrillingInquiryService {
|
||||||
JSONObject drillingInquiryList(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
JSONObject drillingInquiryList(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||||
|
|
||||||
JSONObject drillingInquiryOneItem(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
JSONObject drillingInquiryOneItem(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||||
|
|
||||||
HashMap<String, Object> spGetProjectMbr(HttpServletRequest request, HashMap<String, Object> params, String userId) throws Exception;
|
HashMap<String, Object> spGetProjectMbr(HttpServletRequest request, HashMap<String, Object> params, String userId) throws Exception;
|
||||||
|
|
@ -20,5 +21,5 @@ public interface DrillingInquiryService {
|
||||||
EgovMap getItemByProjectCode(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
EgovMap getItemByProjectCode(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||||
|
|
||||||
EgovMap getTblMasterCompanyMbrByComCode(HttpServletRequest request, HashMap<String, Object> params, String userId) throws Exception;
|
EgovMap getTblMasterCompanyMbrByComCode(HttpServletRequest request, HashMap<String, Object> params, String userId) throws Exception;
|
||||||
|
JSONObject drillingInquiryProjectCodes(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,8 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
|
||||||
private LoginMapper loginMapper;
|
private LoginMapper loginMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject drillingInquiryList(HttpServletRequest request, HashMap<String, Object> params) throws Exception {
|
public JSONObject drillingInquiryList(HttpServletRequest request, HashMap<String, Object> params) throws Exception {
|
||||||
|
|
||||||
|
|
@ -461,6 +463,94 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject drillingInquiryProjectCodes(HttpServletRequest request, HashMap<String, Object> params) throws Exception {
|
||||||
|
|
||||||
|
JSONObject jsonResponse = new JSONObject();
|
||||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
String userId = MyUtil.getStringFromObject( request.getSession().getAttribute("USERID") );
|
||||||
|
|
||||||
|
if( userId == null){
|
||||||
|
throw new Exception( "로그인이 필요한 서비스입니다." );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HashMap<String, Object> spGetMasterCompanyDistrictParams = drillingInputService.getOrganizationUserGlGmGsGfCodes(userId);
|
||||||
|
|
||||||
|
String masterCompanyOCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gl") );
|
||||||
|
String masterCompanyTwCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gm") );
|
||||||
|
String masterCompanyThCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gs") );
|
||||||
|
String masterCompanyName = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gf") );
|
||||||
|
String sortfield = "C".equals(MyUtil.getStringFromObject(params.get("constTag"))) ? "0" : "2";
|
||||||
|
String sorttype = "2";
|
||||||
|
params.put("masterCompanyOCode", masterCompanyOCode);
|
||||||
|
params.put("masterCompanyTwCode", masterCompanyTwCode);
|
||||||
|
params.put("masterCompanyThCode", masterCompanyThCode);
|
||||||
|
params.put("masterCompanyName", masterCompanyName);
|
||||||
|
params.put("sortfield", sortfield);
|
||||||
|
params.put("sorttype", sorttype);
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<EgovMap> datas = drillingInquiryMapper.drillingInquiryProjectCodes(params);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
String lpszProjectCodesWithComma = "";
|
||||||
|
for( EgovMap data : datas ) {
|
||||||
|
|
||||||
|
String projectCode = MyUtil.getStringFromObject(data.get("projectCode"));
|
||||||
|
if( projectCode != null ) {
|
||||||
|
if( !lpszProjectCodesWithComma.equals("") ) {
|
||||||
|
lpszProjectCodesWithComma += ", ";
|
||||||
|
}
|
||||||
|
lpszProjectCodesWithComma += "'" + projectCode + "'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
jsonResponse.put("datas", lpszProjectCodesWithComma);
|
||||||
|
return jsonResponse;
|
||||||
|
} catch (SQLException e) {
|
||||||
|
String strTxt =
|
||||||
|
"---------- BUG REPORTING START ----------" + "\n" +
|
||||||
|
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||||
|
"params:[\n" + params.toString() + "\n]\n" +
|
||||||
|
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||||
|
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||||
|
"---------- BUG REPORTING END ----------" + "\n" +
|
||||||
|
"";
|
||||||
|
System.out.println(strTxt);
|
||||||
|
throw new Exception( "오류가 발생하였습니다." + "\n" + "SQLException" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} catch (org.json.simple.parser.ParseException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
throw new Exception( e.getMessage() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,11 @@ public class ManageListController {
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Map<String, Object> getManageList(HttpServletRequest request, HttpServletResponse response, @RequestParam HashMap<String, Object> params) throws Exception {
|
public Map<String, Object> getManageList(HttpServletRequest request, HttpServletResponse response, @RequestParam HashMap<String, Object> params) throws Exception {
|
||||||
|
|
||||||
int nCls = MyUtil.getIntegerFromObject(request.getSession().getAttribute("CLS"));
|
int nCls = -1;
|
||||||
|
if( request.getSession() != null && request.getSession().getAttribute("CLS") != null ) {
|
||||||
|
MyUtil.getIntegerFromObject(request.getSession().getAttribute("CLS"));
|
||||||
|
System.out.println("getManageList.do CLS:" + String.valueOf(nCls));
|
||||||
|
}
|
||||||
strUtil sUtil = new strUtil();
|
strUtil sUtil = new strUtil();
|
||||||
WebUtil wUtil = new WebUtil();
|
WebUtil wUtil = new WebUtil();
|
||||||
// 정렬 필드/방향 처리
|
// 정렬 필드/방향 처리
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,28 @@
|
||||||
]]>
|
]]>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="drillingInquiryProjectCodes" parameterType="map" resultType="egovMap">
|
||||||
|
SELECT PROJECT_CODE
|
||||||
|
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},
|
||||||
|
#{constComCodes, jdbcType=VARCHAR},
|
||||||
|
#{constCompanyAdmin, jdbcType=VARCHAR},
|
||||||
|
#{constCompanyTel, jdbcType=VARCHAR},
|
||||||
|
NULL,
|
||||||
|
#{sortfield},
|
||||||
|
#{sorttype},
|
||||||
|
#{nCount},
|
||||||
|
#{nPage}))
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
<input type="hidden" id="cls" name="cls" value="<c:out value="${params.cls}"/>" />
|
<input type="hidden" id="cls" name="cls" value="<c:out value="${params.cls}"/>" />
|
||||||
|
|
||||||
|
<script language=JavaScript src="${pageContext.request.contextPath}/js/common/myXhr.js"></script>
|
||||||
<script type="text/javascript"
|
<script type="text/javascript"
|
||||||
src="${pageContext.request.contextPath}/js/map/main/main.js?v=20250617_094801"></script>
|
src="${pageContext.request.contextPath}/js/map/main/main.js?v=20250617_094801"></script>
|
||||||
<script type="text/javascript"
|
<script type="text/javascript"
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue