Browse Source

庫存調整權限 盤點卡片統計 「未按規劃完成」移到 tab 列最後

production
CANCERYS\kw093 13 hours ago
parent
commit
a1ca36811b
2 changed files with 10 additions and 2 deletions
  1. +6
    -2
      src/main/java/com/ffii/fpsms/config/security/SecurityConfig.java
  2. +4
    -0
      src/main/java/com/ffii/fpsms/modules/stock/entity/InventoryLotLineRepository.kt

+ 6
- 2
src/main/java/com/ffii/fpsms/config/security/SecurityConfig.java View File

@@ -74,7 +74,11 @@ public class SecurityConfig {
return new BCryptPasswordEncoder(); return new BCryptPasswordEncoder();
} }


/** FP-MTMS Version Checklist | Functions Ref. No. 51 | v1.0.0 | 2026-08-05 */
/**
* FP-MTMS Version Checklist | Functions Ref. No. 51 | v1.0.0 | 2026-08-05
* FP-MTMS Version Checklist | Functions Ref. No. 3 | v1.0.5 | 2026-08-05
* (stockAdjustment/submit → INVENTORY_ADJUST only)
*/
@Bean @Bean
@Order(1) @Order(1)
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
@@ -113,7 +117,7 @@ public class SecurityConfig {
.requestMatchers(HttpMethod.GET, "/label-printer-monitor/odometer-stats") .requestMatchers(HttpMethod.GET, "/label-printer-monitor/odometer-stats")
.hasAnyAuthority("TESTING", "ADMIN") .hasAnyAuthority("TESTING", "ADMIN")
.requestMatchers(HttpMethod.POST, "/stockAdjustment/submit") .requestMatchers(HttpMethod.POST, "/stockAdjustment/submit")
.hasAnyAuthority("ADMIN", "INVENTORY_ADJUST")
.hasAuthority("INVENTORY_ADJUST")
.requestMatchers(HttpMethod.GET, "/inventoryLotLine/trace") .requestMatchers(HttpMethod.GET, "/inventoryLotLine/trace")
.hasAuthority("ITEM_TRACING") .hasAuthority("ITEM_TRACING")
.requestMatchers(HttpMethod.GET, "/inventoryLotLine/trace/location/**") .requestMatchers(HttpMethod.GET, "/inventoryLotLine/trace/location/**")


+ 4
- 0
src/main/java/com/ffii/fpsms/modules/stock/entity/InventoryLotLineRepository.kt View File

@@ -196,19 +196,23 @@ WHERE ill.id = :id
fun findAllByWarehouseCodeAndDeletedIsFalse(@Param("warehouseCode") warehouseCode: String): List<InventoryLotLine> fun findAllByWarehouseCodeAndDeletedIsFalse(@Param("warehouseCode") warehouseCode: String): List<InventoryLotLine>




/** FP-MTMS Version Checklist | Functions Ref. No. 53 | v1.0.0 | 2026-08-05 — 卡片「貨品種類數量」:僅 available,與明細 fallback / 預建來源一致 */
@Query(""" @Query("""
SELECT COUNT(DISTINCT ill.inventoryLot.item.id) SELECT COUNT(DISTINCT ill.inventoryLot.item.id)
FROM InventoryLotLine ill FROM InventoryLotLine ill
WHERE ill.warehouse.id IN :warehouseIds WHERE ill.warehouse.id IN :warehouseIds
AND ill.deleted = false AND ill.deleted = false
AND ill.status = 'available'
""") """)
fun countDistinctItemsByWarehouseIds(@Param("warehouseIds") warehouseIds: List<Long>): Long fun countDistinctItemsByWarehouseIds(@Param("warehouseIds") warehouseIds: List<Long>): Long


/** FP-MTMS Version Checklist | Functions Ref. No. 53 | v1.0.0 | 2026-08-05 — 卡片 lot 筆數:僅 available */
@Query(""" @Query("""
SELECT COUNT(ill.id) SELECT COUNT(ill.id)
FROM InventoryLotLine ill FROM InventoryLotLine ill
WHERE ill.warehouse.id IN :warehouseIds WHERE ill.warehouse.id IN :warehouseIds
AND ill.deleted = false AND ill.deleted = false
AND ill.status = 'available'
""") """)
fun countAllByWarehouseIds(@Param("warehouseIds") warehouseIds: List<Long>): Long fun countAllByWarehouseIds(@Param("warehouseIds") warehouseIds: List<Long>): Long




Loading…
Cancel
Save