fix: 거주자 / 장애인 의견진술 상세 진행
parent
db1c7af76f
commit
0459af84b0
@ -0,0 +1,73 @@
|
||||
SELECT T.msu_TEAM, M.MS_CHASU, NVL(SUM(DECODE(MS_RESULT, '2', 1, 0)), 0) RE_BU, NVL(SUM(DECODE(MS_RESULT, '1', 1, 0)), 0) RE_MIBU
|
||||
FROM MIN_SIMSA680_SC M,
|
||||
MSU680_SC_VIEW T
|
||||
WHERE M.MS_MAINCODE = T.MSU_MAINCODE
|
||||
AND M.MS_DATAGB = '1'
|
||||
AND MSU_TEAM = '003'
|
||||
AND MS_CHASU = 12
|
||||
AND M.MS_SDATE = '2021-09-10'
|
||||
AND M.MS_EDATE = '2021-09-11'
|
||||
GROUP BY T.MSU_TEAM, M.MS_CHASU;
|
||||
|
||||
SELECT NAME,
|
||||
SUM(DECODE(MSU_RESULT, '2', 1, 0)) BU,
|
||||
SUM(DECODE(MSU_RESULT, '1', 1, 0)) MIBU,
|
||||
SUM(DECODE(MSU_RESULT, '1', 1, '2', 1, 0)) TOT,
|
||||
USERID
|
||||
FROM MIN_USERINFO,
|
||||
MIN_SIMSA_USER680_SC,
|
||||
MIN_SIMSA680_SC
|
||||
WHERE USERID = MSU_USERID
|
||||
AND MS_MAINCODE = MSU_MAINCODE
|
||||
AND MS_DATAGB = '1'
|
||||
AND MSU_TEAM = '003'
|
||||
AND MS_CHASU = 12
|
||||
AND MS_SDATE = '2021-09-10'
|
||||
AND MS_EDATE = '2021-09-11'
|
||||
GROUP BY USERID, NAME
|
||||
ORDER BY USERID, NAME;
|
||||
|
||||
SELECT MS_SEQ, MS_CARNUM, MS_MAINCODE
|
||||
FROM MIN_USERINFO,
|
||||
MIN_SIMSA_USER680_SC,
|
||||
MIN_SIMSA680_SC
|
||||
WHERE USERID = MSU_USERID
|
||||
AND MS_MAINCODE = MSU_MAINCODE
|
||||
AND MS_DATAGB = '1'
|
||||
AND MSU_TEAM = '003'
|
||||
AND MS_CHASU = 12
|
||||
AND MS_SDATE = '2021-09-10'
|
||||
AND MS_EDATE = '2021-09-11'
|
||||
GROUP BY MS_CARNUM, MS_SEQ, MS_MAINCODE
|
||||
ORDER BY MS_SEQ;
|
||||
|
||||
-- 부과여부
|
||||
SELECT MSU_MAINCODE,
|
||||
USERID,
|
||||
NAME,
|
||||
(SELECT CDNAME FROM MIN_MAINCODE WHERE C2 = '5' AND C3 = MSU_RESULT) MSURESULT,
|
||||
(SELECT CDNAME FROM MIN_MAINCODE WHERE C2 = '5' AND C3 = MS_RESULT) MSRESULT
|
||||
FROM MIN_USERINFO,
|
||||
MIN_SIMSA_USER680_SC,
|
||||
MIN_SIMSA680_SC
|
||||
WHERE USERID = MSU_USERID
|
||||
AND MS_MAINCODE = MSU_MAINCODE
|
||||
AND MS_DATAGB = '1'
|
||||
AND MSU_TEAM = '003'
|
||||
--AND MS_SEQ =
|
||||
--AND MS_CARNUM =
|
||||
AND MS_CHASU = 12
|
||||
AND MS_SDATE = '2021-09-10'
|
||||
AND MS_EDATE = '2021-09-11'
|
||||
ORDER BY USERID, NAME;
|
||||
|
||||
-- excel
|
||||
SELECT MS_SEQ, DECODE(MSU_RESULT, '2', 'O', '') BU, DECODE(MSU_RESULT, '1', 'O', '') MIBU, MSU_REASON
|
||||
FROM MIN_USERINFO,
|
||||
MIN_SIMSA_USER680_SC,
|
||||
MIN_SIMSA680_SC
|
||||
WHERE USERID = MSU_USERID
|
||||
AND MSU_MAINCODE = MS_MAINCODE
|
||||
AND MS_CHASU = 12
|
||||
AND NAME = '"& rUserName &"'
|
||||
ORDER BY MS_SEQ;
|
@ -0,0 +1,67 @@
|
||||
SELECT msu_TEAM, MS_CHASU, NVL(SUM(DECODE(MS_RESULT, '2', 1, 0)), 0) RE_BU, NVL(SUM(DECODE(MS_RESULT, '1', 1, 0)), 0) RE_MIBU
|
||||
FROM MIN_SIMSA680,
|
||||
MSU680_VIEW
|
||||
WHERE MS_MAINCODE = MSU_MAINCODE
|
||||
AND MSU_TEAM = '001'
|
||||
AND MS_CHASU = 58
|
||||
AND MS_SDATE = '2021-09-10'
|
||||
AND MS_EDATE = '2021-09-11'
|
||||
GROUP BY MSU_TEAM, MS_CHASU;
|
||||
|
||||
SELECT NAME,
|
||||
SUM(DECODE(MSU_RESULT, '2', 1, 0)) BU,
|
||||
SUM(DECODE(MSU_RESULT, '1', 1, 0)) MIBU,
|
||||
SUM(DECODE(MSU_RESULT, '1', 1, '2', 1, 0)) TOT,
|
||||
USERID
|
||||
FROM MIN_USERINFO,
|
||||
MIN_SIMSA_USER680,
|
||||
MIN_SIMSA680
|
||||
WHERE USERID = MSU_USERID
|
||||
AND MS_MAINCODE = MSU_MAINCODE
|
||||
AND MSU_TEAM = '001'
|
||||
--AND MS_CHASU = '"& rChaSu &"'
|
||||
--AND MS_SDATE = '"& rStartDate &"'
|
||||
--AND MS_EDATE = '"& rEndDate &"'
|
||||
GROUP BY USERID, NAME
|
||||
ORDER BY USERID, NAME;
|
||||
|
||||
SELECT MS_SEQ, MS_CARNUM, MS_MAINCODE
|
||||
FROM MIN_USERINFO,
|
||||
MIN_SIMSA_USER680,
|
||||
MIN_SIMSA680
|
||||
WHERE USERID = MSU_USERID
|
||||
AND MS_MAINCODE = MSU_MAINCODE
|
||||
AND MSU_TEAM = '001'
|
||||
--AND MS_CHASU = '"& rChaSu &"'
|
||||
--AND MS_SDATE = '"& rStartDate &"'
|
||||
--AND MS_EDATE = '"& rEndDate &"'
|
||||
GROUP BY MS_CARNUM, MS_SEQ, MS_MAINCODE
|
||||
ORDER BY MS_SEQ;
|
||||
|
||||
|
||||
SELECT MSU_MAINCODE,
|
||||
(SELECT CDNAME FROM MIN_MAINCODE WHERE C2 = '5' AND C3 = MSU_RESULT) MSURESULT,
|
||||
(SELECT CDNAME FROM MIN_MAINCODE WHERE C2 = '5' AND C3 = MS_RESULT) MSRESULT
|
||||
FROM MIN_USERINFO,
|
||||
MIN_SIMSA_USER680,
|
||||
MIN_SIMSA680
|
||||
WHERE USERID = MSU_USERID
|
||||
AND MS_MAINCODE = MSU_MAINCODE
|
||||
AND MSU_TEAM = '001'
|
||||
--AND MS_SEQ = '"& rSEQ &"'
|
||||
--AND MS_CARNUM = '"& rCarNum
|
||||
--AND MS_CHASU = '
|
||||
--AND MS_SDATE = '"& rStartDate &"'
|
||||
--AND MS_EDATE = '"& rEndDate &"'
|
||||
ORDER BY USERID, NAME;
|
||||
|
||||
-- excel
|
||||
SELECT MS_SEQ, DECODE(MSU_RESULT, '2', 'O', '') BU, DECODE(MSU_RESULT, '1', 'O', '') MIBU, MSU_REASON
|
||||
FROM MIN_USERINFO,
|
||||
MIN_SIMSA_USER680,
|
||||
MIN_SIMSA680
|
||||
WHERE USERID = MSU_USERID
|
||||
AND MSU_MAINCODE = MS_MAINCODE
|
||||
-- AND MS_CHASU = '"& rChaSu &"'
|
||||
-- AND NAME = '"& rUserName &"'
|
||||
ORDER BY MS_SEQ;
|
Loading…
Reference in New Issue