You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

887 lines
52 KiB

<%
/***********************************************************
* @@ Program Name : doc_list.jsp
* @@ Description : /집계자/내문서함/진행함/문서 목록
* @@ Author : 기현테크
* @@ Create Date : 2010.11.18
* @@ History : 2014.09.30 Update by KWON,HAN : 페이징 처리하여 페이지별로 불러오도록 쿼리 수정
* @@*******************************************************
*/
%>
<%@ page contentType="text/html; charset=utf-8"
import="java.net.URLEncoder"
import="java.net.URLDecoder"
import="java.util.List"
import="java.util.Map"
import="java.util.HashMap"
import="java.util.Date"
import="java.util.Calendar"
import="java.text.SimpleDateFormat"
import="javax.jdo.PersistenceManager"
import="javax.jdo.Transaction"
import="kr.co.kihyun.beans.user.HttpSSOLogin"
import="kr.co.kihyun.lang.Encoder"
import="kr.co.kihyun.lang.MInteger"
import="kr.co.kihyun.lang.MString"
import="kr.co.kihyun.moumi.MoumiConfig"
import="kr.co.kihyun.moumi.Moumi"
import="kr.co.kihyun.beans.entity.util.*"
import="org.slf4j.Logger"
import="org.slf4j.LoggerFactory"
import="kr.co.kihyun.service.TotDocService"
import="kr.co.kihyun.service.vo.TotDocVO"%>
<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%>
<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager());
Transaction tx = pm.currentTransaction();
try {
Logger LOG = LoggerFactory.getLogger(this.getClass());
/**
* ******** session내의 userId *********
*/
String usID = HttpSSOLogin.getLoginID(request);
String dpID = HttpSSOLogin.getDeptID(request);
int sysAuth = HttpSSOLogin.getSysAuth(request);
/**
* **** Parameter *****
*/
String docType = clearXSS(request.getParameter("docType"), null);
int strPage = MInteger.parseInt(request.getParameter("strPage"), 1);
if(strPage <= 0) { strPage = 1; }
String findOption = clearXSS(request.getParameter("findOption"), "");
String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")), "");
// String method = clearXSS(request.getParameter("method"), "");
//
// if (method.equals("GET")) {
// findWord = URLDecoder.decode(MString.checkNull(request.getParameter("findWord")), "UTF-8");
// }
// String uri = URLEncoder.encode("doc_list.jsp?docType=" + MString.checkNull(docType) + "&findOption=" + MString.checkNull(findOption), "UTF-8") + "&method=GET";
String stDate = clearXSS(request.getParameter("stDate"),"");
String edDate = clearXSS(request.getParameter("edDate"),"");
SimpleDateFormat dForomat = new SimpleDateFormat("yyyy-MM-dd");
Calendar date = Calendar.getInstance();
date.add(Calendar.MONTH, -12);
Long prev_date = date.getTimeInMillis();
Long now_today = new Date().getTime();
if("".equals(stDate)) {
stDate = dForomat.format(prev_date);
}
if("".equals(edDate)) {
edDate = dForomat.format(now_today);
}
int wordLengthLimit = 30;
/************ 리스트 페이지 구성 ************/
int pageSize = 0;
int currentPage = 0;
int currentPageSetUp = 0;
int recordSize = 15;
currentPage = strPage;
currentPageSetUp = (int) (currentPage / 10) * 10;
if (currentPage % 10 == 0) {
currentPageSetUp -= 10;
}
tx.begin();
if (!"PRSS".equals(docType) && !"REG".equals(docType) && !"END".equals(docType)) {
LOG.error("docType is not specified.");
}
//======================================================================
TotDocService docService = new TotDocService(pm);
//검색조건파라미터
Map params = new HashMap();
params.put("userId", usID);
params.put("deptId", dpID);
params.put("findOption", findOption);
params.put("filterValue", findWord);
if("END".equals(docType)) {
if(sysAuth == Moumi.SYSADM || sysAuth == Moumi.SUB_SYSADM) {
params.put("stDate", stDate);
params.put("edDate", edDate);
}
}
//검색메인쿼리와 레코드갯수조회쿼리를 생성 후 멤버변수로 저장
docService.createDocListSearchQuery(params, docType);
//레코드갯수조회쿼리를 실행하여 레코드갯수를 구함
int count = docService.getCountFromMainQuery();
if((count%recordSize) == 0){
pageSize = (int)(count/recordSize);
}else{
pageSize = (int)(count/recordSize)+1;
}
if( currentPage > pageSize ) currentPage = pageSize;
int startNo = (currentPage - 1) * recordSize + 1;
int endNo = currentPage * recordSize;
List list = null;
//검색목록조회쿼리 실행
if( count > 0 ) {
//페이징처리를 위한 추가파라미터 설정
docService.getParams().put("startNo", startNo);
docService.getParams().put("endNo", endNo);
//검색메인쿼리를 페이징처리를 위한 쿼리로 변환
docService.convertToPagenatingQuery();
//만족하는 레코드가 존재하면 조회
list = docService.executeQuery(TotDocVO.class);
}
//======================================================================
tx.rollback();
%>
<HTML>
<HEAD>
<TITLE><%=Moumi.getTitle()%></TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<link rel="stylesheet" href="/totsys/common/css/text.css" type="text/css">
<link rel="stylesheet" href="/totsys/common/css/kecttep.css" type="text/css">
<link rel="stylesheet" href="/totsys/common/css/SquareButtons.css" type="text/css">
<script src="/totsys/common/js/rollover.js"></script>
<script src="/totsys/common/js/popup.js"></script>
<script src="/totsys/common/js/find.js"></script>
<script src="/totsys/common/js/util.js"></script>
<script src="/totsys/common/js/calendar.js"></script>
<script src="/totsys/common/js/mouse.js"></script>
<script type="text/javascript" src="/test/jquery-1.6.4.js"></script>
<script>
// function leftAnc() {
// for (var i = 1; i <= 6; i++) {
// top.frames['left'].document.all["link" + i].style.fontWeight = "";
// }
// top.frames['left'].link2.style.fontWeight = "bold";
// }
//
// function leftIncReload() {
// top.left.incFrame.location.reload();
// }
//
// function selectAll() {
// var obj = document.getElementsByName("check");
// for (var i = 0; i < obj.length; i++) {
// obj[i].checked = true;
// }
// }
//
// function cancelAll() {
// var obj = document.getElementsByName("check");
// for (var i = 0; i < obj.length; i++) {
// obj[i].checked = false;
// }
// }
/**
* 시작일과 종료일의 정합성 체크 함수
* @param {type} stDate
* @param {type} edDate
* @returns {Boolean}
*/
function isDateTrue(stDate, edDate) {
if(stDate <= edDate) {
return true;
}
return false;
}
/*
* 검색조건폼에 대한 submit처리함수
* @param {type} p_findForm
* @returns {Boolean}
*/
function fn_onFindSubmit(p_findForm) {
<% if(!"END".equals(docType)) { %>
if( !findCheck(p_findForm) ) return false;
<% } %>
<% if("END".equals(docType)) { %>
if( !isDateTrue(document.searchForm.stDate.value, document.searchForm.edDate.value) ) {
alert("<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.startEndDateCheck") %>");
document.searchForm.edDate.focus();
document.searchForm.edDate.select();
return false;
}
<% } %>
p_findForm.strPage.value = 1;
return true;
}
/**
* 페이지이동처리함수
* @param {type} p_secu_yn
* @returns {undefined}
*/
function fn_goToPage(p_page) {
document.searchForm.strPage.value = p_page;
document.searchForm.submit();
}
/*
* 현재페이지의 검색조건을 갖고 Relead하는 함수
*/
function fn_reload() {
document.searchForm.submit();
}
//부서공유지정(1), 부서공유취소(0)
function openDocument(v) {
var checkValue = 0;
var docIDList = "";
//var userIDList = "";
var gubun = v;
if (<%=count%> == 1 || <%=count%> == <%=((currentPage - 1) * recordSize) + 1%>) {
if (check.checked == true) {
if (docIDList.length == 0) {
if (typeof (checkDocID0) == 'undefined') {
docIDList += document.getElementById("checkDocID<%=((currentPage - 1) * recordSize)%>").value;
} else {
docIDList += document.getElementById("checkDocID0").value;
}
} else {
if (typeof (checkDocID0) == 'undefined') {
docIDList += "," + document.getElementById("checkDocID<%=((currentPage - 1) * recordSize)%>").value;
} else {
docIDList += "," + document.getElementById("checkDocID0").value;
}
}
checkValue++;
}
} else if (<%=count%> != 0) {
tmp1 = eval(<%=((currentPage - 1) * recordSize)%>);
tmp2 = eval(<%=((currentPage - 1) * recordSize)%> + check.length);
tmp3 = 0;
for (i = tmp1; i < tmp2; i++) {
if (check[tmp3].checked == true) {
if (checkValue == 0) {
checkValue++;
//if(docIDList.length == 0 && userIDList.length == 0)
if (docIDList.length == 0)
docIDList += document.getElementById("checkDocID" + i).value;
else
docIDList += "," + document.getElementById("checkDocID" + i).value;
//userIDList +=","+ document.getElementById("userID"+i).value;
} else {
checkValue++;
if (docIDList.length == 0)
docIDList += document.getElementById("checkDocID" + i).value;
else
docIDList += "," + document.getElementById("checkDocID" + i).value;
//userIDList += ","+document.getElementById("userID"+i).value;
}
}
tmp3++;
}
}
var v_message = "";
if( gubun == 1 ) {
v_message = "<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.approSet") %>"; //부서공유
} else {
v_message = "<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.approCancel") %>"; //부서공유취소
}
if( checkValue <= 0 ) {
alert(v_message + "<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.docSelect") %>") //하실 자료를 선택해주세요.
return;
}
if (confirm(checkValue + " <%= Moumi.getMessageBundle().getString("moumi.message.popup.docCounter")%>\n\n " + v_message + "를 실행 하시겠습니까?")) { //개의 자료를 선택하였습니다.
document.approOpen.reportID.value = docIDList;
//document.approOpen.userID.value = userIDList;
document.approOpen.strGubun.value = gubun;
document.approOpen.submit();
}
}
//서식삭제 버튼
function docDelete() {
var checkValue = 0;
var docIDList = "";
if (<%=count%> == 1 || <%=count%> == <%=((currentPage - 1) * recordSize) + 1%>) {
if (check.checked == true) {
if (docIDList.length == 0) {
if (typeof (checkDocID0) == 'undefined') {
docIDList += document.getElementById("checkDocID<%=((currentPage - 1) * recordSize)%>").value;
} else {
docIDList += document.getElementById("checkDocID0").value;
}
} else {
if (typeof (checkDocID0) == 'undefined') {
docIDList += "," + document.getElementById("checkDocID<%=((currentPage - 1) * recordSize)%>").value;
} else {
docIDList += "," + document.getElementById("checkDocID0").value;
}
}
checkValue++;
}
} else if (<%=count%> != 0) {
tmp1 = eval(<%=((currentPage - 1) * recordSize)%>);
tmp2 = eval(<%=((currentPage - 1) * recordSize)%> + check.length);
tmp3 = 0;
for (i = tmp1; i < tmp2; i++) {
if (check[tmp3].checked == true) {
if (checkValue == 0) {
checkValue++;
if (docIDList.length == 0)
docIDList += document.getElementById("checkDocID" + i).value;
else
docIDList += "," + document.getElementById("checkDocID" + i).value;
} else {
checkValue++;
if (docIDList.length == 0)
docIDList += document.getElementById("checkDocID" + i).value;
else
docIDList += "," + document.getElementById("checkDocID" + i).value;
}
}
tmp3++;
}
}
if (checkValue > 0) {
if (confirm(checkValue + " <%= Moumi.getMessageBundle().getString("moumi.message.popup.docCounter")%>\n\n<%=Moumi.getMessageBundle().getString("moumi.message.popup.docDelete")%>")) {
document.Del.docID.value = docIDList;
document.Del.submit();
}
} else {
alert("<%= Moumi.getMessageBundle().getString("moumi.message.popup.docDeleteSelect")%>");
}
}
/*
* 2014.08.28 Add by KWON,HAN : 사용자공유
*/
function userShareSelect(sGubun, sReportID) {
var $checked;
var v_checkedCount;
var reportID = new Array();
if (sGubun === "check") {
$checked = $("input:checkbox[name=check]:checked");
v_checkedCount = $checked.length;
if (v_checkedCount === 0) {
alert('<%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.user")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.share")%>' + ' ' + '<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.docSelect")%>');
return;
}
var val = '';
var usersharecount = 0;
for (var i = 0; i < v_checkedCount; i++) {
val = $checked[i].value;
usersharecount = document.getElementById("su" + val).value;
if (usersharecount > 0) {
//명의 사용자에게 공유되어 있습니다.
alert("이미 " + usersharecount + '<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.userShareCounter") %>' + "\n\n사용자 공유란의 공유된 사용자수를 클릭하여 수정하십시요. " );
return;
}
}
$checked.each(function() {
reportID.push($(this).val());
});
} else if (sGubun === "select") {
reportID = sReportID;
} else {
//[정상적인 접근방법으로 처리해주십시요]!
alert('<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.normalHandle")%>');
return;
}
var urlname = "";
var height = screen.height;
var width = screen.width;
var leftpos = width / 2 - 350;
var toppos = height / 2 - 350;
//docReportType:문서 구분(D:집계문서, R:제출문서)
urlname = "/totsys/common/web/report_dept/popup_user_share_select.jsp?docID=" + reportID + "&docReportType=D&userYN=Y&selfDeptYn=N&exeFlag=list";
post = window.open(urlname, "post", "width=900, height=600, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=" + leftpos + ",top=" + toppos);
post.focus();
}
function changeDam() {
nnn = $("input:checkbox[name=check]:checked").length;
if (nnn == 0) {
alert("선택을하신후 담당변경 버튼을 클릭하세요.");
return;
}
var res = new Array();
$("input:checkbox[name=check]:checked").each(function() {
res.push($(this).val());
});
var height = screen.height;
var width = screen.width;
var leftpos = width / 2 - 350;
var toppos = height / 2 - 350;
frm = document.damdangForm;
frm.docID.value = res;
//2014.09.15 Update by KWON,HAN : 담당변경의 멀티선택 처리가 가능하도록 변경함.
//frm.action="/totsys/repoper/mydocbox/returnbox/popup_rep_transfer4.jsp";
frm.action = "/totsys/repoper/mydocbox/returnbox/popup_rep_transfer6.jsp";
frm.target = 'damdangForm';
frm.method = 'post';
//2014.09.15 Update by KWON,HAN
//win= window.open('',"damdangForm","width=607, height=541, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=" + leftpos + ",top=" + toppos);
win = window.open('', "damdangForm", "width=572, height=680, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=" + leftpos + ",top=" + toppos);
win.focus();
frm.submit();
}
/**
*체크박스 전체선택 해제 스크립트 추가
**/
function checkALL(checkYn) {
frm = document.approOpen;
var checklist = document.getElementsByName("check");
if (checklist.length > 0) {
for (var i = 0; i < checklist.length; i++) {
checklist[i].checked = checkYn;
}
}
}
/*
* 상세보기페이지로 이동처리하는 함수
* @param {type} p_docID
* @param {type} p_deptID
* @returns {undefined}
*/
function fn_goToViewReport(p_docID, p_deptID) {
document.viewFormReport.docID.value = p_docID;
document.viewFormReport.deptID.value = p_deptID;
document.viewFormReport.submit();
}
function fn_goToViewTotal(p_docID, p_deptID) {
document.viewFormTotal.docID.value = p_docID;
document.viewFormTotal.deptID.value = p_deptID;
document.viewFormTotal.submit();
}
//calendar.js 에서 날짜를 선택하면 실행되는 콜백함수
function fn_CalSetValue(obj, value) {
if( !isDateTrue(document.searchForm.stDate.value, document.searchForm.edDate.value) ) {
alert("<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.startEndDateCheck") %>");
document.searchForm.edDate.focus();
document.searchForm.edDate.select();
return false;
}
fn_onFindSubmit(document.searchForm);
document.searchForm.submit();
}
</script>
</HEAD>
<body style='' BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
<form name="viewFormReport" method="post" action="./reports/report_list.jsp">
<input type="hidden" name="docID" value="">
<input type="hidden" name="deptID" value="">
<input type="hidden" name="docType" value="<%= docType %>">
<input type="hidden" name="strPage" value="<%= strPage %>">
<input type="hidden" name="findOption" value="<%=MString.checkNull(findOption)%>">
<input type="hidden" name="findWord" value="<%=MString.checkNull(findWord)%>">
<input type="hidden" name="stDate" value="<%=stDate%>">
<input type="hidden" name="edDate" value="<%=edDate%>">
</form>
<form name="viewFormTotal" method="post" action="./tot_reports/total_reports.jsp">
<input type="hidden" name="docID" value="">
<input type="hidden" name="deptID" value="">
<input type="hidden" name="docType" value="<%= docType %>">
<input type="hidden" name="strPage" value="<%= strPage %>">
<input type="hidden" name="findOption" value="<%=MString.checkNull(findOption)%>">
<input type="hidden" name="findWord" value="<%=MString.checkNull(findWord)%>">
<input type="hidden" name="stDate" value="<%=stDate%>">
<input type="hidden" name="edDate" value="<%=edDate%>">
</form>
<form name="damdangForm" method="post" >
<input type="hidden" name="reportID" value="">
<input type="hidden" name="docID" value="">
<input type="hidden" name="boxName" value="returnbox">
<input type="hidden" name="hideUser" value="false">
<input type="hidden" name="docReportType" value="D">
<input type="hidden" name="exeFlag" value="list">
<input type="hidden" name="docType" value="<%=docType%>">
<input type="hidden" name="strPage" value="<%= currentPage %>">
<input type="hidden" name="findOption" value="<%=MString.checkNull(findOption)%>">
<input type="hidden" name="findWord" value="<%=MString.checkNull(findWord)%>">
</form>
<FORM name="approOpen" action="/servlet/kr.co.kihyun.beans.user.HttpApproSet" method="post">
<input type="hidden" name="reportID" value="">
<input type="hidden" name="docType" value="<%=docType%>">
<input type="hidden" name="userID">
<input type="hidden" name="strGubun">
<input type="hidden" name="strPage" value="<%= currentPage %>">
<input type="hidden" name="findOption" value="<%=MString.checkNull(findOption)%>">
<input type="hidden" name="findWord" value="<%=MString.checkNull(findWord)%>">
</FORM>
<table width="100%" height="70" border="0" cellpadding="0" cellspacing="0">
<jsp:include page="/totsys/common/inc/totper/top/top.jsp" flush="true" />
<tr>
<td nowrap width="0"></td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<jsp:include page="/totsys/common/inc/title/title.jsp" flush="true" />
<!-- // Begin : 검색 & 버튼영역 -->
<tr class="toolbar">
<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<!----// 검색 시작 ---->
<td valign="top">
<form name="searchForm" method="post" action="./doc_list.jsp" onsubmit="return fn_onFindSubmit(this);" style="margin: 0px">
<% if ("END".equals(docType)) { %>
<%if(sysAuth == Moumi.SYSADM || sysAuth == Moumi.SUB_SYSADM){%>
<span style="width: 640px;">
<% } else { %>
<span style="width: 340px;">
<% } %>
<% } else { %>
<span style="width: 340px;">
<% } %>
<input type="hidden" name="strPage" value="<%= currentPage %>">
<input type="hidden" name="accAuth">
<select name="findOption" class="inputtxt" onchange="showMSG(this.options[this.selectedIndex].value, msg)">
<option value="name"<%= "name".equals(findOption) ? " selected" : ""%>><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.doc")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.name")%></option>
<option value="executionCode"<%= "executionCode".equals(findOption) ? " selected" : ""%>><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.executionCode")%></option>
<option value="totDoc.mUser.name"<%= "totDoc.mUser.name".equals(findOption) ? " selected" : ""%>>요청자</option>
</select>
<input name="findWord" value="<%=MString.checkNull(findWord)%>" type="text" class="inputtxt" size="30" maxlength="30" style="ime-mode: active;" />
<input name="docType" value="<%=MString.checkNull(docType)%>" type="hidden" />
<input type="image" src="/totsys/common/images/bt_search_inquiry2.gif" border="0" align="middle" style="margin: 0px 0px 0px 0px" />
<% if ("END".equals(docType)) { %>
<%if(sysAuth == Moumi.SYSADM || sysAuth == Moumi.SUB_SYSADM){%>
&nbsp;&nbsp;
<label for="" style="vertical-align: middle;">
<strong>시작일</strong>
</label>
&nbsp;
<!--// 검색 시작일 -->
<input name="stDate" type="text" size="10" value="<%=stDate%>" onclick="showSetWin('searchForm.stDate');" style="cursor: pointer; vertical-align: middle;" class="inputtxt">
<a href="#" onclick="showSetWin('searchForm.stDate');">
<img src="/totsys/common/images/date.gif" align="middle">
</a><!-- 검색 시작일 //-->
~
<!--// 검색 종료일 -->
<input name="edDate" type="text" size="10" value="<%=edDate%>" readonly onclick="showSetWin('searchForm.edDate');" style="cursor: pointer; vertical-align: middle;" class="inputtxt">
<a href="#" onclick="showSetWin('searchForm.edDate');">
<img src="/totsys/common/images/date.gif" align="middle">
</a><!-- 검색 종료일 //-->
<% } %>
<% } %>
</span>
</form>
</td><!---- 검색 끝 //---->
<td>
<span id="msg" class="kecttep_date_search" style='display: none; width: 210px'>&nbsp;&nbsp;&nbsp;<%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.daySearchForm")%></span>
</td>
<%
if (!"PRSS".equals(docType)) {
%>
<td class="kecttep_button_td" align="right" valign="top" width="*">
<!-- 부서공유지정 -->
<!-- <a href="javascript:openDocument(1);">
<img src="/totsys/common/images/bt_deptselect.jpg" alt="<%=Moumi.getMessageBundle().getString("moumi.message.tot_report.approSet")%>" />
</a>-->
<!-- 부서공유취소 -->
<!--a href="javascript:openDocument(0);">
<img src="/totsys/common/images/bt_deptcancel.jpg" alt="<%=Moumi.getMessageBundle().getString("moumi.message.tot_report.approCancel")%>" />
</a-->
<%
// 종료자료인 경우
if (docType.equals("END")) {
%>
<!-- 2014.08.28 Add by KWON,HAN : 사용자공유 -->
<a href="javascript:userShareSelect('check','');" >
<img src="/totsys/common/images/bt_user_share.jpg" alt='<%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.user")%><%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.share")%>' />
</a>
<!-- --------------------------- -->
<!-- 담당변경 -->
<a href="javascript:changeDam();" >
<img src="/totsys/common/images/bt_damdang.gif" alt="<%=Moumi.getMessageBundle().getString("moumi.message.button.trans")%>" />
</a>
<%
}
%>
<!-- 서식삭제 -->
<a href="javascript:docDelete();">
<img src="/totsys/common/images/bt_formdel.gif" alt="<%=Moumi.getMessageBundle().getString("moumi.message.button_small.formRemove")%>" />
</a>
</td>
<%
}
%>
</tr>
</table>
</td>
</tr><!-- // End : 검색 & 버튼영역 -->
<tr>
<td height="31" valign="top"><!---- 내용 ---->
<table border="1px" class="kecttep_list_table" width="100%" padding="0" cellspacing="0">
<tr valign="middle" style="padding-top: 3">
<%if (!"PRSS".equals(docType)) {%>
<td align="center" nowrap class="kecttep_tdmenu" width="35">
<input type="checkbox" name="check0" onclick="javascript:checkALL(this.checked)"/>
</td>
<%}%>
<td width="60" align="center" nowrap class="kecttep_tdmenu" nowrap><%=Moumi.getMessageBundle().getString("moumi.message.tot_report.section")%></td>
<td width="*" align="center" nowrap class="kecttep_tdmenu"><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.doc")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.name")%></td>
<td width="110" align="center" nowrap class="kecttep_tdmenu"><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.request")%><%=Moumi.getMessageBundle().getString("moumi.message.totsys.sysadm.part.part_list_jsp")%></td>
<td width="97" align="center" nowrap class="kecttep_tdmenu"><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.request")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.person")%></td>
<td width="100" align="center" nowrap class="kecttep_tdmenu"><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.startDate")%></td>
<td width="135" align="center" nowrap class="kecttep_tdmenu"><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.endDate")%></td>
<td width="125" align="center" nowrap class="kecttep_tdmenu"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.compSnd")%>/<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.all")%>(<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.noteRecall")%>)</td>
<td width="100" align="center" nowrap class="kecttep_tdmenu" nowrap><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.remark")%></td>
<!-- 2014.08.29 Add by KWON,HAN -->
<td width="70" align="center" nowrap class="kecttep_last_tdmenu">
<%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.user")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.share")%>
</td>
</tr>
<%
int index = 0; //배열에서 값을 꺼내오는 키값
int nextCount = 0; //
if (currentPage > 1) {
nextCount = ((currentPage - 1) * recordSize);
}
if( count > 0 ) {
int listCount = list.size();
for(int i = 0; i < listCount; i++){
index = nextCount + i;
TotDocVO docVO = (TotDocVO)list.get(i);
%>
<tr style="padding-top: 3" valign="middle">
<%
if (!"PRSS".equals(docType)) {
%>
<td nowrap class="kecttep_graytd" height="25" align="center" width="35">
<input type="checkbox" name="check" id="checkBox" value=<%=docVO.getId()%> <%if (docVO.getUserId() != null && !docVO.getUserId().equals(usID) && sysAuth == Moumi.TOTPER) {%>disabled<%}%> />
<input type="hidden" name="checkDocID<%=index%>" value="<%=docVO.getId()%>" />
<input type="hidden" id="su<%=docVO.getId()%>" name="shareUserCount<%=index%>" value="<%=docVO.getShareUserCount()%>">
</td>
<%
}
%>
<!-- 구분 -->
<td width="60" align="center" class="kecttep_graytd" nowrap>
<%
if (docVO.isRegularDoc() && docVO.isDocCollection()) {%>
<img src="/totsys/common/images/type_repeat.png" border="0" align="absmiddle" /> <!-- 정기/취합 -->
<%} else if (docVO.isRegularDoc() && !docVO.isDocCollection()) { %>
<img src="/totsys/common/images/type_repeat.png" border="0" align="absmiddle" /> <!-- 정기/파일 -->
<%} else if (docVO.isDocCollection()) { %>
<img src="/totsys/common/images/type_tot.png" border="0" align="absmiddle" /> <!-- 수시/취합 -->
<%} else if (!docVO.isDocCollection()) { %>
<img src="/totsys/common/images/type_file.png" border="0" align="absmiddle" /> <!-- 수시/파일 -->
<%}%>
</td>
<!-- 자료명 -->
<td width="*" id="div_name" nowrap class="kecttep_graytd">
<%
if ("PRSS".equals(docType)) {
%>
&nbsp;&nbsp;<a onmouseover="balloon_on('<%= docVO.getName()%>', this, 10, 4)" onmouseout="balloon_off()"
<%-- href="./reports/report_list.jsp?docID=<%= docVO.getId()%>&deptID=<%=docVO.getDeptId()%>&docType=<%=docType%>&strPage=<%=strPage%>&findOption=<%=findOption%>&findWord=<%=URLEncoder.encode(MString.checkNull(findWord), "UTF-8")%>&reportID=<%=docVO.getId()%>"><%= MString.getEllipsis(docVO.getName(), wordLengthLimit)%></a>--%>
href="javascript:fn_goToViewReport('<%=docVO.getId()%>', '<%=docVO.getDeptId()%>');">
<%= MString.getEllipsis(docVO.getName(), wordLengthLimit)%></a>
<%
} else {
%>
&nbsp;&nbsp;<a onmouseover="balloon_on('<%= docVO.getName()%>', this, 10, 4)" onmouseout="balloon_off()"
<%-- href="./tot_reports/total_reports.jsp?docID=<%= docVO.getId()%>&deptID=<%=docVO.getDeptId()%>&docType=<%=docType%>&strPage=<%=strPage%>&findOption=<%=findOption%>&findWord=<%=URLEncoder.encode(MString.checkNull(findWord), "UTF-8")%>&reportID=<%=docVO.getId()%>"><%= MString.getEllipsis(docVO.getName(), wordLengthLimit)%></a>--%>
href="javascript:fn_goToViewTotal('<%=docVO.getId()%>', '<%=docVO.getDeptId()%>');">
<%= MString.getEllipsis(docVO.getName(), wordLengthLimit)%></a>
<%
}
%>
</td>
<!-- 요청기관 -->
<td width="110" align="center" nowrap class="kecttep_graytd"><%= MString.checkNull(docVO.getDeptName())%>&nbsp;</td>
<!-- 요청자 -->
<td width="97" align="center" nowrap class="kecttep_graytd"><%= docVO.getOwnerName()%></td>
<!-- 시작일 -->
<td width="100" align="center" nowrap class="kecttep_graytd"><%= docType.equals("REG") ? new SimpleDateFormat("yyyy-MM-dd HH:mm").format(docVO.getStartDate()) : new SimpleDateFormat("yyyy-MM-dd").format(docVO.getStartDate())%></td>
<td width="135" align="center" nowrap class="kecttep_graytd"
<%
String tmpMoumiAcptLimitStrategy = Integer.toString(docVO.getSubmitLimitCnt());
String tmp2 = null;
String tstr = "시";
String tcnt;
tcnt = "(" + Integer.toString(docVO.getSubmitLimitCnt()) + "개 기관)";
if (tmpMoumiAcptLimitStrategy.equals("0")) {
tmp2 = new SimpleDateFormat("yyyy-MM-dd HH").format(docVO.getEndDate());
tcnt = "";
} else {
tmp2 = Moumi.getMessageBundle().getString("moumi.message.tot_doc.endBySubmitTotal");
tstr = "";
}
if (tmp2.contains("9999-12-30")) {
tmp2 = Moumi.getMessageBundle().getString("moumi.message.tot_doc.docGethering");
}
if (tmp2.equals(Moumi.getMessageBundle().getString("moumi.message.tot_doc.docGethering"))) {
tstr = "";
}
%>>
<%
out.write(tmp2 + tstr + tcnt);
%>
</td>
<td width="125" align="center" nowrap class="kecttep_graytd">
<%
//String tmpAllcnt = Long.toString(docVO.getAllCnt());
//String tmpSndcnt = Long.toString(docVO.getSndCnt());
//String tmpNotCcnt = Long.toString(docVO.getNoteCnt());
//out.write(tmpAllcnt + "/" + tmpSndcnt + "(" + tmpNotCcnt + ")");
out.write(docVO.getSndCnt() + "/" + docVO.getAllCnt() + "(" + docVO.getNoteCnt() + ")");
%>
</td>
<td width="100" nowrap class="kecttep_graytd" align="center">
<span style="padding-left:inherit">
<%if (docVO.getRepId() != null && docVO.getRepId() != 0) {
out.print(Moumi.getMessageBundle().getString("moumi.message.tot_doc.subDoc")); //연계등록자료 표시
}%>&nbsp;
</span>
</td>
<!-- 2014.08.29 Add by KWON,HAN -->
<td width="70" align="center" nowrap valign="middle" nowrap class="kecttep_last_graytd">
<%if (docVO.getShareUserCount() > 0) {
%>
<%if (docVO.getShareDocRegId() != null && usID.equals(docVO.getShareDocRegId())) {%>
<a href="javascript:userShareSelect('select','<%= docVO.getId()%>');">
<%}%>
<%=docVO.getShareUserCount()%><%=Moumi.getMessageBundle().getString("moumi.message.doc.Name")%>
<%if (usID.equals(docVO.getShareDocRegId())) {%>
</a>
<%}%>
<%
} else {%>
&nbsp;
<%}%>
</td>
<!-- ---------------------------- -->
</tr>
<%
} //end of for list
} //end of if( count > 0)
//tx.rollback();
%>
<!---- 내용 끝 ---->
</table>
</td>
</tr>
<tr>
<td height="15"></td>
</tr>
<%if (count > 0) {%>
<tr style="padding-top: 3" valign="middle">
<td height="25" colspan="8" align="center" class="kecttep_board">
<!------------------------------- 페이지수 나오는 부분 시작 ------------------------------->
<%--
<jsp:include page="/totsys/common/inc/board/page.jsp" flush="true">
<jsp:param name="uri" value="<%= uri%>" />
<jsp:param name="pageSize" value="<%= pageSize%>" />
<jsp:param name="currentPage" value="<%= currentPage%>" />
<jsp:param name="currentPageSetUp" value="<%= currentPageSetUp%>" />
<jsp:param name="findWord" value='<%=URLEncoder.encode(MString.checkNull(findWord), "UTF-8")%>' />
</jsp:include>
--%>
<jsp:include page="/totsys/common/inc/board/page_module.jsp" flush="true">
<jsp:param name="pageFunction" value="fn_goToPage" />
<jsp:param name="pageSize" value="<%= pageSize %>" />
<jsp:param name="currentPage" value="<%= currentPage %>" />
<jsp:param name="currentPageSetUp" value="<%= currentPageSetUp %>" />
</jsp:include>
<!------------------------------- 페이지수 나오는 부분 끝 -------------------------------->
</td>
</tr>
<%} else {%>
<tr>
<td class="kecttep_none_tdmenu" colspan="14" height="25" align="center"><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.notDoc")%></td>
<%}%>
</tr>
<input type="hidden" name="tmpFind" value="<%=MString.checkNull(findOption)%>">
<FORM name="Del" action="/servlet/kr.co.kihyun.beans.totsys.totper.HttpDocDel" method="post">
<INPUT type="hidden" name="docID" value="">
<INPUT type="hidden" name="url" value="endDoc">
<INPUT type="hidden" name="docType" value="<%= docType%>">
<input type="hidden" name="strPage" value="<%= currentPage %>">
<input type="hidden" name="findOption" value="<%=MString.checkNull(findOption)%>">
<input type="hidden" name="findWord" value="<%=MString.checkNull(findWord)%>">
</FORM>
<script>
if (tmpFind.value == "name") {
searchForm.findOption.selectedIndex = 0;
//} else if (tmpFind.value == "startDate") {
// searchForm.findOption.selectedIndex = 1;
//} else if (tmpFind.value == "endDate") {
// searchForm.findOption.selectedIndex = 2;
} else if (tmpFind.value == "totDoc.mUser.name") {
searchForm.findOption.selectedIndex = 2;
}
</script>
</table>
</td>
<td nowrap width="10"></td>
</tr>
<!------------------------------- top menu start ------------------------------->
<%@ include file="/totsys/common/inc/buttom/buttom.jsp"%>
<!------------------------------- top menu end ------------------------------->
</table>
<div id="SetWin" style="position: absolute; z-index: 10; visibility: hidden; width: 100px; background: silver; border: 1px #333333 solid; line-height: 1.4em; padding: 3px 3px; v"></div>
</BODY>
</HTML>
<%
} catch (Exception ex) {
ex.printStackTrace();
out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';"));
} finally {
if (tx.isActive()) {
tx.rollback();
}
pm.close();
}
%>