Commit bf5ad022 authored by 廖旭伟's avatar 廖旭伟

增加办事情形接口:judgmentExist

parent 78529e57
...@@ -345,6 +345,38 @@ public class ComplexApiController { ...@@ -345,6 +345,38 @@ public class ComplexApiController {
} }
} }
/**
* 查询办理事项情形
*
* @param req
* @return
*/
@PostMapping("bus-situation-material/judgmentExist")
@UnAuth
public String judgmentExist(@RequestBody ComplexImplementationReq req) {
log.info("【查询办理事项情形】【请求体】--> " + JSONObject.toJSONString(req));
req.setUrlPath("bus-situation-material/judgmentExist");
ApiResp<String> rsp = new ApiResp<>();
rsp.setMsg(ApiRespCodeEnum.SUCCESS.getLabel());
rsp.setCode(ApiRespCodeEnum.SUCCESS.getValue());
try {
req.setNonce(RandomUtil.randomNumbers(6));
cacheService.lpush(KEY_COMPLEX_REQ, JSONObject.toJSONString(req));
String rest = cacheService.blpop(KEY_EVENT_IMPLEMENTATION_RESP + req.getNonce(), HTTP_TIMEOUT, String.class);
if (ObjectUtil.isEmpty(rest)) {
throw new AppException("请求访问超时");
}
Rest<ComplexStituationInfo> eventRest = JSON.parseObject(rest, new TypeReference<Rest<ComplexStituationInfo>>() {
});
return JSON.toJSONString(eventRest);
} catch (Exception e) {
log.error("接收数据失败", e);
rsp.setCode(ApiRespCodeEnum.FAILED.getValue());
rsp.setMsg(e.getMessage());
return JSON.toJSONString(rsp);
}
}
public static void main(String[] args) { public static void main(String[] args) {
File file = new File("E:\\pic\\1.png"); File file = new File("E:\\pic\\1.png");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment