|
@@ -7,9 +7,11 @@
|
7
|
7
|
/* StockMngMapper.selectStockMngGridList */
|
8
|
8
|
SELECT A.brand_id, FN_BRAND_NM(A.brand_id) AS brand_nm,
|
9
|
9
|
C.store_id, FN_STORE_NM(A.brand_id, C.store_id) AS store_nm,
|
10
|
|
- A.whs_id, C.whs_nm, A.location, D.location_nm, A.item_id, E.item_nm, E.unit, A.stck_qty, A.prp_stck_qty,
|
11
|
|
- A.sft_stck_rt,
|
12
|
|
- CASE WHEN A.PRP_STCK_QTY > 0 THEN A.STCK_QTY / A.PRP_STCK_QTY * 100 ELSE 0 END AS cur_stck_rt
|
|
10
|
+ A.whs_id, C.whs_nm, A.location, D.location_nm, A.item_id, E.item_nm, E.unit, A.stck_qty,
|
|
11
|
+ case when #{sStoreId} is null or #{sStoreId} = '' then A.prp_stck_qty else 0 end as prp_stck_qty,
|
|
12
|
+ case when #{sStoreId} is null or #{sStoreId} = '' then A.sft_stck_rt else 0 end as sft_stck_rt,
|
|
13
|
+ case when #{sStoreId} is null or #{sStoreId} = '' then (CASE WHEN A.PRP_STCK_QTY > 0 THEN A.STCK_QTY / A.PRP_STCK_QTY * 100 ELSE 0 END)
|
|
14
|
+ else 0 end AS cur_stck_rt
|
13
|
15
|
/* , A.cur_stck_rt */
|
14
|
16
|
FROM stck_mgnt_base_info A
|
15
|
17
|
INNER JOIN whs_mgnt_base_info C ON A.brand_id = C.brand_id AND A.whs_id = C.whs_id
|