| | |
| | | |
| | | @PostMapping |
| | | @ResponseBody |
| | | public ApiV1Resp<Object> gateway(@RequestBody ApiV1Req<JSONObject> req) { |
| | | public ApiV1Resp<Object> gateway(@RequestBody ApiV1Req<Object> req) { |
| | | |
| | | log.info("质押监管接口V1,收到库区网关信息={}", req); |
| | | log.debug("质押监管接口V1,收到库区网关信息={}", req); |
| | | try { |
| | | |
| | | //参数校验 |
| | |
| | | super(); |
| | | } |
| | | |
| | | public ApiV1Resp(String respCode, String respMsg, T data, ApiV1Req<JSONObject> req) { |
| | | public ApiV1Resp(String respCode, String respMsg, T data, ApiV1Req<Object> req) { |
| | | this.data = data; |
| | | this.sn = req.getSn(); |
| | | this.auth = req.getAuth(); |
| | |
| | | this.respMsg = respMsg; |
| | | } |
| | | |
| | | public static ApiV1Resp<Object> success(Object data, ApiV1Req<JSONObject> req) { |
| | | public static ApiV1Resp<Object> success(Object data, ApiV1Req<Object> req) { |
| | | return new ApiV1Resp<>(CODE_SUCCESS, null, data, req); |
| | | } |
| | | |
| | | public static ApiV1Resp<Object> error(String respMsg, ApiV1Req<JSONObject> req) { |
| | | public static ApiV1Resp<Object> error(String respMsg, ApiV1Req<Object> req) { |
| | | return new ApiV1Resp<>(CODE_ERROR, respMsg, null, req); |
| | | } |
| | | |
| | |
| | | * @param gatewaySer |
| | | * @return |
| | | */ |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<JSONObject> req, GatewaySer gatewaySer) { |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<Object> req, GatewaySer gatewaySer) { |
| | | |
| | | Date end = new Date(); |
| | | Date start = gatewaySer.getHeartbeatTime(); |
| | |
| | | * @param gatewaySer |
| | | * @return |
| | | */ |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<JSONObject> req, GatewaySer gatewaySer) { |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<Object> req, GatewaySer gatewaySer) { |
| | | |
| | | //获取库区下所有抓拍配置 |
| | | List<SnapConf> list = snapConfService.selectList(gatewaySer.getDeptId()); |
| | |
| | | * @param gatewaySer |
| | | * @return |
| | | */ |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<JSONObject> req, GatewaySer gatewaySer) { |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<Object> req, GatewaySer gatewaySer) { |
| | | |
| | | //获取库区下所有监控信息 |
| | | List<Camera> list = cameraService.getCameraByDeptId(gatewaySer.getCompanyId(), gatewaySer.getDeptId()); |
| | |
| | | * @param gatewaySer |
| | | * @return |
| | | */ |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<JSONObject> req, GatewaySer gatewaySer) { |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<Object> req, GatewaySer gatewaySer) { |
| | | |
| | | //获取库区下所有出入库设备 |
| | | List<InoutConf> list = inoutConfService.getCacheInoutConf(gatewaySer.getCompanyId(), gatewaySer.getDeptId()); |
| | |
| | | * @param gatewaySer |
| | | * @return |
| | | */ |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<JSONObject> req, GatewaySer gatewaySer) throws Exception{ |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<Object> req, GatewaySer gatewaySer) throws Exception{ |
| | | |
| | | //转化为对象 |
| | | List<Param3030> list = JSONObject.parseArray(req.getData().toString(), Param3030.class); |
| | |
| | | * @param gatewaySer |
| | | * @return |
| | | */ |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<JSONObject> req, GatewaySer gatewaySer) throws Exception { |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<Object> req, GatewaySer gatewaySer) throws Exception { |
| | | |
| | | //转化为对象 |
| | | List<Param3031> list = JSONObject.parseArray(req.getData().toString(), Param3031.class); |
| | |
| | | * @param gatewaySer |
| | | * @return |
| | | */ |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<JSONObject> req, GatewaySer gatewaySer) { |
| | | public ApiV1Resp<Object> analysis(ApiV1Req<Object> req, GatewaySer gatewaySer) { |
| | | |
| | | //转化为对象 |
| | | Param3032 param = JSONObject.parseObject(req.getData().toString(), Param3032.class); |
| | | Param3032 param = JSONObject.parseObject(JSONObject.toJSONString(req.getData()), Param3032.class); |
| | | |
| | | if (null == param || StringUtils.isBlank(param.getFileName()) || StringUtils.isEmpty(param.getImgBase64())) { |
| | | return ApiV1Resp.error("抓拍信息为空,不解析!", req); |
| | |
| | | package com.fzzy.init; |
| | | |
| | | import com.fzzy.igds.ServerRunner; |
| | | import com.fzzy.igds.domain.Dept; |
| | | import com.fzzy.igds.service.*; |
| | | import com.ruoyi.system.service.ISysCompanyService; |
| | |
| | | import org.springframework.boot.CommandLineRunner; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | private InoutConfService inoutConfService; |
| | | @Resource |
| | | private SecCameraService secCameraService; |
| | | @Resource |
| | | private SnapConfService snapConfService; |
| | | |
| | | |
| | | @Override |
| | | public void run(String... args) throws Exception { |