wangrong
2026-09-29 2f52450964665480f13c94c865bcac9027490380
fix-home-logo and repair the index overview
7个文件已修改
59 ■■■■■ 已修改文件
src/modules/market/entity/coupon/info.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/operation/entity/wastesale.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/order/entity/goods.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/push/service/open.ts 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/report/controller/admin/dailysorter.ts 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/report/service/screen.ts 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/shop/entity/recycleorderitem.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/market/entity/coupon/info.ts
@@ -18,7 +18,7 @@
  @Column({ comment: '金额', type: 'decimal', precision: 12, scale: 2 })
  amount: number;
  @Column({ comment: '数量' })
  @Column({ comment: '计数(次)' })
  num: number;
  @Column({ comment: '已领取' })
src/modules/operation/entity/wastesale.ts
@@ -27,7 +27,7 @@
  @Column({ comment: '日期时间', type: 'datetime' })
  dateTime: Date;
  @Column({ comment: '重量', type: 'decimal', precision: 10, scale: 2 })
  @Column({ comment: '重量(kg)', type: 'decimal', precision: 10, scale: 2 })
  weight: number;
  @Column({ comment: '单价', type: 'decimal', precision: 10, scale: 2 })
src/modules/order/entity/goods.ts
@@ -33,7 +33,7 @@
  })
  discountPrice: number;
  @Column({ comment: '数量' })
  @Column({ comment: '计数(次)' })
  count: number;
  @Column({ comment: '其他信息', nullable: true })
src/modules/push/service/open.ts
@@ -58,11 +58,13 @@
    try {
      // 1. 保存原始称重数据
      const rawWeight = new PushWeightEntity();
      const rawWeightValue = data.garbageWeight || 0;
      const processedWeight = this.calcProcessedWeight(data.garbageType, rawWeightValue);
      rawWeight.deviceNo = data.deviceNo;
      // rawWeight.uploadTime = data.uploadTime ? new Date(data.uploadTime) : new Date();
      rawWeight.uploadTime = new Date();
      rawWeight.garbageType = data.garbageType;
      rawWeight.weight = data.garbageWeight || 0;
      rawWeight.weight = processedWeight;
      rawWeight.extraData =
        typeof data.extraData === 'object'
          ? JSON.stringify(data.extraData)
@@ -87,7 +89,6 @@
        siteWeight.businessId = iotDevices[0].businessId;
        siteWeight.departmentId = iotDevices[0].departmentId;
        await this.pushSiteweightEntity.save(siteWeight);
      } else {
        siteWeight.businessId = 'UNKNOWN';
        siteWeight.departmentId = -1;
@@ -582,4 +583,28 @@
    }
  }
  /**
   * 计算处理后的重量
   * 规则:
   * 1. 去皮重:干垃圾/可回收物 -1kg,湿垃圾 -10kg,其它类型同干垃圾(-1kg)
   * 2. 去皮后重量 × 1/10
   * 3. 结果不小于 0
   * SW60     有毒有害
   * SW61     湿垃圾
   * SW62001  可回收-废纸张
   * SW62002  可回收-废塑料
   * SW62003  可回收-废金属
   * SW62004  可回收-废玻璃
   * SW62005  可回收-废织物
   * SW62006  可回收-废旧电子产品
   * SW62007  可回收-废旧电源电池
   * SW63     大件垃圾
   * SW64     干垃圾
   */
  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);
  }
}
src/modules/report/controller/admin/dailysorter.ts
@@ -15,21 +15,7 @@
  pageQueryOp: {
    keyWordLikeFields: ['a.businessName', 'a.businessId'],
    fieldEq: ['a.date', 'a.businessId', 'a.attendanceStatus'],
    select: ['a.*', 'b.name AS departmentName', 'c.businessName AS workSiteName'],
    join: [
      {
        entity: BaseSysDepartmentEntity,
        alias: 'b',
        condition: 'a.departmentId = b.id',
        type: 'leftJoin',
      },
      {
        entity: BasicdataSiteEntity,
        alias: 'c',
        condition: 'a.workSiteId = c.businessId',
        type: 'leftJoin',
      },
    ],
    select: ['a.*'],
    where: async ctx => {
      const conditions: any[][] = [];
      conditions.push(...(await WithDeptFilterWhere(ctx, { alias: 'a', field: 'departmentId' })));
src/modules/report/service/screen.ts
@@ -679,7 +679,11 @@
      const actQb = this.orderRepo
        .createQueryBuilder('o')
        .select('COUNT(o.id)', 'c')
        .where('o.status = :status', { status: '已完成' });
        .where('o.status = :status', { status: '已完成' })
        .andWhere('o.finishTime BETWEEN :start AND :end', {
          start: dates.startTime,
          end: dates.endTime,
        });
      this.applyDept(actQb, 'o');
      result.greenActions = n((await actQb.getRawOne())?.c);
src/modules/shop/entity/recycleorderitem.ts
@@ -20,7 +20,7 @@
    @Column({ comment: '固废国标分类' })
    category: string;
    @Column({ comment: '重量', type: 'decimal', precision: 10, scale: 2, default: 0, })
    @Column({ comment: '重量(kg)', type: 'decimal', precision: 10, scale: 2, default: 0, })
    weight: number;
    @Column({ comment: '单价', type: 'decimal', precision: 10, scale: 2, default: 0, })