feat: 발주기관 지도 이동 구현
parent
41cca0b766
commit
a1c0555040
17
list.txt
17
list.txt
|
|
@ -1,4 +1,6 @@
|
||||||
#src\main\resources\egovframework\egovProps\globals.properties
|
#src\main\resources\egovframework\egovProps\globals.properties
|
||||||
|
src\main\webapp\com\css\common.v2.0.css
|
||||||
|
src\main\webapp\com\css\common.v2.0.css.map
|
||||||
# 일축압축 첨부 파일 하나 씩 올리면 에러나는 버그 수정중.. 2025-01-06 18:01
|
# 일축압축 첨부 파일 하나 씩 올리면 에러나는 버그 수정중.. 2025-01-06 18:01
|
||||||
src\main\webapp\WEB-INF\views\web\input\uniaxial\rockUniaxial.jsp
|
src\main\webapp\WEB-INF\views\web\input\uniaxial\rockUniaxial.jsp
|
||||||
#건설현장 입력
|
#건설현장 입력
|
||||||
|
|
@ -9,3 +11,18 @@ src\main\resources\egovframework\sqlmap\mapper\drilling\input\DrillingInputMappe
|
||||||
src\main\java\geoinfo\main\login\service\impl\LoginServiceImpl.java
|
src\main\java\geoinfo\main\login\service\impl\LoginServiceImpl.java
|
||||||
src\main\java\geoinfo\main\login\service\LoginMapper.java
|
src\main\java\geoinfo\main\login\service\LoginMapper.java
|
||||||
src\main\resources\egovframework\sqlmap\mapper\main\Login_SQL.xml
|
src\main\resources\egovframework\sqlmap\mapper\main\Login_SQL.xml
|
||||||
|
src\main\webapp\WEB-INF\views\web\input\header.jsp
|
||||||
|
src\main\webapp\web\js\common.js
|
||||||
|
src\main\java\geoinfo\regi\projectList\ProjectListController.java
|
||||||
|
src\main\java\geoinfo\regi\projectList\service\ProjectListService.java
|
||||||
|
src\main\java\geoinfo\regi\projectList\service\impl\ProjectListServiceImpl.java
|
||||||
|
src\main\java\geoinfo\regi\projectList\service\ProjectListMapper.java
|
||||||
|
src\main\resources\egovframework\sqlmap\mapper\regi\projectList.xml
|
||||||
|
src\main\webapp\WEB-INF\views\drilling\inquiry\drilling_inquiry.jsp
|
||||||
|
src\main\webapp\WEB-INF\views\drilling\inquiry\drilling_inquiry_project.jsp
|
||||||
|
src\main\java\geoinfo\drilling\inquiry\service\impl\DrillingInquiryServiceImpl.java
|
||||||
|
src\main\resources\egovframework\sqlmap\mapper\drilling\inquiry\DrillingInquiryMapper.xml
|
||||||
|
src\main\webapp\js\map\main\left\left.js
|
||||||
|
src\main\webapp\js\map\main\map.js
|
||||||
|
src\main\webapp\WEB-INF\views\map\index.jsp
|
||||||
|
src\main\java\geoinfo\drilling\inquiry\DrillingInquiryController.java
|
||||||
|
|
@ -5,6 +5,7 @@ import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
|
|
@ -29,6 +30,7 @@ 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.MediaType;
|
||||||
|
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.RequestBody;
|
||||||
|
|
@ -163,4 +165,77 @@ public class DrillingInputController {
|
||||||
|
|
||||||
return jSONOResponse;
|
return jSONOResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 발주 기관 사용자의 소속을 가져온다.
|
||||||
|
* @param request
|
||||||
|
* @param params
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/drilling/input/departments.do", method = RequestMethod.GET, produces = { "application/json; charset=utf-8" })
|
||||||
|
@ResponseBody
|
||||||
|
public ResponseEntity<JSONObject> getDepartments (
|
||||||
|
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 jsonResponse = null;
|
||||||
|
try {
|
||||||
|
jsonResponse = new JSONObject();
|
||||||
|
drillingInputService.getDepartments( request, params, jsonResponse );
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
jsonResponse = 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);
|
||||||
|
jsonResponse.put("resultCode", -1);
|
||||||
|
jsonResponse.put("result", "false");
|
||||||
|
jsonResponse.put("message", e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
System.out.println("\n--------------------------------------------------------------\n" +
|
||||||
|
request.getRequestURI() + " OUT:" +
|
||||||
|
"\n--------------------------------------------------------------\n" +
|
||||||
|
"jSONOResponse.toJSONString():[" + jsonResponse.toJSONString() + "]\n" +
|
||||||
|
"\n--------------------------------------------------------------\n");
|
||||||
|
|
||||||
|
|
||||||
|
int contentLength = 0;
|
||||||
|
try {
|
||||||
|
contentLength = jsonResponse.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(jsonResponse);
|
||||||
|
} catch (IOException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,10 @@ public interface DrillingInputMapper {
|
||||||
public String test(HashMap<String, Object> params) throws SQLException;
|
public String test(HashMap<String, Object> params) throws SQLException;
|
||||||
public Long findConstCompanyCodeByConstCompanyName(HashMap<String, Object> params) throws SQLException;
|
public Long findConstCompanyCodeByConstCompanyName(HashMap<String, Object> params) throws SQLException;
|
||||||
|
|
||||||
public EgovMap sPGetMasterCompanyDistrict(HashMap<String, Object> sPGetMasterCompanyDistrictParams) throws SQLException;
|
public void spGetMasterCompanyDistrict(HashMap<String, Object> spGetMasterCompanyDistrictParams) throws SQLException;
|
||||||
|
|
||||||
|
public EgovMap getDepartments(HashMap<String, Object> params) throws SQLException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,11 @@ import java.util.HashMap;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import org.json.simple.JSONObject;
|
||||||
|
|
||||||
|
|
||||||
public interface DrillingInputService {
|
public interface DrillingInputService {
|
||||||
|
HashMap<String, Object> getOrganizationUserGlGmGsGfCodes(String userId) throws Exception;
|
||||||
HashMap<String, Object> drillingInputAdd(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
HashMap<String, Object> drillingInputAdd(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||||
|
void getDepartments(HttpServletRequest request, HashMap<String, Object> params, JSONObject jsonResponse) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package geoinfo.drilling.input.service.impl;
|
||||||
import geoinfo.drilling.input.service.DrillingInputMapper;
|
import geoinfo.drilling.input.service.DrillingInputMapper;
|
||||||
import geoinfo.drilling.input.service.DrillingInputService;
|
import geoinfo.drilling.input.service.DrillingInputService;
|
||||||
import geoinfo.main.login.service.LoginMapper;
|
import geoinfo.main.login.service.LoginMapper;
|
||||||
|
import geoinfo.util.MyUtil;
|
||||||
|
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
@ -11,6 +12,7 @@ import java.util.List;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import org.json.simple.JSONObject;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||||
|
|
@ -24,11 +26,12 @@ public class DrillingInputServiceImpl implements DrillingInputService {
|
||||||
@Resource(name="loginMapper")
|
@Resource(name="loginMapper")
|
||||||
private LoginMapper loginMapper;
|
private LoginMapper loginMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 발주기관 사용자의 Gl Gm Gs Gf Codes 구한다
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public HashMap<String, Object> drillingInputAdd(HttpServletRequest request, HashMap<String, Object> params) throws Exception {
|
public HashMap<String, Object> getOrganizationUserGlGmGsGfCodes(String userId) throws Exception {
|
||||||
|
|
||||||
String userId = (String)request.getSession().getAttribute("USERID");
|
|
||||||
|
|
||||||
|
|
||||||
String projectMasterCompanyName = loginMapper.findProjectMasterCompanyNameByUserid(userId);
|
String projectMasterCompanyName = loginMapper.findProjectMasterCompanyNameByUserid(userId);
|
||||||
|
|
||||||
|
|
@ -36,19 +39,35 @@ public class DrillingInputServiceImpl implements DrillingInputService {
|
||||||
throw new Exception( "발주 기관 계정에 설정된 기관이 존재하지 않습니다" );
|
throw new Exception( "발주 기관 계정에 설정된 기관이 존재하지 않습니다" );
|
||||||
}
|
}
|
||||||
|
|
||||||
HashMap<String, Object> sPGetMasterCompanyDistrictParams = new HashMap<String, Object>();
|
HashMap<String, Object> spGetMasterCompanyDistrictParams = new HashMap<String, Object>();
|
||||||
sPGetMasterCompanyDistrictParams.put("projectMasterCompanyName", projectMasterCompanyName);
|
|
||||||
EgovMap egovMap = drillingInputMapper.sPGetMasterCompanyDistrict(sPGetMasterCompanyDistrictParams);
|
|
||||||
|
|
||||||
List test = egovMap.keyList();
|
//String[] words = projectMasterCompanyName.split(" ");
|
||||||
|
//String lastWord = words[words.length - 1];
|
||||||
|
//spGetMasterCompanyDistrictParams.put("projectMasterCompanyName", lastWord);
|
||||||
|
spGetMasterCompanyDistrictParams.put("projectMasterCompanyName", projectMasterCompanyName);
|
||||||
|
|
||||||
|
|
||||||
|
drillingInputMapper.spGetMasterCompanyDistrict(spGetMasterCompanyDistrictParams);
|
||||||
|
|
||||||
|
return spGetMasterCompanyDistrictParams;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HashMap<String, Object> drillingInputAdd(HttpServletRequest request, HashMap<String, Object> params) throws Exception {
|
||||||
|
|
||||||
|
String userId = (String)request.getSession().getAttribute("USERID");
|
||||||
|
|
||||||
|
HashMap<String, Object> spGetMasterCompanyDistrictParams = getOrganizationUserGlGmGsGfCodes(userId);
|
||||||
|
|
||||||
|
|
||||||
params.put("userId", userId);
|
params.put("userId", userId);
|
||||||
|
|
||||||
params.put("masterCompanyOCode", "01");
|
params.put("masterCompanyOCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gl") ));
|
||||||
params.put("masterCompanyTwCode", "01");
|
params.put("masterCompanyTwCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gm") ));
|
||||||
params.put("masterCompanyThCode", "001");
|
params.put("masterCompanyThCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gs") ));
|
||||||
params.put("masterCompanyName", null);
|
params.put("masterCompanyName", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gf") ));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -63,4 +82,42 @@ public class DrillingInputServiceImpl implements DrillingInputService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getDepartments(HttpServletRequest request, HashMap<String, Object> params, JSONObject jsonResponse) throws Exception {
|
||||||
|
|
||||||
|
String userId = (String)request.getSession().getAttribute("USERID");
|
||||||
|
|
||||||
|
|
||||||
|
String projectMasterCompanyName = loginMapper.findProjectMasterCompanyNameByUserid(userId);
|
||||||
|
|
||||||
|
if( projectMasterCompanyName == null ) {
|
||||||
|
throw new Exception( "발주 기관 계정에 설정된 기관이 존재하지 않습니다" );
|
||||||
|
}
|
||||||
|
|
||||||
|
HashMap<String, Object> spGetMasterCompanyDistrictParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
//String[] words = projectMasterCompanyName.split(" ");
|
||||||
|
//String lastWord = words[words.length - 1];
|
||||||
|
//spGetMasterCompanyDistrictParams.put("projectMasterCompanyName", lastWord);
|
||||||
|
spGetMasterCompanyDistrictParams.put("projectMasterCompanyName", projectMasterCompanyName);
|
||||||
|
|
||||||
|
drillingInputMapper.spGetMasterCompanyDistrict(spGetMasterCompanyDistrictParams);
|
||||||
|
|
||||||
|
params.put("userId", userId);
|
||||||
|
|
||||||
|
params.put("glCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gl") ));
|
||||||
|
params.put("gmCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gm") ));
|
||||||
|
params.put("gsCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gs") ));
|
||||||
|
params.put("gfCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gf") ));
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
EgovMap constCompanyCode = drillingInputMapper.getDepartments(params);
|
||||||
|
jsonResponse.put("data", constCompanyCode);
|
||||||
|
} catch (SQLException e) {
|
||||||
|
throw new Exception( e.getMessage() );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,13 +73,39 @@ public class DrillingInquiryController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/drilling/inquiry-project.do")
|
@RequestMapping(value = "/drilling/inquiry-project.do")
|
||||||
public String drillingInquiryProject(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
public ModelAndView drillingInquiryProject(Map<String, Object> map, @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
|
|
||||||
|
ModelAndView mv = new ModelAndView("/drilling/inquiry/drilling_inquiry_project");
|
||||||
if(request.getSession().getAttribute("USERNAME") == null){
|
if(request.getSession().getAttribute("USERNAME") == null){
|
||||||
return "isError";
|
mv.setViewName("isError");
|
||||||
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
return "/drilling/inquiry/drilling_inquiry_project";
|
|
||||||
|
|
||||||
|
String userId = MyUtil.getStringFromObject( request.getSession().getAttribute("USERID") );
|
||||||
|
String cls = MyUtil.getStringFromObject( request.getSession().getAttribute("CLS") );
|
||||||
|
|
||||||
|
mv.addObject("userId", userId);
|
||||||
|
mv.addObject("cls", cls);
|
||||||
|
|
||||||
|
try {
|
||||||
|
HashMap<String, Object> spGetProjectMbrParams = drillingInquiryService.spGetProjectMbr( request, params, userId );
|
||||||
|
mv.addObject("mbr", spGetProjectMbrParams);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@ import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||||
public interface DrillingInquiryMapper {
|
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 sPGetConstCompanyName(Long constCompanyCode) throws SQLException;
|
public String spGetConstCompanyName(Long constCompanyCode) throws SQLException;
|
||||||
|
public String spGetProjectMbr(HashMap<String, Object> params) throws SQLException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,4 +10,6 @@ import org.json.simple.JSONObject;
|
||||||
|
|
||||||
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;
|
||||||
|
HashMap<String, Object> spGetProjectMbr(HttpServletRequest request, HashMap<String, Object> params, String userId) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
package geoinfo.drilling.inquiry.service.impl;
|
package geoinfo.drilling.inquiry.service.impl;
|
||||||
|
|
||||||
|
import geoinfo.drilling.input.service.DrillingInputService;
|
||||||
import geoinfo.drilling.inquiry.service.DrillingInquiryMapper;
|
import geoinfo.drilling.inquiry.service.DrillingInquiryMapper;
|
||||||
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
||||||
|
import geoinfo.main.login.service.LoginMapper;
|
||||||
import geoinfo.util.MyUtil;
|
import geoinfo.util.MyUtil;
|
||||||
|
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
@ -17,6 +19,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
import oracle.sql.TIMESTAMP;
|
import oracle.sql.TIMESTAMP;
|
||||||
|
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||||
|
|
@ -28,19 +31,30 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
|
||||||
@Resource(name="drillingInquiryMapper")
|
@Resource(name="drillingInquiryMapper")
|
||||||
private DrillingInquiryMapper drillingInquiryMapper;
|
private DrillingInquiryMapper drillingInquiryMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
DrillingInputService drillingInputService;
|
||||||
|
|
||||||
|
|
||||||
|
@Resource(name="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 {
|
||||||
|
|
||||||
JSONObject jsonResponse = new JSONObject();
|
JSONObject jsonResponse = new JSONObject();
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
String userId = MyUtil.getStringFromObject( request.getSession().getAttribute("USERID") );
|
||||||
|
|
||||||
|
if( userId == null){
|
||||||
if(request.getSession().getAttribute("USERID") == null){
|
|
||||||
throw new Exception( "로그인이 필요한 서비스입니다." );
|
throw new Exception( "로그인이 필요한 서비스입니다." );
|
||||||
}
|
}
|
||||||
|
|
||||||
//로그인된 계정으로 아래 코드를 구해야 함. 20240820 1915
|
|
||||||
|
|
||||||
|
if( false ) {
|
||||||
|
|
||||||
|
//로그인된 계정으로 아래 코드를 구해야 함. 20240820 1915 2025-01-15 구현이 완료 됨.
|
||||||
|
|
||||||
String referrer = request. getHeader("referer");
|
String referrer = request. getHeader("referer");
|
||||||
|
|
||||||
|
|
@ -64,13 +78,25 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
|
||||||
|
|
||||||
String masterCompanyName = null;
|
String masterCompanyName = null;
|
||||||
params.put("masterCompanyName", masterCompanyName);
|
params.put("masterCompanyName", masterCompanyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
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") );
|
||||||
|
params.put("masterCompanyOCode", masterCompanyOCode);
|
||||||
|
params.put("masterCompanyTwCode", masterCompanyTwCode);
|
||||||
|
params.put("masterCompanyThCode", masterCompanyThCode);
|
||||||
|
params.put("masterCompanyName", masterCompanyName);
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Long count = drillingInquiryMapper.sPCntTblCsiByKeyword(params);
|
Long count = drillingInquiryMapper.sPCntTblCsiByKeyword(params);
|
||||||
List<EgovMap> datas = drillingInquiryMapper.sPGetTblCsiByKeyword(params);
|
List<EgovMap> datas = drillingInquiryMapper.spGetTblCsiByKeyword(params);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -78,6 +104,7 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
|
||||||
String constCompanyCodeKey = "constCompanyCode";
|
String constCompanyCodeKey = "constCompanyCode";
|
||||||
String projectStateCodeKey = "projectStateCode";
|
String projectStateCodeKey = "projectStateCode";
|
||||||
String crtDtKey = "crtDt";
|
String crtDtKey = "crtDt";
|
||||||
|
String modDtKey = "modDt";
|
||||||
|
|
||||||
for( EgovMap data : datas ) {
|
for( EgovMap data : datas ) {
|
||||||
|
|
||||||
|
|
@ -117,7 +144,7 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
|
||||||
Long nConstCompanyCodeKey = MyUtil.getLongFromObject(data.get(constCompanyCodeKey));
|
Long nConstCompanyCodeKey = MyUtil.getLongFromObject(data.get(constCompanyCodeKey));
|
||||||
if( nConstCompanyCodeKey != null ) {
|
if( nConstCompanyCodeKey != null ) {
|
||||||
params.put(constCompanyCodeKey, nConstCompanyCodeKey);
|
params.put(constCompanyCodeKey, nConstCompanyCodeKey);
|
||||||
String coinstCompanyDept = drillingInquiryMapper.sPGetConstCompanyName(nConstCompanyCodeKey);
|
String coinstCompanyDept = drillingInquiryMapper.spGetConstCompanyName(nConstCompanyCodeKey);
|
||||||
data.put("coinstCompanyDept", coinstCompanyDept);
|
data.put("coinstCompanyDept", coinstCompanyDept);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -163,6 +190,13 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
|
||||||
String formattedDate = dateFormat.format(javaTimestamp);
|
String formattedDate = dateFormat.format(javaTimestamp);
|
||||||
data.put(crtDtKey, formattedDate);
|
data.put(crtDtKey, formattedDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
oracleTimestamp = (TIMESTAMP)data.get(modDtKey);
|
||||||
|
if( oracleTimestamp != null ) {
|
||||||
|
Timestamp javaTimestamp = oracleTimestamp.timestampValue();
|
||||||
|
String formattedDate = dateFormat.format(javaTimestamp);
|
||||||
|
data.put(modDtKey, formattedDate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
jsonResponse.put("count", count);
|
jsonResponse.put("count", count);
|
||||||
jsonResponse.put("datas", datas);
|
jsonResponse.put("datas", datas);
|
||||||
|
|
@ -208,7 +242,7 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Long count = drillingInquiryMapper.sPCntTblCsiByKeyword(params);
|
Long count = drillingInquiryMapper.sPCntTblCsiByKeyword(params);
|
||||||
List<HashMap<String, Object>> data = drillingInquiryMapper.sPGetTblCsiByKeyword(params);
|
List<HashMap<String, Object>> data = drillingInquiryMapper.spGetTblCsiByKeyword(params);
|
||||||
jsonResponse.put("count", count);
|
jsonResponse.put("count", count);
|
||||||
jsonResponse.put("data", data);
|
jsonResponse.put("data", data);
|
||||||
return jsonResponse;
|
return jsonResponse;
|
||||||
|
|
@ -224,4 +258,40 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HashMap<String, Object> spGetProjectMbr(HttpServletRequest request, HashMap<String, Object> params, String userId)
|
||||||
|
throws Exception {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
if( userId == null || userId.trim().isEmpty() ) {
|
||||||
|
throw new Exception( "로그인이 필요한 서비스입니다." );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
String projectMasterCompanyCode = loginMapper.findProjectMasterCompanyCodeByUserid(userId);
|
||||||
|
|
||||||
|
if( projectMasterCompanyCode == null || projectMasterCompanyCode.trim().isEmpty() ) {
|
||||||
|
throw new Exception( "발주 기관 계정에 설정된 기관이 존재하지 않습니다. code: 1" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String projectMasterCompanyName = loginMapper.findProjectMasterCompanyNameByUserid(userId);
|
||||||
|
|
||||||
|
if( projectMasterCompanyName == null || projectMasterCompanyName.trim().isEmpty() ) {
|
||||||
|
throw new Exception( "발주 기관 계정에 설정된 기관이 존재하지 않습니다. code: 2" );
|
||||||
|
}
|
||||||
|
|
||||||
|
HashMap<String, Object> spGetProjectMbrParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
spGetProjectMbrParams.put("type", "ORG_TEMP");
|
||||||
|
spGetProjectMbrParams.put("ProjectCode", projectMasterCompanyCode);
|
||||||
|
drillingInquiryMapper.spGetProjectMbr( spGetProjectMbrParams );
|
||||||
|
|
||||||
|
spGetProjectMbrParams.put("projectMasterCompanyName", projectMasterCompanyName);
|
||||||
|
|
||||||
|
return spGetProjectMbrParams;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,4 +100,6 @@ public interface LoginMapper {
|
||||||
public int checkWebMemberIn(Map<String, Object> map) throws Exception;
|
public int checkWebMemberIn(Map<String, Object> map) throws Exception;
|
||||||
|
|
||||||
String findProjectMasterCompanyNameByUserid(String userId);
|
String findProjectMasterCompanyNameByUserid(String userId);
|
||||||
|
String findProjectMasterCompanyCodeByUserid(String userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,8 @@ public class ProjectListController {
|
||||||
// 사업명(프로젝트 명) 중복 검사를 수행한다.
|
// 사업명(프로젝트 명) 중복 검사를 수행한다.
|
||||||
ArrayList<HashMap<String, Object>> arrProjectCodeAndProjectName = masterService.getProjectCodeAndProjectNameByProjectName(params);
|
ArrayList<HashMap<String, Object>> arrProjectCodeAndProjectName = masterService.getProjectCodeAndProjectNameByProjectName(params);
|
||||||
ArrayList<HashMap<String, Object>> arrProjectCodeAndProjectNameByProjectNameFromTempMetaInfo= masterService.getProjectCodeAndProjectNameByProjectNameFromTempMetaInfo(params);
|
ArrayList<HashMap<String, Object>> arrProjectCodeAndProjectNameByProjectNameFromTempMetaInfo= masterService.getProjectCodeAndProjectNameByProjectNameFromTempMetaInfo(params);
|
||||||
|
ArrayList<HashMap<String, Object>> arrConstNameByProjectNameFromTempConstructSiteInfo= masterService.getConstNameByProjectNameFromTempConstructSiteInfo(params);
|
||||||
|
//TEMP_CONSTRUCT_SITE_INFO
|
||||||
|
|
||||||
if( 0 < arrProjectCodeAndProjectName.size() ) {
|
if( 0 < arrProjectCodeAndProjectName.size() ) {
|
||||||
|
|
||||||
|
|
@ -79,7 +81,15 @@ public class ProjectListController {
|
||||||
jsonObject.put("resultCode", "The name already exists.");
|
jsonObject.put("resultCode", "The name already exists.");
|
||||||
jsonObject.put("message", "해당 사업명이 이미 있습니다. 다른 사업명으로 입력해 주세요. code 2");
|
jsonObject.put("message", "해당 사업명이 이미 있습니다. 다른 사업명으로 입력해 주세요. code 2");
|
||||||
}
|
}
|
||||||
} else {
|
} else if( 0 < arrConstNameByProjectNameFromTempConstructSiteInfo.size() ) {
|
||||||
|
jsonObject.put("result", "false");
|
||||||
|
jsonObject.put("resultCode", "The name already exists.");
|
||||||
|
jsonObject.put("message", "해당 사업명이 이미 있습니다. 다른 사업명으로 입력해 주세요. code 3");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
else {
|
||||||
jsonObject.put("result", "true");
|
jsonObject.put("result", "true");
|
||||||
jsonObject.put("message", "");
|
jsonObject.put("message", "");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,5 +53,6 @@ public interface ProjectListMapper {
|
||||||
|
|
||||||
public ArrayList<HashMap<String, Object>> getProjectCodeAndProjectNameByProjectName(HashMap<String, Object> params);
|
public ArrayList<HashMap<String, Object>> getProjectCodeAndProjectNameByProjectName(HashMap<String, Object> params);
|
||||||
public ArrayList<HashMap<String, Object>> getProjectCodeAndProjectNameByProjectNameFromTempMetaInfo(HashMap<String, Object> params);
|
public ArrayList<HashMap<String, Object>> getProjectCodeAndProjectNameByProjectNameFromTempMetaInfo(HashMap<String, Object> params);
|
||||||
|
public ArrayList<HashMap<String, Object>> getConstNameByProjectNameFromTempConstructSiteInfo(HashMap<String, Object> params);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,4 +51,5 @@ public interface ProjectListService {
|
||||||
|
|
||||||
public ArrayList<HashMap<String, Object>> getProjectCodeAndProjectNameByProjectName(HashMap<String, Object> params);
|
public ArrayList<HashMap<String, Object>> getProjectCodeAndProjectNameByProjectName(HashMap<String, Object> params);
|
||||||
public ArrayList<HashMap<String, Object>> getProjectCodeAndProjectNameByProjectNameFromTempMetaInfo(HashMap<String, Object> params);
|
public ArrayList<HashMap<String, Object>> getProjectCodeAndProjectNameByProjectNameFromTempMetaInfo(HashMap<String, Object> params);
|
||||||
|
public ArrayList<HashMap<String, Object>> getConstNameByProjectNameFromTempConstructSiteInfo(HashMap<String, Object> params);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -220,6 +220,12 @@ public class ProjectListServiceImpl implements ProjectListService {
|
||||||
return projectListMapper.getProjectCodeAndProjectNameByProjectNameFromTempMetaInfo(params);
|
return projectListMapper.getProjectCodeAndProjectNameByProjectNameFromTempMetaInfo(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrayList<HashMap<String, Object>> getConstNameByProjectNameFromTempConstructSiteInfo(HashMap<String, Object> params) {
|
||||||
|
return projectListMapper.getConstNameByProjectNameFromTempConstructSiteInfo(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="sPGetMasterCompanyDistrict" parameterType="map" statementType="CALLABLE" >
|
<select id="spGetMasterCompanyDistrict" parameterType="map" statementType="CALLABLE" >
|
||||||
{ CALL SP_GET_MASTER_COMPANY_DISTRICT(
|
{ CALL SP_GET_MASTER_COMPANY_DISTRICT(
|
||||||
#{projectMasterCompanyName},
|
#{projectMasterCompanyName},
|
||||||
#{v_gl, mode=OUT, jdbcType=VARCHAR},
|
#{v_gl, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
|
@ -62,4 +62,23 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getDepartments" parameterType="map" resultType="egovMap">
|
||||||
|
SELECT
|
||||||
|
(SELECT tgd.GL_DISTRICT
|
||||||
|
FROM TBL_GL_DISTRICT tgd
|
||||||
|
WHERE tgd.USE_YN = 'Y' AND tgd.GL_CODE = #{glCode}) AS GL_DISTRICT,
|
||||||
|
(SELECT tgd2.GM_DISTRICT
|
||||||
|
FROM TBL_GM_DISTRICT tgd2
|
||||||
|
WHERE tgd2.USE_YN = 'Y' AND tgd2.GL_CODE = #{glCode} AND tgd2.GM_CODE = #{gmCode}) AS GM_DISTRICT,
|
||||||
|
(SELECT tgd3.GS_DISTRICT
|
||||||
|
FROM TBL_GS_DISTRICT tgd3
|
||||||
|
WHERE tgd3.USE_YN = 'Y' AND tgd3.GL_CODE = #{glCode} AND tgd3.GM_CODE = #{gmCode} AND tgd3.GS_CODE = #{gsCode}) AS GS_DISTRICT,
|
||||||
|
(SELECT tgd4.GF_DISTRICT
|
||||||
|
FROM TBL_GF_DISTRICT tgd4
|
||||||
|
WHERE tgd4.USE_YN = 'Y' AND tgd4.GL_CODE = #{glCode} AND tgd4.GM_CODE = #{gmCode} AND tgd4.GS_CODE = #{gsCode} AND tgd4.GF_CODE = #{gfCode}) AS GF_DISTRICT
|
||||||
|
FROM DUAL
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -6,12 +6,23 @@
|
||||||
|
|
||||||
<select id="sPCntTblCsiByKeyword" parameterType="map" resultType="long">
|
<select id="sPCntTblCsiByKeyword" parameterType="map" resultType="long">
|
||||||
SELECT SP_CNT_TBL_CSI_BY_KEYWORD(
|
SELECT SP_CNT_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},
|
||||||
#{constCompanyDept, jdbcType=VARCHAR},#{constCompanyAdmin, jdbcType=VARCHAR},#{constCompanyTel, jdbcType=VARCHAR},NULL) FROM DUAL
|
#{constStartDate, jdbcType=VARCHAR},
|
||||||
|
#{constEndDate, jdbcType=VARCHAR},
|
||||||
|
#{constStateCode, jdbcType=VARCHAR},
|
||||||
|
#{masterCompanyOCode, jdbcType=VARCHAR},
|
||||||
|
#{masterCompanyTwCode, jdbcType=VARCHAR},
|
||||||
|
#{masterCompanyThCode, jdbcType=VARCHAR},
|
||||||
|
#{masterCompanyName, jdbcType=VARCHAR},
|
||||||
|
#{constCompanyDept, jdbcType=VARCHAR},
|
||||||
|
#{constCompanyAdmin, jdbcType=VARCHAR},
|
||||||
|
#{constCompanyTel, jdbcType=VARCHAR},
|
||||||
|
NULL
|
||||||
|
) FROM DUAL
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<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},#{constName, jdbcType=VARCHAR},#{constStartDate, jdbcType=VARCHAR},#{constEndDate, jdbcType=VARCHAR},#{constStateCode, jdbcType=VARCHAR},
|
||||||
#{masterCompanyOCode, jdbcType=VARCHAR},#{masterCompanyTwCode, jdbcType=VARCHAR},#{masterCompanyThCode, jdbcType=VARCHAR}, #{masterCompanyName, jdbcType=VARCHAR},
|
#{masterCompanyOCode, jdbcType=VARCHAR},#{masterCompanyTwCode, jdbcType=VARCHAR},#{masterCompanyThCode, jdbcType=VARCHAR}, #{masterCompanyName, jdbcType=VARCHAR},
|
||||||
|
|
@ -19,10 +30,21 @@
|
||||||
2,2,#{nCount},#{nPage}))
|
2,2,#{nCount},#{nPage}))
|
||||||
</select>
|
</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>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="spGetProjectMbr" parameterType="map" statementType="CALLABLE" >
|
||||||
|
{ CALL SP_GET_PROJECT_MBR(
|
||||||
|
#{type},
|
||||||
|
#{ProjectCode},
|
||||||
|
#{v_min_x, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{v_min_y, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{v_max_x, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{v_max_y, mode=OUT, jdbcType=VARCHAR}
|
||||||
|
) }
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -571,7 +571,17 @@
|
||||||
FROM
|
FROM
|
||||||
WEB_MEMBER_IN wmi
|
WEB_MEMBER_IN wmi
|
||||||
LEFT JOIN TBL_MASTER_COMPANY tmc ON
|
LEFT JOIN TBL_MASTER_COMPANY tmc ON
|
||||||
wmi.PROJECT_MASTER_COMPANY_CODE = tmc.COM_CODE
|
TRIM(wmi.PROJECT_MASTER_COMPANY_CODE) = tmc.COM_CODE
|
||||||
|
WHERE
|
||||||
|
wmi.USERID=#{userid}
|
||||||
|
]]>
|
||||||
|
</select>
|
||||||
|
<select id="findProjectMasterCompanyCodeByUserid" parameterType="String" resultType="String">
|
||||||
|
<![CDATA[
|
||||||
|
SELECT
|
||||||
|
TRIM(wmi.PROJECT_MASTER_COMPANY_CODE) AS PROJECT_MASTER_COMPANY_CODE
|
||||||
|
FROM
|
||||||
|
WEB_MEMBER_IN wmi
|
||||||
WHERE
|
WHERE
|
||||||
wmi.USERID=#{userid}
|
wmi.USERID=#{userid}
|
||||||
]]>
|
]]>
|
||||||
|
|
|
||||||
|
|
@ -1345,4 +1345,20 @@ INSERT INTO TEMP_META_INFO (
|
||||||
REPLACE(tmi.PROJECT_NAME, ' ', '') = REPLACE(#{PROJECT_NAME}, ' ', '')
|
REPLACE(tmi.PROJECT_NAME, ' ', '') = REPLACE(#{PROJECT_NAME}, ' ', '')
|
||||||
]]>
|
]]>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getConstNameByProjectNameFromTempConstructSiteInfo" parameterType="map" resultType="java.util.HashMap">
|
||||||
|
<![CDATA[
|
||||||
|
SELECT
|
||||||
|
tcsi.CONST_NAME
|
||||||
|
FROM
|
||||||
|
TEMP_CONSTRUCT_SITE_INFO tcsi
|
||||||
|
WHERE
|
||||||
|
REPLACE(tcsi.CONST_NAME, ' ', '') = REPLACE(#{PROJECT_NAME}, ' ', '')
|
||||||
|
]]>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -34,12 +34,157 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
<c:import url="/drilling/common/includeTopMenu.do" charEncoding="UTF-8" />
|
<c:import url="/drilling/common/includeTopMenu.do" charEncoding="UTF-8" />
|
||||||
<!-- header end-->
|
<!-- header end-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 페이지 컨테이너 시작 -->
|
||||||
|
<section class="page-container">
|
||||||
|
<div class="page-content-wrapper drilling input">
|
||||||
|
<!-- 서브메뉴 시작 -->
|
||||||
|
<div class="page-sidebar-wrapper">
|
||||||
|
<div class="page-sidebar inside-treeview">
|
||||||
|
<div class="treeview-project-name">
|
||||||
|
<p class="project-title">건설현장 관리</p>
|
||||||
|
<p class="project-value"><a href="/drilling/inquiry-project.do">프로젝트 조회</a></p>
|
||||||
|
<p class="project-value"><a href="/drilling/inquiry.do">건설현장 조회</a></p>
|
||||||
|
<p class="project-value value-is-active">건설현장 입력</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 서브메뉴 끝 -->
|
||||||
|
|
||||||
|
<!-- 콘텐츠 시작 -->
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="page-content-inner">
|
||||||
|
<!-- 카테고리 시작 -->
|
||||||
|
<div class="category-wrapper">
|
||||||
|
<ul class="page-category">
|
||||||
|
<li class="category-item"></li>
|
||||||
|
<li class="category-item">건설현장 입력</li>
|
||||||
|
</ul>
|
||||||
|
<a href="#" class="btn btn-help">도움말</a>
|
||||||
|
</div>
|
||||||
|
<!-- 카테고리 끝 -->
|
||||||
|
<h1 class="page-title-1depth">건설현장 입력</h1>
|
||||||
|
<!-- 내용 시작 -->
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<div class="content1">
|
||||||
|
<div class="page-top-check">
|
||||||
|
<p class="check-title"><span class="last-team-name" id="last-team-name"></span></p>
|
||||||
|
<ul class="check-category">
|
||||||
|
<li id="gl-district"></li>
|
||||||
|
<li id="gm-district"></li>
|
||||||
|
<li id="gs-district"></li>
|
||||||
|
<li id="gf-district"></li>
|
||||||
|
</ul>
|
||||||
|
<p class="check-title">기관명이 없을 시, 연락 바랍니다. 연락처: <span class="contact-tel">031-995-0934</span></p>
|
||||||
|
</div>
|
||||||
|
<button class="btn-green" type="button">엑셀자료입력</button>
|
||||||
|
</div>
|
||||||
|
<div id="table-container">
|
||||||
|
</div>
|
||||||
|
<div class="">
|
||||||
|
<button class="btn btn-plus" id="add-table" type="button"></button>
|
||||||
|
<button class="btn btn-minus" id="minus-table" type="button"></button>
|
||||||
|
<button class="btn-green btn-save" id="btn-save" type="button">
|
||||||
|
<span>저장</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 내용 끝 -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 콘텐츠 끝 -->
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<!-- 페이지 컨테이너 끝 -->
|
||||||
|
|
||||||
|
<div id="calenderDiv" class="trViewOff" style="position:absolute;"></div>
|
||||||
|
|
||||||
<!-- javascript start-->
|
<!-- javascript start-->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var tableId = 0;
|
var tableId = 0;
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
document.getElementById('add-table').addEventListener('click', function() {
|
let xhr;
|
||||||
|
if(window.XMLHttpRequest) {
|
||||||
|
xhr = new XMLHttpRequest();
|
||||||
|
} else {
|
||||||
|
// IE5, IE6 일때
|
||||||
|
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function departments() {
|
||||||
|
xhr.open('GET', '/drilling/input/departments.do', true);
|
||||||
|
xhr.setRequestHeader('Content-type', 'application/json');
|
||||||
|
|
||||||
|
xhr.onreadystatechange = function() {
|
||||||
|
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||||
|
// 요청 성공 시 처리
|
||||||
|
const obj = JSON.parse(xhr.responseText);
|
||||||
|
console.log('%o', obj);
|
||||||
|
|
||||||
|
var lastTeamName = "";
|
||||||
|
|
||||||
|
if( obj.data.glDistrict != null ) {
|
||||||
|
document.getElementById('gl-district').innerText = obj.data.glDistrict;
|
||||||
|
lastTeamName = obj.data.glDistrict;
|
||||||
|
} else {
|
||||||
|
document.getElementById('gl-district').style.display = "none";
|
||||||
|
}
|
||||||
|
if( obj.data.gmDistrict != null ) {
|
||||||
|
document.getElementById('gm-district').innerText = obj.data.gmDistrict;
|
||||||
|
lastTeamName = obj.data.gmDistrict;
|
||||||
|
} else {
|
||||||
|
document.getElementById('gm-district').style.display = "none";
|
||||||
|
}
|
||||||
|
if( obj.data.gsDistrict != null ) {
|
||||||
|
document.getElementById('gs-district').innerText = obj.data.gsDistrict;
|
||||||
|
lastTeamName = obj.data.gsDistrict;
|
||||||
|
} else {
|
||||||
|
document.getElementById('gs-district').style.display = "none";
|
||||||
|
}
|
||||||
|
if( obj.data.gfDistrict != null ) {
|
||||||
|
document.getElementById('gf-district').innerText = obj.data.gfDistrict;
|
||||||
|
lastTeamName = obj.data.gfDistrict;
|
||||||
|
} else {
|
||||||
|
document.getElementById('gf-district').style.display = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 가장 마지막 이름을 알아내야 함.
|
||||||
|
document.getElementById('last-team-name').innerText = lastTeamName;
|
||||||
|
|
||||||
|
|
||||||
|
} else if (xhr.readyState === 4) {
|
||||||
|
// 요청 실패 시 처리
|
||||||
|
console.error('요청 실패:', xhr.status);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
xhr.send();
|
||||||
|
}
|
||||||
|
|
||||||
|
departments();
|
||||||
|
|
||||||
|
function getToday() {
|
||||||
|
const today = new Date();
|
||||||
|
const year = today.getFullYear();
|
||||||
|
let month = today.getMonth() + 1;
|
||||||
|
let day = today.getDate();
|
||||||
|
|
||||||
|
// 월과 일이 한 자리 숫자인 경우 앞에 0을 붙여줍니다.
|
||||||
|
month = month < 10 ? '0' + month : month;
|
||||||
|
day = day < 10 ? '0' + day : day;
|
||||||
|
|
||||||
|
return year + '-' + month + '-' + day;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 건설현장 입력 항목을 추가한다 */
|
||||||
|
|
||||||
|
function addItem() {
|
||||||
|
|
||||||
tableId += 1;
|
tableId += 1;
|
||||||
var newTable = `
|
var newTable = `
|
||||||
<div class="table-scrollable" data-index="` + tableId + `" data-` + tableId + `>
|
<div class="table-scrollable" data-index="` + tableId + `" data-` + tableId + `>
|
||||||
|
|
@ -54,15 +199,15 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
<tr>
|
<tr>
|
||||||
<th>사업명</th>
|
<th>사업명</th>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="text" value="사업명 20240820 1154 " class="input-box" id="const-name-` + tableId + `" placeholder="사업명">
|
<input type="text" value="" onfocusout="duplicateCheckProjectName(this)" class="input-box" id="const-name-` + tableId + `" placeholder="사업명">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>사업기간</th>
|
<th>사업기간</th>
|
||||||
<td>
|
<td>
|
||||||
<input type="date" value="2024-08-16" class="date" id="const-start-date-` + tableId + `">
|
<input type="date" value="` + getToday() + `" class="date" id="const-start-date-` + tableId + `">
|
||||||
<span>~</span>
|
<span>~</span>
|
||||||
<input type="date" value="2024-08-16" class="date date-2" id="const-end-date-` + tableId + `">
|
<input type="date" value="` + getToday() + `" class="date date-2" id="const-end-date-` + tableId + `">
|
||||||
</td>
|
</td>
|
||||||
<th>사업단계</th>
|
<th>사업단계</th>
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -80,17 +225,17 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
<tr>
|
<tr>
|
||||||
<th>발주기관</th>
|
<th>발주기관</th>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="text" value="발주기관 부서명" class="input-box information1" id="master-company-dept-` + tableId + `" placeholder="담당부서">
|
<input type="text" value="토목과" class="input-box information1" id="master-company-dept-` + tableId + `" placeholder="담당부서">
|
||||||
<input type="text" value="발주기관 담당자" class="input-box information2" id="master-company-admin-` + tableId + `" placeholder="담당자">
|
<input type="text" value="홍길동" class="input-box information2" id="master-company-admin-` + tableId + `" placeholder="담당자">
|
||||||
<input type="text" value="발주기관 연락처" class="input-box information3" id="master-company-tel-` + tableId + `" placeholder="담당자 연락처">
|
<input type="text" value="02-1234-5678" class="input-box information3" id="master-company-tel-` + tableId + `" placeholder="담당자 연락처">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>건설사</th>
|
<th>건설사</th>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="text" value="건설사 부서명" class="input-box information1" id="const-company-dept-` + tableId + `" placeholder="담당부서">
|
<input type="text" value="" class="input-box information1" id="const-company-dept-` + tableId + `" placeholder="담당부서">
|
||||||
<input type="text" value="건설사 담당자" class="input-box information2" id="const-company-admin-` + tableId + `" placeholder="담당자">
|
<input type="text" value="" class="input-box information2" id="const-company-admin-` + tableId + `" placeholder="담당자">
|
||||||
<input type="text" value="건설사 연락처" class="input-box information3" id="const-company-tel-` + tableId + `" placeholder="담당자 연락처">
|
<input type="text" value="" class="input-box information3" id="const-company-tel-` + tableId + `" placeholder="담당자 연락처">
|
||||||
<label class="check-box unselected-constructor-label" for="unselected-constructor-` + tableId + `"><input type="checkbox" id="unselected-constructor-` + tableId + `">
|
<label class="check-box unselected-constructor-label" for="unselected-constructor-` + tableId + `"><input type="checkbox" id="unselected-constructor-` + tableId + `">
|
||||||
<span class="unselected-constructor-label-text">건설사 미선정</span>
|
<span class="unselected-constructor-label-text">건설사 미선정</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
@ -100,7 +245,13 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
document.getElementById('table-container').innerHTML += newTable;
|
document.getElementById('table-container').insertAdjacentHTML('beforeend', newTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
document.getElementById('add-table').addEventListener('click', function() {
|
||||||
|
addItem();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 초기 테이블 추가 트리거
|
// 초기 테이블 추가 트리거
|
||||||
|
|
@ -177,17 +328,14 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
if (constCompanyTelEle) {
|
if (constCompanyTelEle) {
|
||||||
jsonItem.constCompanyTel = constCompanyTelEle.value;
|
jsonItem.constCompanyTel = constCompanyTelEle.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( isValid(i + 1) == false ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
jsonData.push(jsonItem);
|
jsonData.push(jsonItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let xhr;
|
|
||||||
if(window.XMLHttpRequest) {
|
|
||||||
xhr = new XMLHttpRequest();
|
|
||||||
} else {
|
|
||||||
// IE5, IE6 일때
|
|
||||||
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
|
||||||
}
|
|
||||||
|
|
||||||
xhr.open('POST', '/drilling/input/add.do', true);
|
xhr.open('POST', '/drilling/input/add.do', true);
|
||||||
xhr.setRequestHeader('Content-type', 'application/json');
|
xhr.setRequestHeader('Content-type', 'application/json');
|
||||||
|
|
@ -197,7 +345,8 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
// 요청 성공 시 처리
|
// 요청 성공 시 처리
|
||||||
console.log(xhr.responseText);
|
console.log(xhr.responseText);
|
||||||
const obj = JSON.parse(xhr.responseText);
|
const obj = JSON.parse(xhr.responseText);
|
||||||
alert(obj.message)
|
alert(obj.message);
|
||||||
|
window.location.href='/drilling/inquiry.do';
|
||||||
} else if (xhr.readyState === 4) {
|
} else if (xhr.readyState === 4) {
|
||||||
// 요청 실패 시 처리
|
// 요청 실패 시 처리
|
||||||
console.error('요청 실패:', xhr.status);
|
console.error('요청 실패:', xhr.status);
|
||||||
|
|
@ -209,72 +358,102 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function isValid(index) {
|
||||||
|
// 사업명
|
||||||
|
var constNameEle = document.getElementById('const-name-' + (index));
|
||||||
|
if (constNameEle) {
|
||||||
|
//duplicateCheckProjectName(constNameEle);
|
||||||
|
if( constNameEle.value === "" ) {
|
||||||
|
shakeAndHighlight(constNameEle, "사업명을 입력하세요." );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 사업기간 - 시작
|
||||||
|
var constStartDateEle = document.getElementById('const-start-date-' + (index));
|
||||||
|
if (constStartDateEle) {
|
||||||
|
if( constStartDateEle.value === "" ) {
|
||||||
|
shakeAndHighlight(constStartDateEle, "사업기간 - 시작을 입력하세요." );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 사업기간 - 종료
|
||||||
|
var constEndDateEle = document.getElementById('const-end-date-' + (index));
|
||||||
|
if (constEndDateEle) {
|
||||||
|
if( constEndDateEle.value === "" ) {
|
||||||
|
shakeAndHighlight(constEndDateEle, "사업기간 - 종료를 입력하세요." );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 사업단계
|
||||||
|
var constStateCodeEle = document.getElementById('const-state-code-' + (index));
|
||||||
|
if (constStateCodeEle) {
|
||||||
|
if( constStateCodeEle.value === "" ) {
|
||||||
|
shakeAndHighlight(constStateCodeEle, "사업단계를 입력하세요." );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 발주기관 - 담당부서
|
||||||
|
var masterCompanyDeptEle = document.getElementById('master-company-dept-' + (index));
|
||||||
|
if (masterCompanyDeptEle) {
|
||||||
|
if( masterCompanyDeptEle.value === "" ) {
|
||||||
|
shakeAndHighlight(masterCompanyDeptEle, "발주기관 - 담당부서를 입력하세요." );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 발주기관 - 담당자
|
||||||
|
var masterCompanyAdminEle = document.getElementById('master-company-admin-' + (index));
|
||||||
|
if (masterCompanyAdminEle) {
|
||||||
|
if( masterCompanyDeptEle.value === "" ) {
|
||||||
|
shakeAndHighlight(masterCompanyDeptEle, "발주기관 - 담당자를 입력하세요." );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 발주기관 - 담당자 연락처
|
||||||
|
var masterCompanyTelEle = document.getElementById('master-company-tel-' + (index));
|
||||||
|
if (masterCompanyTelEle) {
|
||||||
|
if( masterCompanyDeptEle.value === "" ) {
|
||||||
|
shakeAndHighlight(masterCompanyDeptEle, "발주기관 - 담당자 연락처를 입력하세요." );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var unselectedConstructorEle = document.getElementById('unselected-constructor-' + (index));
|
||||||
|
|
||||||
|
// 건설사 미선정이 체크 되지 않은 경우만 건설사 입력 값을 확인한다.
|
||||||
|
if( unselectedConstructorEle.checked === false ) {
|
||||||
|
|
||||||
|
// 건설사 - 담당부서
|
||||||
|
var constCompanyDeptEle = document.getElementById('const-company-dept-' + (index));
|
||||||
|
if (constCompanyDeptEle) {
|
||||||
|
if( constCompanyDeptEle.value === "" ) {
|
||||||
|
shakeAndHighlight(constCompanyDeptEle, "건설사 - 담당부서를 입력하세요." );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 건설사 - 담당자
|
||||||
|
var constCompanyAdminEle = document.getElementById('const-company-admin-' + (index));
|
||||||
|
if (constCompanyAdminEle) {
|
||||||
|
if( constCompanyAdminEle.value === "" ) {
|
||||||
|
shakeAndHighlight(constCompanyAdminEle, "건설사 - 담당자를 입력하세요." );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 건설사 - 담당자 연락처
|
||||||
|
var constCompanyTelEle = document.getElementById('const-company-tel-' + (index));
|
||||||
|
if (constCompanyTelEle) {
|
||||||
|
if( constCompanyTelEle.value === "" ) {
|
||||||
|
shakeAndHighlight(constCompanyTelEle, "건설사 - 담당자 연락처를 입력하세요." );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<!-- javascript end-->
|
<!-- javascript end-->
|
||||||
|
|
||||||
|
|
||||||
<!-- 페이지 컨테이너 시작 -->
|
|
||||||
<section class="page-container">
|
|
||||||
<div class="page-content-wrapper drilling input">
|
|
||||||
<!-- 서브메뉴 시작 -->
|
|
||||||
<div class="page-sidebar-wrapper">
|
|
||||||
<div class="page-sidebar inside-treeview">
|
|
||||||
<div class="treeview-project-name">
|
|
||||||
<p class="project-title">건설현장 관리</p>
|
|
||||||
<p class="project-value"><a href="/drilling/inquiry-project.do">프로젝트 조회</a></p>
|
|
||||||
<p class="project-value"><a href="/drilling/inquiry.do">건설현장 조회</a></p>
|
|
||||||
<p class="project-value value-is-active">건설현장 입력</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 서브메뉴 끝 -->
|
|
||||||
|
|
||||||
<!-- 콘텐츠 시작 -->
|
|
||||||
<div class="page-content">
|
|
||||||
<div class="page-content-inner">
|
|
||||||
<!-- 카테고리 시작 -->
|
|
||||||
<div class="category-wrapper">
|
|
||||||
<ul class="page-category">
|
|
||||||
<li class="category-item"></li>
|
|
||||||
<li class="category-item">건설현장 입력</li>
|
|
||||||
</ul>
|
|
||||||
<a href="#" class="btn btn-help">도움말</a>
|
|
||||||
</div>
|
|
||||||
<!-- 카테고리 끝 -->
|
|
||||||
<h1 class="page-title-1depth">건설현장 입력</h1>
|
|
||||||
<!-- 내용 시작 -->
|
|
||||||
<div class="content-wrapper">
|
|
||||||
<div class="content1">
|
|
||||||
<div class="page-top-check">
|
|
||||||
<p class="check-title"><span class="last-team-name">부산지방항공청</span></p>
|
|
||||||
<ul class="check-category">
|
|
||||||
<li>국토교통부</li>
|
|
||||||
<li>소속기관</li>
|
|
||||||
<li>지방항공청</li>
|
|
||||||
<li>부산지방항공청</li>
|
|
||||||
</ul>
|
|
||||||
<p class="check-title">기관명이 없을 시, 연락 바랍니다. 연락처: <span class="contact-tel">031-995-0934</span></p>
|
|
||||||
</div>
|
|
||||||
<button class="btn-green" type="button">엑셀자료입력</button>
|
|
||||||
</div>
|
|
||||||
<div id="table-container">
|
|
||||||
</div>
|
|
||||||
<div class="">
|
|
||||||
<button class="btn btn-plus" id="add-table" type="button"></button>
|
|
||||||
<button class="btn btn-minus" id="minus-table" type="button"></button>
|
|
||||||
<button class="btn-green btn-save" id="btn-save" type="button">
|
|
||||||
<span>저장</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 내용 끝 -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 콘텐츠 끝 -->
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<!-- 페이지 컨테이너 끝 -->
|
|
||||||
|
|
||||||
<div id="calenderDiv" class="trViewOff" style="position:absolute;"></div>
|
|
||||||
|
|
||||||
<%@ include file="/include/inc_footer_2021_new.jsp" %>
|
<%@ include file="/include/inc_footer_2021_new.jsp" %>
|
||||||
|
|
@ -50,11 +50,7 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
return str.replace(/^\s+|\s+$/g, '');
|
return str.replace(/^\s+|\s+$/g, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
function onClickBtnSearch() {
|
||||||
|
|
||||||
document.getElementById('btn-search').addEventListener('click', function() {
|
|
||||||
|
|
||||||
|
|
||||||
const pagingEle = document.getElementById('paging');
|
const pagingEle = document.getElementById('paging');
|
||||||
const activeLinks = pagingEle.querySelectorAll('li.is-active a');
|
const activeLinks = pagingEle.querySelectorAll('li.is-active a');
|
||||||
|
|
||||||
|
|
@ -174,8 +170,25 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
};
|
};
|
||||||
|
|
||||||
xhr.send();
|
xhr.send();
|
||||||
|
}
|
||||||
|
|
||||||
|
function onClickBtnViewOnMap() {
|
||||||
|
alert('위치가 지정된 시추공이 존재하지 않습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
|
||||||
|
document.getElementById('btn-search').addEventListener('click', function() {
|
||||||
|
onClickBtnSearch();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.getElementById('btn-view-on-map').addEventListener('click', function() {
|
||||||
|
onClickBtnViewOnMap();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 초기 테이블 추가 트리거
|
// 초기 테이블 추가 트리거
|
||||||
document.getElementById('btn-search').click();
|
document.getElementById('btn-search').click();
|
||||||
|
|
||||||
|
|
@ -263,6 +276,9 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
<button type="button" id="btn-search" class="btn btn-search">
|
<button type="button" id="btn-search" class="btn btn-search">
|
||||||
<span>조회하기</span>
|
<span>조회하기</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button type="button" id="btn-view-on-map" class="btn btn-view-on-map">
|
||||||
|
<span>지도보기</span>
|
||||||
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-info-group">Total: <span id="count">-</span>건</div>
|
<div class="table-info-group">Total: <span id="count">-</span>건</div>
|
||||||
|
|
|
||||||
|
|
@ -50,11 +50,56 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
return str.replace(/^\s+|\s+$/g, '');
|
return str.replace(/^\s+|\s+$/g, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
function departments() {
|
||||||
|
|
||||||
document.getElementById('btn-search').addEventListener('click', function() {
|
if(typeof XMLHttpRequest != 'undefined'){
|
||||||
|
xhr = new XMLHttpRequest();
|
||||||
|
}
|
||||||
|
xhr.open('GET', '/drilling/input/departments.do', true);
|
||||||
|
xhr.setRequestHeader('Content-type', 'application/json');
|
||||||
|
|
||||||
|
xhr.onreadystatechange = function() {
|
||||||
|
|
||||||
|
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||||
|
// 요청 성공 시 처리
|
||||||
|
const obj = JSON.parse(xhr.responseText);
|
||||||
|
console.log('%o', obj);
|
||||||
|
|
||||||
|
var lastTeamName = "";
|
||||||
|
|
||||||
|
if( obj.data.glDistrict != null ) {
|
||||||
|
document.getElementById('gl-district').value = obj.data.glDistrict;
|
||||||
|
lastTeamName = obj.data.glDistrict;
|
||||||
|
}
|
||||||
|
if( obj.data.gmDistrict != null ) {
|
||||||
|
document.getElementById('gm-district').value = obj.data.gmDistrict;
|
||||||
|
lastTeamName = obj.data.gmDistrict;
|
||||||
|
}
|
||||||
|
if( obj.data.gsDistrict != null ) {
|
||||||
|
document.getElementById('gs-district').value = obj.data.gsDistrict;
|
||||||
|
lastTeamName = obj.data.gsDistrict;
|
||||||
|
}
|
||||||
|
if( obj.data.gfDistrict != null ) {
|
||||||
|
document.getElementById('gf-district').value = obj.data.gfDistrict;
|
||||||
|
lastTeamName = obj.data.gfDistrict;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 가장 마지막 이름을 알아내야 함.
|
||||||
|
document.getElementById('last-team-name').value = lastTeamName;
|
||||||
|
|
||||||
|
|
||||||
|
} else if (xhr.readyState === 4) {
|
||||||
|
// 요청 실패 시 처리
|
||||||
|
console.error('요청 실패:', xhr.status);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
xhr.send();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function onClickBtnSearch() {
|
||||||
const pagingEle = document.getElementById('paging');
|
const pagingEle = document.getElementById('paging');
|
||||||
const activeLinks = pagingEle.querySelectorAll('li.is-active a');
|
const activeLinks = pagingEle.querySelectorAll('li.is-active a');
|
||||||
|
|
||||||
|
|
@ -169,14 +214,66 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
departments();
|
||||||
} else if (xhr.readyState === 4) {
|
} else if (xhr.readyState === 4) {
|
||||||
// 요청 실패 시 처리
|
// 요청 실패 시 처리
|
||||||
console.error('요청 실패:', xhr.status);
|
console.error('요청 실패:', xhr.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
xhr.send();
|
xhr.send();
|
||||||
|
}
|
||||||
|
|
||||||
|
function onClickBtnViewOnMap() {
|
||||||
|
const projectMasterCompanyName = '${mbr.projectMasterCompanyName}';
|
||||||
|
let projectCode = '${mbr.ProjectCode}';
|
||||||
|
|
||||||
|
let minX = Number('${mbr.v_min_x}');
|
||||||
|
let minY = Number('${mbr.v_min_y}');
|
||||||
|
let maxX = Number('${mbr.v_max_x}');
|
||||||
|
let maxY = Number('${mbr.v_max_y}');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const gl = document.getElementById('gl-district').value;
|
||||||
|
const gm = document.getElementById('gm-district').value;
|
||||||
|
const gs = document.getElementById('gs-district').value;
|
||||||
|
const gf = document.getElementById('gf-district').value;
|
||||||
|
const lastTeamName = document.getElementById('last-team-name').value;
|
||||||
|
|
||||||
|
openMap('${sessionScope.USERID}','${cls}', gl, gm, gs, gf, lastTeamName, projectMasterCompanyName, maxX-minX, maxY-minY);
|
||||||
|
}
|
||||||
|
|
||||||
|
function openMap(userid,cls, gl = null, gm = null, gs = null, gf = null, lastTeamName = null, projectMasterCompanyName = null, positionX= null, positionY= null)
|
||||||
|
{
|
||||||
|
win = 'map';
|
||||||
|
sizeX=window.screen.width;
|
||||||
|
sizeY=window.screen.height;
|
||||||
|
|
||||||
|
let userArea = projectMasterCompanyName;
|
||||||
|
if( userArea == null ) {
|
||||||
|
if( userid === 't3-1' ) {
|
||||||
|
userArea = "충청남도";
|
||||||
|
} else if( userid === 't3-2' ) {
|
||||||
|
userArea = "부산광역시";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var mapWin = window.open("/map/mapMain.do?userArea=" + encodeURIComponent(userArea) + "&gl=" + gl + "&gm=" + gm + "&gs=" + gs + "&gf=" + gf + "&lastTeamName=" + lastTeamName + "&positionX=" + positionX + "&positionY=" + positionY + "#tab_1_1","mapWin","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + sizeX + ",height=" + sizeY + ",left=0,top=0");
|
||||||
|
mapWin.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
|
||||||
|
document.getElementById('btn-search').addEventListener('click', function() {
|
||||||
|
onClickBtnSearch();
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById('btn-view-on-map').addEventListener('click', function() {
|
||||||
|
onClickBtnViewOnMap();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 초기 테이블 추가 트리거
|
// 초기 테이블 추가 트리거
|
||||||
|
|
@ -266,6 +363,9 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
<button type="button" id="btn-search" class="btn btn-search">
|
<button type="button" id="btn-search" class="btn btn-search">
|
||||||
<span>조회하기</span>
|
<span>조회하기</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button type="button" id="btn-view-on-map" class="btn btn-view-on-map">
|
||||||
|
<span>지도보기</span>
|
||||||
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-info-group">Total: <span id="count">-</span>건</div>
|
<div class="table-info-group">Total: <span id="count">-</span>건</div>
|
||||||
|
|
@ -313,6 +413,13 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<input type="hidden" id="gl-district" name="gl-district" value="" />
|
||||||
|
<input type="hidden" id="gm-district" name="gm-district" value="" />
|
||||||
|
<input type="hidden" id="gs-district" name="gs-district" value="" />
|
||||||
|
<input type="hidden" id="gf-district" name="gf-district" value="" />
|
||||||
|
<input type="hidden" id="last-team-name" name="last-team-name" value="" />
|
||||||
<!-- 내용 끝 -->
|
<!-- 내용 끝 -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -9,77 +9,9 @@
|
||||||
|
|
||||||
<script type="text/javaScript" src="/web/js/shortcut.js"></script>
|
<script type="text/javaScript" src="/web/js/shortcut.js"></script>
|
||||||
|
|
||||||
<style>
|
|
||||||
@keyframes shake {
|
|
||||||
0% { transform: translateX(0); }
|
|
||||||
10% { transform: translateX(-5px); }
|
|
||||||
20% { transform: translateX(5px); }
|
|
||||||
30% { transform: translateX(-5px); }
|
|
||||||
40% { transform: translateX(5px); }
|
|
||||||
50% { transform: translateX(-5px); }
|
|
||||||
60% { transform: translateX(5px); }
|
|
||||||
70% { transform: translateX(-5px); }
|
|
||||||
80% { transform: translateX(5px); }
|
|
||||||
90% { transform: translateX(-5px); }
|
|
||||||
100% { transform: translateX(0); }
|
|
||||||
}
|
|
||||||
|
|
||||||
.shake-animation {
|
|
||||||
animation: shake 0.6s;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The snackbar - position it at the bottom and in the middle of the screen */
|
|
||||||
#snackbar {
|
|
||||||
visibility: hidden; /* Hidden by default. Visible on click */
|
|
||||||
min-width: 250px; /* Set a default minimum width */
|
|
||||||
margin-left: -125px; /* Divide value of min-width by 2 */
|
|
||||||
background-color: #000000; /* Black background color */
|
|
||||||
color: #ff0000; /* White text color */
|
|
||||||
text-align: center; /* Centered text */
|
|
||||||
border-radius: 2px; /* Rounded borders */
|
|
||||||
padding: 16px; /* Padding */
|
|
||||||
position: fixed; /* Sit on top of the screen */
|
|
||||||
z-index: 1; /* Add a z-index if needed */
|
|
||||||
left: 50%; /* Center the snackbar */
|
|
||||||
bottom: 80px; /* 30px from the bottom */
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Show the snackbar when clicking on a button (class added with JavaScript) */
|
|
||||||
#snackbar.show {
|
|
||||||
visibility: visible; /* Show the snackbar */
|
|
||||||
/* Add animation: Take 0.5 seconds to fade in and out the snackbar.
|
|
||||||
However, delay the fade out process for 2.5 seconds /
|
|
||||||
-webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
|
||||||
animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Animations to fade the snackbar in and out */
|
|
||||||
@-webkit-keyframes fadein {
|
|
||||||
from {bottom: 0; opacity: 0;}
|
|
||||||
to {bottom: 80px; opacity: 1;}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes fadein {
|
|
||||||
from {bottom: 0; opacity: 0;}
|
|
||||||
to {bottom: 80px; opacity: 1;}
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes fadeout {
|
|
||||||
from {bottom: 80px; opacity: 1;}
|
|
||||||
to {bottom: 0; opacity: 0;}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes fadeout {
|
|
||||||
from {bottom: 80px; opacity: 1;}
|
|
||||||
to {bottom: 0; opacity: 0;}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script type="text/javaScript">
|
<script type="text/javaScript">
|
||||||
|
|
||||||
function shakeAndHighlight(targetEle, message) {
|
function shakeAndHighlight(targetEle, message) {
|
||||||
var originalStyle = targetEle.style.border; // 원래 스타일 저장
|
var originalStyle = targetEle.style.border; // 원래 스타일 저장
|
||||||
|
|
||||||
// 빨간색 테두리 설정
|
// 빨간색 테두리 설정
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,9 @@ function removeNonNumeric(str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 현재 URL로 부터 PROJECT_CODE를 가져온다.
|
||||||
|
*/
|
||||||
function getProjectCode() {
|
function getProjectCode() {
|
||||||
url = location.href;
|
url = location.href;
|
||||||
var regex = /PROJECT_CODE=([^&]+)/;
|
var regex = /PROJECT_CODE=([^&]+)/;
|
||||||
|
|
|
||||||
|
|
@ -3473,8 +3473,6 @@ ul.faq-q > li textarea {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.drilling .btn-search {
|
.drilling .btn-search {
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
}
|
}
|
||||||
.drilling .btn-search span {
|
.drilling .btn-search span {
|
||||||
|
|
@ -3491,6 +3489,31 @@ ul.faq-q > li textarea {
|
||||||
height: 24px;
|
height: 24px;
|
||||||
background: url(/com/img/common/icon/ico_btn_search.png) no-repeat 50% 50%;
|
background: url(/com/img/common/icon/ico_btn_search.png) no-repeat 50% 50%;
|
||||||
}
|
}
|
||||||
|
.drilling .btn-view-on-map {
|
||||||
|
width: 120px;
|
||||||
|
height: 34px;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #00c48a;
|
||||||
|
border: 1px solid #00c48a;
|
||||||
|
transition: all 0.3s linear;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
padding: 4px 14px 4px 40px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.drilling .btn-view-on-map:before {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
left: 8px;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
background: url(/com/img/common/icon/ico_btn_big_map.png) no-repeat 50% 50%;
|
||||||
|
}
|
||||||
.drilling input[type=search] {
|
.drilling input[type=search] {
|
||||||
width: 380px;
|
width: 380px;
|
||||||
}
|
}
|
||||||
|
|
@ -4177,6 +4200,117 @@ ul.faq-q > li textarea {
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ====================================== */
|
||||||
|
/* ====================================== */
|
||||||
|
/* ====================================== */
|
||||||
|
/* ====================================== */
|
||||||
|
@keyframes shake {
|
||||||
|
0% {
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
10% {
|
||||||
|
transform: translateX(-5px);
|
||||||
|
}
|
||||||
|
20% {
|
||||||
|
transform: translateX(5px);
|
||||||
|
}
|
||||||
|
30% {
|
||||||
|
transform: translateX(-5px);
|
||||||
|
}
|
||||||
|
40% {
|
||||||
|
transform: translateX(5px);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: translateX(-5px);
|
||||||
|
}
|
||||||
|
60% {
|
||||||
|
transform: translateX(5px);
|
||||||
|
}
|
||||||
|
70% {
|
||||||
|
transform: translateX(-5px);
|
||||||
|
}
|
||||||
|
80% {
|
||||||
|
transform: translateX(5px);
|
||||||
|
}
|
||||||
|
90% {
|
||||||
|
transform: translateX(-5px);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.shake-animation {
|
||||||
|
animation: shake 0.6s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The snackbar - position it at the bottom and in the middle of the screen */
|
||||||
|
#snackbar {
|
||||||
|
visibility: hidden; /* Hidden by default. Visible on click */
|
||||||
|
min-width: 250px; /* Set a default minimum width */
|
||||||
|
margin-left: -125px; /* Divide value of min-width by 2 */
|
||||||
|
background-color: #000000; /* Black background color */
|
||||||
|
color: #ff0000; /* White text color */
|
||||||
|
text-align: center; /* Centered text */
|
||||||
|
border-radius: 2px; /* Rounded borders */
|
||||||
|
padding: 16px; /* Padding */
|
||||||
|
position: fixed; /* Sit on top of the screen */
|
||||||
|
z-index: 1; /* Add a z-index if needed */
|
||||||
|
left: 50%; /* Center the snackbar */
|
||||||
|
bottom: 80px; /* 30px from the bottom */
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Show the snackbar when clicking on a button (class added with JavaScript) */
|
||||||
|
#snackbar.show {
|
||||||
|
visibility: visible; /* Show the snackbar */
|
||||||
|
/* Add animation: Take 0.5 seconds to fade in and out the snackbar.
|
||||||
|
However, delay the fade out process for 2.5 seconds /
|
||||||
|
-webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
||||||
|
animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Animations to fade the snackbar in and out */
|
||||||
|
@-webkit-keyframes fadein {
|
||||||
|
from {
|
||||||
|
bottom: 0;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
bottom: 80px;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes fadein {
|
||||||
|
from {
|
||||||
|
bottom: 0;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
bottom: 80px;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-webkit-keyframes fadeout {
|
||||||
|
from {
|
||||||
|
bottom: 80px;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
bottom: 0;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes fadeout {
|
||||||
|
from {
|
||||||
|
bottom: 80px;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
bottom: 0;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
/* ====================================== */
|
/* ====================================== */
|
||||||
/* ====================================== */
|
/* ====================================== */
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -3095,8 +3095,6 @@ ul.faq-q > li textarea {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.btn-search {
|
.btn-search {
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
}
|
}
|
||||||
.btn-search span {
|
.btn-search span {
|
||||||
|
|
@ -3113,6 +3111,34 @@ ul.faq-q > li textarea {
|
||||||
height: 24px;
|
height: 24px;
|
||||||
background: url(/com/img/common/icon/ico_btn_search.png) no-repeat 50% 50%;
|
background: url(/com/img/common/icon/ico_btn_search.png) no-repeat 50% 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-view-on-map {
|
||||||
|
width: 120px;
|
||||||
|
height: 34px;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #00c48a;
|
||||||
|
border:1px solid #00c48a;
|
||||||
|
transition: all 0.3s linear;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
padding: 4px 14px 4px 40px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.btn-view-on-map:before {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
left: 8px;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
background: url(/com/img/common/icon/ico_btn_big_map.png) no-repeat 50% 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
input[type="search"]{
|
input[type="search"]{
|
||||||
width: 380px;
|
width: 380px;
|
||||||
}
|
}
|
||||||
|
|
@ -3886,6 +3912,78 @@ ul.faq-q > li textarea {
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* ====================================== */
|
/* ====================================== */
|
||||||
// 방문교육 신청 끝
|
// 방문교육 신청 끝
|
||||||
/* ====================================== */
|
/* ====================================== */
|
||||||
|
|
||||||
|
/* ====================================== */
|
||||||
|
// shake 시작
|
||||||
|
/* ====================================== */
|
||||||
|
@keyframes shake {
|
||||||
|
0% { transform: translateX(0); }
|
||||||
|
10% { transform: translateX(-5px); }
|
||||||
|
20% { transform: translateX(5px); }
|
||||||
|
30% { transform: translateX(-5px); }
|
||||||
|
40% { transform: translateX(5px); }
|
||||||
|
50% { transform: translateX(-5px); }
|
||||||
|
60% { transform: translateX(5px); }
|
||||||
|
70% { transform: translateX(-5px); }
|
||||||
|
80% { transform: translateX(5px); }
|
||||||
|
90% { transform: translateX(-5px); }
|
||||||
|
100% { transform: translateX(0); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.shake-animation {
|
||||||
|
animation: shake 0.6s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The snackbar - position it at the bottom and in the middle of the screen */
|
||||||
|
#snackbar {
|
||||||
|
visibility: hidden; /* Hidden by default. Visible on click */
|
||||||
|
min-width: 250px; /* Set a default minimum width */
|
||||||
|
margin-left: -125px; /* Divide value of min-width by 2 */
|
||||||
|
background-color: #000000; /* Black background color */
|
||||||
|
color: #ff0000; /* White text color */
|
||||||
|
text-align: center; /* Centered text */
|
||||||
|
border-radius: 2px; /* Rounded borders */
|
||||||
|
padding: 16px; /* Padding */
|
||||||
|
position: fixed; /* Sit on top of the screen */
|
||||||
|
z-index: 1; /* Add a z-index if needed */
|
||||||
|
left: 50%; /* Center the snackbar */
|
||||||
|
bottom: 80px; /* 30px from the bottom */
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Show the snackbar when clicking on a button (class added with JavaScript) */
|
||||||
|
#snackbar.show {
|
||||||
|
visibility: visible; /* Show the snackbar */
|
||||||
|
/* Add animation: Take 0.5 seconds to fade in and out the snackbar.
|
||||||
|
However, delay the fade out process for 2.5 seconds /
|
||||||
|
-webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
||||||
|
animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Animations to fade the snackbar in and out */
|
||||||
|
@-webkit-keyframes fadein {
|
||||||
|
from {bottom: 0; opacity: 0;}
|
||||||
|
to {bottom: 80px; opacity: 1;}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadein {
|
||||||
|
from {bottom: 0; opacity: 0;}
|
||||||
|
to {bottom: 80px; opacity: 1;}
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes fadeout {
|
||||||
|
from {bottom: 80px; opacity: 1;}
|
||||||
|
to {bottom: 0; opacity: 0;}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeout {
|
||||||
|
from {bottom: 80px; opacity: 1;}
|
||||||
|
to {bottom: 0; opacity: 0;}
|
||||||
|
}
|
||||||
|
/* ====================================== */
|
||||||
|
// shake 끝
|
||||||
|
/* ====================================== */
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,21 @@
|
||||||
* 지역검색, 사업검색, 좌표검색
|
* 지역검색, 사업검색, 좌표검색
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//public function to get a paremeter by name from URL
|
||||||
|
function getURLParameter(paramName) {
|
||||||
|
var searchString = decodeURI(window.location.search).substring(1),
|
||||||
|
i, val, params = searchString.split("&");
|
||||||
|
|
||||||
|
for (i = 0; i < params.length; i++) {
|
||||||
|
val = params[i].split("=");
|
||||||
|
if (val[0] == paramName) {
|
||||||
|
return decodeURIComponent(unescape(val[1]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function getGuList() {
|
function getGuList() {
|
||||||
var sub_cd = $("#cmb_sido").val().substring(0, 4);
|
var sub_cd = $("#cmb_sido").val().substring(0, 4);
|
||||||
|
|
||||||
|
|
@ -20,22 +35,40 @@ function getDongList() {
|
||||||
$("#cmb_dong").load("/map/getDong.do", params);
|
$("#cmb_dong").load("/map/getDong.do", params);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getGuList2() {
|
function getGuList2(callback = null, callbackParams = null) {
|
||||||
var sub_cd = $("#cmb_sido_all").val().substring(0, 4);
|
var sub_cd = $("#cmb_sido_all").val().substring(0, 4);
|
||||||
|
|
||||||
var params = new Object();
|
var params = new Object();
|
||||||
params.do_cd = sub_cd;
|
params.do_cd = sub_cd;
|
||||||
|
|
||||||
$("#cmb_gungu_all").load("/map/getGugun.do", params);
|
$("#cmb_gungu_all").load("/map/getGugun.do", params, function(response, status, xhr) {
|
||||||
|
if (status == "error") {
|
||||||
|
// 오류 처리
|
||||||
|
console.error("에러: " + xhr.status + ": " + xhr.statusText);
|
||||||
|
} else {
|
||||||
|
// 성공적으로 로드되었을 때 실행할 코드
|
||||||
|
console.log("로드 완료:", response);
|
||||||
|
callback(callbackParams);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDongList2() {
|
function getDongList2(callback = null, callbackParams = null) {
|
||||||
var sub_cd = $("#cmb_gungu_all").val().substring(0, 4);
|
var sub_cd = $("#cmb_gungu_all").val().substring(0, 4);
|
||||||
|
|
||||||
var params = new Object();
|
var params = new Object();
|
||||||
params.gungu_cd = sub_cd;
|
params.gungu_cd = sub_cd;
|
||||||
|
|
||||||
$("#cmb_dong_all").load("/map/getDong.do", params);
|
$("#cmb_dong_all").load("/map/getDong.do", params, function(response, status, xhr) {
|
||||||
|
if (status == "error") {
|
||||||
|
// 오류 처리
|
||||||
|
console.error("에러: " + xhr.status + ": " + xhr.statusText);
|
||||||
|
} else {
|
||||||
|
// 성공적으로 로드되었을 때 실행할 코드
|
||||||
|
console.log("로드 완료:", response);
|
||||||
|
callback(callbackParams);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var waitWin;
|
var waitWin;
|
||||||
|
|
@ -67,7 +100,6 @@ var searchAreaHolecode = null;
|
||||||
// ########################### #####################
|
// ########################### #####################
|
||||||
/** 시추공검색 지역 사업 좌표 실행 * */
|
/** 시추공검색 지역 사업 좌표 실행 * */
|
||||||
function onSichAllCheck() {
|
function onSichAllCheck() {
|
||||||
|
|
||||||
var bound;
|
var bound;
|
||||||
// if(searchSichuForm.areaSearch.checked == false){
|
// if(searchSichuForm.areaSearch.checked == false){
|
||||||
// openWaitWin();
|
// openWaitWin();
|
||||||
|
|
@ -177,6 +209,8 @@ function onSichAllCheck() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function holeCodeCheck(){
|
function holeCodeCheck(){
|
||||||
openWaitWin();
|
openWaitWin();
|
||||||
var params = "";
|
var params = "";
|
||||||
|
|
@ -1032,3 +1066,5 @@ function checkCartSize(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -174,6 +174,7 @@ function initApp(param){
|
||||||
// ---------------------
|
// ---------------------
|
||||||
// 지도 생성
|
// 지도 생성
|
||||||
// ---------------------
|
// ---------------------
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
projection: new OpenLayers.Projection("EPSG:3857"),
|
projection: new OpenLayers.Projection("EPSG:3857"),
|
||||||
units: "m",
|
units: "m",
|
||||||
|
|
@ -186,7 +187,7 @@ function initApp(param){
|
||||||
controls : [
|
controls : [
|
||||||
new OpenLayers.Control.Navigation({
|
new OpenLayers.Control.Navigation({
|
||||||
handleRightClicks : true,
|
handleRightClicks : true,
|
||||||
dragPanOptions: {
|
PanOptions: {
|
||||||
enableKinetic: false
|
enableKinetic: false
|
||||||
},
|
},
|
||||||
draw: function() {
|
draw: function() {
|
||||||
|
|
@ -827,7 +828,135 @@ function initApp(param){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const userArea = getURLParameter("userArea");
|
||||||
|
const gl = getURLParameter("gl");
|
||||||
|
const gm = getURLParameter("gm");
|
||||||
|
const gs = getURLParameter("gs");
|
||||||
|
const gf = getURLParameter("gf");
|
||||||
|
const lastTeamName = getURLParameter("lastTeamName");
|
||||||
|
|
||||||
|
const positionX = Number(getURLParameter("positionX"));
|
||||||
|
const positionY = Number(getURLParameter("positionY"));
|
||||||
|
if( userArea ) {
|
||||||
|
|
||||||
|
function getMiddleXY(value) {
|
||||||
|
const arr = value.split("^");
|
||||||
|
minX = Number(arr[1]);
|
||||||
|
maxX = Number(arr[2]);
|
||||||
|
minY = Number(arr[3]);
|
||||||
|
maxY = Number(arr[4]);
|
||||||
|
|
||||||
|
return {
|
||||||
|
minX,
|
||||||
|
maxX,
|
||||||
|
minY,
|
||||||
|
maxY,
|
||||||
|
x: maxX - minX,
|
||||||
|
y: maxY - minY,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectOptionByText(text, selectElement) {
|
||||||
|
// 텍스트의 앞 두 글자를 가져옵니다.
|
||||||
|
const firstTwoChars = text.substring(0, 2);
|
||||||
|
|
||||||
|
// 모든 option 요소를 순회합니다.
|
||||||
|
for (let i = 0; i < selectElement.options.length; i++) {
|
||||||
|
const option = selectElement.options[i];
|
||||||
|
const optionText = option.text;
|
||||||
|
|
||||||
|
// option의 앞 두 글자를 가져옵니다.
|
||||||
|
const optionFirstTwoChars = optionText.substring(0, 2);
|
||||||
|
|
||||||
|
// 두 글자가 일치하는지 확인합니다.
|
||||||
|
if (optionFirstTwoChars === firstTwoChars) {
|
||||||
|
//충청, 전라, 경상
|
||||||
|
if( optionFirstTwoChars === "충청" || optionFirstTwoChars === "전라" || optionFirstTwoChars === "경상" ) {
|
||||||
|
if( optionText.substring(0, 3) === text.substring(0, 3) ) {
|
||||||
|
selectElement.selectedIndex = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 일치하는 option을 선택합니다.
|
||||||
|
selectElement.selectedIndex = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// select 요소를 가져옵니다.
|
||||||
|
if( gl === "국토교통부" ) {
|
||||||
|
//소속 기관
|
||||||
|
selectOptionByText(gs, document.getElementById("cmb_sido_all"));
|
||||||
|
const getGuList2Callback = function () {
|
||||||
|
onSichAllCheck();
|
||||||
|
const selectedXY = getMiddleXY(document.getElementById("cmb_sido_all").value);
|
||||||
|
BASE_MAP.zoomToExtent(new OpenLayers.Bounds(selectedXY.minX, selectedXY.minY, selectedXY.maxX, selectedXY.maxY).transform('EPSG:5186', 'EPSG:3857'), true);
|
||||||
|
}
|
||||||
|
getGuList2(getGuList2Callback);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
//지방자치단체
|
||||||
|
selectOptionByText(gm, document.getElementById("cmb_sido_all"));
|
||||||
|
const getGuList2Callback = function () {
|
||||||
|
if( gs === null || gs.trim() === "" ) {
|
||||||
|
onSichAllCheck();
|
||||||
|
const selectedSidoXY = getMiddleXY(document.getElementById("cmb_sido_all").value);
|
||||||
|
BASE_MAP.zoomToExtent(new OpenLayers.Bounds(selectedSidoXY.minX, selectedSidoXY.minY, selectedSidoXY.maxX, selectedSidoXY.maxY).transform('EPSG:5186', 'EPSG:3857'), true);
|
||||||
|
} else {
|
||||||
|
selectOptionByText(gs, document.getElementById("cmb_gungu_all"));
|
||||||
|
const getDongList2Callback = function () {
|
||||||
|
if( gf === null || gf.trim() === "" ) {
|
||||||
|
onSichAllCheck();
|
||||||
|
const selectedGunguXY = getMiddleXY(document.getElementById("cmb_gungu_all").value);
|
||||||
|
var move_bound = new OpenLayers.Bounds(selectedGunguXY.minX, selectedGunguXY.minY, selectedGunguXY.maxX, selectedGunguXY.maxY).transform('EPSG:5186', 'EPSG:3857'); //5174
|
||||||
|
BASE_MAP.zoomToExtent(move_bound, true);
|
||||||
|
} else {
|
||||||
|
selectOptionByText(gf, document.getElementById("cmb_dong_all"));
|
||||||
|
onSichAllCheck();
|
||||||
|
const selectedDongXY = getMiddleXY(document.getElementById("cmb_dong_all").value);
|
||||||
|
BASE_MAP.zoomToExtent(new OpenLayers.Bounds(selectedDongXY.minX, selectedDongXY.minY, selectedDongXY.maxX, selectedDongXY.maxY).transform('EPSG:5186', 'EPSG:3857'), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getDongList2(getDongList2Callback);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getGuList2(getGuList2Callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if( false ) {
|
||||||
|
|
||||||
|
//thkim
|
||||||
|
if( gm.indexOf("강원") > -1 ) {
|
||||||
|
|
||||||
|
}
|
||||||
|
if( userArea === "부산광역시" ) {
|
||||||
|
BASE_MAP.setCenter(new OpenLayers.LonLat(14364425.793355, 4186405.8698004), 11); // 1= x(커질수록 우측), 2=Y(커질수록 위로) thkim // 부산 하드코딩
|
||||||
|
$("#cmb_sido_all").val('1013^361348^409880^266204^312094');
|
||||||
|
} else if( userArea === "충청남도" ) {
|
||||||
|
BASE_MAP.setCenter(new OpenLayers.LonLat(14124425.793355, 4380405.8698004), 10); // 1= x(커질수록 우측), 2=Y(커질수록 위로) thkim // 충청남도 하드코딩
|
||||||
|
$("#cmb_sido_all").val('1006^69555^257833^375379^495999');
|
||||||
|
} else {
|
||||||
BASE_MAP.setCenter(new OpenLayers.LonLat(14184425.793355, 4302405.8698004), 7);
|
BASE_MAP.setCenter(new OpenLayers.LonLat(14184425.793355, 4302405.8698004), 7);
|
||||||
|
}
|
||||||
|
//BASE_MAP.setCenter(new OpenLayers.LonLat(positionX, positionY), 10); // 1= x(커질수록 우측), 2=Y(커질수록 위로) thkim // 충청남도 하드코딩
|
||||||
|
|
||||||
|
$("#cmb_gungu_all").val('all');
|
||||||
|
$("#cmb_dong_all").val('all');
|
||||||
|
onSichAllCheck();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
BASE_MAP.setCenter(new OpenLayers.LonLat(14184425.793355, 4302405.8698004), 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 툴팁 표시
|
// 툴팁 표시
|
||||||
HOLE_TOOLTIP = new OpenLayers.Layer.Vector("SELECT");
|
HOLE_TOOLTIP = new OpenLayers.Layer.Vector("SELECT");
|
||||||
|
|
@ -900,6 +1029,7 @@ function initApp(param){
|
||||||
|
|
||||||
|
|
||||||
BASE_MAP.events.register("mousemove", BASE_MAP, function (evt) {
|
BASE_MAP.events.register("mousemove", BASE_MAP, function (evt) {
|
||||||
|
|
||||||
var map = evt.object;
|
var map = evt.object;
|
||||||
HOLE_TOOLTIP.removeAllFeatures();
|
HOLE_TOOLTIP.removeAllFeatures();
|
||||||
mouseMoveEvt = evt;
|
mouseMoveEvt = evt;
|
||||||
|
|
@ -1020,6 +1150,7 @@ function initApp(param){
|
||||||
});
|
});
|
||||||
|
|
||||||
BASE_MAP.events.register("mouseup", BASE_MAP, function (evt) {
|
BASE_MAP.events.register("mouseup", BASE_MAP, function (evt) {
|
||||||
|
|
||||||
var size = $('#buffer').val();
|
var size = $('#buffer').val();
|
||||||
mouseUpEvt = evt;
|
mouseUpEvt = evt;
|
||||||
if(size == 0&&($('input[name=areaRadio]:checked').val() == '1')){
|
if(size == 0&&($('input[name=areaRadio]:checked').val() == '1')){
|
||||||
|
|
|
||||||
|
|
@ -1852,3 +1852,186 @@ function fn_openClipReport(table,project,hole,sample,etc1,etc2,gbn){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function shakeAndHighlight(targetEle, message) {
|
||||||
|
var originalStyle = targetEle.style.border; // 원래 스타일 저장
|
||||||
|
|
||||||
|
// 빨간색 테두리 설정
|
||||||
|
targetEle.style.border = "2px solid red";
|
||||||
|
|
||||||
|
// 흔들리는 애니메이션 추가
|
||||||
|
targetEle.classList.add("shake-animation");
|
||||||
|
|
||||||
|
|
||||||
|
//alert
|
||||||
|
setTimeout(function() {
|
||||||
|
if( typeof message != 'undefined' ) {
|
||||||
|
//alert(message);
|
||||||
|
|
||||||
|
var snackbarEle = document.getElementById("snackbar");
|
||||||
|
if( typeof snackbarEle === 'undefined' || snackbarEle === null ) {
|
||||||
|
//snackbar 엘리먼트 생성
|
||||||
|
snackbarEle = createSnackBarEle();
|
||||||
|
}
|
||||||
|
snackbarEle.innerHTML = message;
|
||||||
|
}
|
||||||
|
}, 1);
|
||||||
|
|
||||||
|
// 3초 후 원래 스타일로 복원
|
||||||
|
setTimeout(function() {
|
||||||
|
targetEle.style.border = originalStyle;
|
||||||
|
targetEle.classList.remove("shake-animation");
|
||||||
|
//targetEle.focus();
|
||||||
|
showSnackbar();
|
||||||
|
}, 700);
|
||||||
|
}
|
||||||
|
|
||||||
|
function createSnackBarEle () {
|
||||||
|
const snackbar = document.createElement('div');
|
||||||
|
snackbar.id = 'snackbar';
|
||||||
|
|
||||||
|
// 2. body 태그 가져오기
|
||||||
|
const body = document.body;
|
||||||
|
|
||||||
|
// 3. body 태그 맨 아래에 snackbar 추가
|
||||||
|
body.appendChild(snackbar);
|
||||||
|
return snackbar;
|
||||||
|
}
|
||||||
|
|
||||||
|
function showSnackbar() {
|
||||||
|
// Get the snackbar DIV
|
||||||
|
var snackbar = document.getElementById("snackbar");
|
||||||
|
|
||||||
|
if( typeof snackbar === 'undefined' || snackbar === null ) {
|
||||||
|
//snackbar 엘리먼트 생성
|
||||||
|
snackbar = createSnackBarEle();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the "show" class to DIV
|
||||||
|
snackbar.className = "show";
|
||||||
|
|
||||||
|
var innerText = snackbar.innerText;
|
||||||
|
innerText = String(innerText);
|
||||||
|
// After some seconds, remove the show class from DIV
|
||||||
|
|
||||||
|
const totalShowDuration = 4000 + innerText.length * 86;
|
||||||
|
|
||||||
|
setTimeout(function(){
|
||||||
|
snackbar.className = snackbar.className.replace("show", "");
|
||||||
|
}, totalShowDuration);
|
||||||
|
|
||||||
|
setTimeout(function(){
|
||||||
|
snackbar.style.visibility = 'hidden';
|
||||||
|
}, totalShowDuration - 500);
|
||||||
|
|
||||||
|
|
||||||
|
const remainingDuration = totalShowDuration / 1000 - (0.5 * 2);
|
||||||
|
|
||||||
|
// CSS 스타일을 JavaScript로 추가합니다.
|
||||||
|
snackbar.style.visibility = 'visible';
|
||||||
|
snackbar.style.animation = 'fadein 0.5s, fadeout 0.5s ' + String(remainingDuration) + 's';
|
||||||
|
snackbar.style.webkitAnimation = 'fadein 0.5s, fadeout 0.5s ' + String(remainingDuration) + 's';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 한글 은/는 return 함수
|
||||||
|
*/
|
||||||
|
function getKoreanParticle(word) {
|
||||||
|
// 입력받은 문자열의 마지막 글자를 추출합니다.
|
||||||
|
const lastChar = word.slice(-1);
|
||||||
|
|
||||||
|
// 자음으로 끝나는 경우 '은'을, 모음으로 끝나는 경우 '는'을 반환합니다.
|
||||||
|
const consonants = 'ㄱㄴㄷㄹㅁㅂㅅㅇㅈㅊㅋㅌㅍㅎ';
|
||||||
|
if (consonants.includes(lastChar)) {
|
||||||
|
return '은';
|
||||||
|
} else {
|
||||||
|
return '는';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 한글 로/으로 return 함수
|
||||||
|
*/
|
||||||
|
function getKoreanParticle2(word) {
|
||||||
|
word = String(word);
|
||||||
|
const lastChar = word.slice(-1);
|
||||||
|
const consonants = 'ㄱㄴㄷㄹㅁㅂㅅㅇㅈㅊㅋㅌㅍㅎ';
|
||||||
|
const numberConsonantsNeun = '036';
|
||||||
|
|
||||||
|
// 0, 3, 6만 으로 로 이어진다/
|
||||||
|
if (numberConsonantsNeun.includes(lastChar)) {
|
||||||
|
return '으로';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( hasNonNumericCharacters(lastChar) == false ) {
|
||||||
|
return '로';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1. 'ㄹ'로 끝나는 경우 '로'를 사용합니다.
|
||||||
|
if (lastChar === 'ㄹ') {
|
||||||
|
return '로';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 그 외 자음으로 끝나는 경우 '으로'를 사용합니다.
|
||||||
|
if (consonants.includes(lastChar)) {
|
||||||
|
return '으로';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 모음으로 끝나는 경우 '로'를 사용합니다.
|
||||||
|
return '로';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function hasNonNumericCharacters(str) {
|
||||||
|
return /[^0-9]/.test(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeNonNumeric(str) {
|
||||||
|
let inputValue = String(str);
|
||||||
|
return inputValue.replace(/[^0-9]/g, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
프로젝트 명 중복 체크
|
||||||
|
*/
|
||||||
|
function duplicateCheckProjectName( projectNameInput, projectCode ) {
|
||||||
|
|
||||||
|
if( typeof projectCode === 'undefined' || projectCode ==="null") {
|
||||||
|
projectCode = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
projectName = projectNameInput.value;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type : "GET",
|
||||||
|
data : {
|
||||||
|
projectName : projectName,
|
||||||
|
projectCode : projectCode,
|
||||||
|
isProjectNameChecking : "true"
|
||||||
|
},
|
||||||
|
url : "/project-duplicate-check.json",
|
||||||
|
dataType : "json",
|
||||||
|
success : function( json ){
|
||||||
|
resultData = json.result;
|
||||||
|
if(resultData == "false"){
|
||||||
|
shakeAndHighlight(projectNameInput, json.message);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, option, error){
|
||||||
|
alert(xhr.status); //오류코드
|
||||||
|
alert(error); //오류내용
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue