1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
| import { CoolController, BaseController } from '@cool-midway/core';
| import { PushSiteweightEntity } from '../../entity/siteweight';
| import { PushSiteweightService } from '../../service/siteweight';
| import { BaseSysDepartmentEntity } from '../../../base/entity/sys/department';
| import {BasicdataWastetypeEntity} from '../../../basicdata/entity/wastetype'
| import { BasicdataSiteEntity } from '../../../basicdata/entity/site';
| /**
| * 业务称重数据管理
| */
| @CoolController({
| api: ['add', 'delete', 'update', 'info', 'list', 'page'],
| entity: PushSiteweightEntity,
| service: PushSiteweightService,
| pageQueryOp: {
| select: [
| 'a.*',
| 'b.name AS departmentName',
| 'c.name AS garbageName', // 垃圾名称
| 'd.businessName AS businessName', // 垃圾名称
|
| ],
| fieldEq: ['a.deviceNo'],
| fieldLike: ['a.deviceNo'],
| join: [
| {
| entity: BaseSysDepartmentEntity,
| alias: 'b',
| condition: 'a.departmentId = b.id',
| type: 'leftJoin',
| },
| {
| entity: BasicdataWastetypeEntity,
| alias: 'c',
| condition: 'a.garbageType = c.code',
| type: 'leftJoin',
| },
| {
| entity: BasicdataSiteEntity,
| alias: 'd',
| condition: 'a.businessId = d.businessId',
| type: 'leftJoin',
| },
| ],
| },
| })
| export class AdminPushSiteweightController extends BaseController {}
|
|