Browse Source

Merge remote-tracking branch 'origin/master'

zhuoning 3 years ago
parent
commit
c788bcfcc9
15 changed files with 530 additions and 38 deletions
  1. 20 0
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/controller/IccChannelController.java
  2. 19 0
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/controller/IccEventRecordController.java
  3. 21 3
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/dhicc/newcontroller/VideoRecorController.java
  4. 38 33
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/dhicc/screen/ScreenCarController.java
  5. 0 1
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/dhicc/screen/ScreenPersonController.java
  6. 134 1
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/dhicc/screen/ScreenSiZhuController.java
  7. 35 0
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/entity/IccChannel.java
  8. 95 0
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/entity/IccEventRecord.java
  9. 17 0
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/mapper/IccChannelMapper.java
  10. 17 0
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/mapper/IccEventRecordMapper.java
  11. 16 0
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/service/IIccChannelService.java
  12. 18 0
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/service/IIccEventRecordService.java
  13. 21 0
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/service/impl/IccChannelServiceImpl.java
  14. 21 0
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/service/impl/IccEventRecordServiceImpl.java
  15. 58 0
      huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/timer/SaveEventFromEventTimmer.java

+ 20 - 0
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/controller/IccChannelController.java

@@ -0,0 +1,20 @@
+package com.huimv.produce.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2021-12-06
+ */
+@RestController
+@RequestMapping("/icc-channel")
+public class IccChannelController {
+
+}

+ 19 - 0
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/controller/IccEventRecordController.java

@@ -0,0 +1,19 @@
+package com.huimv.produce.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2021-12-06
+ */
+@RestController
+@RequestMapping("/icc-event-record")
+public class IccEventRecordController {
+
+}

+ 21 - 3
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/dhicc/newcontroller/VideoRecorController.java

@@ -3,6 +3,8 @@ package com.huimv.produce.dhicc.newcontroller;
 //拿视频回放
 
 import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.dahuatech.hutool.http.Method;
 import com.dahuatech.icc.exception.ClientException;
 import com.dahuatech.icc.oauth.http.DefaultClient;
@@ -10,7 +12,12 @@ import com.dahuatech.icc.oauth.http.IClient;
 import com.dahuatech.icc.oauth.model.v202010.GeneralRequest;
 import com.dahuatech.icc.oauth.model.v202010.GeneralResponse;
 
+import com.huimv.produce.entity.BaseTelecomRoom;
+import com.huimv.produce.entity.IccChannel;
+import com.huimv.produce.mapper.IccChannelMapper;
+import com.huimv.produce.service.IIccChannelService;
 import net.sf.json.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -29,11 +36,20 @@ import com.huimv.produce.dhicc.result.R;
 @CrossOrigin
 public class VideoRecorController {
 
+    @Autowired
+     private IIccChannelService  iIccChannelService;
+
+    @Autowired
+    private  IccChannelMapper iccChannelMapper  ;
+
+
     @RequestMapping("/getVideoRecord")
     public R getVideoRecord(@RequestBody Map<String, Object> params1) throws ClientException, ParseException {
         String happendTime = (String) params1.get("happendTime");
-        String channelId = (String) params1.get("channelId");
-
+        String channelNmae = (String) params1.get("channelName");
+        LambdaQueryWrapper<IccChannel> wrapper3 = Wrappers.lambdaQuery();
+        wrapper3.eq(IccChannel::getChannelName, channelNmae);
+        IccChannel iccChannel = iccChannelMapper.selectOne(wrapper3);
         String URL = "/evo-apigw/admin/API/SS/Playback/StartPlaybackByTime";  //获取事件URL    post请求
         IClient iClient = new DefaultClient();
         GeneralRequest generalRequest = new GeneralRequest(URL, Method.POST);
@@ -45,7 +61,8 @@ public class VideoRecorController {
         value.put("recordType","1");
         value.put("streamType","1");
         value.put("recordSource","2");
-        value.put("channelId",channelId);
+        value.put("channelId",iccChannel.getChannelId());
+        System.out.println(iccChannel.toString());
          //开始结束时间代为处理
         DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         //格式化传入的时间---拿传入时间前后五分钟的视频
@@ -62,6 +79,7 @@ public class VideoRecorController {
         params.put("method","SS.Playback.StartPlaybackByTime");
         params.put("data",value);
         generalRequest.body(JSON.toJSONString(params));
+        System.out.println(JSON.toJSONString(params));
         //这种已经在配置文件里面安排了账号ip以及密码
         generalRequest.header("Content-Type", " application/json");
         //发起请求处理应答

+ 38 - 33
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/dhicc/screen/ScreenCarController.java

@@ -19,6 +19,37 @@ import com.huimv.produce.dhicc.result.R;
 //没有连接ICC的数据库  所以操作比较麻烦
 public class ScreenCarController {
 
+/*
+    @RequestMapping("/CountCarPassNumber")
+    public  R  ddgetCarRecord(HttpServletRequest request ) throws ClientException {
+        GetResponse getResponse = new GetResponse();
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Calendar c = Calendar.getInstance();
+        Date date = new Date();
+        c.setTime(date);
+        c.set(Calendar.HOUR_OF_DAY, 0);
+        c.set(Calendar.MINUTE, 0);
+        c.set(Calendar.SECOND, 0);
+
+        c.add(Calendar.DATE, +1);
+
+
+
+
+
+
+
+
+        Collections.reverse(result);
+        return  R.ok("请求成功").put("data", result );
+
+    }*/
+
+
+
+
+
+
     //过车的数据//这个是车辆闸机的过车数据
     /**
      * 应该优化一下放到表里面去  不然的话这样请求一整页的数据会很慢
@@ -122,47 +153,21 @@ public class ScreenCarController {
         return date1;
     }
 
-    public static void main(String[] args) {
-        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        Calendar c = Calendar.getInstance();
-        Date date = new Date();
-        c.setTime(date);
-        c.set(Calendar.HOUR_OF_DAY, 0);
-        c.set(Calendar.MINUTE, 0);
-        c.set(Calendar.SECOND, 0);
 
-        c.add(Calendar.DATE, +1);
-        Date A = c.getTime();
-        System.out.println(format.format(A));
 
-        c.add(Calendar.DATE, -1);
-        Date B = c.getTime();
-        System.out.println(format.format(B));
 
-        c.add(Calendar.DATE, -1);
-        Date C = c.getTime();
-        System.out.println(format.format(C));
 
-        c.add(Calendar.DATE, -1);
-        Date D = c.getTime();
-        System.out.println(format.format(D));
 
-        c.add(Calendar.DATE, -1);
-        Date E = c.getTime();
-        System.out.println(format.format(E));
 
-        c.add(Calendar.DATE, -1);
-        Date F = c.getTime();
-        System.out.println(format.format(F));
 
-        c.add(Calendar.DATE, -1);
-        Date G = c.getTime();
-        System.out.println(format.format(G));
 
-        c.add(Calendar.DATE, -1);
-        Date H = c.getTime();
-        System.out.println(format.format(H));
 
-    }
+
+
+
+
+
+
+
 
 }

+ 0 - 1
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/dhicc/screen/ScreenPersonController.java

@@ -29,7 +29,6 @@ public class ScreenPersonController {
         c.set(Calendar.MINUTE, 0);
         c.set(Calendar.SECOND, 0);
 
-
         c.add(Calendar.HOUR, +2);
         Date A = c.getTime();
         String formatA = format.format(A);

+ 134 - 1
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/dhicc/screen/ScreenSiZhuController.java

@@ -33,7 +33,6 @@ public class ScreenSiZhuController {
          */
         @RequestMapping("/count_sizhu_record")
         public R count_sizhu_record(HttpServletRequest request) throws ClientException, ParseException {
-
             List result = new ArrayList();
             Map map1 = new HashMap();
             map1.put("value1", getPastSevenDay());
@@ -43,6 +42,37 @@ public class ScreenSiZhuController {
         }
 
 
+
+    /**
+     * xuyao   直接都写在这里了
+     *
+     * @param request
+     * @return  查询事件
+     * @throws ClientException
+     * @throws ParseException
+     * 写一个查左右的  事件都拿过来 存起来 建新的表来处理
+     */
+    @RequestMapping("/SiZhuList")
+    public R SiZhuList(HttpServletRequest request) throws ClientException, ParseException {
+        return R.ok("请求成功").put("data", getSiZhuList());
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
          //过去七天的值
         public String getPastSevenDay(  ) throws ClientException {
             GetResponse getResponse = new GetResponse();
@@ -185,6 +215,109 @@ public class ScreenSiZhuController {
              }
 
 
+
+    //最新一条的数据
+    public GeneralResponse getSiZhuList( ) throws ClientException {
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Calendar c = Calendar.getInstance();
+        Date date = new Date();
+        c.setTime(date);
+        c.set(Calendar.HOUR, 0);
+        c.set(Calendar.MINUTE, 0);
+        c.set(Calendar.SECOND, 0);
+        Date A = c.getTime();
+        String formatA = format.format(A);
+        c.set(Calendar.HOUR, +24);
+        Date d = c.getTime();
+        String formatD = format.format(d);
+        Map<String, Object> params = new HashMap<>();
+        params.put("alarmStartDateString",formatA);
+        params.put("alarmEndDateString",formatD);
+        params.put("pageNum",1);
+        params.put("pageSize",10);
+        params.put("alarmType",303);
+        params.put("dbType",0);
+        params.put("deviceCategory",1);
+        String[]  nodeCodeList=  new String[64];
+        nodeCodeList[0]="1002874$1$0$0"    ;
+        nodeCodeList[1]="1002875$1$0$0"      ;
+        nodeCodeList[0]="1002876$1$0$0"     ;
+        nodeCodeList[0]="1002877$1$0$0"       ;
+        nodeCodeList[0]="1002878$1$0$0"      ;
+        nodeCodeList[0]="1002879$1$0$0"     ;
+        nodeCodeList[0]="1002880$1$0$0"      ;
+        nodeCodeList[0]="1002881$1$0$0"      ;
+        nodeCodeList[0]="1002882$1$0$0"     ;
+        nodeCodeList[0]="1002883$1$0$0"    ;
+        nodeCodeList[10]="1002884$1$0$0"   ;
+        nodeCodeList[11]="1002885$1$0$0"   ;
+        nodeCodeList[12]="1002886$1$0$0"      ;
+        nodeCodeList[13]="1002887$1$0$0"     ;
+        nodeCodeList[14]="1002888$1$0$0"     ;
+        nodeCodeList[15]="1002889$1$0$0"   ;
+        nodeCodeList[16]="1002890$1$0$0"   ;
+        nodeCodeList[17]="1002891$1$0$0"   ;
+        nodeCodeList[18]="1002892$1$0$0"   ;
+        nodeCodeList[19]="1002893$1$0$0"     ;
+        nodeCodeList[20]="1002894$1$0$0"     ;
+        nodeCodeList[21]="1002895$1$0$0"    ;
+        nodeCodeList[22]="1002896$1$0$0"      ;
+        nodeCodeList[23]="1002897$1$0$0"      ;
+        nodeCodeList[24]="1002898$1$0$0"   ;
+        nodeCodeList[25]="1002899$1$0$0"     ;
+        nodeCodeList[26]="1002900$1$0$0"      ;
+        nodeCodeList[27]= "1002901$1$0$0"     ;
+        nodeCodeList[28]="1002902$1$0$0"       ;
+        nodeCodeList[29]="1002903$1$0$0"     ;
+        nodeCodeList[30]="1002904$1$0$0"     ;
+        nodeCodeList[31]="1002905$1$0$0"    ;
+        nodeCodeList[32]="1002906$1$0$0"     ;
+        nodeCodeList[33]="1002907$1$0$0"     ;
+        nodeCodeList[34]="1002908$1$0$0"     ;
+        nodeCodeList[35]="1002909$1$0$0"    ;
+        nodeCodeList[36]="1002910$1$0$0"     ;
+        nodeCodeList[37]="1002911$1$0$0"    ;
+        nodeCodeList[38]="1002912$1$0$0"    ;
+        nodeCodeList[39]="1002913$1$0$0"    ;
+        nodeCodeList[40]="1002939$1$0$0"     ;
+        nodeCodeList[41]="1002939$1$0$1"   ;
+        nodeCodeList[42]="1002939$1$0$2"   ;
+        nodeCodeList[43]="1002939$1$0$3"    ;
+        nodeCodeList[44]="1002939$1$0$4"    ;
+        nodeCodeList[45]="1002939$1$0$5"     ;
+        nodeCodeList[46]="1002939$1$0$6"      ;
+        nodeCodeList[47]="1002939$1$0$7"   ;
+        nodeCodeList[48]="1002939$1$0$8"   ;
+        nodeCodeList[49]="1002939$1$0$9"    ;
+        nodeCodeList[50]="1002940$1$0$0"     ;
+        nodeCodeList[51]="1002940$1$0$1"   ;
+        nodeCodeList[52]="1002940$1$0$2";
+        nodeCodeList[53]="1002940$1$0$3";
+        nodeCodeList[54]="1002940$1$0$4";
+        nodeCodeList[55]="1002940$1$0$5";
+        nodeCodeList[56]="1002940$1$0$6";
+        nodeCodeList[57]="1002940$1$0$7";
+        nodeCodeList[58]="1002939$1$0$10";
+        nodeCodeList[59]="1002939$1$0$11";
+        nodeCodeList[60]="1002939$1$0$12";
+        nodeCodeList[61]="1002939$1$0$13";
+        nodeCodeList[62]="1002939$1$0$14";
+        nodeCodeList[63]="1002939$1$0$15";
+        params.put("nodeCodeList",nodeCodeList);
+       // String URL = "/evo-apigw/evo-event/1.2.0/alarm-record/page"; //获取事件URL    post请求
+        String URL = "/evo-apigw/evo-event/1.2.0/alarm-record/page";  //获取事件URL    post请求
+        IClient iClient = new DefaultClient();
+        String NewUrl = URL ;
+        //这种已经在配置文件里面安排了账号ip以及密码
+        GeneralRequest generalRequest = new GeneralRequest(NewUrl, Method.POST);
+        System.out.println(NewUrl);
+        generalRequest.header("Content-Type", " application/json");
+        generalRequest.body(JSON.toJSONString(params));
+        GeneralResponse generalResponse = iClient.doAction(generalRequest, generalRequest.getResponseClass());
+        return    generalResponse;
+    }
+
+
     }
 
 

+ 35 - 0
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/entity/IccChannel.java

@@ -0,0 +1,35 @@
+package com.huimv.produce.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2021-12-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+public class IccChannel extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    private String channelName;
+
+    private String channelId;
+
+    private String remark;
+
+
+}

+ 95 - 0
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/entity/IccEventRecord.java

@@ -0,0 +1,95 @@
+package com.huimv.produce.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2021-12-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+public class IccEventRecord extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    private Integer eventId;
+
+    @TableField("alarmStat")
+    private Integer alarmStat;
+
+    @TableField("alarmTypeName")
+    private String alarmTypeName;
+
+    @TableField("alarmDate")
+    private LocalDateTime alarmDate;
+
+    @TableField("handleStat")
+    private Integer handleStat;
+
+    @TableField("alarmCode")
+    private String alarmCode;
+
+    @TableField("orgName")
+    private String orgName;
+
+    @TableField("alarmPosition")
+    private Integer alarmPosition;
+
+    @TableField("linkNames")
+    private String linkNames;
+
+    @TableField("alarmGrade")
+    private Integer alarmGrade;
+
+    @TableField("nodeCode")
+    private String nodeCode;
+
+    @TableField("alarmType")
+    private Integer alarmType;
+
+    @TableField("isEvent")
+    private Integer isEvent;
+
+    @TableField("alarmPicture")
+    private String alarmPicture;
+
+    @TableField("deviceCategory")
+    private Integer deviceCategory;
+
+    @TableField("orgCode")
+    private String orgCode;
+
+    @TableField("taskWebName")
+    private String taskWebName;
+
+    @TableField("alarmWebUrl")
+    private String alarmWebUrl;
+
+    @TableField("alarmAppUrl")
+    private String alarmAppUrl;
+
+    @TableField("taskWebUrl")
+    private String taskWebUrl;
+
+    @TableField("taskAppUrl")
+    private String taskAppUrl;
+
+    private Integer handel;
+
+
+}

+ 17 - 0
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/mapper/IccChannelMapper.java

@@ -0,0 +1,17 @@
+package com.huimv.produce.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.huimv.produce.entity.IccChannel;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2021-12-06
+ */
+public interface IccChannelMapper extends BaseMapper<IccChannel> {
+
+}

+ 17 - 0
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/mapper/IccEventRecordMapper.java

@@ -0,0 +1,17 @@
+package com.huimv.produce.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.huimv.produce.entity.IccEventRecord;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2021-12-06
+ */
+public interface IccEventRecordMapper extends BaseMapper<IccEventRecord> {
+
+}

+ 16 - 0
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/service/IIccChannelService.java

@@ -0,0 +1,16 @@
+package com.huimv.produce.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.huimv.produce.entity.IccChannel;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2021-12-06
+ */
+public interface IIccChannelService extends IService<IccChannel> {
+
+}

+ 18 - 0
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/service/IIccEventRecordService.java

@@ -0,0 +1,18 @@
+package com.huimv.produce.service;
+
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.huimv.produce.entity.IccEventRecord;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2021-12-06
+ */
+public interface IIccEventRecordService extends IService<IccEventRecord> {
+
+}

+ 21 - 0
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/service/impl/IccChannelServiceImpl.java

@@ -0,0 +1,21 @@
+package com.huimv.produce.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.huimv.produce.entity.IccChannel;
+import com.huimv.produce.mapper.IccChannelMapper;
+import com.huimv.produce.service.IIccChannelService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2021-12-06
+ */
+@Service
+public class IccChannelServiceImpl extends ServiceImpl<IccChannelMapper, IccChannel> implements IIccChannelService {
+
+}

+ 21 - 0
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/service/impl/IccEventRecordServiceImpl.java

@@ -0,0 +1,21 @@
+package com.huimv.produce.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.huimv.produce.entity.IccEventRecord;
+import com.huimv.produce.mapper.IccEventRecordMapper;
+import com.huimv.produce.service.IIccEventRecordService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2021-12-06
+ */
+@Service
+public class IccEventRecordServiceImpl extends ServiceImpl<IccEventRecordMapper, IccEventRecord> implements IIccEventRecordService {
+
+}

+ 58 - 0
huimv-farm-v2/huimv-produce-warning/src/main/java/com/huimv/produce/timer/SaveEventFromEventTimmer.java

@@ -0,0 +1,58 @@
+package com.huimv.produce.timer;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.huimv.produce.entity.SysTelecom;
+import com.huimv.produce.mapper.SysTelecomMapper;
+import com.huimv.produce.service.ISysTelecomEventService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+
+
+/**
+ * 从ICC将报警信息拿到本地数据库
+ */
+@Component
+public class SaveEventFromEventTimmer {
+
+
+
+    @Autowired
+    private SysTelecomMapper sysTelecomMapper;
+
+    @Autowired
+    private ISysTelecomEventService sysTelecomEventService;
+
+
+
+    //每小时执行一次
+    @Scheduled(cron = " 0 */59 * * * ?")
+    private void updateBox() {
+
+
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        LambdaQueryWrapper<SysTelecom> lambdaQueryWrapper =
+                new LambdaQueryWrapper<>();
+
+
+
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}