<%@page import="kr.co.kihyun.beans.entity.Board"%> <%@page import="kr.co.kihyun.beans.entity.Category"%> <%@page import="kr.co.kihyun.beans.entity.TotReportProcess"%> <%@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=euc-kr" 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.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 = ""; Board totperComment = totReport.getTotDoc().getBoard(); if (totperComment != null) { // tx.begin(); boardContents = TagFilter.convertSpace(totperComment.getContents()); for (Entry> entry : totperComment.getAttachments().entrySet()) { svrFilenames += entry.getKey() + ";"; } // tx.rollback(); } 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 (!MString.isNull(boardContents) || !MString.isNull(svrFilenames)) {%> <%= MoumiConfig.getMessageBundle().getString(" /> <%}%> <% if (downDocId == null || downDocId == 0L) {%> <%= MoumiConfig.getMessageBundle().getString(" /> <% } 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())%>
   
       
 
 
<% } 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); tx.commit(); 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(); } %>