diff --git a/src/main/java/com/ffii/fpsms/modules/master/entity/ProductionSchedule.kt b/src/main/java/com/ffii/fpsms/modules/master/entity/ProductionSchedule.kt index b960238..597d486 100644 --- a/src/main/java/com/ffii/fpsms/modules/master/entity/ProductionSchedule.kt +++ b/src/main/java/com/ffii/fpsms/modules/master/entity/ProductionSchedule.kt @@ -16,5 +16,6 @@ open class ProductionSchedule : BaseEntity() { @Column(name = "totalFGType") open var totalFGType: Long = 0L - + @Column(name = "type") + open var type: String = "manual" } diff --git a/src/main/java/com/ffii/fpsms/modules/master/service/ProductionScheduleService.kt b/src/main/java/com/ffii/fpsms/modules/master/service/ProductionScheduleService.kt index 8ccde4f..1b18c2d 100644 --- a/src/main/java/com/ffii/fpsms/modules/master/service/ProductionScheduleService.kt +++ b/src/main/java/com/ffii/fpsms/modules/master/service/ProductionScheduleService.kt @@ -194,6 +194,7 @@ open class ProductionScheduleService( tempObj.totalFGType = fgCount; tempObj.totalEstProdCount = accProdCount; tempObj.id = saveRoughScheduleToDatabase(tempObj); + tempObj.type = "rough" for ((roughScheduleRecord, totalDifference) in sortedEntries) { saveRoughScheduleLineToDatabase(tempObj.id ?: -1, roughScheduleRecord) diff --git a/src/main/java/com/ffii/fpsms/modules/master/service/SchedulingService.kt b/src/main/java/com/ffii/fpsms/modules/master/service/SchedulingService.kt index 479c0a3..ff177ab 100644 --- a/src/main/java/com/ffii/fpsms/modules/master/service/SchedulingService.kt +++ b/src/main/java/com/ffii/fpsms/modules/master/service/SchedulingService.kt @@ -1,5 +1,6 @@ package com.ffii.fpsms.modules.master.service +//depreciated import com.ffii.core.support.AbstractBaseEntityService import com.ffii.core.support.JdbcDao import com.ffii.fpsms.modules.master.entity.* diff --git a/src/main/resources/db/changelog/changes/20250529_01_jason_lam/01_update_production_schedule_with_type.sql b/src/main/resources/db/changelog/changes/20250529_01_jason_lam/01_update_production_schedule_with_type.sql new file mode 100644 index 0000000..256861f --- /dev/null +++ b/src/main/resources/db/changelog/changes/20250529_01_jason_lam/01_update_production_schedule_with_type.sql @@ -0,0 +1,4 @@ +--liquibase formatted sql +--changeset jason_lam:update production schedule with type + +ALTER TABLE production_schedule ADD `type` VARCHAR(10) NOT NULL DEFAULT "manual" ;