서명관련 수정
This commit is contained in:
@@ -139,8 +139,6 @@ public class KioskService {
|
|||||||
String muUserAgreementId = ("UA").concat(String.valueOf(System.currentTimeMillis()));
|
String muUserAgreementId = ("UA").concat(String.valueOf(System.currentTimeMillis()));
|
||||||
|
|
||||||
consentFormMap.put("muUserAgreementId", muUserAgreementId);
|
consentFormMap.put("muUserAgreementId", muUserAgreementId);
|
||||||
|
|
||||||
|
|
||||||
consentFormMap.put("muUserId", dto.getUserNumber().get("id"));
|
consentFormMap.put("muUserId", dto.getUserNumber().get("id"));
|
||||||
consentFormMap.put("userName", dto.getUserName());
|
consentFormMap.put("userName", dto.getUserName());
|
||||||
consentFormMap.put("type", type);
|
consentFormMap.put("type", type);
|
||||||
@@ -156,7 +154,7 @@ public class KioskService {
|
|||||||
consentFormMap.put("fileName", "-");
|
consentFormMap.put("fileName", "-");
|
||||||
consentFormMap.put("originalFileName", "-");
|
consentFormMap.put("originalFileName", "-");
|
||||||
consentFormMap.put("loginMemberId", "kiosk");
|
consentFormMap.put("loginMemberId", "kiosk");
|
||||||
|
consentFormMap.put("signatureBase64", dto.getSignatureData());
|
||||||
webUserSqlMapDAO.insertUserAgreement(consentFormMap);
|
webUserSqlMapDAO.insertUserAgreement(consentFormMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3020,15 +3020,15 @@ public class WebUserServiceImpl implements WebUserService {
|
|||||||
|
|
||||||
if(true == check){
|
if(true == check){
|
||||||
// file
|
// file
|
||||||
HashMap<String, Object> uploadFileMap = new HashMap<String, Object>();
|
/*
|
||||||
uploadFileMap.put("type", "UA");
|
* HashMap<String, Object> uploadFileMap = new HashMap<String, Object>();
|
||||||
uploadFileMap.put("fileType", "I");
|
* uploadFileMap.put("type", "UA"); uploadFileMap.put("fileType", "I");
|
||||||
uploadFileMap.put("fileName", file.getOriginalFilename());
|
* uploadFileMap.put("fileName", file.getOriginalFilename()); HashMap<String,
|
||||||
HashMap<String, Object> fileMap = fileService.uploadFile(uploadFileMap, file);
|
* Object> fileMap = fileService.uploadFile(uploadFileMap, file); String cdnUrl
|
||||||
String cdnUrl = String.valueOf(fileMap.get("cdnUrl"));
|
* = String.valueOf(fileMap.get("cdnUrl")); String filePath =
|
||||||
String filePath = String.valueOf(fileMap.get("fileUrl"));
|
* String.valueOf(fileMap.get("fileUrl")); String fileName =
|
||||||
String fileName = String.valueOf(fileMap.get("fileName"));
|
* String.valueOf(fileMap.get("fileName")); String chgFileNmae = fileName;
|
||||||
String chgFileNmae = fileName;
|
*/
|
||||||
|
|
||||||
// 동의서 등록
|
// 동의서 등록
|
||||||
paramMap.put("tId", tId);
|
paramMap.put("tId", tId);
|
||||||
@@ -3037,10 +3037,11 @@ public class WebUserServiceImpl implements WebUserService {
|
|||||||
String muUserAgreementId = ("UA").concat(String.valueOf(System.currentTimeMillis()));
|
String muUserAgreementId = ("UA").concat(String.valueOf(System.currentTimeMillis()));
|
||||||
paramMap.put("muUserAgreementId",muUserAgreementId);
|
paramMap.put("muUserAgreementId",muUserAgreementId);
|
||||||
paramMap.put("status", "Y");
|
paramMap.put("status", "Y");
|
||||||
paramMap.put("cdnUrl", cdnUrl);
|
paramMap.put("cdnUrl", "");
|
||||||
paramMap.put("filePath", filePath);
|
paramMap.put("filePath", "");
|
||||||
paramMap.put("fileName", fileName);
|
paramMap.put("fileName", "");
|
||||||
paramMap.put("originalFileName", chgFileNmae);
|
paramMap.put("originalFileName", "");
|
||||||
|
|
||||||
webUserSqlMapDAO.insertUserAgreement(paramMap);
|
webUserSqlMapDAO.insertUserAgreement(paramMap);
|
||||||
|
|
||||||
map.put("msgCode", Constants.OK);
|
map.put("msgCode", Constants.OK);
|
||||||
|
|||||||
@@ -800,6 +800,7 @@
|
|||||||
,MA.RETURN_RELATIONSHIP AS "returnRelationship"
|
,MA.RETURN_RELATIONSHIP AS "returnRelationship"
|
||||||
,MA.RETURN_PHONE_NUMBER AS "returnPhoneNumber"
|
,MA.RETURN_PHONE_NUMBER AS "returnPhoneNumber"
|
||||||
,DATE_FORMAT(MA.WRITE_DATE, '%Y-%m-%d') AS "writeDate"
|
,DATE_FORMAT(MA.WRITE_DATE, '%Y-%m-%d') AS "writeDate"
|
||||||
|
,SIGNATURE_BASE64 AS "signatureBase64"
|
||||||
FROM MU_USER_AGREEMENT AS MA
|
FROM MU_USER_AGREEMENT AS MA
|
||||||
WHERE MA.USE_YN = 'Y'
|
WHERE MA.USE_YN = 'Y'
|
||||||
AND MA.MU_USER_AGREEMENT_ID = #{muUserAgreementId}
|
AND MA.MU_USER_AGREEMENT_ID = #{muUserAgreementId}
|
||||||
@@ -956,6 +957,9 @@
|
|||||||
,REG_DATE
|
,REG_DATE
|
||||||
,MOD_ID
|
,MOD_ID
|
||||||
,MOD_DATE
|
,MOD_DATE
|
||||||
|
<if test="signatureBase64 != null and signatureBase64 != ''">
|
||||||
|
,SIGNATURE_BASE64
|
||||||
|
</if>
|
||||||
)VALUES(
|
)VALUES(
|
||||||
#{id}
|
#{id}
|
||||||
,#{muUserId}
|
,#{muUserId}
|
||||||
@@ -1033,6 +1037,9 @@
|
|||||||
,NOW()
|
,NOW()
|
||||||
,#{loginMemberId}
|
,#{loginMemberId}
|
||||||
,NOW()
|
,NOW()
|
||||||
|
<if test="signatureBase64 != null and signatureBase64 != ''">
|
||||||
|
,#{signatureBase64}
|
||||||
|
</if>
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|||||||
@@ -236,8 +236,9 @@ let agreementInsertModal = {
|
|||||||
// 서명 관련
|
// 서명 관련
|
||||||
let canvas = selectForm.find('.signPad canvas')[0];
|
let canvas = selectForm.find('.signPad canvas')[0];
|
||||||
let context = canvas.getContext('2d');
|
let context = canvas.getContext('2d');
|
||||||
let dataUrl = canvas.toDataURL();
|
let signatureBase64 = canvas.toDataURL();
|
||||||
let blob = dataURItoBlob(dataUrl);
|
|
||||||
|
//let blob = dataURItoBlob(dataUrl);
|
||||||
|
|
||||||
// 고객명
|
// 고객명
|
||||||
let userName = selectForm.find('span.userName').text();
|
let userName = selectForm.find('span.userName').text();
|
||||||
@@ -774,7 +775,7 @@ let agreementInsertModal = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!fn_emptyCheck(blob) || fn_isCanvasBlank(canvas)){
|
if(!fn_emptyCheck(signatureBase64) || fn_isCanvasBlank(canvas)){
|
||||||
modalEvent.warning("등록", "서명 정보가 없습니다.");
|
modalEvent.warning("등록", "서명 정보가 없습니다.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -786,7 +787,7 @@ let agreementInsertModal = {
|
|||||||
formData.append("type", type);
|
formData.append("type", type);
|
||||||
formData.append("renewalCycle", renewalCycle);
|
formData.append("renewalCycle", renewalCycle);
|
||||||
formData.append("expirationDate", expirationDate);
|
formData.append("expirationDate", expirationDate);
|
||||||
formData.append("file", blob);
|
//formData.append("file", blob);
|
||||||
formData.append("userName", userName);
|
formData.append("userName", userName);
|
||||||
|
|
||||||
formData.append("agree3Yn", agree3Yn);
|
formData.append("agree3Yn", agree3Yn);
|
||||||
@@ -834,6 +835,7 @@ let agreementInsertModal = {
|
|||||||
formData.append("userName2", userName2);
|
formData.append("userName2", userName2);
|
||||||
formData.append("relationship", relationship);
|
formData.append("relationship", relationship);
|
||||||
formData.append("phoneNumber2", phoneNumber2);
|
formData.append("phoneNumber2", phoneNumber2);
|
||||||
|
formData.append("signatureBase64", signatureBase64);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: encodeURI('/webuser/insertUserAgreement.do'),
|
url: encodeURI('/webuser/insertUserAgreement.do'),
|
||||||
|
|||||||
@@ -241,8 +241,20 @@ let agreementSelectModal = {
|
|||||||
$("#agreementSelectModal input[name='modalUserName']").val(userName);
|
$("#agreementSelectModal input[name='modalUserName']").val(userName);
|
||||||
$("#agreementSelectModal input[name='modalPtUserName']").val(ptUserName);
|
$("#agreementSelectModal input[name='modalPtUserName']").val(ptUserName);
|
||||||
|
|
||||||
|
let signatureBase64 = data.rows[0].signatureBase64;
|
||||||
|
if (signatureBase64) {
|
||||||
|
// 1. 만약 DB에 "data:image/png;base64,..." 접두사까지 저장했다면 그대로 사용
|
||||||
|
// 2. 만약 순수 암호문만 저장했다면 앞에 접두사를 붙여줍니다.
|
||||||
|
let imgSrc = signatureBase64.startsWith('data:image')
|
||||||
|
? signatureBase64
|
||||||
|
: 'data:image/png;base64,' + signatureBase64;
|
||||||
|
// 이미지 태그를 생성하여 서명 박스에 삽입
|
||||||
|
$("#agreementSelectModal .signImgBox").html('<img src="' + imgSrc + '" style="width:100%; height:auto;" alt="서명"/>');
|
||||||
|
} else {
|
||||||
|
$("#agreementSelectModal .signImgBox").html('서명 없음');
|
||||||
|
}
|
||||||
// 서명 이미지
|
// 서명 이미지
|
||||||
$("#agreementSelectModal .signImgBox").html('<img src="'+fileUrl+'" alt="sign"/>');
|
//$("#agreementSelectModal .signImgBox").html('<img src="'+fileUrl+'" alt="sign"/>');
|
||||||
|
|
||||||
// 폼 값 셋팅
|
// 폼 값 셋팅
|
||||||
let agreementIndex = $("#agreementSelectModal #modalAgreementType").next('.select_option_list').find('input[value="'+type+'"]').closest('li').index();
|
let agreementIndex = $("#agreementSelectModal #modalAgreementType").next('.select_option_list').find('input[value="'+type+'"]').closest('li').index();
|
||||||
|
|||||||
Reference in New Issue
Block a user