Przeglądaj źródła

2.1 deleted fix

fix負數倉
CANCERYS\kw093 3 tygodni temu
rodzic
commit
69fef37651
2 zmienionych plików z 4 dodań i 7 usunięć
  1. +3
    -4
      src/main/java/com/ffii/fpsms/modules/master/service/ledgerfix/StockLedgerFixBackfillService.kt
  2. +1
    -3
      src/main/java/com/ffii/fpsms/modules/master/service/ledgerfix/StockLedgerFixQueryService.kt

+ 3
- 4
src/main/java/com/ffii/fpsms/modules/master/service/ledgerfix/StockLedgerFixBackfillService.kt Wyświetl plik

@@ -409,8 +409,9 @@ open class StockLedgerFixBackfillService(
}

/**
* Rows that already have a lot line stay. Soft-delete only when a related
* stock in/out line exists and 2.1a/2.1b still could not set inventoryLotLineId.
* Rows that already have a lot line stay. Soft-delete when 2.1a/2.1b still
* left inventoryLotLineId null: a related in/out line that cannot point at a lot,
* or neither stockInLineId nor stockOutLineId is set.
*/
private fun softDeleteUnlinkedLot(
dateWhere: String,
@@ -429,7 +430,6 @@ open class StockLedgerFixBackfillService(
WHERE sl.deleted = 0
AND ($dateWhere)
AND sl.inventoryLotLineId IS NULL
AND (sl.stockInLineId IS NOT NULL OR sl.stockOutLineId IS NOT NULL)
AND ($extraAnd)
""".trimIndent(),
args,
@@ -1139,7 +1139,6 @@ open class StockLedgerFixBackfillService(
sl.modifiedBy = 'stock-ledger-fix'
WHERE sl.deleted = 0
AND sl.inventoryLotLineId IS NULL
AND (sl.stockInLineId IS NOT NULL OR sl.stockOutLineId IS NOT NULL)
""".trimIndent(),
)
val outLine = alignExistingOutLine("sl.date < :today", args, "sl.inventoryId = :inventoryId")


+ 1
- 3
src/main/java/com/ffii/fpsms/modules/master/service/ledgerfix/StockLedgerFixQueryService.kt Wyświetl plik

@@ -180,7 +180,6 @@ open class StockLedgerFixQueryService(
sl.inventoryLotLineId IS NULL
AND COALESCE(sol.inventoryLotLineId, sil.inventoryLotLineId) IS NULL
AND (sil.inventoryLotId IS NULL OR IFNULL(lc.lineCnt, 0) = 0)
AND (sl.stockInLineId IS NOT NULL OR sl.stockOutLineId IS NOT NULL)
) AS cannotNoSource,
SUM(
sl.inventoryLotLineId IS NOT NULL
@@ -571,7 +570,6 @@ open class StockLedgerFixQueryService(
sl.inventoryLotLineId IS NULL
AND COALESCE(sol.inventoryLotLineId, sil.inventoryLotLineId) IS NULL
AND (sil.inventoryLotId IS NULL OR IFNULL(lc.lineCnt, 0) = 0)
AND (sl.stockInLineId IS NOT NULL OR sl.stockOutLineId IS NOT NULL)
) AS cannotNoSource,
SUM(
sl.inventoryLotLineId IS NOT NULL
@@ -721,7 +719,7 @@ open class StockLedgerFixQueryService(
add(canFix("fixable21a", "可修 2.1a:SIL/SOL 已有 lot line", fixable21a))
add(canFix("fixable21b", "可修 2.1b:inventoryLotId 僅一條 line", fixable21b))
add(canFix("fixableLotQty", "可修:lot 已有但缺 lotQty", lotQtyMissWithLot))
add(cannotFix("cannotNoSource", "2.1 軟刪:入出倉列對不到批號列", cannotNoSource))
add(cannotFix("cannotNoSource", "2.1 軟刪:對不到批號列(含沒有入出倉列)", cannotNoSource))
add(cannotFix("cannotMultiLine", "2.1 軟刪:同一 lot 有多條 warehouse line", cannotMultiLine))
add(cannotFix("earlyTke", "不能修:舊 TKE 開新批(sibling 盤盈)", earlyTkeOver))
add(cannotFix("realOver", "不能修:over-issue 非舊 TKE(真超發/帳不一致)", otherOver))


Ładowanie…
Anuluj
Zapisz