|
@@ -0,0 +1,131 @@
|
|
1
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
3
|
+
|
|
4
|
+<mapper namespace="com.oqpo.api.mapper.loanmng.DsptMngMapper">
|
|
5
|
+
|
|
6
|
+ <select id="selectDsptMngGridList" resultType="com.oqpo.api.entity.loanmng.LoanMgntDsptProcEntity">
|
|
7
|
+ /* DsptMngMapper.selectDsptMngGridList */
|
|
8
|
+ SELECT A.dspt_mgnt_no,
|
|
9
|
+ A.store_id, FN_STORE_NM(A.brand_id, A.store_id) AS store_nm,
|
|
10
|
+ A.brand_id, FN_BRAND_NM(A.brand_id) AS brand_nm,
|
|
11
|
+ A.dpst_amt, DATE_FORMAT(A.dpst_dt, '%Y.%m.%d') AS dpst_dt, A.dpst_nm,
|
|
12
|
+ A.dpst_st_cd, FN_CODE_NM('DPST_ST_CD', A.dpst_st_cd) AS dpst_st_nm,
|
|
13
|
+ A.dpst_bnk_cd, FN_CODE_NM('DPST_BNK_CD', A.dpst_bnk_cd) AS dpst_bnk_nm,
|
|
14
|
+ A.rcv_acct_no,
|
|
15
|
+ DATE_FORMAT(A.req_dt, '%Y.%m.%d') AS req_dt,
|
|
16
|
+ DATE_FORMAT(A.dpst_auth_dt, '%Y.%m.%d') AS dpst_auth_dt,
|
|
17
|
+ DATE_FORMAT(A.dspt_rjct_dt, '%Y.%m.%d') AS dspt_rjct_dt,
|
|
18
|
+ A.dspt_rjct_rsn
|
|
19
|
+ FROM loan_mgnt_dspt_proc A
|
|
20
|
+ WHERE A.brand_id = #{sBrandId}
|
|
21
|
+ <if test="sStoreId != null and sStoreId != ''">
|
|
22
|
+ AND A.store_id = #{sStoreId}
|
|
23
|
+ </if>
|
|
24
|
+ <if test="sDpstStCd != null and sDpstStCd != ''">
|
|
25
|
+ AND A.dpst_st_cd = #{sDpstStCd}
|
|
26
|
+ </if>
|
|
27
|
+ <if test="fromDt != null and fromDt != '' and toDt != null and toDt != '' ">
|
|
28
|
+ AND A.dpst_dt BETWEEN #{fromDt} AND #{toDt}
|
|
29
|
+ </if>
|
|
30
|
+ <choose>
|
|
31
|
+ <when test="gridRequest.sidx != null and gridRequest.sidx != ''">
|
|
32
|
+ <if test="gridRequest.sidx == 'VIEW_NUM'.toString()">
|
|
33
|
+ <if test="gridRequest.sord == 'asc'.toString()">
|
|
34
|
+ ORDER BY A.dspt_mgnt_no ASC
|
|
35
|
+ </if>
|
|
36
|
+ <if test="gridRequest.sord == 'desc'.toString()">
|
|
37
|
+ ORDER BY A.dspt_mgnt_no DESC
|
|
38
|
+ </if>
|
|
39
|
+ </if>
|
|
40
|
+ </when>
|
|
41
|
+ <otherwise>
|
|
42
|
+ ORDER BY A.dspt_mgnt_no ASC
|
|
43
|
+ </otherwise>
|
|
44
|
+ </choose>
|
|
45
|
+ <if test="gridRequest.pagingYn == true">
|
|
46
|
+ limit #{gridRequest.gridFirst}, #{gridRequest.gridSize}
|
|
47
|
+ </if>
|
|
48
|
+ </select>
|
|
49
|
+
|
|
50
|
+ <select id="selectDsptMngGridCnt" resultType="int">
|
|
51
|
+ /* DsptMngMapper.selectDsptMngGridCnt */
|
|
52
|
+ SELECT COUNT(*)
|
|
53
|
+ FROM loan_mgnt_dspt_proc A
|
|
54
|
+ WHERE A.brand_id = #{sBrandId}
|
|
55
|
+ <if test="sStoreId != null and sStoreId != ''">
|
|
56
|
+ AND A.store_id = #{sStoreId}
|
|
57
|
+ </if>
|
|
58
|
+ <if test="sDpstStCd != null and sDpstStCd != ''">
|
|
59
|
+ AND A.dpst_st_cd = #{sDpstStCd}
|
|
60
|
+ </if>
|
|
61
|
+ <if test="fromDt != null and fromDt != '' and toDt != null and toDt != '' ">
|
|
62
|
+ AND A.dpst_dt BETWEEN #{fromDt} AND #{toDt}
|
|
63
|
+ </if>
|
|
64
|
+ </select>
|
|
65
|
+
|
|
66
|
+ <select id="selectLoanMgntDsptProcInfo" resultType="com.oqpo.api.entity.loanmng.LoanMgntDsptProcEntity">
|
|
67
|
+ /* DsptMngMapper.selectLoanMgntDsptProcInfo */
|
|
68
|
+ SELECT A.dspt_mgnt_no,
|
|
69
|
+ DATE_FORMAT(A.req_dt, '%Y.%m.%d') AS req_dt, TIME_FORMAT(A.req_tm, '%H:%i:%s') AS req_tm,
|
|
70
|
+ A.dpst_amt, DATE_FORMAT(A.dpst_dt, '%Y.%m.%d') AS dpst_dt, A.dpst_nm, A.rcv_acct_no,
|
|
71
|
+ A.dpst_bnk_cd, FN_CODE_NM('DPST_BNK_CD', A.dpst_bnk_cd) AS dpst_bnk_nm,
|
|
72
|
+ A.dpst_st_cd, FN_CODE_NM('DPST_ST_CD', A.dpst_st_cd) AS dpst_st_nm,
|
|
73
|
+ A.dpst_req_id, A.dpst_req_nm, A.dpst_auth_id, A.dpst_auth_nm,
|
|
74
|
+ DATE_FORMAT(A.dpst_auth_dt, '%Y.%m.%d') AS dpst_auth_dt, TIME_FORMAT(A.dpst_auth_tm, '%H:%i:%s') AS dpst_auth_tm,
|
|
75
|
+ DATE_FORMAT(A.dspt_rjct_dt, '%Y.%m.%d') AS dspt_rjct_dt, TIME_FORMAT(A.dspt_rjct_tm, '%H:%i:%s') AS dspt_rjct_tm,
|
|
76
|
+ A.store_id, FN_STORE_NM(A.brand_id, A.store_id) AS store_nm,
|
|
77
|
+ A.brand_id, FN_BRAND_NM(A.brand_id) AS brand_nm,
|
|
78
|
+ A.dpst_auth_yn, A.dspt_rjct_rsn,
|
|
79
|
+ DATE_FORMAT(A.sys_reg_dttm,'%Y.%m.%d %H:%i:%s') AS sys_reg_dttm, A.sys_reg_id, DATE_FORMAT(A.sys_chg_dttm,'%Y.%m.%d %H:%i:%s') AS sys_chg_dttm, A.sys_chg_id
|
|
80
|
+ FROM loan_mgnt_dspt_proc A
|
|
81
|
+ WHERE A.dspt_mgnt_no = #{dsptMgntNo}
|
|
82
|
+ </select>
|
|
83
|
+
|
|
84
|
+ <insert id="insertLoanMgntDsptProcInfo" >
|
|
85
|
+ /* DsptMngMapper.insertLoanMgntDsptProcInfo */
|
|
86
|
+ INSERT INTO loan_mgnt_dspt_proc
|
|
87
|
+ (dspt_mgnt_no, req_dt, req_tm, dpst_amt, dpst_dt, dpst_nm, rcv_acct_no, dpst_bnk_cd, dpst_st_cd, dpst_req_id,
|
|
88
|
+ dpst_req_nm, dpst_auth_id, dpst_auth_nm, dpst_auth_dt, dpst_auth_tm, dspt_rjct_dt, dspt_rjct_tm,
|
|
89
|
+ store_id, brand_id, dpst_auth_yn, dspt_rjct_rsn, sys_reg_dttm, sys_reg_id, sys_chg_dttm, sys_chg_id)
|
|
90
|
+ VALUES
|
|
91
|
+ (#{entity.dsptMgntNo}, #{entity.reqDt}, #{entity.reqTm}, #{entity.dpstAmt}, #{entity.dpstDt}, #{entity.dpstNm},
|
|
92
|
+ #{entity.rcvAcctNo}, #{entity.dpstBnkCd}, #{entity.dpstStCd}, #{entity.dpstReqId}, #{entity.dpstReqNm},
|
|
93
|
+ #{entity.dpstAuthId}, #{entity.dpstAuthNm}, #{entity.dpstAuthDt}, #{entity.dpstAuthTm}, #{entity.dsptRjctDt},
|
|
94
|
+ #{entity.dsptRjctTm}, #{entity.storeId}, #{entity.brandId}, #{entity.dpstAuthYn}, #{entity.dsptRjctRsn},
|
|
95
|
+ NOW(), #{userId}, NOW(), #{userId})
|
|
96
|
+ </insert>
|
|
97
|
+
|
|
98
|
+ <update id="updateLoanMgntDsptProcInfo4Approve" >
|
|
99
|
+ /* DsptMngMapper.updateLoanMgntDsptProcInfo4Approve */
|
|
100
|
+ UPDATE loan_mgnt_dspt_proc SET
|
|
101
|
+ dpst_st_cd = #{entity.dpstStCd}, /* 입금상태코드 */
|
|
102
|
+ dpst_auth_id = #{entity.dpstAuthId}, /* 입금승인자아이디 */
|
|
103
|
+ dpst_auth_nm = #{entity.dpstAuthNm}, /* 입금승인자명 */
|
|
104
|
+ dpst_auth_dt = #{entity.dpstAuthDt}, /* 입금승인일자 */
|
|
105
|
+ dpst_auth_tm = #{entity.dpstAuthTm}, /* 입금승인시각 */
|
|
106
|
+ dpst_auth_yn = #{entity.dpstAuthYn}, /* 입금승인여부 */
|
|
107
|
+ sys_chg_dttm = NOW(),
|
|
108
|
+ sys_chg_id = #{userId}
|
|
109
|
+ WHERE dspt_mgnt_no = #{entity.dsptMgntNo}
|
|
110
|
+ </update>
|
|
111
|
+
|
|
112
|
+ <update id="updateLoanMgntDsptProcInfo4Reject" >
|
|
113
|
+ /* DsptMngMapper.updateLoanMgntDsptProcInfo4Reject */
|
|
114
|
+ UPDATE loan_mgnt_dspt_proc SET
|
|
115
|
+ dpst_st_cd = #{entity.dpstStCd}, /* 입금상태코드 */
|
|
116
|
+ dspt_rjct_dt = #{entity.dsptRjctDt}, /* 입금반려일자 */
|
|
117
|
+ dspt_rjct_tm = #{entity.dsptRjctTm}, /* 입금반려시각 */
|
|
118
|
+ dpst_auth_yn = #{entity.dpstAuthYn}, /* 입금승인여부 */
|
|
119
|
+ dspt_rjct_rsn = #{entity.dsptRjctRsn}, /* 입금반려사유 */
|
|
120
|
+ sys_chg_dttm = NOW(),
|
|
121
|
+ sys_chg_id = #{entity.sysChgId}
|
|
122
|
+ WHERE dspt_mgnt_no = #{entity.dsptMgntNo}
|
|
123
|
+ </update>
|
|
124
|
+
|
|
125
|
+ <delete id="deleteLoanMgntDsptProcInfo" >
|
|
126
|
+ /* DsptMngMapper.deleteLoanMgntDsptProcInfo */
|
|
127
|
+ DELETE FROM loan_mgnt_dspt_proc
|
|
128
|
+ WHERE dspt_mgnt_no = #{entity.dsptMgntNo}
|
|
129
|
+ </delete>
|
|
130
|
+
|
|
131
|
+</mapper>
|