523096025 пре 6 месеци
родитељ
комит
60a3b0d387

+ 1 - 1
huimv-admin/pom.xml

@@ -77,7 +77,7 @@
         <dependency>
         <dependency>
             <groupId>cn.hutool</groupId>
             <groupId>cn.hutool</groupId>
             <artifactId>hutool-all</artifactId>
             <artifactId>hutool-all</artifactId>
-            <version>5.7.11</version>
+            <version>5.8.26</version>
         </dependency>
         </dependency>
         <dependency>
         <dependency>
             <groupId>com.baomidou</groupId>
             <groupId>com.baomidou</groupId>

+ 20 - 0
huimv-admin/src/main/java/com/huimv/guowei/admin/controller/FootRawDataController.java

@@ -0,0 +1,20 @@
+package com.huimv.guowei.admin.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author author
+ * @since 2024-11-01
+ */
+@RestController
+@RequestMapping("/foot-raw-data")
+public class FootRawDataController {
+
+}

+ 40 - 0
huimv-admin/src/main/java/com/huimv/guowei/admin/entity/FootRawData.java

@@ -0,0 +1,40 @@
+package com.huimv.guowei.admin.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author author
+ * @since 2024-11-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("foot_raw_data")
+public class FootRawData implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    private String data;
+
+    private LocalDateTime dateTime;
+
+    private String tian;
+
+    private String epc;
+
+
+}

+ 16 - 0
huimv-admin/src/main/java/com/huimv/guowei/admin/mapper/FootRawDataMapper.java

@@ -0,0 +1,16 @@
+package com.huimv.guowei.admin.mapper;
+
+import com.huimv.guowei.admin.entity.FootRawData;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author author
+ * @since 2024-11-01
+ */
+public interface FootRawDataMapper extends BaseMapper<FootRawData> {
+
+}

+ 16 - 0
huimv-admin/src/main/java/com/huimv/guowei/admin/service/IFootRawDataService.java

@@ -0,0 +1,16 @@
+package com.huimv.guowei.admin.service;
+
+import com.huimv.guowei.admin.entity.FootRawData;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author author
+ * @since 2024-11-01
+ */
+public interface IFootRawDataService extends IService<FootRawData> {
+
+}

+ 20 - 0
huimv-admin/src/main/java/com/huimv/guowei/admin/service/impl/FootRawDataServiceImpl.java

@@ -0,0 +1,20 @@
+package com.huimv.guowei.admin.service.impl;
+
+import com.huimv.guowei.admin.entity.FootRawData;
+import com.huimv.guowei.admin.mapper.FootRawDataMapper;
+import com.huimv.guowei.admin.service.IFootRawDataService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author author
+ * @since 2024-11-01
+ */
+@Service
+public class FootRawDataServiceImpl extends ServiceImpl<FootRawDataMapper, FootRawData> implements IFootRawDataService {
+
+}

+ 59 - 0
huimv-admin/src/main/java/com/huimv/guowei/admin/timer/FootTimer.java

@@ -0,0 +1,59 @@
+package com.huimv.guowei.admin.timer;
+
+import cn.hutool.core.date.DateUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.huimv.guowei.admin.entity.FootRawData;
+import com.huimv.guowei.admin.group.entity.GroupAdvise;
+import com.huimv.guowei.admin.group.entity.GroupDuckInfo;
+import com.huimv.guowei.admin.group.entity.GroupThreshold;
+import com.huimv.guowei.admin.group.service.IGroupAdviseService;
+import com.huimv.guowei.admin.group.service.IGroupDuckInfoService;
+import com.huimv.guowei.admin.group.service.IGroupThresholdService;
+import com.huimv.guowei.admin.service.IFootRawDataService;
+import org.apache.xmlbeans.impl.xb.xsdschema.All;
+import org.checkerframework.checker.units.qual.A;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.List;
+
+@Component
+@EnableScheduling
+public class FootTimer {
+
+    @Autowired
+    private IGroupThresholdService thresholdService;
+    @Autowired
+    private IFootRawDataService footRawDataService;
+    @Autowired
+    private IGroupAdviseService groupAdviseService;
+    @Autowired
+    private IGroupDuckInfoService duckInfoService;
+
+
+    @Scheduled(cron = "0 */5 * * * ?")
+    private void saveOnlineDevice(){
+        GroupThreshold groupThreshold = thresholdService.getById(1);
+        List<GroupDuckInfo> duckInfoList = duckInfoService.list(new QueryWrapper<GroupDuckInfo>().eq("is_leave", 0));
+        for (GroupDuckInfo groupDuckInfo : duckInfoList) {
+            String deviceCode = groupDuckInfo.getDeviceCode();
+            int epc = footRawDataService.count(new QueryWrapper<FootRawData>().eq("epc", deviceCode).ge("date_time", DateUtil.offsetHour(new Date(),-(Integer.parseInt(groupThreshold.getTimes())))));
+            if (epc == 0 ){
+                GroupAdvise advise = new GroupAdvise();
+                advise.setBatchNum(groupDuckInfo.getBatchNum());
+                advise.setCreateTime(new Date());
+                advise.setDeviceCode(groupDuckInfo.getDeviceCode());
+                advise.setFarmId(groupDuckInfo.getFarmId());
+                advise.setType(1);
+                advise.setUnitId(groupDuckInfo.getUnitId());
+                advise.setUnitName(groupDuckInfo.getUnitName());
+                advise.setVersion("长时间未读取到脚环信息");
+                groupAdviseService.save(advise);
+            }
+        }
+    }
+
+}

+ 122 - 0
huimv-admin/src/main/java/com/huimv/guowei/admin/timer/Test.java

@@ -0,0 +1,122 @@
+package com.huimv.guowei.admin.timer;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.io.resource.ClassPathResource;
+import cn.hutool.core.lang.Console;
+import cn.hutool.core.text.csv.*;
+import cn.hutool.core.util.CharsetUtil;
+import cn.hutool.poi.excel.ExcelReader;
+import cn.hutool.poi.excel.ExcelUtil;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+/**
+ * @Project : huimv.shiwan
+ * @Package : com.huimv.guowei.admin.timer
+ * @Description : TODO
+ * @Author : yuxuexuan
+ * @Create : 2024-10-31 17:55
+ **/
+public class Test {
+//    public static void main(String[] args) {
+//        int[] ints = new int[]{231,223,1,2,132,1324,321,561,3};
+//        Filter filter = new Filter(ints,2,2,1);
+//        int[] data = filter.getData();
+//        for (int datum : data) {
+//            System.out.println(datum);
+//        }
+//
+//    }
+public static void main(String[] args) throws IOException {
+
+    String floderName = "997.5";
+//    String floderName = "1006";
+//    String floderName = "2011_2010.5";
+//    String floderName = "2983.5";
+//    String floderName = "3003";
+//    String floderName = "3003.5";
+    String folderPath = "E:\\微信文件\\WeChat Files\\wxid_amis4cr3v84x22\\FileStorage\\File\\2024-10\\电子秤采样数据\\"+floderName;
+
+    // 创建File对象表示文件夹
+    File folder = new File(folderPath);
+
+    // 检查该路径是否为一个文件夹
+    if (folder.isDirectory()) {
+        // 获取文件夹下的所有文件和子文件夹
+        File[] files = folder.listFiles();
+
+        if (files != null) {
+            // 遍历文件和子文件夹
+            for (File file : files) {
+                //是文件就计算
+                if (file.isFile()) {
+                    String fileName  =  file.getName();
+                    witerCsv(floderName,fileName);
+                    System.out.println(file.getName());
+                }
+                // 如果你也想打印子文件夹中的文件,可以在这里添加递归调用
+            }
+        } else {
+            System.out.println("该文件夹是空的或者无法读取内容。");
+        }
+    } else {
+        System.out.println("指定的路径不是一个文件夹。");
+    }
+
+}
+
+    private static void witerCsv(String folderName,String fileName) throws IOException {
+        String inputCsvFilePath = "E:\\微信文件\\WeChat Files\\wxid_amis4cr3v84x22\\FileStorage\\File\\2024-10\\电子秤采样数据\\"+folderName+"\\"+fileName;
+        // 输出CSV文件路径
+        String outputCsvFilePath = "E:\\微信文件\\WeChat Files\\wxid_amis4cr3v84x22\\FileStorage\\File\\2024-10\\电子秤采样数据\\"+folderName+"\\test\\"+fileName;
+
+        // 读取CSV文件
+
+        CsvReader reader = CsvUtil.getReader();
+        //从文件中读取CSV数据
+        CsvData data = reader.read(FileUtil.file(inputCsvFilePath));
+        List<CsvRow> rows = data.getRows();
+        reader.close();
+
+        // 提取double值并乘以100,转换为int数组
+        List<Integer> intList = new ArrayList<>();
+        for (List<String> row : rows) {
+            // 每行的第一个元素是double值
+            try {
+                double doubleValue = Double.parseDouble(row.get(0));
+                int intValue = (int) (doubleValue * 100);
+                intList.add(intValue);
+            }catch (NumberFormatException e){
+                System.out.println("跳过不能转换为double的字符串: " + row.get(0));
+            }
+
+        }
+
+        // 转换为int数组
+        int[] processedIntArray = intList.stream().mapToInt(Integer::intValue).toArray();
+        Filter filter = new Filter(processedIntArray,10000,10,200);
+        int[] ints = filter.getData();
+        // 写入处理后的数据到CSV文件
+        CsvWriter writer = CsvUtil.getWriter(FileUtil.file(outputCsvFilePath), CharsetUtil.CHARSET_UTF_8);
+        for (int i = 0; i < ints.length; i++) {
+
+            double processedValue = ints[i] / 100.0;
+            writer.write(CollUtil.newArrayList(String.format("%.2f", processedValue)));
+
+        }
+
+        writer.close();
+
+        Console.log("处理完成,结果已写入到输出CSV文件中。");
+    }
+
+}

+ 14 - 0
huimv-admin/src/main/resources/mapper/FootRawDataMapper.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.huimv.env.input.mapper.FootRawDataMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.huimv.env.input.entity.FootRawData">
+        <id column="id" property="id" />
+        <result column="data" property="data" />
+        <result column="date_time" property="dateTime" />
+        <result column="tian" property="tian" />
+        <result column="epc" property="epc" />
+    </resultMap>
+
+</mapper>

+ 6 - 0
input/pom.xml

@@ -21,6 +21,12 @@
             <groupId>org.springframework.boot</groupId>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
             <artifactId>spring-boot-starter-web</artifactId>
         </dependency>
         </dependency>
+        <dependency>
+            <groupId>com.gg.reader</groupId>
+            <artifactId>greader-api</artifactId>
+            <version>1.0</version>
+
+        </dependency>
 
 
         <dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <groupId>org.springframework.boot</groupId>

+ 2 - 0
input/src/main/java/com/huimv/input/InputApplication.java

@@ -1,5 +1,6 @@
 package com.huimv.input;
 package com.huimv.input;
 
 
+import com.huimv.input.footserver.FootEnvInputServer;
 import com.huimv.input.server.EnvInputServer;
 import com.huimv.input.server.EnvInputServer;
 import org.mybatis.spring.annotation.MapperScan;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.SpringApplication;
@@ -13,6 +14,7 @@ public class InputApplication {
     public static void main(String[] args) throws InterruptedException {
     public static void main(String[] args) throws InterruptedException {
         ApplicationContext applicationContext = SpringApplication.run(InputApplication.class, args);
         ApplicationContext applicationContext = SpringApplication.run(InputApplication.class, args);
         applicationContext.getBean(EnvInputServer.class).run();
         applicationContext.getBean(EnvInputServer.class).run();
+//        applicationContext.getBean(FootEnvInputServer.class).run();
     }
     }
 
 
 }
 }

+ 82 - 0
input/src/main/java/com/huimv/input/footserver/FootEnvInputServer.java

@@ -0,0 +1,82 @@
+package com.huimv.input.footserver;
+
+import io.netty.bootstrap.ServerBootstrap;
+import io.netty.channel.ChannelFuture;
+import io.netty.channel.ChannelInitializer;
+import io.netty.channel.ChannelPipeline;
+import io.netty.channel.EventLoopGroup;
+import io.netty.channel.nio.NioEventLoopGroup;
+import io.netty.channel.socket.SocketChannel;
+import io.netty.channel.socket.nio.NioServerSocketChannel;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Component
+public class FootEnvInputServer {
+    @Autowired
+    private FootEnvInputServerHandler serverHandler;
+    //监听端口
+    private int port = 3729;
+    //创建构造方法
+    public FootEnvInputServer(){
+    }
+
+    public static void main(String[] args) throws InterruptedException {
+        new FootEnvInputServer().run();
+    }
+/**
+ *
+ * 功能描述: 启动方法前台多个服务  处理多个线程
+ *
+ * @param:
+ * @return:
+ * @auther: LiGang
+ * @date: 2019/3/26 11:31
+ */
+
+
+
+    /**
+     * 启动流程
+     */
+    public void run() throws InterruptedException {
+        //配置服务端线程组
+        EventLoopGroup bossGroup=new NioEventLoopGroup();
+        EventLoopGroup workGroup=new NioEventLoopGroup();
+
+        try{
+            //引导整个server的启动
+            ServerBootstrap serverBootstrap = new ServerBootstrap();
+            serverBootstrap.group(bossGroup,workGroup)
+                    .channel(NioServerSocketChannel.class)    //指定处理的连接类型
+                    .childHandler(new ChannelInitializer<SocketChannel>() {
+                        @Override
+                        protected void initChannel(SocketChannel socketChannel) throws Exception {
+                            System.out.println("连接建立");
+                            ChannelPipeline pipeline = socketChannel.pipeline();
+
+//                            socketChannel.pipeline().addLast(new MyFixedLengthDecoder());
+
+//                            pipeline.addLast(new MyFixedLengthDecoder(137));  // 添加处理长度为137的消息的解码器
+//                            pipeline.addLast(new MyFixedLengthDecoder(8));    // 添加处理长度为8的消息的解码器
+//                            pipeline.addLast(new MyFixedLengthDecoder(6)); // 添加处理长度为6的消息的解码器
+                            pipeline.addLast(serverHandler);
+                        }
+                    });
+            System.out.println("# 耳标及采集器设备数据接收服务器已经启动,监听端口(Port):"+port);
+            System.out.println("# 准备接收数据:");
+            //绑定端口,同步等待成功
+            ChannelFuture cf = serverBootstrap.bind(port).sync();
+            // 等待服务端监听端口关闭
+            cf.channel().closeFuture().sync();
+        }finally {
+            //优雅的退出
+            bossGroup.shutdownGracefully();
+            workGroup.shutdownGracefully();
+        }
+    }
+
+}
+
+
+

+ 219 - 0
input/src/main/java/com/huimv/input/footserver/FootEnvInputServerHandler.java

@@ -0,0 +1,219 @@
+package com.huimv.input.footserver;
+
+import com.alibaba.fastjson.JSONArray;
+import com.huimv.input.utils.ModBusUtils;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.Unpooled;
+import io.netty.channel.ChannelHandler;
+import io.netty.channel.ChannelHandlerContext;
+import io.netty.channel.ChannelInboundHandlerAdapter;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+
+/**
+ * @Project : huimv.shiwan
+ * @Package : com.huimv.biosafety.uface.controller
+ * @Description : TODO
+ * @Version : 1.0
+ * @Author : ZhuoNing
+ * @Create : 2020-12-25
+ **/
+@ChannelHandler.Sharable
+@Component
+@Slf4j
+public class FootEnvInputServerHandler extends ChannelInboundHandlerAdapter   {
+    private StringBuilder askTextSb = null;
+
+
+
+//    private static String  str = "";
+
+    //
+    public void appendClientAsk(String text) {
+        if (this.askTextSb == null) {
+            askTextSb = new StringBuilder();
+        }
+        askTextSb.append(text);
+    }
+
+
+
+    @Override
+    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
+        System.out.println(msg);
+        ByteBuf byteBuf = (ByteBuf) msg;
+        byte[] bytes = new byte[byteBuf.readableBytes()];
+        byteBuf.readBytes(bytes);
+       String str = ModBusUtils.bytes2HexString(bytes);
+        System.out.println("---->"+str);
+
+    }
+
+
+
+    private static byte[] hexStringToByteArray(String hexString) {
+        int len = hexString.length();
+        byte[] dataBytes = new byte[len / 2];
+
+        for (int i = 0; i < len; i += 2) {
+            dataBytes[i / 2] = (byte) ((Character.digit(hexString.charAt(i), 16) << 4)
+                    + Character.digit(hexString.charAt(i + 1), 16));
+        }
+
+        return dataBytes;
+    }
+
+
+
+    @Override
+    public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
+
+
+
+
+            // {处理客户端消息}
+
+
+//            handleClientAskCmd(askTextSb.toString(), ctx);
+            //清空重置;
+//            askTextSb.delete(0, askTextSb.length());
+
+    }
+
+    @Override
+    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
+        if (cause.getMessage().indexOf("Connection reset") != -1) {
+            log.info("相关采集器设备正在重启:" + cause.toString());
+        }
+//        cause.printStackTrace();
+        ctx.close();
+    }
+
+    /**
+     * @Method : handleClientAskCmd
+     * @Description : 处理请求小心
+     * @Params : [clientAskText, ctx]
+     * @Return : void
+     * @Author : ZhuoNing
+     * @Date : 2022/3/28
+     * @Time : 17:36
+     */
+    private void handleClientAskCmd(String clientAskText, ChannelHandlerContext ctx) throws ParseException, IOException {
+        clientAskText = clientAskText.replaceAll("\r", "").replaceAll("\n", "");
+        //{处理非正常命令}
+//        int countPlus = regexUtil.countPlus(clientAskText);
+//        if (countPlus < 4) {
+//            System.out.println("当前数据为不完整数据,故丢弃.>>" + clientAskText);
+//        } else {
+        //--处理客户端请求数据
+        //{拆分粘包数据}
+        JSONArray askJa = parseAskCmdPackage(clientAskText);
+        for (int a = 0; a < askJa.size(); a++) {
+            String askText = askJa.getString(a);
+            //{处理请求命令}
+            askCmdActuator(askText, ctx);
+        }
+//        }
+    }
+
+    /**
+     * @Method : askCmdActuator
+     * @Description :
+     * @Params : [askText, ctx]
+     * @Return : void
+     * @Author : ZhuoNing
+     * @Date : 2022/3/23
+     * @Time : 18:08
+     */
+    private void askCmdActuator(String askText, ChannelHandlerContext ctx) throws ParseException, IOException {
+        System.out.println("======>接收设备请求:" + askText);
+        String[] dataArray = askText.split("\\+");
+        String cmdHeader = dataArray[0];
+        if (!cmdHeader.trim().equalsIgnoreCase("hm")) {
+            log.info("当前命令是非hm命令[" + askText + "]");
+            return;
+        }
+        //芯片id/设备编码
+        String idCode = dataArray[1];
+        String cmd = dataArray[2];
+        Map map = new HashMap();
+        map.put("askText", askText);
+        switch (cmd) {
+            case "1":
+                //获取远程设备编码
+                getDeviceCode(askText, idCode, ctx);
+                break;
+            case "2":
+                //同步时间
+                getServerTime(askText, idCode, ctx);
+                break;
+            default:
+                System.out.println("==>未知命令");
+                log.error(">>当前数据为非法数据-未知命令>>" + askText);
+        }
+    }
+
+
+
+    //时间同步请求
+    private void getServerTime(String askText, String deviceCode, ChannelHandlerContext ctx) throws ParseException {
+        System.out.println("==>时间同步请求:" + askText);
+//        if (!cmdProService.isEffectiveDevice(deviceCode)) {
+//            System.out.println("##时间同步请求-未注册设备 idCode=" + deviceCode);
+//            return;
+//        }
+        String answerText = "hm+2+" + "+0+4+end";
+//        log.info(">>时间同步请求-应答数据>>" + answerText);
+        answerCmd(answerText, ctx);
+    }
+
+    //获取远程设备编码
+    private void getDeviceCode(String askText, String idCode, ChannelHandlerContext ctx) {
+        System.out.println("==>获取远程设备编码请求:" + askText.trim());
+
+    }
+
+    //应答
+    public void answerCmd(String answerText, ChannelHandlerContext ctx) {
+        ctx.writeAndFlush(Unpooled.copiedBuffer(answerText.getBytes()));
+    }
+
+    //检查无效耳标
+    public boolean checkValidEarmark(String earmark) {
+        if (earmark.trim().equalsIgnoreCase("ffffffffffffffff") || earmark.trim().equalsIgnoreCase("0000000000000000")) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    //拆分粘包数据
+    public JSONArray parseAskCmdPackage(String text) {
+        String key = "end";
+        Pattern pattern = Pattern.compile(key);
+        Matcher matcher = pattern.matcher(text);
+        int count = 0;
+        while (matcher.find()) {
+            count++;
+        }
+        JSONArray dataJa = new JSONArray();
+        if (count == 1) {
+            dataJa.add(text);
+        } else {
+            for (int a = 0; a < count; a++) {
+                int p1 = text.indexOf("end");
+                dataJa.add(text.substring(0, p1 + 3));
+                text = text.substring(p1 + 3, text.length());
+            }
+        }
+        return dataJa;
+    }
+}

+ 1 - 6
input/src/main/java/com/huimv/input/server/EnvInputServerHandler.java

@@ -56,11 +56,6 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter   {
     @Autowired
     @Autowired
     private EnvRegularCallEggMapper envRegularCallEggMapper;
     private EnvRegularCallEggMapper envRegularCallEggMapper;
 
 
-    @Autowired
-    private EnvRegularCallFeedingMapper envRegularCallFeedingMapper;
-
-    @Autowired
-    private EnvRegularCallFeedingCopyMapper envRegularCallFeedingCopyMapper;
 
 
     @Autowired
     @Autowired
     private EnvDeviceMapper envDeviceMapper;
     private EnvDeviceMapper envDeviceMapper;
@@ -122,7 +117,7 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter   {
         System.out.println(result);
         System.out.println(result);
     }
     }
 
 
-    public String replace(String str, double ratio){
+    public String  replace(String str, double ratio){
         String[] s = str.split(" ");
         String[] s = str.split(" ");
         for (int i = 0; i < 60; i++) {
         for (int i = 0; i < 60; i++) {
             String str1 = s[i * 2 + 11] + s[i * 2 + 10];
             String str1 = s[i * 2 + 11] + s[i * 2 + 10];