|
|
|
|
@ -60,6 +60,13 @@ export class UpdateVisitorNumber {
|
|
|
|
|
public card_number: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class UpdateVisitorEnd {
|
|
|
|
|
@ApiProperty({ description: "id" })
|
|
|
|
|
@IsString()
|
|
|
|
|
@IsNotEmpty()
|
|
|
|
|
public id: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class CreateVisitor {
|
|
|
|
|
@ApiProperty({ description: "申请人" })
|
|
|
|
|
@IsString()
|
|
|
|
|
@ -371,6 +378,28 @@ export class AppController {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Put("/visitor/end")
|
|
|
|
|
async updateVisitorEnd(@Body() data: UpdateVisitorEnd) {
|
|
|
|
|
const node_other_visitor = await this.nodeOtherVisitorRepository.findOne({ where: { id: data.id } })
|
|
|
|
|
if (!node_other_visitor) {
|
|
|
|
|
throw new BadRequestException("数据不存在")
|
|
|
|
|
}
|
|
|
|
|
node_other_visitor.end_time= new Date();
|
|
|
|
|
const result = await this.nodeOtherVisitorRepository.save(node_other_visitor);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Put("/visitor/start")
|
|
|
|
|
async updateVisitorStart(@Body() data: UpdateVisitorEnd) {
|
|
|
|
|
const node_other_visitor = await this.nodeOtherVisitorRepository.findOne({ where: { id: data.id } })
|
|
|
|
|
if (!node_other_visitor) {
|
|
|
|
|
throw new BadRequestException("数据不存在")
|
|
|
|
|
}
|
|
|
|
|
node_other_visitor.start_time = new Date();
|
|
|
|
|
const result = await this.nodeOtherVisitorRepository.save(node_other_visitor);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Post('upload/base64')
|
|
|
|
|
async louploadBase64Filegin(
|
|
|
|
|
@Body() input: any,
|
|
|
|
|
|