|
|
|
@ -380,7 +380,7 @@ export class AppController {
|
|
|
|
async getVisiotr(@Query() { identity_card_no, area_code }: QueryVisitorByNumberDto, @Req() req: any) {
|
|
|
|
async getVisiotr(@Query() { identity_card_no, area_code }: QueryVisitorByNumberDto, @Req() req: any) {
|
|
|
|
let date = new Date().toDateString();
|
|
|
|
let date = new Date().toDateString();
|
|
|
|
let node_other_visitor;
|
|
|
|
let node_other_visitor;
|
|
|
|
const where: any = { identity_card_no, end_time: IsNull() };
|
|
|
|
const where: any = { identity_card_no, end_time: IsNull() };
|
|
|
|
if (area_code) {
|
|
|
|
if (area_code) {
|
|
|
|
where.to_area_code = area_code;
|
|
|
|
where.to_area_code = area_code;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -896,7 +896,12 @@ export class AppController {
|
|
|
|
.take(query_data.take)
|
|
|
|
.take(query_data.take)
|
|
|
|
.orderBy(order_key, order_value)
|
|
|
|
.orderBy(order_key, order_value)
|
|
|
|
.getManyAndCount();
|
|
|
|
.getManyAndCount();
|
|
|
|
return { list, count }
|
|
|
|
const new_list = await bluebird.map(list, async (item) => {
|
|
|
|
|
|
|
|
const result = await this.areaRepository.findOne({ where: { id: item.area_id } })
|
|
|
|
|
|
|
|
item.area = result;
|
|
|
|
|
|
|
|
return item;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return { list: new_list, count }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Put("/visitor/number")
|
|
|
|
@Put("/visitor/number")
|
|
|
|
|