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 |  105 ++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 101 insertions(+), 4 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 eb38b37..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;
@@ -8,6 +9,7 @@
 import com.thhy.materials.modules.biz.helmet.mapper.HelmetMapper;
 import com.thhy.materials.modules.biz.helmet.service.HelmetService;
 import org.springframework.stereotype.Service;
+import sun.misc.Cache;
 
 import javax.annotation.Resource;
 import java.util.HashMap;
@@ -111,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();
     }
 
@@ -134,8 +136,103 @@
     }
 
     @Override
-    public void smockInsert(TDataSmock tDataSmock) {
+    public void smockIn(TDataSmock tDataSmock) {
         System.out.println("参数为---"+tDataSmock.toString());
-        helmetMapper.smockInsert(tDataSmock);
+        helmetMapper.smockIn(tDataSmock);
+    }
+
+    @Override
+    public BasicResult dataSmockList(Map<String, Object> values) {
+        Integer pageSize = Integer.valueOf(values.get("pageSize").toString());
+        Integer pageNum = Integer.valueOf(values.get("pageNum").toString());
+        PageHelper.startPage(pageNum,pageSize);
+        List<TDataSmock> dataSmocks = helmetMapper.dataSmockList(values);
+        PageInfo<TDataSmock> tDataSmockPageInfo = new PageInfo<>(dataSmocks);
+        return BasicResult.success(tDataSmockPageInfo);
+    }
+
+    @Override
+    public BasicResult dataValuesList(Map<String, Object> values) {
+        Integer pageSize = Integer.valueOf(values.get("pageSize").toString());
+        Integer pageNum = Integer.valueOf(values.get("pageNum").toString());
+        PageHelper.startPage(pageNum,pageSize);
+        List<TDataValue> dataSmocks = helmetMapper.dataValuesList(values);
+        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