333
schangxiang@126.com
2025-09-19 18966e02fb573c7e2bb0c6426ed792b38b910940
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
import { Post } from "egg-shell-decorators";
import BaseController from "../baseController";
import { TMSWayBill } from "../../entity/express/tms/tmsWayBill";
import { In } from "typeorm";
 
/**
 * 到货库存
 */
export default class BillArrivalController extends BaseController {
  //#region sign
  /**
   * 签到
   */
  @Post()
  public async sign() {
    let { ctx } = this;
    let body = ctx.request.body;
    let userInfo = await ctx.helper.userInfo(); // 权限
    try {
      let IDs = body.wayBill_Ids;
 
      await this.dbWrite.update(
        TMSWayBill,
        {
          userProduct_Id: userInfo.userProduct_Id,
          wayBill_Id: In(IDs)
        },
        {
          orderStatus: "已签收"
        }
      );
      this.info.result = true;
      ctx.body = this.info;
    } catch (ex) {
      let msg = "异常错误信息:" + ex.message;
      this.info.result = false;
      this.info.msg = msg;
      ctx.body = this.info;
    }
  }
  //#endregion
}