return ResponseEntity.ok(mapOf("ok" to true, "itemCode" to itemCode, "systemType" to systemType, "enabled" to enabled))
}
}
+ 6- 3
src/main/java/com/ffii/fpsms/modules/master/service/ProductionScheduleService.ktZobrazit soubor
@@ -665,8 +665,10 @@ open class ProductionScheduleService(
i.*
FROM
(SELECT
(SELECT
ROUND(AVG(d.dailyQty) * 1.5)
COALESCE(
(SELECT dailyQty FROM item_daily_out WHERE itemCode = items.code),
(SELECT
ROUND(AVG(d.dailyQty))
FROM
(SELECT
SUM(dol.qty) AS dailyQty
@@ -677,7 +679,8 @@ open class ProductionScheduleService(
do.deleted = 0 and
dol.itemId = items.id
AND do.estimatedArrivalDate >= :fromDate AND do.estimatedArrivalDate <= :toDate
GROUP BY do.estimatedArrivalDate) AS d) AS avgQtyLastMonth,
GROUP BY do.estimatedArrivalDate) AS d)
) AS avgQtyLastMonth,
(select sum(reqQty) from job_order where bomId = bom.id and status != 'completed') AS pendingJobQty,
+ 10- 0
src/main/resources/db/changelog/changes/20260314_01_item_daily_out/01_create_item_daily_out.sqlZobrazit soubor
@@ -0,0 +1,10 @@
--liquibase formatted sql
--changeset ps:create item_daily_out table
--precondition onFail:MARK_RAN
--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'item_daily_out'