Merge branch 'JIWOO'

This commit is contained in:
JIWOO 2024-11-26 17:05:04 +09:00
commit 074cd9384f
8 changed files with 292 additions and 17 deletions

View File

@ -24,6 +24,7 @@ import com.ibm.icu.text.SimpleDateFormat;
import seed.com.gtm.seedfile.SeedFileService; import seed.com.gtm.seedfile.SeedFileService;
import seed.com.user.mypage.MyPageService; import seed.com.user.mypage.MyPageService;
import seed.common.service.InnorixFileService;
import seed.manager.group.service.ManagerGroupService; import seed.manager.group.service.ManagerGroupService;
import seed.manager.member.service.ManagerMemberService; import seed.manager.member.service.ManagerMemberService;
import seed.manager.site.service.ManagerSiteManagerService; import seed.manager.site.service.ManagerSiteManagerService;
@ -57,6 +58,9 @@ public class WebMediationController {
@Autowired @Autowired
private ManagerGroupService managerGroupService; private ManagerGroupService managerGroupService;
@Autowired
private InnorixFileService innorixFileService;
@Autowired @Autowired
private MediationService service; private MediationService service;
@ -3293,11 +3297,24 @@ public class WebMediationController {
service.rceUpdate(paramMap); service.rceUpdate(paramMap);
if(!"".equals(SeedUtils.setReplaceNull(paramMap.get("fileFuncType")))) { /*if(!"".equals(SeedUtils.setReplaceNull(paramMap.get("fileFuncType")))) {
fileService.fileInsert(paramMap, request, session); fileService.fileInsert(paramMap, request, session);
} }
// fileService.fileInsert(paramMap, request, session); // fileService.fileInsert(paramMap, request, session);
fileService.caseFileDel(paramMap); fileService.caseFileDel(paramMap);*/
//이노릭스 대용량 업로드
String innorixFileListStr = (String) paramMap.get("innorixFileListVO");
if(!"".equals(innorixFileListStr)) {
try {
paramMap.put("innorixDataIdx", paramMap.get("rceptNo"));
paramMap.put("hpName", request.getSession().getAttribute("hpName"));
innorixFileService.innorixCaseFileInsert(innorixFileListStr, paramMap);
}catch(Exception e) {
e.printStackTrace();
System.out.println("이노릭스에러");
}
}
paramMap.put("sts", "success"); paramMap.put("sts", "success");
@ -3450,12 +3467,24 @@ public class WebMediationController {
service.rceUpdate(paramMap); service.rceUpdate(paramMap);
if(!"".equals(SeedUtils.setReplaceNull(paramMap.get("fileFuncType")))) { /*if(!"".equals(SeedUtils.setReplaceNull(paramMap.get("fileFuncType")))) {
fileService.fileInsert(paramMap, request, session); fileService.fileInsert(paramMap, request, session);
} }
// fileService.fileInsert(paramMap, request, session); // fileService.fileInsert(paramMap, request, session);
fileService.caseFileDel(paramMap); fileService.caseFileDel(paramMap);*/
//이노릭스 대용량 업로드
String innorixFileListStr = (String) paramMap.get("innorixFileListVO");
if(!"".equals(innorixFileListStr)) {
try {
paramMap.put("innorixDataIdx", paramMap.get("rceptNo"));
paramMap.put("hpName", request.getSession().getAttribute("hpName"));
innorixFileService.innorixCaseFileInsert(innorixFileListStr, paramMap);
}catch(Exception e) {
e.printStackTrace();
System.out.println("이노릭스에러");
}
}
// 하도급내역 UPDATE // 하도급내역 UPDATE

View File

@ -7,5 +7,6 @@ import org.springframework.web.bind.annotation.RequestParam;
public interface InnorixFileService { public interface InnorixFileService {
public void innorixExtraFileInsert(String innorixFileListStr, @RequestParam Map<String,Object> paramMap) throws Exception; public void innorixExtraFileInsert(String innorixFileListStr, @RequestParam Map<String,Object> paramMap) throws Exception;
public void innorixCaseFileInsert(String innorixFileListStr, @RequestParam Map<String,Object> paramMap) throws Exception;
} }

View File

@ -37,4 +37,24 @@ public class InnorixFileServiceImpl extends EgovAbstractServiceImpl implements I
} }
} }
@Override
public void innorixCaseFileInsert(String innorixFileListStr, @RequestParam Map<String,Object> paramMap) throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
List<InnorixFileVO> innorixFileList = objectMapper.readValue(innorixFileListStr, new TypeReference<List<InnorixFileVO>>() {});
for(InnorixFileVO innorixFileVO : innorixFileList) {
innorixFileVO.setFileNo((String) paramMap.get("innorixDataIdx"));
innorixFileVO.setFileFuncType((String)paramMap.get("fileFuncType"));
innorixFileVO.setCopyContractYn((String)paramMap.get("copyContractYn"));
innorixFileVO.setHpName((String)paramMap.get("hpName"));
innorixFileVO.setFilePath(innorixFileVO.getServerFilePath());
innorixFileVO.setFileGubun((String)paramMap.get("fileGubun"));
String fileName = innorixFileVO.getClientFileName();
String fileType = fileName.substring(fileName.lastIndexOf(".")+1, fileName.length());
innorixFileVO.setFileType(fileType);
innorixFileDAO.innorixCaseFileInsert(innorixFileVO);
}
}
} }

View File

@ -77,6 +77,16 @@ public class InnorixFileVO extends ComDefaultVO implements Serializable {
private String printFileName; private String printFileName;
private String copyContractYn;
private String fileNo;
private String hpName;
private String fileGubun;
private String filePath;
public List<InnorixFileVO> getInnorixFileListVO() { public List<InnorixFileVO> getInnorixFileListVO() {
return innorixFileListVO; return innorixFileListVO;
@ -216,6 +226,36 @@ public class InnorixFileVO extends ComDefaultVO implements Serializable {
public void setPrintFileName(String printFileName) { public void setPrintFileName(String printFileName) {
this.printFileName = printFileName; this.printFileName = printFileName;
} }
public String getCopyContractYn() {
return copyContractYn;
}
public void setCopyContractYn(String copyContractYn) {
this.copyContractYn = copyContractYn;
}
public String getFileNo() {
return fileNo;
}
public void setFileNo(String fileNo) {
this.fileNo = fileNo;
}
public String getHpName() {
return hpName;
}
public void setHpName(String hpName) {
this.hpName = hpName;
}
public String getFileGubun() {
return fileGubun;
}
public void setFileGubun(String fileGubun) {
this.fileGubun = fileGubun;
}
public String getFilePath() {
return filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}

View File

@ -16,4 +16,7 @@ public class InnorixFileDAO extends EgovAbstractDAO {
public void innorixExtraFileInsert(InnorixFileVO innorixFileVO) throws Exception { public void innorixExtraFileInsert(InnorixFileVO innorixFileVO) throws Exception {
sqlSession.insert("com.seed.innorixFile.extraInsert", innorixFileVO); sqlSession.insert("com.seed.innorixFile.extraInsert", innorixFileVO);
} }
public void innorixCaseFileInsert(InnorixFileVO innorixFileVO) throws Exception {
sqlSession.insert("com.seed.innorixFile.caseInsert", innorixFileVO);
}
} }

View File

@ -30,7 +30,7 @@
) )
</insert> </insert>
<!-- <insert id="caseInsert" parameterType="java.util.HashMap" useGeneratedKeys="false"> <insert id="caseInsert" parameterType="java.util.HashMap" useGeneratedKeys="false">
INSERT INTO C_CASEFILE( INSERT INTO C_CASEFILE(
FILE_NO, FILE_NO,
SEQ_NO, SEQ_NO,
@ -48,10 +48,10 @@
FILE_FUNC, FILE_FUNC,
COPY_CONTRACT_YN COPY_CONTRACT_YN
) VALUES ( ) VALUES (
#{rceptNo}, #{fileNo},
C_CASEFILE_SEQ.NEXTVAL, C_CASEFILE_SEQ.NEXTVAL,
#{uploadFileNameData}, #{clientFileName},
#{reFileName}, #{serverFileName},
#{filePath}, #{filePath},
#{fileType}, #{fileType},
#{fileSize}, #{fileSize},
@ -73,6 +73,8 @@
) )
</insert> </insert>
<!--
<select id="select" parameterType="java.util.HashMap" resultType="java.util.HashMap"> <select id="select" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT EXTRA_FILE_IDX, SELECT EXTRA_FILE_IDX,
EXTRA_FILE_ENCRYPTION, EXTRA_FILE_ENCRYPTION,

View File

@ -4,22 +4,103 @@
<%@ taglib uri='http://www.springframework.org/tags/form' prefix='form'%> <%@ taglib uri='http://www.springframework.org/tags/form' prefix='form'%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ page import="seed.utils.SeedProperties"%> <%@ page import="seed.utils.SeedProperties"%>
<%@ page import="seed.utils.SeedUtils"%> <%@ page import="seed.utils.SeedUtils"%>
<!-- 대용량 파일 업로드 솔루션 -->
<spring:eval expression="@property['Globals.Innorix.License']" var="license"/>
<script src="<c:url value='/js/kccadr/innorixCommon.js' />"></script>
<script src="<c:url value='/innorix/innorix_${license}.js' />"></script>
<link rel="stylesheet" href="<c:url value='/innorix/innorix.css'/>" type="text/css">
<%@ taglib prefix="un" uri="http://jakarta.apache.org/taglibs/unstandard-1.0"%> <%@ taglib prefix="un" uri="http://jakarta.apache.org/taglibs/unstandard-1.0"%>
<un:useConstants var="SeedConstants" className="seed.utils.SeedConstants"/> <un:useConstants var="SeedConstants" className="seed.utils.SeedConstants"/>
<script type="text/javascript"> <script type="text/javascript">
/* innorix-1
첨부파일 업로드 경로 전역 변수 선언
*/
var directory = "";
var divVar = "";
$(document).ready(function(){ $(document).ready(function(){
$(document).keydown(function(event) { $(document).keydown(function(event) {
if (event.keyCode === 13) { if (event.keyCode === 13) {
event.preventDefault(); event.preventDefault();
} }
}); });
/* innorix-2
첨부파일 업로드 경로 설정
fileFuncType와 세션의 siteId등의 정보를 이용해 업로드 경로 설정
*/
var fileFuncType = $("#fileFuncType").val();
var url = "<c:url value='/seed/innorix/getRealFileDirectoryAjax.do'/>"
getFileDirectory(fileFuncType, url, function(result){
directory = result;
}); });
/* innorix-3
이노릭스 업로드 컨트롤 생성
control 객체는 innorixCommon.js에서 생성
*/
control = innorix.create({
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
transferMode: 'both', // 업로드, 다운로드 혼합사용
agent : false,
installUrl: "<c:url value='/innorix/install/install.html'/>", // Agent 설치 페이지
uploadUrl: "<c:url value='/innorix/exam/seedUpload.jsp'/>", // 업로드 URL
allowExtension : ["txt","jpeg","jpg","png","gif","bmp","mp3","mp4","hwp","doc","docx","xls","xlsx","ppt","pptx","pdf","zip","alz"],
agent:false
});
/* innorix-5
이노릭스 업로드 완료 후
콜백 함수로 파일 정보 전달
*/
control.on('uploadComplete', function (p) {
console.log('uploadComplete : ', p);
fn_callBackInnorix(p.files); // 파일 정보 DB isnert function
});
});
/* innorix-4
이노릭스 업로드 시작
첨부파일이 있을 시 업로드 후 게시글 작성
첨부파일이 없을 시 바로 게시글 작성
*/
function innorixUpload(div){
/*담당자 유효성 검사*/
if($("#rceEmail").val() == ""){
alert("담당자 이메일을 입력 해 주세요");
doubleSubmitFlag = false;
$("#rceEmail").focus();
return false;
}
/*담당자 유효성 검사 END*/
divVar = div;
if(control.getUploadFiles().length > 0){
var postObj = new Object();
postObj.directory = directory;
control.setPostData(postObj);
control.upload(); // 업로드 시작 */
}else{
tempAppBtn_step(divVar)
}
}
/* innorix-6
게시글 등록 처리
첨부파일 정보 DB 등록 및 게시글 등록 처리
*/
function fn_callBackInnorix(data){
$("input[name='innorixFileListVO']").val(JSON.stringify(data));
tempAppBtn_step(divVar)
}
var doubleSubmitFlag = false; var doubleSubmitFlag = false;
//신규 우편번호 //신규 우편번호
@ -1291,9 +1372,16 @@
<tr> <tr>
<th>계약서 사본</th> <th>계약서 사본</th>
<td colspan="3"> <td colspan="3">
<!-- innorix 대용량 업로드 솔루션 -->
<div id="fileControl" class="w100per dragdrop_wrap"></div>
<input type="button" value="파일선택" class="btn btn_text btn_36 blue_border temp-file-button" onclick="control.openFileDialogSingle();"/>
<input type="hidden" id="fileFuncType" name="fileFuncType" value="mediation" />
<input type="hidden" name="innorixFileListVO" value="" />
<input type="hidden" id="copyContractYn" name="copyContractYn" value="Y" />
<input type="hidden" id="fileGubun" name="fileGubun" value="4801000000" />
<!-- 첨부파일 --> <!-- 첨부파일 -->
<!-- <label for="upFile" class="ex_filename mgl5i" id="47">첨부파일</label> --> <!-- <label for="upFile" class="ex_filename mgl5i" id="47">첨부파일</label> -->
<button class="btn btn_text btn_40 darkblue_border ex_filename mgl5i" id="47">파일선택</button> <%-- <button class="btn btn_text btn_40 darkblue_border ex_filename mgl5i" id="47">파일선택</button>
<ul class="upFileHtml" id="upFileHtml"> <ul class="upFileHtml" id="upFileHtml">
<c:forEach items="${caseFileList}" var="file" varStatus="status"> <c:forEach items="${caseFileList}" var="file" varStatus="status">
<c:if test="${file.COPY_CONTRACT_YN == 'Y' }"> <c:if test="${file.COPY_CONTRACT_YN == 'Y' }">
@ -1311,7 +1399,7 @@
<input type="hidden" name="fileFuncType" value="mediation" /> <input type="hidden" name="fileFuncType" value="mediation" />
<input type="hidden" name="fileGubun" id="fileGubun" value="" /> <input type="hidden" name="fileGubun" id="fileGubun" value="" />
<input type="hidden" name="uploadFileCnt" value="0" id="uploadFileCntId" /> <input type="hidden" name="uploadFileCnt" value="0" id="uploadFileCntId" />
<input type="hidden" name="deleteFileData" value="" id="deleteFileDataId" /> <input type="hidden" name="deleteFileData" value="" id="deleteFileDataId" /> --%>
<!-- 첨부파일 end--> <!-- 첨부파일 end-->
</td> </td>
</tr> </tr>
@ -1457,8 +1545,10 @@
<!-- //사건현황 --> <!-- //사건현황 -->
<div class="btn_wrap right"> <div class="btn_wrap right">
<button type="button" class="btn btn_text btn_45 darkgray_border" onclick="tempAppBtn_step('tmp');">임시저장</button> <!-- <button type="button" class="btn btn_text btn_45 darkgray_border" onclick="tempAppBtn_step('tmp');">임시저장</button>
<button type="button" class="btn btn_text btn_45 darkblue_fill" onclick="tempAppBtn_step('step4');">다음단계</button> <button type="button" class="btn btn_text btn_45 darkblue_fill" onclick="tempAppBtn_step('step4');">다음단계</button> -->
<button type="button" class="btn btn_text btn_45 darkgray_border" onclick="innorixUpload('tmp');">임시저장</button>
<button type="button" class="btn btn_text btn_45 darkblue_fill" onclick="innorixUpload('step4');">다음단계</button>
</div> </div>
<!-- //신청인 기입사항 --> <!-- //신청인 기입사항 -->
</form:form> </form:form>

View File

@ -4,19 +4,100 @@
<%@ taglib uri='http://www.springframework.org/tags/form' prefix='form'%> <%@ taglib uri='http://www.springframework.org/tags/form' prefix='form'%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ page import="seed.utils.SeedProperties"%> <%@ page import="seed.utils.SeedProperties"%>
<%@ page import="seed.utils.SeedUtils"%> <%@ page import="seed.utils.SeedUtils"%>
<%@ taglib prefix="un" uri="http://jakarta.apache.org/taglibs/unstandard-1.0"%> <%@ taglib prefix="un" uri="http://jakarta.apache.org/taglibs/unstandard-1.0"%>
<!-- 대용량 파일 업로드 솔루션 -->
<spring:eval expression="@property['Globals.Innorix.License']" var="license"/>
<script src="<c:url value='/js/kccadr/innorixCommon.js' />"></script>
<script src="<c:url value='/innorix/innorix_${license}.js' />"></script>
<link rel="stylesheet" href="<c:url value='/innorix/innorix.css'/>" type="text/css">
<un:useConstants var="SeedConstants" className="seed.utils.SeedConstants"/> <un:useConstants var="SeedConstants" className="seed.utils.SeedConstants"/>
<script type="text/javascript"> <script type="text/javascript">
/* innorix-1
첨부파일 업로드 경로 전역 변수 선언
*/
var directory = "";
var divVar = "";
$(document).ready(function(){ $(document).ready(function(){
/* innorix-2
첨부파일 업로드 경로 설정
fileFuncType와 세션의 siteId등의 정보를 이용해 업로드 경로 설정
*/
var fileFuncType = $("#fileFuncType").val();
var url = "<c:url value='/seed/innorix/getRealFileDirectoryAjax.do'/>"
getFileDirectory(fileFuncType, url, function(result){
directory = result;
});
/* innorix-3
이노릭스 업로드 컨트롤 생성
control 객체는 innorixCommon.js에서 생성
*/
control = innorix.create({
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
transferMode: 'both', // 업로드, 다운로드 혼합사용
agent : false,
installUrl: "<c:url value='/innorix/install/install.html'/>", // Agent 설치 페이지
uploadUrl: "<c:url value='/innorix/exam/seedUpload.jsp'/>", // 업로드 URL
allowExtension : ["txt","jpeg","jpg","png","gif","bmp","mp3","mp4","hwp","doc","docx","xls","xlsx","ppt","pptx","pdf","zip","alz"],
agent:false
});
/* innorix-5
이노릭스 업로드 완료 후
콜백 함수로 파일 정보 전달
*/
control.on('uploadComplete', function (p) {
console.log('uploadComplete : ', p);
fn_callBackInnorix(p.files); // 파일 정보 DB isnert function
});
}); });
var doubleSubmitFlag = false; var doubleSubmitFlag = false;
/* innorix-4
이노릭스 업로드 시작
첨부파일이 있을 시 업로드 후 게시글 작성
첨부파일이 없을 시 바로 게시글 작성
*/
function innorixUpload(div){
/*담당자 유효성 검사*/
if($("#rceEmail").val() == ""){
alert("담당자 이메일을 입력 해 주세요");
doubleSubmitFlag = false;
$("#rceEmail").focus();
return false;
}
/*담당자 유효성 검사 END*/
divVar = div;
if(control.getUploadFiles().length > 0){
var postObj = new Object();
postObj.directory = directory;
control.setPostData(postObj);
control.upload(); // 업로드 시작 */
}else{
tempAppBtn_step(divVar)
}
}
/* innorix-6
게시글 등록 처리
첨부파일 정보 DB 등록 및 게시글 등록 처리
*/
function fn_callBackInnorix(data){
$("input[name='innorixFileListVO']").val(JSON.stringify(data));
tempAppBtn_step(divVar)
}
//신규 우편번호 //신규 우편번호
function jusoCallBack(roadFullAddr,roadAddrPart1,addrDetail,roadAddrPart2,engAddr, jibunAddr, zipNo, admCd, rnMgtSn, bdMgtSn, command){ function jusoCallBack(roadFullAddr,roadAddrPart1,addrDetail,roadAddrPart2,engAddr, jibunAddr, zipNo, admCd, rnMgtSn, bdMgtSn, command){
var f = document.applyForm; var f = document.applyForm;
@ -1827,7 +1908,14 @@
<tr> <tr>
<th>증빙자료 첨부</th> <th>증빙자료 첨부</th>
<td> <td>
<div class="file_upload_wrap"> <!-- innorix 대용량 업로드 솔루션 -->
<div id="fileControl" class="w100per dragdrop_wrap"></div>
<input type="button" value="파일선택" class="btn btn_text btn_36 blue_border temp-file-button" onclick="control.openFileDialogSingle();"/>
<input type="hidden" id="fileFuncType" name="fileFuncType" value="mediation" />
<input type="hidden" name="innorixFileListVO" value="" />
<input type="hidden" id="copyContractYn" name="copyContractYn" value="N" />
<input type="hidden" id="fileGubun" name="fileGubun" value="4801000000" />
<%-- <div class="file_upload_wrap">
<div class="file_button"> <div class="file_button">
<input type="file" id="file" class="input_file"> <input type="file" id="file" class="input_file">
<label for="file" class="file btn btn_text btn_40 darkblue_border">파일선택</label> <label for="file" class="file btn btn_text btn_40 darkblue_border">파일선택</label>
@ -1835,7 +1923,7 @@
<ul class="file_list fill" style="display:none;"> <ul class="file_list fill" style="display:none;">
<li><a href="#none" download="download"><i class="icon file clip"></i><span class="file_name">분쟁조정신청 관련_필요한 첨부이미지_10310.png </span><span class="file_size">457kb</span></a> <button type="button" class="btn only_icon round"><i class="icon delete gray_fill"></i></button></li> <li><a href="#none" download="download"><i class="icon file clip"></i><span class="file_name">분쟁조정신청 관련_필요한 첨부이미지_10310.png </span><span class="file_size">457kb</span></a> <button type="button" class="btn only_icon round"><i class="icon delete gray_fill"></i></button></li>
</ul> </ul>
</div> </div> --%>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -2315,8 +2403,10 @@
<!-- //사건현황 --> <!-- //사건현황 -->
<div class="btn_wrap right"> <div class="btn_wrap right">
<button type="button" class="btn btn_text btn_45 darkgray_border" onclick="tempAppBtn_step('tmp');">임시저장</button> <!-- <button type="button" class="btn btn_text btn_45 darkgray_border" onclick="tempAppBtn_step('tmp');">임시저장</button>
<button type="button" class="btn btn_text btn_45 darkblue_fill" onclick="tempAppBtn_step('step5');">다음단계</button> <button type="button" class="btn btn_text btn_45 darkblue_fill" onclick="tempAppBtn_step('step5');">다음단계</button> -->
<button type="button" class="btn btn_text btn_45 darkgray_border" onclick="innorixUpload('tmp');">임시저장</button>
<button type="button" class="btn btn_text btn_45 darkblue_fill" onclick="innorixUpload('step4');">다음단계</button>
</div> </div>
<!-- //신청인 기입사항 --> <!-- //신청인 기입사항 -->
</form:form> </form:form>