|
@@ -130,45 +130,49 @@ public class DsptMngService extends CommonService {
|
130
|
130
|
// 사용자 정보 조회
|
131
|
131
|
UserMngEntity user = userMngMapper.selectUserInfo(userId);
|
132
|
132
|
|
133
|
|
- // 여신관리입금처리 데이터 조회
|
134
|
|
- LoanMgntDsptProcEntity procEntity = dsptMngMapper.selectLoanMgntDsptProcInfo(approveDsptRequest.getDsptMgntNo());
|
135
|
|
-
|
136
|
|
- // 매장의 여신관리기본정보 조회 - 없으면 에러 처리
|
137
|
|
- LoanMgntBaseInfoEntity infoEntity = dsptMngMapper.selectLoanMgntBaseInfo(procEntity.getBrandId(), procEntity.getStoreId());
|
138
|
|
-
|
139
|
|
- // 여신관리기본정보 (계좌잔액 증가)
|
140
|
|
- long trscBfBal = infoEntity.getAcctBal();
|
141
|
|
- long trscAfBal = infoEntity.getAcctBal() + procEntity.getDpstAmt();
|
142
|
|
- infoEntity.setAcctBal(trscAfBal); // 계좌잔액
|
143
|
|
- dsptMngMapper.updateLoanMgntBaseInfo4AcctBal(userId, infoEntity);
|
144
|
|
-
|
145
|
|
- // 여신관리상세이력 등록
|
146
|
|
- LoanMgntDtlHstEntity hstEntity = new LoanMgntDtlHstEntity();
|
147
|
|
- hstEntity.setLoanMgntUnqNo(infoEntity.getLoanMgntUnqNo());
|
148
|
|
- hstEntity.setLoanRegDt(DateUtil.getCurrentDate());
|
149
|
|
- hstEntity.setLoanRegTm(DateUtil.getCurrentTime());
|
150
|
|
- hstEntity.setDpstPayDvsn(DpstPayDvsn.DEPOSIT.getCd());
|
151
|
|
- hstEntity.setTrscAmt(procEntity.getDpstAmt()); // 거래금액
|
152
|
|
- hstEntity.setTrscBfBal(trscBfBal);
|
153
|
|
- hstEntity.setTrscAfBal(trscAfBal);
|
154
|
|
- hstEntity.setMediaDvsn(MediaDvsn.BANKING.getCd());
|
155
|
|
- hstEntity.setRcvAcctNo(procEntity.getRcvAcctNo()); // 입금계좌번호 - 매장 송금계좌
|
156
|
|
- hstEntity.setDpstDt(procEntity.getDpstDt());
|
157
|
|
- hstEntity.setDpstNm(procEntity.getDpstNm());
|
158
|
|
- hstEntity.setDpstBnkCd(procEntity.getDpstBnkCd());
|
159
|
|
- hstEntity.setDsptMgntNo(procEntity.getDsptMgntNo());
|
160
|
|
- dsptMngMapper.insertLoanMgntDtlHst(userId, hstEntity);
|
161
|
|
-
|
162
|
|
- // 여신관리입금처리
|
163
|
|
- LoanMgntDsptProcEntity entity = new LoanMgntDsptProcEntity();
|
164
|
|
- entity.setDsptMgntNo(approveDsptRequest.getDsptMgntNo());
|
165
|
|
- entity.setDpstStCd(DpstStCd.DPST_APPROVE.getCd()); // 입금승인
|
166
|
|
- entity.setDpstAuthId(userId);
|
167
|
|
- entity.setDpstAuthNm(user.getUserNm());
|
168
|
|
- entity.setDpstAuthDt(DateUtil.getCurrentDate());
|
169
|
|
- entity.setDpstAuthTm(DateUtil.getCurrentTime());
|
170
|
|
- entity.setDpstAuthYn("Y"); // 입금승인여부
|
171
|
|
- dsptMngMapper.updateLoanMgntDsptProcInfo4Approve(userId, entity);
|
|
133
|
+ List<String> list = approveDsptRequest.getDsptMgntNoList();
|
|
134
|
+
|
|
135
|
+ for (String dsptMgntNo : list) {
|
|
136
|
+ // 여신관리입금처리 데이터 조회
|
|
137
|
+ LoanMgntDsptProcEntity procEntity = dsptMngMapper.selectLoanMgntDsptProcInfo(dsptMgntNo);
|
|
138
|
+
|
|
139
|
+ // 매장의 여신관리기본정보 조회 - 없으면 에러 처리
|
|
140
|
+ LoanMgntBaseInfoEntity infoEntity = dsptMngMapper.selectLoanMgntBaseInfo(procEntity.getBrandId(), procEntity.getStoreId());
|
|
141
|
+
|
|
142
|
+ // 여신관리기본정보 (계좌잔액 증가)
|
|
143
|
+ long trscBfBal = infoEntity.getAcctBal();
|
|
144
|
+ long trscAfBal = infoEntity.getAcctBal() + procEntity.getDpstAmt();
|
|
145
|
+ infoEntity.setAcctBal(trscAfBal); // 계좌잔액
|
|
146
|
+ dsptMngMapper.updateLoanMgntBaseInfo4AcctBal(userId, infoEntity);
|
|
147
|
+
|
|
148
|
+ // 여신관리상세이력 등록
|
|
149
|
+ LoanMgntDtlHstEntity hstEntity = new LoanMgntDtlHstEntity();
|
|
150
|
+ hstEntity.setLoanMgntUnqNo(infoEntity.getLoanMgntUnqNo());
|
|
151
|
+ hstEntity.setLoanRegDt(DateUtil.getCurrentDate());
|
|
152
|
+ hstEntity.setLoanRegTm(DateUtil.getCurrentTime());
|
|
153
|
+ hstEntity.setDpstPayDvsn(DpstPayDvsn.DEPOSIT.getCd());
|
|
154
|
+ hstEntity.setTrscAmt(procEntity.getDpstAmt()); // 거래금액
|
|
155
|
+ hstEntity.setTrscBfBal(trscBfBal);
|
|
156
|
+ hstEntity.setTrscAfBal(trscAfBal);
|
|
157
|
+ hstEntity.setMediaDvsn(MediaDvsn.BANKING.getCd());
|
|
158
|
+ hstEntity.setRcvAcctNo(procEntity.getRcvAcctNo()); // 입금계좌번호 - 매장 송금계좌
|
|
159
|
+ hstEntity.setDpstDt(procEntity.getDpstDt());
|
|
160
|
+ hstEntity.setDpstNm(procEntity.getDpstNm());
|
|
161
|
+ hstEntity.setDpstBnkCd(procEntity.getDpstBnkCd());
|
|
162
|
+ hstEntity.setDsptMgntNo(procEntity.getDsptMgntNo());
|
|
163
|
+ dsptMngMapper.insertLoanMgntDtlHst(userId, hstEntity);
|
|
164
|
+
|
|
165
|
+ // 여신관리입금처리
|
|
166
|
+ LoanMgntDsptProcEntity entity = new LoanMgntDsptProcEntity();
|
|
167
|
+ entity.setDsptMgntNo(dsptMgntNo);
|
|
168
|
+ entity.setDpstStCd(DpstStCd.DPST_APPROVE.getCd()); // 입금승인
|
|
169
|
+ entity.setDpstAuthId(userId);
|
|
170
|
+ entity.setDpstAuthNm(user.getUserNm());
|
|
171
|
+ entity.setDpstAuthDt(DateUtil.getCurrentDate());
|
|
172
|
+ entity.setDpstAuthTm(DateUtil.getCurrentTime());
|
|
173
|
+ entity.setDpstAuthYn("Y"); // 입금승인여부
|
|
174
|
+ dsptMngMapper.updateLoanMgntDsptProcInfo4Approve(userId, entity);
|
|
175
|
+ }
|
172
|
176
|
} catch (GlobalException e) {
|
173
|
177
|
e.getStackTrace();
|
174
|
178
|
throw new GlobalException(e.getSystemMessageCode());
|
|
@@ -183,14 +187,18 @@ public class DsptMngService extends CommonService {
|
183
|
187
|
public void rejectDspt(String userId, RejectDsptRequest rejectDsptRequest) throws Exception {
|
184
|
188
|
try {
|
185
|
189
|
// 여신관리입금처리
|
186
|
|
- LoanMgntDsptProcEntity entity = new LoanMgntDsptProcEntity();
|
187
|
|
- entity.setDsptMgntNo(rejectDsptRequest.getDsptMgntNo());
|
188
|
|
- entity.setDpstStCd(DpstStCd.DPST_REJECT.getCd()); // 입금반려
|
189
|
|
- entity.setDsptRjctDt(DateUtil.getCurrentDate());
|
190
|
|
- entity.setDsptRjctTm(DateUtil.getCurrentTime());
|
191
|
|
- entity.setDsptRjctRsn(rejectDsptRequest.getDsptRjctRsn());
|
192
|
|
- entity.setDpstAuthYn("N"); // 입금승인여부
|
193
|
|
- dsptMngMapper.updateLoanMgntDsptProcInfo4Reject(userId, entity);
|
|
190
|
+ List<String> list = rejectDsptRequest.getDsptMgntNoList();
|
|
191
|
+
|
|
192
|
+ for (String dsptMgntNo : list) {
|
|
193
|
+ LoanMgntDsptProcEntity entity = new LoanMgntDsptProcEntity();
|
|
194
|
+ entity.setDsptMgntNo(dsptMgntNo);
|
|
195
|
+ entity.setDpstStCd(DpstStCd.DPST_REJECT.getCd()); // 입금반려
|
|
196
|
+ entity.setDsptRjctDt(DateUtil.getCurrentDate());
|
|
197
|
+ entity.setDsptRjctTm(DateUtil.getCurrentTime());
|
|
198
|
+ entity.setDsptRjctRsn(rejectDsptRequest.getDsptRjctRsn());
|
|
199
|
+ entity.setDpstAuthYn("N"); // 입금승인여부
|
|
200
|
+ dsptMngMapper.updateLoanMgntDsptProcInfo4Reject(userId, entity);
|
|
201
|
+ }
|
194
|
202
|
} catch (GlobalException e) {
|
195
|
203
|
e.getStackTrace();
|
196
|
204
|
throw new GlobalException(e.getSystemMessageCode());
|