|
@@ -0,0 +1,62 @@
|
|
1
|
+package com.oqpo.api.service.sttlmng;
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+import com.oqpo.api.entity.loanmng.LoanMgntBaseInfoEntity;
|
|
5
|
+import com.oqpo.api.entity.loanmng.LoanMgntDtlHstEntity;
|
|
6
|
+import com.oqpo.api.entity.oper.UserMngEntity;
|
|
7
|
+import com.oqpo.api.entity.rtnmng.RtnProcInfoPtclEntity;
|
|
8
|
+import com.oqpo.api.entity.settmng.StlMgntBaseInfoEntity;
|
|
9
|
+import com.oqpo.api.entity.settmng.StlMgntDtlPtclEntity;
|
|
10
|
+import com.oqpo.api.entity.stinfo.StoreBaseInfoEntity;
|
|
11
|
+import com.oqpo.api.entity.stockmng.WhsProcInfoPtclEntity;
|
|
12
|
+import com.oqpo.api.enums.*;
|
|
13
|
+import com.oqpo.api.mapper.loanmng.DsptMngMapper;
|
|
14
|
+import com.oqpo.api.mapper.oper.UserMngMapper;
|
|
15
|
+import com.oqpo.api.mapper.stinfo.StoreBaseInfoMapper;
|
|
16
|
+import com.oqpo.api.mapper.sttlmng.SttlReqMapper;
|
|
17
|
+import com.oqpo.api.service.CommonService;
|
|
18
|
+import com.oqpo.api.util.DateUtil;
|
|
19
|
+import com.oqpo.api.util.StringUtil;
|
|
20
|
+import com.oqpo.api.web.dto.request.GridRequest;
|
|
21
|
+import com.oqpo.api.web.dto.request.sttlmng.*;
|
|
22
|
+import com.oqpo.api.web.dto.response.GridResponse;
|
|
23
|
+import com.oqpo.api.web.dto.response.loanmng.StlDtlListResponse;
|
|
24
|
+import com.oqpo.api.web.dto.response.sttlmng.SttlMngInfoResponse;
|
|
25
|
+import com.oqpo.api.web.dto.response.sttlmng.SttlReqResponse;
|
|
26
|
+import lombok.extern.slf4j.Slf4j;
|
|
27
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
28
|
+import org.springframework.stereotype.Service;
|
|
29
|
+import org.springframework.transaction.annotation.Transactional;
|
|
30
|
+
|
|
31
|
+import java.util.List;
|
|
32
|
+import java.util.stream.Collectors;
|
|
33
|
+
|
|
34
|
+@Service
|
|
35
|
+@Slf4j
|
|
36
|
+public class SttlInspectStateService extends CommonService {
|
|
37
|
+
|
|
38
|
+ @Autowired
|
|
39
|
+ private SttlReqMapper sttlReqMapper;
|
|
40
|
+
|
|
41
|
+ /* 정산확정 */
|
|
42
|
+ @Transactional
|
|
43
|
+ public void confirmSttl(String userId, SttlConfirmRequest sttlConfirmRequest) throws Exception {
|
|
44
|
+ // 정산관리기본정보 - 정산상태코드 변경
|
|
45
|
+ StlMgntBaseInfoEntity infoEntity = new StlMgntBaseInfoEntity();
|
|
46
|
+ infoEntity.setSttlMgntUnqNo(sttlConfirmRequest.getSttlMgntUnqNo());
|
|
47
|
+ infoEntity.setSttlStCd(SttlStCd.STTL_CONFIRM.getCd());
|
|
48
|
+ sttlReqMapper.updateStlMgntBaseInfo4SttlConfirm(userId, infoEntity);
|
|
49
|
+ }
|
|
50
|
+
|
|
51
|
+ /* 정산반려 */
|
|
52
|
+ @Transactional
|
|
53
|
+ public void rejectSttl(String userId, SttlRejectRequest sttlRejectRequest) throws Exception {
|
|
54
|
+ // 정산관리기본정보 - 정산상태코드, 정산반려사유 변경
|
|
55
|
+ StlMgntBaseInfoEntity infoEntity = new StlMgntBaseInfoEntity();
|
|
56
|
+ infoEntity.setSttlMgntUnqNo(sttlRejectRequest.getSttlMgntUnqNo());
|
|
57
|
+ infoEntity.setSttlStCd(SttlStCd.STTL_REJECT.getCd());
|
|
58
|
+ infoEntity.setSttlRjctRsn(sttlRejectRequest.getSttlRjctRsn());
|
|
59
|
+ sttlReqMapper.updateStlMgntBaseInfo4SttlReject(userId, infoEntity);
|
|
60
|
+ }
|
|
61
|
+
|
|
62
|
+}
|