wangrong
3 天以前 95fa12fe6a260c1388391003faa796463264a36a
修改上报称重收集点参数由调整为1/3
1个文件已修改
4 ■■■■■ 已修改文件
src/modules/push/service/open.ts 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/push/service/open.ts
@@ -64,7 +64,7 @@
      // rawWeight.uploadTime = data.uploadTime ? new Date(data.uploadTime) : new Date();
      rawWeight.uploadTime = new Date();
      rawWeight.garbageType = data.garbageType;
      rawWeight.weight = processedWeight;
      rawWeight.weight = rawWeightValue;
      rawWeight.extraData =
        typeof data.extraData === 'object'
          ? JSON.stringify(data.extraData)
@@ -604,7 +604,7 @@
  private calcProcessedWeight(garbageType: string, weight: number): number {
    const TARE_MAP: Record<string, number> = { SW61: 10 };
    const tareWeight = TARE_MAP[garbageType] ?? 1;
    return Math.max((weight - tareWeight) / 10, 0);
    return Math.max((weight - tareWeight) / 3, 0);
  }
}