From 0df6e7bb33c9f6a18f026a500776b00cbf2ae62c Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 24 十二月 2024 09:48:06 +0800
Subject: [PATCH] #

---
 /dev/null                                                   |   19 -------------------
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   15 ---------------
 2 files changed, 0 insertions(+), 34 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index d30309b..d44fec1 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -11,7 +11,6 @@
 import com.zy.common.model.*;
 import com.zy.common.model.enums.NavigationMapType;
 import com.zy.common.service.CommonService;
-import com.zy.common.service.erp.ErpService;
 import com.zy.common.utils.*;
 import com.zy.core.DevpThread;
 import com.zy.core.News;
@@ -57,33 +56,19 @@
     @Autowired
     private BasDevpService basDevpService;
     @Autowired
-    private BasErrLogService basErrLogService;
-    @Autowired
-    private BasSteErrLogService basSteErrLogService;
-    @Autowired
-    private BasShuttleService basShuttleService;
-    @Autowired
     private BasShuttleErrLogService basShuttleErrLogService;
     @Autowired
     private BasLiftErrLogService basLiftErrLogService;
     @Autowired
     private BasShuttleErrService basShuttleErrService;
     @Autowired
-    private BasCrnErrorMapper basCrnErrorMapper;
-    @Autowired
-    private BasSteService basSteService;
-    @Autowired
     private WrkChargeService wrkChargeService;
-    @Autowired
-    private BasSteErrService basSteErrService;
     @Autowired
     private CommonService commonService;
     @Autowired
     private WrkChargeMapper wrkChargeMapper;
     @Autowired
     private BasMapService basMapService;
-    @Autowired
-    private ErpService erpService;
     @Autowired
     private BasLiftService basLiftService;
     @Autowired
diff --git a/src/main/java/com/zy/common/service/erp/ErpDbProperties.java b/src/main/java/com/zy/common/service/erp/ErpDbProperties.java
deleted file mode 100644
index cf2cf9a..0000000
--- a/src/main/java/com/zy/common/service/erp/ErpDbProperties.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.zy.common.service.erp;
-
-import lombok.Data;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.stereotype.Component;
-
-/**
- * Created by vincent on 2020/11/26
- */
-@Data
-@ConfigurationProperties(prefix = "erp.db")
-@Component
-public class ErpDbProperties {
-
-    private String driver_class_name;
-
-    private String ur;
-
-    private String username;
-
-    private String password;
-
-//    {
-//        driver_class_name = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
-//        ur = "jdbc:sqlserver://127.0.0.1:1433;databasename=byrk";
-//        username = "sa";
-//        password = "sa@123";
-//    }
-
-}
diff --git a/src/main/java/com/zy/common/service/erp/ErpService.java b/src/main/java/com/zy/common/service/erp/ErpService.java
deleted file mode 100644
index 98435aa..0000000
--- a/src/main/java/com/zy/common/service/erp/ErpService.java
+++ /dev/null
Binary files differ
diff --git a/src/main/java/com/zy/common/service/erp/ErpSqlServer.java b/src/main/java/com/zy/common/service/erp/ErpSqlServer.java
deleted file mode 100644
index 21cbbc5..0000000
--- a/src/main/java/com/zy/common/service/erp/ErpSqlServer.java
+++ /dev/null
@@ -1,237 +0,0 @@
-package com.zy.common.service.erp;
-
-import com.core.common.Cools;
-import com.zy.core.News;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.sql.*;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 绠�鍗曟寔涔呭眰妗嗘灦
- * Created by vincent on 2020/11/26
- */
-@Slf4j
-@Service
-public class ErpSqlServer {
-
-    // 鏁版嵁搴撹繛鎺�
-//    private Connection conn;
-    // 鍒涘缓棰勭紪璇戣鍙ュ璞★紝涓�鑸兘鏄敤杩欎釜鑰屼笉鐢⊿tatement
-    private PreparedStatement pstm = null;
-    // 鍒涘缓涓�涓粨鏋滈泦瀵硅薄
-    private ResultSet rs = null;
-
-    @Autowired
-    private ErpDbProperties erpDbProperties;
-
-    /*****************************************************************************/
-    /**********************************   灏佽   **********************************/
-    /*****************************************************************************/
-
-    /**
-     * 鏌ヨ
-     */
-    public <T> List<T> select(String sql, Class<T> cls) {
-        List<Map<String, Object>> result = executeQuery(sql);
-        List<T> list = new ArrayList<>();
-        if (null != result) {
-            for (Map<String, Object> entity : result) {
-                list.add(Cools.conver(entity, cls));
-            }
-        }
-        return list;
-    }
-
-    public List<Map<String, Object>> select(String sql) {
-        return executeQuery(sql);
-    }
-
-    /**
-     * 淇敼
-     */
-    public int update(String sql) {
-        return executeUpdate(sql);
-    }
-
-    /*****************************************************************************/
-    /*********************************   鏍稿績灞�   *********************************/
-    /*****************************************************************************/
-
-    /**
-     * map 杞� 瀵硅薄
-     */
-
-    private List<Map<String, Object>> executeQuery(String sql) {
-        Connection conn = null;
-        try {
-            conn = getConn();
-            pstm = conn.prepareStatement(sql);
-            rs = pstm.executeQuery();
-//            List<Map<String, Object>> maps = convertList(rs);
-            return convertList(rs);
-        } catch (Exception e) {
-            e.printStackTrace();
-            return null;
-        } finally {
-            release();
-            if (conn != null) {
-                try {
-                    conn.close();
-                    conn = null;
-                } catch (SQLException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-
-    public Number executeQueryCount(String sql, String column) {
-        Number value = 0;
-        Connection conn = null;
-        try {
-            conn = getConn();
-            pstm = conn.prepareStatement(sql);
-            rs = pstm.executeQuery();
-//            ResultSetMetaData metaData = rs.getMetaData();
-            while (rs.next()) {
-                value = (Number) rs.getInt(column);
-            }
-            return value;
-        } catch (Exception e) {
-            e.printStackTrace();
-            return 0;
-        } finally {
-            release();
-            if (conn != null) {
-                try {
-                    conn.close();
-                    conn = null;
-                } catch (SQLException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-
-    private int executeUpdate(String sql) {
-        Connection conn = null;
-        try {
-            conn = getConn();
-            if(null != conn)
-            {
-                pstm = conn.prepareStatement(sql);
-            } else {
-                News.error("鏇存柊ERP涓棿琛ㄥけ璐�===>>鏁版嵁搴撹繛鎺onn涓虹┖");
-                News.error("鏇存柊ERP涓棿琛ㄥけ璐�===>>" + sql);
-            }
-            return pstm.executeUpdate();
-        } catch (Exception e) {
-            e.printStackTrace();
-            News.error("鏇存柊ERP涓棿琛ㄥけ璐�===>>" + sql);
-            News.error("鏇存柊ERP涓棿琛ㄥけ璐�===>>" + e);
-            return 0;
-        } finally {
-            release();
-            if (conn != null) {
-                try {
-                    conn.close();
-                    conn = null;
-                } catch (SQLException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-
-    private static List<Map<String, Object>> convertList(ResultSet rs) throws SQLException {
-        List<Map<String, Object>> list = new ArrayList<>();
-        ResultSetMetaData md = rs.getMetaData();
-        int columnCount = md.getColumnCount();
-        while (rs.next()) {
-            Map<String, Object> rowData = new HashMap<>();
-            for (int i = 1; i <= columnCount; i++) {
-                rowData.put(md.getColumnName(i), rs.getObject(i));
-            }
-            list.add(rowData);
-        }
-        return list;
-    }
-
-    //synchronized
-    public Connection getConn() throws SQLException {
-        Connection conn = null;
-        try {
-            Class.forName(erpDbProperties.getDriver_class_name()).newInstance();
-            conn = DriverManager.getConnection(erpDbProperties.getUr(), erpDbProperties.getUsername(), erpDbProperties.getPassword());
-        } catch (Exception e) {
-            News.error("鑾峰彇ERP鏁版嵁搴撹繛鎺ュけ璐�");
-            e.printStackTrace();
-            throw new RuntimeException("鑾峰彇ERP鏁版嵁搴撹繛鎺ュけ璐�");
-        }
-        return conn;
-//        if (null == this.conn || this.conn.isClosed()) {
-//            try {
-//                Class.forName(erpDbProperties.getDriver_class_name()).newInstance();
-//                this.conn = DriverManager.getConnection(erpDbProperties.getUr(), erpDbProperties.getUsername(), erpDbProperties.getPassword());
-//            } catch (Exception e) {
-//                News.error("鑾峰彇ERP鏁版嵁搴撹繛鎺ュけ璐�");
-//                e.printStackTrace();
-//                throw new RuntimeException("鑾峰彇ERP鏁版嵁搴撹繛鎺ュけ璐�");
-//            }
-//        }
-//        return this.conn;
-    }
-
-    private void release() {
-        if (rs != null) {
-            try {
-                rs.close();
-            } catch (SQLException e) {
-                e.printStackTrace();
-            }
-        }
-        if (pstm != null) {
-            try {
-                pstm.close();
-            } catch (SQLException e) {
-                e.printStackTrace();
-            }
-        }
-//        if (conn != null) {
-//            try {
-//                conn.close();
-//                conn = null;
-//            } catch (SQLException e) {
-//                e.printStackTrace();
-//            }
-//        }
-    }
-
-    /**
-     * 娣辨嫹璐�
-     */
-    public ArrayList deepClone(List list) throws Exception {
-        // 搴忓垪鍖�
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        ObjectOutputStream oos = new ObjectOutputStream(bos);
-
-        oos.writeObject(list);
-
-        // 鍙嶅簭鍒楀寲
-        ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
-        ObjectInputStream ois = new ObjectInputStream(bis);
-
-        return (ArrayList) ois.readObject();
-    }
-
-}
diff --git a/src/main/java/com/zy/common/service/erp/dto/VoucherDto.java b/src/main/java/com/zy/common/service/erp/dto/VoucherDto.java
deleted file mode 100644
index c77e59d..0000000
--- a/src/main/java/com/zy/common/service/erp/dto/VoucherDto.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.zy.common.service.erp.dto;
-
-import com.zy.common.service.erp.entity.Voucher;
-import com.zy.common.service.erp.entity.VoucherDetail;
-import lombok.Data;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Created by vincent on 2022/12/8
- */
-@Data
-public class VoucherDto {
-
-    private Voucher voucher;
-
-    private List<VoucherDetail> details = new ArrayList<>();
-
-}
diff --git a/src/main/java/com/zy/common/service/erp/entity/Goods.java b/src/main/java/com/zy/common/service/erp/entity/Goods.java
deleted file mode 100644
index 916de5d..0000000
--- a/src/main/java/com/zy/common/service/erp/entity/Goods.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.zy.common.service.erp.entity;
-
-import lombok.Data;
-
-/**
- * Created by vincent on 2022/12/8
- */
-@Data
-public class Goods {
-
-    private String BarCode;
-
-    private String MaterialNO;
-
-    private String ProdSpec;
-
-    private Integer NumOfBobbins;
-
-    private Double NWT; // 鍑�閲�
-
-    private Double GWT; // 姣涢噸
-
-    private String ProdDate;
-
-    private String LINE;
-
-    private String GRADE;
-
-    private String GRADES;
-
-    private String Chip;
-
-    private String Batch;
-
-    private String PACKING_TYPE;
-
-    private String PACKING_DATE;
-
-    private String LastUpdatedDate;
-
-    private Integer State;
-
-    private String location;
-
-}
diff --git a/src/main/java/com/zy/common/service/erp/entity/Voucher.java b/src/main/java/com/zy/common/service/erp/entity/Voucher.java
deleted file mode 100644
index 79ee0bb..0000000
--- a/src/main/java/com/zy/common/service/erp/entity/Voucher.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.zy.common.service.erp.entity;
-
-import lombok.Data;
-
-/**
- * Created by vincent on 2022/12/8
- */
-@Data
-public class Voucher {
-
-    private String VoucherID;
-
-    private String MT;
-
-    private String MaterialNO;
-
-    private String CenterID;
-
-    private String Plant;
-
-    private String Loc;
-
-    private String Batch;
-
-    private Double TotalNum;
-
-    private Integer TotalCount;
-
-    private String AccDate;
-
-    private String VBELN;
-
-    private String Customer;
-
-    private Double ExpectedWeight;
-
-    private String Container;
-
-    private String TruckNO;
-
-    private String LastUpdatedDate;
-
-    private Integer State;
-
-}
diff --git a/src/main/java/com/zy/common/service/erp/entity/VoucherDetail.java b/src/main/java/com/zy/common/service/erp/entity/VoucherDetail.java
deleted file mode 100644
index ff4be0d..0000000
--- a/src/main/java/com/zy/common/service/erp/entity/VoucherDetail.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.zy.common.service.erp.entity;
-
-import lombok.Data;
-
-/**
- * Created by vincent on 2022/12/8
- */
-@Data
-public class VoucherDetail {
-
-    private String VoucherID;
-
-    private String Barcode;
-
-    private String PickID;
-
-    private String LastUpdatedDate;
-
-}

--
Gitblit v1.9.1