You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
3.4 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.example.zxweb.controller;
import com.alibaba.fastjson.JSONObject;
import com.example.zxweb.common.api.vo.Result;
import com.example.zxweb.common.constant.enums.IotApiPathsEnum;
import com.example.zxweb.utils.AssertUtils;
import com.example.zxweb.utils.IotUtils;
import com.example.zxweb.utils.RmsUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @Description 访客机
* @Author ZhouWenTao
* @Date 2023/9/8 13:16
*/
@RestController
@RequestMapping("/rms")
@Slf4j
@Api(tags = "访客机")
public class RmsController {
@ApiOperation(value = "访客查询")
@PostMapping(value = "/fkterminal/findAccessRecord")
public Result<?> fkterminalFindAccessRecord(@RequestBody JSONObject requestBody){
JSONObject responseBody = RmsUtils.fkterminalFindAccessRecord(requestBody);
if (responseBody.getInteger("code")!=0) {
return Result.error(responseBody.getString("msg"));
}
responseBody.remove("msg");
responseBody.remove("code");
responseBody.remove("success");
return Result.OK(responseBody);
}
@ApiOperation(value = "访客预约")
@PostMapping(value = "/sync/orderrecord")
public Result<?> syncOrderrecord(@RequestBody JSONObject requestBody){
JSONObject responseBody = RmsUtils.syncOrderrecord(requestBody);
if (responseBody.getInteger("code")!=0) {
return Result.error(responseBody.getString("msg"));
}
responseBody.remove("msg");
responseBody.remove("code");
responseBody.remove("success");
return Result.OK(responseBody);
}
@ApiOperation(value = "访客注销")
@PostMapping(value = "/fkterminal/recoverCard")
public Result<?> fkterminalRecoverCard(@RequestBody JSONObject requestBody){
JSONObject responseBody = RmsUtils.fkterminalRecoverCard(requestBody);
if (responseBody.getInteger("code")!=0) {
return Result.error(responseBody.getString("msg"));
}
responseBody.remove("msg");
responseBody.remove("code");
responseBody.remove("success");
return Result.OK(responseBody);
}
}
//content object 无
//content.id int 访客记录ID
//content.rcode string 打印/仅登记卡号
//content.cardnum string 发卡卡号
//content.createtime string 访客登记时间
//content.starttime string 访客登记开始时间
//content.endtime string 访客登记结束时间
//content.logofftime string 访客访问注销时间
//content.reasons string 来访事由
//content.unit string 来访单位
//content.sitePhoto string 现场照片url
//content.terminalCode string 登记设备编号
//content.status int 状态0进行中1超时注销2结束3预约未登记
//content.visitor object 访客对象
//name string 访客姓名
//sex string 性别0女1男
//nation string 民族
//address string 身份住址(已取消)
//idnumAdd string 证件号
//phoneAdd string 手机号
//photo string 证件照
//+user object 被访人
//nickname string 被访人姓名
//email string 系统账号
//photo string url照片
//phone string 手机号
//syncId string 第三方同步ID
//ecardNum string 卡号
//+vcar object 访客车辆实体对象
//cardnum string 车牌号
//success string ture/fals