feat: 기업 회원 가입 시 하단 버튼을 '확인'이 아닌 '가입'으로 수정

main
thkim 2024-12-31 11:40:12 +09:00
parent dbed79b889
commit c793ad03c1
10 changed files with 184 additions and 85 deletions

View File

@ -1,65 +1,2 @@
#src\main\resources\egovframework\egovProps\globals.properties #src\main\resources\egovframework\egovProps\globals.properties
#TEMP_HEADER src\main\webapp\WEB-INF\views\body\join\join.jsp
src\main\java\geoinfo\com\WebConfirm.java
src\main\resources\egovframework\sqlmap\mapper\main\Login_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapControl_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapLeft_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\regi\common.xml
src\main\resources\egovframework\sqlmap\mapper\regi\header.xml
src\main\resources\egovframework\sqlmap\mapper\regi\holeCoord.xml
src\main\resources\egovframework\sqlmap\mapper\regi\layerInfo_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\regi\listReg.xml
src\main\resources\egovframework\sqlmap\mapper\regi\map.xml
src\main\resources\egovframework\sqlmap\mapper\regi\projectList.xml
src\main\resources\egovframework\sqlmap\mapper\regi\regi.xml
src\main\resources\egovframework\sqlmap\mapper\regi\rock.xml
src\main\resources\egovframework\sqlmap\mapper\regi\sand_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\regi\selectClass2019_SQL.xml
#TEMP_PROJECT_INFO
src\main\java\geoinfo\com\WebConfirm.java
src\main\java\geoinfo\regi\surface\SurfaceController.java
src\main\resources\egovframework\sqlmap\mapper\main\Home_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\main\Login_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapLeft_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\regi\common.xml
src\main\resources\egovframework\sqlmap\mapper\regi\complete_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\regi\complete.xml
src\main\resources\egovframework\sqlmap\mapper\regi\header.xml
src\main\resources\egovframework\sqlmap\mapper\regi\holeCoord.xml
src\main\resources\egovframework\sqlmap\mapper\regi\info_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\regi\listReg.xml
src\main\resources\egovframework\sqlmap\mapper\regi\manageList.xml
src\main\resources\egovframework\sqlmap\mapper\regi\manageList2019.xml
src\main\resources\egovframework\sqlmap\mapper\regi\map.xml
src\main\resources\egovframework\sqlmap\mapper\regi\projectList.xml
src\main\resources\egovframework\sqlmap\mapper\regi\regi.xml
src\main\resources\egovframework\sqlmap\mapper\regi\rock.xml
src\main\resources\egovframework\sqlmap\mapper\regi\sand_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\regi\selectClass_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\regi\selectClass2019_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\regi\surface_SQL.xml
src\main\webapp\WEB-INF\views\web\input\surface\refraction_survey_json_data.jsp
src\main\webapp\WEB-INF\views\web\input\surface\refraction_survey_sub_json_data.jsp
src\main\webapp\WEB-INF\views\web\input\surface\resistivity_survey_jsondata.jsp
src\main\webapp\WEB-INF\views\web\input\surface\resistivity_survey_sub_jsondata.jsp
#TBL_HEADER
src\main\java\geoinfo\com\WebConfirm.java
src\main\resources\egovframework\sqlmap\mapper\com\Jusangdo_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\main\Home_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapControl_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapCoordSearch_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapInformation_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapLeft_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapProjectSearch_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\regi\regi.xml
#TBL_PROJECT_INFO
src\main\java\geoinfo\com\WebConfirm.java
src\main\resources\egovframework\sqlmap\mapper\main\Home_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\main\Login_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapControl_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapCoordSearch_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapInformation_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapLeft_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapMain_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\map\MapProjectSearch_SQL.xml
src\main\resources\egovframework\sqlmap\mapper\regi\manageList2019.xml

View File

@ -442,6 +442,12 @@
<version>1.1.1</version> <version>1.1.1</version>
</dependency> </dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.1</version>
</dependency>
</dependencies> </dependencies>

View File

@ -5,6 +5,7 @@ import java.io.FileNotFoundException;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.security.Key;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.security.SecureRandom; import java.security.SecureRandom;
import java.text.DecimalFormat; import java.text.DecimalFormat;
@ -26,6 +27,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.crypto.spec.SecretKeySpec;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
@ -62,6 +64,9 @@ import geoinfo.map.mapControl.service.MapControlService;
import geoinfo.util.MobileCertificationUtil; import geoinfo.util.MobileCertificationUtil;
import geoinfo.util.ScriptUtil; import geoinfo.util.ScriptUtil;
import ictway.comm.web.WebUtil; import ictway.comm.web.WebUtil;
import io.jsonwebtoken.JwtBuilder;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import sun.misc.BASE64Decoder; import sun.misc.BASE64Decoder;
@Controller @Controller
@ -80,6 +85,9 @@ public class LoginController {
private static boolean loginFlag = true; private static boolean loginFlag = true;
private static MultiValueMap users = new MultiValueMap(); private static MultiValueMap users = new MultiValueMap();
final String SECRET_KEY = EgovProperties.getProperty("JWT.secret_key").trim();
final String ACCESS_EXPIRED = EgovProperties.getProperty("JWT.access_expired").trim();
private static List<HttpSession> sessionList = new ArrayList<>(); private static List<HttpSession> sessionList = new ArrayList<>();
public static List<HttpSession> getSessionList() { public static List<HttpSession> getSessionList() {
@ -594,6 +602,59 @@ public class LoginController {
return mv; return mv;
} }
public String createJWT(String id, String issuer, String subject, long ttlMillis) {
//The JWT signature algorithm we will be using to sign the token
SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;
long nowMillis = System.currentTimeMillis();
Date now = new Date(nowMillis);
//We will sign our JWT with our ApiKey secret
byte[] apiKeySecretBytes = DatatypeConverter.parseBase64Binary(SECRET_KEY);
Key signingKey = new SecretKeySpec(apiKeySecretBytes, signatureAlgorithm.getJcaName());
//Let's set the JWT Claims
JwtBuilder builder = Jwts.builder().setId(id)
.setIssuedAt(now)
.setSubject(subject)
.setIssuer(issuer)
.signWith(signatureAlgorithm, signingKey);
//if it has been specified, let's add the expiration
if (ttlMillis > 0) {
long expMillis = nowMillis + ttlMillis;
Date exp = new Date(expMillis);
builder.setExpiration(exp);
}
//Builds the JWT and serializes it to a compact, URL-safe string
return builder.compact();
}
public void myTest(HttpServletRequest request, HttpServletResponse response, String id) {
if( request == null ) {
return;
}
if( id == null ) {
id = "";
}
// The default token expires in 1,800,000 milliseconds, which is equal to 30 minutes.
String createJWT = createJWT(id, "testthkim", "title...", Long.valueOf(ACCESS_EXPIRED == null ? "1800000" : ACCESS_EXPIRED));
System.out.println(
"\n--------------------------------------------------------------\n" +
request.getRequestURI() + " " + "myTest" +
"\n--------------------------------------------------------------\n" +
"createJWT:[" + createJWT + "]\n" +
"\n--------------------------------------------------------------\n"
);
}
// 로그인 // 로그인
@RequestMapping(value = "/login.do", method = RequestMethod.POST) @RequestMapping(value = "/login.do", method = RequestMethod.POST)
public ModelAndView login(HttpSession session, Map<String, Object> map, HttpServletRequest request, HttpServletResponse response, @RequestParam("location") String location, @RequestParam("login_param") String login_param, @RequestParam("id") String id, @RequestParam("cls") String cls, @RequestParam("pass") String pass) throws Exception { public ModelAndView login(HttpSession session, Map<String, Object> map, HttpServletRequest request, HttpServletResponse response, @RequestParam("location") String location, @RequestParam("login_param") String login_param, @RequestParam("id") String id, @RequestParam("cls") String cls, @RequestParam("pass") String pass) throws Exception {
@ -1020,6 +1081,8 @@ public class LoginController {
loginFlag = true; loginFlag = true;
myTest(request, response, userid);
return mv; return mv;
} }

View File

@ -21,6 +21,7 @@ import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.commons.lang.StringUtils;
import org.jfree.util.Log; import org.jfree.util.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -36,6 +37,9 @@ import org.w3c.dom.Element;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;
import egovframework.com.cmm.service.EgovProperties;
import egovframework.rte.psl.dataaccess.util.EgovMap;
@Controller @Controller
public class SampleInfoController { public class SampleInfoController {
@ -311,7 +315,8 @@ public class SampleInfoController {
); );
} }
wUtil.deleteSandInfo(oPROJECT_CODE,oHOLE_CODE,request,params,sampleService); //wUtil.deleteSandInfo(oPROJECT_CODE,oHOLE_CODE,request,params,sampleService);
ictwayDeleteSandInfo(oPROJECT_CODE,oHOLE_CODE,request,params);
} }
//commit //commit
@ -346,5 +351,93 @@ public class SampleInfoController {
return "/web/input/sampleInfoDb"; return "/web/input/sampleInfoDb";
} }
public boolean ictwayDeleteSandInfo(String PROJECT_CODE, String HOLE_CODE, HttpServletRequest request, HashMap<String, Object> params) throws Exception {
String savePath = request.getSession().getServletContext().getRealPath("/") + EgovProperties.getProperty("Geoinfo.WebFilePath") + "CH/" + PROJECT_CODE + "/" + HOLE_CODE + "/";
if ((!"".equals(PROJECT_CODE)) && (!"".equals(HOLE_CODE)))
{
params.put("PROJECT_CODE", PROJECT_CODE);
params.put("HOLE_CODE", HOLE_CODE);
ArrayList result = sampleService.selectTempClassification(params);
for (int i = 0; i < result.size(); i++) {
EgovMap resultMap = (EgovMap)result.get(i);
if (!"".equals(StringUtils.defaultString((String)resultMap.get("graphImage")))) {
ictwayDeleteFile(savePath + "SAND_CLASSIFICATION", StringUtils.defaultString((String)resultMap.get("GRAPH_IMAGE")));
}
}
sampleService.deleteTempClassification(params);
ArrayList result2 = sampleService.selectTempConsolidationUsual(params);
for (int i = 0; i < result2.size(); i++) {
EgovMap resultMap2 = (EgovMap)result2.get(i);
if (!"".equals(StringUtils.defaultString((String)resultMap2.get("graphImage")))) {
ictwayDeleteFile(savePath + "SAND_CONSOLIDATION", StringUtils.defaultString((String)resultMap2.get("graphImage")));
}
}
sampleService.deleteTempConsolidation(params);
sampleService.deleteTempConsolidationUsual(params);
ArrayList resultCbr = sampleService.selectTempCbrCompac(params);
for (int i = 0; i < resultCbr.size(); i++) {
EgovMap cbrMap = (EgovMap)resultCbr.get(i);
if (!"".equals(StringUtils.defaultString((String)cbrMap.get("graphImage1")))) {
ictwayDeleteFile(savePath + "SAND_CBR", StringUtils.defaultString((String)cbrMap.get("graphImage1")));
}
if (!"".equals(StringUtils.defaultString((String)cbrMap.get("graphImage2")))) {
ictwayDeleteFile(savePath + "SAND_CBR", StringUtils.defaultString((String)cbrMap.get("graphImage2")));
}
}
sampleService.deleteTempCbrCompac(params);
ArrayList resultUnconfined = sampleService.selectTempUnconfinedUsual(params);
for (int i = 0; i < resultUnconfined.size(); i++) {
EgovMap unconMap = (EgovMap)resultUnconfined.get(i);
if (!"".equals(StringUtils.defaultString((String)unconMap.get("graphImage")))) {
ictwayDeleteFile(savePath + "SAND_UNCONFINED", StringUtils.defaultString((String)unconMap.get("graphImage")));
}
}
sampleService.deleteTempUnconfinedUsual(params);
ArrayList resultTriaxial = sampleService.selectTempTriaxialUsual(params);
for (int i = 0; i < resultTriaxial.size(); i++) {
EgovMap triaxialMap = (EgovMap)resultTriaxial.get(i);
if (!"".equals(StringUtils.defaultString((String)triaxialMap.get("graphImage1")))) {
ictwayDeleteFile(savePath + "SAND_TRIAXIAL", StringUtils.defaultString((String)triaxialMap.get("graphImage1")));
}
if (!"".equals(StringUtils.defaultString((String)triaxialMap.get("graphImage2")))) {
ictwayDeleteFile(savePath + "SAND_TRIAXIAL", StringUtils.defaultString((String)triaxialMap.get("graphImage2")));
}
}
sampleService.deleteTempTriaxialCu(params);
sampleService.deleteTempTriaxialUu(params);
sampleService.deleteTempTriaxialUsual(params);
}
return true;
}
public void ictwayDeleteFile(String savePath, String fileName)
{
try
{
java.io.File deleteFile = new java.io.File(savePath + "/" + fileName);
if (deleteFile.exists())
deleteFile.delete();
}
catch (Exception e) {
System.out.println("e.getMessage() : " + e.getMessage());
}
}
} }

View File

@ -72,16 +72,16 @@
]]> ]]>
</select> </select>
<delete id="deleteTempClassification" parameterType="map"> <delete id="deleteTempClassification" parameterType="map">
<![CDATA[ <![CDATA[
DELETE FROM TEMP_CLASSIFICATION DELETE FROM TEMP_CLASSIFICATION
WHERE PROJECT_CODE=#{PROJECT_CODE} WHERE PROJECT_CODE=#{PROJECT_CODE}
AND HOLE_CODE=#{HOLE_CODE} AND HOLE_CODE=#{HOLE_CODE}
AND SAMPLE_CODE NOT IN AND SAMPLE_CODE NOT IN
(SELECT SAMPLE_CODE FROM TEMP_SAMPLE_INFO WHERE PROJECT_CODE=#{PROJECT_CODE} (SELECT SAMPLE_CODE FROM TEMP_SAMPLE_INFO WHERE PROJECT_CODE=#{PROJECT_CODE}
AND HOLE_CODE=#{HOLE_CODE}) AND HOLE_CODE=#{HOLE_CODE})
]]> ]]>
</delete> </delete>
<select id="selectTempConsolidationUsual" parameterType="map" resultType="egovMap"> <select id="selectTempConsolidationUsual" parameterType="map" resultType="egovMap">
<![CDATA[ <![CDATA[

View File

@ -826,7 +826,7 @@
</div> </div>
<div class="table-bottom-btn-group"> <div class="table-bottom-btn-group">
<button type="button" class="btn btn-medium btn-rounded5 btn-ske-blue" onClick="javascript:joinCheck();"><span>확인</span></button> <button type="button" class="btn btn-medium btn-rounded5 btn-green" onClick="javascript:joinCheck();"><span>가입</span></button>
</div> </div>
</form> </form>

View File

@ -847,7 +847,7 @@ function fn_MapPopup(){
return false; return false;
} }
window.open("/web/map/mapPop.do?x="+x+"&y="+y,"Calendar","width=800px, height=600px"); window.open("/web/map/mapPop.do?x="+x+"&y="+y,"Calendar","width=800px, height=640px");
// 지도확인여부 체크 // 지도확인여부 체크
fn_checkMapConfirm(); fn_checkMapConfirm();

View File

@ -34,7 +34,7 @@
</script> </script>
<div style="width:100%;text-align:center;"> <div style="width:100%; text-align:center; margin-top: 13px;">
<a href="#" onclick="fn_confirmMap();return false;" href="#"> <a href="#" onclick="fn_confirmMap();return false;" href="#">
<img src="/images/add_btn_01.gif" alt="확인" /> <img src="/images/add_btn_01.gif" alt="확인" />
</a> </a>