fix: 심사결과 필드 null 처리

main
minuk926 2 years ago
parent 827d7b6c45
commit cd3ce2fc34

@ -239,8 +239,10 @@ public abstract class BaseMpowerDaoSupport {
if(row > 1) throw new MpowerException("조회된 데이타가 단일행이 아닙니다");
map = new HashMap<>();
List<String> fields = getFeilds(fieldStr);
String value = null;
for (int j = 0; j < fields.size(); j++) {
map.put(fields.get(j), client.getString("list1", 0, j));
value = client.getString("list1", 0, j);
map.put(fields.get(j), " ".equals(value)? "" : value);
}
}else{
throw new MpowerException("SQL 오류::"+result);
@ -271,12 +273,14 @@ public abstract class BaseMpowerDaoSupport {
if (result.equals("true")){
row = client.getMaxRow("list1");
List<String> fields = getFeilds(fieldStr);
String value = null;
for(int i = 0; i < row; i++) {
Map<String, Object> map = new HashMap<>();
for (int j = 0; j < fields.size(); j++) {
map.put(fields.get(j), client.getString("list1", i, j));
value = client.getString("list1", i, j);
map.put(fields.get(j), " ".equals(value)? "" : value);
}
list.add(map);
}
@ -402,6 +406,7 @@ public abstract class BaseMpowerDaoSupport {
throw new MpowerException("DB Result 객체 오류");
}
Field[] clsFields = type.getDeclaredFields();
String value = null;
for (int j = 0; j < fields.size(); j++) {
for (Field fd : clsFields) {
@ -411,7 +416,7 @@ public abstract class BaseMpowerDaoSupport {
if (fields.get(j).equals(fd.getName())) {
//log.info("===>>>{}::{}", fd.getName(), client.getString("list1", row, j));
// null 인 경우 => " " 으로 mpower에서 전환되고 있다
String value = client.getString("list1", row, j);
value = client.getString("list1", row, j);
if(" ".equals(value)) value = "";
if (fd.getType() == Integer.class || fd.getType() == Integer.TYPE){

@ -241,19 +241,19 @@
, MS.ms_seq AS msSeq
, MS.ms_carnum AS msCarnum
, MU.name
, MS.ms_result AS msResult
, DECODE(MS.ms_result, '1', '1', '2', '2', '0') AS msResult
, (SELECT code_nm
FROM tb_cmm_code_s
WHERE code_grp_id = 'TRAFFIC'
AND code_lcd = 'GANGNAM_SIMSA'
AND code_mcd = 'RESULT'
AND code_cd = MS.ms_result) as msResultNm
AND code_cd = DECODE(MS.ms_result, '1', '1', '2', '2', '0')) as msResultNm
, (SELECT code_nm
FROM tb_cmm_code_s
WHERE code_grp_id = 'TRAFFIC'
AND code_lcd = 'GANGNAM_SIMSA'
AND code_mcd = 'RESULT'
AND code_cd = MSU.msu_result) as msuResult
AND code_cd = DECODE(MSU.msu_result, '1', '1', '2', '2', '0')) as msuResult
FROM min_simsa680 MS
, min_simsa_user680 MSU
, min_userinfo MU
@ -331,7 +331,7 @@
SELECT MS.ms_edate
, MSU.msu_team
, MU.name
, SUM(DECODE(MSU.msu_result, 0, 0, 1)) jcnt
, SUM(DECODE(MSU.msu_result, '1', 1, '2', 1, 0)) jcnt
, COUNT(*) tcnt
FROM min_simsa680 MS
, min_simsa_user680 MSU
@ -339,11 +339,11 @@
, (SELECT *
FROM (SELECT ms_edate
FROM min_simsa680
WHERE ms_result = '0'
WHERE DECODE(ms_result, '1', '1', '2', '2', '0') = '0'
ORDER BY ms_edate DESC)
WHERE ROWNUM = 1) T
WHERE MS.ms_maincode = MSU.msu_maincode
AND MS.ms_result = '0'
AND DECODE(MS.ms_result, '1', '1', '2', '2', '0') = '0'
AND MSU.msu_userid = MU.userid
AND MS.ms_edate = T.ms_edate
GROUP BY MS.ms_edate, MSU.msu_team, MU.name
@ -355,7 +355,7 @@
SELECT MS.ms_maincode
, MS.ms_seq
, MS.ms_carnum
, MS.ms_result
, DECODE(MS.ms_result, '1', '1', '2', '2', '0') as msResult
, MS.ms_year
, MS.ms_chasu
, MS.ms_sdate
@ -365,7 +365,7 @@
, MS.ms_closesi
, '' as ms_datagb
, MSU.msu_code
, MSU.msu_result
, DECODE(MSU.msu_result, '1', '1', '2', '2', '0') as msuResult
, MSU.msu_reason
, TM.mm_wdate as scWdate
FROM min_simsa680 MS

@ -491,19 +491,19 @@
, MS.ms_seq AS msSeq
, MS.ms_carnum AS msCarnum
, MU.name
, MS.ms_result AS msResult
, DECODE(MS.ms_result, '1', '1', '2', '2', '0') AS msResult
, (SELECT code_nm
FROM tb_cmm_code_s
WHERE code_grp_id = 'TRAFFIC'
AND code_lcd = 'GANGNAM_SIMSA'
AND code_mcd = 'RESULT'
AND code_cd = MS.ms_result) as msResultNm
AND code_cd = DECODE(MS.ms_result, '1', '1', '2', '2', '0')) as msResultNm
, (SELECT code_nm
FROM tb_cmm_code_s
WHERE code_grp_id = 'TRAFFIC'
AND code_lcd = 'GANGNAM_SIMSA'
AND code_mcd = 'RESULT'
AND code_cd = MSU.msu_result) as msuResult
AND code_cd = DECODE(MSU.msu_result, '1', '1', '2', '2', '0')) as msuResult
FROM min_simsa680_sc MS
, min_simsa_user680_sc MSU
, min_userinfo MU
@ -567,28 +567,12 @@
ORDER BY GRC.sc_seq
</native-query>
<native-query id="selectDashboardJudgeList">
/* residentAndDisabled-mapper|selectDashboardJudgeList|julim */
SELECT MS.ms_edate
, MSU.msu_team
, MU.name
, SUM(DECODE(MSU.msu_result, 0, 0, 1)) jcnt
, SUM(DECODE(MSU.msu_result, '1', 1, '2', 1, 0)) jcnt
, COUNT(*) tcnt
FROM min_simsa680_sc MS
, min_simsa_user680_sc MSU
@ -597,11 +581,11 @@
FROM (SELECT ms_edate
FROM min_simsa680_sc
WHERE ms_datagb = #{msDatagb}
AND ms_result = '0'
AND DECODE(ms_result, '1', '1', '2', '2', '0') = '0'
ORDER BY ms_edate DESC)
WHERE ROWNUM = 1) T
WHERE MS.ms_datagb = #{msDatagb}
AND MS.ms_result = '0'
AND DECODE(MS.ms_result, '1', '1', '2', '2', '0') = '0'
AND MS.ms_maincode = MSU.msu_maincode
AND MSU.msu_userid = MU.userid
AND MS.ms_edate = T.ms_edate
@ -614,7 +598,7 @@
SELECT MS.ms_maincode
, MS.ms_seq
, MS.ms_carnum
, MS.ms_result
, DECODE(MS.ms_result, '1', '1', '2', '2', '0') as msResult
, MS.ms_year
, MS.ms_chasu
, MS.ms_sdate
@ -624,7 +608,7 @@
, MS.ms_closesi
, MS.ms_datagb
, MSU.msu_code
, MSU.msu_result
, DECODE(MSU.msu_result, '1', '1', '2', '2', '0') as msuResult
, MSU.msu_reason
, GR.sc_wdate
, GR.sc_pos

Loading…
Cancel
Save