schangxiang@126.com
2025-09-09 3d8966ba2c81e7e0365c8b123e861d18ee4f94f5
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
import { default as BaseController } from "../../baseController";
import { Post } from "egg-shell-decorators";
import { TMSPort } from "../../../entity/express/tms/tmsPort";
 
export default class PostController extends BaseController {
  //#region  获取口岸列表
  /**
   * 获取口岸列表
   */
  @Post()
  public async getList() {
    let { ctx } = this;
    let userInfo = await ctx.helper.userInfo();
    try {
      var dataList = await this.dbRead.find(TMSPort, {
        select: ["port_Id", "portName"],
        where: { userProduct_Id: userInfo.userProduct_Id, enable: 1 }
      });
      this.info.result = true;
      this.info.data = dataList;
    } catch (e) {
      this.info.result = false;
      this.info.msg = e.message;
    }
    ctx.body = this.info;
  }
  //#endregion
}