Commit 30bbef42a0db1669e40ab1f2bfdc8163e5e36053
1 parent
dec8d909
ai sub Matching 추가
실행시 추가로 자가및 상대법인 파라미터로 받을 수 있도록 추가
Showing
11 changed files
with
710 additions
and
15 deletions
Show diff stats
src/main/java/com/batch/config/MatchingAiSubProcessorAuto.java
0 → 100644
| 1 | +package com.batch.config; | |
| 2 | + | |
| 3 | +import java.math.BigDecimal; | |
| 4 | +import java.math.MathContext; | |
| 5 | +import java.math.RoundingMode; | |
| 6 | +import java.text.SimpleDateFormat; | |
| 7 | +import java.util.ArrayList; | |
| 8 | +import java.util.Date; | |
| 9 | +import java.util.HashMap; | |
| 10 | +import java.util.List; | |
| 11 | +import java.util.Map; | |
| 12 | +import java.util.UUID; | |
| 13 | + | |
| 14 | +import com.batch.mapper.primary.MatchingInnerDelingMapper; | |
| 15 | +import com.batch.util.StatisticsUtil; | |
| 16 | + | |
| 17 | +import lombok.RequiredArgsConstructor; | |
| 18 | +import lombok.extern.slf4j.Slf4j; | |
| 19 | + | |
| 20 | +@Slf4j | |
| 21 | +@RequiredArgsConstructor | |
| 22 | +public class MatchingAiSubProcessorAuto { | |
| 23 | + | |
| 24 | + private final MatchingInnerDelingMapper matchingInnerDelingMapper; | |
| 25 | + | |
| 26 | + @SuppressWarnings("unchecked") | |
| 27 | + public void process(Map paramRec, int iCmbnOwnCnt, int iCmbnTranCnt, int iStartOwn, int iStartTran) throws Exception { | |
| 28 | + | |
| 29 | + //Job Create Log | |
| 30 | + UUID uuid = UUID.randomUUID(); | |
| 31 | + HashMap<String, String> mt = new HashMap<String, String>(); | |
| 32 | + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd-hh-mm-ss"); | |
| 33 | + String sDate = dateFormat.format(new Date()) + ":" + uuid.toString(); | |
| 34 | + | |
| 35 | + Map<String, Object> paramLog = new HashMap<String, Object>(); | |
| 36 | + paramLog.put("user_job_id", sDate); | |
| 37 | + paramLog.put("user_job_name", "AI Sub 조합매칭(" + paramRec.toString() + ",[" + iCmbnOwnCnt + "," + iStartOwn + "],[" + iCmbnTranCnt + "," + iStartTran + "])"); | |
| 38 | + matchingInnerDelingMapper.createUserJob(paramLog); | |
| 39 | + | |
| 40 | + | |
| 41 | + int iUpdated = 0; | |
| 42 | + | |
| 43 | + String sSysSe = (String) paramRec.get("sys_se"); | |
| 44 | + String sAccnutYm = (String) paramRec.get("accnut_ym"); | |
| 45 | + String sMtchTy = (String) paramRec.get("mtch_ty"); | |
| 46 | + Long lngMtchKy = (Long) paramRec.get("mtch_ky"); | |
| 47 | + String sCprCode = (String) paramRec.get("cpr_code"); | |
| 48 | + String sPartCpr = (String) paramRec.get("partn_cpr"); | |
| 49 | + String sConds = (String) paramRec.get("conds"); | |
| 50 | + | |
| 51 | + Integer iErrorRange = 0; | |
| 52 | + if (paramRec.get("error_range") != null) iErrorRange = Integer.parseInt((String) paramRec.get("error_range")); | |
| 53 | + | |
| 54 | + //작업시작 | |
| 55 | + Map<String, Object> mParam = new HashMap<String, Object>(); | |
| 56 | + mParam.put("sysSe", sSysSe); | |
| 57 | + mParam.put("accnutYm", sAccnutYm); | |
| 58 | + mParam.put("mtchTy", sMtchTy); | |
| 59 | + mParam.put("mtchKy", lngMtchKy); | |
| 60 | + mParam.put("conds", sConds); | |
| 61 | + | |
| 62 | + //---------------------------------------------------------------------------- | |
| 63 | + //자기법인 데이타 가져오기 | |
| 64 | + mParam.put("cprCode", sCprCode); | |
| 65 | + mParam.put("partnCpr", sPartCpr); | |
| 66 | + List<Map> lMatchingDataOne = matchingInnerDelingMapper.getAiSubDataOne(mParam); | |
| 67 | + | |
| 68 | + //상대법인 데이타 가져오기 | |
| 69 | + mParam.put("cprCode", sPartCpr); | |
| 70 | + mParam.put("partnCpr", sCprCode); | |
| 71 | + List<Map> lMatchingDataTwo = matchingInnerDelingMapper.getAiSubDataTwo(mParam); | |
| 72 | + | |
| 73 | + //Combination 데이타 만들기 | |
| 74 | + List<Map> compResult = new ArrayList<Map>(); | |
| 75 | + List<List<Map>> llMatchingDataOne = new ArrayList<List<Map>>(); | |
| 76 | + List<List<Map>> llMatchingDataTwo = new ArrayList<List<Map>>(); | |
| 77 | + | |
| 78 | + int iEndOwn = lMatchingDataOne.size(); | |
| 79 | + if (iCmbnOwnCnt == 2) { | |
| 80 | + iEndOwn = iStartOwn + 1000; | |
| 81 | + if (iEndOwn > lMatchingDataOne.size()) iEndOwn = lMatchingDataOne.size(); | |
| 82 | + } | |
| 83 | + if (iCmbnOwnCnt == 3) { | |
| 84 | + iEndOwn = iStartOwn + 50; | |
| 85 | + if (iEndOwn > lMatchingDataOne.size()) iEndOwn = lMatchingDataOne.size(); | |
| 86 | + } | |
| 87 | + if (iCmbnOwnCnt > 3) { | |
| 88 | + iEndOwn = iStartOwn + 25; | |
| 89 | + if (iEndOwn > lMatchingDataOne.size()) iEndOwn = lMatchingDataOne.size(); | |
| 90 | + } | |
| 91 | + | |
| 92 | + int iEndTran = lMatchingDataTwo.size(); | |
| 93 | + if (iCmbnTranCnt == 2) { | |
| 94 | + iEndTran = iStartTran + 1000; | |
| 95 | + if (iEndTran > lMatchingDataTwo.size()) iEndTran = lMatchingDataTwo.size(); | |
| 96 | + } | |
| 97 | + if (iCmbnTranCnt == 3) { | |
| 98 | + iEndTran = iStartTran + 50; | |
| 99 | + if (iEndTran > lMatchingDataTwo.size()) iEndTran = lMatchingDataTwo.size(); | |
| 100 | + } | |
| 101 | + if (iCmbnTranCnt > 3) { | |
| 102 | + iEndTran = iStartTran + 25; | |
| 103 | + if (iEndTran > lMatchingDataTwo.size()) iEndTran = lMatchingDataTwo.size(); | |
| 104 | + } | |
| 105 | + | |
| 106 | + StatisticsUtil.reculsion(lMatchingDataOne, compResult, iStartOwn, iEndOwn, iCmbnOwnCnt, llMatchingDataOne); | |
| 107 | + StatisticsUtil.reculsion(lMatchingDataTwo, compResult, iStartTran, iEndTran, iCmbnTranCnt, llMatchingDataTwo); | |
| 108 | + | |
| 109 | + //---------------------------------------------------------------------------- | |
| 110 | + //자기법인 데이타를 맵으로 처리한다. | |
| 111 | + Map<BigDecimal, List<List<Map>>> mMatchingDataOne = new HashMap<BigDecimal, List<List<Map>>>(); | |
| 112 | + for (List<Map> curlMap : llMatchingDataOne) { | |
| 113 | + BigDecimal bdKey = BigDecimal.ZERO; | |
| 114 | + for(Map curMap : curlMap) { | |
| 115 | + bdKey = bdKey.add((BigDecimal) curMap.get("delng_amt")); | |
| 116 | + } | |
| 117 | + List<List<Map>> curllMap = new ArrayList<List<Map>>(); | |
| 118 | + if (mMatchingDataOne.containsKey(bdKey)) curllMap = mMatchingDataOne.get(bdKey); | |
| 119 | + curllMap.add(curlMap); | |
| 120 | + mMatchingDataOne.put(bdKey, curllMap); | |
| 121 | + } | |
| 122 | + | |
| 123 | + //키를 Ceiling 처리하여 다시 작성 | |
| 124 | + Map<BigDecimal, List<List<Map>>> mMatchingDataOneNew = new HashMap<BigDecimal, List<List<Map>>>(); | |
| 125 | + for (BigDecimal bdKey : mMatchingDataOne.keySet()) { | |
| 126 | + BigDecimal bdKeyNew = bdKey.setScale(iErrorRange, RoundingMode.HALF_UP); | |
| 127 | + mMatchingDataOneNew.put(bdKeyNew, mMatchingDataOne.get(bdKey)); | |
| 128 | + } | |
| 129 | + mMatchingDataOne = mMatchingDataOneNew; | |
| 130 | + | |
| 131 | + //상대법인 데이타를 맵으로 처리한다. | |
| 132 | + Map<BigDecimal, List<List<Map>>> mMatchingDataTwo = new HashMap<BigDecimal, List<List<Map>>>(); | |
| 133 | + for (List<Map> curlMap : llMatchingDataTwo) { | |
| 134 | + BigDecimal bdKey = BigDecimal.ZERO; | |
| 135 | + for(Map curMap : curlMap) { | |
| 136 | + bdKey = bdKey.add((BigDecimal) curMap.get("delng_amt")); | |
| 137 | + } | |
| 138 | + List<List<Map>> curllMap = new ArrayList<List<Map>>(); | |
| 139 | + if (mMatchingDataTwo.containsKey(bdKey)) curllMap = mMatchingDataTwo.get(bdKey); | |
| 140 | + curllMap.add(curlMap); | |
| 141 | + mMatchingDataTwo.put(bdKey, curllMap); | |
| 142 | + } | |
| 143 | + | |
| 144 | + //키를 Ceiling 처리하여 다시 작성 | |
| 145 | + Map<BigDecimal, List<List<Map>>> mMatchingDataTwoNew = new HashMap<BigDecimal, List<List<Map>>>(); | |
| 146 | + for (BigDecimal bdKey : mMatchingDataTwo.keySet()) { | |
| 147 | + BigDecimal bdKeyNew = bdKey.setScale(iErrorRange, RoundingMode.HALF_UP); | |
| 148 | + mMatchingDataTwoNew.put(bdKeyNew, mMatchingDataTwo.get(bdKey)); | |
| 149 | + } | |
| 150 | + mMatchingDataTwo = mMatchingDataTwoNew; | |
| 151 | + | |
| 152 | + //여기서 매칭 비교 | |
| 153 | + //비교 lMatchingDataOne vs mMatchingDataTwo | |
| 154 | + List<Map> lMatchingResultUpdate = new ArrayList<Map>(); //업데이트할 대상 | |
| 155 | + | |
| 156 | + int mtchNumber = 0; | |
| 157 | + String mtchSys = "AUTO"; | |
| 158 | + String mtchType = "AI_" + iCmbnOwnCnt + "_" + iCmbnTranCnt; | |
| 159 | + String mtchTypeName = "자기(" + iCmbnOwnCnt + "건Sum), 상대(" + iCmbnTranCnt + "건Sum), 비교(금액)"; | |
| 160 | + for (BigDecimal curKey : mMatchingDataOne.keySet()) { | |
| 161 | + if (mMatchingDataTwo.containsKey(curKey)) { | |
| 162 | + List<List<Map>> llMapOne = mMatchingDataOne.get(curKey); | |
| 163 | + List<List<Map>> llMapTwo = mMatchingDataTwo.get(curKey); | |
| 164 | + | |
| 165 | + //위와 관련된 동일 레코드가 있는 리스트 삭제 | |
| 166 | + for (int i=llMapOne.size()-1; i>=0;i--) { | |
| 167 | + List<Map> curlMap = llMapOne.get(i); | |
| 168 | + for (Map curMap : lMatchingResultUpdate) { | |
| 169 | + int curIdx = curlMap.indexOf(curMap); | |
| 170 | + if (curIdx != -1) { | |
| 171 | + llMapOne.remove(i); | |
| 172 | + break; | |
| 173 | + } | |
| 174 | + } | |
| 175 | + } | |
| 176 | + for (int i=llMapTwo.size()-1; i>=0;i--) { | |
| 177 | + List<Map> curlMap = llMapTwo.get(i); | |
| 178 | + for (Map curMap : lMatchingResultUpdate) { | |
| 179 | + int curIdx = curlMap.indexOf(curMap); | |
| 180 | + if (curIdx != -1) { | |
| 181 | + llMapTwo.remove(i); | |
| 182 | + break; | |
| 183 | + } | |
| 184 | + } | |
| 185 | + } | |
| 186 | + | |
| 187 | + | |
| 188 | + int iMin = Math.min(llMapOne.size(), llMapTwo.size()); | |
| 189 | + if (iMin > 0) mtchNumber++; | |
| 190 | + while (iMin > 0) { | |
| 191 | + List<Map> curlMapOne = llMapOne.get(0); | |
| 192 | + for (Map curMap : curlMapOne) { | |
| 193 | + curMap.put("mtch_sys", mtchSys); | |
| 194 | + curMap.put("mtch_ty", mtchType); | |
| 195 | + curMap.put("mtch_ty_nm", mtchTypeName); | |
| 196 | + curMap.put("mtch_ky", mtchNumber); | |
| 197 | + lMatchingResultUpdate.add(curMap); | |
| 198 | + } | |
| 199 | + llMapOne.remove(0); | |
| 200 | + | |
| 201 | + List<Map> curlMapTwo = llMapTwo.get(0); | |
| 202 | + for (Map curMap : curlMapTwo) { | |
| 203 | + curMap.put("mtch_sys", mtchSys); | |
| 204 | + curMap.put("mtch_ty", mtchType); | |
| 205 | + curMap.put("mtch_ty_nm", mtchTypeName); | |
| 206 | + curMap.put("mtch_ky", mtchNumber); | |
| 207 | + lMatchingResultUpdate.add(curMap); | |
| 208 | + } | |
| 209 | + llMapTwo.remove(0); | |
| 210 | + | |
| 211 | + //위와 관련된 동일 레코드가 있는 리스트 삭제(추가 업데이트 목록) | |
| 212 | + for (int i=llMapOne.size()-1; i>=0;i--) { | |
| 213 | + List<Map> curlMap = llMapOne.get(i); | |
| 214 | + for (Map curMap : curlMapOne) { | |
| 215 | + int curIdx = curlMap.indexOf(curMap); | |
| 216 | + if (curIdx != -1) { | |
| 217 | + llMapOne.remove(i); | |
| 218 | + break; | |
| 219 | + } | |
| 220 | + } | |
| 221 | + } | |
| 222 | + for (int i=llMapTwo.size()-1; i>=0;i--) { | |
| 223 | + List<Map> curlMap = llMapTwo.get(i); | |
| 224 | + for (Map curMap : curlMapTwo) { | |
| 225 | + int curIdx = curlMap.indexOf(curMap); | |
| 226 | + if (curIdx != -1) { | |
| 227 | + llMapTwo.remove(i); | |
| 228 | + break; | |
| 229 | + } | |
| 230 | + } | |
| 231 | + } | |
| 232 | + iMin = Math.min(llMapOne.size(), llMapTwo.size()); | |
| 233 | + } | |
| 234 | + } | |
| 235 | + } | |
| 236 | + | |
| 237 | + //---------------------------------------------------------------------------- | |
| 238 | + //여기서 결과 업데이트 | |
| 239 | + iUpdated = 0; | |
| 240 | + int limit = 1000; //1000건씩 batch | |
| 241 | + List<Map> lUpdated = new ArrayList<Map>(); | |
| 242 | + for (Map curMap : lMatchingResultUpdate) { | |
| 243 | + lUpdated.add(curMap); | |
| 244 | + if (lUpdated.size() == limit) { | |
| 245 | + matchingInnerDelingMapper.setExtraResult(Map.of("itemList", lUpdated)); | |
| 246 | + iUpdated = iUpdated + lUpdated.size(); | |
| 247 | + lUpdated.clear(); | |
| 248 | + } | |
| 249 | + } | |
| 250 | + if (lUpdated.size() > 0) { | |
| 251 | + matchingInnerDelingMapper.setExtraResult(Map.of("itemList", lUpdated)); | |
| 252 | + iUpdated = iUpdated + lUpdated.size(); | |
| 253 | + } | |
| 254 | + log.debug("Updated OrgData : " + iUpdated + "건"); | |
| 255 | + | |
| 256 | + //작업종료에 대한 로그 업데이트 | |
| 257 | + paramLog.put("exit_code", "0"); | |
| 258 | + paramLog.put("exit_message", ""); | |
| 259 | + matchingInnerDelingMapper.finishUserJob(paramLog); | |
| 260 | + | |
| 261 | + } | |
| 262 | + | |
| 263 | +} | |
| 0 | 264 | \ No newline at end of file | ... | ... |
src/main/java/com/batch/config/MatchingItemProcessorAuto.java
| ... | ... | @@ -71,12 +71,14 @@ public class MatchingItemProcessorAuto implements ItemProcessor<Map, Map> { |
| 71 | 71 | params.put("cprCode", item.get("cpr_code")); |
| 72 | 72 | params.put("partnCpr", item.get("partn_cpr")); |
| 73 | 73 | params.put("amtField", matching.getAmtField()); |
| 74 | + params.put("currencyField", matching.getCurrencyField()); | |
| 74 | 75 | params.put("cond", condOne.getCond() ); //조건리스트 |
| 75 | 76 | List<Map> lMatchingDataOne = matchingInnerDelingMapper.getMatchingData(params); |
| 76 | 77 | |
| 77 | 78 | //상대법인 데이타 가져오기 |
| 78 | 79 | params.put("cprCode", item.get("partn_cpr")); |
| 79 | 80 | params.put("partnCpr", item.get("cpr_code")); |
| 81 | + params.put("currencyField", matching.getCurrencyField()); | |
| 80 | 82 | params.put("amtField", matching.getAmtField()); |
| 81 | 83 | params.put("cond", condTwo.getCond() ); //조건리스트 |
| 82 | 84 | List<Map> lMatchingDataTwo = matchingInnerDelingMapper.getMatchingData(params); | ... | ... |
src/main/java/com/batch/config/MatchingItemReader.java
| ... | ... | @@ -32,7 +32,7 @@ public class MatchingItemReader { |
| 32 | 32 | */ |
| 33 | 33 | public List<Map> customRead(){ |
| 34 | 34 | log.debug("customRead.params : " + this.params.toString()); |
| 35 | - // customRead.params : {sysSe=KUMKANG, searchCond=mtch_ky is null, run.id=1, syncDate=2024-02-02-03-52-27:50deede8-ce3d-4841-ba65-f733bdd38533, jobType=F, accnutYm=202112} | |
| 35 | + // customRead.params : {sysSe=KUMKANG, run.id=1, syncDate=2024-02-02-03-52-27:50deede8-ce3d-4841-ba65-f733bdd38533, jobType=F, accnutYm=202112} | |
| 36 | 36 | String sMatchType = this.params.get("jobType"); |
| 37 | 37 | StringBuffer sb = FileUtil.readFileToString("matchingSetup.json"); |
| 38 | 38 | MatchingSetup matchingSetup = (MatchingSetup) FileUtil.strToObj(sb.toString(), MatchingSetup.class); | ... | ... |
src/main/java/com/batch/config/MatchingSetup.java
src/main/java/com/batch/controller/JobController.java
| 1 | 1 | package com.batch.controller; |
| 2 | 2 | |
| 3 | +import java.math.BigDecimal; | |
| 3 | 4 | import java.util.ArrayList; |
| 4 | 5 | import java.util.HashMap; |
| 5 | 6 | import java.util.List; |
| ... | ... | @@ -85,6 +86,8 @@ public class JobController { |
| 85 | 86 | * { |
| 86 | 87 | * "sysSe": "LS_ALL", |
| 87 | 88 | * "accnutYm": "202306", |
| 89 | + * "cpr_code": "xxxxx", | |
| 90 | + * "partn_cpr": "xxxxx", | |
| 88 | 91 | * } |
| 89 | 92 | */ |
| 90 | 93 | //Job Create Log |
| ... | ... | @@ -109,6 +112,8 @@ public class JobController { |
| 109 | 112 | * { |
| 110 | 113 | * "sysSe": "LS_ALL", |
| 111 | 114 | * "accnutYm": "202306", |
| 115 | + * "cpr_code": "xxxxx", | |
| 116 | + * "partn_cpr": "xxxxx", | |
| 112 | 117 | * "searchOne": "dta_ty in ('11','21','31','33','35','37','41')", |
| 113 | 118 | * "searchTwo": "dta_ty in ('11','21','31','33','35','37','41')" |
| 114 | 119 | * } |
| ... | ... | @@ -145,6 +150,44 @@ public class JobController { |
| 145 | 150 | } |
| 146 | 151 | |
| 147 | 152 | |
| 153 | + @PostMapping("/aisubmatching") | |
| 154 | + public Map<String, String> aiSubMatchingJob( @RequestBody Map<String, String> params) throws Exception { | |
| 155 | + | |
| 156 | + /* | |
| 157 | + * { | |
| 158 | + * "sysSe": "LS_ALL", | |
| 159 | + * "accnutYm": "202306", | |
| 160 | + * "mtch_ty": "AI_SLT" | |
| 161 | + * "cpr_code": "xxxxx", | |
| 162 | + * "partn_cpr": "xxxxx" | |
| 163 | + * } | |
| 164 | + */ | |
| 165 | + //Job Create Log | |
| 166 | + UUID uuid = UUID.randomUUID(); | |
| 167 | + String sJobGroup = uuid.toString(); | |
| 168 | + | |
| 169 | + log.debug("Start AI Sub Matching Job"); | |
| 170 | + List<Map> retData = matchingInnerDelingMapper.getAiSubReadData(params); | |
| 171 | + | |
| 172 | + //AI의 경우 수익비용만 매칭하고 있음 | |
| 173 | + for(Map curMap : retData) { | |
| 174 | + Map<String, String> cParams = new HashMap<String, String>(); | |
| 175 | + cParams.putAll(params); | |
| 176 | + cParams.putAll(curMap); | |
| 177 | + cParams.put("conds", "T"); | |
| 178 | + jobService.aiSubJobSub(sJobGroup, cParams); | |
| 179 | + } | |
| 180 | + | |
| 181 | + log.debug("End Extra Matching Job"); | |
| 182 | + | |
| 183 | + Map<String, String> rtnMap = new HashMap<String, String>(); | |
| 184 | + rtnMap.put("jobGroupId", sJobGroup); | |
| 185 | + rtnMap.put("jobMessage", "Extra 매칭작업을 시작합니다. 작업이 끝난후 작업결과는 별도로 확인 바랍니다."); | |
| 186 | + | |
| 187 | + return rtnMap; | |
| 188 | + } | |
| 189 | + | |
| 190 | + | |
| 148 | 191 | @PostMapping("/aimatching") |
| 149 | 192 | public Map<String, String> aiMatchingJob( @RequestBody Map<String, String> params) throws Exception { |
| 150 | 193 | |
| ... | ... | @@ -152,6 +195,9 @@ public class JobController { |
| 152 | 195 | * { |
| 153 | 196 | * "sysSe": "LS_ALL", |
| 154 | 197 | * "accnutYm": "202306", |
| 198 | + * "cpr_code": "xxxxx", | |
| 199 | + * "partn_cpr": "xxxxx", | |
| 200 | + * "error_range": "0" | |
| 155 | 201 | * } |
| 156 | 202 | */ |
| 157 | 203 | //Job Create Log |
| ... | ... | @@ -161,7 +207,10 @@ public class JobController { |
| 161 | 207 | log.debug("Start AI Matching Job"); |
| 162 | 208 | List<Map> retData = matchingInnerDelingMapper.getAiReadData(params); |
| 163 | 209 | for(Map curMap : retData) { |
| 164 | - jobService.aiJobSub(sJobGroup, curMap); | |
| 210 | + Map<String, Object> curMParams = new HashMap<String, Object>(); | |
| 211 | + curMParams.putAll(curMap); | |
| 212 | + curMParams.put("error_range", params.get("error_range")); | |
| 213 | + jobService.aiJobSub(sJobGroup, curMParams); | |
| 165 | 214 | } |
| 166 | 215 | log.debug("End AI Matching Job"); |
| 167 | 216 | ... | ... |
src/main/java/com/batch/mapper/primary/MatchingInnerDelingMapper.java
| ... | ... | @@ -13,7 +13,6 @@ public interface MatchingInnerDelingMapper { |
| 13 | 13 | */ |
| 14 | 14 | @SuppressWarnings("rawtypes") |
| 15 | 15 | List<Map> getCustomItemReadData(Map param); |
| 16 | - | |
| 17 | 16 | |
| 18 | 17 | /** |
| 19 | 18 | * 작업키 업데이트 (파라미터 : 자기데이타/상대데이타) |
| ... | ... | @@ -168,5 +167,27 @@ public interface MatchingInnerDelingMapper { |
| 168 | 167 | */ |
| 169 | 168 | @SuppressWarnings("rawtypes") |
| 170 | 169 | List<Map> getUserJobStatus(Map param); |
| 170 | + | |
| 171 | + /* | |
| 172 | + * AI Sub 작업리스트 | |
| 173 | + */ | |
| 174 | + @SuppressWarnings("rawtypes") | |
| 175 | + List<Map> getAiSubReadData(Map param); | |
| 176 | + | |
| 177 | + /** | |
| 178 | + * AI Sub matching을 위한 자료 조회 | |
| 179 | + * @param param | |
| 180 | + * @return | |
| 181 | + */ | |
| 182 | + @SuppressWarnings("rawtypes") | |
| 183 | + List<Map> getAiSubDataOne(Map param); | |
| 184 | + | |
| 185 | + /** | |
| 186 | + * AI Sub matching을 위한 자료 조회 | |
| 187 | + * @param param | |
| 188 | + * @return | |
| 189 | + */ | |
| 190 | + @SuppressWarnings("rawtypes") | |
| 191 | + List<Map> getAiSubDataTwo(Map param); | |
| 171 | 192 | |
| 172 | 193 | } |
| 173 | 194 | \ No newline at end of file | ... | ... |
src/main/java/com/batch/service/JobService.java
| 1 | 1 | package com.batch.service; |
| 2 | 2 | |
| 3 | +import java.math.BigDecimal; | |
| 3 | 4 | import java.text.SimpleDateFormat; |
| 4 | 5 | import java.util.ArrayList; |
| 5 | 6 | import java.util.Arrays; |
| ... | ... | @@ -12,6 +13,7 @@ import java.util.UUID; |
| 12 | 13 | import org.springframework.batch.core.BatchStatus; |
| 13 | 14 | import org.springframework.batch.core.Job; |
| 14 | 15 | import org.springframework.batch.core.JobExecution; |
| 16 | +import org.springframework.batch.core.JobParameter; | |
| 15 | 17 | import org.springframework.batch.core.JobParameters; |
| 16 | 18 | import org.springframework.batch.core.JobParametersBuilder; |
| 17 | 19 | import org.springframework.batch.core.JobParametersInvalidException; |
| ... | ... | @@ -27,6 +29,7 @@ import org.springframework.stereotype.Service; |
| 27 | 29 | import org.zeroturnaround.exec.ProcessExecutor; |
| 28 | 30 | import org.zeroturnaround.exec.stream.LogOutputStream; |
| 29 | 31 | |
| 32 | +import com.batch.config.MatchingAiSubProcessorAuto; | |
| 30 | 33 | import com.batch.config.MatchingExtraProcessorAuto; |
| 31 | 34 | import com.batch.config.MatchingSetup; |
| 32 | 35 | import com.batch.config.MatchingSetup.Matching; |
| ... | ... | @@ -160,8 +163,20 @@ public class JobService { |
| 160 | 163 | matchingExtraProcessorAuto.process(paramRec, 1, 3, 0, i); |
| 161 | 164 | } |
| 162 | 165 | for (int i=0; i<2000;i=i+50) { |
| 166 | + matchingExtraProcessorAuto.process(paramRec, 2, 3, 0, i); | |
| 167 | + } | |
| 168 | + for (int i=0; i<2000;i=i+50) { | |
| 169 | + matchingExtraProcessorAuto.process(paramRec, 3, 3, 0, i); | |
| 170 | + } | |
| 171 | + for (int i=0; i<2000;i=i+50) { | |
| 163 | 172 | matchingExtraProcessorAuto.process(paramRec, 3, 1, i, 0); |
| 164 | 173 | } |
| 174 | + for (int i=0; i<2000;i=i+50) { | |
| 175 | + matchingExtraProcessorAuto.process(paramRec, 3, 2, i, 0); | |
| 176 | + } | |
| 177 | + for (int i=0; i<2000;i=i+50) { | |
| 178 | + matchingExtraProcessorAuto.process(paramRec, 3, 3, i, 0); | |
| 179 | + } | |
| 165 | 180 | |
| 166 | 181 | //4건씩 매칭일 경우 최대 2000건 까지 |
| 167 | 182 | for (int i=0; i<2000;i=i+25) { |
| ... | ... | @@ -183,6 +198,79 @@ public class JobService { |
| 183 | 198 | } |
| 184 | 199 | |
| 185 | 200 | @SuppressWarnings("rawtypes") |
| 201 | + @Async("extAsync") | |
| 202 | + public void aiSubJobSub(String jobGroupId, Map paramRec) throws Exception { | |
| 203 | + | |
| 204 | + //Job Create Log | |
| 205 | + UUID uuid = UUID.randomUUID(); | |
| 206 | + HashMap<String, String> mt = new HashMap<String, String>(); | |
| 207 | + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd-hh-mm-ss"); | |
| 208 | + String sDate = dateFormat.format(new Date()) + ":" + uuid.toString(); | |
| 209 | + | |
| 210 | + Map<String, Object> paramLog = new HashMap<String, Object>(); | |
| 211 | + paramLog.put("user_job_group", jobGroupId); | |
| 212 | + paramLog.put("user_job_id", sDate); | |
| 213 | + paramLog.put("user_job_name", "AI Sub 매칭(" + paramRec.toString() + ")"); | |
| 214 | + matchingInnerDelingMapper.createUserJob(paramLog); | |
| 215 | + | |
| 216 | + String sThreadName = Thread.currentThread().getName(); | |
| 217 | + long startTime = System.currentTimeMillis(); | |
| 218 | + log.info("AI Sub [" + sThreadName + "]Job Started : " + startTime); | |
| 219 | + log.debug("AI Sub [" + sThreadName + "]params=" + paramRec.toString()); | |
| 220 | + | |
| 221 | + MatchingAiSubProcessorAuto matchingAiSubProcessorAuto = new MatchingAiSubProcessorAuto(matchingInnerDelingMapper); | |
| 222 | + | |
| 223 | + //2건씩 합산 매칭일 경우 최대 20000건 까지 | |
| 224 | + for (int i=0; i<20000;i=i+1000) { | |
| 225 | + matchingAiSubProcessorAuto.process(paramRec, 1, 2, 0, i); | |
| 226 | + } | |
| 227 | + for (int i=0; i<20000;i=i+1000) { | |
| 228 | + matchingAiSubProcessorAuto.process(paramRec, 2, 1, i, 0); | |
| 229 | + } | |
| 230 | + for (int i=0; i<20000;i=i+1000) { | |
| 231 | + matchingAiSubProcessorAuto.process(paramRec, 2, 2, i, i); | |
| 232 | + } | |
| 233 | + | |
| 234 | + //3건씩 매칭일 경우 최대 2000건 까지 | |
| 235 | + for (int i=0; i<2000;i=i+50) { | |
| 236 | + matchingAiSubProcessorAuto.process(paramRec, 1, 3, 0, i); | |
| 237 | + } | |
| 238 | + for (int i=0; i<2000;i=i+50) { | |
| 239 | + matchingAiSubProcessorAuto.process(paramRec, 2, 3, 0, i); | |
| 240 | + } | |
| 241 | + for (int i=0; i<2000;i=i+50) { | |
| 242 | + matchingAiSubProcessorAuto.process(paramRec, 3, 3, 0, i); | |
| 243 | + } | |
| 244 | + for (int i=0; i<2000;i=i+50) { | |
| 245 | + matchingAiSubProcessorAuto.process(paramRec, 3, 1, i, 0); | |
| 246 | + } | |
| 247 | + for (int i=0; i<2000;i=i+50) { | |
| 248 | + matchingAiSubProcessorAuto.process(paramRec, 3, 2, i, 0); | |
| 249 | + } | |
| 250 | + for (int i=0; i<2000;i=i+50) { | |
| 251 | + matchingAiSubProcessorAuto.process(paramRec, 3, 3, i, 0); | |
| 252 | + } | |
| 253 | + | |
| 254 | + //4건씩 매칭일 경우 최대 2000건 까지 | |
| 255 | + for (int i=0; i<2000;i=i+25) { | |
| 256 | + matchingAiSubProcessorAuto.process(paramRec, 1, 4, 0, i); | |
| 257 | + } | |
| 258 | + for (int i=0; i<2000;i=i+25) { | |
| 259 | + matchingAiSubProcessorAuto.process(paramRec, 4, 1, i, 0); | |
| 260 | + } | |
| 261 | + | |
| 262 | + long endTime = System.currentTimeMillis(); | |
| 263 | + log.info("AI Sub [" + sThreadName + "]Job Ended: " + endTime); | |
| 264 | + log.info("AI Sub [" + sThreadName + "]Running Time : " + (endTime - startTime) + "ms"); | |
| 265 | + | |
| 266 | + //작업종료에 대한 로그 업데이트 | |
| 267 | + paramLog.put("exit_code", "0"); | |
| 268 | + paramLog.put("exit_message", ""); | |
| 269 | + matchingInnerDelingMapper.finishUserJob(paramLog); | |
| 270 | + | |
| 271 | + } | |
| 272 | + | |
| 273 | + @SuppressWarnings("rawtypes") | |
| 186 | 274 | @Async("aiAsync") |
| 187 | 275 | public void aiJobSub(String jobGroupId, Map paramRec) throws Exception { |
| 188 | 276 | |
| ... | ... | @@ -209,12 +297,13 @@ public class JobService { |
| 209 | 297 | String sCprCode = (String) paramRec.get("cpr_code"); |
| 210 | 298 | String sPartCpr = (String) paramRec.get("partn_cpr"); |
| 211 | 299 | String sDelngCrncy = (String) paramRec.get("delng_crncy"); |
| 300 | + String sErrorRange = (String) paramRec.get("error_range"); | |
| 212 | 301 | |
| 213 | 302 | String sThreadName = Thread.currentThread().getName(); |
| 214 | 303 | |
| 215 | 304 | log.debug("call python"); |
| 216 | 305 | new ProcessExecutor() |
| 217 | - .command(sPythonPrg, sPythonAiTarget, sThreadName, sSysSe, sAccnutYm, sCprCode, sPartCpr, sDelngCrncy) | |
| 306 | + .command(sPythonPrg, sPythonAiTarget, sThreadName, sSysSe, sAccnutYm, sCprCode, sPartCpr, sDelngCrncy, sErrorRange) | |
| 218 | 307 | .redirectOutput(new LogOutputStream() { |
| 219 | 308 | @Override |
| 220 | 309 | protected void processLine(String line) { |
| ... | ... | @@ -242,14 +331,17 @@ public class JobService { |
| 242 | 331 | HashMap<String, String> mt = new HashMap<String, String>(); |
| 243 | 332 | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd-hh-mm-ss"); |
| 244 | 333 | final String date = dateFormat.format(new Date()) + ":" + uuid.toString(); |
| 245 | - JobParameters jobParameters = new JobParametersBuilder() | |
| 246 | - .addString("syncDate", date) | |
| 247 | - .addString("jobType", jobType) | |
| 248 | - .addString("sysSe", params.get("sysSe")) | |
| 249 | - .addString("accnutYm", params.get("accnutYm")) | |
| 250 | - .addString("searchCond", params.get("searchCond")) | |
| 251 | - .toJobParameters(); | |
| 334 | + JobParametersBuilder jobParametersBuilder = new JobParametersBuilder(); | |
| 335 | + jobParametersBuilder | |
| 336 | + .addString("syncDate", date) | |
| 337 | + .addString("jobType", jobType) | |
| 338 | + .addString("sysSe", params.get("sysSe")) | |
| 339 | + .addString("accnutYm", params.get("accnutYm")); | |
| 340 | + if (params.get("cpr_code") != null) jobParametersBuilder.addString("cpr_code", params.get("cpr_code")); | |
| 341 | + if (params.get("partn_cpr") != null) jobParametersBuilder.addString("partn_cpr", params.get("partn_cpr")); | |
| 252 | 342 | |
| 343 | + JobParameters jobParameters = jobParametersBuilder.toJobParameters(); | |
| 344 | + | |
| 253 | 345 | var jobToStart = context.getBean(jobName, Job.class); |
| 254 | 346 | JobExecution jobExe = jobLauncher.run(jobToStart, jobParameters); |
| 255 | 347 | ... | ... |
src/main/resources/application.properties
src/main/resources/matchingSetup.json
| ... | ... | @@ -35,6 +35,7 @@ |
| 35 | 35 | "sn" |
| 36 | 36 | ], |
| 37 | 37 | "compareKey": "compare_ky", |
| 38 | + "currencyField": "delng_crncy", | |
| 38 | 39 | "amtField": "sum(delng_amt) as delng_amt", |
| 39 | 40 | "compareField": [ |
| 40 | 41 | "accnut_ym", |
| ... | ... | @@ -81,6 +82,7 @@ |
| 81 | 82 | "sn" |
| 82 | 83 | ], |
| 83 | 84 | "compareKey": "compare_ky", |
| 85 | + "currencyField": "delng_crncy", | |
| 84 | 86 | "amtField": "sum(delng_amt) as delng_amt", |
| 85 | 87 | "compareField": [ |
| 86 | 88 | "accnut_ym", |
| ... | ... | @@ -131,6 +133,7 @@ |
| 131 | 133 | "sn" |
| 132 | 134 | ], |
| 133 | 135 | "compareKey": "compare_ky", |
| 136 | + "currencyField": "delng_crncy", | |
| 134 | 137 | "amtField": "sum(delng_amt) as delng_amt", |
| 135 | 138 | "compareField": [ |
| 136 | 139 | "accnut_ym", |
| ... | ... | @@ -176,6 +179,7 @@ |
| 176 | 179 | "sn" |
| 177 | 180 | ], |
| 178 | 181 | "compareKey": "compare_ky", |
| 182 | + "currencyField": "delng_crncy", | |
| 179 | 183 | "amtField": "sum(delng_amt) as delng_amt", |
| 180 | 184 | "compareField": [ |
| 181 | 185 | "accnut_ym", |
| ... | ... | @@ -227,6 +231,7 @@ |
| 227 | 231 | "sn" |
| 228 | 232 | ], |
| 229 | 233 | "compareKey": "compare_ky", |
| 234 | + "currencyField": "delng_crncy", | |
| 230 | 235 | "amtField": "sum(delng_amt) as delng_amt", |
| 231 | 236 | "compareField": [ |
| 232 | 237 | "accnut_ym", |
| ... | ... | @@ -271,6 +276,7 @@ |
| 271 | 276 | "sn" |
| 272 | 277 | ], |
| 273 | 278 | "compareKey": "compare_ky", |
| 279 | + "currencyField": "delng_crncy", | |
| 274 | 280 | "amtField": "sum(delng_amt) as delng_amt", |
| 275 | 281 | "compareField": [ |
| 276 | 282 | "accnut_ym", |
| ... | ... | @@ -318,6 +324,7 @@ |
| 318 | 324 | "sn" |
| 319 | 325 | ], |
| 320 | 326 | "compareKey": "compare_ky", |
| 327 | + "currencyField": "delng_crncy", | |
| 321 | 328 | "amtField": "sum(delng_amt) as delng_amt", |
| 322 | 329 | "compareField": [ |
| 323 | 330 | "accnut_ym", |
| ... | ... | @@ -359,6 +366,7 @@ |
| 359 | 366 | "sn" |
| 360 | 367 | ], |
| 361 | 368 | "compareKey": "compare_ky", |
| 369 | + "currencyField": "delng_crncy", | |
| 362 | 370 | "amtField": "sum(delng_amt) as delng_amt", |
| 363 | 371 | "compareField": [ |
| 364 | 372 | "accnut_ym", |
| ... | ... | @@ -405,6 +413,7 @@ |
| 405 | 413 | "sn" |
| 406 | 414 | ], |
| 407 | 415 | "compareKey": "compare_ky", |
| 416 | + "currencyField": "delng_crncy", | |
| 408 | 417 | "amtField": "sum(delng_amt) as delng_amt", |
| 409 | 418 | "compareField": [ |
| 410 | 419 | "accnut_ym", |
| ... | ... | @@ -446,6 +455,7 @@ |
| 446 | 455 | "sn" |
| 447 | 456 | ], |
| 448 | 457 | "compareKey": "compare_ky", |
| 458 | + "currencyField": "delng_crncy", | |
| 449 | 459 | "amtField": "sum(delng_amt) as delng_amt", |
| 450 | 460 | "compareField": [ |
| 451 | 461 | "accnut_ym", |
| ... | ... | @@ -497,6 +507,7 @@ |
| 497 | 507 | "sn" |
| 498 | 508 | ], |
| 499 | 509 | "compareKey": "compare_ky", |
| 510 | + "currencyField": "delng_crncy", | |
| 500 | 511 | "amtField": "sum(delng_amt) as delng_amt", |
| 501 | 512 | "compareField": [ |
| 502 | 513 | "accnut_ym", |
| ... | ... | @@ -540,6 +551,7 @@ |
| 540 | 551 | "sn" |
| 541 | 552 | ], |
| 542 | 553 | "compareKey": "compare_ky", |
| 554 | + "currencyField": "delng_crncy", | |
| 543 | 555 | "amtField": "sum(delng_amt) as delng_amt", |
| 544 | 556 | "compareField": [ |
| 545 | 557 | "accnut_ym", |
| ... | ... | @@ -590,6 +602,7 @@ |
| 590 | 602 | "sn" |
| 591 | 603 | ], |
| 592 | 604 | "compareKey": "compare_ky", |
| 605 | + "currencyField": "delng_crncy", | |
| 593 | 606 | "amtField": "sum(delng_amt) as delng_amt", |
| 594 | 607 | "compareField": [ |
| 595 | 608 | "accnut_ym", |
| ... | ... | @@ -635,6 +648,7 @@ |
| 635 | 648 | "sn" |
| 636 | 649 | ], |
| 637 | 650 | "compareKey": "compare_ky", |
| 651 | + "currencyField": "delng_crncy", | |
| 638 | 652 | "amtField": "sum(delng_amt) as delng_amt", |
| 639 | 653 | "compareField": [ |
| 640 | 654 | "accnut_ym", |
| ... | ... | @@ -688,6 +702,7 @@ |
| 688 | 702 | "sn" |
| 689 | 703 | ], |
| 690 | 704 | "compareKey": "compare_ky", |
| 705 | + "currencyField": "delng_crncy", | |
| 691 | 706 | "amtField": "sum(delng_amt) as delng_amt", |
| 692 | 707 | "compareField": [ |
| 693 | 708 | "accnut_ym", |
| ... | ... | @@ -733,6 +748,7 @@ |
| 733 | 748 | "sn" |
| 734 | 749 | ], |
| 735 | 750 | "compareKey": "compare_ky", |
| 751 | + "currencyField": "delng_crncy", | |
| 736 | 752 | "amtField": "sum(delng_amt) as delng_amt", |
| 737 | 753 | "compareField": [ |
| 738 | 754 | "accnut_ym", |
| ... | ... | @@ -780,6 +796,7 @@ |
| 780 | 796 | "sn" |
| 781 | 797 | ], |
| 782 | 798 | "compareKey": "compare_ky", |
| 799 | + "currencyField": "delng_crncy", | |
| 783 | 800 | "amtField": "sum(delng_amt) as delng_amt", |
| 784 | 801 | "compareField": [ |
| 785 | 802 | "accnut_ym", |
| ... | ... | @@ -827,6 +844,7 @@ |
| 827 | 844 | "sn" |
| 828 | 845 | ], |
| 829 | 846 | "compareKey": "compare_ky", |
| 847 | + "currencyField": "delng_crncy", | |
| 830 | 848 | "amtField": "sum(delng_amt) as delng_amt", |
| 831 | 849 | "compareField": [ |
| 832 | 850 | "accnut_ym", |
| ... | ... | @@ -872,6 +890,7 @@ |
| 872 | 890 | "sn" |
| 873 | 891 | ], |
| 874 | 892 | "compareKey": "compare_ky", |
| 893 | + "currencyField": "delng_crncy", | |
| 875 | 894 | "amtField": "sum(delng_amt) as delng_amt", |
| 876 | 895 | "compareField": [ |
| 877 | 896 | "accnut_ym", |
| ... | ... | @@ -917,6 +936,7 @@ |
| 917 | 936 | "sn" |
| 918 | 937 | ], |
| 919 | 938 | "compareKey": "compare_ky", |
| 939 | + "currencyField": "delng_crncy", | |
| 920 | 940 | "amtField": "sum(delng_amt) as delng_amt", |
| 921 | 941 | "compareField": [ |
| 922 | 942 | "accnut_ym", |
| ... | ... | @@ -964,6 +984,7 @@ |
| 964 | 984 | "sn" |
| 965 | 985 | ], |
| 966 | 986 | "compareKey": "compare_ky", |
| 987 | + "currencyField": "delng_crncy", | |
| 967 | 988 | "amtField": "sum(delng_amt) as delng_amt", |
| 968 | 989 | "compareField": [ |
| 969 | 990 | "accnut_ym", |
| ... | ... | @@ -1011,6 +1032,7 @@ |
| 1011 | 1032 | "sn" |
| 1012 | 1033 | ], |
| 1013 | 1034 | "compareKey": "compare_ky", |
| 1035 | + "currencyField": "delng_crncy", | |
| 1014 | 1036 | "amtField": "sum(delng_amt) as delng_amt", |
| 1015 | 1037 | "compareField": [ |
| 1016 | 1038 | "accnut_ym", |
| ... | ... | @@ -1059,6 +1081,7 @@ |
| 1059 | 1081 | "sn" |
| 1060 | 1082 | ], |
| 1061 | 1083 | "compareKey": "compare_ky", |
| 1084 | + "currencyField": "delng_crncy", | |
| 1062 | 1085 | "amtField": "sum(delng_amt) as delng_amt", |
| 1063 | 1086 | "compareField": [ |
| 1064 | 1087 | "accnut_ym", |
| ... | ... | @@ -1104,6 +1127,7 @@ |
| 1104 | 1127 | "sn" |
| 1105 | 1128 | ], |
| 1106 | 1129 | "compareKey": "compare_ky", |
| 1130 | + "currencyField": "delng_crncy", | |
| 1107 | 1131 | "amtField": "sum(delng_amt) as delng_amt", |
| 1108 | 1132 | "compareField": [ |
| 1109 | 1133 | "accnut_ym", |
| ... | ... | @@ -1151,6 +1175,7 @@ |
| 1151 | 1175 | "sn" |
| 1152 | 1176 | ], |
| 1153 | 1177 | "compareKey": "compare_ky", |
| 1178 | + "currencyField": "delng_crncy", | |
| 1154 | 1179 | "amtField": "sum(delng_amt) as delng_amt", |
| 1155 | 1180 | "compareField": [ |
| 1156 | 1181 | "accnut_ym", |
| ... | ... | @@ -1196,6 +1221,7 @@ |
| 1196 | 1221 | "sn" |
| 1197 | 1222 | ], |
| 1198 | 1223 | "compareKey": "compare_ky", |
| 1224 | + "currencyField": "delng_crncy", | |
| 1199 | 1225 | "amtField": "sum(delng_amt) as delng_amt", |
| 1200 | 1226 | "compareField": [ |
| 1201 | 1227 | "accnut_ym", |
| ... | ... | @@ -1241,6 +1267,7 @@ |
| 1241 | 1267 | "sn" |
| 1242 | 1268 | ], |
| 1243 | 1269 | "compareKey": "compare_ky", |
| 1270 | + "currencyField": "delng_crncy", | |
| 1244 | 1271 | "amtField": "sum(delng_amt) as delng_amt", |
| 1245 | 1272 | "compareField": [ |
| 1246 | 1273 | "accnut_ym", |
| ... | ... | @@ -1286,6 +1313,7 @@ |
| 1286 | 1313 | "sn" |
| 1287 | 1314 | ], |
| 1288 | 1315 | "compareKey": "compare_ky", |
| 1316 | + "currencyField": "delng_crncy", | |
| 1289 | 1317 | "amtField": "sum(delng_amt) as delng_amt", |
| 1290 | 1318 | "compareField": [ |
| 1291 | 1319 | "accnut_ym", |
| ... | ... | @@ -1333,6 +1361,7 @@ |
| 1333 | 1361 | "sn" |
| 1334 | 1362 | ], |
| 1335 | 1363 | "compareKey": "compare_ky", |
| 1364 | + "currencyField": "delng_crncy", | |
| 1336 | 1365 | "amtField": "sum(delng_amt) as delng_amt", |
| 1337 | 1366 | "compareField": [ |
| 1338 | 1367 | "accnut_ym", |
| ... | ... | @@ -1378,6 +1407,7 @@ |
| 1378 | 1407 | "sn" |
| 1379 | 1408 | ], |
| 1380 | 1409 | "compareKey": "compare_ky", |
| 1410 | + "currencyField": "delng_crncy", | |
| 1381 | 1411 | "amtField": "sum(delng_amt) as delng_amt", |
| 1382 | 1412 | "compareField": [ |
| 1383 | 1413 | "accnut_ym", |
| ... | ... | @@ -1426,6 +1456,7 @@ |
| 1426 | 1456 | "sn" |
| 1427 | 1457 | ], |
| 1428 | 1458 | "compareKey": "compare_ky", |
| 1459 | + "currencyField": "delng_crncy", | |
| 1429 | 1460 | "amtField": "sum(delng_amt) as delng_amt", |
| 1430 | 1461 | "compareField": [ |
| 1431 | 1462 | "accnut_ym", |
| ... | ... | @@ -1470,6 +1501,7 @@ |
| 1470 | 1501 | "sn" |
| 1471 | 1502 | ], |
| 1472 | 1503 | "compareKey": "compare_ky", |
| 1504 | + "currencyField": "delng_crncy", | |
| 1473 | 1505 | "amtField": "sum(delng_amt) as delng_amt", |
| 1474 | 1506 | "compareField": [ |
| 1475 | 1507 | "accnut_ym", |
| ... | ... | @@ -1514,6 +1546,7 @@ |
| 1514 | 1546 | "sn" |
| 1515 | 1547 | ], |
| 1516 | 1548 | "compareKey": "compare_ky", |
| 1549 | + "currencyField": "delng_crncy", | |
| 1517 | 1550 | "amtField": "sum(delng_amt) as delng_amt", |
| 1518 | 1551 | "compareField": [ |
| 1519 | 1552 | "accnut_ym", |
| ... | ... | @@ -1558,6 +1591,7 @@ |
| 1558 | 1591 | "sn" |
| 1559 | 1592 | ], |
| 1560 | 1593 | "compareKey": "compare_ky", |
| 1594 | + "currencyField": "delng_crncy", | |
| 1561 | 1595 | "amtField": "sum(delng_amt) as delng_amt", |
| 1562 | 1596 | "compareField": [ |
| 1563 | 1597 | "accnut_ym", |
| ... | ... | @@ -1602,6 +1636,7 @@ |
| 1602 | 1636 | "sn" |
| 1603 | 1637 | ], |
| 1604 | 1638 | "compareKey": "compare_ky", |
| 1639 | + "currencyField": "delng_crncy", | |
| 1605 | 1640 | "amtField": "sum(delng_amt) as delng_amt", |
| 1606 | 1641 | "compareField": [ |
| 1607 | 1642 | "accnut_ym", |
| ... | ... | @@ -1646,6 +1681,7 @@ |
| 1646 | 1681 | "sn" |
| 1647 | 1682 | ], |
| 1648 | 1683 | "compareKey": "compare_ky", |
| 1684 | + "currencyField": "delng_crncy", | |
| 1649 | 1685 | "amtField": "sum(delng_amt) as delng_amt", |
| 1650 | 1686 | "compareField": [ |
| 1651 | 1687 | "accnut_ym", |
| ... | ... | @@ -1693,6 +1729,7 @@ |
| 1693 | 1729 | "sn" |
| 1694 | 1730 | ], |
| 1695 | 1731 | "compareKey": "compare_ky", |
| 1732 | + "currencyField": "delng_crncy", | |
| 1696 | 1733 | "amtField": "sum(delng_amt) as delng_amt", |
| 1697 | 1734 | "compareField": [ |
| 1698 | 1735 | "accnut_ym", |
| ... | ... | @@ -1737,6 +1774,7 @@ |
| 1737 | 1774 | "sn" |
| 1738 | 1775 | ], |
| 1739 | 1776 | "compareKey": "compare_ky", |
| 1777 | + "currencyField": "delng_crncy", | |
| 1740 | 1778 | "amtField": "sum(delng_amt) as delng_amt", |
| 1741 | 1779 | "compareField": [ |
| 1742 | 1780 | "accnut_ym", |
| ... | ... | @@ -1781,6 +1819,7 @@ |
| 1781 | 1819 | "sn" |
| 1782 | 1820 | ], |
| 1783 | 1821 | "compareKey": "compare_ky", |
| 1822 | + "currencyField": "delng_crncy", | |
| 1784 | 1823 | "amtField": "sum(delng_amt) as delng_amt", |
| 1785 | 1824 | "compareField": [ |
| 1786 | 1825 | "accnut_ym", |
| ... | ... | @@ -1825,6 +1864,7 @@ |
| 1825 | 1864 | "sn" |
| 1826 | 1865 | ], |
| 1827 | 1866 | "compareKey": "compare_ky", |
| 1867 | + "currencyField": "delng_crncy", | |
| 1828 | 1868 | "amtField": "sum(delng_amt) as delng_amt", |
| 1829 | 1869 | "compareField": [ |
| 1830 | 1870 | "accnut_ym", |
| ... | ... | @@ -1869,6 +1909,7 @@ |
| 1869 | 1909 | "sn" |
| 1870 | 1910 | ], |
| 1871 | 1911 | "compareKey": "compare_ky", |
| 1912 | + "currencyField": "delng_crncy", | |
| 1872 | 1913 | "amtField": "sum(delng_amt) as delng_amt", |
| 1873 | 1914 | "compareField": [ |
| 1874 | 1915 | "accnut_ym", |
| ... | ... | @@ -1913,6 +1954,7 @@ |
| 1913 | 1954 | "sn" |
| 1914 | 1955 | ], |
| 1915 | 1956 | "compareKey": "compare_ky", |
| 1957 | + "currencyField": "delng_crncy", | |
| 1916 | 1958 | "amtField": "sum(delng_amt) as delng_amt", |
| 1917 | 1959 | "compareField": [ |
| 1918 | 1960 | "accnut_ym", |
| ... | ... | @@ -1962,6 +2004,7 @@ |
| 1962 | 2004 | "sn" |
| 1963 | 2005 | ], |
| 1964 | 2006 | "compareKey": "compare_ky", |
| 2007 | + "currencyField": "delng_crncy", | |
| 1965 | 2008 | "amtField": "sum(delng_amt) as delng_amt", |
| 1966 | 2009 | "compareField": [ |
| 1967 | 2010 | "accnut_ym", |
| ... | ... | @@ -2007,6 +2050,7 @@ |
| 2007 | 2050 | "sn" |
| 2008 | 2051 | ], |
| 2009 | 2052 | "compareKey": "compare_ky", |
| 2053 | + "currencyField": "delng_crncy", | |
| 2010 | 2054 | "amtField": "sum(delng_amt) as delng_amt", |
| 2011 | 2055 | "compareField": [ |
| 2012 | 2056 | "accnut_ym", |
| ... | ... | @@ -2052,6 +2096,7 @@ |
| 2052 | 2096 | "sn" |
| 2053 | 2097 | ], |
| 2054 | 2098 | "compareKey": "compare_ky", |
| 2099 | + "currencyField": "delng_crncy", | |
| 2055 | 2100 | "amtField": "sum(delng_amt) as delng_amt", |
| 2056 | 2101 | "compareField": [ |
| 2057 | 2102 | "accnut_ym", |
| ... | ... | @@ -2097,6 +2142,7 @@ |
| 2097 | 2142 | "sn" |
| 2098 | 2143 | ], |
| 2099 | 2144 | "compareKey": "compare_ky", |
| 2145 | + "currencyField": "delng_crncy", | |
| 2100 | 2146 | "amtField": "sum(delng_amt) as delng_amt", |
| 2101 | 2147 | "compareField": [ |
| 2102 | 2148 | "accnut_ym", |
| ... | ... | @@ -2143,6 +2189,7 @@ |
| 2143 | 2189 | "sn" |
| 2144 | 2190 | ], |
| 2145 | 2191 | "compareKey": "compare_ky", |
| 2192 | + "currencyField": "delng_crncy", | |
| 2146 | 2193 | "amtField": "sum(delng_amt) as delng_amt", |
| 2147 | 2194 | "compareField": [ |
| 2148 | 2195 | "accnut_ym", |
| ... | ... | @@ -2188,6 +2235,7 @@ |
| 2188 | 2235 | "sn" |
| 2189 | 2236 | ], |
| 2190 | 2237 | "compareKey": "compare_ky", |
| 2238 | + "currencyField": "delng_crncy", | |
| 2191 | 2239 | "amtField": "sum(delng_amt) as delng_amt", |
| 2192 | 2240 | "compareField": [ |
| 2193 | 2241 | "accnut_ym", |
| ... | ... | @@ -2233,6 +2281,7 @@ |
| 2233 | 2281 | "sn" |
| 2234 | 2282 | ], |
| 2235 | 2283 | "compareKey": "compare_ky", |
| 2284 | + "currencyField": "delng_crncy", | |
| 2236 | 2285 | "amtField": "sum(delng_amt) as delng_amt", |
| 2237 | 2286 | "compareField": [ |
| 2238 | 2287 | "accnut_ym", |
| ... | ... | @@ -2278,6 +2327,7 @@ |
| 2278 | 2327 | "sn" |
| 2279 | 2328 | ], |
| 2280 | 2329 | "compareKey": "compare_ky", |
| 2330 | + "currencyField": "delng_crncy", | |
| 2281 | 2331 | "amtField": "sum(delng_amt) as delng_amt", |
| 2282 | 2332 | "compareField": [ |
| 2283 | 2333 | "accnut_ym", |
| ... | ... | @@ -2336,6 +2386,7 @@ |
| 2336 | 2386 | "sn" |
| 2337 | 2387 | ], |
| 2338 | 2388 | "compareKey": "compare_ky", |
| 2389 | + "currencyField": "delng_crncy", | |
| 2339 | 2390 | "amtField": "sum(delng_amt) as delng_amt", |
| 2340 | 2391 | "compareField": [ |
| 2341 | 2392 | "accnut_ym", |
| ... | ... | @@ -2381,6 +2432,7 @@ |
| 2381 | 2432 | "sn" |
| 2382 | 2433 | ], |
| 2383 | 2434 | "compareKey": "compare_ky", |
| 2435 | + "currencyField": "delng_crncy", | |
| 2384 | 2436 | "amtField": "sum(delng_amt) as delng_amt", |
| 2385 | 2437 | "compareField": [ |
| 2386 | 2438 | "accnut_ym", |
| ... | ... | @@ -2426,6 +2478,7 @@ |
| 2426 | 2478 | "sn" |
| 2427 | 2479 | ], |
| 2428 | 2480 | "compareKey": "compare_ky", |
| 2481 | + "currencyField": "delng_crncy", | |
| 2429 | 2482 | "amtField": "sum(delng_amt) as delng_amt", |
| 2430 | 2483 | "compareField": [ |
| 2431 | 2484 | "accnut_ym", |
| ... | ... | @@ -2471,6 +2524,7 @@ |
| 2471 | 2524 | "sn" |
| 2472 | 2525 | ], |
| 2473 | 2526 | "compareKey": "compare_ky", |
| 2527 | + "currencyField": "delng_crncy", | |
| 2474 | 2528 | "amtField": "sum(delng_amt) as delng_amt", |
| 2475 | 2529 | "compareField": [ |
| 2476 | 2530 | "accnut_ym", |
| ... | ... | @@ -2516,6 +2570,7 @@ |
| 2516 | 2570 | "sn" |
| 2517 | 2571 | ], |
| 2518 | 2572 | "compareKey": "compare_ky", |
| 2573 | + "currencyField": "delng_crncy", | |
| 2519 | 2574 | "amtField": "sum(delng_amt) as delng_amt", |
| 2520 | 2575 | "compareField": [ |
| 2521 | 2576 | "accnut_ym", |
| ... | ... | @@ -2561,6 +2616,7 @@ |
| 2561 | 2616 | "sn" |
| 2562 | 2617 | ], |
| 2563 | 2618 | "compareKey": "compare_ky", |
| 2619 | + "currencyField": "delng_crncy", | |
| 2564 | 2620 | "amtField": "sum(delng_amt) as delng_amt", |
| 2565 | 2621 | "compareField": [ |
| 2566 | 2622 | "accnut_ym", |
| ... | ... | @@ -2606,6 +2662,7 @@ |
| 2606 | 2662 | "sn" |
| 2607 | 2663 | ], |
| 2608 | 2664 | "compareKey": "compare_ky", |
| 2665 | + "currencyField": "delng_crncy", | |
| 2609 | 2666 | "amtField": "sum(delng_amt) as delng_amt", |
| 2610 | 2667 | "compareField": [ |
| 2611 | 2668 | "accnut_ym", |
| ... | ... | @@ -2651,6 +2708,7 @@ |
| 2651 | 2708 | "sn" |
| 2652 | 2709 | ], |
| 2653 | 2710 | "compareKey": "compare_ky", |
| 2711 | + "currencyField": "delng_crncy", | |
| 2654 | 2712 | "amtField": "sum(delng_amt) as delng_amt", |
| 2655 | 2713 | "compareField": [ |
| 2656 | 2714 | "accnut_ym", |
| ... | ... | @@ -2700,6 +2758,7 @@ |
| 2700 | 2758 | "sn" |
| 2701 | 2759 | ], |
| 2702 | 2760 | "compareKey": "compare_ky", |
| 2761 | + "currencyField": "delng_crncy", | |
| 2703 | 2762 | "amtField": "sum(delng_amt) as delng_amt", |
| 2704 | 2763 | "compareField": [ |
| 2705 | 2764 | "accnut_ym", |
| ... | ... | @@ -2745,6 +2804,7 @@ |
| 2745 | 2804 | "sn" |
| 2746 | 2805 | ], |
| 2747 | 2806 | "compareKey": "compare_ky", |
| 2807 | + "currencyField": "delng_crncy", | |
| 2748 | 2808 | "amtField": "sum(delng_amt) as delng_amt", |
| 2749 | 2809 | "compareField": [ |
| 2750 | 2810 | "accnut_ym", |
| ... | ... | @@ -2790,6 +2850,7 @@ |
| 2790 | 2850 | "sn" |
| 2791 | 2851 | ], |
| 2792 | 2852 | "compareKey": "compare_ky", |
| 2853 | + "currencyField": "delng_crncy", | |
| 2793 | 2854 | "amtField": "sum(delng_amt) as delng_amt", |
| 2794 | 2855 | "compareField": [ |
| 2795 | 2856 | "accnut_ym", |
| ... | ... | @@ -2836,6 +2897,7 @@ |
| 2836 | 2897 | "sn" |
| 2837 | 2898 | ], |
| 2838 | 2899 | "compareKey": "compare_ky", |
| 2900 | + "currencyField": "delng_crncy", | |
| 2839 | 2901 | "amtField": "sum(delng_amt) as delng_amt", |
| 2840 | 2902 | "compareField": [ |
| 2841 | 2903 | "accnut_ym", |
| ... | ... | @@ -2879,6 +2941,7 @@ |
| 2879 | 2941 | "sn" |
| 2880 | 2942 | ], |
| 2881 | 2943 | "compareKey": "compare_ky", |
| 2944 | + "currencyField": "delng_crncy", | |
| 2882 | 2945 | "amtField": "sum(delng_amt) as delng_amt", |
| 2883 | 2946 | "compareField": [ |
| 2884 | 2947 | "accnut_ym", |
| ... | ... | @@ -2922,6 +2985,7 @@ |
| 2922 | 2985 | "sn" |
| 2923 | 2986 | ], |
| 2924 | 2987 | "compareKey": "compare_ky", |
| 2988 | + "currencyField": "delng_crncy", | |
| 2925 | 2989 | "amtField": "sum(delng_amt) as delng_amt", |
| 2926 | 2990 | "compareField": [ |
| 2927 | 2991 | "accnut_ym", |
| ... | ... | @@ -2967,6 +3031,7 @@ |
| 2967 | 3031 | "sn" |
| 2968 | 3032 | ], |
| 2969 | 3033 | "compareKey": "compare_ky", |
| 3034 | + "currencyField": "delng_crncy", | |
| 2970 | 3035 | "amtField": "sum(delng_amt) as delng_amt", |
| 2971 | 3036 | "compareField": [ |
| 2972 | 3037 | "accnut_ym", |
| ... | ... | @@ -3010,6 +3075,7 @@ |
| 3010 | 3075 | "sn" |
| 3011 | 3076 | ], |
| 3012 | 3077 | "compareKey": "compare_ky", |
| 3078 | + "currencyField": "delng_crncy", | |
| 3013 | 3079 | "amtField": "sum(delng_amt) as delng_amt", |
| 3014 | 3080 | "compareField": [ |
| 3015 | 3081 | "accnut_ym", |
| ... | ... | @@ -3053,6 +3119,7 @@ |
| 3053 | 3119 | "sn" |
| 3054 | 3120 | ], |
| 3055 | 3121 | "compareKey": "compare_ky", |
| 3122 | + "currencyField": "delng_crncy", | |
| 3056 | 3123 | "amtField": "sum(delng_amt) as delng_amt", |
| 3057 | 3124 | "compareField": [ |
| 3058 | 3125 | "accnut_ym", |
| ... | ... | @@ -3093,6 +3160,7 @@ |
| 3093 | 3160 | "sn" |
| 3094 | 3161 | ], |
| 3095 | 3162 | "compareKey": "compare_ky", |
| 3163 | + "currencyField": "delng_crncy", | |
| 3096 | 3164 | "amtField": "sum(delng_amt) as delng_amt", |
| 3097 | 3165 | "compareField": [ |
| 3098 | 3166 | "accnut_ym", |
| ... | ... | @@ -3134,6 +3202,7 @@ |
| 3134 | 3202 | "sn" |
| 3135 | 3203 | ], |
| 3136 | 3204 | "compareKey": "compare_ky", |
| 3205 | + "currencyField": "delng_crncy", | |
| 3137 | 3206 | "amtField": "sum(delng_amt) as delng_amt", |
| 3138 | 3207 | "compareField": [ |
| 3139 | 3208 | "accnut_ym", |
| ... | ... | @@ -3183,6 +3252,7 @@ |
| 3183 | 3252 | "sn" |
| 3184 | 3253 | ], |
| 3185 | 3254 | "compareKey": "compare_ky", |
| 3255 | + "currencyField": "delng_crncy", | |
| 3186 | 3256 | "amtField": "sum(delng_amt) as delng_amt", |
| 3187 | 3257 | "compareField": [ |
| 3188 | 3258 | "accnut_ym", |
| ... | ... | @@ -3228,6 +3298,7 @@ |
| 3228 | 3298 | "sn" |
| 3229 | 3299 | ], |
| 3230 | 3300 | "compareKey": "compare_ky", |
| 3301 | + "currencyField": "delng_crncy", | |
| 3231 | 3302 | "amtField": "sum(delng_amt) as delng_amt", |
| 3232 | 3303 | "compareField": [ |
| 3233 | 3304 | "accnut_ym", |
| ... | ... | @@ -3273,6 +3344,7 @@ |
| 3273 | 3344 | "sn" |
| 3274 | 3345 | ], |
| 3275 | 3346 | "compareKey": "compare_ky", |
| 3347 | + "currencyField": "delng_crncy", | |
| 3276 | 3348 | "amtField": "sum(delng_amt) as delng_amt", |
| 3277 | 3349 | "compareField": [ |
| 3278 | 3350 | "accnut_ym", |
| ... | ... | @@ -3321,6 +3393,7 @@ |
| 3321 | 3393 | "sn" |
| 3322 | 3394 | ], |
| 3323 | 3395 | "compareKey": "compare_ky", |
| 3396 | + "currencyField": "delng_crncy", | |
| 3324 | 3397 | "amtField": "sum(delng_amt) as delng_amt", |
| 3325 | 3398 | "compareField": [ |
| 3326 | 3399 | "accnut_ym", |
| ... | ... | @@ -3366,6 +3439,7 @@ |
| 3366 | 3439 | "sn" |
| 3367 | 3440 | ], |
| 3368 | 3441 | "compareKey": "compare_ky", |
| 3442 | + "currencyField": "delng_crncy", | |
| 3369 | 3443 | "amtField": "sum(delng_amt) as delng_amt", |
| 3370 | 3444 | "compareField": [ |
| 3371 | 3445 | "accnut_ym", |
| ... | ... | @@ -3411,6 +3485,7 @@ |
| 3411 | 3485 | "sn" |
| 3412 | 3486 | ], |
| 3413 | 3487 | "compareKey": "compare_ky", |
| 3488 | + "currencyField": "delng_crncy", | |
| 3414 | 3489 | "amtField": "sum(delng_amt) as delng_amt", |
| 3415 | 3490 | "compareField": [ |
| 3416 | 3491 | "accnut_ym", |
| ... | ... | @@ -3459,6 +3534,7 @@ |
| 3459 | 3534 | "sn" |
| 3460 | 3535 | ], |
| 3461 | 3536 | "compareKey": "compare_ky", |
| 3537 | + "currencyField": "delng_crncy", | |
| 3462 | 3538 | "amtField": "sum(delng_amt) as delng_amt", |
| 3463 | 3539 | "compareField": [ |
| 3464 | 3540 | "accnut_ym", |
| ... | ... | @@ -3504,6 +3580,7 @@ |
| 3504 | 3580 | "sn" |
| 3505 | 3581 | ], |
| 3506 | 3582 | "compareKey": "compare_ky", |
| 3583 | + "currencyField": "delng_crncy", | |
| 3507 | 3584 | "amtField": "sum(delng_amt) as delng_amt", |
| 3508 | 3585 | "compareField": [ |
| 3509 | 3586 | "accnut_ym", |
| ... | ... | @@ -3549,6 +3626,7 @@ |
| 3549 | 3626 | "sn" |
| 3550 | 3627 | ], |
| 3551 | 3628 | "compareKey": "compare_ky", |
| 3629 | + "currencyField": "delng_crncy", | |
| 3552 | 3630 | "amtField": "sum(delng_amt) as delng_amt", |
| 3553 | 3631 | "compareField": [ |
| 3554 | 3632 | "accnut_ym", |
| ... | ... | @@ -3599,6 +3677,7 @@ |
| 3599 | 3677 | "sn" |
| 3600 | 3678 | ], |
| 3601 | 3679 | "compareKey": "compare_ky", |
| 3680 | + "currencyField": "delng_crncy", | |
| 3602 | 3681 | "amtField": "sum(delng_amt) as delng_amt", |
| 3603 | 3682 | "compareField": [ |
| 3604 | 3683 | "accnut_ym", |
| ... | ... | @@ -3644,6 +3723,7 @@ |
| 3644 | 3723 | "sn" |
| 3645 | 3724 | ], |
| 3646 | 3725 | "compareKey": "compare_ky", |
| 3726 | + "currencyField": "delng_crncy", | |
| 3647 | 3727 | "amtField": "sum(delng_amt) as delng_amt", |
| 3648 | 3728 | "compareField": [ |
| 3649 | 3729 | "accnut_ym", |
| ... | ... | @@ -3687,6 +3767,7 @@ |
| 3687 | 3767 | "sn" |
| 3688 | 3768 | ], |
| 3689 | 3769 | "compareKey": "compare_ky", |
| 3770 | + "currencyField": "delng_crncy", | |
| 3690 | 3771 | "amtField": "sum(delng_amt) as delng_amt", |
| 3691 | 3772 | "compareField": [ |
| 3692 | 3773 | "accnut_ym", |
| ... | ... | @@ -3732,6 +3813,7 @@ |
| 3732 | 3813 | "sn" |
| 3733 | 3814 | ], |
| 3734 | 3815 | "compareKey": "compare_ky", |
| 3816 | + "currencyField": "delng_crncy", | |
| 3735 | 3817 | "amtField": "sum(delng_amt) as delng_amt", |
| 3736 | 3818 | "compareField": [ |
| 3737 | 3819 | "accnut_ym", |
| ... | ... | @@ -3777,6 +3859,7 @@ |
| 3777 | 3859 | "sn" |
| 3778 | 3860 | ], |
| 3779 | 3861 | "compareKey": "compare_ky", |
| 3862 | + "currencyField": "delng_crncy", | |
| 3780 | 3863 | "amtField": "sum(delng_amt) as delng_amt", |
| 3781 | 3864 | "compareField": [ |
| 3782 | 3865 | "accnut_ym", |
| ... | ... | @@ -3820,6 +3903,7 @@ |
| 3820 | 3903 | "sn" |
| 3821 | 3904 | ], |
| 3822 | 3905 | "compareKey": "compare_ky", |
| 3906 | + "currencyField": "delng_crncy", | |
| 3823 | 3907 | "amtField": "sum(delng_amt) as delng_amt", |
| 3824 | 3908 | "compareField": [ |
| 3825 | 3909 | "accnut_ym", | ... | ... |
src/main/resources/mybatis/primaryMapper/MatchingInnerDelingMapper.xml
| ... | ... | @@ -24,6 +24,12 @@ |
| 24 | 24 | and accnut_ym = #{accnutYm} |
| 25 | 25 | and mtch_ty is null |
| 26 | 26 | and dta_ty in ('11','21','31','33','35','37','41') |
| 27 | + <if test='cpr_code != null and !cpr_code.equals("")'> | |
| 28 | + and cpr_code = #{cpr_code} | |
| 29 | + </if> | |
| 30 | + <if test='partn_cpr != null and !partn_cpr.equals("")'> | |
| 31 | + and partn_cpr = #{partn_cpr} | |
| 32 | + </if> | |
| 27 | 33 | GROUP BY |
| 28 | 34 | sys_se |
| 29 | 35 | , accnut_ym |
| ... | ... | @@ -43,6 +49,12 @@ |
| 43 | 49 | and accnut_ym = #{accnutYm} |
| 44 | 50 | and mtch_ty is null |
| 45 | 51 | and dta_ty in ('12','22','32','34','36','38','42') |
| 52 | + <if test='cpr_code != null and !cpr_code.equals("")'> | |
| 53 | + and partn_cpr = #{partn_cpr} | |
| 54 | + </if> | |
| 55 | + <if test='partn_cpr != null and !partn_cpr.equals("")'> | |
| 56 | + and cpr_code = #{cpr_code} | |
| 57 | + </if> | |
| 46 | 58 | GROUP BY |
| 47 | 59 | sys_se |
| 48 | 60 | , accnut_ym |
| ... | ... | @@ -77,6 +89,7 @@ |
| 77 | 89 | SELECT |
| 78 | 90 | accnut_ym |
| 79 | 91 | , compare_ky |
| 92 | + , ${currencyField} | |
| 80 | 93 | , ${amtField} |
| 81 | 94 | FROM |
| 82 | 95 | public.batch_tbcr_inner_delng |
| ... | ... | @@ -91,7 +104,8 @@ |
| 91 | 104 | </foreach> |
| 92 | 105 | group by |
| 93 | 106 | accnut_ym, |
| 94 | - compare_ky | |
| 107 | + compare_ky, | |
| 108 | + ${currencyField} | |
| 95 | 109 | </select> |
| 96 | 110 | |
| 97 | 111 | <!-- 매칭결과 업데이트 --> |
| ... | ... | @@ -525,6 +539,12 @@ |
| 525 | 539 | and accnut_ym = #{accnutYm} |
| 526 | 540 | and mtch_ty is null |
| 527 | 541 | and dta_ty in ('11','21','31','33','35','37','41') |
| 542 | + <if test='cpr_code != null and !cpr_code.equals("")'> | |
| 543 | + and cpr_code = #{cpr_code} | |
| 544 | + </if> | |
| 545 | + <if test='partn_cpr != null and !partn_cpr.equals("")'> | |
| 546 | + and partn_cpr = #{partn_cpr} | |
| 547 | + </if> | |
| 528 | 548 | GROUP BY |
| 529 | 549 | sys_se |
| 530 | 550 | , accnut_ym |
| ... | ... | @@ -546,6 +566,12 @@ |
| 546 | 566 | and accnut_ym = #{accnutYm} |
| 547 | 567 | and mtch_ty is null |
| 548 | 568 | and dta_ty in ('12','22','32','34','36','38','42') |
| 569 | + <if test='cpr_code != null and !cpr_code.equals("")'> | |
| 570 | + and partn_cpr = #{partn_cpr} | |
| 571 | + </if> | |
| 572 | + <if test='partn_cpr != null and !partn_cpr.equals("")'> | |
| 573 | + and cpr_code = #{cpr_code} | |
| 574 | + </if> | |
| 549 | 575 | GROUP BY |
| 550 | 576 | sys_se |
| 551 | 577 | , accnut_ym |
| ... | ... | @@ -624,4 +650,142 @@ |
| 624 | 650 | and accnut_ym = #{accnutYm} |
| 625 | 651 | </select> |
| 626 | 652 | |
| 653 | + <!-- 작업리스트 --> | |
| 654 | + <select id="getAiSubReadData" parameterType="map" resultType="map"> | |
| 655 | + SELECT | |
| 656 | + sys_se | |
| 657 | + , accnut_ym | |
| 658 | + , cpr_code | |
| 659 | + , partn_cpr | |
| 660 | + , mtch_ty | |
| 661 | + , mtch_ky | |
| 662 | + FROM | |
| 663 | + ( | |
| 664 | + SELECT | |
| 665 | + sys_se | |
| 666 | + , accnut_ym | |
| 667 | + , cpr_code | |
| 668 | + , partn_cpr | |
| 669 | + , mtch_ty | |
| 670 | + , mtch_ky | |
| 671 | + , case when count(*) > 0 then 1 else 0 end as cnt | |
| 672 | + FROM | |
| 673 | + public.batch_tbcr_inner_delng | |
| 674 | + WHERE | |
| 675 | + sys_se = #{sysSe} | |
| 676 | + and accnut_ym = #{accnutYm} | |
| 677 | + and mtch_ty = #{mtch_ty} | |
| 678 | + and dta_ty in ('11','21','31','33','35','37','41') | |
| 679 | + <if test='cpr_code != null and !cpr_code.equals("")'> | |
| 680 | + and cpr_code = #{cpr_code} | |
| 681 | + </if> | |
| 682 | + <if test='partn_cpr != null and !partn_cpr.equals("")'> | |
| 683 | + and partn_cpr = #{partn_cpr} | |
| 684 | + </if> | |
| 685 | + GROUP BY | |
| 686 | + sys_se | |
| 687 | + , accnut_ym | |
| 688 | + , cpr_code | |
| 689 | + , partn_cpr | |
| 690 | + , mtch_ty | |
| 691 | + , mtch_ky | |
| 692 | + union all | |
| 693 | + SELECT | |
| 694 | + sys_se | |
| 695 | + , accnut_ym | |
| 696 | + , partn_cpr as cpr_code | |
| 697 | + , cpr_code as partn_cpr | |
| 698 | + , mtch_ty | |
| 699 | + , mtch_ky | |
| 700 | + , case when count(*) > 0 then 1 else 0 end as cnt | |
| 701 | + FROM | |
| 702 | + public.batch_tbcr_inner_delng | |
| 703 | + WHERE | |
| 704 | + sys_se = #{sysSe} | |
| 705 | + and accnut_ym = #{accnutYm} | |
| 706 | + and mtch_ty = #{mtch_ty} | |
| 707 | + and dta_ty in ('12','22','32','34','36','38','42') | |
| 708 | + <if test='cpr_code != null and !cpr_code.equals("")'> | |
| 709 | + and partn_cpr = #{partn_cpr} | |
| 710 | + </if> | |
| 711 | + <if test='partn_cpr != null and !partn_cpr.equals("")'> | |
| 712 | + and cpr_code = #{cpr_code} | |
| 713 | + </if> | |
| 714 | + GROUP BY | |
| 715 | + sys_se | |
| 716 | + , accnut_ym | |
| 717 | + , cpr_code | |
| 718 | + , partn_cpr | |
| 719 | + , mtch_ty | |
| 720 | + , mtch_ky | |
| 721 | + ) m | |
| 722 | + GROUP BY | |
| 723 | + sys_se | |
| 724 | + , accnut_ym | |
| 725 | + , cpr_code | |
| 726 | + , partn_cpr | |
| 727 | + , mtch_ty | |
| 728 | + , mtch_ky | |
| 729 | + HAVING sum(cnt) > 1 | |
| 730 | + </select> | |
| 731 | + | |
| 732 | + | |
| 733 | + <!-- 매칭작업할 데이타 가져오기 --> | |
| 734 | + <select id="getAiSubDataOne" parameterType="map" resultType="map"> | |
| 735 | + SELECT | |
| 736 | + sys_se | |
| 737 | + , accnut_ym | |
| 738 | + , sn | |
| 739 | + , '' as compare_ky | |
| 740 | + , delng_de | |
| 741 | + , delng_amt | |
| 742 | + FROM | |
| 743 | + public.batch_tbcr_inner_delng | |
| 744 | + WHERE | |
| 745 | + sys_se = #{sysSe} | |
| 746 | + and accnut_ym = #{accnutYm} | |
| 747 | + and cpr_code = #{cprCode} | |
| 748 | + and partn_cpr = #{partnCpr} | |
| 749 | + and mtch_ty = #{mtchTy} | |
| 750 | + and mtch_ky = #{mtchKy} | |
| 751 | + <if test='conds eq "T".toString()'> | |
| 752 | + and dta_ty in ('11','21','41') | |
| 753 | + </if> | |
| 754 | + <if test='conds eq "B".toString()'> | |
| 755 | + and dta_ty in ('31','33','35','37') | |
| 756 | + </if> | |
| 757 | + and delng_amt != 0 | |
| 758 | + ORDER BY | |
| 759 | + delng_de | |
| 760 | + </select> | |
| 761 | + | |
| 762 | + <!-- 매칭작업할 데이타 가져오기 --> | |
| 763 | + <select id="getAiSubDataTwo" parameterType="map" resultType="map"> | |
| 764 | + SELECT | |
| 765 | + sys_se | |
| 766 | + , accnut_ym | |
| 767 | + , sn | |
| 768 | + , '' as compare_ky | |
| 769 | + , delng_de | |
| 770 | + , delng_amt | |
| 771 | + FROM | |
| 772 | + public.batch_tbcr_inner_delng | |
| 773 | + WHERE | |
| 774 | + sys_se = #{sysSe} | |
| 775 | + and accnut_ym = #{accnutYm} | |
| 776 | + and cpr_code = #{cprCode} | |
| 777 | + and partn_cpr = #{partnCpr} | |
| 778 | + and mtch_ty = #{mtchTy} | |
| 779 | + and mtch_ky = #{mtchKy} | |
| 780 | + <if test='conds eq "T".toString()'> | |
| 781 | + and dta_ty in ('12','22','42') | |
| 782 | + </if> | |
| 783 | + <if test='conds eq "B".toString()'> | |
| 784 | + and dta_ty in ('32','34','36','38') | |
| 785 | + </if> | |
| 786 | + and delng_amt != 0 | |
| 787 | + ORDER BY | |
| 788 | + delng_de | |
| 789 | + </select> | |
| 790 | + | |
| 627 | 791 | </mapper> |
| 628 | 792 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -20,7 +20,8 @@ http://localhost:8080/api/job/matching |
| 20 | 20 | "jobType": "ALL", |
| 21 | 21 | "sysSe": "AI_ALL", |
| 22 | 22 | "accnutYm": "202311", |
| 23 | - "searchCond": "mtch_ty is null" | |
| 23 | + "cpr_code": "O01100", | |
| 24 | + "partn_cpr": "Z01100" | |
| 24 | 25 | } |
| 25 | 26 | |
| 26 | 27 | .\curl\bin\curl -d '{"jobType": "ALL", "sysSe":"AI_ALL", "accnutYm":"202311", "searchCond":"mtch_ty is null"}' ` |
| ... | ... | @@ -32,7 +33,9 @@ http://localhost:8080/api/job/matching |
| 32 | 33 | http://localhost:8080/api/job/extramatching |
| 33 | 34 | { |
| 34 | 35 | "sysSe": "LS_ALL", |
| 35 | - "accnutYm": "202311" | |
| 36 | + "accnutYm": "202311", | |
| 37 | + "cpr_code": "O01100", | |
| 38 | + "partn_cpr": "Z01100" | |
| 36 | 39 | } |
| 37 | 40 | |
| 38 | 41 | .\curl\bin\curl -d '{"sysSe":"AI_ALL", "accnutYm":"202311"}' ` |
| ... | ... | @@ -45,13 +48,29 @@ http://localhost:8080/api/job/aimatching |
| 45 | 48 | { |
| 46 | 49 | "sysSe": "LS_ALL", |
| 47 | 50 | "accnutYm": "202310", |
| 51 | + "cpr_code": "O01100", | |
| 52 | + "partn_cpr": "Z01100", | |
| 53 | + "error_range": "0" | |
| 48 | 54 | } |
| 49 | 55 | |
| 56 | +파이썬에 파라미터 넘기는 내용 | |
| 57 | +{PythonPrg, PythonAiTarget, ThreadName, SysSe, AccnutYm, CprCode, PartCpr, DelngCrncy, ErrorRange} | |
| 50 | 58 | |
| 51 | 59 | .\curl\bin\curl -d '{"sysSe":"AI_ALL", "accnutYm":"202311"}' ` |
| 52 | 60 | -H "Content-Type: application/json" ` |
| 53 | 61 | -X POST http://localhost:8080/api/job/aimatching |
| 54 | 62 | |
| 63 | +#AI SUB 매칭 (조합) | |
| 64 | +http://localhost:8080/api/job/aisubmatching | |
| 65 | +{ | |
| 66 | + "sysSe": "LS_ALL", | |
| 67 | + "accnutYm": "202311", | |
| 68 | + "mtch_ty": "AI_SLT", | |
| 69 | + "cpr_code": "O01100", | |
| 70 | + "partn_cpr": "Z01100", | |
| 71 | + "error_range": "0" | |
| 72 | +} | |
| 73 | + | |
| 55 | 74 | |
| 56 | 75 | #매칭결과 리턴시 |
| 57 | 76 | http://localhost:8080/api/job/return | ... | ... |