Selaa lähdekoodia

매장단가 검색조건 변경

dwkim 2 vuotta sitten
vanhempi
commit
be760e8fa8

+ 2 - 2
src/main/java/com/oqpo/api/mapper/stinfo/StoreItemUnitMapper.java

@@ -11,8 +11,8 @@ import java.util.List;
11 11
 @Mapper
12 12
 public interface StoreItemUnitMapper {
13 13
 
14
-    List<StoreItemUnitEntity> selectStoreItemUnitGridList(@Param("sBrandId") String sBrandId, @Param("sStoreId") String sStoreId , GridRequest gridRequest)throws Exception;
15
-    int selectStoreItemUnitGridCnt(@Param("sBrandId") String sBrandId, @Param("sStoreId") String sStoreId )throws Exception;
14
+    List<StoreItemUnitEntity> selectStoreItemUnitGridList(@Param("sBrandId") String sBrandId, @Param("sStoreNm") String sStoreNm , GridRequest gridRequest)throws Exception;
15
+    int selectStoreItemUnitGridCnt(@Param("sBrandId") String sBrandId, @Param("sStoreNm") String sStoreNm )throws Exception;
16 16
 
17 17
     List<StoreItemUnitEntity> selectStoreItemUnitInfo(@Param("brandId") String brandId, @Param("storeId") String storeId, @Param("contSttDt") String contSttDt, @Param("contEndDt") String contEndDt)throws Exception;
18 18
 

+ 3 - 3
src/main/java/com/oqpo/api/service/stinfo/ItemUnitService.java

@@ -155,13 +155,13 @@ public class ItemUnitService extends CommonService {
155 155
     /*
156 156
       브랜드 매장 단가 리스트 조회
157 157
      */
158
-    public GridResponse selectStoreItemUnitGridList(String sBrandId, String sStoreId,  GridRequest gridRequest) throws Exception {
158
+    public GridResponse selectStoreItemUnitGridList(String sBrandId, String sStoreNm,  GridRequest gridRequest) throws Exception {
159 159
         int gridPage = gridRequest.getGridPage();
160 160
         int gridSize = gridRequest.getGridSize();
161 161
 
162
-        int gridRecords = storeItemUnitMapper.selectStoreItemUnitGridCnt( sBrandId, sStoreId );
162
+        int gridRecords = storeItemUnitMapper.selectStoreItemUnitGridCnt( sBrandId, sStoreNm );
163 163
         int gridTotal = fnCalculateGridTotal(gridSize, gridRecords);
164
-        List<StoreItemUnitEntity> entities = storeItemUnitMapper.selectStoreItemUnitGridList(sBrandId, sStoreId, gridRequest);
164
+        List<StoreItemUnitEntity> entities = storeItemUnitMapper.selectStoreItemUnitGridList(sBrandId, sStoreNm, gridRequest);
165 165
         List<Object> gridRows = entities.stream()
166 166
                 .map(m -> StoreItemUnitSearchResponse.builder()
167 167
                         .viewCd("R")

+ 14 - 2
src/main/java/com/oqpo/api/service/stinfo/StoreBaseInfoService.java

@@ -213,6 +213,10 @@ public class StoreBaseInfoService extends CommonService {
213 213
                         } else {
214 214
                             loanInfoEntity.setCredtLimitUseYn("N");
215 215
                         }
216
+                } else if ("LD03".equals(entity.getLoanDvsn())) {   // 무정산
217
+                    loanInfoEntity.setChrgeLimitAmt(0);
218
+                    loanInfoEntity.setCredtLimitAmt(0);
219
+                    loanInfoEntity.setCredtLimitUseYn("N");
216 220
                 }
217 221
                 loanInfoEntity.setUseAmtTotal(0);
218 222
                 loanInfoEntity.setTmpRcvAcctTotal(0);
@@ -329,7 +333,7 @@ public class StoreBaseInfoService extends CommonService {
329 333
                         LoanInfoEntity loanInfoUEntity = new LoanInfoEntity();
330 334
                         loanInfoUEntity.setLoanMgntUnqNo(entity.getLoanMgntUnqNo());
331 335
                         loanInfoUEntity.setLoanDvsn(entity.getLoanDvsn());
332
-                        if ("LD02".equals(entity.getLoanDvsn())) {
336
+                        if ("LD02".equals(entity.getLoanDvsn())) {  // 후불
333 337
                             loanInfoUEntity.setCredtLimitAmt(entity.getLimitAmt());
334 338
                             loanInfoUEntity.setChrgeLimitAmt(0);
335 339
                             if (entity.getLimitAmt() > 0 ) {
@@ -337,10 +341,14 @@ public class StoreBaseInfoService extends CommonService {
337 341
                             } else {
338 342
                                 loanInfoUEntity.setCredtLimitUseYn("N");
339 343
                             }
340
-                        } else if ("LD01".equals(entity.getLoanDvsn())) {
344
+                        } else if ("LD01".equals(entity.getLoanDvsn())) {  // 선불
341 345
                             loanInfoUEntity.setCredtLimitAmt(0);
342 346
                             loanInfoUEntity.setChrgeLimitAmt(entity.getLimitAmt());
343 347
                             loanInfoUEntity.setCredtLimitUseYn("N");
348
+                        } else if ("LD03".equals(entity.getLoanDvsn())) {  // 무정산
349
+                            loanInfoUEntity.setCredtLimitAmt(0);
350
+                            loanInfoUEntity.setChrgeLimitAmt(0);
351
+                            loanInfoUEntity.setCredtLimitUseYn("N");
344 352
                         }
345 353
                         loanMgntMapper.updateLoanChgLimitInfo(userId, loanInfoUEntity);
346 354
                     }
@@ -362,6 +370,10 @@ public class StoreBaseInfoService extends CommonService {
362 370
                         loanInfoChEntity.setCredtLimitAmt(0);
363 371
                         loanInfoChEntity.setChrgeLimitAmt(entity.getLimitAmt());
364 372
                         loanInfoChEntity.setCredtLimitUseYn("N");
373
+                    } else if ("LD03".equals(entity.getLoanDvsn())) {
374
+                        loanInfoChEntity.setCredtLimitAmt(0);
375
+                        loanInfoChEntity.setChrgeLimitAmt(0);
376
+                        loanInfoChEntity.setCredtLimitUseYn("N");
365 377
                     }
366 378
                     //신규 생성
367 379
                     loanMgntMapper.insertAddLoanMgntInfo(userId, loanInfoChEntity) ;

+ 1 - 1
src/main/java/com/oqpo/api/web/controller/stinfo/ItemUnitController.java

@@ -107,7 +107,7 @@ public class ItemUnitController {
107 107
     @ApiOperation(value = "  매장 단가 그리드 리스트")
108 108
     @PostMapping("/store-unit-grid-list")
109 109
     public ResponseEntity<GridResponse> storeDetailGridList(@RequestBody @Valid StoreItemUnitSearchGridRequest storeItemUnitSearchGridRequest) throws Exception {
110
-        return ResponseEntity.ok(itemUnitService.selectStoreItemUnitGridList(storeItemUnitSearchGridRequest.getSBrandId(),storeItemUnitSearchGridRequest.getSStoreId(),  storeItemUnitSearchGridRequest.toDTO(storeItemUnitSearchGridRequest)));
110
+        return ResponseEntity.ok(itemUnitService.selectStoreItemUnitGridList(storeItemUnitSearchGridRequest.getSBrandId(),storeItemUnitSearchGridRequest.getSStoreNm(),  storeItemUnitSearchGridRequest.toDTO(storeItemUnitSearchGridRequest)));
111 111
     }
112 112
 
113 113
     /**

+ 2 - 2
src/main/java/com/oqpo/api/web/dto/request/stinfo/itemUnit/StoreItemUnitSearchGridRequest.java

@@ -14,8 +14,8 @@ public class StoreItemUnitSearchGridRequest extends GridRequest {
14 14
     @ApiModelProperty(value = "브랜드아이디")
15 15
     private String sBrandId;
16 16
 
17
-    @ApiModelProperty(value = "매장아이디")
18
-    private String sStoreId;
17
+    @ApiModelProperty(value = "매장")
18
+    private String sStoreNm;
19 19
 
20 20
     protected StoreItemUnitSearchGridRequest(Integer gridSize, Integer gridPage, String sidx, String sord, Boolean pagingYn, Integer gridFirst) {
21 21
         super(gridSize, gridPage, sidx, sord, pagingYn, gridFirst);

+ 0 - 2
src/main/java/com/oqpo/api/web/dto/response/pomng/pchReq/PchReqInfoResponse.java

@@ -2,11 +2,9 @@ package com.oqpo.api.web.dto.response.pomng.pchReq;
2 2
 
3 3
 import com.fasterxml.jackson.annotation.JsonInclude;
4 4
 import com.oqpo.api.entity.loanmng.LoanMgntBaseInfoEntity;
5
-import com.oqpo.api.entity.oper.FileEntity;
6 5
 import com.oqpo.api.entity.oper.UserMngEntity;
7 6
 import com.oqpo.api.entity.pomng.PchReqBaseInfoEntity;
8 7
 import com.oqpo.api.entity.pomng.PchReqDtlPtclEntity;
9
-import com.oqpo.api.entity.stinfo.BrandEntity;
10 8
 import io.swagger.annotations.ApiModelProperty;
11 9
 import lombok.*;
12 10
 

+ 4 - 4
src/main/resources/mybatis/sqlmaps/stinfo/StoreItemUnit.xml

@@ -12,8 +12,8 @@
12 12
         select  brand_id, store_id, cont_stt_dt, cont_end_dt, min(sys_reg_dttm) as sys_reg_dttm, count(*) as item_cnt
13 13
         from    store_item_unit_info
14 14
         where   brand_id = #{sBrandId}
15
-        <if test="sStoreId != null and sStoreId != ''">
16
-            and     store_id = #{sStoreId}
15
+        <if test="sStoreNm != null and sStoreNm != ''">
16
+            and     store_nm = concat('%',#{sStoreNm},'%')
17 17
         </if>
18 18
         and     unit_target_cd = 'Y'
19 19
         group by brand_id, store_id, cont_stt_dt, cont_end_dt
@@ -45,8 +45,8 @@
45 45
         select  distinct brand_id, store_id, cont_stt_dt, cont_end_dt
46 46
         from    store_item_unit_info
47 47
         where   brand_id = #{sBrandId}
48
-        <if test="sStoreId != null and sStoreId != ''">
49
-            and     store_id = #{sStoreId}
48
+        <if test="sStoreNm != null and sStoreNm != ''">
49
+            and     store_nm = concat('%',#{sStoreNm},'%')
50 50
         </if>
51 51
         and     unit_target_cd = 'Y'
52 52
         ) iunit