From e5b19096f2bd7e8377d2bb510ed57e066adeba72 Mon Sep 17 00:00:00 2001
From: ZY <zc857179121@qq.com>
Date: 星期三, 17 七月 2024 16:43:27 +0800
Subject: [PATCH] 物料档案同步

---
 src/main/java/com/zy/third/erp/entity/ItemTB.java            |  217 ++
 src/main/java/com/zy/third/erp/entity/InDetTB.java           |  254 ++
 src/main/java/com/zy/third/erp/entity/OutHedTb.java          |  203 ++
 src/main/java/com/zy/third/lk/entity/ErpLKStorage.java       |   69 
 src/main/java/com/zy/third/lk/entity/OutDetTb.java           |  248 ++
 src/main/java/com/zy/third/lk/entity/OutCancelTB.java        |   84 
 src/main/java/com/zy/third/lk/entity/OutHedTb.java           |  197 ++
 src/main/java/com/zy/common/service/erp/ErpSqlServer.java    |  401 ++++
 pom.xml                                                      |    7 
 src/main/java/com/zy/third/erp/entity/InCancelTB.java        |   78 
 src/main/java/com/zy/third/lk/entity/LKCheckHedTB.java       |  212 ++
 src/main/java/com/zy/third/erp/entity/InDetTBBak.java        |  258 ++
 src/main/java/com/zy/third/erp/entity/OutCancelTB.java       |   73 
 src/main/java/com/zy/third/lk/entity/OutDetTbBak.java        |  247 ++
 src/main/java/com/zy/third/erp/entity/ItemTBBak.java         |  228 ++
 src/main/java/com/zy/third/erp/entity/OutDetTbBak.java       |  252 ++
 src/main/java/com/zy/third/lk/entity/InDetTB.java            |  243 ++
 src/main/java/com/zy/third/erp/entity/OutHedTbBak.java       |  203 ++
 src/main/java/com/zy/third/lk/entity/InCancelTB.java         |   96 +
 src/main/java/com/zy/third/erp/task/ERPItemScheduler.java    |   63 
 src/main/java/com/zy/third/erp/entity/InHedTBBak.java        |  212 ++
 src/main/java/com/zy/third/erp/entity/OutCancelTBBak.java    |   88 
 src/main/java/com/zy/third/erp/task/ERPItemSchedulerMS.java  |  123 +
 src/main/java/com/zy/common/service/erp/ErpDbProperties.java |   30 
 src/main/java/com/zy/third/lk/entity/OutHedTbBak.java        |  206 ++
 src/main/java/com/zy/third/lk/entity/InDetTBBak.java         |  259 ++
 src/main/java/com/zy/third/lk/entity/InHedTB.java            |  207 ++
 src/main/java/com/zy/third/lk/entity/LKCheckDetTB.java       |   95 +
 src/main/java/com/zy/third/erp/entity/InHedTB.java           |  209 ++
 src/main/java/com/zy/third/erp/entity/OutDetTb.java          |  253 ++
 src/main/java/com/zy/third/lk/entity/InHedTBBak.java         |  212 ++
 src/main/java/com/zy/third/erp/entity/InCancelTBBak.java     |   84 
 src/main/resources/license.lic                               |    0 
 src/main/resources/application.yml                           |   13 
 34 files changed, 5,623 insertions(+), 1 deletions(-)

diff --git a/pom.xml b/pom.xml
index e7e14e6..0431338 100644
--- a/pom.xml
+++ b/pom.xml
@@ -108,6 +108,13 @@
             <artifactId>truelicense-core</artifactId>
             <version>1.33</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
     </dependencies>
 
     <build>
diff --git a/src/main/java/com/zy/common/service/erp/ErpDbProperties.java b/src/main/java/com/zy/common/service/erp/ErpDbProperties.java
new file mode 100644
index 0000000..efd9898
--- /dev/null
+++ b/src/main/java/com/zy/common/service/erp/ErpDbProperties.java
@@ -0,0 +1,30 @@
+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 url;
+
+    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/ErpSqlServer.java b/src/main/java/com/zy/common/service/erp/ErpSqlServer.java
new file mode 100644
index 0000000..a94c994
--- /dev/null
+++ b/src/main/java/com/zy/common/service/erp/ErpSqlServer.java
@@ -0,0 +1,401 @@
+package com.zy.common.service.erp;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.core.common.Cools;
+import com.zy.third.erp.entity.InDetTB;
+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.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+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 static final int CONNECTION_TIMEOUT_SECONDS = 10; // 杩炴帴瓒呮椂
+
+    private static final int QUERY_TIMEOUT_SECONDS = 30; // 鏌ヨ瓒呮椂
+
+    public static void main(String[] args) {
+        ErpSqlServer erpSqlServer = new ErpSqlServer();
+        // 鏌�
+//        String sql = "select ise.* from InStockBillEntry ise left join InStockbill isb on isb.FInterID = ise.FInterID where 1=1";
+//        List<InStockBillEntry> list = erpSqlServer.select(sql, InStockBillEntry.class);
+        // 鏀� / 鍒�
+//        sql = "update InStockBill set Fflag_finish = 1 where FBillNo = ''{0}''";
+//        sql = MessageFormat.format(sql, "123456");
+//        erpSqlServer.update(sql);
+        
+        HashMap<String, Object> stringStringHashMap = new HashMap<>();
+        stringStringHashMap.put("BillNo","'1231312'");
+        stringStringHashMap.put("test","'1231312'");
+        stringStringHashMap.put("BilhahahlNo","'1231312'");
+        stringStringHashMap.put("B21312illNo","'1231312'");
+        stringStringHashMap.put("testnum",100);
+        erpSqlServer.insert(InDetTB.class,stringStringHashMap);
+    }
+
+    // 鏁版嵁搴撹繛鎺�
+//    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;
+    }
+    
+    
+    /**
+     * 鎵弿鎵�鏈夊疄鍔涚被灞炴�ч噷鐨凾ableField娉ㄨВ,骞跺皢閲岄潰鐨勫�间綔涓篶olumn
+     * @param cls
+     * @param <T>
+     * @return
+     */
+    public <T> String selectFrontPart(Class<T> cls){
+        String tableName = cls.getDeclaredAnnotation(TableName.class).value();
+        List<HashMap<String,String>> columnAndField = new ArrayList<>();
+        String sql = "SELECT ";
+        if (Cools.isEmpty(tableName)) {
+            return null;
+        }
+        Field[] allFields = Cools.getAllFields(cls);
+        for (Field f : allFields) {
+            if (Modifier.isFinal(f.getModifiers())
+                    || Modifier.isStatic(f.getModifiers())
+                    || Modifier.isTransient(f.getModifiers())){
+                continue;
+            }
+            String column = null;
+            if (f.isAnnotationPresent(TableField.class)) {
+                column = f.getAnnotation(TableField.class).value();
+            }
+            if (Cools.isEmpty(column)) {
+                column = f.getName();
+            }
+            String name = f.getName();
+            HashMap<String, String> container = new HashMap<>();
+            container.put(column,name);
+            columnAndField.add(container);
+        }
+        for (int i = 0; i < columnAndField.size(); i++) {
+            HashMap<String, String> stringStringHashMap = columnAndField.get(i);
+            if (i == columnAndField.size() - 1){
+                for (String s : stringStringHashMap.keySet()) {
+                    sql = sql + s + " AS " + stringStringHashMap.get(s);
+                }
+            }else {
+                for (String s : stringStringHashMap.keySet()) {
+                    sql = sql + s + " AS " + stringStringHashMap.get(s) + ", ";
+                }
+            }
+        }
+        sql = sql + " FROM " + tableName;
+        return sql;
+    }
+    
+    public String addWhere(String sql, Map<String,String> condition){
+        int conditionSize = 1;
+        sql = sql + " WHERE ";
+        for (String s : condition.keySet()) {
+            if (conditionSize == condition.keySet().size()){
+                sql = sql + s + " = " + condition.get(s);
+            }else {
+                sql = sql + s + " = " + condition.get(s) + " and ";
+            }
+            conditionSize = conditionSize + 1;
+        }
+        return sql;
+    }
+    
+    /**
+     * map鐨勯敭鏄垪鍚�, 鍊肩瓑鍚屼簬鍊�
+     * key: id, value: 1 绛夊悓浜� WHERE id = 1
+     * 濡傛灉瑕佹煡璇㈠瓧绗︿覆闇�瑕佽嚜琛屽姞涓�''
+     * key:name, value: 'zhs'绛夊悓浜� WHERE name = 'zhs'
+     * @param cls
+     * @param condition
+     * @param <T>
+     * @return
+     */
+    public <T> List<T> selectList(Class<T> cls, Map<String,String> condition){
+        String sql = selectFrontPart(cls);
+        String finalSQL = addWhere(sql, condition);
+        return select(finalSQL,cls);
+    } 
+    
+    public <T> List<T> selectAll(Class<T> cls){
+        String sql = selectFrontPart(cls);
+        return select(sql,cls);
+    }
+
+    public List<Map<String, Object>> select(String sql) {
+        return executeQuery(sql);
+    }
+
+    /**
+     * 淇敼
+     */
+    public int update(String sql) {
+        return executeUpdate(sql);
+    }
+
+    public <T> int delete(Class<T> cls, Map<String,String> condition) {
+        String tableName = cls.getDeclaredAnnotation(TableName.class).value();
+        if (Cools.isEmpty(tableName)) {
+            return 0;
+        }
+        String sql = "DELETE FROM " + tableName;
+        String finalSQL = addWhere(sql, condition);
+        return executeUpdate(finalSQL);
+    }
+    
+    public <T> int insert(Class<T> cls, Map<String,Object> condition){
+        String tableName = cls.getDeclaredAnnotation(TableName.class).value();
+        if (Cools.isEmpty(tableName)) {
+            return 0;
+        }
+        String sql = "INSERT INTO " + tableName + " (";
+        int conditionSize = 1;
+        for (String s : condition.keySet()) {
+            if (conditionSize == condition.keySet().size()){
+                sql = sql +s+")";
+            }else {
+                sql = sql + s + ",";
+            }
+            conditionSize = conditionSize + 1;
+        }
+        sql = sql + " VALUES(";
+        int valuesSize = 1;
+        for (String s : condition.keySet()) {
+            if (valuesSize == condition.keySet().size()){
+                
+                sql = sql + condition.get(s)+")";
+            }else {
+                sql = sql + condition.get(s) + ",";
+            }
+            valuesSize = valuesSize + 1;
+        }
+        
+        return executeUpdate(sql);
+    }
+    
+    
+
+    /*****************************************************************************/
+    /*********************************   鏍稿績灞�   *********************************/
+    /*****************************************************************************/
+
+    
+
+    private List<Map<String, Object>> executeQuery(String sql) {
+        Connection conn = null;
+        try {
+            conn = getConn();
+            pstm = conn.prepareStatement(sql);
+
+            pstm.setQueryTimeout(QUERY_TIMEOUT_SECONDS);
+
+            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);
+
+            pstm.setQueryTimeout(QUERY_TIMEOUT_SECONDS);
+
+            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);
+
+                pstm.setQueryTimeout(QUERY_TIMEOUT_SECONDS);
+
+            } else {
+                log.error("鏇存柊ERP涓棿琛ㄥけ璐�===>>鏁版嵁搴撹繛鎺onn涓虹┖");
+                log.error("鏇存柊ERP涓棿琛ㄥけ璐�===>>" + sql);
+            }
+            return pstm.executeUpdate();
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("鏇存柊ERP涓棿琛ㄥけ璐�1===>>" + sql);
+            log.error("鏇存柊ERP涓棿琛ㄥけ璐�1===>>" + 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();
+
+            DriverManager.setLoginTimeout(CONNECTION_TIMEOUT_SECONDS);
+
+            conn = DriverManager.getConnection(erpDbProperties.getUrl(), erpDbProperties.getUsername(), erpDbProperties.getPassword());
+        } catch (Exception e) {
+            log.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) {
+//                log.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/third/erp/entity/InCancelTB.java b/src/main/java/com/zy/third/erp/entity/InCancelTB.java
new file mode 100644
index 0000000..fe5f95d
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/InCancelTB.java
@@ -0,0 +1,78 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@NoArgsConstructor
+@TableName("erp_InCancelTB")
+public class InCancelTB implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    @TableField(value = "AutoId")
+    @ApiModelProperty(value= "")
+    private Integer AutoId;
+
+
+    @ApiModelProperty(value= "")
+    @TableId(value = "BillNo", type = IdType.INPUT)
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date MakeDate;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+//    InCancelTB inCancelTB = new InCancelTB(
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Date getMakeDate() {
+        return MakeDate;
+    }
+
+    public String getMakeDate$(){
+        if (Cools.isEmpty(this.MakeDate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.MakeDate);
+    }
+
+    public void setMakeDate(Date MakeDate) {
+        this.MakeDate = MakeDate;
+    }
+
+
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/entity/InCancelTBBak.java b/src/main/java/com/zy/third/erp/entity/InCancelTBBak.java
new file mode 100644
index 0000000..94887bc
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/InCancelTBBak.java
@@ -0,0 +1,84 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@NoArgsConstructor
+@TableName("erp_InCancelTB_bak")
+public class InCancelTBBak implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    @TableField(value = "AutoId")
+    @ApiModelProperty(value= "")
+    private Integer AutoId;
+
+    @ApiModelProperty(value= "")
+    @TableId(value = "BillNo", type = IdType.INPUT)
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date MakeDate;
+
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("Remark")
+    private Date DelDate;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+//    InCancelTBBak inCancelTBBak = new InCancelTBBak(
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null    // 
+//    );
+
+
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Date getMakeDate() {
+        return MakeDate;
+    }
+
+    public String getMakeDate$(){
+        if (Cools.isEmpty(this.MakeDate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.MakeDate);
+    }
+
+    public void setMakeDate(Date MakeDate) {
+        this.MakeDate = MakeDate;
+    }
+
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/entity/InDetTB.java b/src/main/java/com/zy/third/erp/entity/InDetTB.java
new file mode 100644
index 0000000..64643c2
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/InDetTB.java
@@ -0,0 +1,254 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@NoArgsConstructor
+@AllArgsConstructor
+@Data
+@TableName("erp_InDetTB")
+public class InDetTB implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+
+    @TableId(value = "AutoId", type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+
+    @TableField("iNo")
+    private Integer iNO;
+
+    /**
+     * erp琛屽敮涓�鐮�
+     */
+    @ApiModelProperty(value= "erp琛屽敮涓�鐮�")
+    @TableField("DetId")
+    private Integer detId;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemId")
+    private String itemid;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemCode")
+    private String ItemCode;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemBatch")
+    private String ItemBatch;
+
+    @ApiModelProperty(value= "")
+    @TableField("proType")
+    private String protype;
+
+    @ApiModelProperty(value= "")
+    @TableField("OrderNo")
+    private String OrderNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("MainNum")
+    private Double MainNum;
+
+    @ApiModelProperty(value= "")
+    @TableField("remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String WareName;
+
+    @ApiModelProperty(value= "")
+    @TableField("temp1")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("temp2")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("temp3")
+    private String temp3;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+
+
+
+
+//    InDetTB inDetTB = new InDetTB(
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // erp琛屽敮涓�鐮乕闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Integer getINO() {
+        return iNO;
+    }
+
+    public void setINO(Integer iNO) {
+        this.iNO = iNO;
+    }
+
+    public Integer getDetId() {
+        return detId;
+    }
+
+    public void setDetId(Integer detId) {
+        this.detId = detId;
+    }
+
+    public String getItemid() {
+        return itemid;
+    }
+
+    public void setItemid(String itemid) {
+        this.itemid = itemid;
+    }
+
+    public String getItemCode() {
+        return ItemCode;
+    }
+
+    public void setItemCode(String ItemCode) {
+        this.ItemCode = ItemCode;
+    }
+
+    public String getItemBatch() {
+        return ItemBatch;
+    }
+
+    public void setItemBatch(String ItemBatch) {
+        this.ItemBatch = ItemBatch;
+    }
+
+    public String getProtype() {
+        return protype;
+    }
+
+    public void setProtype(String protype) {
+        this.protype = protype;
+    }
+
+    public Double getMainNum() {
+        return MainNum;
+    }
+
+    public void setMainNum(Double MainNum) {
+        this.MainNum = MainNum;
+    }
+
+    public String getOrderNo() {
+        return OrderNo;
+    }
+
+    public void setOrderNo(String OrderNo) {
+        this.OrderNo = OrderNo;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.temp3 = temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/entity/InDetTBBak.java b/src/main/java/com/zy/third/erp/entity/InDetTBBak.java
new file mode 100644
index 0000000..1f8e33d
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/InDetTBBak.java
@@ -0,0 +1,258 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@TableName("erp_InDetTB_bak")
+public class InDetTBBak implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("AutoId")
+    private Integer autoId;
+
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+
+    @TableField("iNo")
+    private Integer iNO;
+
+    /**
+     * erp琛屽敮涓�鐮�
+     */
+    @ApiModelProperty(value= "erp琛屽敮涓�鐮�")
+    @TableField("DetId")
+    private Integer detId;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemId")
+    private String itemid;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemCode")
+    private String ItemCode;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemBatch")
+    private String ItemBatch;
+
+    @ApiModelProperty(value= "")
+    @TableField("proType")
+    private String protype;
+
+    @ApiModelProperty(value= "")
+    @TableField("OrderNo")
+    private String OrderNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("MainNum")
+    private Double MainNum;
+
+    @ApiModelProperty(value= "")
+    @TableField("remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String WareName;
+
+    @ApiModelProperty(value= "")
+    @TableField("temp1")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("temp2")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("temp3")
+    private String temp3;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("DelDate")
+    private Date delDate;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+
+
+
+
+//    InDetTBBak inDetTBBak = new InDetTBBak(
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // erp琛屽敮涓�鐮乕闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Integer getINO() {
+        return iNO;
+    }
+
+    public void setINO(Integer iNO) {
+        this.iNO = iNO;
+    }
+
+    public Integer getDetId() {
+        return detId;
+    }
+
+    public void setDetId(Integer detId) {
+        this.detId = detId;
+    }
+
+    public String getItemid() {
+        return itemid;
+    }
+
+    public void setItemid(String itemid) {
+        this.itemid = itemid;
+    }
+
+    public String getItemCode() {
+        return ItemCode;
+    }
+
+    public void setItemCode(String ItemCode) {
+        this.ItemCode = ItemCode;
+    }
+
+    public String getItemBatch() {
+        return ItemBatch;
+    }
+
+    public void setItemBatch(String ItemBatch) {
+        this.ItemBatch = ItemBatch;
+    }
+
+    public String getProtype() {
+        return protype;
+    }
+
+    public void setProtype(String protype) {
+        this.protype = protype;
+    }
+
+    public Double getMainNum() {
+        return MainNum;
+    }
+
+    public void setMainNum(Double MainNum) {
+        this.MainNum = MainNum;
+    }
+
+    public String getOrderNo() {
+        return OrderNo;
+    }
+
+    public void setOrderNo(String OrderNo) {
+        this.OrderNo = OrderNo;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.temp3 = temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/entity/InHedTB.java b/src/main/java/com/zy/third/erp/entity/InHedTB.java
new file mode 100644
index 0000000..a956d3b
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/InHedTB.java
@@ -0,0 +1,209 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@TableName("erp_InHedTB")
+public class InHedTB implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+
+    @TableId(value = "AutoId", type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableId(value = "BillNo", type = IdType.INPUT)
+    @TableField("BillNo")
+    private String BillNo;
+
+    /**
+     * StockIn:閲囪喘鍏ュ簱
+ProductIn:鎴愬搧鍏ュ簱鍗�
+ItemMoveIn:璋冩嫧鍏ュ簱
+ItemSwitchIn:褰㈡�佽浆鎹㈠叆搴�
+CheckMoreIn:鐩樼泩鍏ュ簱鍗�
+
+     */
+//    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("BillDate")
+    private String billDate;
+
+    @TableField("IoKindID")
+    private String IoKindID;
+
+    @TableField("IoKindName")
+    private String ioKindName;
+
+    /**
+     * 渚涘簲鍟嗐�侀儴闂↖D
+     */
+    @ApiModelProperty(value= "渚涘簲鍟嗐�侀儴闂↖D")
+    @TableField("ObjectId")
+    private String OjectId;
+
+    /**
+     * 渚涘簲鍟嗐�侀儴闂ㄥ悕绉�
+     */
+    @TableField("ObjectName")
+    @ApiModelProperty(value= "渚涘簲鍟嗐�侀儴闂ㄥ悕绉�")
+    private String OjbectName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp1")
+    private String Temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp2")
+    private String Temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp3")
+    private String Temp3;
+
+
+
+    @ApiModelProperty(value= "")
+//    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private String makedate;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+
+    public InHedTB(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+//    InHedTB inHedTB = new InHedTB(
+//            null,    // [闈炵┖]
+//            null,    // StockIn:閲囪喘鍏ュ簱
+//            null,    // 渚涘簲鍟嗐�侀儴闂↖D
+//            null,    // 渚涘簲鍟嗐�侀儴闂ㄥ悕绉�
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public String getIoKindID() {
+        return IoKindID;
+    }
+
+    public void setIoKindID(String IoKindID) {
+        this.IoKindID = IoKindID;
+    }
+
+    public String getOjectId() {
+        return OjectId;
+    }
+
+    public void setOjectId(String OjectId) {
+        this.OjectId = OjectId;
+    }
+
+    public String getOjbectName() {
+        return OjbectName;
+    }
+
+    public void setOjbectName(String OjbectName) {
+        this.OjbectName = OjbectName;
+    }
+
+    public String getMakedate() {
+        return makedate;
+    }
+
+    public void setMakedate(String makedate) {
+        this.makedate = makedate;
+    }
+//    public Date getMakedate() {
+//        return makedate;
+//    }
+//
+//    public String getMakedate$(){
+//        if (Cools.isEmpty(this.makedate)){
+//            return "";
+//        }
+//        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+//    }
+//
+//    public void setMakedate(Date makedate) {
+//        this.makedate = makedate;
+//    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return Temp1;
+    }
+
+    public void setTemp1(String Temp1) {
+        this.Temp1 = Temp1;
+    }
+
+    public String getTemp2() {
+        return Temp2;
+    }
+
+    public void setTemp2(String Temp2) {
+        this.Temp2 = Temp2;
+    }
+
+    public String getTemp3() {
+        return Temp3;
+    }
+
+    public void setTemp3(String Temp3) {
+        this.Temp3 = Temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/entity/InHedTBBak.java b/src/main/java/com/zy/third/erp/entity/InHedTBBak.java
new file mode 100644
index 0000000..0078b61
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/InHedTBBak.java
@@ -0,0 +1,212 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@TableName("erp_InHedTB_bak")
+public class InHedTBBak implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId", type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("BillDate")
+    private Date billDate;
+
+    /**
+     * StockIn:閲囪喘鍏ュ簱
+ProductIn:鎴愬搧鍏ュ簱鍗�
+ItemMoveIn:璋冩嫧鍏ュ簱
+ItemSwitchIn:褰㈡�佽浆鎹㈠叆搴�
+CheckMoreIn:鐩樼泩鍏ュ簱鍗�
+
+     */
+
+    @TableField("IoKindID")
+    private String IoKindID;
+
+    @TableField("IoKindName")
+    private String ioKindName;
+
+    /**
+     * 渚涘簲鍟嗐�侀儴闂↖D
+     */
+    @ApiModelProperty(value= "渚涘簲鍟嗐�侀儴闂↖D")
+    @TableField("ObjectId")
+    private String OjectId;
+
+    /**
+     * 渚涘簲鍟嗐�侀儴闂ㄥ悕绉�
+     */
+    @ApiModelProperty(value= "渚涘簲鍟嗐�侀儴闂ㄥ悕绉�")
+    @TableField("ObjectName")
+    private String OjbectName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp1")
+    private String Temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp2")
+    private String Temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp3")
+    private String Temp3;
+
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("DelDate")
+    private Date delDate;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+    public InHedTBBak() {}
+
+    public InHedTBBak(String BillNo,String IoKindID,String OjectId,String OjbectName,Date makedate,String remark,String Temp1,String Temp2,String Temp3) {
+        this.BillNo = BillNo;
+        this.IoKindID = IoKindID;
+        this.OjectId = OjectId;
+        this.OjbectName = OjbectName;
+        this.makedate = makedate;
+        this.remark = remark;
+        this.Temp1 = Temp1;
+        this.Temp2 = Temp2;
+        this.Temp3 = Temp3;
+    }
+
+//    InHedTBBak inHedTBBak = new InHedTBBak(
+//            null,    // [闈炵┖]
+//            null,    // StockIn:閲囪喘鍏ュ簱
+
+
+//            null,    // 渚涘簲鍟嗐�侀儴闂↖D
+//            null,    // 渚涘簲鍟嗐�侀儴闂ㄥ悕绉�
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public String getIoKindID() {
+        return IoKindID;
+    }
+
+    public void setIoKindID(String IoKindID) {
+        this.IoKindID = IoKindID;
+    }
+
+    public String getOjectId() {
+        return OjectId;
+    }
+
+    public void setOjectId(String OjectId) {
+        this.OjectId = OjectId;
+    }
+
+    public String getOjbectName() {
+        return OjbectName;
+    }
+
+    public void setOjbectName(String OjbectName) {
+        this.OjbectName = OjbectName;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return Temp1;
+    }
+
+    public void setTemp1(String Temp1) {
+        this.Temp1 = Temp1;
+    }
+
+    public String getTemp2() {
+        return Temp2;
+    }
+
+    public void setTemp2(String Temp2) {
+        this.Temp2 = Temp2;
+    }
+
+    public String getTemp3() {
+        return Temp3;
+    }
+
+    public void setTemp3(String Temp3) {
+        this.Temp3 = Temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/entity/ItemTB.java b/src/main/java/com/zy/third/erp/entity/ItemTB.java
new file mode 100644
index 0000000..b66982e
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/ItemTB.java
@@ -0,0 +1,217 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@NoArgsConstructor
+@TableName("erp_ItemTB")
+public class ItemTB implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId", type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableId(value = "ItemId", type = IdType.INPUT)
+    @TableField("ItemId")
+    private String ItemId;
+
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemCode")
+    private String ItemCode;
+
+    @TableField("ItemName")
+    @ApiModelProperty(value= "")
+    private String ItemName;
+
+    @TableField("ItemSpc")
+    @ApiModelProperty(value= "")
+    private String ItemSpc;
+
+    @TableField("ItemPic")
+    private String itemPic;
+
+    @TableField("ItemUnit")
+    @ApiModelProperty(value= "")
+    private String ItemUnit;
+
+    /**
+     * 姣涘澂銆佸崐鎴愬搧銆佹垚鍝�
+     */
+    @TableField("ItemKind")
+    @ApiModelProperty(value= "姣涘澂銆佸崐鎴愬搧銆佹垚鍝�")
+    private String ItemKind;
+
+    @ApiModelProperty(value= "")
+    @TableField("Remark")
+    private String Remark;
+
+    /**
+     * 00锛氭柊澧�  22锛氬垹闄�
+     */
+    @ApiModelProperty(value= "00锛氭柊澧�  22锛氬垹闄�")
+    @TableField("Flag")
+    private String Flag;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date MakeDate;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp1")
+    private String Temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp2")
+    private String Temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp3")
+    private String Temp3;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+
+
+//    ItemTB itemTB = new ItemTB(
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // [闈炵┖]
+//            null,    // 姣涘澂銆佸崐鎴愬搧銆佹垚鍝�
+//            null,    // 
+//            null,    // 00锛氭柊澧�  22锛氬垹闄�
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getItemId() {
+        return ItemId;
+    }
+
+    public void setItemId(String ItemID) {
+        this.ItemId = ItemID;
+    }
+
+    public String getItemCode() {
+        return ItemCode;
+    }
+
+    public void setItemCode(String ItemCode) {
+        this.ItemCode = ItemCode;
+    }
+
+    public String getItemName() {
+        return ItemName;
+    }
+
+    public void setItemName(String ItemName) {
+        this.ItemName = ItemName;
+    }
+
+    public String getItemSpc() {
+        return ItemSpc;
+    }
+
+    public void setItemSpc(String ItemSpc) {
+        this.ItemSpc = ItemSpc;
+    }
+
+    public String getItemUnit() {
+        return ItemUnit;
+    }
+
+    public void setItemUnit(String ItemUnit) {
+        this.ItemUnit = ItemUnit;
+    }
+
+    public String getItemKind() {
+        return ItemKind;
+    }
+
+    public void setItemKind(String ItemKind) {
+        this.ItemKind = ItemKind;
+    }
+
+    public String getRemark() {
+        return Remark;
+    }
+
+    public void setRemark(String remark) {
+        this.Remark = remark;
+    }
+
+    public String getFlag() {
+        return Flag;
+    }
+
+    public void setFlag(String flag) {
+        this.Flag = flag;
+    }
+
+    public Date getMakeDate() {
+        return MakeDate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.MakeDate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.MakeDate);
+    }
+
+    public void setMakeDate(Date makeDate) {
+        this.MakeDate = makeDate;
+    }
+
+    public String getTemp1() {
+        return Temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.Temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return Temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.Temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return Temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.Temp3 = temp3;
+    }
+
+
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/entity/ItemTBBak.java b/src/main/java/com/zy/third/erp/entity/ItemTBBak.java
new file mode 100644
index 0000000..4226fb9
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/ItemTBBak.java
@@ -0,0 +1,228 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@NoArgsConstructor
+@TableName("erp_ItemTB_bak")
+public class ItemTBBak implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    private Integer autoId;
+
+    @TableField("ItemId")
+    private String ItemID;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemCode")
+    private String ItemCode;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemName")
+    private String ItemName;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemSpc")
+    private String ItemSpc;
+
+    @TableField("ItemPic")
+    private String itemPic;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemUnit")
+    private String ItemUnit;
+
+    /**
+     * 姣涘澂銆佸崐鎴愬搧銆佹垚鍝�
+     */
+    @TableField("ItemKind")
+    @ApiModelProperty(value= "姣涘澂銆佸崐鎴愬搧銆佹垚鍝�")
+    private String ItemKind;
+
+    @ApiModelProperty(value= "")
+    @TableField("Remark")
+    private String remark;
+
+    /**
+     * 00锛氭柊澧�  22锛氬垹闄�
+     */
+    @ApiModelProperty(value= "00锛氭柊澧�  22锛氬垹闄�")
+    @TableField("Flag")
+    private String flag;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp1")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp2")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp3")
+    private String temp3;
+
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("DelDate")
+    private Date delDate;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+//    ItemTBBak itemTBBak = new ItemTBBak(
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // [闈炵┖]
+//            null,    // 姣涘澂銆佸崐鎴愬搧銆佹垚鍝�
+//            null,    // 
+//            null,    // 00锛氭柊澧�  22锛氬垹闄�
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getItemID() {
+        return ItemID;
+    }
+
+    public void setItemID(String ItemID) {
+        this.ItemID = ItemID;
+    }
+
+    public String getItemCode() {
+        return ItemCode;
+    }
+
+    public void setItemCode(String ItemCode) {
+        this.ItemCode = ItemCode;
+    }
+
+    public String getItemName() {
+        return ItemName;
+    }
+
+    public void setItemName(String ItemName) {
+        this.ItemName = ItemName;
+    }
+
+    public String getItemSpc() {
+        return ItemSpc;
+    }
+
+    public void setItemSpc(String ItemSpc) {
+        this.ItemSpc = ItemSpc;
+    }
+
+    public String getItemUnit() {
+        return ItemUnit;
+    }
+
+    public void setItemUnit(String ItemUnit) {
+        this.ItemUnit = ItemUnit;
+    }
+
+    public String getItemKind() {
+        return ItemKind;
+    }
+
+    public void setItemKind(String ItemKind) {
+        this.ItemKind = ItemKind;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getFlag() {
+        return flag;
+    }
+
+    public void setFlag(String flag) {
+        this.flag = flag;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getTemp1() {
+        return temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.temp3 = temp3;
+    }
+
+
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/entity/OutCancelTB.java b/src/main/java/com/zy/third/erp/entity/OutCancelTB.java
new file mode 100644
index 0000000..1623305
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/OutCancelTB.java
@@ -0,0 +1,73 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@TableName("erp_OutCancelTB")
+public class OutCancelTB implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId", type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+    public OutCancelTB() {}
+
+
+
+//    OutCancelTB outCancelTB = new OutCancelTB(
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/entity/OutCancelTBBak.java b/src/main/java/com/zy/third/erp/entity/OutCancelTBBak.java
new file mode 100644
index 0000000..c9345cf
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/OutCancelTBBak.java
@@ -0,0 +1,88 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@TableName("erp_OutCancelTB_bak")
+public class OutCancelTBBak implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId", type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("DelDate")
+    private String DelDate;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+    public OutCancelTBBak() {}
+
+    public OutCancelTBBak(String BillNo,Date makedate,String DelDate) {
+        this.BillNo = BillNo;
+        this.makedate = makedate;
+        this.DelDate = DelDate;
+    }
+
+//    OutCancelTBBak outCancelTBBak = new OutCancelTBBak(
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getDelDate() {
+        return DelDate;
+    }
+
+    public void setDelDate(String DelDate) {
+        this.DelDate = DelDate;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/entity/OutDetTb.java b/src/main/java/com/zy/third/erp/entity/OutDetTb.java
new file mode 100644
index 0000000..bd121a6
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/OutDetTb.java
@@ -0,0 +1,253 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@TableName("erp_OutDetTb")
+public class OutDetTb implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("iNo")
+    private Integer iNO;
+
+    @ApiModelProperty(value= "")
+    @TableField("DetId")
+    private Integer detId;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemId")
+    private String itemid;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemCode")
+    private String ItemCode;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemBatch")
+    private String itembatch;
+
+    @ApiModelProperty(value= "")
+    @TableField("proType")
+    private String protype;
+
+    @ApiModelProperty(value= "")
+    @TableField("OrderNo")
+    private String OrderNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("MainNum")
+    private Double MainNum;
+
+    @TableField("remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    private String temp3;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+//    @ApiModelProperty(value= "")
+//    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+//    @TableField("DelDate")
+//    private Date delDate;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+
+
+
+//    OutDetTb outDetTb = new OutDetTb(
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Integer getINO() {
+        return iNO;
+    }
+
+    public void setINO(Integer iNO) {
+        this.iNO = iNO;
+    }
+
+    public Integer getDetId() {
+        return detId;
+    }
+
+    public void setDetId(Integer detId) {
+        this.detId = detId;
+    }
+
+    public String getItemid() {
+        return itemid;
+    }
+
+    public void setItemid(String itemid) {
+        this.itemid = itemid;
+    }
+
+    public String getItemCode() {
+        return ItemCode;
+    }
+
+    public void setItemCode(String ItemCode) {
+        this.ItemCode = ItemCode;
+    }
+
+    public String getItembatch() {
+        return itembatch;
+    }
+
+    public void setItembatch(String itembatch) {
+        this.itembatch = itembatch;
+    }
+
+    public String getProtype() {
+        return protype;
+    }
+
+    public void setProtype(String protype) {
+        this.protype = protype;
+    }
+
+    public Double getMainNum() {
+        return MainNum;
+    }
+
+    public void setMainNum(Double MainNum) {
+        this.MainNum = MainNum;
+    }
+
+
+
+    public String getOrderNo() {
+        return OrderNo;
+    }
+
+    public void setOrderNo(String OrderNo) {
+        this.OrderNo = OrderNo;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.temp3 = temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/entity/OutDetTbBak.java b/src/main/java/com/zy/third/erp/entity/OutDetTbBak.java
new file mode 100644
index 0000000..7db4295
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/OutDetTbBak.java
@@ -0,0 +1,252 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@TableName("erp_OutDetTb_bak")
+public class OutDetTbBak implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("iNo")
+    private Integer iNO;
+
+    @ApiModelProperty(value= "")
+    @TableField("DetId")
+    private Integer detId;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemId")
+    private String itemid;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemCode")
+    private String ItemCode;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemBatch")
+    private String itembatch;
+
+    @ApiModelProperty(value= "")
+    @TableField("proType")
+    private String protype;
+
+    @ApiModelProperty(value= "")
+    @TableField("OrderNo")
+    private String OrderNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("MainNum")
+    private Double MainNum;
+
+    @ApiModelProperty(value= "")
+    @TableField("remark")
+    private String remark;
+
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    @TableField("temp1")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("temp2")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("temp3")
+    private String temp3;
+
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+    @TableField("DelDate")
+    private Date delDate;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+
+
+
+//    OutDetTbBak outDetTbBak = new OutDetTbBak(
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Integer getINO() {
+        return iNO;
+    }
+
+    public void setINO(Integer iNO) {
+        this.iNO = iNO;
+    }
+
+    public Integer getDetId() {
+        return detId;
+    }
+
+    public void setDetId(Integer detId) {
+        this.detId = detId;
+    }
+
+    public String getItemid() {
+        return itemid;
+    }
+
+    public void setItemid(String itemid) {
+        this.itemid = itemid;
+    }
+
+    public String getItemCode() {
+        return ItemCode;
+    }
+
+    public void setItemCode(String ItemCode) {
+        this.ItemCode = ItemCode;
+    }
+
+    public String getItembatch() {
+        return itembatch;
+    }
+
+    public void setItembatch(String itembatch) {
+        this.itembatch = itembatch;
+    }
+
+    public String getProtype() {
+        return protype;
+    }
+
+    public void setProtype(String protype) {
+        this.protype = protype;
+    }
+
+    public Double getMainNum() {
+        return MainNum;
+    }
+
+    public void setMainNum(Double MainNum) {
+        this.MainNum = MainNum;
+    }
+
+
+    public String getOrderNo() {
+        return OrderNo;
+    }
+
+    public void setOrderNo(String OrderNo) {
+        this.OrderNo = OrderNo;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.temp3 = temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/entity/OutHedTb.java b/src/main/java/com/zy/third/erp/entity/OutHedTb.java
new file mode 100644
index 0000000..3a0e141
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/OutHedTb.java
@@ -0,0 +1,203 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@TableName("erp_OutHedTb")
+public class OutHedTb implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId", type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableId(value = "BillNo", type = IdType.INPUT)
+    @TableField("BillNo")
+    private String BillNo;
+
+
+    @TableField("BillDate")
+//    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private String billDate;
+
+    /**
+     * SendMatOut:鍙戞枡鍑哄簱
+OtherOut:鍏跺畠鍑哄簱鍗�
+ItemMoveOut:璋冩嫧鍑哄簱
+ItemSwitchOut:褰㈡�佽浆鎹㈠嚭搴�
+CheckLossOut:鐩樼泩鍑哄簱鍗�
+
+     */
+    @ApiModelProperty(value= "SendMatOut:鍙戞枡鍑哄簱 ")
+    @TableField("IoKindID")
+    private String IoKindID;
+
+    @TableField("IoKindName")
+    private String ioKindName;
+
+    /**
+     * 閮ㄩ棬ID
+     */
+    @ApiModelProperty(value= "閮ㄩ棬ID")
+    @TableField("ObjectId")
+    private String OjectId;
+
+    /**
+     * 閮ㄩ棬鍚嶇О
+     */
+    @ApiModelProperty(value= "閮ㄩ棬鍚嶇О")
+    @TableField("ObjectName")
+    private String OjbectName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp1")
+    private String Temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp2")
+    private String Temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp3")
+    private String Temp3;
+
+
+    @ApiModelProperty(value= "")
+//    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private String makedate;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+    public OutHedTb(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+//    OutHedTb outHedTb = new OutHedTb(
+//            null,    // [闈炵┖]
+//            null,    // SendMatOut:鍙戞枡鍑哄簱
+
+
+//            null,    // 閮ㄩ棬ID
+//            null,    // 閮ㄩ棬鍚嶇О
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public String getIoKindID() {
+        return IoKindID;
+    }
+
+    public void setIoKindID(String IoKindID) {
+        this.IoKindID = IoKindID;
+    }
+
+    public String getOjectId() {
+        return OjectId;
+    }
+
+    public void setOjectId(String OjectId) {
+        this.OjectId = OjectId;
+    }
+
+    public String getOjbectName() {
+        return OjbectName;
+    }
+
+    public void setOjbectName(String OjbectName) {
+        this.OjbectName = OjbectName;
+    }
+
+//    public Date getMakedate() {
+//        return makedate;
+//    }
+//
+//    public String getMakedate$(){
+//        if (Cools.isEmpty(this.makedate)){
+//            return "";
+//        }
+//        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+//    }
+//
+//    public void setMakedate(Date makedate) {
+//        this.makedate = makedate;
+//    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return Temp1;
+    }
+
+    public void setTemp1(String Temp1) {
+        this.Temp1 = Temp1;
+    }
+
+    public String getTemp2() {
+        return Temp2;
+    }
+
+    public void setTemp2(String Temp2) {
+        this.Temp2 = Temp2;
+    }
+
+    public String getTemp3() {
+        return Temp3;
+    }
+
+    public void setTemp3(String Temp3) {
+        this.Temp3 = Temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/entity/OutHedTbBak.java b/src/main/java/com/zy/third/erp/entity/OutHedTbBak.java
new file mode 100644
index 0000000..04910e7
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/entity/OutHedTbBak.java
@@ -0,0 +1,203 @@
+package com.zy.third.erp.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@TableName("erp_OutHedTb_bak")
+public class OutHedTbBak implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @TableField("BillDate")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date billDate;
+
+    /**
+     * SendMatOut:鍙戞枡鍑哄簱
+OtherOut:鍏跺畠鍑哄簱鍗�
+ItemMoveOut:璋冩嫧鍑哄簱
+ItemSwitchOut:褰㈡�佽浆鎹㈠嚭搴�
+CheckLossOut:鐩樼泩鍑哄簱鍗�
+
+     */
+    @ApiModelProperty(value= "SendMatOut:鍙戞枡鍑哄簱 ")
+    @TableField("IoKindID")
+    private String IoKindID;
+
+    @TableField("IoKindName")
+    private String ioKindName;
+
+    /**
+     * 閮ㄩ棬ID
+     */
+    @ApiModelProperty(value= "閮ㄩ棬ID")
+    @TableField("ObjectId")
+    private String OjectId;
+
+    /**
+     * 閮ㄩ棬鍚嶇О
+     */
+    @ApiModelProperty(value= "閮ㄩ棬鍚嶇О")
+    @TableField("ObjectName")
+    private String OjbectName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp1")
+    private String Temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp2")
+    private String Temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp3")
+    private String Temp3;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+
+    @TableField("DelDate")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date delDate;
+
+    @ApiModelProperty(value= "")
+    @TableField("LKName")
+    private String LKName;
+
+//    OutHedTbBak outHedTbBak = new OutHedTbBak(
+//            null,    // [闈炵┖]
+//            null,    // SendMatOut:鍙戞枡鍑哄簱
+
+
+//            null,    // 閮ㄩ棬ID
+//            null,    // 閮ㄩ棬鍚嶇О
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public String getIoKindID() {
+        return IoKindID;
+    }
+
+    public void setIoKindID(String IoKindID) {
+        this.IoKindID = IoKindID;
+    }
+
+    public String getOjectId() {
+        return OjectId;
+    }
+
+    public void setOjectId(String OjectId) {
+        this.OjectId = OjectId;
+    }
+
+    public String getOjbectName() {
+        return OjbectName;
+    }
+
+    public void setOjbectName(String OjbectName) {
+        this.OjbectName = OjbectName;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return Temp1;
+    }
+
+    public void setTemp1(String Temp1) {
+        this.Temp1 = Temp1;
+    }
+
+    public String getTemp2() {
+        return Temp2;
+    }
+
+    public void setTemp2(String Temp2) {
+        this.Temp2 = Temp2;
+    }
+
+    public String getTemp3() {
+        return Temp3;
+    }
+
+    public void setTemp3(String Temp3) {
+        this.Temp3 = Temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/erp/task/ERPItemScheduler.java b/src/main/java/com/zy/third/erp/task/ERPItemScheduler.java
new file mode 100644
index 0000000..c9f26a1
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/task/ERPItemScheduler.java
@@ -0,0 +1,63 @@
+package com.zy.third.erp.task;
+
+import com.zy.common.service.erp.ErpSqlServer;
+import com.zy.third.erp.entity.ItemTB;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component
+public class ERPItemScheduler {
+    @Value("${erp.enabled}")
+    private Boolean erpEnabled;
+
+    @Autowired
+    private ERPItemSchedulerMS erpItemSchedulerMS;
+
+    @Autowired
+    private ErpSqlServer erpSqlServer;
+
+    @Scheduled(cron = "${erp.refreshtime}")
+    public void ItemScheduler() {
+        if (!erpEnabled) return;
+
+//        String selectALL = "SELECT AutoId AS autoId,ItemId AS ItemID,ItemCode AS ItemCode,ItemName AS ItemName ,ItemSpc AS ItemSpc,ItemPic AS itemPic,ItemUnit AS ItemUnit,ItemKind AS ItemKind ,Remark AS remark ,Flag AS flag ,MakeDate AS makedate,Temp1 AS temp1,Temp2 AS temp2 ,Temp3 AS temp3 FROM dbo.erp_ItemTB";
+//        List<ItemTB> itemTBS = erpSqlServer.select(selectALL, ItemTB.class);
+//        List<ItemTB> itemTBS = erpSqlServer.selectAll(ItemTB.class);
+
+        String sqlItemTB = "select * from erp_ItemTB where LKName='涓壃'";
+        List<ItemTB> itemTBS = erpSqlServer.select(sqlItemTB, ItemTB.class);
+        if (itemTBS != null && itemTBS.size() > 0) {
+            for (ItemTB itemTB : itemTBS) {
+                //00浠h〃鏂板
+                if (itemTB.getFlag().equals("00")) {
+                    erpItemSchedulerMS.addToMainDatabase(itemTB);
+                }
+                //22浠h〃鍒犻櫎
+                if (itemTB.getFlag().equals("22")) {
+                    erpItemSchedulerMS.deleteFromMainDatabase(itemTB);
+                }
+                moveToBak(itemTB);
+            }
+        }
+    }
+
+    /**
+     * 鏁版嵁搴撻噷鏈夎Е鍙戝櫒,褰搃tem琛ㄧ殑鏁版嵁琚垹闄ゆ椂,浼氳嚜鍔ㄥ悜item_bak娣诲姞,涓嶇敤鍗歌浇浠g爜閲�
+     *
+     * @param itemTB
+     */
+    //灏嗘暟鎹粠涓昏〃绉诲姩鍒癰ak琛ㄩ噷
+    private void moveToBak(ItemTB itemTB) {
+//        ItemTBBak itemTBBak = new ItemTBBak();
+//        BeanUtils.copyProperties(itemTB, itemTBBak);
+//        itemTBBak.setDelDate(new Date());
+//        erpItemTBBakMapper.insert(itemTBBak);
+        erpSqlServer.update("delete from erp_ItemTB where LKName='涓壃' and ItemId = '" + itemTB.getItemId() + "'");
+//        erpItemTBMapper.delete(new EntityWrapper<ItemTB>()
+//                .eq("ItemId",itemTB.getItemID()));
+    }
+}
diff --git a/src/main/java/com/zy/third/erp/task/ERPItemSchedulerMS.java b/src/main/java/com/zy/third/erp/task/ERPItemSchedulerMS.java
new file mode 100644
index 0000000..58d2c65
--- /dev/null
+++ b/src/main/java/com/zy/third/erp/task/ERPItemSchedulerMS.java
@@ -0,0 +1,123 @@
+package com.zy.third.erp.task;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.core.common.Cools;
+import com.core.exception.CoolException;
+import com.zy.asrs.entity.Mat;
+import com.zy.asrs.entity.MatCode;
+import com.zy.asrs.entity.Tag;
+import com.zy.asrs.entity.param.MatSyncParam;
+import com.zy.asrs.mapper.MatCodeMapper;
+import com.zy.asrs.mapper.MatMapper;
+import com.zy.asrs.mapper.TagMapper;
+import com.zy.asrs.service.MatService;
+import com.zy.asrs.service.TagService;
+import com.zy.common.utils.NodeUtils;
+import com.zy.third.erp.entity.ItemTB;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+
+@Slf4j
+@Component
+public class ERPItemSchedulerMS {
+
+    @Autowired
+    private MatService matService;
+
+    @Autowired
+    private TagService tagService;
+
+    @Autowired
+    private TagMapper tagMapper;
+
+    @Autowired
+    private MatMapper matMapper;
+
+    /**
+     * 灏嗙墿鏂欎腑闂磋〃鏁版嵁鍚屾鍒扮珛搴撶墿鏂欏熀纭�鏁版嵁锛屽鏋滄病鏈夊垯鎻掑叆锛屽鏋滄湁鍒欐洿鏂�
+     *
+     * @param itemTB,鐗╂枡瀹炰綋绫�
+     */
+    protected void addToMainDatabase(ItemTB itemTB) {
+        Date now = new Date();
+        Mat mat = matService.selectByMatnr(itemTB.getItemId());
+        if (mat == null) {
+            mat = new Mat();
+            Tag priTag = null;
+            if (!Cools.isEmpty(itemTB.getItemKind())) {
+                priTag = tagService.selectByName(itemTB.getItemKind(), 2);
+                if (priTag == null) {
+                    Tag top = tagService.getTop();
+                    NodeUtils nodeUtils = new NodeUtils();
+                    nodeUtils.executePath(top.getId());
+                    priTag = new Tag(
+                            null,    // 缂栧彿
+                            itemTB.getItemKind(),    // 鍚嶇О
+                            top.getId(),    // 鐖剁骇
+                            top.getName(),    // 鐖剁骇鍚嶇О
+                            nodeUtils.path.toString(),    // 鍏宠仈璺緞
+                            nodeUtils.pathName.toString(),    // 鍏宠仈璺緞鍚�
+                            0,    // 绫诲瀷
+                            null,    // 璐熻矗浜�
+                            null,    // 鍥剧墖
+                            null,    // 绠�瑕佹弿杩�
+                            null,    // 鏁伴噺
+                            2,    // 绛夌骇
+                            null,    // 鎺掑簭
+                            1,    // 鐘舵��
+                            now,    // 娣诲姞鏃堕棿
+                            null,    // 娣诲姞浜哄憳
+                            now,    // 淇敼鏃堕棿
+                            null,    // 淇敼浜哄憳
+                            null    // 澶囨敞
+                    );
+                    if (tagMapper.insert(priTag) == 0) {
+                        throw new CoolException("鏈嶅姟鍣ㄥ唴閮ㄩ敊璇紝璇疯仈绯荤鐞嗗憳");
+                    }
+                }
+            }
+            priTag = tagService.selectByName(itemTB.getItemKind(), 2);
+            mat = sync(mat, itemTB);
+
+            mat.setTagId(priTag.getId());
+            mat.setStatus(1);
+            mat.setCreateTime(now);
+            mat.setUpdateTime(now);
+            if (!matService.insert(mat)) {
+                throw new CoolException("鏈嶅姟鍣ㄥ唴閮ㄩ敊璇紝璇疯仈绯荤鐞嗗憳");
+            } else {
+                log.info("鍚屾鏂扮墿鏂橻鍟嗗搧缂栧彿锛歿}]", mat.getMatnr());
+            }
+        } else {
+            mat = sync(mat, itemTB);
+            if (!matService.update(mat, new EntityWrapper<Mat>().eq("matnr", itemTB.getItemId()))) {
+                throw new CoolException("鏇存柊宸插瓨鍦ㄥ晢鍝佷俊鎭け璐ワ紝璇疯仈绯荤鐞嗗憳");
+            }
+        }
+    }
+
+    private Mat sync(Mat mat, ItemTB itemTB) {
+        mat.setMaktx(itemTB.getItemName());
+        mat.setMatnr(itemTB.getItemId());
+        mat.setSpecs(itemTB.getItemSpc());
+        mat.setUnit(itemTB.getItemUnit());
+        return mat;
+    }
+
+    /**
+     * 鍒犻櫎ASRS鐗╂枡閫氱煡妗f暟鎹�
+     *
+     * @param itemTB,鐗╂枡瀹炰綋绫�
+     */
+    protected void deleteFromMainDatabase(ItemTB itemTB) {
+        EntityWrapper<Mat> matCodeEntityWrapper = new EntityWrapper<>();
+        matCodeEntityWrapper.eq("matnr", itemTB.getItemId());
+        matMapper.delete(matCodeEntityWrapper);
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/lk/entity/ErpLKStorage.java b/src/main/java/com/zy/third/lk/entity/ErpLKStorage.java
new file mode 100644
index 0000000..4f715bb
--- /dev/null
+++ b/src/main/java/com/zy/third/lk/entity/ErpLKStorage.java
@@ -0,0 +1,69 @@
+package com.zy.third.lk.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+@NoArgsConstructor
+@Data
+@TableName("vwErpLKStorage")
+public class ErpLKStorage implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value= "")
+    @TableField("WareId")
+    private String wareId;
+
+    @ApiModelProperty(value= "")
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemId")
+    private String itemId;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemCode")
+    private String itemCode;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemName")
+    private String itemName;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemSpc")
+    private String itemSpc;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemUnit")
+    private String itemUnit;
+
+    @ApiModelProperty(value= "")
+    @TableField("ProType")
+    private String protype;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemBatch")
+    private String itemBatch;
+
+    @ApiModelProperty(value= "")
+    @TableField("NumIs")
+    private Double numis;
+
+
+}
diff --git a/src/main/java/com/zy/third/lk/entity/InCancelTB.java b/src/main/java/com/zy/third/lk/entity/InCancelTB.java
new file mode 100644
index 0000000..d925142
--- /dev/null
+++ b/src/main/java/com/zy/third/lk/entity/InCancelTB.java
@@ -0,0 +1,96 @@
+package com.zy.third.lk.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@NoArgsConstructor
+@TableName("lk_InCancelTB")
+public class InCancelTB implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value= "")
+    @TableId(value = "AutoId", type = IdType.AUTO)
+    private Integer AutoId;
+
+    @ApiModelProperty(value= "")
+    @TableId(value = "BillNo", type = IdType.INPUT)
+    @TableField(value = "BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("opFlag")
+    private Integer opFlag;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date MakeDate;
+
+
+
+
+//    InCancelTB inCancelTB = new InCancelTB(
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null    // 
+//    );
+
+    public Integer getAutoId() {
+        return AutoId;
+    }
+
+    public void setAutoId(Integer AutoId) {
+        this.AutoId = AutoId;
+    }
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Integer getOpFlag() {
+        return opFlag;
+    }
+
+    public void setOpFlag(Integer opFlag) {
+        this.opFlag = opFlag;
+    }
+
+    public Date getMakeDate() {
+        return MakeDate;
+    }
+
+    public String getMakeDate$(){
+        if (Cools.isEmpty(this.MakeDate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.MakeDate);
+    }
+
+    public void setMakeDate(Date MakeDate) {
+        this.MakeDate = MakeDate;
+    }
+
+
+
+}
diff --git a/src/main/java/com/zy/third/lk/entity/InDetTB.java b/src/main/java/com/zy/third/lk/entity/InDetTB.java
new file mode 100644
index 0000000..d74bfc9
--- /dev/null
+++ b/src/main/java/com/zy/third/lk/entity/InDetTB.java
@@ -0,0 +1,243 @@
+package com.zy.third.lk.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@NoArgsConstructor
+@AllArgsConstructor
+@Data
+@TableName("LK_InDetTB")
+public class InDetTB implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    private Integer autoId;
+
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("iNo")
+    private Integer iNO;
+
+    @ApiModelProperty(value= "")
+    @TableField("DetId")
+    private Integer detId;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemId")
+    private String itemid;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemCode")
+    private String ItemCode;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemBatch")
+    private String ItemBatch;
+
+    @ApiModelProperty(value= "")
+    @TableField("proType")
+    private String protype;
+
+    @ApiModelProperty(value= "")
+    @TableField("OrderNo")
+    private String OrderNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("MainNum")
+    private Double MainNum;
+
+
+    @ApiModelProperty(value= "")
+    @TableField("remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    private String temp3;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+
+
+//    InDetTB inDetTB = new InDetTB(
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Integer getINO() {
+        return iNO;
+    }
+
+    public void setINO(Integer iNO) {
+        this.iNO = iNO;
+    }
+
+    public Integer getDetId() {
+        return detId;
+    }
+
+    public void setDetId(Integer detId) {
+        this.detId = detId;
+    }
+
+    public String getItemid() {
+        return itemid;
+    }
+
+    public void setItemid(String itemid) {
+        this.itemid = itemid;
+    }
+
+    public String getItemCode() {
+        return ItemCode;
+    }
+
+    public void setItemCode(String ItemCode) {
+        this.ItemCode = ItemCode;
+    }
+
+    public String getItemBatch() {
+        return ItemBatch;
+    }
+
+    public void setItemBatch(String ItemBatch) {
+        this.ItemBatch = ItemBatch;
+    }
+
+    public String getProtype() {
+        return protype;
+    }
+
+    public void setProtype(String protype) {
+        this.protype = protype;
+    }
+
+    public Double getMainNum() {
+        return MainNum;
+    }
+
+    public void setMainNum(Double MainNum) {
+        this.MainNum = MainNum;
+    }
+
+    public String getOrderNo() {
+        return OrderNo;
+    }
+
+    public void setOrderNo(String OrderNo) {
+        this.OrderNo = OrderNo;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.temp3 = temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/lk/entity/InDetTBBak.java b/src/main/java/com/zy/third/lk/entity/InDetTBBak.java
new file mode 100644
index 0000000..34ab6ff
--- /dev/null
+++ b/src/main/java/com/zy/third/lk/entity/InDetTBBak.java
@@ -0,0 +1,259 @@
+package com.zy.third.lk.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@TableName("lk_InDetTB_bak")
+public class InDetTBBak implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("iNo")
+    private Integer iNO;
+
+    @ApiModelProperty(value= "")
+    @TableField("DetId")
+    private Integer detId;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemId")
+    private String itemid;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemCode")
+    private String ItemCode;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemBatch")
+    private String ItemBatch;
+
+    @ApiModelProperty(value= "")
+    @TableField("proType")
+    private String protype;
+
+    @ApiModelProperty(value= "")
+    @TableField("OrderNo")
+    private String OrderNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("MainNum")
+    private Double MainNum;
+
+    @ApiModelProperty(value= "")
+    @TableField("remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    private String temp3;
+
+
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+    @TableField("DelDate")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date DelDate;
+
+
+
+    public InDetTBBak() {}
+
+    public InDetTBBak(String BillNo,Integer iNO,Integer detId,String itemid,String ItemCode,String ItemBatch,String protype,Double MainNum,String OrderNo,Date makedate,String remark,String temp1,String temp2,String temp3) {
+        this.BillNo = BillNo;
+        this.iNO = iNO;
+        this.detId = detId;
+        this.itemid = itemid;
+        this.ItemCode = ItemCode;
+        this.ItemBatch = ItemBatch;
+        this.protype = protype;
+        this.MainNum = MainNum;
+        this.OrderNo = OrderNo;
+        this.makedate = makedate;
+        this.remark = remark;
+        this.temp1 = temp1;
+        this.temp2 = temp2;
+        this.temp3 = temp3;
+    }
+
+//    InDetTBBak inDetTBBak = new InDetTBBak(
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Integer getINO() {
+        return iNO;
+    }
+
+    public void setINO(Integer iNO) {
+        this.iNO = iNO;
+    }
+
+    public Integer getDetId() {
+        return detId;
+    }
+
+    public void setDetId(Integer detId) {
+        this.detId = detId;
+    }
+
+    public String getItemid() {
+        return itemid;
+    }
+
+    public void setItemid(String itemid) {
+        this.itemid = itemid;
+    }
+
+    public String getItemCode() {
+        return ItemCode;
+    }
+
+    public void setItemCode(String ItemCode) {
+        this.ItemCode = ItemCode;
+    }
+
+    public String getItemBatch() {
+        return ItemBatch;
+    }
+
+    public void setItemBatch(String ItemBatch) {
+        this.ItemBatch = ItemBatch;
+    }
+
+    public String getProtype() {
+        return protype;
+    }
+
+    public void setProtype(String protype) {
+        this.protype = protype;
+    }
+
+    public Double getMainNum() {
+        return MainNum;
+    }
+
+    public void setMainNum(Double MainNum) {
+        this.MainNum = MainNum;
+    }
+
+    public String getOrderNo() {
+        return OrderNo;
+    }
+
+    public void setOrderNo(String OrderNo) {
+        this.OrderNo = OrderNo;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.temp3 = temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/lk/entity/InHedTB.java b/src/main/java/com/zy/third/lk/entity/InHedTB.java
new file mode 100644
index 0000000..eb20462
--- /dev/null
+++ b/src/main/java/com/zy/third/lk/entity/InHedTB.java
@@ -0,0 +1,207 @@
+package com.zy.third.lk.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@NoArgsConstructor
+@AllArgsConstructor
+@Data
+@TableName("lk_InHedTB")
+public class InHedTB implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableId(value = "BillNo", type = IdType.INPUT)
+    @TableField("BillNo")
+    private String BillNo;
+
+    @TableField("BillDate")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date billDate;
+
+    /**
+     * StockIn:閲囪喘鍏ュ簱
+ProductIn:鎴愬搧鍏ュ簱鍗�
+ItemMoveIn:璋冩嫧鍏ュ簱
+ItemSwitchIn:褰㈡�佽浆鎹㈠叆搴�
+CheckMoreIn:鐩樼泩鍏ュ簱鍗�
+
+     */
+    @ApiModelProperty(value= "StockIn:閲囪喘鍏ュ簱 ")
+    @TableField("IoKindID")
+    private String IoKindID;
+
+
+    @TableField("IoKindName")
+    private String ioKindName;
+
+    /**
+     * 渚涘簲鍟嗐�侀儴闂↖D
+     */
+    @ApiModelProperty(value= "渚涘簲鍟嗐�侀儴闂↖D")
+    @TableField("ObjectId")
+    private String OjectId;
+
+    /**
+     * 渚涘簲鍟嗐�侀儴闂ㄥ悕绉�
+     */
+    @ApiModelProperty(value= "渚涘簲鍟嗐�侀儴闂ㄥ悕绉�")
+    @TableField("ObjectName")
+    private String OjbectName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp1")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp2")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp3")
+    private String temp3;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+    @TableField("bPass")
+    private Boolean bPass;
+
+    @TableField("bStartIn")
+    private Boolean bStartIn;
+
+
+
+
+
+//    InHedTB inHedTB = new InHedTB(
+//            null,    // [闈炵┖]
+//            null,    // StockIn:閲囪喘鍏ュ簱
+
+
+//            null,    // 渚涘簲鍟嗐�侀儴闂↖D
+//            null,    // 渚涘簲鍟嗐�侀儴闂ㄥ悕绉�
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public String getIoKindID() {
+        return IoKindID;
+    }
+
+    public void setIoKindID(String IoKindID) {
+        this.IoKindID = IoKindID;
+    }
+
+    public String getOjectId() {
+        return OjectId;
+    }
+
+    public void setOjectId(String OjectId) {
+        this.OjectId = OjectId;
+    }
+
+    public String getOjbectName() {
+        return OjbectName;
+    }
+
+    public void setOjbectName(String OjbectName) {
+        this.OjbectName = OjbectName;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.temp3 = temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/lk/entity/InHedTBBak.java b/src/main/java/com/zy/third/lk/entity/InHedTBBak.java
new file mode 100644
index 0000000..bb95ed7
--- /dev/null
+++ b/src/main/java/com/zy/third/lk/entity/InHedTBBak.java
@@ -0,0 +1,212 @@
+package com.zy.third.lk.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@TableName("lk_InHedTB_bak")
+public class InHedTBBak implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @TableField("BillDate")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date billDate;
+
+    /**
+     * StockIn:閲囪喘鍏ュ簱
+ProductIn:鎴愬搧鍏ュ簱鍗�
+ItemMoveIn:璋冩嫧鍏ュ簱
+ItemSwitchIn:褰㈡�佽浆鎹㈠叆搴�
+CheckMoreIn:鐩樼泩鍏ュ簱鍗�
+
+     */
+    @ApiModelProperty(value= "StockIn:閲囪喘鍏ュ簱 ")
+    @TableField("IoKindID")
+    private String IoKindID;
+
+    @TableField("IoKindName")
+    private String ioKindName;
+
+    /**
+     * 渚涘簲鍟嗐�侀儴闂↖D
+     */
+    @ApiModelProperty(value= "渚涘簲鍟嗐�侀儴闂↖D")
+    @TableField("ObjectId")
+    private String OjectId;
+
+    /**
+     * 渚涘簲鍟嗐�侀儴闂ㄥ悕绉�
+     */
+    @ApiModelProperty(value= "渚涘簲鍟嗐�侀儴闂ㄥ悕绉�")
+    @TableField("ObjectName")
+    private String OjbectName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp1")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp2")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp3")
+    private String temp3;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+    @TableField("DelDate")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date delDate;
+
+
+    @TableField("bPass")
+    private Boolean bPass;
+
+    @TableField("bStartIn")
+    private Boolean bStartIn;
+
+    public InHedTBBak() {}
+
+    public InHedTBBak(String BillNo,String IoKindID,String OjectId,String OjbectName,Date makedate,String remark,String temp1,String temp2,String temp3) {
+        this.BillNo = BillNo;
+        this.IoKindID = IoKindID;
+        this.OjectId = OjectId;
+        this.OjbectName = OjbectName;
+        this.makedate = makedate;
+        this.remark = remark;
+        this.temp1 = temp1;
+        this.temp2 = temp2;
+        this.temp3 = temp3;
+    }
+
+//    InHedTBBak inHedTBBak = new InHedTBBak(
+//            null,    // [闈炵┖]
+//            null,    // StockIn:閲囪喘鍏ュ簱
+
+//            null,    // 渚涘簲鍟嗐�侀儴闂↖D
+//            null,    // 渚涘簲鍟嗐�侀儴闂ㄥ悕绉�
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public String getIoKindID() {
+        return IoKindID;
+    }
+
+    public void setIoKindID(String IoKindID) {
+        this.IoKindID = IoKindID;
+    }
+
+    public String getOjectId() {
+        return OjectId;
+    }
+
+    public void setOjectId(String OjectId) {
+        this.OjectId = OjectId;
+    }
+
+    public String getOjbectName() {
+        return OjbectName;
+    }
+
+    public void setOjbectName(String OjbectName) {
+        this.OjbectName = OjbectName;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.temp3 = temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/lk/entity/LKCheckDetTB.java b/src/main/java/com/zy/third/lk/entity/LKCheckDetTB.java
new file mode 100644
index 0000000..674d498
--- /dev/null
+++ b/src/main/java/com/zy/third/lk/entity/LKCheckDetTB.java
@@ -0,0 +1,95 @@
+package com.zy.third.lk.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@TableName("lk_CheckDetTB")
+public class LKCheckDetTB implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value= "")
+    @TableId(value = "AutoId", type = IdType.AUTO)
+    @TableField("AutoId")
+    private Integer AutoId;
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("iNo")
+    private Integer iNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemId")
+    private String ItemId;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemCode")
+    private String ItemCode;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemBatch")
+    private String ItemBatch;
+
+    @ApiModelProperty(value= "")
+    @TableField("proType")
+    private String proType;
+
+    @ApiModelProperty(value= "")
+    @TableField("OrderNo")
+    private String OrderNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("CheckNum")
+    private Double CheckNum;
+
+    @ApiModelProperty(value= "")
+    @TableField("remark")
+    private String remark;
+
+    @ApiModelProperty(value= "")
+    @TableField("temp1")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("temp2")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("temp3")
+    private String temp3;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date MakeDate;
+
+    public LKCheckDetTB() {}
+
+    public String getMakeDate$(){
+        if (Cools.isEmpty(this.MakeDate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.MakeDate);
+    }
+
+    public void setMakeDate(Date MakeDate) {
+        this.MakeDate = MakeDate;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/lk/entity/LKCheckHedTB.java b/src/main/java/com/zy/third/lk/entity/LKCheckHedTB.java
new file mode 100644
index 0000000..0791b9b
--- /dev/null
+++ b/src/main/java/com/zy/third/lk/entity/LKCheckHedTB.java
@@ -0,0 +1,212 @@
+package com.zy.third.lk.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@TableName("lk_CheckHedTB")
+public class LKCheckHedTB implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value= "")
+    @TableId(value = "AutoId", type = IdType.AUTO)
+    private Integer AutoId;
+
+    @ApiModelProperty(value= "")
+    @TableId(value = "BillNo", type = IdType.INPUT)
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("BillDate")
+    private Date BillDate;
+
+    @ApiModelProperty(value= "")
+    @TableField("Remark")
+    private String Remark;
+
+    @ApiModelProperty(value= "")
+    @TableField("WareId")
+    private String WareId;
+
+    @ApiModelProperty(value= "")
+    @TableField("WareName")
+    private String WareName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp1")
+    private String Temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp2")
+    private String Temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp3")
+    private String Temp3;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date MakeDate;
+
+    @ApiModelProperty(value= "")
+    @TableField("bPass")
+    private Boolean bPass;
+
+    @ApiModelProperty(value= "")
+    @TableField("bStartIn")
+    private Boolean bStartIn;
+
+    public LKCheckHedTB() {}
+
+    public LKCheckHedTB(String BillNo, Date BillDate, String Remark, String WareId, String WareName, String Temp1, String Temp2, String Temp3, Date MakeDate, Boolean bPass, Boolean bStartIn) {
+        this.BillNo = BillNo;
+        this.BillDate = BillDate;
+        this.Remark = Remark;
+        this.WareId = WareId;
+        this.WareName = WareName;
+        this.Temp1 = Temp1;
+        this.Temp2 = Temp2;
+        this.Temp3 = Temp3;
+        this.MakeDate = MakeDate;
+        this.bPass = bPass;
+        this.bStartIn = bStartIn;
+    }
+
+//    LKCheckHedTB checkHedTB = new LKCheckHedTB(
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public Integer getAutoId() {
+        return AutoId;
+    }
+
+    public void setAutoId(Integer AutoId) {
+        this.AutoId = AutoId;
+    }
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Date getBillDate() {
+        return BillDate;
+    }
+
+    public String getBillDate$(){
+        if (Cools.isEmpty(this.BillDate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.BillDate);
+    }
+
+    public void setBillDate(Date BillDate) {
+        this.BillDate = BillDate;
+    }
+
+    public String getRemark() {
+        return Remark;
+    }
+
+    public void setRemark(String Remark) {
+        this.Remark = Remark;
+    }
+
+    public String getWareId() {
+        return WareId;
+    }
+
+    public void setWareId(String WareId) {
+        this.WareId = WareId;
+    }
+
+    public String getWareName() {
+        return WareName;
+    }
+
+    public void setWareName(String WareName) {
+        this.WareName = WareName;
+    }
+
+    public String getTemp1() {
+        return Temp1;
+    }
+
+    public void setTemp1(String Temp1) {
+        this.Temp1 = Temp1;
+    }
+
+    public String getTemp2() {
+        return Temp2;
+    }
+
+    public void setTemp2(String Temp2) {
+        this.Temp2 = Temp2;
+    }
+
+    public String getTemp3() {
+        return Temp3;
+    }
+
+    public void setTemp3(String Temp3) {
+        this.Temp3 = Temp3;
+    }
+
+    public Date getMakeDate() {
+        return MakeDate;
+    }
+
+    public String getMakeDate$(){
+        if (Cools.isEmpty(this.MakeDate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.MakeDate);
+    }
+
+    public void setMakeDate(Date MakeDate) {
+        this.MakeDate = MakeDate;
+    }
+
+    public Boolean getBPass() {
+        return bPass;
+    }
+
+    public void setBPass(Boolean bPass) {
+        this.bPass = bPass;
+    }
+
+    public Boolean getBStartIn() {
+        return bStartIn;
+    }
+
+    public void setBStartIn(Boolean bStartIn) {
+        this.bStartIn = bStartIn;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/lk/entity/OutCancelTB.java b/src/main/java/com/zy/third/lk/entity/OutCancelTB.java
new file mode 100644
index 0000000..f5be6de
--- /dev/null
+++ b/src/main/java/com/zy/third/lk/entity/OutCancelTB.java
@@ -0,0 +1,84 @@
+package com.zy.third.lk.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@TableName("lk_OutCancelTB")
+public class OutCancelTB implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableId(value = "BillNo", type = IdType.INPUT)
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("opFlag")
+    private String opFlag;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+
+
+    public OutCancelTB() {}
+
+
+//    OutCancelTB outCancelTB = new OutCancelTB(
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public String getOpFlag() {
+        return opFlag;
+    }
+
+    public void setOpFlag(String opFlag) {
+        this.opFlag = opFlag;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+
+
+}
diff --git a/src/main/java/com/zy/third/lk/entity/OutDetTb.java b/src/main/java/com/zy/third/lk/entity/OutDetTb.java
new file mode 100644
index 0000000..35dcb3c
--- /dev/null
+++ b/src/main/java/com/zy/third/lk/entity/OutDetTb.java
@@ -0,0 +1,248 @@
+package com.zy.third.lk.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@TableName("lk_OutDetTb")
+public class OutDetTb implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("iNo")
+    private Integer iNO;
+
+    @ApiModelProperty(value= "")
+    @TableField("DetId")
+    private Integer detId;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemId")
+    private String itemid;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemCode")
+    private String ItemCode;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemBatch")
+    private String ItemBatch;
+
+    @ApiModelProperty(value= "")
+    @TableField("proType")
+    private String protype;
+
+    @ApiModelProperty(value= "")
+    @TableField("OrderNo")
+    private String OrderNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("MainNum")
+    private Double MainNum;
+
+    @ApiModelProperty(value= "")
+    @TableField("remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    private String temp3;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("DelDate")
+    private Date delDate;
+
+
+
+//    OutDetTb outDetTb = new OutDetTb(
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Integer getINO() {
+        return iNO;
+    }
+
+    public void setINO(Integer iNO) {
+        this.iNO = iNO;
+    }
+
+    public Integer getDetId() {
+        return detId;
+    }
+
+    public void setDetId(Integer detId) {
+        this.detId = detId;
+    }
+
+    public String getItemid() {
+        return itemid;
+    }
+
+    public void setItemid(String itemid) {
+        this.itemid = itemid;
+    }
+
+    public String getItemCode() {
+        return ItemCode;
+    }
+
+    public void setItemCode(String ItemCode) {
+        this.ItemCode = ItemCode;
+    }
+
+    public String getItemBatch() {
+        return ItemBatch;
+    }
+
+    public void setItemBatch(String ItemBatch) {
+        this.ItemBatch = ItemBatch;
+    }
+
+    public String getProtype() {
+        return protype;
+    }
+
+    public void setProtype(String protype) {
+        this.protype = protype;
+    }
+
+    public Double getMainNum() {
+        return MainNum;
+    }
+
+    public void setMainNum(Double MainNum) {
+        this.MainNum = MainNum;
+    }
+
+
+    public String getOrderNo() {
+        return OrderNo;
+    }
+
+    public void setOrderNo(String OrderNo) {
+        this.OrderNo = OrderNo;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.temp3 = temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/lk/entity/OutDetTbBak.java b/src/main/java/com/zy/third/lk/entity/OutDetTbBak.java
new file mode 100644
index 0000000..4a0550f
--- /dev/null
+++ b/src/main/java/com/zy/third/lk/entity/OutDetTbBak.java
@@ -0,0 +1,247 @@
+package com.zy.third.lk.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@TableName("lk_OutDetTb_bak")
+public class OutDetTbBak implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    private Integer autoID;
+
+   @ApiModelProperty(value= "")
+   @TableField("BillNo")
+    private String BillNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("iNo")
+    private Integer iNO;
+
+    @ApiModelProperty(value= "")
+    @TableField("DetId")
+    private Integer detId;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemId")
+    private String itemid;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemCode")
+    private String ItemCode;
+
+    @ApiModelProperty(value= "")
+    @TableField("ItemBatch")
+    private String ItemBatch;
+
+    @ApiModelProperty(value= "")
+    @TableField("proType")
+    private String protype;
+
+    @ApiModelProperty(value= "")
+    @TableField("OrderNo")
+    private String OrderNo;
+
+    @ApiModelProperty(value= "")
+    @TableField("MainNum")
+    private Double MainNum;
+
+    @ApiModelProperty(value= "")
+    @TableField("remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    private String temp3;
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+    @TableField("DelDate")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date delDate;
+
+
+
+
+    public OutDetTbBak() {}
+
+
+
+//    OutDetTbBak outDetTbBak = new OutDetTbBak(
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // [闈炵┖]
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public Integer getINO() {
+        return iNO;
+    }
+
+    public void setINO(Integer iNO) {
+        this.iNO = iNO;
+    }
+
+    public Integer getDetId() {
+        return detId;
+    }
+
+    public void setDetId(Integer detId) {
+        this.detId = detId;
+    }
+
+    public String getItemid() {
+        return itemid;
+    }
+
+    public void setItemid(String itemid) {
+        this.itemid = itemid;
+    }
+
+    public String getItemCode() {
+        return ItemCode;
+    }
+
+    public void setItemCode(String ItemCode) {
+        this.ItemCode = ItemCode;
+    }
+
+    public String getItemBatch() {
+        return ItemBatch;
+    }
+
+    public void setItemBatch(String ItemBatch) {
+        this.ItemBatch = ItemBatch;
+    }
+
+    public String getProtype() {
+        return protype;
+    }
+
+    public void setProtype(String protype) {
+        this.protype = protype;
+    }
+
+    public Double getMainNum() {
+        return MainNum;
+    }
+
+    public void setMainNum(Double MainNum) {
+        this.MainNum = MainNum;
+    }
+
+
+
+    public String getOrderNo() {
+        return OrderNo;
+    }
+
+    public void setOrderNo(String OrderNo) {
+        this.OrderNo = OrderNo;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.temp3 = temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/lk/entity/OutHedTb.java b/src/main/java/com/zy/third/lk/entity/OutHedTb.java
new file mode 100644
index 0000000..9907038
--- /dev/null
+++ b/src/main/java/com/zy/third/lk/entity/OutHedTb.java
@@ -0,0 +1,197 @@
+package com.zy.third.lk.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@TableName("lk_OutHedTb")
+public class OutHedTb implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableId(value = "BillNo", type = IdType.INPUT)
+    @TableField("BillNo")
+    private String BillNo;
+
+    @TableField("BillDate")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date billDate;
+
+    /**
+     * SendMatOut:鍙戞枡鍑哄簱
+OtherOut:鍏跺畠鍑哄簱鍗�
+ItemMoveOut:璋冩嫧鍑哄簱
+ItemSwitchOut:褰㈡�佽浆鎹㈠嚭搴�
+CheckLossOut:鐩樼泩鍑哄簱鍗�
+
+     */
+    @ApiModelProperty(value= "SendMatOut:鍙戞枡鍑哄簱 ")
+    @TableField("IoKindID")
+    private String IoKindID;
+
+    @TableField("IoKindName")
+    private String ioKindName;
+
+    @ApiModelProperty(value= "")
+    @TableField("ObjectId")
+    private String OjectId;
+
+    @ApiModelProperty(value= "")
+    @TableField("ObjectName")
+    private String OjbectName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp1")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp2")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp3")
+    private String temp3;
+
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+
+    @TableField("bPass")
+    private Boolean bPass;
+
+    @TableField("bStartIn")
+    private Boolean bStartIn;
+
+
+//    OutHedTb outHedTb = new OutHedTb(
+//            null,    // [闈炵┖]
+//            null,    // SendMatOut:鍙戞枡鍑哄簱
+
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public String getIoKindID() {
+        return IoKindID;
+    }
+
+    public void setIoKindID(String IoKindID) {
+        this.IoKindID = IoKindID;
+    }
+
+    public String getOjectId() {
+        return OjectId;
+    }
+
+    public void setOjectId(String OjectId) {
+        this.OjectId = OjectId;
+    }
+
+    public String getOjbectName() {
+        return OjbectName;
+    }
+
+    public void setOjbectName(String OjbectName) {
+        this.OjbectName = OjbectName;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.temp3 = temp3;
+    }
+
+
+}
diff --git a/src/main/java/com/zy/third/lk/entity/OutHedTbBak.java b/src/main/java/com/zy/third/lk/entity/OutHedTbBak.java
new file mode 100644
index 0000000..9d41b57
--- /dev/null
+++ b/src/main/java/com/zy/third/lk/entity/OutHedTbBak.java
@@ -0,0 +1,206 @@
+package com.zy.third.lk.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@TableName("lk_OutHedTb_bak")
+public class OutHedTbBak implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "AutoId",type = IdType.AUTO)
+    private Integer autoId;
+
+    @ApiModelProperty(value= "")
+    @TableField("BillNo")
+    private String BillNo;
+
+    @TableField("BillDate")
+    private Date billDate;
+
+    /**
+     * SendMatOut:鍙戞枡鍑哄簱
+OtherOut:鍏跺畠鍑哄簱鍗�
+ItemMoveOut:璋冩嫧鍑哄簱
+ItemSwitchOut:褰㈡�佽浆鎹㈠嚭搴�
+CheckLossOut:鐩樼泩鍑哄簱鍗�
+
+     */
+    @ApiModelProperty(value= "SendMatOut:鍙戞枡鍑哄簱 ")
+    @TableField("IoKindID")
+    private String IoKindID;
+
+    @TableField("IoKindName")
+    private String ioKindName;
+
+    @ApiModelProperty(value= "")
+    @TableField("ObjectId")
+    private String OjectId;
+
+    @ApiModelProperty(value= "")
+    @TableField("ObjectName")
+    private String OjbectName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Remark")
+    private String remark;
+
+    @TableField("WareId")
+    private String wareId;
+
+    @TableField("WareName")
+    private String wareName;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp1")
+    private String temp1;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp2")
+    private String temp2;
+
+    @ApiModelProperty(value= "")
+    @TableField("Temp3")
+    private String temp3;
+
+
+    @ApiModelProperty(value= "")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("MakeDate")
+    private Date makedate;
+
+    @TableField("DelDate")
+    private Date delDate;
+
+    @TableField("bPass")
+    private Boolean bPass;
+
+    @TableField("bStartIn")
+    private Boolean bStartIn;
+
+
+    public OutHedTbBak() {}
+
+    public OutHedTbBak(String BillNo,String IoKindID,String OjectId,String OjbectName,Date makedate,String remark,String temp1,String temp2,String temp3) {
+        this.BillNo = BillNo;
+        this.IoKindID = IoKindID;
+        this.OjectId = OjectId;
+        this.OjbectName = OjbectName;
+        this.makedate = makedate;
+        this.remark = remark;
+        this.temp1 = temp1;
+        this.temp2 = temp2;
+        this.temp3 = temp3;
+    }
+
+//    OutHedTbBak outHedTbBak = new OutHedTbBak(
+//            null,    // [闈炵┖]
+//            null,    // SendMatOut:鍙戞枡鍑哄簱
+
+
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getBillNo() {
+        return BillNo;
+    }
+
+    public void setBillNo(String BillNo) {
+        this.BillNo = BillNo;
+    }
+
+    public String getIoKindID() {
+        return IoKindID;
+    }
+
+    public void setIoKindID(String IoKindID) {
+        this.IoKindID = IoKindID;
+    }
+
+    public String getOjectId() {
+        return OjectId;
+    }
+
+    public void setOjectId(String OjectId) {
+        this.OjectId = OjectId;
+    }
+
+    public String getOjbectName() {
+        return OjbectName;
+    }
+
+    public void setOjbectName(String OjbectName) {
+        this.OjbectName = OjbectName;
+    }
+
+    public Date getMakedate() {
+        return makedate;
+    }
+
+    public String getMakedate$(){
+        if (Cools.isEmpty(this.makedate)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate);
+    }
+
+    public void setMakedate(Date makedate) {
+        this.makedate = makedate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTemp1() {
+        return temp1;
+    }
+
+    public void setTemp1(String temp1) {
+        this.temp1 = temp1;
+    }
+
+    public String getTemp2() {
+        return temp2;
+    }
+
+    public void setTemp2(String temp2) {
+        this.temp2 = temp2;
+    }
+
+    public String getTemp3() {
+        return temp3;
+    }
+
+    public void setTemp3(String temp3) {
+        this.temp3 = temp3;
+    }
+
+
+}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index b511fd5..348bae0 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -99,4 +99,15 @@
     acctID: "647e849ab6fa0f"
     username: "llw"
     password: "666666"
-    lcid: 2052
\ No newline at end of file
+    lcid: 2052
+
+  #ERP鎺ュ彛
+  enabled: true
+  #  enabled: false
+  #鏌ョ湅ERP涓棿琛ㄩ棿闅�
+  refreshtime: 0/5 * * * * ?
+  db:
+    driver_class_name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+    url: jdbc:sqlserver://127.0.0.1:1433;databasename=XDLinkLK
+    username: sa
+    password: sa@123
diff --git a/src/main/resources/license.lic b/src/main/resources/license.lic
index c42fa89..91c89c5 100644
--- a/src/main/resources/license.lic
+++ b/src/main/resources/license.lic
Binary files differ

--
Gitblit v1.9.1