瀏覽代碼

update

master
CANCERYS\kw093 1 天之前
父節點
當前提交
2f74d6aca9
共有 2 個文件被更改,包括 47 次插入0 次删除
  1. +38
    -0
      src/main/java/com/ffii/core/response/RecordsRes.java
  2. +9
    -0
      src/main/java/com/ffii/fpsms/modules/stock/entity/InventoryLotLineRepository.kt

+ 38
- 0
src/main/java/com/ffii/core/response/RecordsRes.java 查看文件

@@ -10,6 +10,20 @@ public class RecordsRes<T> {
@JsonInclude(JsonInclude.Include.NON_NULL)
private Integer total;

/** Lines where approver has not completed (approverQty and finalQty both null). */
@JsonInclude(JsonInclude.Include.NON_NULL)
private Integer totalWaitingForApprover;

/** Lines where approver has completed (approverQty or finalQty set). */
@JsonInclude(JsonInclude.Include.NON_NULL)
private Integer totalApproved;

/**
* 當 {@link #total} 表示全域 available 行數時,此欄為目前 API 篩選後的筆數(供分頁)。
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
private Integer filteredRecordCount;

public RecordsRes() {
}

@@ -38,4 +52,28 @@ public class RecordsRes<T> {
this.total = total;
}

public Integer getTotalWaitingForApprover() {
return totalWaitingForApprover;
}

public void setTotalWaitingForApprover(Integer totalWaitingForApprover) {
this.totalWaitingForApprover = totalWaitingForApprover;
}

public Integer getTotalApproved() {
return totalApproved;
}

public void setTotalApproved(Integer totalApproved) {
this.totalApproved = totalApproved;
}

public Integer getFilteredRecordCount() {
return filteredRecordCount;
}

public void setFilteredRecordCount(Integer filteredRecordCount) {
this.filteredRecordCount = filteredRecordCount;
}

}

+ 9
- 0
src/main/java/com/ffii/fpsms/modules/stock/entity/InventoryLotLineRepository.kt 查看文件

@@ -164,4 +164,13 @@ interface InventoryLotLineRepository : AbstractRepository<InventoryLotLine, Long
nativeQuery = true
)
fun markExpiredLotLinesAsUnavailable(): Int

/** 對應 SQL: COUNT(*) FROM inventory_lot_line WHERE status = 'available'(另排除已刪除列)。 */
@Query(
"""
SELECT COUNT(ill) FROM InventoryLotLine ill
WHERE ill.status = :status AND ill.deleted = false
"""
)
fun countByStatusAndDeletedIsFalse(@Param("status") status: InventoryLotLineStatus): Long
}

Loading…
取消
儲存