경북대 사용자단위 취합

- 연계등록시 사용자 단위로 취합할 수 있도록 개선
main
jskim 2 years ago
parent 45251749fd
commit ca50943d00
  1. 347
      src/kr/co/kihyun/beans/totsys/doc/HttpSubDocUserRegist.java
  2. 187
      src/kr/co/kihyun/beans/totsys/report/ReportUserUpdate.java
  3. 189
      src/kr/co/kihyun/beans/user/HttpUserDocList.java
  4. 365
      webapps/totsys/common/web/report_dept/iframe/newTreeUser.jsp
  5. 52
      webapps/totsys/common/web/report_dept/iframe/new_section_list4.html
  6. 521
      webapps/totsys/common/web/report_dept/new_user_list2.jsp
  7. 2
      webapps/totsys/repoper/mydocbox/tempbox/report_regist.jsp
  8. 728
      webapps/totsys/totper/mydocbox/regbox/sub_doc_user_regist.jsp

@ -0,0 +1,347 @@
/*************************************************************************************************
* 프로그램명 : HttpDocRegist.java 프로그램설명 : 집계문서 등록자 작성자 : 강원중 작성일 : 2004.06.07 변경일 : 2003.11.30
**************************************************************************************************/
package kr.co.kihyun.beans.totsys.doc;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URLDecoder;
//import java.net.URLEncoder;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
//import java.util.List;
//import java.util.Map.Entry;
import java.util.Set;
import javax.jdo.PersistenceManager;
import javax.jdo.Transaction;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import kr.co.kihyun.beans.entity.AcceptanceLimitStrategy;
import kr.co.kihyun.beans.entity.AccessAuth;
//import kr.co.kihyun.beans.entity.Board;
import kr.co.kihyun.beans.entity.Category;
import kr.co.kihyun.beans.entity.ExecutionCode;
import kr.co.kihyun.beans.entity.MDept;
import kr.co.kihyun.beans.entity.MUser;
import kr.co.kihyun.beans.entity.TotDoc;
import kr.co.kihyun.beans.entity.TotDocAppendType;
import kr.co.kihyun.beans.entity.TotDocProcess;
import kr.co.kihyun.beans.entity.TotDocType;
import kr.co.kihyun.beans.entity.TotItem;
import kr.co.kihyun.beans.entity.TotReport;
import kr.co.kihyun.beans.entity.TotReportProcess;
import kr.co.kihyun.beans.entity.TotTable;
import kr.co.kihyun.beans.entity.util.MPersistenceManager;
import kr.co.kihyun.beans.entity.util.PMF;
import kr.co.kihyun.beans.totsys.report.ReportUpdate;
import kr.co.kihyun.beans.totsys.report.ReportUserUpdate;
import kr.co.kihyun.beans.user.GroupView;
import kr.co.kihyun.beans.user.HttpSSOLogin;
import kr.co.kihyun.io.FileUtil;
import kr.co.kihyun.lang.Encoder;
import kr.co.kihyun.lang.MInteger;
import kr.co.kihyun.lang.MLong;
import kr.co.kihyun.lang.MString;
import kr.co.kihyun.moumi.MoumiConfig;
import kr.co.kihyun.text.html.ServletUtil;
import kr.co.kihyun.text.html.TagFilter;
import org.datanucleus.ObjectManager;
import org.datanucleus.jdo.JDOPersistenceManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@WebServlet("/servlet/kr.co.kihyun.beans.totsys.doc.HttpSubDocUserRegist")
public class HttpSubDocUserRegist extends HttpServlet {
/**
*
*/
private static final long serialVersionUID = 1L;
private static final Logger LOG = LoggerFactory.getLogger(HttpSubDocUserRegist.class);
@Override
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
res.setContentType("text/html;charset=UTF-8");
if (req.getMethod().equals("HEAD"))
return;
PrintWriter out = res.getWriter();
/*********** User HttpLogin check ***********/
if (!HttpSSOLogin.isLogin(req)) {
String connURL = "location='/totsys/login/login.jsp';";
out.println(ServletUtil.getJavaScript(connURL));
return;
}
/********** session내의 userId **********/
String usID = HttpSSOLogin.getLoginID(req);
String dpID = HttpSSOLogin.getDeptID(req);
/********** parameter value **********/
String docName = Encoder.toJava(req.getParameter("docName"));
String stDate = Encoder.toJava(req.getParameter("stDate"));
String stTime = Encoder.toJava(req.getParameter("stTime"));
String edDate = Encoder.toJava(req.getParameter("edDate"));
String edTime = Encoder.toJava(req.getParameter("edTime"));
int execNum = MInteger.parseInt(req.getParameter("execNum"));
String execDate = MString.checkNull(req.getParameter("execDate"));
String acceptanceLimitStrategy = Encoder.toJava(req.getParameter("acceptanceLimitStrategy"));
String prss = Encoder.toJava(req.getParameter("prss"));
Long submitLimit = MLong.parseLong(req.getParameter("submitLimit"), Long.MAX_VALUE);
String title = Encoder.toJava(req.getParameter("title"));
String contents = Encoder.toJava(req.getParameter("notify"));
//String svrFilenames = URLDecoder.decode(MString.checkNull(req.getParameter("svrFilenames")), "UTF-8");
String svrFilenames=Encoder.toJava(MString.checkNull(req.getParameter("svrFilenames")));
svrFilenames = URLDecoder.decode(svrFilenames, "UTF-8");
String deptIDs = Encoder.toJava(req.getParameter("deptIDs"));
int accAuth = MInteger.parseInt(req.getParameter("accAuth"), 0);// 집계문서 접근권한
// String docForm = Encoder.toJava(req.getParameter("docForm"));
String docForm = Encoder.toJava(TagFilter.convertSingle(req.getParameter("copyForm")));
Long reportID = new Long(MInteger.parseInt(req.getParameter("reportID")));
stDate += " " + stTime + ":00:00";
edDate += " " + edTime + ":00:00";
Date startDate, endDate;
startDate = endDate = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
startDate = sdf.parse(stDate);
endDate = sdf.parse(edDate);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String userIDs = Encoder.toJava(req.getParameter("userIDs"));
String deptTypes = Encoder.toJava(req.getParameter("deptTypes"));
String handyName = Encoder.toJava(MString.checkNull(req.getParameter("handyName")));
int totRange = MInteger.parseInt(MString.checkNull(req.getParameter("totRange")), 1);
String[] deptIDList = deptIDs.split(",");
String[] typeList = deptTypes.split(",");
MDept userDept = null;
MUser mUser = null;
TotDoc repDoc = null;
TotReport totReport = null;
PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager());
Transaction tx = pm.currentTransaction();
ObjectManager om = ((JDOPersistenceManager) tx.getPersistenceManager()).getObjectManager(); // jeus 6 proplem
try {
tx.begin();
userDept = pm.getObjectById(MDept.class, dpID);
mUser = pm.getObjectById(MUser.class, usID);
totReport = pm.getObjectById(TotReport.class, reportID);
repDoc = totReport.getTotDoc();
int all = typeList.length;
StringBuilder dts = new StringBuilder();
StringBuilder uss = new StringBuilder();
for (int a = 0; a < all; a++) {
if (typeList[a].equals("user")) {
if (uss.toString().length() == 0) {
uss.append(deptIDList[a]);
} else {
if (!uss.toString().contains(deptIDList[a])) {
uss.append(",");
uss.append(deptIDList[a]);
}
}
} else if (typeList[a].equals("group")) {
if (new GroupView().getUserUserDeptUserID(deptIDList[a]).length() != 0) {
if (uss.toString().length() == 0) {
uss.append(new GroupView().getUserUserDeptUserID(deptIDList[a]));
} else {
if (!uss.toString().contains(new GroupView().getUserUserDeptUserID(deptIDList[a]))) {
uss.append(",");
uss.append(new GroupView().getUserUserDeptUserID(deptIDList[a]));
}
}
}
if (new GroupView().getUserDeptDeptID(deptIDList[a]).length() != 0) {
if (dts.toString().length() == 0) {
dts.append(new GroupView().getUserDeptDeptID(deptIDList[a]));
} else {
if (!dts.toString().contains(new GroupView().getUserDeptDeptID(deptIDList[a]))) {
dts.append(",");
dts.append(new GroupView().getUserDeptDeptID(deptIDList[a]));
}
}
}
} else {
if (dts.toString().length() == 0) {
dts.append(deptIDList[a]);
} else {
if (!dts.toString().contains(deptIDList[a])) {
dts.append(",");
dts.append(deptIDList[a]);
}
}
}
}
deptIDs = dts.toString();
userIDs = uss.toString();
if (docForm == null) {
out.println(ServletUtil.alert(TotDocType.FORM_DOC + MoumiConfig.getMessageBundle().getString("moumi.message.popup.notTableReConfirm")));
out.println(ServletUtil.redirect("/totsys/totper/mydocbox/regbox/sub_doc_regist.jsp?reportID="
+ reportID));
} else {
}
SimpleDateFormat execDateFormat = new SimpleDateFormat("yyyy-MM-dd");
ExecutionCode execCode = null;
if (execNum > 0 && !MString.isNull(execDate))
execCode = new ExecutionCode(mUser.getUpperDept(pm).getName(), execNum, execDateFormat.parse(execDate));
TotDoc newDoc = docRegist(pm, docName, execCode, handyName, mUser, startDate, endDate,
AccessAuth.asAccessAuth(accAuth), TotDoc.TotRange.asTotRange(totRange), repDoc, userDept,
acceptanceLimitStrategy, submitLimit, prss, repDoc.getAppendType());
title=docName;
kr.co.kihyun.beans.entity.Board mBoard = new kr.co.kihyun.beans.entity.Board(title);
mBoard.setUser(mUser);
//mBoard.setContents(repDoc.getBoard().getContents());
mBoard.setContents(contents);
mBoard.setTotDoc(newDoc);
mBoard.setCategory(pm.getObjectById(Category.class, Category.ID_TOT_DOC_COMMENT));
LOG.debug("ID: {}, GROUP_ID: {}, REP_LEVEL: {}, STEP: {}, TITLE: {}, WRITE_DATE: {}",
new Object[] {mBoard.getId(), mBoard.getCategory(), mBoard.getRepLevel(), mBoard.getStep(),
mBoard.getTitle(), mBoard.getWriteDate()});
FileUtil.putInFiles(svrFilenames, mBoard);
// 연계등록시 자료를 수정(요구사항) 하지만 아래 내용때문에 상위기관에서 입력요령을 그대로 받아와서 셋아기때문에 그것을 지우고 위에 파일을 새로 넣음
// for (Entry<String, List<Byte>> entry : repDoc.getAttachments().entrySet())
// mBoard.addAttachment(entry.getKey(), entry.getValue());
pm.makePersistent(mBoard);
FileUtil.getBoardAttachmentsFileNames(mBoard.getId(), req,true);
// succNum += new TableUpdate().insert(newDoc, repDoc);
LOG.debug("repDoc: {}", repDoc);
LOG.debug("rep tables: {}", repDoc.getTotTables());
LOG.debug("rep items: {}", repDoc.getTotItems());
LOG.debug("rep reports: {}", repDoc.getTotReports());
TotTable masterTable = repDoc.getTotTables().iterator().next();
TotTable totTable = new TotTable(newDoc);
totTable.setName(masterTable.getName());
totTable.setNote(masterTable.getNote());
totTable.setTypes(masterTable.getTypes());
totTable.setType(masterTable.getType());
pm.makePersistent(totTable);
// succNum += tableRegist(newDocID, repDocID, docForm);
for(Iterator<TotItem> itemIter = repDoc.getTotItems().iterator(); itemIter.hasNext(); ) {
TotItem sourceItem = itemIter.next();
TotItem targetItem = new TotItem(newDoc);
targetItem.setNum(sourceItem.getNum());
targetItem.setTableNum(sourceItem.getTableNum());
targetItem.setName(sourceItem.getName());
targetItem.setDescription(sourceItem.getDescription());
targetItem.setInputSize(sourceItem.getInputSize());
targetItem.setExpr(sourceItem.getExpr());
targetItem.setType(sourceItem.getType());
targetItem.setColNum(sourceItem.getColNum());
targetItem.setRowNum(sourceItem.getRowNum());
pm.makePersistent(targetItem);
}
// 보고기관 입력
// succNum += reportRegist(newDocID, newTableNum, deptIDs);
String[] stringDeptIDArray = userIDs.split(",");
//v2 23.정수형 오버플로우 (배열인덱스)_CWE-190 : Update by YOUNGJUN,CHO
if (stringDeptIDArray.length > 0) {
String[] longDeptIDArray = new String[stringDeptIDArray.length];
System.arraycopy(stringDeptIDArray, 0, longDeptIDArray, 0, stringDeptIDArray.length);
new ReportUserUpdate().deptUserInsert(pm, newDoc, totTable, longDeptIDArray);
// 보고기관 업(집계된 문서의 상위 보고 기관)
totReport.setSlaveTotDoc(newDoc);
totReport.setUser(mUser);
totReport.setProcess(TotReportProcess.TEMP);
//20110803 LJH
totReport.setDept(mUser.getUpperDept(pm));
totReport.setRepTotDoc(repDoc);
pm.makePersistent(totReport);
Set<TotReport> slaveReportList = newDoc.getTotReports();
for (TotReport slaveReport : slaveReportList)
slaveReport.setRepTotDoc(repDoc);
pm.makePersistentAll(slaveReportList);
LOG.debug("commit");
om.postCommit(); // jeus 6 problem
tx.commit();
out.println(ServletUtil.alert(MoumiConfig.getMessageBundle().getString("moumi.message.popup.newSubdoc")));
// out.println(ServletUtil.redirect("/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS"));
out.println(ServletUtil.redirect("/totsys/repoper/mydocbox/tempbox/report_list.jsp?reportType=TEMP"));
}
//================================================
} catch (Exception e) {
out.println(ServletUtil.alert(MoumiConfig.getMessageBundle().getString("moumi.message.popup.notRegistReConfirm")));
//v2. 9.크로스사이트 스크립트 (PrintWrier) : Update by KWON,HAN
// out.println(ServletUtil.redirect("/totsys/totper/mydocbox/regbox/sub_doc_regist.jsp?reportID=" + reportID));
// 수정 : 외부 입력값 필터링
String callbackFunc = "/totsys/totper/mydocbox/regbox/sub_doc_regist.jsp?reportID=" + reportID;
String filtered_callbackFunc = callbackFunc.replaceAll("<","").replaceAll(">","");
LOG.debug("v2 9.크로스사이트 스크립트 (PrintWrier) : HttpSubDocRegist.doPost() filtered_callbackFunc={}, Not Test", filtered_callbackFunc);
out.println(ServletUtil.redirect(filtered_callbackFunc));
//============================================================
e.printStackTrace();
} finally {
if (tx.isActive()) {
tx.rollback();
}
pm.close();
}
}
private TotDoc docRegist(PersistenceManager pm, String docName, ExecutionCode execCode, String handyName,
MUser mUser, Date stDate, Date edDate, AccessAuth accAuth, TotDoc.TotRange totRange, TotDoc repDoc,
MDept mDept, String acceptanceLimitStrategy, Long submitLimit, String prss, TotDocAppendType appendType) {
TotDoc newDoc = new TotDoc(docName, mDept, repDoc.getForm());
newDoc.setUser(mUser);
newDoc.setExecutionCode(execCode);
newDoc.setHandyName(handyName);
newDoc.setStartDate(stDate);
newDoc.setEndDate(edDate);
newDoc.setAccessAuth(accAuth);
newDoc.setTotRange(totRange);
newDoc.setMasterTotDoc(repDoc);
newDoc.setDept(mUser.getUpperDept(pm));
newDoc.setAppendType(appendType);
AcceptanceLimitStrategy acptLimitStrategy = AcceptanceLimitStrategy.create(acceptanceLimitStrategy, submitLimit);
acptLimitStrategy.setProcess(TotDocProcess.valueOf(prss));
newDoc.setAcceptanceLimitStrategy(acptLimitStrategy);
pm.makePersistent(newDoc);
return newDoc;
}
}

@ -0,0 +1,187 @@
package kr.co.kihyun.beans.totsys.report;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import javax.jdo.PersistenceManager;
import kr.co.kihyun.beans.entity.AssignType;
import kr.co.kihyun.beans.entity.MDept;
import kr.co.kihyun.beans.entity.MUser;
import kr.co.kihyun.beans.entity.MoumiEntity;
import kr.co.kihyun.beans.entity.TotDoc;
import kr.co.kihyun.beans.entity.TotReport;
import kr.co.kihyun.beans.entity.TotReportType;
import kr.co.kihyun.beans.entity.TotTable;
import kr.co.kihyun.beans.entity.util.QueryImpl;
import kr.co.kihyun.db.CommonDBManager;
import kr.co.kihyun.db.DBManager;
import kr.co.kihyun.lang.MString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ReportUserUpdate extends DBManager {
private static final Logger LOG = LoggerFactory.getLogger(ReportUserUpdate.class);
private ResultSet rs = null;
public int deptUserUpdate(PersistenceManager pm, TotDoc totDoc, String[] insertDeptList)
throws Exception {
int succNum = 0;
succNum = allReportsDelTypeTrueConvert(pm, totDoc);
succNum = deptUserInsert(pm, totDoc, totDoc.getTotTables().iterator().next(), insertDeptList);
return succNum;
}
// FIXME: remove me
public int deptUserInsert(PersistenceManager pm, TotDoc totDoc, TotTable totTable, String[] deptIDList)
throws Exception {
int succNum = 0;
TotReport totReport = null;
List<TotReport> totReportDepts = null;
QueryImpl q = null;
try {
q = new QueryImpl(pm, TotReport.class);
q.setFilter("totDoc == tot_doc && assignType == AssignType.ASSIGN_TO_DEPT");
//q.setFilter("assignType == AssignType.ASSIGN_TO_DEPT");
q.declareImports("import kr.co.kihyun.beans.entity.*");
q.declareParameters("TotDoc tot_doc");
//v2. 6.SQL 삽입 : DO형식이므로 해결책에 따른 prepare SQL 문으로 변경할 수 없음
totReportDepts = (List<TotReport>) q.execute(totDoc);
//===============
int currReportDeptCount = totReportDepts.size();
Long id = null;
boolean isDeptAlreadyExist = false;
LOG.debug("totReportDepts.size() - {}", totReportDepts.size());
LOG.debug("deptIDList.length : {}", deptIDList.length);
LOG.debug("deptIDList : {}", deptIDList);
if (deptIDList != null) {
LOG.debug("deptIDList is not null");
for (int i = 0; i < deptIDList.length; i++) {
LOG.debug("deptIDList[{}]: {}", i, deptIDList[i]);
if (deptIDList.length == 1 && MString.isNull(deptIDList[0]))
break;
for (int j = 0; j < currReportDeptCount; j++) {
LOG.debug("deptIDList[" + i + "] - {} totReportDepts.get(" + j + ") - {}", deptIDList[i], totReportDepts.get(j).getDept(pm).getId());
if (deptIDList[i].equals(totReportDepts.get(j).getDept(pm).getId())) {
isDeptAlreadyExist = true;
break;
} else {
isDeptAlreadyExist = false;
break;
}
}
if (isDeptAlreadyExist) {
id = getID(totDoc.getId(), deptIDList[i], null);
totReport = pm.getObjectById(TotReport.class, id);
totReport.setDeleted("N");
totReport.setType(TotReportType.REPORT);
totReport.setAssignType(AssignType.ASSIGN_TO_DEPT);
} else {
MUser user = pm.getObjectById(MUser.class, deptIDList[i]);
MDept dept = user.getUpperDept(pm);
totReport = new TotReport(totDoc, dept);
totReport.setId(getDocID_Sequence());
totReport.setTableNum(totTable.getNum());
totReport.setAssignType(AssignType.ASSIGN_TO_DEPT);
totReport.setUser(user);
}
pm.makePersistent(totReport);
succNum = 1;
}
}
return succNum;
} catch (Exception ex) {
LOG.debug("totReport :{}", totReport);
LOG.error(
"failed to regist report. del_type {}, recog {}, prss {}, id {}, appro {}, table_num {}, doc_id {}, type {}",
new Object[] { totReport.isDeleted(), totReport.getRecog(), totReport.getProcess(),
totReport.getId(), totReport.getAppro(), totReport.getTableNum(), totReport.getTotDoc(),
totReport.getType() });
throw ex;
}
}
private int allReportsDelTypeTrueConvert(PersistenceManager pm, TotDoc totDoc) {
try {
Set<TotReport> reports = totDoc.getTotReports();
for (TotReport report : reports)
report.setDeleted("Y");
// pm.makePersistentAll(reports.toArray());
return 1;
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
public Long getID(Long docID, String deptID, String userID) {
StringBuilder sql = new StringBuilder(120);
Long id = null;
ArrayList<Object> paramList = new ArrayList<Object>();
try {
if (userID == null) {
sql.append("select id from ").append(MoumiEntity.getTableName(TotReport.class))
.append(" where doc_id=? and dept_id=?");
paramList.add(docID);
paramList.add(deptID);
} else {
sql.append("select id from ").append(MoumiEntity.getTableName(TotReport.class))
.append(" where doc_id=? and dept_id=? and user_id=?");
paramList.add(docID);
paramList.add(deptID);
paramList.add(userID);
}
rs = execQuery(sql.toString(), paramList.toArray());
if (rs.next()) {
id = rs.getLong(1);
}
return id;
} catch (SQLException sqlEx) {
LOG.error("\nSQLState - {}\nMySQL Error Code - {}\nmessage - {}\nsql - {}",
new Object[] { sqlEx.getSQLState(), sqlEx.getErrorCode(), sqlEx.getMessage(), sql });
throw new RuntimeException(sqlEx);
} catch (Exception ex) {
throw new RuntimeException(ex);
} finally {
close(rs);
execClose();
}
}
private long getDocID_Sequence(){
CommonDBManager cdb = new CommonDBManager();
ResultSet rs = null;
long seqId = 0L;
try{
rs = cdb.execQuery("SELECT SQ_MOUMI.NEXTVAL AS SEQ_MOUMI FROM DUAL");
if(rs.next()){
seqId = rs.getLong("SEQ_MOUMI");
}
}catch(Exception e){
e.printStackTrace();
}finally{
if(null != rs)
try {
rs.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
cdb.execClose();
return seqId;
}
}
}

@ -0,0 +1,189 @@
/***********************************************************************************
* @@ Program Name : HttpUserShareList.java
* @@ Description : 사용자공유 목록
* @@ Author : KWON,HAN
* @@ Create Date : 2014.08.25
* @@ History :
***********************************************************************************/
package kr.co.kihyun.beans.user;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import kr.co.kihyun.lang.Encoder;
import kr.co.kihyun.moumi.MoumiConfig;
import kr.co.kihyun.lang.MString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@WebServlet("/servlet/kr.co.kihyun.beans.user.HttpUserDocList")
public class HttpUserDocList extends HttpServlet {
/**
*
*/
private static final long serialVersionUID = 1L;
private static final Logger LOG = LoggerFactory.getLogger(HttpUserDocList.class);
@Override
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException, NumberFormatException {
doPost(req, res);
return;
}
@Override
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException, NumberFormatException {
res.setContentType("text/html;charset=UTF-8");
PrintWriter out = res.getWriter();
String idList = Encoder.toJava(req.getParameter("idList"));
String typeList = Encoder.toJava(req.getParameter("typeList"));
String nameList = Encoder.toJava(req.getParameter("nameList"));
String deptNameList = Encoder.toJava(req.getParameter("deptNameList"));
if (!MString.isNull(idList)) {
//v2. 9.크로스사이트 스크립트 (PrintWrier) : Update by KWON,HAN
// out.println(getRightCheckList(idList, typeList, nameList, deptNameList));
// 수정 : 외부 입력값 필터링
String filtered_idList = idList.replaceAll("<","").replaceAll(">","").replaceAll("&","");
String filtered_typeList = typeList.replaceAll("<","").replaceAll(">","").replaceAll("&","");
String filtered_nameList = nameList.replaceAll("<","").replaceAll(">","").replaceAll("&","");
String filtered_deptNameList = deptNameList.replaceAll("<","").replaceAll(">","").replaceAll("&","");
//LOG.debug("v2 9.크로스사이트 스크립트 (PrintWrier) : HttpUserShareList.doPost() filtered_idList={}, Test Ok", filtered_idList);
//LOG.debug("v2 9.크로스사이트 스크립트 (PrintWrier) : HttpUserShareList.doPost() filtered_typeList={}, Test Ok", filtered_typeList);
//LOG.debug("v2 9.크로스사이트 스크립트 (PrintWrier) : HttpUserShareList.doPost() filtered_nameList={}, Test Ok", filtered_nameList);
//LOG.debug("v2 9.크로스사이트 스크립트 (PrintWrier) : HttpUserShareList.doPost() filtered_deptNameList={}, Test Ok", filtered_deptNameList);
out.println(getRightCheckList(filtered_idList, filtered_typeList, filtered_nameList, filtered_deptNameList));
//========================================
}
}
private String getRightCheckList(String idList, String typeList, String nameList, String deptNameList) {
StringBuilder strbuf = new StringBuilder(8192);
int count = 0;
String[] arrayId = idList.split(",");
String[] arrayType = typeList.split(",");
String[] arrayName = nameList.split(",");
String[] arrayDeptName = nameList.split(",");
count = arrayId.length;
// System.out.println("HttpUserShareList.getRightCheckList() ============");
// for (int i = 0; i < arrayId.length; i++) {
// System.out.println("부서명 ="+arrayDeptName[i]+"/ 사용자명="+arrayName[i]+"(사용자ID="+arrayId[i]+")");
// }
// System.out.println("==================================================");
strbuf.append("<script language=\"javascript\">\n\n");
strbuf.append(" function setList() {\n");
strbuf.append(" parent.idList = \"").append(idList).append("\";\n");
strbuf.append(" parent.typeList = \"").append(typeList).append("\";\n");
strbuf.append(" parent.nameList = \"").append(nameList).append("\";\n");
strbuf.append(" parent.deptNameList = \"").append(deptNameList).append("\";\n");
strbuf.append(" }\n\n");
strbuf.append(" function movelist(){\n");
strbuf.append(" var id = '';\n");
strbuf.append(" var type = '';\n");
strbuf.append(" var name = '';\n");
strbuf.append(" var deptname = '';\n");
strbuf.append(" var addForm = document.AddrList;\n");
for (int i = 0; i < count; i++) {
strbuf.append(" if(addForm.name");
strbuf.append(i);
strbuf.append(".checked == false){\n");
strbuf.append(" id += addForm.id");
strbuf.append(i);
strbuf.append(".value+',';\n");
strbuf.append(" type += addForm.type");
strbuf.append(i);
strbuf.append(".value+',';\n");
strbuf.append(" name += addForm.name");
strbuf.append(i);
strbuf.append(".value+',';\n");
strbuf.append(" deptname += addForm.deptname");
strbuf.append(i);
strbuf.append(".value+',';\n");
strbuf.append(" }\n\n");
}
strbuf.append(" parent.leftFrameDel(name, id, type, deptname);\n");
strbuf.append(" }\n\n");
strbuf.append(" function AllSelect() {\n");
strbuf.append(" var addForm = document.AddrList;\n");
for (int i = 0; i < count; i++) {
strbuf.append(" addForm.name");
strbuf.append(i);
strbuf.append(".checked = true;\n");
}
strbuf.append(" }\n\n");
strbuf.append(" function AllCancel() {\n");
strbuf.append(" var addForm = document.AddrList;\n");
for (int i = 0; i < count; i++) {
strbuf.append(" addForm.name");
strbuf.append(i);
strbuf.append(".checked = false;\n");
}
strbuf.append(" }\n\n");
strbuf.append("</script>\n");
/******************** HTML 생성 ********************/
strbuf.append("<html>\n");
strbuf.append(" <head></head>\n");
strbuf.append("<link rel='stylesheet' href='/totsys/common/css/text.css' type='text/css'>\n");
strbuf.append(" <body bgcolor=\"#FFFFFF\" text=\"#000000\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" onload=\"setList()\">\n");
strbuf.append(" <form name=AddrList method=Post>\n");
strbuf.append(" <table border=0 cellpadding=5 cellspacing=2 width=100%>\n");
strbuf.append(" <tr><td><font size=2 face=\"돋움\">").append(MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.submit")).append(MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.request")).append(MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.devision")).append("(").append(count).append(")</font></td></tr>\n");
strbuf.append(" <tr><td><font size=2 face=\"돋움\"><span style='cursor:hand' onclick='AllSelect()'>").append(MoumiConfig.getMessageBundle().getString("moumi.message.button_small.selectAll")).append("</span> | <span style='cursor:hand' onclick='AllCancel()'>").append(MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.all")).append(MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.cancel")).append("</span></font></td></tr>\n");
strbuf.append(" <tr>\n");
strbuf.append(" <td>\n");
for (int i = 0; i < count; i++) {
strbuf.append(" ");
strbuf.append("<font size=2 face=\"돋움\">");
strbuf.append(i+1);
strbuf.append(".</font>");
strbuf.append("&nbsp;<input type=checkbox name=name");
strbuf.append(i);
strbuf.append(" value=\"");
strbuf.append(arrayName[i]); //사용자명
strbuf.append("\" onclick=\"\">&nbsp;<font size=2 color=\"black\" face=\"돋움\">");
strbuf.append(arrayDeptName[i]); //부서명 / 사용자명(사용자ID)
strbuf.append(" / ");
strbuf.append(arrayName[i]);
strbuf.append("(");
strbuf.append(arrayId[i]);
strbuf.append(")");
strbuf.append("</font><br>\n");
strbuf.append(" <input type=hidden name=id");
strbuf.append(i);
strbuf.append(" value=\"");
strbuf.append(arrayId[i]); //사용자ID
strbuf.append("\">\n");
strbuf.append(" <input type=hidden name=type");
strbuf.append(i);
strbuf.append(" value=\"");
strbuf.append(arrayType[i]); //type
strbuf.append("\">\n");
strbuf.append(" <input type=hidden name=deptname");
strbuf.append(i);
strbuf.append(" value=\"");
strbuf.append(arrayDeptName[i]); //부서명
strbuf.append("\">\n");
}
strbuf.append(" </td>\n");
strbuf.append(" </tr>\n");
strbuf.append(" </table>\n");
strbuf.append(" </form>\n");
strbuf.append(" </body>\n");
strbuf.append("</html>\n");
return strbuf.toString();
}
}

@ -0,0 +1,365 @@
<%@
page contentType="text/html; charset=UTF-8"
import="kr.co.kihyun.beans.user.HttpSSOLogin"
import="kr.co.kihyun.moumi.Moumi"
import="kr.co.kihyun.lang.MString"
import="kr.co.kihyun.lang.MLong"
import="kr.co.kihyun.beans.user.Dept"
import="kr.co.kihyun.beans.user.PartList"
%>
<%
String rootId = request.getParameter("rootID");
String userYN = "Y";
%>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>트리메뉴</title>
<script src="/totsys/common/js/jquery-1.12.4.min.js"></script>
<script src="/totsys/common/js/jquery.cookie.js"></script>
<script src="/totsys/common/js/jquery.hotkeys.js"></script>
<script src="/totsys/common/js/jquery.jstree.js"></script>
<script src="/totsys/common/js/jquery.custom.indicator.js"></script>
<style>
#newTree { text-align: justify; font-size:9pt; vertical-align:middle; }
</style>
</head>
<body>
<input type="button" class="button" value="Search" id="search" style="display:none" />
<input type="button" class="button" value="Search clear" id="searchClear" style="display:none" />
<input type="button" class="button" value="checked Id" id="checkbtn" style="display:none" />
<input type="button" class="button" value="focus Move" id="focusMove" style="display:none" />
<div id="searchType" style="display:none"></div>
<div id="searchWord" style="display:none"></div>
<div id="moveType" style="display:none"></div>
<div id="newTree" class="newTree"></div>
<script class="source">
var gSearchGubun = "DEPT"; //default=DEPT
var gblSearched = false;
$(function() {
$("#newTree").jstree({
"plugins": ["themes", "json_data", "checkbox", "search", "types", "ui", "core"],
"themes": {
"theme": "classic",
"dots": true,
"icons": true,
"url": "/totsys/common/js/themes/classic/style.css"
},
"json_data": {
"data": [
{
"data": "조직도",
"state": "closed",
"attr": {"id": "ROOT", "rel": "ROOT", "rootid": '<%=rootId%>'}
}
],
"ajax": {
"type": "POST",
"url": "/servlet/kr.co.kihyun.tree.Tree",
"data": function(n) {
var data = {};
data.id = n.attr("id");
data.rootId = n.attr("rootId");
data.gubun = "ORGAN";
data.userYN = '<%=userYN%>';
return data;
}
},
"progressive_render": true
},
"types": {
"valid_children": ["ROOT", "DEPT", "USER"],
"types": {
"ROOT": {
"icon": {"image": "/totsys/common/images/pc-user.gif"}
},
"USER": {
"icon": {"image": "/totsys/common/images/person.png"}
}
}
},
"checkbox": {state_type: "three-state"},
"search": {
"case_insensitive": true,
"ajax": {
"type": "POST",
"url": "/servlet/kr.co.kihyun.tree.TreeSearch",
"data": function(str) {
var data = {};
data.keyWord = str;
data.startId = encodeURIComponent('<%=rootId%>');
return data;
},
//"async": false,
"async": true,
"success": function(data) {
//alert("data = " + data);
if (data.length == 0 || data == "#" || data == ('#' + '<%=rootId%>')) {
alert('<%=Moumi.getMessageBundle().getString("moumi.message.popup.notSearchGroupDept")%>'); //검색된 그룹명/부서명이 없습니다.
gblSearched = false;
} else {
gblSearched = true;
}
},
"beforeSend" : function() {
$.customIndicator.show(window.parent);
},
"complete" : function() {
$.customIndicator.hide(window.parent);
}
}
},
"core": {'initially_open': ['ROOT']}
});
$("#searchClear").click(function() {
$("#newTree").jstree("clear_search");
$("#searchResult").empty();
});
$("#search").click(function() {
gblSearched = false;
$("#newTree").jstree("search", $('#searchWord').text());
});
//### 검색을 종료한 후에 실행된다. : 검색된 것이 있으면 최초로 포커스를 이동시킨다.
$("#newTree").bind("search.jstree", function(e, data) {
if (data.rslt.nodes.length > 0) {
//1.이전에 선택된 모든 노드를 해제한다.
$('#newTree').jstree('deselect_all');
//2.검색유형과 다른 것은 style를 제거한다.
var tmpRel = "";
$("#newTree").find(".jstree-search").each(function() {
tmpRel = $(this).parent("li").attr("rel");
//alert("rel = " + tmpRel );
if (gSearchGubun !== tmpRel) {
try {
$(this).removeClass("jstree-search");
} catch (e) {
alert(e);
}
}
});
//찾은 것이 있다면 ...
if (gblSearched == true) {
$("#moveType").text("down");
$("#focusMove").click();
}
}
//@@@ gblSearching = false;
//alert("Found " + data.rslt.nodes.length + " nodes matching '" + data.rslt.str + "'.");
});
$("#newTree").bind("check_node.jstree", function(e, data) {
data.inst.open_node(data.rslt.obj, false, true);
});
//체크된것이 추가버튼을 클릭하면 부서 리스트로 추가된다.
$("#checkbtn").click(function() {
iChkCnt = 0
$("#newTree").jstree("get_checked", null, true).each(function() {
//alert(" this.id = " + this.id);
//alert(" this.deptname = " + this.deptname);
//alert(" this.organdeptname = " + this.organdeptname);
//alert(" this.upperdeptname = " + this.upperdeptname);
var testID = this.id;
testID = testID.substring(1, 2);
testID = testID.replace(" ", "");
if (testID == "9") {
//alert("추가할 수 없습니다.");
} else {
iChkCnt = iChkCnt + 1;
//parent.putSelId(this.id);
//ie10,11 에서 undefined 문제 해결
var upperdeptname=$(this).attr('upperdeptname');
if(!upperdeptname)upperdeptname='';
parent.putSelId2(this.id,
$(this).attr('deptname'),
$(this).attr('organdeptname'),
upperdeptname);
}
//parent.putSelId(this.id);
});
if (iChkCnt == 0) {
alert('<%=Moumi.getMessageBundle().getString("moumi.message.doc.SubmitDevision")%>'); //제출부서를 선택해주세요.
} else {
try {
$.customIndicator.show(window.parent); // 2014.10.08 by youngjun cho. (loading indicator 추가)
} catch(e) {
alert(e);
}
//오른쪽의 부서 리스트에 표시된다.
parent.document.list.submit();
try {
$.customIndicator.hide(window.parent); // 2014.10.08 by youngjun cho. (loading indicator 추가)
} catch(e) {
alert(e);
}
}
});
//조직도에서 검색된 노드로 포커스를 이동시킨다. strType : down, up
$("#focusMove").click(function() {
var moveType = $("#moveType").text(); //down,up
//alert("moveType = " + moveType);
//1.현재 선택된 object의 offset.top를 구한다.
var NODE = $.jstree._focused().get_selected();
var nodeId = $(NODE).attr("id");
if (nodeId == undefined) {
nodeId = "";
}
var currentObj = $('#' + nodeId);
var currentOffset = currentObj.offset();
var currentOffsetTop = -1;
if (currentOffset != null) {
currentOffsetTop = currentOffset.top;
}
//2.현재 currentOffsetTop 보다 큰 값에 존재하는 id를 찾아서 리턴한다.
var currentNodeId = "";
currentNodeId = getDeptUserId(nodeId, currentOffsetTop, moveType);
//3.리턴된 id가 없다면 메세지를 띄우고 리턴한다.
if (currentNodeId === null || currentNodeId === "") {
alert("더 이상 찾을 수 없습니다.");
return;
}
//4.이전에 선택된 모든 노드를 해제한다.
$('#newTree').jstree('deselect_all');
//5.리턴된 id로 노드를 선택한다.
$("#newTree").jstree("select_node", '#' + currentNodeId); //591
try {
var selectedObj = $('#' + currentNodeId);
var elementOffset = selectedObj.offset();
//alert("[offset.top] : " + elementOffset.top + "\n[offset.left] : " + elementOffset.left);
//ie10,11 및 호환성 보기 까지 전부 동작하도록 수정
var verticalCenterPosition = $(window).height() / 2;
//// 즉시이동
//$("html").scrollTop(elementOffset.top - verticalCenterPosition);
// 부드럽게 이동(500ms)
$("html").animate({
scrollTop: elementOffset.top - verticalCenterPosition
}, 500);
} catch (e) {
alert(e);
}
});
//더블클릭 시에 ...
$("#newTree").bind("dblclick.jstree", function(e, data) {
iChkCnt = 0
var NODE = $.jstree._focused().get_selected();
var nodeId = $(NODE).attr("id");
var deptname = $(NODE).attr("deptname");
var organdeptname = $(NODE).attr("organdeptname");
var upperdeptname = $(NODE).attr("upperdeptname");
if (deptname == undefined) { deptname = ""; }
if (organdeptname == undefined) { organdeptname = ""; }
if (upperdeptname == undefined) { upperdeptname = ""; }
//alert(" nodeId = " + nodeId);
//alert(" deptname = " + deptname);
//alert(" organdeptname = " + organdeptname);
//alert(" upperdeptname = " + upperdeptname);
if (nodeId == undefined) {
return;
}
if (nodeId.length > 10 || nodeId == 'ROOT') { // this.id == 'ROOT')
return;
}
var testID = nodeId;
testID = testID.substring(1, 2);
testID = testID.replace(" ", "");
if (testID == "9") {
} else {
iChkCnt = iChkCnt + 1;
//parent.putSelId(nodeId);
parent.putSelId2(nodeId, deptname, organdeptname, upperdeptname);
}
//parent.putSelId(nodeId);
if (iChkCnt == 0) {
alert('<%=Moumi.getMessageBundle().getString("moumi.message.doc.SubmitDevision")%>'); //제출부서를 선택해주세요.
} else {
//오른쪽의 부서 리스트에 표시된다.
parent.document.list.submit();
}
});
});
//다운,업 버튼 클릭 시 : 2.현재 currentOffsetTop 보다 큰 값에 존재하는 id를 찾아서 리턴한다.
function getDeptUserId(strId, intTop, strType) {
//alert("strId = " + strId + ", intTop = " + intTop + ", strType = " + strType);
var id = "";
var idArray = new Array();
var returnId = "";
var blSearchOk = false;
if (strType === "down") {
$("#newTree").find(".jstree-search").each(function() {
id = $(this).parent("li").attr("id");
if (blSearchOk === false && strId !== id) {
var selectedObj = $('#' + id);
var elementOffset = selectedObj.offset();
if (elementOffset.top > intTop) {
//alert("[offset.top] : " + elementOffset.top + "\n[offset.left] : " + elementOffset.left);
returnId = id
blSearchOk = true;
}
}
});
}
if (strType === "up") {
$("#newTree").find(".jstree-search").each(function() {
idArray.push($(this).parent("li").attr("id"));
});
idArray.reverse();
for (var i = 0; i < idArray.length; i++) {
id = idArray[i].toString();
if (blSearchOk === false && strId !== id) {
var selectedObj = $('#' + id);
var elementOffset = selectedObj.offset();
if (elementOffset.top < intTop) {
//alert("[offset.top] : " + elementOffset.top + "\n[offset.left] : " + elementOffset.left);
returnId = id
blSearchOk = true;
}
}
}
}
return returnId;
}
</script>
</body>
</html>

@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>섹션목록</title>
<link rel="stylesheet" href="../css/kecttep.css" type="text/css">
<script>
function bluring() {
if (event.srcElement.tagName == "A" || event.srcElement.tagName == "IMG")
document.body.focus();
}
document.onfocusin = bluring;
function swapIMG(num) { // 눌렸을 때 이미지 변경
//기본 이미지 셋팅
//document.all["img1"].src="./images/group_b.jpg";
document.all["img1"].src = "./images/group_common_b.jpg";
document.all["img2"].src = "./images/group_area_b.jpg";
document.all["img3"].src = "./images/group_dept_b.jpg";
document.all["img4"].src = "./images/all_b.jpg";
//해당 이미지 활성화
if (num == 1) {
//document.all["img1"].src="./images/group_a.jpg";
document.all["img1"].src = "./images/group_common_a.jpg";
} else if (num == 2) {
//document.all["img1"].src="./images/group_a.jpg";
document.all["img2"].src = "./images/group_area_a.jpg";
} else if (num == 3) {
//document.all["img1"].src="./images/group_a.jpg";
document.all["img3"].src = "./images/group_dept_a.jpg";
} else if (num == 4) {
document.all["img4"].src = "./images/all_a.jpg";
}
}
</script>
</head>
<body style="overflow: hidden;padding: 0; margin: 0;">
<table>
<tr>
<td>
<a href="./newTreeUser.jsp" target="leftFrame">
<img alt="전체" src="./images/all_b.jpg" border="0" id="img4" onClick="swapIMG(4);">
</a>
</td>
</tr>
</table>
</body>
</html>

@ -0,0 +1,521 @@
<!--
페이지 설명 : 연계등록에서 제출기관지정시 사용자 단위로 보여지는 팝업 메뉴
수정작업 : 2013년 6월 25일. 2022.12.14
수정자 : jskim
-->
<%@ page contentType="text/html; charset=UTF-8"
import="java.net.URLDecoder"
import="kr.co.kihyun.lang.MString"
import="kr.co.kihyun.lang.MInteger"
import="kr.co.kihyun.lang.Encoder"
import="kr.co.kihyun.beans.user.User"
import="kr.co.kihyun.moumi.Moumi"%>
<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%>
<%
String deptIDs = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("deptIDs"))), "");
String deptTypes = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("deptTypes"))), "");
//String deptNames = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("deptNames"))), "");
String deptNames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("deptNames")), "UTF-8"),"");
String formName = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("formName"))), "");
int totCount = 0;
String[] deptIDsList = deptIDs.split(",");
if(deptIDs == null || deptIDs == "") {
totCount = 0;
} else {
totCount = deptIDsList.length;
}
//2014.11.07 : Add by KWON,HAN
int deptCount = MInteger.parseInt(request.getParameter("deptCount"), 0);
if(deptCount > 0) {
totCount = deptCount;
}
//++++++++++++++++++++++++++++
%>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>제출부서 선택</title>
<script src="/totsys/common/js/jquery-1.12.4.min.js"></script>
<script src="/totsys/common/js/jquery.cookie.js"></script>
<script src="/totsys/common/js/jquery.hotkeys.js"></script>
<script src="/totsys/common/js/jquery.jstree.js"></script>
<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">
<link rel="stylesheet" href="/totsys/common/css/popup.css" type="text/css">
<link rel="stylesheet" href="/totsys/common/css/basic.css" type="text/css">
<script src="/totsys/common/js/org_search.js"></script>
<script>
var delstate = false;
var userGroup = false; // 사용자정의 그룹인지 여부지정 변수
var selid = ''; // 지금 선택한 부서
var seltype = '';
var selname = '';
var idList = ''; // 선택되어진 부서 리스트
var typeList = '';
var nameList = '';
var orgSearch = new OrgSearch(onNodeCallback);
var focusedButton = null;
$(document).ready(function() {
$("#search").focus();
});
// 부서 추가
function setDepts() {
//2014.11.07 : Update by KWON,HAN
//document.list.idList.value = idList = "<%=deptIDs%>";
//document.list.typeList.value = typeList = "<%=deptTypes%>";
//document.list.nameList.value = nameList = "<%=deptNames%>";
document.list.idList.value = idList = opener.<%= formName%>.deptIDs.value;
document.list.typeList.value = typeList = opener.<%= formName%>.deptTypes.value ;
document.list.nameList.value = nameList = opener.<%= formName%>.deptNames.value;
//===============================
idList = idList + "";
typeList = typeList + "";
nameList = nameList + "";
if (idList != "")
document.list.submit();
/* @@@ test
document.getElementById('search').value = "강원도교육청";
*/
}
//추가 버튼
function getDeptId() {
var $ff = $("#leftFrame");
$ff[0].contentWindow.$("#checkbtn").click();
//top.document.leftFrame.location.reload(); //부서가 추가된후 체크박스들을 초기화 시켜준다.2012.09.28
}
function putSelId(id) {
selid = id;
deptConfirm2();
}
function putSelId2(sId, sDeptName, sOrganDeptName, sUpperDeptName) {
//alert("id = " + sId + ", deptName = " + sDeptName + ", OrganDeptName = " + sOrganDeptName + ", UpperDeptName = " + sUpperDeptName)
selid = sId;
//selname = sOrganDeptName;
//if(!sOrganDeptName.equals(sUpperDeptName)) {
// selname = selname + "-" + sUpperDeptName;
//}
selname = sDeptName + "|" + selid;
//selname = sOrganDeptName + "|" + sUpperDeptName + "|" + sDeptName;
deptConfirm2();
}
// 부서 추가
function deptConfirm() {
if (selid == '')
alert("<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptConfirm")%>");
else if (seltype == "group")
modSelect();
else {
id = selid;
name = selname;
type = seltype;
if (idList == '') {
document.list.idList.value = idList = id;
document.list.typeList.value = typeList = type;
idList = idList + "";
typeList = typeList + "";
} else {
var isAdd = listAdd(idList, id, typeList, type);
document.list.idList.value = idList;
document.list.typeList.value = typeList;
}
document.list.submit();
}
}
function deptConfirm2(id) {
if (selid == '')
alert("<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptConfirm")%>");
else if (seltype == "group")
modSelect();
else {
var id = selid;
//type=seltype;
var type = 'user';
var name = selname;
if (idList == '') {
document.list.idList.value = idList = id;
document.list.typeList.value = typeList = type;
document.list.nameList.value = nameList = name;
idList = idList + "";
typeList = typeList + "";
nameList = nameList + "";
} else {
var isAdd = listAdd(idList, id, typeList, type);
document.list.idList.value = idList;
document.list.typeList.value = typeList;
if (isAdd) {
listAddn(nameList, name);
}
document.list.nameList.value = nameList;
}
//document.list.submit();
}
}
function openerdeptConfirm() { //구성원으로 추가
var gid = document.list.openeridList.value;
var gname = document.list.openernameList.value;
var gtype = document.list.openertypeList.value;
var arrayID = gid.split(",");
var arrayName = gname.split(",");
var arrayType = gtype.split(",");
var isChange = false;
for (var i = 0; i < arrayID.length; i++) {
selid = arrayID[i];
selname = arrayName[i];
seltype = arrayType[i];
if (selid == '') {
alert("<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptConfirm")%>");
} else {
id = selid;
name = selname;
type = seltype;
if (idList == '') {
document.list.idList.value = idList = id;
document.list.typeList.value = typeList = type;
idList = idList + "";
typeList = typeList + "";
} else {
var isAdd = listAdd(idList, id, typeList, type);
document.list.idList.value = idList;
document.list.typeList.value = typeList;
}
isChange = true;
}
}
if (isChange) {
document.list.submit();
}
}
function modSelect() {
var height = screen.height;
var width = screen.width;
var leftpos = width / 2 - 235;
var toppos = height / 2 - 235;
if (seltype != "group") {
alert("<%=Moumi.getMessageBundle().getString("moumi.message.popup.groupSelect")%>");
return;
}
var urlname = "/totsys/common/web/report_dept/modifier.jsp?groupID=" + selid;
post2 = window.open(urlname, "post2", "width=450, height=465, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=" + leftpos + ",top=" + toppos);
post2.focus();
}
function listAdd(idList1, idList2, tList, tItem) {
var arrayID1 = idList1.split(",");
var arrayType = tList.split(",");
var isEquals = true;
if (idList1 == '') {
idList = idList1;
typeList = tList;
return false;
}
for (var i = 0; i < arrayID1.length; i++) {
if (idList2 == arrayID1[i] && tItem == arrayType[i]) {
isEquals = false;
break;
}
}
if (isEquals) {
idList1 += "," + idList2;
tList += "," + tItem;
}
idList = idList1;
typeList = tList;
return isEquals;
}
//부서명을 더한다.
function listAddn(nameList1, nameList2) {
//var arrayName1 = nameList1.split(",");
if (nameList1 == '') {
nameList = nameList1;
return;
}
nameList1 += "," + nameList2;
nameList = nameList1;
return;
}
// 삭제 버튼
function deptDelete() {
if (idList != '') {
deptFrame.movelist();
document.list.submit();
}
}
function leftFrameDel(name, id, type) {
id = lastStrDel(id, ",");
type = lastStrDel(type, ",");
name = lastStrDel(name, ",");
if (idList == '') {
document.list.idList.value = idList = id;
document.list.typeList.value = typeList = type;
document.list.nameList.value = nameList = name;
} else {
delList(id, type, name);
document.list.idList.value = idList;
document.list.typeList.value = typeList;
document.list.nameList.value = nameList;
}
document.list.submit();
}
function lastStrDel(str, delStr) {
var lastStr = str.lastIndexOf(delStr);
return str.substring(0, lastStr);
}
function delList(idList1, tyList1, naList1) {
idList = idList1;
typeList = tyList1;
nameList = naList1;
}
// 부서 선택 시 유저 뽑아내기.
function userList(id, name, type) {
if (type != '') {
idAll = id;
selid = id;
selname = name;
} else {
idAll = '';
selid = '';
selname = '';
}
seltype = type;
idUpper = false;
userGroup = false;
}
function groupList(id, name, type) {
idAll = id;
selid = id;
selname = name;
seltype = type;
idUpper = false;
userGroup = false;
}
function ProcKeyDown() {
keyPressed = String.fromCharCode(window.event.keyCode);
if ((keyPressed == '\r') || (keyPressed == '\n')) {
if (focusedButton == null) {
document.getElementById('nextButton').focus();
}
}
}
function previous() {
alert('prev');
try {
var locationString = document.leftFrame.location + '';
if (locationString.indexOf('groupTree.jsp') !== -1) // onNodeCallback does not works for group_list.jsp yet.
return;
orgSearch.previous(document.searchForm.keyword.value);
} catch (e) {
alert(e);
return;
}
}
function next() {
alert('next');
try {
var locationString = document.leftFrame.location + '';
if (locationString.indexOf('groupTree.jsp') !== -1) // onNodeCallback does not works for group_list.jsp yet.
return;
orgSearch.next(document.searchForm.keyword.value);
} catch (e) {
alert(e);
return;
}
}
function onNodeCallback(node) {
for (i = 0; i < node.pathList.length; i++)
document.leftFrame.openF(node.pathList[i]);
document.leftFrame.selectItem(node.id, node.type);
userList(node.id, node.name, node.type);
}
function searchWord() {
var word = $('#search').val();
word = $.trim(word);
$('#search').val(word);
if (word.length < 2) {
alert("검색어는 2글자 이상이어야 합니다.");
return;
}
var $ff = $("#leftFrame");
$ff[0].contentWindow.$("#searchWord").text(word);
$ff[0].contentWindow.$("#search").click();
}
//조직도에서 검색된 노드로 포커스를 이동시킨다. strType : down, up
function focusMove(strType) {
//alert("strType = " + strType);
var $ff = $("#leftFrame");
$ff[0].contentWindow.$("#moveType").text(strType); //포커스이동타입
$ff[0].contentWindow.$("#focusMove").click();
}
//확인 버튼
function deptComp() {
if (<%=totCount%>==0 && document.list.idList.value == "") {
alert('<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptComp")%>'); //제출요청 부서를 추가 해 주세요
return false;
} else {
//전체 삭제를 한 경우에 확인메세지를 띄운다.
if (document.list.idList.value == "") {
//정말로 삭제 하시겠습니까?
if (!confirm('<%=Moumi.getMessageBundle().getString("moumi.message.popup.deletion")%>')) {
return false;
}
}
//*** 선택된 부서는 부모창에 변수에 저장되지만 DB에는 저장하지 않는다. 즉, 문서생성 완료시에 DB에 저장된다.
opener.<%= formName%>.deptIDs.value = document.list.idList.value;
opener.<%= formName%>.deptTypes.value = document.list.typeList.value;
opener.<%= formName%>.deptNames.value = document.list.nameList.value;
// var deptTemp = document.list.idList.value.split(",");
// deptCounter = deptTemp.length;
//
// opener.<%= formName%>.deptCountText.value = deptCounter + "<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptCounter")%>";
//
var deptTemp = '';
var deptCounter = 0;
if (document.list.idList.value != null && document.list.idList.value != "") {
deptTemp = document.list.idList.value.split(",");
}
if (deptTemp != null && deptTemp != '') {
deptCounter = deptTemp.length;
}
//2014.11.07 : Add by KWON,HAN
opener.<%= formName%>.deptCount.value = deptCounter;
//+++++++++++++++++++++++++++++++
if(deptCounter <= 0) {
opener.<%= formName%>.deptCountText.value = '<%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.submitDevision")%>'; //제출기관을 선택해주세요.
} else {
opener.<%= formName%>.deptCountText.value = deptCounter + '<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptCounter")%>'; //개의 부서를 선택하였습니다.
}
window.close();
}
}
//취소 버튼
function deptCancel() {
window.close();
}
</script>
</head>
<body onload="setDepts();">
<form name="list" method="post" action="/servlet/kr.co.kihyun.beans.user.HttpUserDocList" target="deptFrame">
<input type="hidden" name="idList">
<input type="hidden" name="seltype">
<input type="hidden" name="typeList">
<input type="hidden" name="nameList">
<input type="hidden" name="deptNameList">
<input type="hidden" name="openeridList">
<input type="hidden" name="openernameList">
<input type="hidden" name="openertypeList">
</form>
<!--타이틀 //-->
<div class="title">
<div><%=Moumi.getMessageBundle().getString("moumi.message.button_large.submitDept")%></div>
</div>
<!--타이틀 //-->
<div class="disFlex lv1">
<div class="deptListSide">
<img alt="말머리" src="/totsys/common/images/ico_3.gif">
<b><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.deptMap")%></b>
</div>
<div class="deptListCenter"></div>
<div class="deptListSide"><img alt="말머리" src="/totsys/common/images/ico_3.gif"><b>제출기관(부서)<!--%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.submitDept")%--></b></div>
</div>
<div class="disFlex ml_5">
<!-- 분류 선택 아이프레임 -->
<iframe src="iframe/new_section_list4.html" width="300" height="21"></iframe>
</div>
<div class="disFlex">
<div class="deptListSide">
<!-- 부서 선택 아이프레임 -->
<iframe id="leftFrame" name="leftFrame" src="./iframe/newTreeUser.jsp"></iframe>
</div>
<div class="deptListCenter center deptPt">
<div>
<!--추가-->
<a href="javascript:getDeptId();"><img alt="추가" src="./images/new_dept_add.gif"/></a>
</div>
<div class="mt_5">
<!--삭제-->
<a href="javascript:deptDelete();"><img alt="삭제" src="./images/new_dept_del.gif"/></a>
</div>
</div>
<div class="deptListSide">
<!-- 선택된 부서 리스트 아이프레임 -->
<iframe name="deptFrame" src="./iframe/selected_list.jsp"></iframe>
</div>
</div>
<table>
<tr>
<td> 검 색 &nbsp;</td>
<td><input id="search" name="search" type="text" class="inputtxt" value="" size="35" onkeyDown="if(event.keyCode === 13) { searchWord(); }" style="ime-mode:active;">&nbsp;</td>
<td><a href="#" onclick="searchWord();"><img alt="찾기" src="/totsys/common/images/bt_search_inquiry2.gif"></a>&nbsp;</td>
<td><a href="#" onclick="focusMove('down');"><img alt="다음" src="/totsys/common/images/bt_down.jpg"></a>&nbsp;</td>
<td><a href="#" onclick="focusMove('up');"><img alt="이전" src="/totsys/common/images/bt_up.jpg"></a></td>
<td></td>
</tr>
</table>
<!-- 확인, 취소 버튼 -->
<div class="center mt_10" style="border-top: 1px solid #8ea6d6">
<div class="mt_10">
<a href="#" onclick="deptComp()"><img alt="확인" src="/totsys/common/images/bt_ok.gif"></a>
<a href="#" onClick="deptCancel()"><img alt="취소" class="ml_5" src="/totsys/common/images/bt_cancle.gif"></a>
</div>
</div>
</body>
</HTML>

@ -809,7 +809,7 @@
<form name="NotDoc" method="post" action="/servlet/kr.co.kihyun.beans.totsys.repoper.HttpNotUpdate">
<input type="hidden" name="reportID" value="<%= reportID%>">
</form>
<form name="subReg" action="/totsys/totper/mydocbox/regbox/sub_doc_regist.jsp" method="post">
<form name="subReg" action="/totsys/totper/mydocbox/regbox/sub_doc_user_regist.jsp" method="post">
<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)%>">

@ -0,0 +1,728 @@
<% /**
* **********************************************************@@ Program Name
* sub_doc_user_regist.jsp Description : 접수자료/연계등록
* Author : jskim
* Date : 2022.12.14
* History : 경북대학교 연계등록시 사용자단위 취합
* @@***********************************************************
*/
%>
<%@ page contentType="text/html; charset=UTF-8"
import="java.util.Calendar"
import="java.net.URLEncoder"
import="java.util.Date"
import="java.text.SimpleDateFormat"
import="kr.co.kihyun.beans.user.HttpSSOLogin"
import="kr.co.kihyun.lang.Encoder"
import="kr.co.kihyun.lang.MString"
import="kr.co.kihyun.lang.MInteger"
import="kr.co.kihyun.lang.MLong"
import="kr.co.kihyun.moumi.MoumiConfig"
import="kr.co.kihyun.moumi.doc.MDoc"
import="kr.co.kihyun.lang.StringConverter"
import="kr.co.kihyun.text.html.TagFilter"
import="javax.jdo.PersistenceManager"
import="javax.jdo.Transaction"
import="kr.co.kihyun.beans.entity.util.*"
import="kr.co.kihyun.beans.entity.*"
import="kr.co.kihyun.beans.entity.TotDocType"
%>
<%@ 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 deptID = HttpSSOLogin.getDeptID(request);
/**
* ********** Parameter values ***********
*/
Long reportID = MLong.parseLong(request.getParameter("reportID"), null);
String totType = clearXSS(request.getParameter("totType"), "");
Long downDocID = MLong.parseLong(request.getParameter("downDocID"), null);
String boxName = MString.checkNull(request.getParameter("boxName"));
if (MString.isNull(totType) || totType.equals("")) {
totType = "1step";
}
String tmpMagam = MString.checkNull(request.getParameter("tmpMagam"));
String strPage = clearXSS(request.getParameter("strPage"),"");
String findOption = clearXSS(request.getParameter("findOption"),null);
String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),null);
TotReport totReport = pm.getObjectById(TotReport.class, reportID);
String usrFilenames = "";
String svrFilenames = "";
int fileCount = 0;
tx.begin();
/**
* **** Doc list data get *****
*/
TotDoc totDoc = totReport.getTotDoc();
String docName = totDoc.getName();
String docForm = totDoc.getForm();
String regID = totDoc.getUser(pm).getId();
Date startDate = totDoc.getStartDate();
Date endDate = totDoc.getEndDate();
AccessAuth accAuth = totDoc.getAccessAuth();
TotDoc.TotRange totRange = totDoc.getTotRange();
Board board = totDoc.getBoard();
for (Entry<String, List<Byte>> entry : board.getAttachments().entrySet()) {
usrFilenames += entry.getKey() + ";";
svrFilenames += entry.getKey() + ";";
}
fileCount = board.getAttachments().size();
tx.rollback();
/**
* ******** 시작, 종료 년, 월, 일 *********
*/
String stDate = startDate == null ? "" : new SimpleDateFormat("yyyy-MM-dd").format(startDate);
String stTime = startDate == null ? "" : new SimpleDateFormat("HH").format(startDate);
String edDate = new SimpleDateFormat("yyyy-MM-dd").format(endDate);
String edTime = new SimpleDateFormat("HH").format(endDate);
%>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title><%=MoumiConfig.getTitle()%></title>
<link rel="stylesheet" href="/totsys/common/css/contentStyle.css" type="text/css">
<link rel="stylesheet" href="/totsys/common/css/basic.css" type="text/css">
<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/tabs.css" type="text/css">
<link href="/totsys/common/css/SquareButtons.css" rel="stylesheet" type="text/css">
<script src="/totsys/common/js/rollover.js"></script>
<script src="/totsys/common/js/util.js"></script>
<script src="/totsys/common/js/calendar.js"></script>
<script src="/totsys/common/js/drag.js"></script>
<script src="/totsys/common/js/date.js"></script>
<script src='/totsys/common/js/mouse.js'></script>
<script src='/totsys/common/js/editor.js'></script>
<script src="/totsys/common/js/jquery-1.12.4.min.js"></script>
<script src="/totsys/common/js/jquery.custom.indicator.js"></script>
<script>
/*
* 목록페이지로 이동처리하는 함수
*/
function fn_goToList() {
document.listForm.submit();
}
function setValue() {
if ("<%= docName%>" != "") {
dform.docName.value = "<%= docName%>";
dform.accAuth["<%= accAuth.ordinal()%>"].checked = true;
dform.stDate.value = "<%= stDate%>";
dform.stTime.value = "<%= stTime%>";
dform.edDate.value = "<%= edDate%>";
dform.edTime.value = "<%= edTime%>";
}
}
function formSubmit() {
//ban lower case var ext = fn.substring(fn.indexOf('.')+1,fn.length).toLowerCase();
if (dform.docName.value == '') {
alert('<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.dataNameCheck")%>');
dform.docName.focus();
return;
//}else if (containsChars(dform.docName,'₩/?"<>|!,*&^%$#@~;')) {
} else if (containsChars(dform.docName, '₩/|^$#@')) {
alert('<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.dataNameSymboleCheck")%>');
dform.docName.focus();
return;
} else if (dform.accAuth[0].checked == false && dform.accAuth[1].checked == false && dform.accAuth[2].checked == false && dform.accAuth[3].checked == false) {
alert('<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.docAuth")%>');
return;
} else if ((dform.stDate.value == '') || (dform.stTime.value == '')) {
alert('<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.startDateCheck")%>');
dform.stDate.focus();
return;
} else if ((dform.edDate.value == '') || (dform.edTime.value == '')) {
alert('<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.endDateCheck")%>');
dform.edDate.focus();
return;
} else if (isDateTrue(dform.stDate.value, dform.stTime.value, dform.edDate.value, dform.edTime.value)) {
alert('<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.startEndDateCheck")%>');
return;
} else if (dform.stDate.value < '<%=stDate%>') {
alert('<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.notTotdocStartDate")%>');
return;
} else if (dform.edDate.value > '<%=edDate%>') {
alert('<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.notTotdocEndDate")%>');
return;
} else if (dform.deptIDs.value.length == '') {
alert('<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.deptComp")%>');
deptSelect();
return;
} else {
dform.copyForm.value = EditCtrl.document.body.innerHTML;
var messge = confirm('<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.confirmTocdocStartTrue")%>');
if (messge) {
var cfm = confirm('<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.confirmTocdocStart")%>');
if (cfm) {
dform.submit();
// 2014.10.21 By YoungJun Cho. (연계등록 집계시작시 indicator 띄우기)
$.customIndicator.show(window.self);
}
} else {
return;
}
}
}
function isDateTrue(stDate, stTime, edDate, edTime) {
if (stDate < edDate) {
return false;
} else if (stDate == edDate) {
if (stTime < edTime)
return false;
}
return true;
}
function containsChars(input, chars) {
for (var inx = 0; inx < input.value.length; inx++) {
if (chars.indexOf(input.value.charAt(inx)) != -1)
return true;
}
return false;
}
function insertForm() {
init();
EditCtrl.document.body.innerHTML = '<%=StringConverter.toOneLine(TagFilter.convertSingle(docForm))%>';
//ie10,11 호환성보기 수정 - 테두리 없어지는 문제 수정
$(EditCtrl.document.body).find('> table').attr({'border':'1','bo':'true'}).css('border','1px solid #000')
.find('td').each(function(i,o){
if($(o).closest('table').attr('bo')=='true'){
$(this).css('border','1px solid #000');
}
});
}
function totRange1() {
//alert(document.dform.totRange[0].value);
document.dform.deptIDs.value = "";
document.dform.deptNames.value = "";
document.dform.deptTypes.value = "";
document.dform.handyName.value = "";
document.dform.handyName.readOnly = false;
document.dform.deptCountText.value = "<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submitDevision")%>";
}
function totRange2() {
//alert(document.dform.totRange[1].value);
document.dform.deptIDs.value = "";
document.dform.deptNames.value = "";
document.dform.deptTypes.value = "";
document.dform.handyName.value = "";
document.dform.handyName.value = "<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.innerTot_doc")%>";
document.dform.handyName.readOnly = true;
document.dform.deptCountText.value = "<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submitDevision")%>";
}
function showMsgAlert() {
location.href = "/totsys/repoper/mydocbox/tempbox/<%if (downDocID == null) {%>report_regist.jsp<%} else {%>tot_report_regist.jsp<%}%>?reportID=<%= reportID%>&downDocID=<%= downDocID%>&deptID=<%=deptID%>&tmpMagam=<%=tmpMagam%>";
}
function showAlert() {
location.href = "/totsys/repoper/mydocbox/tempbox/<%if (downDocID == null) {%>report_regist.jsp<%} else {%>tot_report_regist.jsp<%}%>?reportID=<%= reportID%>&downDocID=<%= downDocID%>&deptID=<%=deptID%>&tmpMagam=<%=tmpMagam%>";
}
/*
* 자료입력페이지로 이동처리하는 함수
* @returns {undefined}
*/
function fn_goToInputForm() {
document.inputForm.submit();
}
function inputText() {
window.open('./popup_input_form.jsp', 'makepoll', 'width=900,height=550,scrollbars=yes,resizable=yes,statusbar=yes');
}
function setStartNow() {
dform.prss.value = 'PRSS';
document.dform.stDate.value = '<%= stDate%>';
document.dform.stTime.value = '<%= stTime%>';
document.getElementById('startDate').style.display = 'none';
}
function setStartDate() {
dform.prss.value = 'PRSS';
document.dform.stDate.value = '<%= stDate%>';
document.dform.stTime.value = '<%= stTime%>';
document.getElementById('startDate').style.display = 'inline';
}
function setStartManually() {
document.getElementById('startDate').style.display = 'none';
dform.prss.value = 'REG';
document.dform.stDate.value = '<%= stDate%>';
document.dform.stTime.value = '<%= stTime%>';
}
function setEndDate() {
document.getElementById('endDate').style.display = 'inline';
document.getElementById('submitLimit').style.display = 'none';
}
function setSubmitLimit() {
document.getElementById('endDate').style.display = 'none';
document.getElementById('submitLimit').style.display = 'inline';
dform.submitLimit.focus();
}
function validateSubmitLimit() {
if (isNaN(dform.submitLimit.value)) {
alert('숫자만 입력하시기 바랍니다.');
dform.submitLimit.value = 0;
}
}
function setWriteLimit() {
document.getElementById('endDate').style.display = 'none';
document.getElementById('submitLimit').style.display = 'none';
}
function setEndManually() {
document.getElementById('endDate').style.display = 'none';
document.getElementById('submitLimit').style.display = 'none';
}
</script>
<OBJECT class="blind" id=fleck classid=CLSID:F5BE8BD2-7DE6-11D0-91FE-00C04FD701A5></OBJECT>
<script>
function deptSelect() {
var urlname = "/totsys/common/web/report_dept/new_user_list2.jsp?formName=dform&section=1&deptIDs=" + dform.deptIDs.value + "&deptNames=" + dform.deptNames.value + "&deptTypes=" + dform.deptTypes.value;
var height = screen.height;
var width = screen.width;
var leftpos = width / 2 - 350;
var toppos = height / 2 - 350;
alert('자신이 속한 교육지원청/직속기관의 자료를 입력할 경우 제출기관으로 지정하셔야 합니다');
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();
}
//2014.11.07 : Add by KWON,HAN
function deptSelect2() {
alert('자신이 속한 교육지원청/직속기관의 자료를 입력할 경우 제출기관으로 지정하셔야 합니다');
//2014.11.07 : Delete, Add by KWON,HAN
//etc2.deptIDs.value=dform.deptIDs.value;
//etc2.deptTypes.value=dform.deptTypes.value;
////etc2.deptNames.value=dform.deptNames.value;
//etc2.deptNames.value = encodeURL(dform.deptNames.value);
etc2.deptCount.value = dform.deptCount.value;
//===============================
var height = screen.height;
var width = screen.width;
var leftpos = width / 2 - 350;
var toppos = height / 2 - 350;
post2= window.open("","post2","width=900,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left="+leftpos+",top="+toppos);
etc2.target="post2";
etc2.submit();
}
</script>
</head>
<body onload="setValue();dform.docName.focus();">
<form name="listForm" method="post" action="/totsys/repoper/mydocbox/returnbox/report_list.jsp">
<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)%>">
</form>
<form name="inputForm" method="post" action="/totsys/repoper/mydocbox/tempbox/report_regist.jsp"">
<input type="hidden" name="reportID" value="<%= reportID %>">
<input type="hidden" name="totperInfo" value="true">
<input type="hidden" name="tmpMagam" value="<%= tmpMagam %>">
<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)%>">
</form>
<div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<jsp:include page="/totsys/common/inc/totper/top/top.jsp" flush="true" />
<jsp:include page="/totsys/common/inc/title/title.jsp" flush="true" />
</table>
</div>
<div id="header">
<ul id="primary">
<!-- ie10,11 에서 호환성 보기 문제 수정 a,span 태그에 스타일 추가 -->
<!-- <li>
<a style="padding: 0px; line-height: 25px;"
href="/totsys/repoper/mydocbox/returnbox/report_view.jsp?reportID=<%= reportID%>&boxName=<%= boxName%>"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.information")%>
</a>
</li>-->
<li>
<a href="#" onClick="fn_goToInputForm();" style="padding: 0px; line-height: 25px;">
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.input")%>
</a>
</li>
<%if (MoumiConfig.is2Step()) {%>
<li>
<span style="padding: 0px; line-height: 25px;" class="kecttep_menu_focous"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.subDocRegist")%></span>
</li>
<%}%>
</ul>
</div>
<div id="main">
<div id="contents">
<table>
<tr style="vertical-align: middle;" class="toolbar">
<td colspan="4" style="text-align: left;">
<table>
<tr>
<td>
<!--<img src="/totsys/common/images/bt_list.gif" alt="목록" />-->
<a href="#" onclick="fn_goToList();">
<img src="/totsys/common/images/bt_doc_list.gif" alt="<%= MoumiConfig.getMessageBundle().getString("moumi.message.doc")%><%= MoumiConfig.getMessageBundle().getString("moumi.message.button.boardList")%>" />
</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="height: 10px;"></td>
</tr>
<!-- 집계자 정보 시작 -->
<jsp:include page="/totsys/common/inc/totper/totper.jsp" flush="true">
<jsp:param name="docID" value='<%= totReport.getTotDoc().getId()%>' />
</jsp:include>
<!-- 집계자 정보 끝 -->
<tr style="height: 10px;">
<td style="height: 10px;"></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="4">
<table>
<tr>
<td style="width: 14px;"><img alt="글머리" src="/totsys/common/images/ico_3.gif"></td>
<td class="kecttep_title" style="padding-left: 5px; text-align: left; width: 100%;">
<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.registrition")%>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td style="height: 3px;"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4">
<form name="etc2" method="post2" action="/totsys/common/web/report_dept/new_user_list2.jsp">
<input type="hidden" name="formName" value="dform">
<input type="hidden" name="section" value="1">
<input type="hidden" name="deptTypes">
<input type="hidden" name="deptNames">
<input type="hidden" name="deptIDs">
<input type="hidden" name="deptCount">
</form>
<!-- 문서등록 시작 -->
<!--form name="dform" action="/totsys/common/web/report_dept/dept_list_subReg.jsp" method="post"-->
<form name="dform" action="/servlet/kr.co.kihyun.beans.totsys.doc.HttpSubDocUserRegist" method="post">
<input type="hidden" name="docGroupID" value="<%= MDoc.TOT_DOC%>">
<input type="hidden" name="prss" value="PRSS">
<input type="hidden" name="copyForm">
<input type="hidden" name="deptIDs">
<input type="hidden" name="deptNames">
<input type="hidden" name="deptCount">
<input type="hidden" name="reportID" value="<%= reportID%>">
<input type="hidden" name="docForm" value='<%=StringConverter.toOneLine(TagFilter.convertSingle(docForm))%>'>
<input type="hidden" name="stDate" value="<%=stDate%>">
<input type="hidden" name="stTime" value="<%=stTime%>">
<input type="hidden" name="choice">
<input type="hidden" name="userIDs">
<input type="hidden" name="deptTypes">
<input type="hidden" name="notify" value="<%= totDoc.getBoard().getContents()%>">
<input type="hidden" name="fileCount" value="<%=fileCount%>">
<input type="hidden" name="usrFilenames" value="<%=usrFilenames%>">
<input type="hidden" name="svrFilenames" value="<%=svrFilenames%>">
<input type="hidden" name="fileInfos"> <!--세미타이틀-->
<table class="kecttep_list_table">
<tr>
<td class="kecttep_tdmenu_middle" style="padding-left: 20px; width: 150px;">
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.name")%>
</td>
<td class="kecttep_last_graytd" style="padding-left: 10px; padding-right: 10px; width:100px;">
<input name="docName" type="text" class="inputtxt" size="100">
</td>
<td class="kecttep_tdmenu_middle" style="padding-left: 20px; width: 150px;">
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.executionCode")%>
</td>
<td class="kecttep_last_graytd" style="padding-left: 10px; ">
<%= HttpSSOLogin.getDeptName(request)%>_
<input name="execNum" type="text" class="inputtxt" style="width: 60px">
(<input name="execDate" type="text" size="10"
readonly onclick="showSetWin('dform.execDate');"
style="cursor: hand;" class="inputtxt"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.day")%>&nbsp;
<a href="#" onclick="showSetWin('dform.execDate');">
<img src="/totsys/common/images/date.gif" align="middle">
</a>)
</td>
</tr>
<tr>
<td class="kecttep_tdmenu_middle" style="width: 150px; padding-left: 20px;">
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.dataInputDevision")%>
</td>
<td class="kecttep_last_graytd" style="padding-left: 10px;">
<!-- Begin : 제출기관지정 버튼 //-->
<a href="#" onclick="javascript:deptSelect2();">
<span style="width: 99px; cursor: pointer;">
<!--<img src="/totsys/common/images/person.png" height="12">&nbsp;-->
<img src="/totsys/common/images/bt_dept_select2.gif" height="24" alt="<%=MoumiConfig.getMessageBundle().getString("moumi.message.button_large.submitDept")%>">
</span>
</a>
<!--// End : 제출기관지정 버튼 -->
<input name="deptCountText"
type="text"
style="width: 200px; border: 0; color: black; padding-top: 3px; padding-left: 2px;"
value="&nbsp;<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submitDevision")%>">
</td>
<td class="kecttep_tdmenu_middle" style="width: 120px; padding-left: 20px;">
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.input")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.trick")%>
</td>
<td class="kecttep_last_graytd" style="padding-left: 10px;">
<a href="#" onClick="javascript:inputText();">
<img src="/totsys/common/images/bt_psd.gif" alt="<%=MoumiConfig.getMessageBundle().getString("moumi.message.button_large.inputWrite")%>" />
</a>
</td>
</tr>
<!--자료공유범위-->
<tr>
<td class="kecttep_tdmenu_middle" style="width: 120px; padding-left: 20px; vertical-align: middle;">
<%=MoumiConfig.getMessageBundle().getString("moumi.message.doc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.type.share")%>
</td>
<td colspan="3" class="kecttep_last_graytd" style="padding-left: 15px; border-bottom: 1px solid rgb(238, 238, 238); width: 500px;">
<label class="label-cotent1" onmouseover="balloon_on('문서를 생성한 담당자만 취합자료 관리',this,5,0)" onmouseout="balloon_off()">
<input name="accAuth" value="0" type="radio"<%= "0".equals(accAuth) ? " checked" : ""%>>
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.personal")%>
</label>
<label class="label-cotent1" onmouseover="balloon_on('문서를 생성한 담당자와 동일 부서 사용자에게 취합자료 공유',this,5,0)" onmouseout="balloon_off()">
<input name="accAuth" value="1" type="radio"<%= "1".equals(accAuth) ? " checked" : ""%>>
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.devision")%>
</label>
<label class="label-cotent1" onmouseover="balloon_on('문서를 생성한 담당자와 동일 기관 사용자에게 취합자료 공유',this,5,0)" onmouseout="balloon_off()">
<input name="accAuth" value="2" type="radio"<%= "2".equals(accAuth) ? " checked" : ""%>>
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.coporation")%>
</label>
<label class="label-cotent1" onmouseover="balloon_on('전체 기관 사용자에게 취합 자료 공유(학교사용자 제외)',this,5,0)" onmouseout="balloon_off()">
<input name="accAuth" value="3" type="radio"<%= "3".equals(accAuth) ? " checked" : ""%>>
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.all")%>
</label>
</td>
</tr>
<tr>
<td class="kecttep_tdmenu" style="width: 120px; padding-left: 20px;" >
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.endMethod")%>
</td>
<td colspan="3" class="kecttep_last_graytd_bottom" style="padding-left: 10px;">
<!--// 종료일지정 선택 -->
<label>
<input type="radio" name="acceptanceLimitStrategy" onclick="setEndDate();" value="<%= LimitByDeadlineStrategy.class.getSimpleName()%>" checked />
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.endScheduled")%>
</label><!-- 종료일지정 선택 //-->
<!--// 종료일지정 입력 -->
<span id="endDate" style="display: inline; vertical-align: top;">
&nbsp;
<input name="edDate" type="text" size="10" value="<%=edDate%>" readonly onclick="showSetWin('dform.edDate');" style="cursor: pointer;" class="inputtxt" />
<span style="display: inline-block; vertical-align: top; padding-top: 3px;">
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.day")%>&nbsp;
</span>
<a href="#" onclick="showSetWin('dform.edDate');">
<img src="/totsys/common/images/date.gif" />
</a>&nbsp;
<input name="edTime" type="text" size="3" maxlength="2" value="<%=edTime%>" onclick="this.focus(); this.select();" onBlur="checkNum(this, '2'); checkMaxNum(this, 00, 23);" class="inputtxt" />
<span style="display: inline-block; vertical-align: top; padding-top: 3px;">
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.time")%>
</span>
</span><!-- 종료일지정 입력 //-->
<!--// 선착순종료 선택 -->
<label>
&nbsp;
<input type="radio" name="acceptanceLimitStrategy" onclick="setSubmitLimit();" value="<%= LimitBySubmitDateStrategy.class.getSimpleName()%>" />
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.endBySubmitCount")%>
</label><!-- 선착순종료 선택 //-->
<!--// 선착순종료 입력 -->
<label>
<span id="submitLimit" style="display: none;">
&nbsp;
<input type="text" name="submitLimit" onfocus="this.select();" onblur="checkNum(this, '2');" class="inputtxt" style="width: 2em; text-align: right;" value="0"/>
<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.coporation")%>
</span>
</label><!-- 선착순종료 입력 //-->
<!--// 수동종료 선택 -->
<label>
&nbsp;
<input type="radio" name="acceptanceLimitStrategy" onclick="setEndManually();" value="<%= UnlimitStrategy.class.getSimpleName()%>" />
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.endManually")%>
</label><!-- 수동종료 선택 //-->
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td style="height: 10px;"></td>
</tr>
<!-- 문서등록 끝-->
<tr>
<%--파일취합일경우 붙여넣기 영역 표시안함 --%>
<td colspan="4" style="height: 200px; border: 1px solid black;<%=totDoc.getAppendType()!=TotDocAppendType.FILE?"":"display:none;" %>">
<form name="gocomp0" action="/Mail-bin/send_mail.frame" method=post>
<input type="hidden" name=What value=0>
<input type="hidden" name=BODY>
<input type="hidden" name=CMD value=''>
<input type="hidden" name=MSGID value=''>
<input type="hidden" name=TO>
<input type="hidden" name=CC>
<input type="hidden" name=BCC>
<input type="hidden" name=SUBJECT>
<input type="hidden" name=XSUBJECT value=''>
<input type="hidden" name=PID value='11295'>
</form>
<FORM name=Mail_Form target=_parent method=post
action="/Mail-bin/start_mail/simplehtml">
<input type="hidden" name=SENDACTION value="">
<input type="hidden" name=RESV_Y value="">
<input type="hidden" name=RESV_M value="">
<input type="hidden" name=RESV_D value="">
<input type="hidden" name=RESV_H value="">
<input type="hidden" name=ISLINEANS value="">
<input type="hidden" name=PID value="11295">
<input type="hidden" name=MSGID value=>
<input type="hidden" name=LINKURL value="">
<input type="hidden" name=LINKCOMMENT value="">
<input type="hidden" name=KEYWORD value="">
<input type="hidden" name=KEYTYPE value="">
<input type="hidden" name=FOLDER value="">
<input type="hidden" name=mpage value="">
<input type="hidden" name=UseCompose value="">
<iframe id='i_fontcolor'
style='background-color: #ffffff; border: 1px double #BFBFBF; cursor: hand; position: absolute; visibility: hidden;'
scrolling=no frameborder=0 width=120 height=120></iframe>
<iframe
id='i_backcolor'
style='background-color: #ffffff; border: 1px double #BFBFBF; cursor: hand; position: absolute; visibility: hidden;'
scrolling=no frameborder=0 width=120 height=120></iframe>
<iframe
id='i_image'
style='color: #000000; background-color: #efefef; border: 1px double #BFBFBF; cursor: default; position: absolute; visibility: hidden;'
scrolling=no frameborder=0 width=325 height=85></iframe>
<iframe
id='i_link'
style='color: #000000; background-color: #efefef; border: 1px double #BFBFBF; cursor: default; position: absolute; visibility: hidden;'
scrolling=no frameborder=0 width=325 height=70></iframe>
<iframe
id='i_emoticon'
style='background-color: #efefef; border: 1px double #BFBFBF; cursor: hand; position: absolute; visibility: hidden;'
scrolling=no frameborder=0 width=125 height=125>
</iframe>
<div id='editctrl' style='display: block; width: auto; height: auto;'>
<iframe
name='EditCtrl' width='100%' height='100%' scrolling='YES'
onfocus='layeroff();' onblur='nowkong.SaveSelection();'
frameborder="0" disabled>
</iframe>
</div>
<input type="hidden" name=FORSAVE
value="&lt;HEAD&gt;
&lt;STYLE&gt;
P {margin-top:2px;margin-bottom:2px;}
&lt;/STYLE&gt;
&lt;/HEAD&gt;
&lt;BODY oncontextmenu='return false;' style='background-color: ; background-image: url(); ' topmargin=11 leftmargin=11&gt;
&lt;/BODY&gt;">
<input type="hidden" name=BODY value="">
<input type="hidden" name=BODYBG value="">
<input type="hidden" name=BODYBGC value="">
</FORM>
<script>
init();
insertForm();
</script>
</td>
</tr>
<tr>
<td colspan="4" style="padding-top: 11px; text-align: center; vertical-align: top;">
<!-- 이전, 다음단계 -->
<table>
<tr>
<td>
<a href="#" onclick="formSubmit();" name="bt_next">
<img src="/totsys/common/images/bt_input_write.gif" alt="<%= MoumiConfig.getMessageBundle().getString("moumi.message.button_large.startNow")%>"/>
</a>
<a href="#" onclick="history.go(-7);">
<img src="/totsys/common/images/bt_cancle.gif" alt="<%=MoumiConfig.getMessageBundle().getString("moumi.message.button_large.cancel")%>" />
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
<!-- top menu start -->
<%@ include file="/totsys/common/inc/buttom/buttom.jsp"%>
<!-- top menu end -->
</body>
<div id="SetWin" style="position: absolute; Visibility: hidden; width: 100px; height: 100px; background: silver; border: 1px #333333 solid; line-height: 1.4em; padding: 3px 3px"></div>
</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 {
/**
* ******** session내의 doc info reset *********
*/
MDoc.initSession(session);
if (tx.isActive()) {
tx.rollback();
}
pm.close();
}
%>
Loading…
Cancel
Save