| @@ -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/**") | ||||
| @@ -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 | ||||