hoseongs 2 роки тому
батько
коміт
ec256444db

+ 36 - 0
src/main/java/com/oqpo/api/enums/DpstStCd.java

@@ -0,0 +1,36 @@
1
+package com.oqpo.api.enums;
2
+
3
+import lombok.Getter;
4
+import lombok.Setter;
5
+
6
+public enum DpstStCd {
7
+
8
+    DPST_REQ("DP01", "입금요청"), //
9
+    DPST_APPROVE("DP02", "입금승인"), //
10
+	DPST_REJECT("DP03", "입금반려"), //
11
+    ;
12
+
13
+    DpstStCd(String cd, String nm) {
14
+        this.cd = cd;
15
+        this.name = nm;
16
+    }
17
+
18
+    @Getter
19
+    @Setter
20
+    private String cd;
21
+
22
+    @Getter
23
+    @Setter
24
+    private String name;
25
+
26
+    public static String getName(String ccd) {
27
+        DpstStCd[] values = DpstStCd.values();
28
+        for (DpstStCd icd : values) {
29
+            if (icd.cd.equals(ccd)) {
30
+                return icd.name;
31
+            }
32
+        }
33
+        return ccd;
34
+    }
35
+
36
+}

+ 108 - 91
src/main/java/com/oqpo/api/service/loanmng/DsptMngService.java

@@ -1,16 +1,22 @@
1 1
 package com.oqpo.api.service.loanmng;
2 2
 
3 3
 
4
-import com.oqpo.api.entity.stockmng.WhsMgntBaseInfoEntity;
5
-import com.oqpo.api.entity.stockmng.WhsMgntBaseLocEntity;
4
+import com.oqpo.api.entity.loanmng.LoanMgntDsptProcEntity;
5
+import com.oqpo.api.entity.oper.UserMngEntity;
6
+import com.oqpo.api.enums.DpstStCd;
6 7
 import com.oqpo.api.exception.GlobalException;
7
-import com.oqpo.api.mapper.stockmng.WhsMngMapper;
8
+import com.oqpo.api.mapper.loanmng.DsptMngMapper;
9
+import com.oqpo.api.mapper.oper.UserMngMapper;
8 10
 import com.oqpo.api.service.CommonService;
11
+import com.oqpo.api.util.DateUtil;
9 12
 import com.oqpo.api.web.dto.request.GridRequest;
10
-import com.oqpo.api.web.dto.request.stockmng.SaveWhsInfoRequest;
13
+import com.oqpo.api.web.dto.request.loanmng.ApproveDsptRequest;
14
+import com.oqpo.api.web.dto.request.loanmng.RejectDsptRequest;
15
+import com.oqpo.api.web.dto.request.loanmng.RemoveDsptRequest;
16
+import com.oqpo.api.web.dto.request.loanmng.ReqDsptRequest;
11 17
 import com.oqpo.api.web.dto.response.GridResponse;
12
-import com.oqpo.api.web.dto.response.stockmng.WhsMngInfoResponse;
13
-import com.oqpo.api.web.dto.response.stockmng.WhsMngListResponse;
18
+import com.oqpo.api.web.dto.response.loanmng.DsptMngInfoResponse;
19
+import com.oqpo.api.web.dto.response.loanmng.DsptMngListResponse;
14 20
 import lombok.extern.slf4j.Slf4j;
15 21
 import org.springframework.beans.factory.annotation.Autowired;
16 22
 import org.springframework.stereotype.Service;
@@ -24,70 +30,107 @@ import java.util.stream.Collectors;
24 30
 public class DsptMngService extends CommonService {
25 31
 
26 32
     @Autowired
27
-    private WhsMngMapper whsMngMapper;
33
+    private DsptMngMapper dsptMngMapper;
34
+
35
+    @Autowired
36
+    private UserMngMapper userMngMapper;
28 37
 
29 38
     /*
30 39
       입금관리 그리드 리스트 조회
31 40
      */
32
-    public GridResponse selectWhsMngGridList(String sBrandId, String sStoreId, String sWhsDvsn, String sWhsStCd,
33
-                                             String sWhsNm, GridRequest gridRequest) throws Exception {
41
+    public GridResponse selectDsptMngGridList(String sBrandId, String sStoreId, String sDpstStCd, String fromDt, String toDt, GridRequest gridRequest) throws Exception {
34 42
         int gridPage = gridRequest.getGridPage();
35 43
         int gridSize = gridRequest.getGridSize();
36 44
 
37
-        int gridRecords = whsMngMapper.selectWhsMngGridCnt(sBrandId, sStoreId, sWhsDvsn, sWhsStCd, sWhsNm);
45
+        int gridRecords = dsptMngMapper.selectDsptMngGridCnt(sBrandId, sStoreId, sDpstStCd, fromDt, toDt);
38 46
         int gridTotal = fnCalculateGridTotal(gridSize, gridRecords);
39
-        List<WhsMgntBaseInfoEntity> entities = whsMngMapper.selectWhsMngGridList(sBrandId, sStoreId, sWhsDvsn, sWhsStCd, sWhsNm, gridRequest);
47
+        List<LoanMgntDsptProcEntity> entities = dsptMngMapper.selectDsptMngGridList(sBrandId, sStoreId, sDpstStCd, fromDt, toDt, gridRequest);
40 48
         List<Object> gridRows = entities.stream()
41
-                .map(m -> WhsMngListResponse.builder()
49
+                .map(m -> DsptMngListResponse.builder()
42 50
                         .viewCd("R")
43
-                        .brandId(m.getBrandId())
44
-                        .brandNm(m.getBrandNm())
45
-                        .whsId(m.getWhsId())
46
-                        .whsNm(m.getWhsNm())
47
-                        .whsDvsn(m.getWhsDvsn())
48
-                        .whsDvsnNm(m.getWhsDvsnNm())
49
-                        .mgrNm(m.getMgrNm())
50
-                        .mgrTelNo(m.getMgrTelNo())
51
-                        .whsStCd(m.getWhsStCd())
52
-                        .whsStNm(m.getWhsStNm())
51
+                        .dsptMgntNo(m.getDsptMgntNo())
52
+                        .reqDt(m.getReqDt())
53
+                        .reqTm(m.getReqTm())
54
+                        .dpstAmt(m.getDpstAmt())
55
+                        .dpstDt(m.getDpstDt())
56
+                        .dpstNm(m.getDpstNm())
57
+                        .rcvAcctNo(m.getRcvAcctNo())
58
+                        .dpstBnkCd(m.getDpstBnkCd())
59
+                        .dpstBnkNm(m.getDpstBnkNm())
60
+                        .dpstStCd(m.getDpstStCd())
61
+                        .dpstStNm(m.getDpstStNm())
62
+                        .dpstAuthId(m.getDpstAuthId())
63
+                        .dpstAuthNm(m.getDpstAuthNm())
64
+                        .dpstAuthDt(m.getDpstAuthDt())
65
+                        .dpstAuthTm(m.getDpstAuthTm())
66
+                        .dsptRjctDt(m.getDsptRjctDt())
67
+                        .dsptRjctTm(m.getDsptRjctTm())
53 68
                         .storeId(m.getStoreId())
54 69
                         .storeNm(m.getStoreNm())
70
+                        .brandId(m.getBrandId())
71
+                        .brandNm(m.getBrandNm())
72
+                        .dpstAuthYn(m.getDpstAuthYn())
73
+                        .dsptRjctRsn(m.getDsptRjctRsn())
55 74
                         .build())
56 75
                 .collect(Collectors.toList());
57 76
         return GridResponse.toDTO(gridPage, gridTotal, gridRecords, gridRows);
58 77
     }
59 78
 
60 79
     /* 입금관리 정보 조회 */
61
-    public WhsMngInfoResponse selectWhsMngInfo(String brandId, String whsId) throws Exception {
62
-        WhsMgntBaseInfoEntity entity = whsMngMapper.selectWhsMgntBaseInfo(brandId, whsId);
63
-        List<WhsMgntBaseLocEntity> locEntityList = whsMngMapper.selectWhsLocGridList(brandId, whsId);
64
-        return WhsMngInfoResponse.toDTO(entity, locEntityList);
80
+    public DsptMngInfoResponse selectDsptMngInfo(String dsptMgntNo) throws Exception {
81
+        LoanMgntDsptProcEntity entity = dsptMngMapper.selectLoanMgntDsptProcInfo(dsptMgntNo);
82
+        return DsptMngInfoResponse.toDTO(entity);
65 83
     }
66 84
 
67
-    /* 입금요청 */
85
+    /* 신규입금 요청 */
68 86
     @Transactional
69
-    public void addWhsInfo(String userId, SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
87
+    public void requestDspt(String userId, ReqDsptRequest reqDsptRequest) throws Exception {
70 88
         try {
71
-            // 입금관리기본정보
72
-            WhsMgntBaseInfoEntity entity = new WhsMgntBaseInfoEntity();
73
-            entity.setBrandId(saveWhsInfoRequest.getBrandId());
74
-            entity.setWhsId(fnGetDealNo(28, "")); // 창고아이디 채번
75
-            entity.setWhsNm(saveWhsInfoRequest.getWhsNm());
76
-            entity.setWhsDvsn(saveWhsInfoRequest.getWhsDvsn());
77
-            entity.setMgrNm(saveWhsInfoRequest.getMgrNm());
78
-            entity.setMgrTelNo(saveWhsInfoRequest.getMgrTelNo());
79
-            entity.setZipNo(saveWhsInfoRequest.getZipNo());
80
-            entity.setAddr1(saveWhsInfoRequest.getAddr1());
81
-            entity.setAddr2(saveWhsInfoRequest.getAddr2());
82
-            entity.setWhsStCd(saveWhsInfoRequest.getWhsStCd());
83
-            entity.setStoreId(saveWhsInfoRequest.getStoreId());
84
-            whsMngMapper.insertWhsMgntBaseInfo(userId, entity);
85
-
86
-            // 창고로케이션정보
87
-            List<WhsMgntBaseLocEntity> locEntities = saveWhsInfoRequest.toEntities(saveWhsInfoRequest.getGridInsertData());
88
-            for (WhsMgntBaseLocEntity locEntity : locEntities) {
89
-                whsMngMapper.insertWhsMgntBaseLoc(userId, locEntity);
90
-            }
89
+            // 사용자 정보 조회
90
+            UserMngEntity user = userMngMapper.selectUserInfo(userId);
91
+
92
+            // 여신관리입금처리
93
+            LoanMgntDsptProcEntity entity = new LoanMgntDsptProcEntity();
94
+            entity.setDsptMgntNo(fnGetDealNo(21, "")); // 입금관리번호
95
+            entity.setReqDt(DateUtil.getCurrentDate());
96
+            entity.setReqTm(DateUtil.getCurrentTime());
97
+            entity.setDpstAmt(reqDsptRequest.getDpstAmt());
98
+            entity.setDpstDt(reqDsptRequest.getDpstDt());
99
+            entity.setDpstNm(reqDsptRequest.getDpstNm());
100
+            entity.setRcvAcctNo(reqDsptRequest.getRcvAcctNo());
101
+            entity.setDpstBnkCd(reqDsptRequest.getDpstBnkCd());
102
+            entity.setDpstStCd(DpstStCd.DPST_REQ.getCd());
103
+            entity.setDpstReqId(userId);
104
+            entity.setDpstReqNm(user.getUserNm());
105
+            entity.setStoreId(reqDsptRequest.getStoreId());
106
+            entity.setBrandId(reqDsptRequest.getBrandId());
107
+            dsptMngMapper.insertLoanMgntDsptProcInfo(userId, entity);
108
+        } catch (GlobalException e) {
109
+            e.getStackTrace();
110
+            throw new GlobalException(e.getSystemMessageCode());
111
+        } catch (Exception e) {
112
+            e.getStackTrace();
113
+            throw new RuntimeException();
114
+        }
115
+    }
116
+
117
+    /* 입금승인 */
118
+    @Transactional
119
+    public void approveDspt(String userId, ApproveDsptRequest approveDsptRequest) throws Exception {
120
+        try {
121
+            // 사용자 정보 조회
122
+            UserMngEntity user = userMngMapper.selectUserInfo(userId);
123
+
124
+            // 여신관리입금처리
125
+            LoanMgntDsptProcEntity entity = new LoanMgntDsptProcEntity();
126
+            entity.setDsptMgntNo(approveDsptRequest.getDsptMgntNo());
127
+            entity.setDpstStCd(DpstStCd.DPST_APPROVE.getCd()); // 입금승인
128
+            entity.setDpstAuthId(userId);
129
+            entity.setDpstAuthNm(user.getUserNm());
130
+            entity.setDpstAuthDt(DateUtil.getCurrentDate());
131
+            entity.setDpstAuthTm(DateUtil.getCurrentTime());
132
+            entity.setDpstAuthYn("Y"); // 입금승인여부
133
+            dsptMngMapper.updateLoanMgntDsptProcInfo4Approve(userId, entity);
91 134
         } catch (GlobalException e) {
92 135
             e.getStackTrace();
93 136
             throw new GlobalException(e.getSystemMessageCode());
@@ -97,41 +140,19 @@ public class DsptMngService extends CommonService {
97 140
         }
98 141
     }
99 142
 
100
-    /* 창고정보 수정 */
143
+    /* 입금반려 */
101 144
     @Transactional
102
-    public void modifyWhsInfo(String userId, SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
145
+    public void rejectDspt(String userId, RejectDsptRequest rejectDsptRequest) throws Exception {
103 146
         try {
104
-            // 입금관리기본정보
105
-            WhsMgntBaseInfoEntity entity = new WhsMgntBaseInfoEntity();
106
-            entity.setBrandId(saveWhsInfoRequest.getBrandId());
107
-            entity.setWhsId(saveWhsInfoRequest.getWhsId());
108
-            entity.setWhsNm(saveWhsInfoRequest.getWhsNm());
109
-            entity.setWhsDvsn(saveWhsInfoRequest.getWhsDvsn());
110
-            entity.setMgrNm(saveWhsInfoRequest.getMgrNm());
111
-            entity.setMgrTelNo(saveWhsInfoRequest.getMgrTelNo());
112
-            entity.setZipNo(saveWhsInfoRequest.getZipNo());
113
-            entity.setAddr1(saveWhsInfoRequest.getAddr1());
114
-            entity.setAddr2(saveWhsInfoRequest.getAddr2());
115
-            entity.setWhsStCd(saveWhsInfoRequest.getWhsStCd());
116
-            entity.setStoreId(saveWhsInfoRequest.getStoreId());
117
-            whsMngMapper.updateWhsMgntBaseInfo(userId, entity);
118
-
119
-            // 창고로케이션정보
120
-            // 삭제
121
-            List<WhsMgntBaseLocEntity> locEntities = saveWhsInfoRequest.toEntities(saveWhsInfoRequest.getGridDeleteData());
122
-            for (WhsMgntBaseLocEntity locEntity : locEntities) {
123
-                whsMngMapper.deleteWhsMgntBaseLoc(userId, locEntity);
124
-            }
125
-            // 수정
126
-            locEntities = saveWhsInfoRequest.toEntities(saveWhsInfoRequest.getGridUpdateData());
127
-            for (WhsMgntBaseLocEntity locEntity : locEntities) {
128
-                whsMngMapper.updateWhsMgntBaseLoc(userId, locEntity);
129
-            }
130
-            // 등록
131
-            locEntities = saveWhsInfoRequest.toEntities(saveWhsInfoRequest.getGridInsertData());
132
-            for (WhsMgntBaseLocEntity locEntity : locEntities) {
133
-                whsMngMapper.insertWhsMgntBaseLoc(userId, locEntity);
134
-            }
147
+            // 여신관리입금처리
148
+            LoanMgntDsptProcEntity entity = new LoanMgntDsptProcEntity();
149
+            entity.setDsptMgntNo(rejectDsptRequest.getDsptMgntNo());
150
+            entity.setDpstStCd(DpstStCd.DPST_REJECT.getCd()); // 입금반려
151
+            entity.setDsptRjctDt(DateUtil.getCurrentDate());
152
+            entity.setDsptRjctTm(DateUtil.getCurrentTime());
153
+            entity.setDsptRjctRsn(rejectDsptRequest.getDsptRjctRsn());
154
+            entity.setDpstAuthYn("N"); // 입금승인여부
155
+            dsptMngMapper.updateLoanMgntDsptProcInfo4Reject(userId, entity);
135 156
         } catch (GlobalException e) {
136 157
             e.getStackTrace();
137 158
             throw new GlobalException(e.getSystemMessageCode());
@@ -141,18 +162,14 @@ public class DsptMngService extends CommonService {
141 162
         }
142 163
     }
143 164
 
144
-    /* 창고정보 삭제 */
165
+    /* 입금요청 삭제 */
145 166
     @Transactional
146
-    public void removeWhsInfo(String userId, SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
167
+    public void removeDspt(String userId, RemoveDsptRequest removeDsptRequest) throws Exception {
147 168
         try {
148
-            // 입금관리기본정보
149
-            WhsMgntBaseInfoEntity entity = new WhsMgntBaseInfoEntity();
150
-            entity.setBrandId(saveWhsInfoRequest.getBrandId());
151
-            entity.setWhsId(saveWhsInfoRequest.getWhsId());
152
-            whsMngMapper.deleteWhsMgntBaseInfo(userId, entity);
153
-
154
-            // 창고로케이션정보
155
-            whsMngMapper.deleteWhsMgntBaseLoc4Info(userId, entity);
169
+            // 여신관리입금처리
170
+            LoanMgntDsptProcEntity entity = new LoanMgntDsptProcEntity();
171
+            entity.setDsptMgntNo(removeDsptRequest.getDsptMgntNo());
172
+            dsptMngMapper.deleteLoanMgntDsptProcInfo(userId, entity);
156 173
         } catch (GlobalException e) {
157 174
             e.getStackTrace();
158 175
             throw new GlobalException(e.getSystemMessageCode());

+ 25 - 28
src/main/java/com/oqpo/api/web/controller/loanmng/DsptMngController.java

@@ -1,12 +1,11 @@
1 1
 package com.oqpo.api.web.controller.loanmng;
2 2
 
3 3
 import com.oqpo.api.enums.SystemMessageCode;
4
-import com.oqpo.api.service.stockmng.WhsMngService;
5
-import com.oqpo.api.web.dto.request.stockmng.BrandWhsMngGridRequest;
6
-import com.oqpo.api.web.dto.request.stockmng.SaveWhsInfoRequest;
4
+import com.oqpo.api.service.loanmng.DsptMngService;
5
+import com.oqpo.api.web.dto.request.loanmng.*;
7 6
 import com.oqpo.api.web.dto.response.GridResponse;
8 7
 import com.oqpo.api.web.dto.response.SaveResponse;
9
-import com.oqpo.api.web.dto.response.stockmng.WhsMngInfoResponse;
8
+import com.oqpo.api.web.dto.response.loanmng.DsptMngInfoResponse;
10 9
 import io.swagger.annotations.ApiImplicitParam;
11 10
 import io.swagger.annotations.ApiImplicitParams;
12 11
 import io.swagger.annotations.ApiOperation;
@@ -24,12 +23,12 @@ import javax.validation.Valid;
24 23
 public class DsptMngController {
25 24
 
26 25
     @Autowired
27
-    private WhsMngService whsMngService;
26
+    private DsptMngService dsptMngService;
28 27
 
29 28
     /**
30 29
      * 설명 : 입금관리 그리드 리스트
31 30
      *
32
-     * @param brandWhsMngGridRequest
31
+     * @param dsptMngGridRequest
33 32
      * @return
34 33
      * @throws Exception
35 34
      */
@@ -38,17 +37,17 @@ public class DsptMngController {
38 37
     })
39 38
     @ApiOperation(value = "입금관리 그리드 리스트")
40 39
     @PostMapping("/detail-grid-list")
41
-    public ResponseEntity<GridResponse> detailGridList(@RequestBody @Valid BrandWhsMngGridRequest brandWhsMngGridRequest) throws Exception {
42
-        return ResponseEntity.ok(whsMngService.selectWhsMngGridList(brandWhsMngGridRequest.getSBrandId(), brandWhsMngGridRequest.getSStoreId(),
43
-                brandWhsMngGridRequest.getSWhsDvsn(), brandWhsMngGridRequest.getSWhsStCd(),
44
-                brandWhsMngGridRequest.getSWhsNm(), brandWhsMngGridRequest.toDTO(brandWhsMngGridRequest)));
40
+    public ResponseEntity<GridResponse> detailGridList(@RequestBody @Valid DsptMngGridRequest dsptMngGridRequest) throws Exception {
41
+        return ResponseEntity.ok(dsptMngService.selectDsptMngGridList(dsptMngGridRequest.getSBrandId(), dsptMngGridRequest.getSStoreId(),
42
+                dsptMngGridRequest.getSDpstStCd(), dsptMngGridRequest.getFromDt(),
43
+                dsptMngGridRequest.getToDt(), dsptMngGridRequest.toDTO(dsptMngGridRequest)));
45 44
     }
46 45
 
47 46
     /**
48 47
      * 설명 : 입금 요청
49 48
      *
50 49
      * @param userId
51
-     * @param saveWhsInfoRequest
50
+     * @param reqDsptRequest
52 51
      * @return SaveResponse
53 52
      * @throws Exception
54 53
      */
@@ -57,8 +56,8 @@ public class DsptMngController {
57 56
     })
58 57
     @ApiOperation(value = "입금 요청")
59 58
     @PostMapping("/request-dspt")
60
-    public ResponseEntity<SaveResponse> requestDspt(@ApiIgnore String userId, @RequestBody @Valid SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
61
-        whsMngService.addWhsInfo(userId, saveWhsInfoRequest);
59
+    public ResponseEntity<SaveResponse> requestDspt(@ApiIgnore String userId, @RequestBody @Valid ReqDsptRequest reqDsptRequest) throws Exception {
60
+        dsptMngService.requestDspt(userId, reqDsptRequest);
62 61
         return ResponseEntity.ok(SaveResponse.toDTO(SystemMessageCode.SAVE_OK));
63 62
     }
64 63
 
@@ -66,7 +65,7 @@ public class DsptMngController {
66 65
      * 설명 : 입금 승인
67 66
      *
68 67
      * @param userId
69
-     * @param saveWhsInfoRequest
68
+     * @param approveDsptRequest
70 69
      * @return SaveResponse
71 70
      * @throws Exception
72 71
      */
@@ -75,8 +74,8 @@ public class DsptMngController {
75 74
     })
76 75
     @ApiOperation(value = "입금 승인")
77 76
     @PostMapping("/approve-dspt")
78
-    public ResponseEntity<SaveResponse> approveDspt(@ApiIgnore String userId, @RequestBody @Valid SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
79
-        whsMngService.removeWhsInfo(userId, saveWhsInfoRequest);
77
+    public ResponseEntity<SaveResponse> approveDspt(@ApiIgnore String userId, @RequestBody @Valid ApproveDsptRequest approveDsptRequest) throws Exception {
78
+        dsptMngService.approveDspt(userId, approveDsptRequest);
80 79
         return ResponseEntity.ok(SaveResponse.toDTO(SystemMessageCode.SAVE_OK));
81 80
     }
82 81
 
@@ -84,7 +83,7 @@ public class DsptMngController {
84 83
      * 설명 : 입금 반려
85 84
      *
86 85
      * @param userId
87
-     * @param saveWhsInfoRequest
86
+     * @param rejectDsptRequest
88 87
      * @return SaveResponse
89 88
      * @throws Exception
90 89
      */
@@ -93,35 +92,33 @@ public class DsptMngController {
93 92
     })
94 93
     @ApiOperation(value = "입금 반려")
95 94
     @PostMapping("/reject-dspt")
96
-    public ResponseEntity<SaveResponse> rejectDspt(@ApiIgnore String userId, @RequestBody @Valid SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
97
-        whsMngService.removeWhsInfo(userId, saveWhsInfoRequest);
95
+    public ResponseEntity<SaveResponse> rejectDspt(@ApiIgnore String userId, @RequestBody @Valid RejectDsptRequest rejectDsptRequest) throws Exception {
96
+        dsptMngService.rejectDspt(userId, rejectDsptRequest);
98 97
         return ResponseEntity.ok(SaveResponse.toDTO(SystemMessageCode.SAVE_OK));
99 98
     }
100 99
 
101 100
     /**
102 101
      * 설명 : 입금 정보
103 102
      *
104
-     * @param brandId
105
-     * @param whsId
103
+     * @param dsptMgntNo
106 104
      * @return
107 105
      * @throws Exception
108 106
      */
109 107
     @ApiImplicitParams({
110 108
             @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header"),
111
-            @ApiImplicitParam(name = "brandId", value = "브랜드아이디", required = true, dataType = "String", paramType = "query"),
112
-            @ApiImplicitParam(name = "whsId", value = "입금아이디", required = true, dataType = "String", paramType = "query")
109
+            @ApiImplicitParam(name = "dsptMgntNo", value = "입금아이디", required = true, dataType = "String", paramType = "query")
113 110
     })
114 111
     @ApiOperation(value = "입금 정보")
115 112
     @GetMapping("/info-dspt")
116
-    public ResponseEntity<WhsMngInfoResponse> infoDspt(@RequestParam(value = "brandId") String brandId, @RequestParam(value = "whsId") String whsId) throws Exception {
117
-        return ResponseEntity.ok(whsMngService.selectWhsMngInfo(brandId, whsId));
113
+    public ResponseEntity<DsptMngInfoResponse> infoDspt(@RequestParam(value = "dsptMgntNo") String dsptMgntNo) throws Exception {
114
+        return ResponseEntity.ok(dsptMngService.selectDsptMngInfo(dsptMgntNo));
118 115
     }
119 116
 
120 117
     /**
121 118
      * 설명 : 입금 정보 삭제
122 119
      *
123 120
      * @param userId
124
-     * @param saveWhsInfoRequest
121
+     * @param removeDsptRequest
125 122
      * @return SaveResponse
126 123
      * @throws Exception
127 124
      */
@@ -130,8 +127,8 @@ public class DsptMngController {
130 127
     })
131 128
     @ApiOperation(value = "입금 삭제")
132 129
     @PostMapping("/remove-dspt")
133
-    public ResponseEntity<SaveResponse> removeDspt(@ApiIgnore String userId, @RequestBody @Valid SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
134
-        whsMngService.modifyWhsInfo(userId, saveWhsInfoRequest);
130
+    public ResponseEntity<SaveResponse> removeDspt(@ApiIgnore String userId, @RequestBody @Valid RemoveDsptRequest removeDsptRequest) throws Exception {
131
+        dsptMngService.removeDspt(userId, removeDsptRequest);
135 132
         return ResponseEntity.ok(SaveResponse.toDTO(SystemMessageCode.SAVE_OK));
136 133
     }
137 134
 

+ 5 - 5
src/main/java/com/oqpo/api/web/controller/stockmng/WhsMngController.java

@@ -28,7 +28,7 @@ public class WhsMngController {
28 28
     /**
29 29
      * 설명 : 창고관리 그리드 리스트
30 30
      *
31
-     * @param brandWhsMngGridRequest
31
+     * @param whsMngGridRequest
32 32
      * @return
33 33
      * @throws Exception
34 34
      */
@@ -37,10 +37,10 @@ public class WhsMngController {
37 37
     })
38 38
     @ApiOperation(value = "창고관리 그리드 리스트")
39 39
     @PostMapping("/detail-grid-list")
40
-    public ResponseEntity<GridResponse> detailGridList(@RequestBody @Valid BrandWhsMngGridRequest brandWhsMngGridRequest) throws Exception {
41
-        return ResponseEntity.ok(whsMngService.selectWhsMngGridList(brandWhsMngGridRequest.getSBrandId(), brandWhsMngGridRequest.getSStoreId(),
42
-                brandWhsMngGridRequest.getSWhsDvsn(), brandWhsMngGridRequest.getSWhsStCd(),
43
-                brandWhsMngGridRequest.getSWhsNm(), brandWhsMngGridRequest.toDTO(brandWhsMngGridRequest)));
40
+    public ResponseEntity<GridResponse> detailGridList(@RequestBody @Valid WhsMngGridRequest whsMngGridRequest) throws Exception {
41
+        return ResponseEntity.ok(whsMngService.selectWhsMngGridList(whsMngGridRequest.getSBrandId(), whsMngGridRequest.getSStoreId(),
42
+                whsMngGridRequest.getSWhsDvsn(), whsMngGridRequest.getSWhsStCd(),
43
+                whsMngGridRequest.getSWhsNm(), whsMngGridRequest.toDTO(whsMngGridRequest)));
44 44
     }
45 45
 
46 46
     /**

+ 14 - 0
src/main/java/com/oqpo/api/web/dto/request/loanmng/ApproveDsptRequest.java

@@ -0,0 +1,14 @@
1
+package com.oqpo.api.web.dto.request.loanmng;
2
+
3
+import io.swagger.annotations.ApiModelProperty;
4
+import lombok.Getter;
5
+import lombok.Setter;
6
+
7
+@Getter
8
+@Setter
9
+public class ApproveDsptRequest {
10
+
11
+    @ApiModelProperty(value = "입금관리번호")
12
+    private String dsptMgntNo;
13
+
14
+}

+ 28 - 0
src/main/java/com/oqpo/api/web/dto/request/loanmng/DsptMngGridRequest.java

@@ -0,0 +1,28 @@
1
+package com.oqpo.api.web.dto.request.loanmng;
2
+
3
+import com.oqpo.api.web.dto.request.GridRequest;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import lombok.Getter;
6
+import lombok.Setter;
7
+
8
+
9
+@Getter
10
+@Setter
11
+public class DsptMngGridRequest extends GridRequest {
12
+
13
+    @ApiModelProperty(value = "브랜드아이디")
14
+    private String sBrandId;
15
+    @ApiModelProperty(value = "매장아이디")
16
+    private String sStoreId;
17
+
18
+    @ApiModelProperty(value = "입금상태")
19
+    private String sDpstStCd;
20
+    @ApiModelProperty(value = "조회시작입금일자")
21
+    private String fromDt;
22
+    @ApiModelProperty(value = "조회종료입금일자")
23
+    private String toDt;
24
+
25
+    protected DsptMngGridRequest(Integer gridSize, Integer gridPage, String sidx, String sord, Boolean pagingYn, Integer gridFirst) {
26
+        super(gridSize, gridPage, sidx, sord, pagingYn, gridFirst);
27
+    }
28
+}

+ 17 - 0
src/main/java/com/oqpo/api/web/dto/request/loanmng/RejectDsptRequest.java

@@ -0,0 +1,17 @@
1
+package com.oqpo.api.web.dto.request.loanmng;
2
+
3
+import io.swagger.annotations.ApiModelProperty;
4
+import lombok.Getter;
5
+import lombok.Setter;
6
+
7
+@Getter
8
+@Setter
9
+public class RejectDsptRequest {
10
+
11
+    @ApiModelProperty(value = "입금관리번호")
12
+    private String dsptMgntNo;
13
+
14
+    @ApiModelProperty(value = "입금반려사유")
15
+    private String dsptRjctRsn;
16
+
17
+}

+ 14 - 0
src/main/java/com/oqpo/api/web/dto/request/loanmng/RemoveDsptRequest.java

@@ -0,0 +1,14 @@
1
+package com.oqpo.api.web.dto.request.loanmng;
2
+
3
+import io.swagger.annotations.ApiModelProperty;
4
+import lombok.Getter;
5
+import lombok.Setter;
6
+
7
+@Getter
8
+@Setter
9
+public class RemoveDsptRequest {
10
+
11
+    @ApiModelProperty(value = "입금관리번호")
12
+    private String dsptMgntNo;
13
+
14
+}

+ 27 - 0
src/main/java/com/oqpo/api/web/dto/request/loanmng/ReqDsptRequest.java

@@ -0,0 +1,27 @@
1
+package com.oqpo.api.web.dto.request.loanmng;
2
+
3
+import io.swagger.annotations.ApiModelProperty;
4
+import lombok.*;
5
+
6
+@Getter
7
+@Setter
8
+public class ReqDsptRequest {
9
+
10
+    @ApiModelProperty(value = "입금금액")
11
+    private long dpstAmt;
12
+    @ApiModelProperty(value = "입금일자")
13
+    private String dpstDt;
14
+    @ApiModelProperty(value = "입금자명")
15
+    private String dpstNm;
16
+    @ApiModelProperty(value = "입금계좌번호")
17
+    private String rcvAcctNo;
18
+    @ApiModelProperty(value = "입금은행코드")
19
+    private String dpstBnkCd;
20
+    @ApiModelProperty(value = "입금은행명")
21
+    private String dpstBnkNm;
22
+    @ApiModelProperty(value = "매장아이디")
23
+    private String storeId;
24
+    @ApiModelProperty(value = "브랜드아이디")
25
+    private String brandId;
26
+
27
+}

+ 2 - 2
src/main/java/com/oqpo/api/web/dto/request/stockmng/BrandWhsMngGridRequest.java

@@ -8,7 +8,7 @@ import lombok.Setter;
8 8
 
9 9
 @Getter
10 10
 @Setter
11
-public class BrandWhsMngGridRequest extends GridRequest {
11
+public class WhsMngGridRequest extends GridRequest {
12 12
 
13 13
     @ApiModelProperty(value = "브랜드아이디")
14 14
     private String sBrandId;
@@ -22,7 +22,7 @@ public class BrandWhsMngGridRequest extends GridRequest {
22 22
     @ApiModelProperty(value = "창고명")
23 23
     private String sWhsNm;
24 24
 
25
-    protected BrandWhsMngGridRequest(Integer gridSize, Integer gridPage, String sidx, String sord, Boolean pagingYn, Integer gridFirst) {
25
+    protected WhsMngGridRequest(Integer gridSize, Integer gridPage, String sidx, String sord, Boolean pagingYn, Integer gridFirst) {
26 26
         super(gridSize, gridPage, sidx, sord, pagingYn, gridFirst);
27 27
     }
28 28
 }

+ 115 - 0
src/main/java/com/oqpo/api/web/dto/response/loanmng/DsptMngInfoResponse.java

@@ -0,0 +1,115 @@
1
+package com.oqpo.api.web.dto.response.loanmng;
2
+
3
+import com.fasterxml.jackson.annotation.JsonInclude;
4
+import com.oqpo.api.entity.loanmng.LoanMgntDsptProcEntity;
5
+import com.oqpo.api.entity.stockmng.WhsMgntBaseInfoEntity;
6
+import com.oqpo.api.entity.stockmng.WhsMgntBaseLocEntity;
7
+import io.swagger.annotations.ApiModelProperty;
8
+import lombok.*;
9
+
10
+import java.util.List;
11
+import java.util.stream.Collectors;
12
+
13
+
14
+@Getter
15
+@Setter
16
+@Builder
17
+@AllArgsConstructor(access = AccessLevel.PROTECTED)
18
+@JsonInclude(JsonInclude.Include.ALWAYS)
19
+public class DsptMngInfoResponse {
20
+
21
+    @ApiModelProperty(value = "입금관리번호")
22
+    private String dsptMgntNo;
23
+    @ApiModelProperty(value = "요청일자")
24
+    private String reqDt;
25
+    @ApiModelProperty(value = "요청시각")
26
+    private String reqTm;
27
+    @ApiModelProperty(value = "입금금액")
28
+    private long dpstAmt;
29
+    @ApiModelProperty(value = "입금일자")
30
+    private String dpstDt;
31
+    @ApiModelProperty(value = "입금자명")
32
+    private String dpstNm;
33
+    @ApiModelProperty(value = "입금계좌번호")
34
+    private String rcvAcctNo;
35
+    @ApiModelProperty(value = "입금은행코드")
36
+    private String dpstBnkCd;
37
+    @ApiModelProperty(value = "입금은행명")
38
+    private String dpstBnkNm;
39
+    @ApiModelProperty(value = "입금상태코드")
40
+    private String dpstStCd;
41
+    @ApiModelProperty(value = "입금상태명")
42
+    private String dpstStNm;
43
+    @ApiModelProperty(value = "입금요청자아이디")
44
+    private String dpstReqId;
45
+    @ApiModelProperty(value = "입금요청자명")
46
+    private String dpstReqNm;
47
+    @ApiModelProperty(value = "입금승인자아이디")
48
+    private String dpstAuthId;
49
+    @ApiModelProperty(value = "입금승인자명")
50
+    private String dpstAuthNm;
51
+    @ApiModelProperty(value = "입금승인일자")
52
+    private String dpstAuthDt;
53
+    @ApiModelProperty(value = "입금승인시각")
54
+    private String dpstAuthTm;
55
+    @ApiModelProperty(value = "입금반려일자")
56
+    private String dsptRjctDt;
57
+    @ApiModelProperty(value = "입금반려시각")
58
+    private String dsptRjctTm;
59
+    @ApiModelProperty(value = "매장아이디")
60
+    private String storeId;
61
+    @ApiModelProperty(value = "매장명")
62
+    private String storeNm;
63
+    @ApiModelProperty(value = "브랜드아이디")
64
+    private String brandId;
65
+    @ApiModelProperty(value = "브랜드명")
66
+    private String brandNm;
67
+    @ApiModelProperty(value = "입금승인여부")
68
+    private String dpstAuthYn;
69
+    @ApiModelProperty(value = "입금반려사유")
70
+    private String dsptRjctRsn;
71
+    @ApiModelProperty(value = "시스템등록일시")
72
+    private String sysRegDttm;
73
+    @ApiModelProperty(value = "시스템등록아이디")
74
+    private String sysRegId;
75
+    @ApiModelProperty(value = "시스템변경일시")
76
+    private String sysChgDttm;
77
+    @ApiModelProperty(value = "시스템변경아이디")
78
+    private String sysChgId;
79
+
80
+    public static DsptMngInfoResponse toDTO(LoanMgntDsptProcEntity entity) {
81
+        if (entity == null) return null;
82
+        return DsptMngInfoResponse.builder()
83
+                .dsptMgntNo(entity.getDsptMgntNo())
84
+                .reqDt(entity.getReqDt())
85
+                .reqTm(entity.getReqTm())
86
+                .dpstAmt(entity.getDpstAmt())
87
+                .dpstDt(entity.getDpstDt())
88
+                .dpstNm(entity.getDpstNm())
89
+                .rcvAcctNo(entity.getRcvAcctNo())
90
+                .dpstBnkCd(entity.getDpstBnkCd())
91
+                .dpstBnkNm(entity.getDpstBnkNm())
92
+                .dpstStCd(entity.getDpstStCd())
93
+                .dpstStNm(entity.getDpstStNm())
94
+                .dpstReqId(entity.getDpstReqId())
95
+                .dpstReqNm(entity.getDpstReqNm())
96
+                .dpstAuthId(entity.getDpstAuthId())
97
+                .dpstAuthNm(entity.getDpstAuthNm())
98
+                .dpstAuthDt(entity.getDpstAuthDt())
99
+                .dpstAuthTm(entity.getDpstAuthTm())
100
+                .dsptRjctDt(entity.getDsptRjctDt())
101
+                .dsptRjctTm(entity.getDsptRjctTm())
102
+                .storeId(entity.getStoreId())
103
+                .storeNm(entity.getStoreNm())
104
+                .brandId(entity.getBrandId())
105
+                .brandNm(entity.getBrandNm())
106
+                .dpstAuthYn(entity.getDpstAuthYn())
107
+                .dsptRjctRsn(entity.getDsptRjctRsn())
108
+                .sysRegDttm(entity.getSysRegDttm())
109
+                .sysRegId(entity.getSysRegId())
110
+                .sysChgDttm(entity.getSysChgDttm())
111
+                .sysChgId(entity.getSysChgId())
112
+                .build();
113
+    }
114
+
115
+}

+ 67 - 0
src/main/java/com/oqpo/api/web/dto/response/loanmng/DsptMngListResponse.java

@@ -0,0 +1,67 @@
1
+package com.oqpo.api.web.dto.response.loanmng;
2
+
3
+import com.fasterxml.jackson.annotation.JsonInclude;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import lombok.*;
6
+
7
+@Getter
8
+@Setter
9
+@Builder
10
+@AllArgsConstructor(access = AccessLevel.PROTECTED)
11
+@JsonInclude(JsonInclude.Include.ALWAYS)
12
+public class DsptMngListResponse {
13
+
14
+    @ApiModelProperty(value = "CRUD")
15
+    private String viewCd;
16
+
17
+    @ApiModelProperty(value = "입금관리번호")
18
+    private String dsptMgntNo;
19
+    @ApiModelProperty(value = "매장아이디")
20
+    private String storeId;
21
+    @ApiModelProperty(value = "매장명")
22
+    private String storeNm;
23
+    @ApiModelProperty(value = "브랜드아이디")
24
+    private String brandId;
25
+    @ApiModelProperty(value = "브랜드명")
26
+    private String brandNm;
27
+    @ApiModelProperty(value = "입금금액")
28
+    private long dpstAmt;
29
+    @ApiModelProperty(value = "입금일자")
30
+    private String dpstDt;
31
+    @ApiModelProperty(value = "입금자명")
32
+    private String dpstNm;
33
+    @ApiModelProperty(value = "입금상태코드")
34
+    private String dpstStCd;
35
+    @ApiModelProperty(value = "입금상태명")
36
+    private String dpstStNm;
37
+    @ApiModelProperty(value = "입금은행코드")
38
+    private String dpstBnkCd;
39
+    @ApiModelProperty(value = "입금은행명")
40
+    private String dpstBnkNm;
41
+    @ApiModelProperty(value = "입금계좌번호")
42
+    private String rcvAcctNo;
43
+
44
+    @ApiModelProperty(value = "요청일자")
45
+    private String reqDt;
46
+    @ApiModelProperty(value = "요청시각")
47
+    private String reqTm;
48
+
49
+    @ApiModelProperty(value = "입금승인자아이디")
50
+    private String dpstAuthId;
51
+    @ApiModelProperty(value = "입금승인자명")
52
+    private String dpstAuthNm;
53
+    @ApiModelProperty(value = "입금승인일자")
54
+    private String dpstAuthDt;
55
+    @ApiModelProperty(value = "입금승인시각")
56
+    private String dpstAuthTm;
57
+    @ApiModelProperty(value = "입금반려일자")
58
+    private String dsptRjctDt;
59
+    @ApiModelProperty(value = "입금반려시각")
60
+    private String dsptRjctTm;
61
+
62
+    @ApiModelProperty(value = "입금승인여부")
63
+    private String dpstAuthYn;
64
+    @ApiModelProperty(value = "입금반려사유")
65
+    private String dsptRjctRsn;
66
+
67
+}