parent
4046654459
commit
79035b9202
15
pom.xml
15
pom.xml
|
|
@ -130,11 +130,16 @@
|
|||
<version>1.0.0.GA</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sf</groupId>
|
||||
<artifactId>log4jdbc3</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>net.sf</groupId>-->
|
||||
<!-- <artifactId>log4jdbc3</artifactId>-->
|
||||
<!-- <version>1.1</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.bgee.log4jdbc-log4j2</groupId>
|
||||
<artifactId>log4jdbc-log4j2-jdbc4.1</artifactId>
|
||||
<version>1.16</version>
|
||||
</dependency>
|
||||
|
||||
<!-- validation -->
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ public class CommonController {
|
|||
LoginUserVO loginUserVO = UserUtil.getMemberInfo();
|
||||
ReportSearchVO reportSearchVO = new ReportSearchVO();
|
||||
reportSearchVO.setRecordCountPerPage(5);
|
||||
reportSearchVO.setType(loginUserVO.getType());
|
||||
reportSearchVO.setType(Integer.toString(loginUserVO.getType()));
|
||||
reportSearchVO.setUserid(loginUserVO.getUserid());
|
||||
//최근 1달치
|
||||
Calendar mon = Calendar.getInstance();
|
||||
|
|
@ -117,18 +117,18 @@ public class CommonController {
|
|||
|
||||
/* 공지사항 리스트 */
|
||||
searchVO.setId("notice");
|
||||
List<BoardVO> noticeList = boardService.selectList(searchVO);
|
||||
model.addAttribute("noticeList", noticeList);
|
||||
List<BoardVO> noticeList = boardService.selectList(searchVO);
|
||||
model.addAttribute("noticeList", noticeList);
|
||||
|
||||
/* 게시판 리스트 */
|
||||
searchVO.setId("bbs");
|
||||
List<BoardVO> bbsList = boardService.selectList(searchVO);
|
||||
model.addAttribute("bbsList", bbsList);
|
||||
|
||||
/* 자료실 리스트 */
|
||||
searchVO.setId("data");
|
||||
List<BoardVO> dataList = boardService.selectList(searchVO);
|
||||
model.addAttribute("dataList", dataList);
|
||||
/* 게시판 리스트 */
|
||||
searchVO.setId("bbs");
|
||||
List<BoardVO> bbsList = boardService.selectList(searchVO);
|
||||
model.addAttribute("bbsList", bbsList);
|
||||
|
||||
/* 자료실 리스트 */
|
||||
searchVO.setId("data");
|
||||
List<BoardVO> dataList = boardService.selectList(searchVO);
|
||||
model.addAttribute("dataList", dataList);
|
||||
|
||||
return "main.tiles";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class ReportSearchVO extends BaseSearchVO implements Cloneable {
|
|||
/**
|
||||
* 접속한 사용자 타입
|
||||
*/
|
||||
private int type;
|
||||
private String type;
|
||||
/**
|
||||
* 접속한 사용자 그룹
|
||||
*/
|
||||
|
|
@ -162,10 +162,10 @@ public class ReportSearchVO extends BaseSearchVO implements Cloneable {
|
|||
public void setUsegrade(final int usegrade) {
|
||||
this.usegrade = usegrade;
|
||||
}
|
||||
public int getType() {
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
public void setType(final int type) {
|
||||
public void setType(final String type) {
|
||||
this.type = type;
|
||||
}
|
||||
public int getMyGroupCode() {
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ public class ReportCommon {
|
|||
|
||||
result.setUserid(loginUserVO.getUserid());
|
||||
result.setUsegrade(loginUserVO.getUsegrade());
|
||||
result.setType(loginUserVO.getType());
|
||||
result.setType(Integer.toString(loginUserVO.getType()));
|
||||
result.setMyGroupCode(ReportCommon.getMyGroupCode());
|
||||
result.setDuties(loginUserVO.getDutiesStr());
|
||||
result.setUserPlace(loginUserVO.getPlace1());
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ public class ReportController {
|
|||
try {
|
||||
rptSearchVO.setUserid(loginUserVO.getUserid());
|
||||
rptSearchVO.setUsegrade(loginUserVO.getUsegrade());
|
||||
rptSearchVO.setType(loginUserVO.getType());
|
||||
rptSearchVO.setType(Integer.toString(loginUserVO.getType()));
|
||||
|
||||
/* 페이징 처리 정보 */
|
||||
rptSearchVO.setPageUnit(propertiesService.getInt("pageUnit"));
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
#Global.datasource.username=new_faics
|
||||
#Global.datasource.password=tkdlqjdhltk12#$
|
||||
|
||||
Global.datasource.driverClassName=org.postgresql.Driver
|
||||
Global.datasource.url=jdbc:postgresql://192.168.0.157:5432/faics
|
||||
Global.datasource.driverClassName=net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
Global.datasource.url=jdbc:log4jdbc:postgresql://192.168.0.157:5432/faics
|
||||
Global.datasource.username=dbnt0031
|
||||
Global.datasource.password=dbnt0928!
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator
|
||||
log4jdbc.dump.sql.maxlinelength=0
|
||||
|
|
@ -3,9 +3,8 @@
|
|||
<mapper namespace="Board">
|
||||
|
||||
<select id="Board.selectBoardList" parameterType="boardSearchVO" resultType="boardVO">
|
||||
<![CDATA[
|
||||
SELECT
|
||||
BD_SEQ AS SEQ, BD_MB_ID AS USERID, BD_GROUP_SEQ AS GROUPSEQ,
|
||||
|
||||
SELECT BD_SEQ AS SEQ, BD_MB_ID AS USERID, BD_GROUP_SEQ AS GROUPSEQ,
|
||||
BD_CATEGORY AS CATEGORY, BD_NAME AS USERNAME, BD_CONTENT AS CONTENT,
|
||||
BD_SUBJECT AS SUBJECT, BD_PARENT_SEQ AS PARENTSEQ, BD_PREV_SEQ AS PREVSEQ,
|
||||
BD_NEXT_SEQ AS NEXTSEQ, BD_STEP AS STEP, BD_DEPTH AS DEPTH,
|
||||
|
|
@ -14,47 +13,42 @@
|
|||
BD_NUM1 AS NUM1, BD_NUM2 AS NUM2, BD_DATA1 AS DATA1, BD_DATA2 AS DATA2,
|
||||
FILECNT
|
||||
FROM (
|
||||
SELECT
|
||||
ROWNUM RNUM, ALL_LIST.*, (SELECT #{id} FROM DUAL) ID,
|
||||
SELECT (ROW_NUMBER() OVER()) RNUM, ALL_LIST.*, #{id} ID,
|
||||
(SELECT COUNT(*) FROM H3_BD_${id}_FILE WHERE BF_BD_SEQ = ALL_LIST.BD_SEQ) AS FILECNT
|
||||
FROM (
|
||||
SELECT
|
||||
*
|
||||
FROM H3_BD_${id}_LIST BBS
|
||||
WHERE 1 = 1
|
||||
]]>
|
||||
<choose>
|
||||
<when test='category == " " and id == "stat_bbs"'>
|
||||
</when>
|
||||
<otherwise>
|
||||
AND BD_CATEGORY = #{category}
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
<if test="searchKeyword != null and searchKeyword != ''">
|
||||
FROM (
|
||||
SELECT
|
||||
*
|
||||
FROM H3_BD_${id}_LIST BBS
|
||||
WHERE 1 = 1
|
||||
<choose>
|
||||
<when test="searchCondition == 0">
|
||||
AND BD_DATA1 LIKE '%' || #{searchKeyword} || '%'
|
||||
</when>
|
||||
<when test="searchCondition == 1">
|
||||
AND BD_NAME LIKE '%' || #{searchKeyword} || '%'
|
||||
</when>
|
||||
<when test="searchCondition == 2">
|
||||
AND BD_SUBJECT LIKE '%' || #{searchKeyword} || '%'
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<![CDATA[ ORDER BY
|
||||
BBS.BD_NOTICE DESC,
|
||||
BBS.BD_GROUP_SEQ DESC,
|
||||
BBS.BD_STEP ASC
|
||||
<when test='category == " " and id == "stat_bbs"'>
|
||||
</when>
|
||||
<otherwise>
|
||||
AND BD_CATEGORY = #{category}
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
) ALL_LIST
|
||||
)
|
||||
WHERE
|
||||
RNUM > #{firstIndex} AND
|
||||
RNUM <= #{firstIndex} + #{recordCountPerPage}
|
||||
]]>
|
||||
<if test="searchKeyword != null and searchKeyword != ''">
|
||||
<choose>
|
||||
<when test="searchCondition == 0">
|
||||
AND BD_DATA1 LIKE '%' || #{searchKeyword} || '%'
|
||||
</when>
|
||||
<when test="searchCondition == 1">
|
||||
AND BD_NAME LIKE '%' || #{searchKeyword} || '%'
|
||||
</when>
|
||||
<when test="searchCondition == 2">
|
||||
AND BD_SUBJECT LIKE '%' || #{searchKeyword} || '%'
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
ORDER BY
|
||||
BBS.BD_NOTICE DESC,
|
||||
BBS.BD_GROUP_SEQ DESC,
|
||||
BBS.BD_STEP ASC
|
||||
|
||||
) ALL_LIST
|
||||
) a
|
||||
limit #{recordCountPerPage} offset #{firstIndex}
|
||||
</select>
|
||||
|
||||
<select id="Board.selectBoardTotalCnt" parameterType="boardSearchVO" resultType="int">
|
||||
|
|
|
|||
|
|
@ -952,54 +952,49 @@
|
|||
|
||||
<!-- 내 실적 목록 -->
|
||||
<select id="Report.selectMyList" parameterType="reportSearchVO" resultMap="reportMap">
|
||||
<![CDATA[
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT
|
||||
(ROW_NUMBER() OVER()) AS RNUM, T.*
|
||||
FROM (SELECT
|
||||
(IN_PLACE_NAME || '외사-' || IN_PLACE_NUM) AS docNo,
|
||||
(SELECT NAME FROM Rpt_Category WHERE TYPE = 1 AND CODE = RPT.IN_CATEGORY1) AS inCategory1Str,
|
||||
(SELECT NAME FROM Rpt_Category WHERE TYPE = 2 AND CODE = RPT.IN_CATEGORY2) AS inCategory2Str,
|
||||
(SELECT NAME FROM Rpt_Category WHERE TYPE = 3 AND CODE = RPT.IN_CATEGORY3) AS inCategory3Str,
|
||||
(SELECT NAME FROM Rpt_Category WHERE TYPE = 4 AND CODE = RPT.IN_CATEGORY4) AS inCategory4Str,
|
||||
RPT.*
|
||||
FROM
|
||||
RPT_INFO RPT
|
||||
WHERE
|
||||
IN_STATE_CODE != '99'
|
||||
AND IN_TYPE = #{type}
|
||||
]]>
|
||||
<choose>
|
||||
<when test="type != null and type.equals(1)"><![CDATA[
|
||||
AND IN_USERID = #{userid}
|
||||
]]></when>
|
||||
<when test="type == null or type != 1"><![CDATA[
|
||||
AND IN_USERID IN (#{userid}, '''' || #{usegrade} || '''')
|
||||
]]></when>
|
||||
</choose>
|
||||
|
||||
<if test="dateStart != null and dateStart != ''"><![CDATA[
|
||||
AND IN_INFODATE >= #{dateStart}
|
||||
]]></if>
|
||||
<if test="dateEnd != null and dateEnd != ''"><![CDATA[
|
||||
AND IN_INFODATE <= #{dateEnd}
|
||||
]]></if>
|
||||
<if test="subject != null and subject != ''"><![CDATA[
|
||||
AND IN_SUBJECT LIKE '%'||#{subject}||'%'
|
||||
]]></if>
|
||||
|
||||
<if test="orderCol != null and orderCol != '' and orderAsc != null and orderAsc != ''"><![CDATA[
|
||||
ORDER BY ${orderCol} ${orderAsc}
|
||||
]]></if>
|
||||
<![CDATA[
|
||||
) T
|
||||
)
|
||||
WHERE
|
||||
RNUM > #{firstIndex} AND
|
||||
RNUM <= #{firstIndex} + #{recordCountPerPage}
|
||||
]]>
|
||||
</select>
|
||||
select (ROW_NUMBER() OVER()) AS RNUM, a.*
|
||||
from (
|
||||
select
|
||||
(IN_PLACE_NAME || '외사-' || IN_PLACE_NUM) AS docNo,
|
||||
cat1.name AS inCategory1Str,
|
||||
cat2.name AS inCategory2Str,
|
||||
cat3.name AS inCategory3Str,
|
||||
cat4.name AS inCategory4Str,
|
||||
RPT.*
|
||||
FROM
|
||||
RPT_INFO RPT
|
||||
inner join Rpt_Category CAT1 on CAT1.type = 1 and cat1.code = rpt.IN_CATEGORY1
|
||||
inner join Rpt_Category CAT2 on CAT2.type = 2 and cat2.code = rpt.IN_CATEGORY2
|
||||
inner join Rpt_Category CAT3 on CAT3.type = 3 and cat3.code = rpt.IN_CATEGORY3
|
||||
inner join Rpt_Category CAT4 on CAT4.type = 4 and cat4.code = rpt.IN_CATEGORY4
|
||||
WHERE
|
||||
IN_STATE_CODE != '99'
|
||||
AND IN_TYPE = #{type}
|
||||
<choose>
|
||||
<when test="type != null and type == '1'">
|
||||
AND IN_USERID = #{userid}
|
||||
</when>
|
||||
<when test="type == null or type != '1'">
|
||||
AND IN_USERID IN (#{userid}, '''' || #{usegrade} || '''')
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
<if test="dateStart != null and dateStart != ''">
|
||||
AND IN_INFODATE >= #{dateStart}::date
|
||||
</if>
|
||||
<if test="dateEnd != null and dateEnd != ''">
|
||||
AND IN_INFODATE <= #{dateEnd}::date
|
||||
</if>
|
||||
<if test="subject != null and subject != ''">
|
||||
AND IN_SUBJECT LIKE '%'||#{subject}||'%'
|
||||
</if>
|
||||
|
||||
<if test="orderCol != null and orderCol != '' and orderAsc != null and orderAsc != ''">
|
||||
ORDER BY ${orderCol} ${orderAsc}
|
||||
</if>
|
||||
limit #{recordCountPerPage} offset #{firstIndex}
|
||||
) a
|
||||
</select>
|
||||
<select id="Report.selectMyListCnt" parameterType="reportSearchVO" resultType="int">
|
||||
<![CDATA[
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class ReportServiceImplTest {
|
|||
ReportSearchVO rptSearchVO = new ReportSearchVO();
|
||||
rptSearchVO.setUsegrade(0);
|
||||
rptSearchVO.setUserid("admin");
|
||||
rptSearchVO.setType(1);
|
||||
rptSearchVO.setType("1");
|
||||
rptSearchVO.setFirstIndex(1);
|
||||
rptSearchVO.setRecordCountPerPage(10);
|
||||
List<ReportVO> reportList = reportService.selectList(rptSearchVO);
|
||||
|
|
|
|||
Loading…
Reference in New Issue