Kaynağa Gözat

remark of merge round up/down

item_tracing
CANCERYS\kw093 3 hafta önce
ebeveyn
işleme
f00a77980a
3 değiştirilmiş dosya ile 9 ekleme ve 0 silme
  1. +3
    -0
      src/main/java/com/ffii/fpsms/modules/stock/service/StockInLineService.kt
  2. +5
    -0
      src/main/java/com/ffii/fpsms/modules/stock/service/StockQtyRoundSupport.kt
  3. +1
    -0
      src/main/java/com/ffii/fpsms/modules/stock/web/model/SaveStockInRequest.kt

+ 3
- 0
src/main/java/com/ffii/fpsms/modules/stock/service/StockInLineService.kt Dosyayı Görüntüle

@@ -333,6 +333,7 @@ open class StockInLineService(
) )
} }


/** FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.6 | 2026-10-14 */
private fun applyRequestedStockQtyRound( private fun applyRequestedStockQtyRound(
stockInLine: StockInLine, stockInLine: StockInLine,
request: SaveStockInLineRequest, request: SaveStockInLineRequest,
@@ -357,6 +358,7 @@ open class StockInLineService(
stockInLine.remarks = remarks stockInLine.remarks = remarks
} }


/** FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.6 | 2026-10-14 */
@Throws(IOException::class) @Throws(IOException::class)
@Transactional @Transactional
open fun create(request: SaveStockInLineRequest): MessageResponse { open fun create(request: SaveStockInLineRequest): MessageResponse {
@@ -975,6 +977,7 @@ open class StockInLineService(
} }
} }


/** FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.6 | 2026-10-14 */
@Throws(IOException::class) @Throws(IOException::class)
@Transactional @Transactional
open fun update(request: SaveStockInLineRequest): MessageResponse { open fun update(request: SaveStockInLineRequest): MessageResponse {


+ 5
- 0
src/main/java/com/ffii/fpsms/modules/stock/service/StockQtyRoundSupport.kt Dosyayı Görüntüle

@@ -24,6 +24,7 @@ object StockQtyRoundSupport {
return qty.stripTrailingZeros().scale() > 0 return qty.stripTrailingZeros().scale() > 0
} }


/** FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.6 | 2026-10-14 */
fun applyIfRequested( fun applyIfRequested(
currentQty: BigDecimal, currentQty: BigDecimal,
currentRemarks: String?, currentRemarks: String?,
@@ -51,6 +52,7 @@ object StockQtyRoundSupport {
return after to mergeRemark(currentRemarks, withReason) return after to mergeRemark(currentRemarks, withReason)
} }


/** FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.6 | 2026-10-14 */
fun parseMode(raw: String?): Mode? { fun parseMode(raw: String?): Mode? {
val value = raw?.trim()?.uppercase() ?: return null val value = raw?.trim()?.uppercase() ?: return null
if (value.isEmpty()) return null if (value.isEmpty()) return null
@@ -61,6 +63,7 @@ object StockQtyRoundSupport {
} }
} }


/** FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.6 | 2026-10-14 */
fun roundQty(before: BigDecimal, mode: Mode, customQty: BigDecimal?): BigDecimal { fun roundQty(before: BigDecimal, mode: Mode, customQty: BigDecimal?): BigDecimal {
return when (mode) { return when (mode) {
Mode.HALF_UP -> before.setScale(0, RoundingMode.HALF_UP) Mode.HALF_UP -> before.setScale(0, RoundingMode.HALF_UP)
@@ -79,6 +82,7 @@ object StockQtyRoundSupport {
} }
} }


/** FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.6 | 2026-10-14 */
fun buildTag( fun buildTag(
mode: Mode, mode: Mode,
before: BigDecimal, before: BigDecimal,
@@ -90,6 +94,7 @@ object StockQtyRoundSupport {
return "[QTY_ROUND mode=${mode.name} before=${plain(before)} after=${plain(after)} source=$source by=${sanitize(by)} at=${at.format(AT_FORMAT)}]" return "[QTY_ROUND mode=${mode.name} before=${plain(before)} after=${plain(after)} source=$source by=${sanitize(by)} at=${at.format(AT_FORMAT)}]"
} }


/** FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.6 | 2026-10-14 */
fun mergeRemark(existing: String?, tag: String): String { fun mergeRemark(existing: String?, tag: String): String {
val stripped = existing?.replace(TAG_REGEX, "")?.trim().orEmpty() val stripped = existing?.replace(TAG_REGEX, "")?.trim().orEmpty()
val merged = if (stripped.isEmpty()) tag else "$tag $stripped" val merged = if (stripped.isEmpty()) tag else "$tag $stripped"


+ 1
- 0
src/main/java/com/ffii/fpsms/modules/stock/web/model/SaveStockInRequest.kt Dosyayı Görüntüle

@@ -37,6 +37,7 @@ data class SaveStockInRequest(
// val m18 // val m18
) )


/** FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.6 | 2026-10-14 */
data class SaveStockInLineRequest( data class SaveStockInLineRequest(
var id: Long? = null, var id: Long? = null,
var stockInId: Long? = null, var stockInId: Long? = null,


Yükleniyor…
İptal
Kaydet