ソースを参照

update qc result

master
kelvinsuen 6日前
コミット
7d3f0c20ba
6個のファイルの変更22行の追加7行の削除
  1. +4
    -0
      src/main/java/com/ffii/fpsms/modules/qc/entity/QcResult.kt
  2. +11
    -7
      src/main/java/com/ffii/fpsms/modules/qc/entity/projection/QcResultInfo.kt
  3. +1
    -0
      src/main/java/com/ffii/fpsms/modules/qc/service/QcResultService.kt
  4. +1
    -0
      src/main/java/com/ffii/fpsms/modules/qc/web/model/SaveQcResultRequest.kt
  5. +1
    -0
      src/main/java/com/ffii/fpsms/modules/stock/service/StockInLineService.kt
  6. +4
    -0
      src/main/resources/db/changelog/changes/20250820_01_kelvin/01_update_qc_result.sql

+ 4
- 0
src/main/java/com/ffii/fpsms/modules/qc/entity/QcResult.kt ファイルの表示

@@ -37,4 +37,8 @@ open class QcResult: BaseEntity<Long>() {

@Column(name = "remarks")
open var remarks: String? = null

@NotNull
@Column(name = "qcPassed")
open var qcPassed: Boolean = true
}

+ 11
- 7
src/main/java/com/ffii/fpsms/modules/qc/entity/projection/QcResultInfo.kt ファイルの表示

@@ -4,15 +4,19 @@ import org.springframework.beans.factory.annotation.Value

interface QcResultInfo {
val id: Long
@get:Value("#{target.qcItem.id}")
val qcItemId: Long
@get:Value("#{target.qcItem.name}")
val name: String
@get:Value("#{target.qcItem.code}")
val code: String
@get:Value("#{target.qcItem?.id}")
val qcItemId: Long?
@get:Value("#{target.qcItem?.code}")
val code: String?
@get:Value("#{target.qcItem?.name}")
val name: String?
@get:Value("#{target.qcItem?.description}")
val description: String?
val remarks: String?
@get:Value("#{target.stockInLine?.id}")
val stockInLineId: Long?
@get:Value("#{target.stockOutLine?.id}")
val stockOutLineId: Long?
val failQty: Double
val failQty: Double?
val qcPassed: Boolean
}

+ 1
- 0
src/main/java/com/ffii/fpsms/modules/qc/service/QcResultService.kt ファイルの表示

@@ -42,6 +42,7 @@ open class QcResultService(
this.failQty = request.failQty
this.type = request.type
this.remarks = request.remarks
this.qcPassed = request.qcPassed
}
val savedQcResult = saveAndFlush(qcResult)
return MessageResponse(


+ 1
- 0
src/main/java/com/ffii/fpsms/modules/qc/web/model/SaveQcResultRequest.kt ファイルの表示

@@ -7,6 +7,7 @@ data class SaveQcResultRequest(
val stockInLineId: Long?,
val stockOutLineId: Long?,
val failQty: Double,
val qcPassed: Boolean,
val type: String?,
val remarks: String?,
)

+ 1
- 0
src/main/java/com/ffii/fpsms/modules/stock/service/StockInLineService.kt ファイルの表示

@@ -171,6 +171,7 @@ open class StockInLineService(
this.item = item
this.stockInLine = stockInLine
this.failQty = it.failQty
this.qcPassed = it.qcPassed
this.type = "qc" // default as qc for now
this.remarks = it.remarks
}


+ 4
- 0
src/main/resources/db/changelog/changes/20250820_01_kelvin/01_update_qc_result.sql ファイルの表示

@@ -0,0 +1,4 @@
-- liquibase formatted sql
-- changeset kelvin:update qc result table
ALTER TABLE `qc_result`
ADD COLUMN `qcPassed` TINYINT(1) NOT NULL DEFAULT 1 AFTER `remarks`;

読み込み中…
キャンセル
保存