|
@@ -63,19 +63,19 @@
|
|
FROM (
|
|
FROM (
|
|
SELECT A1.CMPN_CD
|
|
SELECT A1.CMPN_CD
|
|
, A1.DEPT_CD
|
|
, A1.DEPT_CD
|
|
- , CASE WHEN A1.DEPT_LEVEL != 1 THEN (SELECT C.DEPT_NM FROM ZEHR_COM_DEPT C WHERE C.CMPN_CD = A1.CMPN_CD AND C.DEPT_CD = A1.P_DEPT_CD)
|
|
|
|
- WHEN A1.DEPT_LEVEL = 1 THEN A1.DEPT_NM END AS DEPT_MAIN_NM
|
|
|
|
|
|
+ , A1.CD_CCGRP
|
|
|
|
+ , A1.NM_CCGRP
|
|
, A1.DEPT_NM
|
|
, A1.DEPT_NM
|
|
, A1.DEPT_LEVEL
|
|
, A1.DEPT_LEVEL
|
|
- , A1.P_DEPT_CD
|
|
|
|
, A1.WORK_BASEDATE_FROM
|
|
, A1.WORK_BASEDATE_FROM
|
|
, A1.COUNT_1
|
|
, A1.COUNT_1
|
|
FROM (
|
|
FROM (
|
|
SELECT DISTINCT A.CMPN_CD
|
|
SELECT DISTINCT A.CMPN_CD
|
|
|
|
+ , A.CD_CCGRP
|
|
|
|
+ , A.NM_CCGRP
|
|
, A.DEPT_CD
|
|
, A.DEPT_CD
|
|
, A.DEPT_NM
|
|
, A.DEPT_NM
|
|
, A.DEPT_LEVEL
|
|
, A.DEPT_LEVEL
|
|
- , A.P_DEPT_CD
|
|
|
|
, B.WORK_BASEDATE_FROM
|
|
, B.WORK_BASEDATE_FROM
|
|
, CASE WHEN COUNT(B.WORK_BASEDATE_FROM) > 0 THEN '1'
|
|
, CASE WHEN COUNT(B.WORK_BASEDATE_FROM) > 0 THEN '1'
|
|
WHEN COUNT(B.WORK_BASEDATE_FROM) = 0 OR COUNT(B.WORK_BASEDATE_FROM) = NULL THEN '' END AS COUNT_1
|
|
WHEN COUNT(B.WORK_BASEDATE_FROM) = 0 OR COUNT(B.WORK_BASEDATE_FROM) = NULL THEN '' END AS COUNT_1
|
|
@@ -83,7 +83,7 @@
|
|
LEFT JOIN ZEHR_WEEK_WORK B ON A.CMPN_CD = B.CMPN_CD AND A.DEPT_CD = B.DEPT_CD
|
|
LEFT JOIN ZEHR_WEEK_WORK B ON A.CMPN_CD = B.CMPN_CD AND A.DEPT_CD = B.DEPT_CD
|
|
WHERE A.CMPN_CD = #{cmpnCd}
|
|
WHERE A.CMPN_CD = #{cmpnCd}
|
|
AND A.USE_YN = 'Y'
|
|
AND A.USE_YN = 'Y'
|
|
- GROUP BY A.CMPN_CD, A.DEPT_CD, A.DEPT_NM, A.DEPT_LEVEL, A.P_DEPT_CD, B.WORK_BASEDATE_FROM
|
|
|
|
|
|
+ GROUP BY A.CMPN_CD, A.DEPT_CD, A.DEPT_NM, A.DEPT_LEVEL, A.CD_CCGRP, A.NM_CCGRP, B.WORK_BASEDATE_FROM
|
|
) A1
|
|
) A1
|
|
)
|
|
)
|
|
PIVOT ( AVG(COUNT_1)
|
|
PIVOT ( AVG(COUNT_1)
|
|
@@ -92,6 +92,8 @@
|
|
${name}
|
|
${name}
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
+ WHERE LENGTH(DEPT_CD) NOT IN ('2') <!-- 본부 안나오게... -->
|
|
|
|
+ ORDER BY CD_CCGRP
|
|
</select><!-- AND A.DEPT_LEVEL NOT IN ('1') --><!-- AND SUBSTR(TO_CHAR(B.WORK_BASEDATE_FROM, 'YYYYMMDD'), 0, 6) = #{workMonth1} -->
|
|
</select><!-- AND A.DEPT_LEVEL NOT IN ('1') --><!-- AND SUBSTR(TO_CHAR(B.WORK_BASEDATE_FROM, 'YYYYMMDD'), 0, 6) = #{workMonth1} -->
|
|
|
|
|
|
<select id="selectHeaderUpList" parameterType="map" resultType="easyHashMap">
|
|
<select id="selectHeaderUpList" parameterType="map" resultType="easyHashMap">
|