SignLineUtil.java 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package kr.co.udapsoft.common.util;
  2. import kr.co.hsnc.common.logger.Logger;
  3. import kr.co.hsnc.common.sql.RowSet;
  4. import kr.co.hsnc.common.sql.RowSetImpl;
  5. import kr.co.hsnc.common.sql.WAFSQLException;
  6. import kr.co.hsnc.common.sql.search.Search;
  7. import kr.co.hsnc.common.sql.search.SearchImpl;
  8. public class SignLineUtil {
  9. /**
  10. * 2018.11.28
  11. * 이인오
  12. * 그룹웨어 결재라인조회
  13. * @param docId
  14. * @return
  15. * @throws Exception
  16. */
  17. public static RowSet getSignUser(String docId) throws Exception {
  18. Search search = new SearchImpl();
  19. search.setDSName("jdbc/gwsql");
  20. RowSet rowSet = new RowSetImpl();
  21. StringBuffer sqlstr = new StringBuffer();
  22. try {
  23. sqlstr.append(" SELECT APRSTATE AS SIGN_RESULT \n");
  24. sqlstr.append(" ,REPLACE(APRMEMBERID,SUBSTRING(APRMEMBERID,1,4),'') AS APPROVAL_SABUN \n");
  25. sqlstr.append(" ,APRMEMBERNAME AS APPROVAL_USER \n");
  26. sqlstr.append(" ,APRMEMBERJOBTITLE AS A_POSITION \n");
  27. sqlstr.append(" ,REPLACE(CONVERT(VARCHAR(10),PROCESSDATE,120),'','') AS APPROVAL_DATE \n");
  28. sqlstr.append(" FROM TBENDAPRLINEINFO \n");
  29. sqlstr.append(" WHERE APRTYPE = 'A03001' \n");
  30. sqlstr.append(" AND DOCID = ? \n");
  31. sqlstr.append(" ORDER BY APRMEMBERSN \n");
  32. search.setStatement(sqlstr.toString());
  33. search.addParameter(docId);
  34. rowSet = search.execute();
  35. }catch(WAFSQLException se) {
  36. Logger.err.println("SQL : \n" + se.getStatement());
  37. Logger.err.println("PARAM : \n" + se.getParameter());
  38. throw se;
  39. }
  40. return rowSet;
  41. }
  42. }