<%@page import="java.util.Date"%> <%@page import="kr.co.kihyun.beans.user.DeptView"%> <% /** * **********************************************************@@ Program Name * : report_view.jsp Description : /보고자/내문서함/종료함/보고자료 보기 Author : 기현테크 * Create Date : 2010.11.27 History : * @@*********************************************************** */ %> <%@ page contentType="text/html; charset=UTF-8" import="java.text.SimpleDateFormat" import="java.net.URLEncoder" import="kr.co.kihyun.beans.user.HttpSSOLogin" import="kr.co.kihyun.lang.MLong" import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.moumi.MoumiConfig" import="javax.jdo.PersistenceManager" import="kr.co.kihyun.beans.entity.util.*" import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.text.html.TagFilter" import="kr.co.kihyun.beans.entity.TotDoc" import="kr.co.kihyun.beans.entity.MUser" import="kr.co.kihyun.beans.entity.SysAuth" import="kr.co.kihyun.beans.entity.TotReport" import="kr.co.kihyun.beans.entity.Board" import="kr.co.kihyun.beans.entity.Category" import="kr.co.kihyun.beans.entity.TotReport" import="kr.co.kihyun.beans.entity.TotReportProcess" import="kr.co.kihyun.beans.entity.TotDocProcess" import="kr.co.kihyun.beans.user.DeptAdd" import="kr.co.kihyun.beans.batch.AcceptNote" import="javax.jdo.Transaction" import="kr.co.kihyun.service.*" %> <%@ page import="java.util.Map.Entry"%> <%@ page import="java.util.List"%> <%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> <% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); Transaction tx = pm.currentTransaction(); try { /** * ******** session내의 userId ********* */ String usID = HttpSSOLogin.getLoginID(request); String dtID = HttpSSOLogin.getDeptID(request); // DeptAdd dept = new DeptAdd(); // int grade = dept.getGrade(usID, dtID); // int foundation = dept.getFoundation(usID, dtID); //String rootDept = dept.getRootDept(usID); /** * ******** Parameter ********* */ Long reportID = MLong.parseLong(request.getParameter("reportID"), null); String reportType = clearXSS(Encoder.toJava(request.getParameter("reportType")), null); String endDate = clearXSS(Encoder.toJava(request.getParameter("endDate")), null); String tmpSubStrEndDate = clearXSS(Encoder.toJava(request.getParameter("tmpSubStrEndDate")), null); String strPage = MString.checkNull(request.getParameter("strPage")); String findOption = clearXSS(request.getParameter("findOption"), null); String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")), null); String stDate = clearXSS(request.getParameter("stDate"),""); String edDate = clearXSS(request.getParameter("edDate"),""); String procMode = request.getParameter("proc_mode"); String modeMessage = ""; //자바스크립트 alert창에 업무처리결과를 보여줄 메세지를 저장 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// String id = clearXSS(request.getParameter("id"), ""); String user_id = clearXSS(request.getParameter("user_id"), ""); /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (MString.isNull(procMode)) { tmpSubStrEndDate = tmpSubStrEndDate.replaceAll("-", ""); tmpSubStrEndDate = tmpSubStrEndDate.replaceAll(":", ""); String tmpEndDate = endDate; endDate = endDate.replaceAll("-", ""); tx.begin(); MUser user = pm.getObjectById(MUser.class, usID); SysAuth sysAuth = user.getSysAuth(); TotReport totReport = pm.getObjectById(TotReport.class, reportID); String acptDoc = totReport.getActDoc().toString(); String userId = MString.checkNull(totReport.getUser()); String secuYn = MString.checkNull(totReport.getSecuYn()); pm.refresh(totReport); pm.makePersistent(totReport); TotDoc doc = totReport.getTotDoc(); TotDocProcess docPrss = doc.getProcess(pm); String docName = doc.getName(); String prss = totReport.getProcess().toString(); Long downDocId = null; try { downDocId = totReport.getSlaveTotDoc().getId(); } catch (Exception ex) { downDocId = null; } tx.commit(); String boardGroupID = Category.ID_TOT_DOC_COMMENT; String url = clearXSS(request.getParameter("url"), ""); if (url == null) { url = ""; } String boardContents = ""; String svrFilenames = ""; int visit = 0; // String reportName = ""; // if ("COMP".equals(reportType)) { // reportName = MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.mySubmit") + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc") + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.box"); // } else if ("END".equals(reportType)) { // reportName = MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.end") + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc") + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.box"); // } // // String titleName = reportName + " > " + MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.submit") + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc"); // DeptView deptView = new DeptView(); // boolean flag = deptView.getID_AT_IS_MOUMI_TOT_REPORT(reportID); Date nowDate = new Date(); %> <%=MoumiConfig.getTitle()%>
<%@ include file="/totsys/common/inc/buttom/buttom.jsp"%>
--%> <%= MoumiConfig.getMessageBundle().getString(" />
<% if( ( usID.equals(userId) || sysAuth == SysAuth.SUB_SYSADM || sysAuth == SysAuth.SYSADM ) ) { %> 담당변경 <% } %> <%if (null != totReport.getTotDoc().getBoard().getContents()) {%> <%= MoumiConfig.getMessageBundle().getString(" /> <%}%> <% if (downDocId == null || downDocId == 0L) {%> 액셀다운 <% } else {%> " target="_parent"> <%= MoumiConfig.getMessageBundle().getString(" /> <% }%> <%= MoumiConfig.getMessageBundle().getString(" /> <%if( prss != MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.recalInfo") && ( usID.equals(userId) || sysAuth == SysAuth.SUB_SYSADM || sysAuth == SysAuth.SYSADM ) ) {%> <%= MoumiConfig.getMessageBundle().getString(" /> <%}%> <%if( prss == MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.recalInfo") && ( usID.equals(userId) || sysAuth == SysAuth.SUB_SYSADM || sysAuth == SysAuth.SYSADM ) ) {%> 자료회수요청 취소 <%}%> <%if (usID.equals(userId)) {%> ');"> <% if (secuYn.equals("Y")) { %> <%= MoumiConfig.getMessageBundle().getString(<%=MoumiConfig.getMessageBundle().getString("moumi.message.unset")%>" /> <% } else { %> <%= MoumiConfig.getMessageBundle().getString(<%=MoumiConfig.getMessageBundle().getString("moumi.message.set")%>" /> <% } %> <%}%> <% //교육부 문서일 경우만 //if (reportID > 1700000000 && flag == false) { %> <%//} %> <%-- <%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.edu") %>
<% tx.begin(); if (!totReport.getHistories().isEmpty()) {%> <%} else {%> <%} tx.rollback(); %>
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.submitDate")%> <%= totReport.getSubmitDate() == null ? " " : new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(totReport.getSubmitDate())%>
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.document")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.number")%> <%= acptDoc%>
   
       
 
 
<% } else if (procMode.equals("security") || procMode.equals("recallCancel")) { //보안지정/해제, 부서공유/취소 처리 부분 tx.begin(); if(procMode.equals("security")){ String secuYn = request.getParameter("secuYn"); TotReportService reportService = new TotReportService(pm); reportService.updateSecuYnForReport(reportID, secuYn); if (secuYn.equals("Y")) { //보안지정 modeMessage = MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.secu.yes") + MoumiConfig.getMessageBundle().getString("moumi.message.set"); } else if (secuYn.equals("N")) { //보안해제 modeMessage = MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.secu.yes") + MoumiConfig.getMessageBundle().getString("moumi.message.unset"); } }else if(procMode.equals("recallCancel")){ Long cancelID = MLong.parseLong(request.getParameter("id")); TotReportService reportService = new TotReportService(pm); reportService.updatePrssForReport(cancelID, TotReportProcess.COMP); modeMessage = "자료회수요청 " + MoumiConfig.getMessageBundle().getString("moumi.message.unset"); } tx.commit(); %> <%=MoumiConfig.getTitle()%>
<% } } 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(); } %>