From 132262bb2d6d7169a08280522a0948a8777796d0 Mon Sep 17 00:00:00 2001 From: 张磊磊 <201175954@qq.com> Date: 星期四, 02 十一月 2023 09:50:10 +0800 Subject: [PATCH] 更改接口名称 --- hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/service/impl/HelmetServiceImpl.java | 80 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 78 insertions(+), 2 deletions(-) diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/service/impl/HelmetServiceImpl.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/service/impl/HelmetServiceImpl.java index 5cad1aa..c98c12e 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/service/impl/HelmetServiceImpl.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/service/impl/HelmetServiceImpl.java @@ -1,5 +1,6 @@ package com.thhy.materials.modules.biz.helmet.service.impl; +import com.alibaba.fastjson.JSONObject; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.thhy.general.common.BasicResult; @@ -112,10 +113,10 @@ } @Override - public BasicResult dataValueInsert(Map<String, Object> values) { + public BasicResult dataValueIn(Map<String, Object> values) { - helmetMapper.dataValueInsert(values); + helmetMapper.dataValueIn(values); return BasicResult.success(); } @@ -159,4 +160,79 @@ PageInfo<TDataValue> tDataValuePageInfo = new PageInfo<>(dataSmocks); return BasicResult.success(tDataValuePageInfo); } + + @Override + public BasicResult dataBox(JSONObject result) { + + Integer type = Integer.valueOf(result.get("type").toString()); + + TDataAi tDataAi = new TDataAi(); + //公共参数 + tDataAi.setType(type); + tDataAi.setTypeName(result.get("typeName").toString()); + tDataAi.setRtspUrl(result.getString("rtspUrl")); + tDataAi.setBoxId(Integer.valueOf(result.get("boxId").toString())); + tDataAi.setBoxName(result.get("boxName").toString()); + tDataAi.setDeviceName(result.get("deviceName").toString()); + tDataAi.setDeviceId(result.get("deviceId").toString()); + tDataAi.setEnterName(result.get("enterName").toString()); + tDataAi.setEnterCode(result.get("enterCode").toString()); + //图片上传 + + //上边缺少图片处理 + tDataAi.setSignTime(result.get("signTime").toString()); + tDataAi.setChannelNo(result.get("channelNo").toString()); + tDataAi.setX(result.getIntValue("x")); + tDataAi.setY(result.getIntValue("y")); + tDataAi.setW(result.getIntValue("w")); + tDataAi.setH(result.getIntValue("h")); + + if(type==1){//人脸 + tDataAi.setAge(result.getIntValue("age")); + tDataAi.setGender(result.getIntValue("gender")); + tDataAi.setGlasses(result.getIntValue("glasses")); + tDataAi.setMask(result.getIntValue("mask")); + //人脸照片 base64 (需要解密) + tDataAi.setCertifiedAvatarUrl(result.getString("certifiedAvatarURL")); + + tDataAi.setFaceId(result.getIntValue("faceId")); + tDataAi.setPersonType(result.getIntValue("personType")); + tDataAi.setFaceMaxSorce(result.getString("faceMaxSorce")); + tDataAi.setPersonName(result.getString("personName")); + + + }else if(type==2){//人体 + + + + + }else if(type==3){//车辆 + tDataAi.setLicensePlateNumber(result.getString("licensePlateNumber")); + tDataAi.setIllegalParking(result.getIntValue("illegalParking")); + + }else if(type==4){//电动车 + tDataAi.setEBike(result.getIntValue("eBike")); + }else if(type==5){//烟火 + tDataAi.setSmoke(result.getIntValue("smoke")); + tDataAi.setFire(result.getIntValue("fire")); + + }else if(type==6){//离岗 + tDataAi.setIsExist(result.getIntValue("isExist")); + }else if(type==8){//灭火器 + tDataAi.setExt(result.getIntValue("ext")); + }else if(type==10){//油罐车 + tDataAi.setTanker(result.getIntValue("tanker")); + }else if(type==16){//睡岗 + // + + } else if(type==23){//杂物堆积 + tDataAi.setSudire(result.getIntValue("sudire")); + }else if(type==24){//摄像头遮挡 + tDataAi.setCover(result.getIntValue("cover")); + }else if(type==26){//消防通道占用 + tDataAi.setFireControl(result.getIntValue("fireControl")); + } + helmetMapper.dataBox(tDataAi); + return BasicResult.success(); + } } -- Gitblit v1.9.3