Fosi Fossil Service
Small teams. Open source. Built on Fossil.

IaC / SwiftFlow

High-performance WMS with wave picking, smart routing, and real-time inventory visibility.

Public | Owner: IaC | Default branch: trunk | Last update: 2026-10-23 14:37

Artifact 0e34bc4774f1707aae92f95ee8028751fb59042b76c86cdc2ee1bb1371ecaab7:


import gleam/dynamic/decode
import gleam/float
import gleam/int

/// QL361 数字字段有时是整数,有时是小数。先按实际类型解码,避免把真实单据解丢。
pub fn int() -> decode.Decoder(Int) {
  decode.one_of(decode.int, or: [decode.map(decode.float, float.round)])
}

pub fn number() -> decode.Decoder(Float) {
  decode.one_of(decode.float, or: [decode.map(decode.int, int.to_float)])
}

Clone

You can clone this repository with the following command:

fossil clone https://fosi.dev/IaC/SwiftFlow

Contribute

The best way to contribute is through e-mail. See the project documentation for more details.