Browse Source

정산요청 그리드

marseyes 2 years ago
parent
commit
ffe0cead47

+ 4 - 0
src/main/java/com/oqpo/api/entity/settmng/StlMgntBaseInfoEntity.java

@@ -64,6 +64,10 @@ public class StlMgntBaseInfoEntity implements Serializable {
64 64
     private String rcptYn;
65 65
     @ApiModelProperty(value = "수납일자(후불사용)")
66 66
     private String rcptDt;
67
+    @ApiModelProperty(value = "수납금액(후불사용)")
68
+    private Long rcptAmt;
69
+    @ApiModelProperty(value = "미납금액(후불사용)")
70
+    private Long unpaidAmt;
67 71
 
68 72
     @ApiModelProperty(value = "계좌잔액")
69 73
     private Long acctBal;

+ 7 - 5
src/main/java/com/oqpo/api/service/sttlmng/SttlStateService.java

@@ -53,15 +53,17 @@ public class SttlStateService extends CommonService {
53 53
                         .storeNm(m.getStoreNm())
54 54
                         .spplyId(m.getSpplyNm())
55 55
                         .spplyNm(m.getSpplyNm())
56
-                        .sttlStCd(m.getSttlStCd())                  /* 정산상태코드 */
57
-                        .sttlStNm(m.getSttlStNm())                  /* 정산상태명 */
58
-                        .sttlReqDt(m.getSttlReqDt())
56
+                        .sttlStCd(m.getSttlStCd())          /* 정산상태코드 */
57
+                        .sttlStNm(m.getSttlStNm())          /* 정산상태명 */
58
+                        .sttlReqDt(m.getSttlReqDt())        /* 정산요청일자 */
59
+                        .sttlDt(m.getSttlDt())              /* 정산확정일자 */
59 60
                         .sttlReqAmt(m.getSttlReqAmt())
60
-                        .sttlDt(m.getSttlDt())
61 61
                         .sttlAmt(m.getSttlAmt())
62
-                        .acctBal(m.getAcctBal())
62
+                        .unpaidAmt(m.getUnpaidAmt())
63 63
                         .sttlRegMgrId(m.getSttlRegMgrId())
64 64
                         .sttlRegMgrNm(m.getSttlRegMgrNm())
65
+                        .loanDvsn(m.getLoanDvsn())
66
+                        .loanDvsnNm(m.getLoanDvsnNm())
65 67
                         .build())
66 68
                 .collect(Collectors.toList());
67 69
         return GridResponse.toDTO(gridPage, gridTotal, gridRecords, gridRows);

+ 12 - 5
src/main/java/com/oqpo/api/web/dto/response/sttlmng/SttlStateGridResponse.java

@@ -33,20 +33,27 @@ public class SttlStateGridResponse {
33 33
     private String sttlStCd;
34 34
     @ApiModelProperty(value = "정산상태명")
35 35
     private String sttlStNm;
36
+
36 37
     @ApiModelProperty(value = "정산요청일자")
37 38
     private String sttlReqDt;
39
+    @ApiModelProperty(value = "정산확정일자")
40
+    private String sttlDt;
41
+
38 42
     @ApiModelProperty(value = "정산요청금액")
39 43
     private Long sttlReqAmt;
40
-    @ApiModelProperty(value = "정산일자")
41
-    private String sttlDt;
42
-    @ApiModelProperty(value = "정산금액")
44
+    @ApiModelProperty(value = "정산확정금액")
43 45
     private Long sttlAmt;
44
-    @ApiModelProperty(value = "계좌잔액")
45
-    private Long acctBal;
46
+    @ApiModelProperty(value = "미납금액(후불사용)")
47
+    private Long unpaidAmt;
46 48
 
47 49
     @ApiModelProperty(value = "정산등록담당자아이디")
48 50
     private String sttlRegMgrId;
49 51
     @ApiModelProperty(value = "정산등록담당자명")
50 52
     private String sttlRegMgrNm;
51 53
 
54
+    @ApiModelProperty(value = "여신구분")
55
+    private String loanDvsn;
56
+    @ApiModelProperty(value = "여신구분명")
57
+    private String loanDvsnNm;
58
+
52 59
 }

+ 9 - 3
src/main/resources/mybatis/sqlmaps/sttlmng/SttlState.xml

@@ -7,14 +7,19 @@
7 7
         /* SttlStateMapper.selectSttlStateGridList */
8 8
         SELECT A.sttl_mgnt_unq_no,
9 9
             DATE_FORMAT(A.sttl_req_dt, '%Y.%m.%d') AS sttl_req_dt,
10
+            DATE_FORMAT(A.sttl_dt, '%Y.%m.%d') AS sttl_dt,
10 11
             A.brand_id, FN_BRAND_NM(A.brand_id) AS brand_nm,
11 12
             A.store_id, FN_STORE_NM(A.brand_id, A.store_id) AS store_nm,
12 13
             A.spply_id, FN_SPPLY_NM(A.spply_id) AS spply_nm,
13 14
             A.sttl_st_cd, FN_CODE_NM('STTL_ST_CD', A.sttl_st_cd) AS sttl_st_nm,
14
-            A.sttl_req_amt,
15
-            DATE_FORMAT(A.sttl_dt, '%Y.%m.%d') AS sttl_dt, A.sttl_amt, A.sttl_reg_mgr_nm, A.sttl_reg_mgr_id,
16
-            A.sttl_req_amt - IFNULL(A.sttl_amt, 0) AS acct_bal
15
+            A.sttl_req_amt,         /* 정산요청금액 */
16
+            A.sttl_amt,             /* 정산확정금액 */
17
+            A.rcpt_amt,             /* 수납금액 */
18
+            (A.sttl_amt - IFNULL(A.rcpt_amt, 0)) AS unpaid_amt,     /* 미납금액 */
19
+            A.sttl_reg_mgr_nm, A.sttl_reg_mgr_id,
20
+            B.loan_dvsn, FN_CODE_NM('LOAN_DVSN', B.loan_dvsn) AS loan_dvsn_nm
17 21
         FROM stl_mgnt_base_info A
22
+        INNER JOIN store_base_info B ON A.brand_id = B.brand_id AND A.store_id = B.store_id
18 23
         WHERE A.brand_id = #{sBrandId}
19 24
         AND A.sttl_req_dt BETWEEN #{fromDt} AND #{toDt}
20 25
         AND A.sttl_st_cd IN ('ST10','ST20','ST30')
@@ -59,6 +64,7 @@
59 64
         /* SttlStateMapper.selectSttlStateGridCnt */
60 65
         SELECT COUNT(*)
61 66
         FROM stl_mgnt_base_info A
67
+        INNER JOIN store_base_info B ON A.brand_id = B.brand_id AND A.store_id = B.store_id
62 68
         WHERE A.brand_id = #{sBrandId}
63 69
         AND A.sttl_req_dt BETWEEN #{fromDt} AND #{toDt}
64 70
         AND A.sttl_st_cd IN ('ST10','ST20','ST30')