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
|
}
|