From 4391df3e02b3504738fb42f3b87a6f7f352f39ea Mon Sep 17 00:00:00 2001
From: lvleigang <957075182@qq.com>
Date: Fri, 6 Sep 2024 11:15:55 +0800
Subject: [PATCH] =?UTF-8?q?u8c=E5=B0=81=E8=A3=85=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../src/main/resources/application-llg.yml    |    2 +
 .../mdm/mdmModule/entity/MdmModuleEntity.xml  |   16 +-
 .../entity/EncapsulationEntity.xml            |    2 +
 .../service/IEncapsulationService.java        |    9 +
 .../service/impl/EncapsulationImpl.java       | 1048 ++++++++++++++---
 5 files changed, 914 insertions(+), 163 deletions(-)

diff --git a/buildpackage/src/main/resources/application-llg.yml b/buildpackage/src/main/resources/application-llg.yml
index 0a16527c..5953ca0d 100644
--- a/buildpackage/src/main/resources/application-llg.yml
+++ b/buildpackage/src/main/resources/application-llg.yml
@@ -42,6 +42,8 @@ spring:
 savefile:
   #    文件保存路径
   path: /Users/apple/Desktop/log/local
+  tomcatpath: /Users/apple/Desktop/log/local
+  pluginpath: /Users/apple/Desktop/log/local
 zt:
   url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
 cbs8:
diff --git a/service/src/main/java/com/hzya/frame/mdm/mdmModule/entity/MdmModuleEntity.xml b/service/src/main/java/com/hzya/frame/mdm/mdmModule/entity/MdmModuleEntity.xml
index ae5903a8..bd141eed 100644
--- a/service/src/main/java/com/hzya/frame/mdm/mdmModule/entity/MdmModuleEntity.xml
+++ b/service/src/main/java/com/hzya/frame/mdm/mdmModule/entity/MdmModuleEntity.xml
@@ -962,19 +962,25 @@ where id = #{id}
                     ${item.leftBracket} ${item.filedId}
                     <choose>
                         <when test="item.compareType == '1'.toString() ">
-                            =
+                            = #{item.filedVaule}
                         </when>
                         <when test="item.compareType == '2'.toString() ">
-                           !=
+                           != #{item.filedVaule}
                         </when>
                         <when test="item.compareType == '3'.toString() ">
-                            &gt;
+                            &gt; #{item.filedVaule}
                         </when>
                         <when test="item.compareType == '4'.toString() ">
-                            &lt;
+                            &lt; #{item.filedVaule}
+                        </when>
+                        <when test="item.compareType == '5'.toString() ">
+                            like concat('%',#{item.filedVaule},'%')
+                        </when>
+                        <when test="item.compareType == '6'.toString() ">
+                            not like concat('%',#{item.filedVaule},'%')
                         </when>
                     </choose>
-                    #{item.filedVaule}
+
                     <choose>
                         <when test="item.connectionSymbol == '1'.toString() ">
                             <choose>
diff --git a/service/src/main/java/com/hzya/frame/u8c/Encapsulation/entity/EncapsulationEntity.xml b/service/src/main/java/com/hzya/frame/u8c/Encapsulation/entity/EncapsulationEntity.xml
index f911f81e..c50f9002 100644
--- a/service/src/main/java/com/hzya/frame/u8c/Encapsulation/entity/EncapsulationEntity.xml
+++ b/service/src/main/java/com/hzya/frame/u8c/Encapsulation/entity/EncapsulationEntity.xml
@@ -12,5 +12,7 @@
         SELECT cgeneralhid FROM ic_general_b WHERE vfirstbillcode = #{code} and csourcetype = #{type}
         )
     </select>
+
+
 </mapper>
 
diff --git a/service/src/main/java/com/hzya/frame/u8c/Encapsulation/service/IEncapsulationService.java b/service/src/main/java/com/hzya/frame/u8c/Encapsulation/service/IEncapsulationService.java
index ab1e0f09..c6605b4a 100644
--- a/service/src/main/java/com/hzya/frame/u8c/Encapsulation/service/IEncapsulationService.java
+++ b/service/src/main/java/com/hzya/frame/u8c/Encapsulation/service/IEncapsulationService.java
@@ -2,6 +2,7 @@ package com.hzya.frame.u8c.Encapsulation.service;
 
 import com.alibaba.fastjson.JSONObject;
 import com.hzya.frame.basedao.service.IBaseService;
+import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
 import com.hzya.frame.u8c.Encapsulation.entity.EncapsulationEntity;
 
 /**
@@ -20,6 +21,7 @@ public interface IEncapsulationService extends IBaseService<EncapsulationEntity,
      * @return java.lang.Object
      **/
     Object purchaseOrderDelete(JSONObject jsonObject);
+    SysExtensionApiEntity addPurchaseOrderDelete(SysExtensionApiEntity jsonObject);
 
     /**
      * @Author lvleigang
@@ -30,6 +32,7 @@ public interface IEncapsulationService extends IBaseService<EncapsulationEntity,
      * @return java.lang.Object
      **/
     Object purchaseWarehousingDelete(JSONObject jsonObject);
+    SysExtensionApiEntity addPurchaseWarehousingDelete(SysExtensionApiEntity jsonObject);
 
     /**
      * @Author lvleigang
@@ -40,6 +43,7 @@ public interface IEncapsulationService extends IBaseService<EncapsulationEntity,
      * @return java.lang.Object
      **/
     Object salesOrderDelete(JSONObject jsonObject);
+    SysExtensionApiEntity addSalesOrderDelete(SysExtensionApiEntity jsonObject);
 
     /**
      * @Author lvleigang
@@ -50,6 +54,7 @@ public interface IEncapsulationService extends IBaseService<EncapsulationEntity,
      * @return java.lang.Object
      **/
     Object transferOrderDelete(JSONObject jsonObject);
+    SysExtensionApiEntity addTransferOrderDelete(SysExtensionApiEntity jsonObject);
 
     /**
      * @Author lvleigang
@@ -60,6 +65,7 @@ public interface IEncapsulationService extends IBaseService<EncapsulationEntity,
      * @return java.lang.Object
      **/
     Object finishedProductsAreStoredDelete(JSONObject jsonObject);
+    SysExtensionApiEntity addFinishedProductsAreStoredDelete(SysExtensionApiEntity jsonObject);
 
     /**
      * @Author lvleigang
@@ -70,6 +76,7 @@ public interface IEncapsulationService extends IBaseService<EncapsulationEntity,
      * @return java.lang.Object
      **/
     Object materialDeliveryDelete(JSONObject jsonObject);
+    SysExtensionApiEntity addMaterialDeliveryDelete(SysExtensionApiEntity jsonObject);
 
     /**
      * @Author lvleigang
@@ -80,6 +87,7 @@ public interface IEncapsulationService extends IBaseService<EncapsulationEntity,
      * @return java.lang.Object
      **/
     Object otherWarehouseOrdersDelete(JSONObject jsonObject);
+    SysExtensionApiEntity addOtherWarehouseOrdersDelete(SysExtensionApiEntity jsonObject);
 
     /**
      * @Author lvleigang
@@ -90,6 +98,7 @@ public interface IEncapsulationService extends IBaseService<EncapsulationEntity,
      * @return java.lang.Object
      **/
     Object otherWarehouseReceiptDelete(JSONObject jsonObject);
+    SysExtensionApiEntity addOtherWarehouseReceiptDelete(SysExtensionApiEntity jsonObject);
 
 
 }
diff --git a/service/src/main/java/com/hzya/frame/u8c/Encapsulation/service/impl/EncapsulationImpl.java b/service/src/main/java/com/hzya/frame/u8c/Encapsulation/service/impl/EncapsulationImpl.java
index 07339ebb..1f74f2c7 100644
--- a/service/src/main/java/com/hzya/frame/u8c/Encapsulation/service/impl/EncapsulationImpl.java
+++ b/service/src/main/java/com/hzya/frame/u8c/Encapsulation/service/impl/EncapsulationImpl.java
@@ -3,11 +3,13 @@ package com.hzya.frame.u8c.Encapsulation.service.impl;
 import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.hzya.frame.basedao.service.impl.BaseService;
-import com.hzya.frame.sysnew.application.service.impl.ApplicationCache;
+import com.hzya.frame.sysnew.application.database.dao.ISysApplicationDatabaseDao;
+import com.hzya.frame.sysnew.application.database.entity.SysApplicationDatabaseEntity;
+import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
+import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
 import com.hzya.frame.u8c.Encapsulation.dao.IEncapsulationDao;
 import com.hzya.frame.u8c.Encapsulation.entity.EncapsulationEntity;
 import com.hzya.frame.u8c.Encapsulation.service.IEncapsulationService;
-import com.hzya.frame.web.entity.BaseResult;
 import org.apache.http.HttpEntity;
 import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.methods.CloseableHttpResponse;
@@ -23,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import javax.annotation.Resource;
 import java.io.IOException;
 import java.util.List;
+import java.util.Map;
 
 /**
  * (BdCorp)表服务实现类
@@ -40,7 +43,8 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
         this.encapsulationDao = dao;
         this.dao = dao;
     }
-
+    @Resource
+    private ISysApplicationDatabaseDao sysApplicationDatabaseDao;
     @Value("${zt.url}")
     private String ztUrl;
     private final Object lock = new Object();
@@ -49,15 +53,15 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
      * @param object
      * @return java.lang.Object
      * @Author lvleigang
-     * @Description 采购订单删除接口
-     * 0、根据采购订单号查询入库单号,1、库存采购入库单取消签字,2、库存采购入库单删除,3、采购订单弃审,4、采购订单删除
+     * @Description 采购订单删除接口 8000350080
+     * 0、根据采购订单号查询入库单号,1、库存采购入库单取消签字 8000350061,2、库存采购入库单删除 8000350058,3、采购订单弃审 8000350059,4、采购订单删除 8000350056
+     *
      * @Date 9:44 上午 2024/9/4
      **/
     @Override
     public Object purchaseOrderDelete(JSONObject object) {
         JSONObject returnObject = new JSONObject();
 
-        //获取单号和时间
         JSONObject jsonObject = getData("jsonStr", object, JSONObject.class);
         //判断是否存在参数
         if (!checkStr(jsonObject.getString("code"))) {
@@ -85,26 +89,28 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
             returnObject.put("errormsg", "操作员为空");
             return returnObject;
         }
-        if (!checkStr(jsonObject.getString("CgrkUnapproveApi"))) {
+
+        if (!checkStr(jsonObject.getString("cgrkqxqz"))) {
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "库存采购入库单取消签字接口编号为空");
             return returnObject;
         }
-        if (!checkStr(jsonObject.getString("CgrkDeleteApi"))) {
+        if (!checkStr(jsonObject.getString("cgrksc"))) {
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "库存采购入库单删除接口编号为空");
             return returnObject;
         }
-        if (!checkStr(jsonObject.getString("CgddUnapproveApi"))) {
+        if (!checkStr(jsonObject.getString("cgddqs"))) {
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "采购订单弃审接口编号为空");
             return returnObject;
         }
-        if (!checkStr(jsonObject.getString("CgddDeleteApi"))) {
+        if (!checkStr(jsonObject.getString("cgddsc"))) {
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "采购订单删除接口编号为空");
             return returnObject;
         }
+
         if (!checkStr(jsonObject.getString("dataSourceCode"))) {
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "数据源编码为空");
@@ -126,66 +132,96 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
         encapsulationEntity.setDataSourceCode(jsonObject.getString("dataSourceCode"));
         encapsulationEntity.setType("21");
         List<EncapsulationEntity> encapsulationEntities = encapsulationDao.queryCgrkddh(encapsulationEntity);
-        if (encapsulationEntities != null && encapsulationEntities.size() == 1) {
-            String cgrkdqxqz = getsendBody("1", jsonObject, encapsulationEntities.get(0).getCode());
-            //执行库存采购入库单取消签字接口
-            boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("CgrkUnapproveApi"), jsonObject.getString("CgrkUnapproveApi").substring(6), cgrkdqxqz);
-            if (cgrkdqxqzflag) {
-                String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode());
-                //执行库存采购入库单删除
-                boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("CgrkDeleteApi"), jsonObject.getString("CgrkDeleteApi").substring(6), cgrkdsc);
-                if (cgrkdscfiag) {
-                    String cgddqs = getsendBody("3", jsonObject, null);
-                    //执行采购订单弃审,
-                    boolean cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("CgddUnapproveApi"), jsonObject.getString("CgddUnapproveApi").substring(6), cgddqs);
-                    if (cgddqsflag) {
-                        String cgddsc = getsendBody("4", jsonObject, null);
-                        //执行采购订单删除
-                        boolean cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("CgddUnapproveApi"), jsonObject.getString("CgddUnapproveApi").substring(6), cgddsc);
-                        if (cgddscflag) {
-                            returnObject.put("status", "success");
-                            returnObject.put("errormsg", "采购订单删除成功");
-                            return returnObject;
-                        } else {
-                            returnObject.put("status", "falied");
-                            returnObject.put("errormsg", "采购订单删除失败");
-                            return returnObject;
-                        }
-                    } else {
-                        returnObject.put("status", "falied");
-                        returnObject.put("errormsg", "采购订单弃审失败");
-                        return returnObject;
-                    }
-                } else {
-                    returnObject.put("status", "falied");
-                    returnObject.put("errormsg", "采购入库单删除失败");
-                    return returnObject;
-                }
-            } else {
-                returnObject.put("status", "falied");
-                returnObject.put("errormsg", "采购入库单取消签字失败");
-                return returnObject;
-            }
-        } else {
+        if(encapsulationEntities == null || encapsulationEntities.size() != 1){
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "查到多条采购入库单");
             return returnObject;
         }
+        //执行库存采购入库单取消签字接口
+        String cgrkdqxqz = getsendBody("1", jsonObject, encapsulationEntities.get(0).getCode());
+        boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrkqxqz"), jsonObject.getString("cgrkqxqz").substring(6), cgrkdqxqz);
+        if (!cgrkdqxqzflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "采购入库单取消签字失败");
+            return returnObject;
+        }
+        //执行库存采购入库单删除
+        String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode());
+        boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrksc"), jsonObject.getString("cgrksc").substring(6), cgrkdsc);
+        if (!cgrkdscfiag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "采购入库单删除失败");
+            return returnObject;
+        }
+        //执行采购订单弃审
+        String cgddqs = getsendBody("3", jsonObject, null);
+        boolean cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgddqs"), jsonObject.getString("cgddqs").substring(6), cgddqs);
+        if (!cgddqsflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "采购订单弃审失败");
+            return returnObject;
+        }
+        //执行采购订单删除
+        String cgddsc = getsendBody("4", jsonObject, null);
+        boolean cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgddsc"), jsonObject.getString("cgddsc").substring(6), cgddsc);
+        if (cgddscflag) {
+            returnObject.put("status", "success");
+            returnObject.put("errormsg", "采购订单删除成功");
+            return returnObject;
+        } else {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "采购订单删除失败");
+            return returnObject;
+        }
     }
+    /**
+     * @param entity
+     * @return com.hzya.frame.web.entity.JsonResultEntity
+     * @Author lvleigang
+     * @Description 数据表
+     * @Date 11:52 上午 2024/3/27
+     **/
+    @Override
+    public SysExtensionApiEntity addPurchaseOrderDelete(SysExtensionApiEntity entity) {
+        try {
+            Map<String, String> headers = entity.getHeaders();
+            SysApplicationEntity applicationEntity = entity.getReceiveApp();
+            SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity();
+            sysApplicationDatabaseEntity.setSts("Y");
+            sysApplicationDatabaseEntity.setDbStatus("1");
+            sysApplicationDatabaseEntity.setAppId(applicationEntity.getId());
+            sysApplicationDatabaseEntity.setDataSourceCode("master");
+            List<SysApplicationDatabaseEntity> sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity);
+            if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){
+                String parm = entity.getBodys();
+                JSONObject jsonObject = JSONObject.parseObject(parm);
+                jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode());
+                jsonObject.put("publicKey",headers.get("publicKey"));
+                jsonObject.put("secretKey",headers.get("secretKey"));
 
+                jsonObject.put("cgrkqxqz",headers.get("cgrkqxqz"));
+                jsonObject.put("cgrksc",headers.get("cgrksc"));
+                jsonObject.put("cgddqs",headers.get("cgddqs"));
+                jsonObject.put("cgddsc",headers.get("cgddsc"));
+                entity.setBodys(jsonObject.toJSONString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return entity;
+    }
     /**
      * @param object
      * @return java.lang.Object
      * @Author lvleigang
-     * @Description 采购入库单删除接口
-     * 1、库存采购入库单取消签字,2、库存采购入库单删除
+     * @Description 采购入库单删除接口 8000350081
+     * 1、库存采购入库单取消签字 8000350061,2、库存采购入库单删除 8000350058
      * @Date 9:44 上午 2024/9/4
      **/
     @Override
     public Object purchaseWarehousingDelete(JSONObject object) {
         JSONObject returnObject = new JSONObject();
 
-        //获取单号和时间
         JSONObject jsonObject = getData("jsonStr", object, JSONObject.class);
         //判断是否存在参数
         if (!checkStr(jsonObject.getString("code"))) {
@@ -213,12 +249,12 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
             returnObject.put("errormsg", "操作员为空");
             return returnObject;
         }
-        if (!checkStr(jsonObject.getString("CgrkUnapproveApi"))) {
+        if (!checkStr(jsonObject.getString("cgrkqxqz"))) {
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "库存采购入库单取消签字接口编号为空");
             return returnObject;
         }
-        if (!checkStr(jsonObject.getString("CgrkDeleteApi"))) {
+        if (!checkStr(jsonObject.getString("cgrksc"))) {
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "库存采购入库单删除接口编号为空");
             return returnObject;
@@ -238,42 +274,74 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
             returnObject.put("errormsg", "secretKey为空");
             return returnObject;
         }
-        String cgrkdqxqz = getsendBody("1", jsonObject, jsonObject.getString("code"));
         //执行库存采购入库单取消签字接口
-        boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("CgrkUnapproveApi"), jsonObject.getString("CgrkUnapproveApi").substring(6), cgrkdqxqz);
-        if (cgrkdqxqzflag) {
-            String cgrkdsc = getsendBody("2", jsonObject, jsonObject.getString("code"));
-            //执行库存采购入库单删除接口
-            boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("CgrkDeleteApi"), jsonObject.getString("CgrkDeleteApi").substring(6), cgrkdsc);
-            if (cgrkdscfiag) {
-				returnObject.put("status", "success");
-				returnObject.put("errormsg", "采购入库单删除成功");
-				return returnObject;
-            } else {
-                returnObject.put("status", "falied");
-                returnObject.put("errormsg", "采购入库单删除失败");
-                return returnObject;
-            }
-        } else {
+        String cgrkdqxqz = getsendBody("1", jsonObject, jsonObject.getString("code"));
+        boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrkqxqz"), jsonObject.getString("cgrkqxqz").substring(6), cgrkdqxqz);
+        if (!cgrkdqxqzflag) {
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "采购入库单取消签字失败");
             return returnObject;
         }
-    }
 
+        //执行库存采购入库单删除接口
+        String cgrkdsc = getsendBody("2", jsonObject, jsonObject.getString("code"));
+        boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrksc"), jsonObject.getString("cgrksc").substring(6), cgrkdsc);
+        if (cgrkdscfiag) {
+            returnObject.put("status", "success");
+            returnObject.put("errormsg", "采购入库单删除成功");
+            return returnObject;
+        } else {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "采购入库单删除失败");
+            return returnObject;
+        }
+    }
+    /**
+     * @param entity
+     * @return com.hzya.frame.web.entity.JsonResultEntity
+     * @Author lvleigang
+     * @Description 数据表
+     * @Date 11:52 上午 2024/3/27
+     **/
+    @Override
+    public SysExtensionApiEntity addPurchaseWarehousingDelete(SysExtensionApiEntity entity) {
+        try {
+            Map<String, String> headers = entity.getHeaders();
+            SysApplicationEntity applicationEntity = entity.getReceiveApp();
+            SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity();
+            sysApplicationDatabaseEntity.setSts("Y");
+            sysApplicationDatabaseEntity.setDbStatus("1");
+            sysApplicationDatabaseEntity.setAppId(applicationEntity.getId());
+            sysApplicationDatabaseEntity.setDataSourceCode("master");
+            List<SysApplicationDatabaseEntity> sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity);
+            if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){
+                String parm = entity.getBodys();
+                JSONObject jsonObject = JSONObject.parseObject(parm);
+                jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode());
+                jsonObject.put("publicKey",headers.get("publicKey"));
+                jsonObject.put("secretKey",headers.get("secretKey"));
+
+                jsonObject.put("cgrkqxqz",headers.get("cgrkqxqz"));
+                jsonObject.put("cgrksc",headers.get("cgrksc"));
+                entity.setBodys(jsonObject.toJSONString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return entity;
+    }
     /**
      * @param object
      * @return java.lang.Object
      * @Author lvleigang
-     * @Description 销售订单删除接口
-     * 0、根据销售钉订单号查询出销售出库单号,1、库存销售出库单取消签字,2、库存销售出库单删除,3、销售订单取消审批,4、销售订单删除
+     * @Description 销售订单删除接口  8000350082
+     * 0、根据销售钉订单号查询出销售出库单号,1、库存销售出库单取消签字 8000350062 ,2、库存销售出库单删除 8000350063 ,3、销售订单取消审批 8000350064 ,4、销售订单删除 8000350065
      * @Date 9:44 上午 2024/9/4
      **/
     @Override
     public Object salesOrderDelete(JSONObject object) {
         JSONObject returnObject = new JSONObject();
 
-        //获取单号和时间
         JSONObject jsonObject = getData("jsonStr", object, JSONObject.class);
         //判断是否存在参数
         if (!checkStr(jsonObject.getString("code"))) {
@@ -301,26 +369,28 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
             returnObject.put("errormsg", "操作员为空");
             return returnObject;
         }
-        if (!checkStr(jsonObject.getString("kcxsckdUnapproveApi"))) {
+
+        if (!checkStr(jsonObject.getString("kcxsckqxqz"))) {
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "库存销售出库单取消签字接口编号为空");
             return returnObject;
         }
-        if (!checkStr(jsonObject.getString("kcxsckDeleteApi"))) {
+        if (!checkStr(jsonObject.getString("kcxscksc"))) {
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "库存销售出库单删除接口编号为空");
             return returnObject;
         }
-        if (!checkStr(jsonObject.getString("xsddUnapproveApi"))) {
+        if (!checkStr(jsonObject.getString("xsddqxsp"))) {
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "销售订单取消审批接口编号为空");
             return returnObject;
         }
-        if (!checkStr(jsonObject.getString("xsddDeleteApi"))) {
+        if (!checkStr(jsonObject.getString("xsddsc"))) {
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "销售订单删除接口编号为空");
             return returnObject;
         }
+
         if (!checkStr(jsonObject.getString("dataSourceCode"))) {
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "数据源编码为空");
@@ -342,165 +412,827 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
         encapsulationEntity.setDataSourceCode(jsonObject.getString("dataSourceCode"));
         encapsulationEntity.setType("30");
         List<EncapsulationEntity> encapsulationEntities = encapsulationDao.queryCgrkddh(encapsulationEntity);
-        if (encapsulationEntities != null && encapsulationEntities.size() == 1) {
-            String cgrkdqxqz = getsendBody("5", jsonObject, encapsulationEntities.get(0).getCode());
-            //库存销售出库单取消签字,
-            boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxsckdUnapproveApi"), jsonObject.getString("kcxsckdUnapproveApi").substring(6), cgrkdqxqz);
-            if (cgrkdqxqzflag) {
-                String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode());
-                //库存销售出库单删除
-                boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxsckDeleteApi"), jsonObject.getString("kcxsckDeleteApi").substring(6), cgrkdsc);
-                if (cgrkdscfiag) {
-                    String cgddqs = getsendBody("3", jsonObject, null);
-                    //销售订单取消审批,,
-                    boolean cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddUnapproveApi"), jsonObject.getString("xsddUnapproveApi").substring(6), cgddqs);
-                    if (cgddqsflag) {
-                        String cgddsc = getsendBody("4", jsonObject, null);
-                        //销售订单删除
-                        boolean cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddDeleteApi"), jsonObject.getString("xsddDeleteApi").substring(6), cgddsc);
-                        if (cgddscflag) {
-                            returnObject.put("status", "success");
-                            returnObject.put("errormsg", "销售订单删除成功");
-                            return returnObject;
-                        } else {
-                            returnObject.put("status", "falied");
-                            returnObject.put("errormsg", "销售订单删除失败");
-                            return returnObject;
-                        }
-                    } else {
-                        returnObject.put("status", "falied");
-                        returnObject.put("errormsg", "销售订单取消审批失败");
-                        return returnObject;
-                    }
-                } else {
-                    returnObject.put("status", "falied");
-                    returnObject.put("errormsg", "库存销售出库单删除失败");
-                    return returnObject;
-                }
-            } else {
-                returnObject.put("status", "falied");
-                returnObject.put("errormsg", "库存销售出库单取消签字失败");
-                return returnObject;
-            }
-        } else {
+        if(encapsulationEntities == null || encapsulationEntities.size() != 1){
             returnObject.put("status", "falied");
             returnObject.put("errormsg", "查到多条销售出库单");
             return returnObject;
         }
+        //库存销售出库单取消签字,
+        String cgrkdqxqz = getsendBody("1", jsonObject, encapsulationEntities.get(0).getCode());
+        boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxsckqxqz"), jsonObject.getString("kcxsckqxqz").substring(6), cgrkdqxqz);
+        if (!cgrkdqxqzflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存销售出库单取消签字失败");
+            return returnObject;
+        }
+        //库存销售出库单删除
+        String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode());
+        boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxscksc"), jsonObject.getString("kcxscksc").substring(6), cgrkdsc);
+        if (!cgrkdscfiag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存销售出库单删除失败");
+            return returnObject;
+        }
+        //销售订单取消审批,,
+        String cgddqs = getsendBody("3", jsonObject, jsonObject.getString("code"));
+        boolean cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddqxsp"), jsonObject.getString("xsddqxsp").substring(6), cgddqs);
+        if (!cgddqsflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "销售订单取消审批失败");
+            return returnObject;
+        }
+        //销售订单删除
+        String cgddsc = getsendBody("4", jsonObject, jsonObject.getString("code"));
+        boolean cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddsc"), jsonObject.getString("xsddsc").substring(6), cgddsc);
+        if (cgddscflag) {
+            returnObject.put("status", "success");
+            returnObject.put("errormsg", "销售订单删除成功");
+            return returnObject;
+        } else {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "销售订单删除失败");
+            return returnObject;
+        }
     }
-
     /**
-     * @param jsonObject
+     * @param entity
+     * @return com.hzya.frame.web.entity.JsonResultEntity
+     * @Author lvleigang
+     * @Description 数据表
+     * @Date 11:52 上午 2024/3/27
+     **/
+    @Override
+    public SysExtensionApiEntity addSalesOrderDelete(SysExtensionApiEntity entity) {
+        try {
+            Map<String, String> headers = entity.getHeaders();
+            SysApplicationEntity applicationEntity = entity.getReceiveApp();
+            SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity();
+            sysApplicationDatabaseEntity.setSts("Y");
+            sysApplicationDatabaseEntity.setDbStatus("1");
+            sysApplicationDatabaseEntity.setAppId(applicationEntity.getId());
+            sysApplicationDatabaseEntity.setDataSourceCode("master");
+            List<SysApplicationDatabaseEntity> sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity);
+            if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){
+                String parm = entity.getBodys();
+                JSONObject jsonObject = JSONObject.parseObject(parm);
+                jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode());
+                jsonObject.put("publicKey",headers.get("publicKey"));
+                jsonObject.put("secretKey",headers.get("secretKey"));
+
+                jsonObject.put("kcxsckqxqz",headers.get("kcxsckqxqz"));
+                jsonObject.put("kcxscksc",headers.get("kcxscksc"));
+                jsonObject.put("xsddqxsp",headers.get("xsddqxsp"));
+                jsonObject.put("xsddsc",headers.get("xsddsc"));
+                entity.setBodys(jsonObject.toJSONString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return entity;
+    }
+    /**
+     * @param object
      * @return java.lang.Object
      * @Author lvleigang
-     * @Description 调拨订单删除接口
-     * 0、根据调拨订单号查询调拨入库,调拨出库单据,1、库存调拨出库取消签字 2、库存调拨出库删除 3、调拨入库取消签字 4、调拨入库删除 5、调拨订单弃审 6、调拨订单删除
+     * @Description 调拨订单删除接口 8000350083
+     *
+     * 0、根据调拨订单号查询调拨入库,调拨出库单据,1、库存调拨出库取消签字 8000350066 2、库存调拨出库删除 8000350067
+     * 3、调拨入库取消签字 8000350068 4、调拨入库删除 8000350069 5、调拨订单弃审 8000350070 6、调拨订单删除 8000350071
      * @Date 9:44 上午 2024/9/4
      **/
     @Override
-    public Object transferOrderDelete(JSONObject jsonObject) {
-        return null;
-    }
+    public Object transferOrderDelete(JSONObject object) {
+        JSONObject returnObject = new JSONObject();
+        JSONObject jsonObject = getData("jsonStr", object, JSONObject.class);
+        //判断是否存在参数
+        if (!checkStr(jsonObject.getString("code"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("corp"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "公司为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("date_begin"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据开始日期为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("date_end"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据结束日期为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("coperator"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "操作员为空");
+            return returnObject;
+        }
 
+        if (!checkStr(jsonObject.getString("kcdbckqxqz"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存调拨出库取消签字接口编号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("kcdbcksc"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存调拨出库删除删除接口编号为空");
+            return returnObject;
+        }
+
+        if (!checkStr(jsonObject.getString("dbrkqxqz"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "调拨入库取消签字接口编号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("dbrksc"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "调拨入库删除接口编号为空");
+            return returnObject;
+        }
+
+        if (!checkStr(jsonObject.getString("dbddqs"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "调拨订单弃审接口编号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("dbddsc"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "调拨订单删除接口编号为空");
+            return returnObject;
+        }
+
+        if (!checkStr(jsonObject.getString("dataSourceCode"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "数据源编码为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("publicKey"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "publicKey为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("secretKey"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "secretKey为空");
+            return returnObject;
+        }
+        //根据调拨订单号查询调拨入库
+        EncapsulationEntity rk = new EncapsulationEntity();
+        rk.setCode(jsonObject.getString("code"));
+        rk.setDataSourceCode(jsonObject.getString("dataSourceCode"));
+        rk.setType("4E");
+        List<EncapsulationEntity> rklist = encapsulationDao.queryCgrkddh(rk);
+        if(rklist == null || rklist.size() != 1){
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "查到多条调拨入库单");
+            return returnObject;
+        }
+        //根据调拨订单号查询调拨出库
+        EncapsulationEntity ck = new EncapsulationEntity();
+        ck.setCode(jsonObject.getString("code"));
+        ck.setDataSourceCode(jsonObject.getString("dataSourceCode"));
+        ck.setType("4Y");
+        List<EncapsulationEntity> cklist = encapsulationDao.queryCgrkddh(ck);
+        if(cklist == null || cklist.size() != 1){
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "查到多条调拨出库单");
+            return returnObject;
+        }
+        //调拨入库取消签字
+        String dbrk = getsendBody("1", jsonObject, jsonObject.getString("code"));
+        boolean dbrkflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbrkqxqz"), jsonObject.getString("dbrkqxqz").substring(6), dbrk);
+        if (!dbrkflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "调拨入库取消签字失败");
+            return returnObject;
+        }
+        //调拨入库删除
+        String dbrksc = getsendBody("2", jsonObject, jsonObject.getString("code"));
+        boolean dbrkscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbrksc"), jsonObject.getString("dbrksc").substring(6), dbrksc);
+        if (!dbrkscflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "调拨入库删除失败");
+            return returnObject;
+        }
+        //库存调拨出库取消签字
+        String dbck = getsendBody("1", jsonObject, jsonObject.getString("code"));
+        boolean dbckflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcdbckqxqz"), jsonObject.getString("kcdbckqxqz").substring(6), dbck);
+        if (!dbckflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存调拨出库取消签字失败");
+            return returnObject;
+        }
+        //库存调拨出库删除
+        String dbcksc = getsendBody("2", jsonObject, jsonObject.getString("code"));
+        boolean dbckscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcdbcksc"), jsonObject.getString("kcdbcksc").substring(6), dbcksc);
+        if (!dbckscflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存调拨出库删除失败");
+            return returnObject;
+        }
+        //调拨订单弃审
+        String dbdd = getsendBody("3", jsonObject, jsonObject.getString("code"));
+        boolean dbddflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbddqs"), jsonObject.getString("dbddqs").substring(6), dbdd);
+        if (!dbddflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "调拨订单弃审失败");
+            return returnObject;
+        }
+        //调拨订单删除
+        String dbddsc = getsendBody("4", jsonObject, jsonObject.getString("code"));
+        boolean dbddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbddsc"), jsonObject.getString("dbddsc").substring(6), dbddsc);
+        if (!dbddscflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "调拨订单删除失败");
+            return returnObject;
+        }
+
+        returnObject.put("status", "success");
+        returnObject.put("errormsg", "调拨订单删除成功");
+        return returnObject;
+
+
+    }
     /**
-     * @param jsonObject
+     * @param entity
+     * @return com.hzya.frame.web.entity.JsonResultEntity
+     * @Author lvleigang
+     * @Description 数据表
+     * @Date 11:52 上午 2024/3/27
+     **/
+    @Override
+    public SysExtensionApiEntity addTransferOrderDelete(SysExtensionApiEntity entity) {
+        try {
+            Map<String, String> headers = entity.getHeaders();
+            SysApplicationEntity applicationEntity = entity.getReceiveApp();
+            SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity();
+            sysApplicationDatabaseEntity.setSts("Y");
+            sysApplicationDatabaseEntity.setDbStatus("1");
+            sysApplicationDatabaseEntity.setAppId(applicationEntity.getId());
+            sysApplicationDatabaseEntity.setDataSourceCode("master");
+            List<SysApplicationDatabaseEntity> sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity);
+            if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){
+                String parm = entity.getBodys();
+                JSONObject jsonObject = JSONObject.parseObject(parm);
+                jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode());
+                jsonObject.put("publicKey",headers.get("publicKey"));
+                jsonObject.put("secretKey",headers.get("secretKey"));
+
+                jsonObject.put("kcdbckqxqz",headers.get("kcdbckqxqz"));
+                jsonObject.put("kcdbcksc",headers.get("kcdbcksc"));
+                jsonObject.put("dbrkqxqz",headers.get("dbrkqxqz"));
+                jsonObject.put("dbrksc",headers.get("dbrksc"));
+                jsonObject.put("dbddqs",headers.get("dbddqs"));
+                jsonObject.put("dbddsc",headers.get("dbddsc"));
+                entity.setBodys(jsonObject.toJSONString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return entity;
+    }
+    /**
+     * @param object
      * @return java.lang.Object
      * @Author lvleigang
-     * @Description 产成品入库删除接口
-     * 1、库存产成品入库单取消签字 2、库存产成品入库单删除
+     * @Description 产成品入库删除接口 8000350084
+     * 1、库存产成品入库单取消签字 8000350072 2、库存产成品入库单删除 8000350073
      * @Date 9:44 上午 2024/9/4
      **/
     @Override
-    public Object finishedProductsAreStoredDelete(JSONObject jsonObject) {
-        return null;
-    }
+    public Object finishedProductsAreStoredDelete(JSONObject object) {
+        JSONObject returnObject = new JSONObject();
+        JSONObject jsonObject = getData("jsonStr", object, JSONObject.class);
+        //判断是否存在参数
+        if (!checkStr(jsonObject.getString("code"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("corp"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "公司为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("date_begin"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据开始日期为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("date_end"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据结束日期为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("coperator"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "操作员为空");
+            return returnObject;
+        }
 
+        if (!checkStr(jsonObject.getString("kcccprkqxqz"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存产成品入库单取消签字接口编号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("kcccprksc"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存产成品入库单删除接口编号为空");
+            return returnObject;
+        }
+
+        if (!checkStr(jsonObject.getString("dataSourceCode"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "数据源编码为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("publicKey"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "publicKey为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("secretKey"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "secretKey为空");
+            return returnObject;
+        }
+
+        //库存产成品入库单取消签字
+        String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"));
+        boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcccprkqxqz"), jsonObject.getString("kcccprkqxqz").substring(6), qxqz);
+        if (!qxqzflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存产成品入库单取消签字失败");
+            return returnObject;
+        }
+        //库存产成品入库单删除
+        String sc = getsendBody("2", jsonObject, jsonObject.getString("code"));
+        boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcccprksc"), jsonObject.getString("kcccprksc").substring(6), sc);
+        if (!scflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存产成品入库单删除失败");
+            return returnObject;
+        }
+
+        returnObject.put("status", "success");
+        returnObject.put("errormsg", "库存产成品入库删除成功");
+        return returnObject;
+
+    }
     /**
-     * @param jsonObject
+     * @param entity
+     * @return com.hzya.frame.web.entity.JsonResultEntity
+     * @Author lvleigang
+     * @Description 数据表
+     * @Date 11:52 上午 2024/3/27
+     **/
+    @Override
+    public SysExtensionApiEntity addFinishedProductsAreStoredDelete(SysExtensionApiEntity entity) {
+        try {
+            Map<String, String> headers = entity.getHeaders();
+            SysApplicationEntity applicationEntity = entity.getReceiveApp();
+            SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity();
+            sysApplicationDatabaseEntity.setSts("Y");
+            sysApplicationDatabaseEntity.setDbStatus("1");
+            sysApplicationDatabaseEntity.setAppId(applicationEntity.getId());
+            sysApplicationDatabaseEntity.setDataSourceCode("master");
+            List<SysApplicationDatabaseEntity> sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity);
+            if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){
+                String parm = entity.getBodys();
+                JSONObject jsonObject = JSONObject.parseObject(parm);
+                jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode());
+                jsonObject.put("publicKey",headers.get("publicKey"));
+                jsonObject.put("secretKey",headers.get("secretKey"));
+
+                jsonObject.put("kcccprkqxqz",headers.get("kcccprkqxqz"));
+                jsonObject.put("kcccprksc",headers.get("kcccprksc"));
+                entity.setBodys(jsonObject.toJSONString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return entity;
+    }
+    /**
+     * @param object
      * @return java.lang.Object
      * @Author lvleigang
-     * @Description 材料出库删除接口
-     * 1、库存材料出库取消签字 2、库存材料出库单删除
+     * @Description 材料出库删除接口  8000350085
+     * 1、库存材料出库取消签字 8000350074 2、库存材料出库单删除 8000350075
      * @Date 9:44 上午 2024/9/4
      **/
     @Override
-    public Object materialDeliveryDelete(JSONObject jsonObject) {
-        return null;
-    }
+    public Object materialDeliveryDelete(JSONObject object) {
+        JSONObject returnObject = new JSONObject();
+        JSONObject jsonObject = getData("jsonStr", object, JSONObject.class);
+        //判断是否存在参数
+        if (!checkStr(jsonObject.getString("code"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("corp"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "公司为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("date_begin"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据开始日期为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("date_end"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据结束日期为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("coperator"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "操作员为空");
+            return returnObject;
+        }
 
+        if (!checkStr(jsonObject.getString("qxqzApi"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存材料出库取消签字接口编号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("scApi"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存材料出库单删除接口编号为空");
+            return returnObject;
+        }
+
+        if (!checkStr(jsonObject.getString("dataSourceCode"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "数据源编码为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("publicKey"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "publicKey为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("secretKey"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "secretKey为空");
+            return returnObject;
+        }
+
+        //库存材料出库取消签字
+        String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"));
+        boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(6), qxqz);
+        if (!qxqzflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存材料出库取消签字失败");
+            return returnObject;
+        }
+        //库存材料出库单删除
+        String sc = getsendBody("2", jsonObject, jsonObject.getString("code"));
+        boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(6), sc);
+        if (!scflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存材料出库单删除失败");
+            return returnObject;
+        }
+
+        returnObject.put("status", "success");
+        returnObject.put("errormsg", "库存材料出库删除成功");
+        return returnObject;
+
+    }
     /**
-     * @param jsonObject
+     * @param entity
+     * @return com.hzya.frame.web.entity.JsonResultEntity
+     * @Author lvleigang
+     * @Description 数据表
+     * @Date 11:52 上午 2024/3/27
+     **/
+    @Override
+    public SysExtensionApiEntity addMaterialDeliveryDelete(SysExtensionApiEntity entity) {
+        try {
+            Map<String, String> headers = entity.getHeaders();
+            SysApplicationEntity applicationEntity = entity.getReceiveApp();
+            SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity();
+            sysApplicationDatabaseEntity.setSts("Y");
+            sysApplicationDatabaseEntity.setDbStatus("1");
+            sysApplicationDatabaseEntity.setAppId(applicationEntity.getId());
+            sysApplicationDatabaseEntity.setDataSourceCode("master");
+            List<SysApplicationDatabaseEntity> sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity);
+            if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){
+                String parm = entity.getBodys();
+                JSONObject jsonObject = JSONObject.parseObject(parm);
+                jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode());
+                jsonObject.put("publicKey",headers.get("publicKey"));
+                jsonObject.put("secretKey",headers.get("secretKey"));
+
+                jsonObject.put("qxqzApi",headers.get("qxqzApi"));
+                jsonObject.put("scApi",headers.get("scApi"));
+                entity.setBodys(jsonObject.toJSONString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return entity;
+    }
+    /**
+     * @param object
      * @return java.lang.Object
      * @Author lvleigang
-     * @Description 其他出库单删除接口
-     * 1、库存其他出库取消签字 2、库存其他出库删除
+     * @Description 其他出库单删除接口 8000350086
+     * 1、库存其他出库取消签字 8000350076 2、库存其他出库删除 8000350077
      * @Date 9:44 上午 2024/9/4
      **/
     @Override
-    public Object otherWarehouseOrdersDelete(JSONObject jsonObject) {
-        return null;
-    }
+    public Object otherWarehouseOrdersDelete(JSONObject object) {
+        JSONObject returnObject = new JSONObject();
+        JSONObject jsonObject = getData("jsonStr", object, JSONObject.class);
+        //判断是否存在参数
+        if (!checkStr(jsonObject.getString("code"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("corp"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "公司为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("date_begin"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据开始日期为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("date_end"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据结束日期为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("coperator"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "操作员为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("qxqzApi"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存其他出库取消签字接口编号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("scApi"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存其他出库删除接口编号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("dataSourceCode"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "数据源编码为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("publicKey"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "publicKey为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("secretKey"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "secretKey为空");
+            return returnObject;
+        }
 
+        //库存其他出库取消签字
+        String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"));
+        boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(6), qxqz);
+        if (!qxqzflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存其他出库取消签字失败");
+            return returnObject;
+        }
+        //库存其他出库删除
+        String sc = getsendBody("2", jsonObject, jsonObject.getString("code"));
+        boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(6), sc);
+        if (!scflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存其他出库删除失败");
+            return returnObject;
+        }
+
+        returnObject.put("status", "success");
+        returnObject.put("errormsg", "库存其他出库删除成功");
+        return returnObject;
+
+    }
     /**
-     * @param jsonObject
+     * @param entity
+     * @return com.hzya.frame.web.entity.JsonResultEntity
+     * @Author lvleigang
+     * @Description 数据表
+     * @Date 11:52 上午 2024/3/27
+     **/
+    @Override
+    public SysExtensionApiEntity addOtherWarehouseOrdersDelete(SysExtensionApiEntity entity) {
+        try {
+            Map<String, String> headers = entity.getHeaders();
+            SysApplicationEntity applicationEntity = entity.getReceiveApp();
+            SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity();
+            sysApplicationDatabaseEntity.setSts("Y");
+            sysApplicationDatabaseEntity.setDbStatus("1");
+            sysApplicationDatabaseEntity.setAppId(applicationEntity.getId());
+            sysApplicationDatabaseEntity.setDataSourceCode("master");
+            List<SysApplicationDatabaseEntity> sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity);
+            if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){
+                String parm = entity.getBodys();
+                JSONObject jsonObject = JSONObject.parseObject(parm);
+                jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode());
+                jsonObject.put("publicKey",headers.get("publicKey"));
+                jsonObject.put("secretKey",headers.get("secretKey"));
+
+                jsonObject.put("qxqzApi",headers.get("qxqzApi"));
+                jsonObject.put("scApi",headers.get("scApi"));
+                entity.setBodys(jsonObject.toJSONString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return entity;
+    }
+    /**
+     * @param object
      * @return java.lang.Object
      * @Author lvleigang
-     * @Description 其他入库单删除接口
-     * 1、库存其他入库单取消签字. 2、库存其他入库删除
+     * @Description 其他入库单删除接口 8000350087
+     * 1、库存其他入库单取消签字.8000350078 2、库存其他入库删除 8000350079
      * @Date 9:44 上午 2024/9/4
      **/
     @Override
-    public Object otherWarehouseReceiptDelete(JSONObject jsonObject) {
-        return null;
-    }
+    public Object otherWarehouseReceiptDelete(JSONObject object) {
+        JSONObject returnObject = new JSONObject();
+        JSONObject jsonObject = getData("jsonStr", object, JSONObject.class);
+        //判断是否存在参数
+        if (!checkStr(jsonObject.getString("code"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("corp"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "公司为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("date_begin"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据开始日期为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("date_end"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "单据结束日期为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("coperator"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "操作员为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("qxqzApi"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存其他入库单取消签字接口编号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("scApi"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存其他入库删除接口编号为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("dataSourceCode"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "数据源编码为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("publicKey"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "publicKey为空");
+            return returnObject;
+        }
+        if (!checkStr(jsonObject.getString("secretKey"))) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "secretKey为空");
+            return returnObject;
+        }
 
+        //库存其他入库单取消签字
+        String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"));
+        boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(6), qxqz);
+        if (!qxqzflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存其他入库单取消签字失败");
+            return returnObject;
+        }
+        //库存其他入库删除
+        String sc = getsendBody("2", jsonObject, jsonObject.getString("code"));
+        boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(6), sc);
+        if (!scflag) {
+            returnObject.put("status", "falied");
+            returnObject.put("errormsg", "库存其他入库删除失败");
+            return returnObject;
+        }
+        returnObject.put("status", "success");
+        returnObject.put("errormsg", "库存其他入库删除成功");
+        return returnObject;
+    }
+    /**
+     * @param entity
+     * @return com.hzya.frame.web.entity.JsonResultEntity
+     * @Author lvleigang
+     * @Description 数据表
+     * @Date 11:52 上午 2024/3/27
+     **/
+    @Override
+    public SysExtensionApiEntity addOtherWarehouseReceiptDelete(SysExtensionApiEntity entity) {
+        try {
+            Map<String, String> headers = entity.getHeaders();
+            SysApplicationEntity applicationEntity = entity.getReceiveApp();
+            SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity();
+            sysApplicationDatabaseEntity.setSts("Y");
+            sysApplicationDatabaseEntity.setDbStatus("1");
+            sysApplicationDatabaseEntity.setAppId(applicationEntity.getId());
+            sysApplicationDatabaseEntity.setDataSourceCode("master");
+            List<SysApplicationDatabaseEntity> sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity);
+            if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){
+                String parm = entity.getBodys();
+                JSONObject jsonObject = JSONObject.parseObject(parm);
+                jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode());
+                jsonObject.put("publicKey",headers.get("publicKey"));
+                jsonObject.put("secretKey",headers.get("secretKey"));
+
+                jsonObject.put("qxqzApi",headers.get("qxqzApi"));
+                jsonObject.put("scApi",headers.get("scApi"));
+                entity.setBodys(jsonObject.toJSONString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return entity;
+    }
 
     //拼装数据
     private String getsendBody(String type, JSONObject object, String code) {
         JSONObject jsonObject1 = new JSONObject();
 
         switch (type) {
-            case "1": //库存采购入库单取消签字
+            case "1": //取消签字参数类型1、库存采购入库单取消签字 2\库存销售出库单取消签字 3\库存调拨出库取消签字4\调拨入库取消签字 5\库存产成品入库单取消签字
+                //6\库存材料出库取消签字  7\库存其他出库取消签字  8\库存其他入库单取消签字
                 JSONObject unsignInfo = new JSONObject();
                 unsignInfo.put("coperator", object.getString("coperator"));
+
                 JSONObject queryInfo = new JSONObject();
                 queryInfo.put("date_end", object.getString("date_end"));
                 queryInfo.put("date_begin", object.getString("date_begin"));
                 queryInfo.put("corp", object.getString("corp"));
                 queryInfo.put("billcode", code);
+
                 jsonObject1.put("unsignInfo", unsignInfo);
                 jsonObject1.put("queryInfo", queryInfo);
                 break;
-            case "2": //库存采购入库单删除
+            case "2": //删除接口1、库存采购入库单删除 2\库存销售出库单删除 3\库存调拨出库删除 4\调拨入库删除 5\库存产成品入库单删除
+                //6\库存材料出库单删除  7\库存其他出库删除  8\库存其他入库删除
                 JSONObject unsignInfo2 = new JSONObject();
                 unsignInfo2.put("coperator", object.getString("coperator"));
+
                 JSONObject queryInfo2 = new JSONObject();
                 queryInfo2.put("date_end", object.getString("date_end"));
                 queryInfo2.put("date_begin", object.getString("date_begin"));
                 queryInfo2.put("corp", object.getString("corp"));
                 queryInfo2.put("billcode", code);
+
                 jsonObject1.put("deleteInfo", unsignInfo2);
                 jsonObject1.put("queryInfo", queryInfo2);
                 break;
-            case "3": //采购订单弃审
+            case "3": //弃审 1、采购订单弃审 2\销售订单取消审批 3\调拨订单弃审
                 JSONObject unsignInfo3 = new JSONObject();
                 unsignInfo3.put("approvid", object.getString("coperator"));
+
                 JSONObject queryInfo3 = new JSONObject();
                 queryInfo3.put("date_end", object.getString("date_end"));
                 queryInfo3.put("date_begin", object.getString("date_begin"));
                 queryInfo3.put("corp", object.getString("corp"));
-                queryInfo3.put("code", object.getString("code"));
+                queryInfo3.put("code", code);
+
                 jsonObject1.put("approveinfo", unsignInfo3);
                 jsonObject1.put("queryinfo", queryInfo3);
                 break;
-            case "4": //采购订单删除
+            case "4": //删除 1\采购订单删除 2\销售订单删除 3\调拨订单删除
                 JSONObject unsignInfo4 = new JSONObject();
                 unsignInfo4.put("coperator", object.getString("coperator"));
+
                 JSONObject queryInfo4 = new JSONObject();
                 queryInfo4.put("date_end", object.getString("date_end"));
                 queryInfo4.put("date_begin", object.getString("date_begin"));
                 queryInfo4.put("corp", object.getString("corp"));
-                queryInfo4.put("code", object.getString("code"));
+                queryInfo4.put("code", code);
+
                 jsonObject1.put("deleteinfo", unsignInfo4);
                 jsonObject1.put("queryinfo", queryInfo4);
                 break;