| | |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { PushWeightEntity } from '../../entity/weight'; |
| | | import { PushWeightService } from '../../service/weight'; |
| | | import { BasicdataWastetypeEntity } from '../../../basicdata/entity/wastetype'; |
| | | |
| | | /** |
| | | * 原始称重数据管理 |
| | |
| | | entity: PushWeightEntity, |
| | | service: PushWeightService, |
| | | pageQueryOp: { |
| | | select: ['a.*'], |
| | | select: ['a.*', 'b.name AS garbageName'], |
| | | fieldEq: ['a.deviceNo', 'a.garbageType'], |
| | | join: [ |
| | | { |
| | | entity: BasicdataWastetypeEntity, |
| | | alias: 'b', |
| | | condition: 'a.garbageType = b.code', |
| | | type: 'leftJoin', |
| | | }, |
| | | ], |
| | | where: async ctx => { |
| | | const { startTime, endTime } = ctx.request.body; |
| | | const conditions = []; |