refactor:신청원인예문관리 완료
This commit is contained in:
parent
369727ec79
commit
84178c28f6
@ -59,7 +59,7 @@ public class ExmpAppManageServiceImpl implements ExmpAppManageService {
|
||||
}
|
||||
|
||||
map.put("mgrInfo", mgrInfo);
|
||||
map.put("list", exmpAppManageDAO.selectExmpAppDetailList(exmpManageVO));
|
||||
// map.put("list", exmpAppManageDAO.selectExmpAppDetailList(exmpManageVO));
|
||||
|
||||
return map;
|
||||
}
|
||||
@ -112,13 +112,13 @@ public class ExmpAppManageServiceImpl implements ExmpAppManageService {
|
||||
|
||||
@Override
|
||||
public void updateExmpManager(ExmpManageVO exmpManageVO) {
|
||||
System.out.println(":::::::::::::::::");
|
||||
|
||||
exmpAppManageDAO.updateExmpManager(exmpManageVO);
|
||||
for(ExmpManageVO model : exmpManageVO.getExmpList()){
|
||||
model.setExmpMgrId(exmpManageVO.getExmpMgrId());
|
||||
model.setLastUpdusrId(exmpManageVO.getLastUpdusrId());
|
||||
exmpAppManageDAO.updateExmpAppDetails(model);
|
||||
}
|
||||
// for(ExmpManageVO model : exmpManageVO.getExmpList()){
|
||||
// model.setExmpMgrId(exmpManageVO.getExmpMgrId());
|
||||
// model.setLastUpdusrId(exmpManageVO.getLastUpdusrId());
|
||||
// exmpAppManageDAO.updateExmpAppDetails(model);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ public class ExmpAppManagerController {
|
||||
exmpAppManageVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
exmpAppManageVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
exmpAppManageVO.setCodeId("CC002");
|
||||
exmpAppManageVO.setCodeId("02");
|
||||
paginationInfo.setTotalRecordCount(exmpAppManageService.selectExmpAppManagerCount(exmpAppManageVO));
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
model.addAttribute("list", exmpAppManageService.selectExmpAppManagerList(exmpAppManageVO));
|
||||
@ -111,7 +111,7 @@ public class ExmpAppManagerController {
|
||||
|
||||
model.addAttribute("fileList", resultMap.get("fileList"));
|
||||
model.addAttribute("mgrInfo", resultMap.get("mgrInfo"));
|
||||
model.addAttribute("list", resultMap.get("list"));
|
||||
// model.addAttribute("list", resultMap.get("list"));
|
||||
return "kccadr/adjPgrMgr/exmp/app/exmpAppManagerModify";
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ public class ExmpAppManagerController {
|
||||
|
||||
model.addAttribute("fileList", resultMap.get("fileList"));
|
||||
model.addAttribute("mgrInfo", resultMap.get("mgrInfo"));
|
||||
model.addAttribute("list", resultMap.get("list"));
|
||||
// model.addAttribute("list", resultMap.get("list"));
|
||||
|
||||
return "kccadr/adjPgrMgr/exmp/app/exmpAppManagerDetail";
|
||||
}
|
||||
|
||||
@ -25,41 +25,18 @@
|
||||
|
||||
<select id="ExmpAppManageDAO.selectExmpManagerList" parameterClass="exmpManageVO" resultClass="exmpManageVO">
|
||||
SELECT
|
||||
T1.EXMP_MGR_ID AS exmpMgrId
|
||||
,T1.EXMP_CC_TY AS exmpCcTy
|
||||
,T1.EXMP_TIT AS exmpTit
|
||||
,T1.ATCH_FILE_ID AS atchFileId
|
||||
,T1.EXMP_NMS AS exmpNms
|
||||
,TO_CHAR(T1.FRST_REGIST_PNTTM,'YYYY-MM-DD') AS frstRegistPnttm
|
||||
,T1.FRST_REGISTER_ID AS frstRegisterId
|
||||
,T1.LAST_UPDT_PNTTM AS lastUpdtPnttm
|
||||
,T1.LAST_UPDUSR_ID AS lastUpdusrId
|
||||
,T1.CODE_ID AS codeId
|
||||
FROM (
|
||||
SELECT
|
||||
T1.EXMP_MGR_ID
|
||||
,T1.EXMP_CC_TY
|
||||
,T1.EXMP_TIT
|
||||
,T1.ATCH_FILE_ID
|
||||
,(
|
||||
SELECT
|
||||
CASE
|
||||
WHEN COUNT(*) <![CDATA[ <= ]]> 1 THEN GROUP_CONCAT(S2.CODE_NM SEPARATOR ',')
|
||||
ELSE S2.CODE_NM ||' 외'|| (COUNT(*)-1) || '건'
|
||||
END EXMP_NMS
|
||||
FROM ADR_EXMP_DTL S1 INNER JOIN LETTCCMMNDETAILCODE S2
|
||||
ON S1.EXMP_CD = S2.CODE AND CODE_ID = #codeId#
|
||||
WHERE 1=1
|
||||
AND S1.EXMP_CC_TY = T1.EXMP_CC_TY
|
||||
GROUP BY S1.EXMP_CC_TY
|
||||
) AS EXMP_NMS
|
||||
,T1.FRST_REGIST_PNTTM
|
||||
,T1.FRST_REGISTER_ID
|
||||
,T1.LAST_UPDT_PNTTM
|
||||
,T1.LAST_UPDUSR_ID
|
||||
,T1.CODE_ID
|
||||
EXMP_MGR_ID AS exmpMgrId
|
||||
, T1.EXMP_CD AS exmpCd
|
||||
, T1.EXMP_CC_TY AS exmpCcTy
|
||||
, T1.EXMP_TIT AS exmpTit
|
||||
, T1.EXMP_CN AS exmpCn
|
||||
, T1.ATCH_FILE_ID AS atchFileId
|
||||
, TO_CHAR(T1.FRST_REGIST_PNTTM, 'YYYY-MM-DD') AS frstRegistPnttm
|
||||
, T1.FRST_REGISTER_ID AS frstRegisterId
|
||||
, TO_CHAR(T1.LAST_UPDT_PNTTM, 'YYYY-MM-DD') AS lastUpdtPnttm
|
||||
, T1.LAST_UPDUSR_ID AS lastUpdusrId
|
||||
, T1.CODE_ID AS codeId
|
||||
FROM ADR_EXMP_MGR T1
|
||||
) T1
|
||||
WHERE T1.CODE_ID = #codeId#
|
||||
<isNotEmpty property="searchKeyword">
|
||||
<isEqual prepend="AND" property="searchCondition" compareValue="">
|
||||
@ -88,6 +65,7 @@
|
||||
ADR_EXMP_MGR
|
||||
SET
|
||||
EXMP_TIT = #exmpTit#
|
||||
, EXMP_CN = #exmpCn#
|
||||
, ATCH_FILE_ID = #atchFileId#
|
||||
, LAST_UPDT_PNTTM = NOW()
|
||||
, LAST_UPDUSR_ID = #lastUpdusrId#
|
||||
@ -156,8 +134,10 @@
|
||||
<select id="ExmpAppManageDAO.selectExmpManagerInfo" parameterClass="exmpManageVO" resultClass="exmpManageVO">
|
||||
SELECT
|
||||
EXMP_MGR_ID AS exmpMgrId
|
||||
, EXMP_CD AS exmpCd
|
||||
, EXMP_CC_TY AS exmpCcTy
|
||||
, EXMP_TIT AS exmpTit
|
||||
, EXMP_CN AS exmpCn
|
||||
, ATCH_FILE_ID AS atchFileId
|
||||
, FRST_REGIST_PNTTM AS frstRegistPnttm
|
||||
, FRST_REGISTER_ID AS frstRegisterId
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
%>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<title>예문관리</title>
|
||||
<title>신청원인예문관리</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript">
|
||||
$(document).ready( function() {
|
||||
@ -67,10 +67,6 @@
|
||||
}
|
||||
|
||||
function fncSave(){
|
||||
var exmpCcTy = "<c:out value='${mgrInfo.exmpCcTy}' />";
|
||||
if(exmpCcTy != ''){
|
||||
saveProcess();
|
||||
}else{
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/kccadr/adjPgrMgr/exmp/existsExmpManagerDataCheck.do",
|
||||
@ -92,7 +88,6 @@
|
||||
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function saveProcess(){
|
||||
if(!validation()){
|
||||
@ -214,7 +209,7 @@
|
||||
<div class="box">
|
||||
<!-- cont_tit -->
|
||||
<div class="cont_tit">
|
||||
<h2>신청서예문등록</h2>
|
||||
<h2>신청원인예문관리</h2>
|
||||
<ul class="cont_nav">
|
||||
<li class="home"><a href="/"><i></i></a></li>
|
||||
<li><p>조정진행관리</p></li>
|
||||
@ -304,31 +299,22 @@
|
||||
</div>
|
||||
<!-- //list_상세 -->
|
||||
<div class="tb_tit">
|
||||
<p>항목추가</p>
|
||||
<div class="btn_wrap">
|
||||
<button type="button" class="btn_plus" onclick="fncRowAdd(); return false;"><i></i></button>
|
||||
<button type="button" class="btn_minus" onclick="fncRowDel(); return false;"><i></i></button>
|
||||
</div>
|
||||
<p>신청원인</p>
|
||||
</div>
|
||||
<div class="list tbType01 addTb">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 27%">
|
||||
<col style="width: auto">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>항목</th>
|
||||
<th>예문내용</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<kc:select codeId="CC040" name="exmpList[0].exmpCd" id="test" defaultText="선택" defaultValue="" selectedValue="" css="style='width:200px; height:38px;'"/>
|
||||
</td>
|
||||
<td>
|
||||
<textarea name="exmpList[0].exmpCn" placeholder="예문을 입력해주세요." style="resize: none; width:96%; margin: 10px 0;"></textarea>
|
||||
<textarea name="exmpCn" placeholder="예문을 입력해주세요." style="resize: none; width:96%; margin: 10px 0;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -110,49 +110,25 @@
|
||||
</div>
|
||||
<!-- //list_상세 -->
|
||||
<div class="tb_tit">
|
||||
<p>항목추가</p>
|
||||
<%--<div class="btn_wrap">
|
||||
<button type="button" class="btn_plus" onclick="fncRowAdd(); return false;"><i></i></button>
|
||||
<button type="button" class="btn_minus" onclick="fncRowDel(); return false;"><i></i></button>
|
||||
</div>--%>
|
||||
<p><kc:code codeId="CC040" code="${mgrInfo.exmpCd}"/></p>
|
||||
</div>
|
||||
<div class="list tbType01 addTb">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 20%">
|
||||
<%-- <col style="width: 20%"> --%>
|
||||
<col style="width: auto">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>항목</th>
|
||||
<th>예문내용</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(list) eq 0}">
|
||||
<tr>
|
||||
<td>
|
||||
<kc:select codeId="CC040" name="exmpList[0].exmpCd" id="test" defaultText="선택" defaultValue="" selectedValue="" css="style='width:200px; height:38px;'"/>
|
||||
</td>
|
||||
<td>
|
||||
<textarea name="exmpList[0].exmpCn" placeholder="예문을 입력해주세요." style="resize: none; width:96%; margin: 10px 0;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:forEach var="list" items="${list}" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<kc:code codeId="CC040" code="${list.exmpCd}"/>
|
||||
</td>
|
||||
<td style="text-align: left; line-height: 30px; padding: 10px;">
|
||||
<c:out value="${fn:replace(list.exmpCn, crlf , '<br/>')}" escapeXml="false" />
|
||||
<c:out value="${fn:replace(mgrInfo.exmpCn, crlf , '<br/>')}" escapeXml="false" />
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -123,7 +123,6 @@
|
||||
<col style="width: 10%">
|
||||
<col style="width: 10%">
|
||||
<col style="width: auto">
|
||||
<col style="width: 25%">
|
||||
<col style="width: 10%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
@ -131,7 +130,6 @@
|
||||
<th>번호</th>
|
||||
<th>저작물</th>
|
||||
<th>제목</th>
|
||||
<th>항목</th>
|
||||
<th>등록일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -147,14 +145,11 @@
|
||||
</c:if>
|
||||
</td>
|
||||
<td>
|
||||
<kc:code codeId="${list.codeId}" code="${list.exmpCcTy}"/>
|
||||
<kc:code codeId="CC002" code="${list.exmpCcTy}"/>
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" onclick="fncDetailPage('${list.exmpMgrId}');"><c:out value="${list.exmpTit}"/></a>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${list.exmpNms}"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${list.frstRegistPnttm}"/>
|
||||
</td>
|
||||
|
||||
@ -111,7 +111,7 @@
|
||||
cache: false,
|
||||
success:function(returnData){
|
||||
if(returnData.result == "SUCCESS"){
|
||||
alert("정상적으로 등록되었습니다.");
|
||||
alert("정상적으로 수정되었습니다.");
|
||||
fncDetail();
|
||||
}
|
||||
},
|
||||
@ -147,12 +147,12 @@
|
||||
var textLen = conByteLeng(cn); //예문 입력 내용 Byte 계산 처리
|
||||
|
||||
if(cd == ''){
|
||||
alert("항목을 선택해주세요.["+(idx+1)+"]");
|
||||
alert("항목을 선택해주세요.");
|
||||
return flag = false;
|
||||
}
|
||||
|
||||
if(cn == ''){
|
||||
alert("예문내용을 입력해주세요.["+(idx+1)+"]");
|
||||
alert("예문내용을 입력해주세요.");
|
||||
return flag = false;
|
||||
}
|
||||
|
||||
@ -323,35 +323,28 @@
|
||||
<!-- //list_상세 -->
|
||||
<div class="tb_tit">
|
||||
<p>항목추가</p>
|
||||
<div class="btn_wrap">
|
||||
<button type="button" class="btn_plus" onclick="fncRowAdd(); return false;"><i></i></button>
|
||||
<button type="button" class="btn_minus" onclick="fncRowDel(); return false;"><i></i></button>
|
||||
</div>
|
||||
<!-- <div class="btn_wrap"> -->
|
||||
<!-- <button type="button" class="btn_plus" onclick="fncRowAdd(); return false;"><i></i></button> -->
|
||||
<!-- <button type="button" class="btn_minus" onclick="fncRowDel(); return false;"><i></i></button> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div class="list tbType01 addTb">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 27%">
|
||||
<col style="width: auto">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>항목</th>
|
||||
<th>예문내용</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach var="list" items="${list}" varStatus="status">
|
||||
<tr>
|
||||
<input type="hidden" name="exmpList[${status.index}].exmpDtlId" value="<c:out value='${list.exmpDtlId}' />">
|
||||
<td>
|
||||
<kc:select codeId="CC040" name="exmpList[${status.index}].exmpCd" defaultText="선택" defaultValue="" selectedValue="${list.exmpCd}" css="style='width:200px; height:38px;'"/>
|
||||
</td>
|
||||
<td>
|
||||
<textarea name="exmpList[<c:out value='${status.index}' />].exmpCn" placeholder="예문을 입력해주세요." style="resize: none; width:96%; margin: 10px 0;"><c:out value='${list.exmpCn}' /></textarea>
|
||||
<td style="text-align: left; line-height: 30px; padding: 10px;">
|
||||
<textarea name="exmpCn" placeholder="예문을 입력해주세요." style="resize: none; height: 250px; width:96%; margin: 10px 0;"><c:out value='${mgrInfo.exmpCn}' /></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- btn_wrap -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user