Ver código fonte

Merge branch 'master' of http://106.246.249.162:13000/orderqueen/oqpo-api

dwkim 2 anos atrás
pai
commit
ab1ee66574

BIN
doc/개발도우미_OQSCM_20221010.xlsm


BIN
doc/메뉴패키지정보.xlsx


+ 30 - 0
src/main/java/com/oqpo/api/mapper/loanmng/DsptMngMapper.java

@@ -0,0 +1,30 @@
1
+package com.oqpo.api.mapper.loanmng;
2
+
3
+
4
+import com.oqpo.api.entity.loanmng.LoanMgntDsptProcEntity;
5
+import com.oqpo.api.web.dto.request.GridRequest;
6
+import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+import java.util.List;
10
+
11
+@Mapper
12
+public interface DsptMngMapper {
13
+
14
+    List<LoanMgntDsptProcEntity> selectDsptMngGridList(@Param("sBrandId") String sBrandId, @Param("sStoreId") String sStoreId, @Param("sDpstStCd") String sDpstStCd,
15
+                                                       @Param("fromDt") String fromDt, @Param("toDt") String toDt, GridRequest gridRequest) throws Exception;
16
+
17
+    int selectDsptMngGridCnt(@Param("sBrandId") String sBrandId, @Param("sStoreId") String sStoreId, @Param("sDpstStCd") String sDpstStCd,
18
+                             @Param("fromDt") String fromDt, @Param("toDt") String toDt) throws Exception;
19
+
20
+    LoanMgntDsptProcEntity selectLoanMgntDsptProcInfo(@Param("dsptMgntNo") String dsptMgntNo) throws Exception;
21
+
22
+    int insertLoanMgntDsptProcInfo(@Param("userId") String userId, LoanMgntDsptProcEntity entity) throws Exception;
23
+
24
+    int updateLoanMgntDsptProcInfo4Approve(@Param("userId") String userId, LoanMgntDsptProcEntity entity) throws Exception;
25
+
26
+    int updateLoanMgntDsptProcInfo4Reject(@Param("userId") String userId, LoanMgntDsptProcEntity entity) throws Exception;
27
+
28
+    int deleteLoanMgntDsptProcInfo(@Param("userId") String userId, LoanMgntDsptProcEntity entity) throws Exception;
29
+
30
+}

+ 165 - 0
src/main/java/com/oqpo/api/service/loanmng/DsptMngService.java

@@ -0,0 +1,165 @@
1
+package com.oqpo.api.service.loanmng;
2
+
3
+
4
+import com.oqpo.api.entity.stockmng.WhsMgntBaseInfoEntity;
5
+import com.oqpo.api.entity.stockmng.WhsMgntBaseLocEntity;
6
+import com.oqpo.api.exception.GlobalException;
7
+import com.oqpo.api.mapper.stockmng.WhsMngMapper;
8
+import com.oqpo.api.service.CommonService;
9
+import com.oqpo.api.web.dto.request.GridRequest;
10
+import com.oqpo.api.web.dto.request.stockmng.SaveWhsInfoRequest;
11
+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;
14
+import lombok.extern.slf4j.Slf4j;
15
+import org.springframework.beans.factory.annotation.Autowired;
16
+import org.springframework.stereotype.Service;
17
+import org.springframework.transaction.annotation.Transactional;
18
+
19
+import java.util.List;
20
+import java.util.stream.Collectors;
21
+
22
+@Service
23
+@Slf4j
24
+public class DsptMngService extends CommonService {
25
+
26
+    @Autowired
27
+    private WhsMngMapper whsMngMapper;
28
+
29
+    /*
30
+      입금관리 그리드 리스트 조회
31
+     */
32
+    public GridResponse selectWhsMngGridList(String sBrandId, String sStoreId, String sWhsDvsn, String sWhsStCd,
33
+                                             String sWhsNm, GridRequest gridRequest) throws Exception {
34
+        int gridPage = gridRequest.getGridPage();
35
+        int gridSize = gridRequest.getGridSize();
36
+
37
+        int gridRecords = whsMngMapper.selectWhsMngGridCnt(sBrandId, sStoreId, sWhsDvsn, sWhsStCd, sWhsNm);
38
+        int gridTotal = fnCalculateGridTotal(gridSize, gridRecords);
39
+        List<WhsMgntBaseInfoEntity> entities = whsMngMapper.selectWhsMngGridList(sBrandId, sStoreId, sWhsDvsn, sWhsStCd, sWhsNm, gridRequest);
40
+        List<Object> gridRows = entities.stream()
41
+                .map(m -> WhsMngListResponse.builder()
42
+                        .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())
53
+                        .storeId(m.getStoreId())
54
+                        .storeNm(m.getStoreNm())
55
+                        .build())
56
+                .collect(Collectors.toList());
57
+        return GridResponse.toDTO(gridPage, gridTotal, gridRecords, gridRows);
58
+    }
59
+
60
+    /* 입금관리 정보 조회 */
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);
65
+    }
66
+
67
+    /* 입금요청 */
68
+    @Transactional
69
+    public void addWhsInfo(String userId, SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
70
+        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
+            }
91
+        } catch (GlobalException e) {
92
+            e.getStackTrace();
93
+            throw new GlobalException(e.getSystemMessageCode());
94
+        } catch (Exception e) {
95
+            e.getStackTrace();
96
+            throw new RuntimeException();
97
+        }
98
+    }
99
+
100
+    /* 창고정보 수정 */
101
+    @Transactional
102
+    public void modifyWhsInfo(String userId, SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
103
+        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
+            }
135
+        } catch (GlobalException e) {
136
+            e.getStackTrace();
137
+            throw new GlobalException(e.getSystemMessageCode());
138
+        } catch (Exception e) {
139
+            e.getStackTrace();
140
+            throw new RuntimeException();
141
+        }
142
+    }
143
+
144
+    /* 창고정보 삭제 */
145
+    @Transactional
146
+    public void removeWhsInfo(String userId, SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
147
+        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);
156
+        } catch (GlobalException e) {
157
+            e.getStackTrace();
158
+            throw new GlobalException(e.getSystemMessageCode());
159
+        } catch (Exception e) {
160
+            e.getStackTrace();
161
+            throw new RuntimeException();
162
+        }
163
+    }
164
+
165
+}

+ 138 - 0
src/main/java/com/oqpo/api/web/controller/loanmng/DsptMngController.java

@@ -0,0 +1,138 @@
1
+package com.oqpo.api.web.controller.loanmng;
2
+
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;
7
+import com.oqpo.api.web.dto.response.GridResponse;
8
+import com.oqpo.api.web.dto.response.SaveResponse;
9
+import com.oqpo.api.web.dto.response.stockmng.WhsMngInfoResponse;
10
+import io.swagger.annotations.ApiImplicitParam;
11
+import io.swagger.annotations.ApiImplicitParams;
12
+import io.swagger.annotations.ApiOperation;
13
+import lombok.extern.slf4j.Slf4j;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.http.ResponseEntity;
16
+import org.springframework.web.bind.annotation.*;
17
+import springfox.documentation.annotations.ApiIgnore;
18
+
19
+import javax.validation.Valid;
20
+
21
+@Slf4j
22
+@RestController
23
+@RequestMapping("/api/dspt/mng")
24
+public class DsptMngController {
25
+
26
+    @Autowired
27
+    private WhsMngService whsMngService;
28
+
29
+    /**
30
+     * 설명 : 입금관리 그리드 리스트
31
+     *
32
+     * @param brandWhsMngGridRequest
33
+     * @return
34
+     * @throws Exception
35
+     */
36
+    @ApiImplicitParams({
37
+            @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header")
38
+    })
39
+    @ApiOperation(value = "입금관리 그리드 리스트")
40
+    @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)));
45
+    }
46
+
47
+    /**
48
+     * 설명 : 입금 요청
49
+     *
50
+     * @param userId
51
+     * @param saveWhsInfoRequest
52
+     * @return SaveResponse
53
+     * @throws Exception
54
+     */
55
+    @ApiImplicitParams({
56
+            @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header")
57
+    })
58
+    @ApiOperation(value = "입금 요청")
59
+    @PostMapping("/request-dspt")
60
+    public ResponseEntity<SaveResponse> requestDspt(@ApiIgnore String userId, @RequestBody @Valid SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
61
+        whsMngService.addWhsInfo(userId, saveWhsInfoRequest);
62
+        return ResponseEntity.ok(SaveResponse.toDTO(SystemMessageCode.SAVE_OK));
63
+    }
64
+
65
+    /**
66
+     * 설명 : 입금 승인
67
+     *
68
+     * @param userId
69
+     * @param saveWhsInfoRequest
70
+     * @return SaveResponse
71
+     * @throws Exception
72
+     */
73
+    @ApiImplicitParams({
74
+            @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header")
75
+    })
76
+    @ApiOperation(value = "입금 승인")
77
+    @PostMapping("/approve-dspt")
78
+    public ResponseEntity<SaveResponse> approveDspt(@ApiIgnore String userId, @RequestBody @Valid SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
79
+        whsMngService.removeWhsInfo(userId, saveWhsInfoRequest);
80
+        return ResponseEntity.ok(SaveResponse.toDTO(SystemMessageCode.SAVE_OK));
81
+    }
82
+
83
+    /**
84
+     * 설명 : 입금 반려
85
+     *
86
+     * @param userId
87
+     * @param saveWhsInfoRequest
88
+     * @return SaveResponse
89
+     * @throws Exception
90
+     */
91
+    @ApiImplicitParams({
92
+            @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header")
93
+    })
94
+    @ApiOperation(value = "입금 반려")
95
+    @PostMapping("/reject-dspt")
96
+    public ResponseEntity<SaveResponse> rejectDspt(@ApiIgnore String userId, @RequestBody @Valid SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
97
+        whsMngService.removeWhsInfo(userId, saveWhsInfoRequest);
98
+        return ResponseEntity.ok(SaveResponse.toDTO(SystemMessageCode.SAVE_OK));
99
+    }
100
+
101
+    /**
102
+     * 설명 : 입금 정보
103
+     *
104
+     * @param brandId
105
+     * @param whsId
106
+     * @return
107
+     * @throws Exception
108
+     */
109
+    @ApiImplicitParams({
110
+            @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")
113
+    })
114
+    @ApiOperation(value = "입금 정보")
115
+    @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));
118
+    }
119
+
120
+    /**
121
+     * 설명 : 입금 정보 삭제
122
+     *
123
+     * @param userId
124
+     * @param saveWhsInfoRequest
125
+     * @return SaveResponse
126
+     * @throws Exception
127
+     */
128
+    @ApiImplicitParams({
129
+            @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header")
130
+    })
131
+    @ApiOperation(value = "입금 삭제")
132
+    @PostMapping("/remove-dspt")
133
+    public ResponseEntity<SaveResponse> removeDspt(@ApiIgnore String userId, @RequestBody @Valid SaveWhsInfoRequest saveWhsInfoRequest) throws Exception {
134
+        whsMngService.modifyWhsInfo(userId, saveWhsInfoRequest);
135
+        return ResponseEntity.ok(SaveResponse.toDTO(SystemMessageCode.SAVE_OK));
136
+    }
137
+
138
+}

+ 131 - 0
src/main/resources/mybatis/sqlmaps/loanmng/DsptMng.xml

@@ -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>

+ 3 - 3
src/main/resources/mybatis/sqlmaps/loanmng/LoanState.xml

@@ -80,11 +80,11 @@
80 80
 
81 81
     <select id="selectLoanHistGridList" resultType="com.oqpo.api.entity.loanmng.LoanMgntDtlHstEntity">
82 82
         /* LoanStateMapper.selectLoanHistGridList */
83
-        SELECT A.loan_mgnt_unq_no, A.loan_reg_dt, A.loan_reg_tm,
83
+        SELECT A.loan_mgnt_unq_no,
84
+            DATE_FORMAT(A.loan_reg_dt, '%Y.%m.%d') AS loan_reg_dt, TIME_FORMAT(A.loan_reg_tm, '%H:%i:%s') AS loan_reg_tm,
84 85
             A.dpst_pay_dvsn, FN_CODE_NM('DPST_PAY_DVSN', A.dpst_pay_dvsn) AS dpst_pay_dvsn_nm, A.trsc_amt, A.trsc_bf_bal,
85 86
             A.trsc_af_bal, A.media_dvsn, FN_CODE_NM('MEDIA_DVSN', A.media_dvsn) AS media_dvsn_nm,
86
-            A.rcv_acct_no, A.paym_acct_no, A.dpst_dt, A.dpst_nm, A.dpst_bnk_cd, A.dspt_mgnt_no, A.loan_desc,
87
-            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
87
+            A.rcv_acct_no, A.paym_acct_no, A.dpst_dt, A.dpst_nm, A.dpst_bnk_cd, A.dspt_mgnt_no, A.loan_desc
88 88
         FROM loan_mgnt_dtl_hst A
89 89
         WHERE A.loan_mgnt_unq_no = #{sLoanMgntUnqNo}
90 90
         <if test="sDpstPayDvsn != null and sDpstPayDvsn != ''">

+ 11 - 11
src/main/resources/mybatis/sqlmaps/stockmng/WhsMng.xml

@@ -4,7 +4,7 @@
4 4
 <mapper namespace="com.oqpo.api.mapper.stockmng.WhsMngMapper">
5 5
 
6 6
     <select id="selectWhsMngGridList" resultType="com.oqpo.api.entity.stockmng.WhsMgntBaseInfoEntity">
7
-        /* StockMngMapper.selectWhsMngGridList */
7
+        /* WhsMngMapper.selectWhsMngGridList */
8 8
         SELECT A.brand_id, FN_BRAND_NM(A.brand_id) AS brand_nm,
9 9
             A.whs_id, A.whs_nm, A.whs_dvsn, FN_CODE_NM('WHS_DVSN', A.whs_dvsn) AS whs_dvsn_nm,
10 10
             A.mgr_nm, A.mgr_tel_no, A.whs_st_cd, FN_CODE_NM('WHS_ST_CD', A.whs_st_cd) AS whs_st_nm,
@@ -44,7 +44,7 @@
44 44
     </select>
45 45
 
46 46
     <select id="selectWhsMngGridCnt" resultType="int">
47
-        /* StockMngMapper.selectWhsMngGridCnt */
47
+        /* WhsMngMapper.selectWhsMngGridCnt */
48 48
         SELECT COUNT(*)
49 49
         FROM whs_mgnt_base_info A
50 50
         WHERE A.brand_id = #{sBrandId}
@@ -63,7 +63,7 @@
63 63
     </select>
64 64
 
65 65
     <select id="selectWhsMgntBaseInfo" resultType="com.oqpo.api.entity.stockmng.WhsMgntBaseInfoEntity">
66
-        /* StockMngMapper.selectWhsMgntBaseInfo */
66
+        /* WhsMngMapper.selectWhsMgntBaseInfo */
67 67
         SELECT A.brand_id, FN_BRAND_NM(A.brand_id) AS brand_nm,
68 68
             A.whs_id, A.whs_nm, A.whs_dvsn, FN_CODE_NM('WHS_DVSN', A.whs_dvsn) AS whs_dvsn_nm,
69 69
             A.mgr_nm, A.mgr_tel_no, A.zip_no,
@@ -76,7 +76,7 @@
76 76
     </select>
77 77
 
78 78
     <select id="selectWhsLocGridList" resultType="com.oqpo.api.entity.stockmng.WhsMgntBaseLocEntity">
79
-        /* StockMngMapper.selectWhsLocGridList */
79
+        /* WhsMngMapper.selectWhsLocGridList */
80 80
         SELECT A.brand_id, A.whs_id, A.location, A.location_nm,
81 81
             A.stck_dvsn, FN_CODE_NM('STCK_DVSN', A.stck_dvsn) AS stck_dvsn_nm,
82 82
             A.loc_st_cd, FN_CODE_NM('LOC_ST_CD', A.loc_st_cd) AS loc_st_nm
@@ -87,7 +87,7 @@
87 87
     </select>
88 88
 
89 89
     <insert id="insertWhsMgntBaseInfo" >
90
-        /* StockMngMapper.insertWhsMgntBaseInfo */
90
+        /* WhsMngMapper.insertWhsMgntBaseInfo */
91 91
         INSERT INTO whs_mgnt_base_info
92 92
             (brand_id, whs_id, whs_nm, whs_dvsn, mgr_nm, mgr_tel_no, zip_no, addr1, addr2, whs_st_cd, store_id,
93 93
              sys_reg_dttm, sys_reg_id, sys_chg_dttm, sys_chg_id)
@@ -98,7 +98,7 @@
98 98
     </insert>
99 99
 
100 100
     <update id="updateWhsMgntBaseInfo" >
101
-        /* StockMngMapper.updateWhsMgntBaseInfo */
101
+        /* WhsMngMapper.updateWhsMgntBaseInfo */
102 102
         UPDATE whs_mgnt_base_info SET
103 103
             whs_nm = #{entity.whsNm},
104 104
             whs_dvsn = #{entity.whsDvsn},
@@ -116,21 +116,21 @@
116 116
     </update>
117 117
 
118 118
     <delete id="deleteWhsMgntBaseInfo" >
119
-        /* StockMngMapper.deleteWhsMgntBaseInfo */
119
+        /* WhsMngMapper.deleteWhsMgntBaseInfo */
120 120
         DELETE FROM whs_mgnt_base_info
121 121
         WHERE brand_id = #{entity.brandId}
122 122
         AND whs_id = #{entity.whsId}
123 123
     </delete>
124 124
 
125 125
     <delete id="deleteWhsMgntBaseLoc4Info" >
126
-        /* StockMngMapper.deleteWhsMgntBaseLoc4Info */
126
+        /* WhsMngMapper.deleteWhsMgntBaseLoc4Info */
127 127
         DELETE FROM whs_mgnt_base_loc
128 128
         WHERE brand_id = #{entity.brandId}
129 129
         AND whs_id = #{entity.whsId}
130 130
     </delete>
131 131
 
132 132
     <insert id="insertWhsMgntBaseLoc" >
133
-        /* StockMngMapper.insertWhsMgntBaseLoc */
133
+        /* WhsMngMapper.insertWhsMgntBaseLoc */
134 134
         INSERT INTO whs_mgnt_base_loc
135 135
             (brand_id, whs_id, location, location_nm, stck_dvsn, loc_st_cd,
136 136
              sys_reg_dttm, sys_reg_id, sys_chg_dttm, sys_chg_id)
@@ -140,7 +140,7 @@
140 140
     </insert>
141 141
 
142 142
     <update id="updateWhsMgntBaseLoc" >
143
-        /* StockMngMapper.updateWhsMgntBaseLoc */
143
+        /* WhsMngMapper.updateWhsMgntBaseLoc */
144 144
         UPDATE whs_mgnt_base_loc SET
145 145
             location_nm = #{entity.locationNm},
146 146
             stck_dvsn = #{entity.stckDvsn},
@@ -153,7 +153,7 @@
153 153
     </update>
154 154
 
155 155
     <delete id="deleteWhsMgntBaseLoc" >
156
-        /* StockMngMapper.deleteWhsMgntBaseLoc */
156
+        /* WhsMngMapper.deleteWhsMgntBaseLoc */
157 157
         DELETE FROM whs_mgnt_base_loc
158 158
         WHERE brand_id = #{entity.brandId}
159 159
         AND whs_id = #{entity.whsId}