|
@@ -246,7 +246,7 @@ SELECT AA.CMPN_CD
|
|
|
, AA.CCGRP_GB_CD /* 사업본부 구분코드[EI002] */
|
|
|
, AA.SORT_NUM /* 정렬 순번 */
|
|
|
|
|
|
- , NVL(BB.BACKLOG_PFMC_00, 0) AS BACKLOG_PFMC_00 /* 연말 실적 */
|
|
|
+ , NVL(BB.BACKLOG_PFMC_00, 0) AS BACKLOG_PFMC_00 /* 연말 실적 */
|
|
|
|
|
|
, NVL(BB.BACKLOG_PFMC_00, 0) + NVL(AA.CNTRT_AMT_01, 0) - NVL(CC.SLAMT_SUM_01, 0) AS BACKLOG_PFMC_01 /* 월별 Backlog 실적(1월) */ /* 당월(당월이전) = 전월Backlog + 수주실적 – 매출실적 */
|
|
|
, NVL(BB.BACKLOG_FCST_01, 0) AS BACKLOG_FCST_01 /* 월별 Backlog 전망(1월) */
|
|
@@ -761,7 +761,6 @@ SELECT AA.CMPN_CD
|
|
|
ORDER BY AA.SORT_NUM
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
<select id="getList3" resultType="easyHashMap">
|
|
|
SELECT A.CMPN_CD /* 회사 코드 */
|
|
|
, A.PYEAR /* 기준 연도 */
|
|
@@ -868,6 +867,26 @@ SELECT AA.CMPN_CD
|
|
|
, A.CCGRP_GB_CD /* 사업본부 구분코드 */
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getSpecCd" resultType="easyHashMap">
|
|
|
+ SELECT SPEC_CD /* 사업본부 구분코드 */
|
|
|
+ FROM SM_COM_COMMCD_D /* 공통)공통코드상세 */
|
|
|
+ WHERE COMM_CD_ID = '1111'
|
|
|
+ AND ESBS_CD1 = 'Y'
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getBacklogCnt" resultType="int">
|
|
|
+ SELECT COUNT(1) AS CNT
|
|
|
+ FROM EIS_MI_BACKLOG /* EIS) 경영정보 - Backlog */
|
|
|
+ WHERE CMPN_CD = #{cmpnCd} /* 회사 코드 */
|
|
|
+ AND PYEAR = #{pyear} /* 기준 연도 */
|
|
|
+ AND PMONTH = #{pmonth} /* 기준 월 */
|
|
|
+ AND CCGRP_GB_CD IN (
|
|
|
+ SELECT SPEC_CD /* 사업본부 구분코드 */
|
|
|
+ FROM SM_COM_COMMCD_D /* 공통)공통코드상세 */
|
|
|
+ WHERE COMM_CD_ID = '1111'
|
|
|
+ AND ESBS_CD1 = 'Y'
|
|
|
+ )
|
|
|
+ </select>
|
|
|
|
|
|
<update id="update1">
|
|
|
UPDATE EIS_MI_RCORD
|
|
@@ -888,15 +907,12 @@ SELECT AA.CMPN_CD
|
|
|
USING dual
|
|
|
ON (A.CMPN_CD = #{cmpnCd} AND A.PYEAR = #{pyear} AND A.PMONTH = #{pmonth} AND CCSCTR_GB_CD = #{ccsctrGbCd} AND CCGRP_GB_CD = #{ccgrpGbCd})
|
|
|
WHEN MATCHED THEN
|
|
|
-
|
|
|
UPDATE
|
|
|
SET A.RCORD_PLAN = #{rcordPlan}
|
|
|
, A.RCORD_FCST = #{rcordFcst}
|
|
|
, A.MDFT_DT = #{mdftDt}
|
|
|
, A.MDFT_PR = #{mdftPr}
|
|
|
-
|
|
|
WHEN NOT MATCHED THEN
|
|
|
-
|
|
|
INSERT (A.CMPN_CD, A.PYEAR, A.PMONTH, A.CCSCTR_GB_CD, A.CCGRP_GB_CD, A.RCORD_PLAN, A.RCORD_FCST, A.WRTE_DT, A.WRTE_PR)
|
|
|
VALUES (#{cmpnCd} , #{pyear} , #{pmonth} , #{ccsctrGbCd} , #{ccgrpGbCd} , #{rcordPlan} , #{rcordFcst} , #{wrteDt}, #{wrtePr})
|
|
|
</update>
|
|
@@ -946,6 +962,25 @@ SELECT AA.CMPN_CD
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
|
+ <insert id="insertBacklogFcst">
|
|
|
+ INSERT INTO EIS_MI_BACKLOG(
|
|
|
+ CMPN_CD
|
|
|
+ , PYEAR
|
|
|
+ , PMONTH
|
|
|
+ , CCGRP_GB_CD
|
|
|
+ , BACKLOG_FCST
|
|
|
+ , WRTE_DT
|
|
|
+ , WRTE_PR
|
|
|
+ )VALUES(
|
|
|
+ #{cmpnCd}
|
|
|
+ , #{pyear}
|
|
|
+ , #{pmonth}
|
|
|
+ , #{ccgrpGbCd}
|
|
|
+ , #{backlogFcst}
|
|
|
+ , #{wrteDt}
|
|
|
+ , #{wrtePr}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
|
|
|
<update id="update2">
|
|
|
UPDATE EIS_MI_BACKLOG
|
|
@@ -964,14 +999,11 @@ SELECT AA.CMPN_CD
|
|
|
USING dual
|
|
|
ON (A.CMPN_CD = #{cmpnCd} AND A.PYEAR = #{pyear} AND A.PMONTH = #{pmonth} AND CCGRP_GB_CD = #{ccgrpGbCd})
|
|
|
WHEN MATCHED THEN
|
|
|
-
|
|
|
UPDATE
|
|
|
SET A.BACKLOG_FCST = #{backlogFcst}
|
|
|
, A.MDFT_DT = #{mdftDt}
|
|
|
, A.MDFT_PR = #{mdftPr}
|
|
|
-
|
|
|
WHEN NOT MATCHED THEN
|
|
|
-
|
|
|
INSERT (A.CMPN_CD, A.PYEAR, A.PMONTH, A.CCGRP_GB_CD, A.BACKLOG_FCST, A.WRTE_DT, A.WRTE_PR)
|
|
|
VALUES (#{cmpnCd} ,#{pyear} ,#{pmonth} ,#{ccgrpGbCd} ,#{backlogFcst}, #{wrteDt}, #{wrtePr})
|
|
|
</update>
|
|
@@ -994,14 +1026,11 @@ SELECT AA.CMPN_CD
|
|
|
USING dual
|
|
|
ON (A.CMPN_CD = #{cmpnCd} AND A.PYEAR = #{pyear} AND A.PMONTH = #{pmonth} AND CCGRP_GB_CD = #{ccgrpGbCd})
|
|
|
WHEN MATCHED THEN
|
|
|
-
|
|
|
UPDATE
|
|
|
SET A.BACKLOG_PFMC = #{backlogPfmc}
|
|
|
, A.MDFT_DT = #{mdftDt}
|
|
|
, A.MDFT_PR = #{mdftPr}
|
|
|
-
|
|
|
WHEN NOT MATCHED THEN
|
|
|
-
|
|
|
INSERT (A.CMPN_CD, A.PYEAR, A.PMONTH, A.CCGRP_GB_CD, A.BACKLOG_PFMC, A.WRTE_DT, A.WRTE_PR)
|
|
|
VALUES (#{cmpnCd} ,#{pyear} ,#{pmonth} ,#{ccgrpGbCd} ,#{backlogPfmc} ,#{wrteDt}, #{wrtePr})
|
|
|
</update>
|