Browse Source

建行接口

sunhz 3 years ago
parent
commit
4e850d348c
48 changed files with 2211 additions and 41 deletions
  1. 9 0
      pom.xml
  2. 3 6
      ruoyi-admin/pom.xml
  3. 1 0
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
  4. 45 0
      ruoyi-plugin/pom.xml
  5. 31 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/config/CxfConfig.java
  6. 43 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/Assets.java
  7. 18 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/AssetsR.java
  8. 33 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/CheckCargo.java
  9. 23 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/CheckCargoR.java
  10. 36 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/InOutCargo.java
  11. 38 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/InOutCargoR.java
  12. 31 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/MoveCargo.java
  13. 33 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/MoveCargoR.java
  14. 46 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/Pledge.java
  15. 51 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/PledgeR.java
  16. 18 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/SyncOrg.java
  17. 38 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/Voucher.java
  18. 51 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/VoucherDetailR.java
  19. 28 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/VoucherR.java
  20. 151 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/CargoDetail.java
  21. 86 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/CargoLockInfo.java
  22. 110 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/MoveCargoDetail.java
  23. 35 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/Page.java
  24. 42 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/ReqHeader.java
  25. 29 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/RspHeader.java
  26. 27 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/SyncedOrg.java
  27. 126 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/service/CcbService.java
  28. 347 0
      ruoyi-plugin/src/main/java/com/ruoyi/ccb/service/impl/CcbServiceImpl.java
  29. 11 3
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/domain/TCorps.java
  30. 18 0
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TCorpsMapper.java
  31. 3 0
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TGoodsMapper.java
  32. 2 0
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TWarehouseMapper.java
  33. 61 0
      ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/domain/TWhgenleg.java
  34. 4 0
      ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/mapper/TWhgenlegMapper.java
  35. 2 2
      ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/service/impl/TWhgenlegServiceImpl.java
  36. 61 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitems.java
  37. 20 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitemsElabel.java
  38. 9 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehousebillsitemsElabelMapper.java
  39. 71 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/IWarehouseBillsCcbService.java
  40. 41 20
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java
  41. 244 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/WarehouseBillsCcbServiceImpl.java
  42. 23 1
      ruoyi-warehouse/src/main/resources/mapper/basicData/TCorpsMapper.xml
  43. 4 0
      ruoyi-warehouse/src/main/resources/mapper/basicData/TGoodsMapper.xml
  44. 7 0
      ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseMapper.xml
  45. 74 3
      ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml
  46. 27 0
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsElabelMapper.xml
  47. 0 2
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml
  48. 0 4
      ruoyi-wechatProgram/pom.xml

+ 9 - 0
pom.xml

@@ -207,6 +207,7 @@
                 <artifactId>ruoyi-fleet</artifactId>
                 <version>${ruoyi.version}</version>
             </dependency>
+
             <!-- 航运模块-->
             <dependency>
                 <groupId>com.ruoyi</groupId>
@@ -214,6 +215,13 @@
                 <version>${ruoyi.version}</version>
             </dependency>
 
+            <!-- 插件模块 -->
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>ruoyi-plugin</artifactId>
+                <version>${ruoyi.version}</version>
+            </dependency>
+
         </dependencies>
     </dependencyManagement>
 
@@ -228,6 +236,7 @@
         <module>ruoyi-fleet</module>
         <module>ruoyi-wechatProgram</module>
         <module>ruoyi-shipping</module>
+        <module>ruoyi-plugin</module>
     </modules>
     <packaging>pom</packaging>
 

+ 3 - 6
ruoyi-admin/pom.xml

@@ -91,20 +91,17 @@
             <groupId>com.ruoyi</groupId>
             <artifactId>ruoyi-warehouse</artifactId>
         </dependency>
-        <dependency>
-            <groupId>com.ruoyi</groupId>
-            <artifactId>ruoyi-warehouse</artifactId>
-        </dependency>
 
         <!--车队模块-->
         <dependency>
             <groupId>com.ruoyi</groupId>
             <artifactId>ruoyi-fleet</artifactId>
-            <version>3.2.1</version>
         </dependency>
+
+        <!-- 插件模块 -->
         <dependency>
             <groupId>com.ruoyi</groupId>
-            <artifactId>ruoyi-fleet</artifactId>
+            <artifactId>ruoyi-plugin</artifactId>
         </dependency>
 
         <!--解析Xml 文件-->

+ 1 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java

@@ -114,6 +114,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 .antMatchers("/webjars/**").anonymous()
                 .antMatchers("/*/api-docs").anonymous()
                 .antMatchers("/druid/**").anonymous()
+                .antMatchers("/api/**").anonymous()
                 // 除上面外的所有请求全部需要鉴权认证
                 .anyRequest().authenticated()
                 .and()

+ 45 - 0
ruoyi-plugin/pom.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>ruoyi</artifactId>
+        <groupId>com.ruoyi</groupId>
+        <version>3.2.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>ruoyi-plugin</artifactId>
+
+    <description>插件模块</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-common</artifactId>
+        </dependency>
+
+        <!-- SOAP开发包 -->
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-spring-boot-starter-jaxws</artifactId>
+            <version>3.5.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-warehouse</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>

+ 31 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/config/CxfConfig.java

@@ -0,0 +1,31 @@
+package com.ruoyi.ccb.config;
+
+import com.ruoyi.ccb.service.CcbService;
+import lombok.AllArgsConstructor;
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBus;
+import org.apache.cxf.jaxws.EndpointImpl;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.xml.ws.Endpoint;
+
+@Configuration
+@AllArgsConstructor
+public class CxfConfig {
+
+    private final CcbService ccbService;
+
+    @Bean(name = Bus.DEFAULT_BUS_ID)
+    public SpringBus springBus() {
+        return new SpringBus();
+    }
+
+    @Bean
+    public Endpoint endpoint() {
+        EndpointImpl endpoint = new EndpointImpl(springBus(), ccbService);
+        endpoint.publish("/ccb");
+        return endpoint;
+    }
+
+}

+ 43 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/Assets.java

@@ -0,0 +1,43 @@
+package com.ruoyi.ccb.domain;
+
+import lombok.Data;
+
+/**
+ * 资产报文
+ *
+ * @author s
+ */
+@Data
+public class Assets {
+
+    /**
+     * 客户名称
+     */
+    private String userName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String uscc;
+
+    /**
+     * 请求用户
+     */
+    private String reqUser;
+
+    /**
+     * 提单号
+     */
+    private String blNumber;
+
+    /**
+     * 仓单编号
+     */
+    private String wrNumber;
+
+    /**
+     * 物料编号
+     */
+    private String cargoType;
+
+}

+ 18 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/AssetsR.java

@@ -0,0 +1,18 @@
+package com.ruoyi.ccb.domain;
+
+import com.ruoyi.ccb.domain.basic.CargoDetail;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 资产返回报文
+ *
+ * @author s
+ */
+@Data
+public class AssetsR {
+
+    private List<CargoDetail> cargos;
+
+}

+ 33 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/CheckCargo.java

@@ -0,0 +1,33 @@
+package com.ruoyi.ccb.domain;
+
+import lombok.Data;
+
+/**
+ * 核库报文
+ *
+ * @author s
+ */
+@Data
+public class CheckCargo {
+
+    /**
+     * 客户名称
+     */
+    private String userName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String uscc;
+
+    /**
+     * 提单号
+     */
+    private String blNumber;
+
+    /**
+     * 保管凭证号
+     */
+    private String takeVoucher;
+
+}

+ 23 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/CheckCargoR.java

@@ -0,0 +1,23 @@
+package com.ruoyi.ccb.domain;
+
+import lombok.Data;
+
+/**
+ * 核库报文返回
+ *
+ * @author s
+ */
+@Data
+public class CheckCargoR {
+
+    /**
+     * 处理结果
+     */
+    private String result;
+
+    /**
+     * 失败原因
+     */
+    private String reason;
+
+}

+ 36 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/InOutCargo.java

@@ -0,0 +1,36 @@
+package com.ruoyi.ccb.domain;
+
+import com.ruoyi.ccb.domain.basic.CargoDetail;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 出入库请求报文
+ *
+ * @author s
+ */
+@Data
+public class InOutCargo {
+
+    /**
+     * 客户名称
+     */
+    private String userName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String uscc;
+
+    /**
+     * 请求用户
+     */
+    private String reqUser;
+
+    /**
+     * 货物清单
+     */
+    List<CargoDetail> cargos;
+
+}

+ 38 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/InOutCargoR.java

@@ -0,0 +1,38 @@
+package com.ruoyi.ccb.domain;
+
+import lombok.Data;
+
+/**
+ * 出入库返回报文
+ *
+ * @author s
+ */
+@Data
+public class InOutCargoR {
+
+    /**
+     * 客户名称
+     */
+    private String userName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String uscc;
+
+    /**
+     * 请求用户
+     */
+    private String reqUser;
+
+    /**
+     * 处理结果
+     */
+    private String result;
+
+    /**
+     * 失败原因
+     */
+    private String reason;
+
+}

+ 31 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/MoveCargo.java

@@ -0,0 +1,31 @@
+package com.ruoyi.ccb.domain;
+
+import com.ruoyi.ccb.domain.basic.MoveCargoDetail;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 移库报文
+ *
+ * @author s
+ */
+@Data
+public class MoveCargo {
+
+    /**
+     * 客户名称
+     */
+    private String userName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String uscc;
+
+    /**
+     * 需要移库货物
+     */
+    private List<MoveCargoDetail> moveCargos;
+
+}

+ 33 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/MoveCargoR.java

@@ -0,0 +1,33 @@
+package com.ruoyi.ccb.domain;
+
+import lombok.Data;
+
+/**
+ * 移库返回报文
+ *
+ * @author s
+ */
+@Data
+public class MoveCargoR {
+
+    /**
+     * 客户名称
+     */
+    private String userName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String uscc;
+
+    /**
+     * 处理结果
+     */
+    private String result;
+
+    /**
+     * 失败原因
+     */
+    private String reason;
+
+}

+ 46 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/Pledge.java

@@ -0,0 +1,46 @@
+package com.ruoyi.ccb.domain;
+
+import com.ruoyi.ccb.domain.basic.CargoDetail;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 出质、提货报文
+ *
+ * @author s
+ */
+@Data
+public class Pledge {
+
+    /**
+     * 原出质人
+     */
+    private String userName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String uscc;
+
+    /**
+     * 新归属人(质押给银行)
+     */
+    private String newUserName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String newUserNameUscc;
+
+    /**
+     * 请求用户
+     */
+    private String repUser;
+
+    /**
+     * 货物清单
+     */
+    private List<CargoDetail> cargos;
+
+}

+ 51 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/PledgeR.java

@@ -0,0 +1,51 @@
+package com.ruoyi.ccb.domain;
+
+import com.ruoyi.ccb.domain.basic.CargoDetail;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 出质、提货返回报文
+ *
+ * @author s
+ */
+@Data
+public class PledgeR {
+
+    /**
+     * 原出质人
+     */
+    private String userName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String uscc;
+
+    /**
+     * 新归属人(质押给银行)
+     */
+    private String newUserName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String newUserNameUscc;
+
+    /**
+     * 货物清单
+     */
+    private List<CargoDetail> cargos;
+
+    /**
+     * 处理结果
+     */
+    private String result;
+
+    /**
+     * 失败原因
+     */
+    private String reason;
+
+}

+ 18 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/SyncOrg.java

@@ -0,0 +1,18 @@
+package com.ruoyi.ccb.domain;
+
+import com.ruoyi.ccb.domain.basic.Page;
+import lombok.Data;
+
+/**
+ * 用户同步报文
+ *
+ * @author s
+ */
+@Data
+public class SyncOrg {
+
+    private String registerAfter;
+
+    private Page page;
+
+}

+ 38 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/Voucher.java

@@ -0,0 +1,38 @@
+package com.ruoyi.ccb.domain;
+
+import lombok.Data;
+
+/**
+ * 凭证号报文
+ *
+ * @author s
+ */
+@Data
+public class Voucher {
+
+    /**
+     * 保管凭证号
+     */
+    private String takeVoucher;
+
+    /**
+     * 提单号
+     */
+    private String blNumber;
+
+    /**
+     * 客户名称
+     */
+    private String userName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String uscc;
+
+    /**
+     * 请求用户
+     */
+    private String reqUser;
+
+}

+ 51 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/VoucherDetailR.java

@@ -0,0 +1,51 @@
+package com.ruoyi.ccb.domain;
+
+import com.ruoyi.ccb.domain.basic.CargoDetail;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 凭证号详情返回报文
+ *
+ * @author Snight
+ */
+@Data
+public class VoucherDetailR {
+
+    /**
+     * 保管凭证号
+     */
+    private String takeVoucher;
+
+    /**
+     * 提单号
+     */
+    private String blNumber;
+
+    /**
+     * 仓储企业名称
+     */
+    private String storageEnterpriseName;
+
+    /**
+     * 保税状态
+     */
+    private Integer bondedStatus;
+
+    /**
+     * 客户名称
+     */
+    private String userName;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String uscc;
+
+    /**
+     * 货物清单
+     */
+    private List<CargoDetail> cargos;
+
+}

+ 28 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/VoucherR.java

@@ -0,0 +1,28 @@
+package com.ruoyi.ccb.domain;
+
+import lombok.Data;
+
+/**
+ * 凭证号返回报文
+ *
+ * @author s
+ */
+@Data
+public class VoucherR {
+
+    /**
+     * 是否存在
+     */
+    private String isExist;
+
+    /**
+     * 货权归属人
+     */
+    private String beLongUser;
+
+    /**
+     * 统一社会信用代码
+     */
+    private String uscc;
+
+}

+ 151 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/CargoDetail.java

@@ -0,0 +1,151 @@
+package com.ruoyi.ccb.domain.basic;
+
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 货物信息
+ *
+ * @author s
+ */
+@Data
+public class CargoDetail {
+
+    /**
+     * 商品类别
+     */
+    private String cargoType;
+
+    /**
+     * 货物编号
+     */
+    private String cargoNo;
+
+    /**
+     * 货物名称
+     */
+    private String cargoName;
+
+    /**
+     * 数量
+     */
+    private Long number;
+
+    /**
+     * 操作剩余数量
+     */
+    private Long numberLeft;
+
+    /**
+     * 数量单位
+     */
+    private String numberUnit;
+
+    /**
+     * 重量
+     */
+    private Double weight;
+
+    /**
+     * 操作剩余重量
+     */
+    private Double weightLeft;
+
+    /**
+     * 重量单位
+     */
+    private String weightUnit;
+
+    /**
+     * 规格
+     */
+    private String speci;
+
+    /**
+     * 库区号
+     */
+    private String shelvesName;
+
+    /**
+     * 仓库号
+     */
+    private String warehouseNo;
+
+    /**
+     * 仓库名称
+     */
+    private String warehouseName;
+
+    /**
+     * 生产厂家
+     */
+    private String proName;
+
+    /**
+     * 保管凭证号
+     */
+    private String takeVoucher;
+
+    /**
+     * 货物权属客户
+     */
+    private String cargoBelong;
+
+    /**
+     * 入库日期
+     */
+    private Date inStorageDate;
+
+    /**
+     * 入库单号
+     */
+    private String inStorageNumber;
+
+    /**
+     * 报税状态
+     */
+    private String bondedStatus;
+
+    /**
+     * 提单号
+     */
+    private String blNumber;
+
+    /**
+     * 锁定情况
+     */
+    private CargoLockInfo lockInfo;
+
+    /**
+     * 出库日期
+     */
+    private Date outStorageDate;
+
+    /**
+     * 最近操作日期
+     */
+    private Date latestOptDate;
+
+    /**
+     * 仓库编号
+     */
+    private String wrNumber;
+
+    /**
+     * 仓储中实际库存数量
+     */
+    private Long remainNumber;
+
+    /**
+     * 仓储中实际库存质量
+     */
+    private Double remainWeight;
+
+    /**
+     * 电子标签
+     */
+    private List<String> electronicTags;
+
+}

+ 86 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/CargoLockInfo.java

@@ -0,0 +1,86 @@
+package com.ruoyi.ccb.domain.basic;
+
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 货物锁定信息
+ *
+ * @author s
+ */
+@Data
+public class CargoLockInfo {
+
+    /**
+     * 货物编号
+     */
+    private String cargoNo;
+
+    /**
+     * 提单号
+     */
+    private String blNumber;
+
+    /**
+     * 货物权属客户
+     */
+    private String cargoBelong;
+
+    /**
+     * 保管凭证号
+     */
+    private String takeVoucher;
+
+    /**
+     * 数量
+     */
+    private Long number;
+
+    /**
+     * 数量单位
+     */
+    private String numberUnit;
+
+    /**
+     * 重量
+     */
+    private Double weight;
+
+    /**
+     * 重量单位
+     */
+    private String weightUnit;
+
+    /**
+     * 规格
+     */
+    private String speci;
+
+    /**
+     * 锁定原因
+     */
+    private String reasonCode;
+
+    /**
+     * 锁定时间
+     */
+    private Date lockTime;
+
+    /**
+     * 解锁时间
+     */
+    private Date unlockTime;
+
+    /**
+     * 仓单编号
+     */
+    private String wrNumber;
+
+    /**
+     * 电子标签
+     */
+    private List<String> electronicTags;
+
+}

+ 110 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/MoveCargoDetail.java

@@ -0,0 +1,110 @@
+package com.ruoyi.ccb.domain.basic;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 移库货物
+ *
+ * @author s
+ */
+@Data
+public class MoveCargoDetail {
+
+    /**
+     * 保管凭证号
+     */
+    private String takeVoucher;
+
+    /**
+     * 货物型号
+     */
+    private String cargoType;
+
+    /**
+     * 货物编号
+     */
+    private String cargoNo;
+
+    /**
+     * 货物名称
+     */
+    private String cargoName;
+
+    /**
+     * 原仓库名称
+     */
+    private String oldWarehouseName;
+
+    /**
+     * 原库号
+     */
+    private String oldWarehouseNo;
+
+    /**
+     * 原库位
+     */
+    private String oldShelvesName;
+
+    /**
+     * 新仓库名称
+     */
+    private String newWarehouseName;
+
+    /**
+     * 新库号
+     */
+    private String newWarehouseNo;
+
+    /**
+     * 新区位
+     */
+    private String newShelvesName;
+
+    /**
+     * 处理结果
+     */
+    private String result;
+
+    /**
+     * 失败原因
+     */
+    private String reason;
+
+    /**
+     * 数量
+     */
+    private Long number;
+
+    /**
+     * 数量单位
+     */
+    private String numberUnit;
+
+    /**
+     * 重量
+     */
+    private Double weight;
+
+    /**
+     * 重量单位
+     */
+    private String weightUnit;
+
+    /**
+     * 规格
+     */
+    private String speci;
+
+    /**
+     * 仓单编号
+     */
+    private String wrNumber;
+
+    /**
+     * 电子标签
+     */
+    private List<String> electronicTags;
+
+}

+ 35 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/Page.java

@@ -0,0 +1,35 @@
+package com.ruoyi.ccb.domain.basic;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 分页
+ *
+ * @author s
+ */
+@Data
+public class Page {
+
+    /**
+     * 内容
+     */
+    private Object content;
+
+    /**
+     * 单页大小
+     */
+    private Integer pageSize;
+
+    /**
+     * 总记录数
+     */
+    private Long totalRecords;
+
+    /**
+     * 当前页码
+     */
+    private Integer pageNo;
+
+}

+ 42 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/ReqHeader.java

@@ -0,0 +1,42 @@
+package com.ruoyi.ccb.domain.basic;
+
+import lombok.Data;
+
+/**
+ * 请求头
+ *
+ * @author s
+ */
+@Data
+public class ReqHeader {
+
+    /**
+     * 认证授权
+     */
+    private String Authorization;
+
+    /**
+     * 业务线编号
+     */
+    private String businessLine;
+
+    /**
+     * 分页对象
+     */
+    private Page page;
+
+    /**
+     * 审计
+     */
+    private String audit;
+
+    private String span;
+
+    private String tack;
+
+    /**
+     * 服务使用授权
+     */
+    private String apitoken;
+
+}

+ 29 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/RspHeader.java

@@ -0,0 +1,29 @@
+package com.ruoyi.ccb.domain.basic;
+
+import lombok.Data;
+
+
+/**
+ * 返回头
+ *
+ * @author s
+ */
+@Data
+public class RspHeader {
+
+    /**
+     * 返回码
+     */
+    private String code;
+
+    /**
+     * 服务返回信息
+     */
+    private String message;
+
+    /**
+     * 国际化标识
+     */
+    private String i18ncode;
+
+}

+ 27 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/domain/basic/SyncedOrg.java

@@ -0,0 +1,27 @@
+package com.ruoyi.ccb.domain.basic;
+
+import lombok.Data;
+
+/**
+ * 用户信息
+ *
+ * @author s
+ */
+@Data
+public class SyncedOrg {
+
+    private String userName;
+
+    private String displayName;
+
+    private String uscc;
+
+    private String foreignId;
+
+    private String contractNo;
+
+    private String address;
+
+    private String registrationTime;
+
+}

+ 126 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/service/CcbService.java

@@ -0,0 +1,126 @@
+package com.ruoyi.ccb.service;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * CCB-SOAP接口
+ *
+ * @author s
+ */
+@WebService(targetNamespace = "http://service.ccb.ruoyi.com/")
+public interface CcbService {
+
+    /**
+     * 查询保管凭证号
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String takeVoucherIsExist(String json);
+
+    /**
+     * 保管凭证号详情
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String takeVoucherDetail(String json);
+
+    /**
+     * 同步出质
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String cargoPledge(String json);
+
+    /**
+     * 同步提货
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String cargoPledgeOut(String json);
+
+    /**
+     * 移库请求
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String moveCargoReq(String json);
+
+    /**
+     * 入库请求
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String inCargoReq(String json);
+
+    /**
+     * 出库请求
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String outCargoReq(String json);
+
+    /**
+     * 保管凭证号详情
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String checkCargoCmd(String json);
+
+    /**
+     * 同步用户信息
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String syncOrg(String json);
+
+    /**
+     * 生成仓单编号
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String generateWrNumber(String json);
+
+    /**
+     * 作废仓单编号指令
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String cancelWrNumber(String json);
+
+    /**
+     * 查询提单号
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String blNumberIsExist(String json);
+
+    /**
+     * 提单号详情
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String blNumberDetail(String json);
+
+    /**
+     * 查询用户资产
+     * @param json 报文
+     * @return 结果
+     */
+    @WebMethod
+    String queryAssets(String json);
+
+}

+ 347 - 0
ruoyi-plugin/src/main/java/com/ruoyi/ccb/service/impl/CcbServiceImpl.java

@@ -0,0 +1,347 @@
+package com.ruoyi.ccb.service.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.PageInfo;
+import com.ruoyi.ccb.domain.*;
+import com.ruoyi.ccb.domain.basic.CargoDetail;
+import com.ruoyi.ccb.domain.basic.CargoLockInfo;
+import com.ruoyi.ccb.domain.basic.Page;
+import com.ruoyi.ccb.domain.basic.SyncedOrg;
+import com.ruoyi.ccb.service.CcbService;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.warehouseBusiness.domain.TWarehousebillsitems;
+import com.ruoyi.warehouseBusiness.service.IWarehouseBillsCcbService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.jws.WebService;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * CCB-SOAP接口实现
+ *
+ * @author s
+ */
+@WebService(serviceName = "CcbService",
+        targetNamespace = "http://service.ccb.ruoyi.com/",
+        endpointInterface = "com.ruoyi.ccb.service.CcbService"
+)
+@Service
+public class CcbServiceImpl implements CcbService {
+
+    @Autowired
+    private IWarehouseBillsCcbService ccbService;
+
+    @Override
+    public String takeVoucherIsExist(String json) {
+        Voucher voucher = JSON.parseObject(json, Voucher.class);
+
+        // 库存帐查询
+        List<Map<String, Object>> stockList = ccbService.getStockList(voucher.getTakeVoucher(), voucher.getUserName());
+
+        VoucherR voucherR = new VoucherR();
+        if (stockList.size() > 0) {
+            voucherR.setIsExist("Y");
+        } else {
+            voucherR.setIsExist("N");
+        }
+        voucherR.setBeLongUser(voucher.getUserName());
+        voucherR.setUscc(voucher.getUscc());
+        return JSON.toJSONString(voucherR);
+    }
+
+    @Override
+    public String takeVoucherDetail(String json) {
+        Voucher voucher = JSON.parseObject(json, Voucher.class);
+
+        // 库存帐查询
+        List<CargoDetail> cargos = new ArrayList<>();
+        List<Map<String, Object>> stockList = ccbService.getStockList(voucher.getTakeVoucher(), voucher.getUserName());
+        stockList.forEach(map -> {
+            String temp = JSON.toJSONString(map);
+
+            CargoDetail detail = JSON.parseObject(temp, CargoDetail.class);
+            detail.setNumberUnit("件");
+            detail.setWeightUnit("千克");
+            detail.setCargoBelong(voucher.getUserName());
+            detail.setInStorageNumber(detail.getTakeVoucher());
+            detail.setRemainNumber(detail.getNumberLeft());
+            detail.setRemainWeight(detail.getWeightLeft());
+            detail.setElectronicTags(ccbService.getLabel(detail.getTakeVoucher()));
+
+            JSONObject object = JSON.parseObject(temp);
+            if (!"0".equals(object.getString("lockStatus"))) {
+                CargoLockInfo lockInfo = new CargoLockInfo();
+                lockInfo.setCargoNo(detail.getCargoNo());
+                lockInfo.setBlNumber(detail.getBlNumber());
+                lockInfo.setCargoBelong(detail.getCargoBelong());
+                lockInfo.setTakeVoucher(detail.getTakeVoucher());
+                lockInfo.setNumber(detail.getNumberLeft());
+                lockInfo.setNumberUnit(detail.getNumberUnit());
+                lockInfo.setWeight(detail.getWeightLeft());
+                lockInfo.setWeightUnit(detail.getWeightUnit());
+                lockInfo.setSpeci(detail.getSpeci());
+                lockInfo.setReasonCode("PLGL");
+                lockInfo.setLockTime(object.getDate("lockTime"));
+                lockInfo.setWrNumber(detail.getWrNumber());
+                lockInfo.setElectronicTags(detail.getElectronicTags());
+            }
+        });
+
+        VoucherDetailR detailR = new VoucherDetailR();
+        detailR.setTakeVoucher(voucher.getTakeVoucher());
+        detailR.setStorageEnterpriseName(voucher.getUserName());
+        detailR.setBondedStatus(0);
+        detailR.setUserName(voucher.getUserName());
+        detailR.setUscc(voucher.getUscc());
+        detailR.setCargos(cargos);
+        return JSON.toJSONString(detailR);
+    }
+
+    @Override
+    public String cargoPledge(String json) {
+        Pledge pledge = JSON.parseObject(json, Pledge.class);
+        List<String> billNoList = pledge.getCargos()
+                .stream()
+                .map(CargoDetail::getTakeVoucher)
+                .collect(Collectors.toList());
+
+        // 出质处理
+        AjaxResult result = ccbService.lockStock(pledge.getNewUserName(), billNoList, false);
+
+        PledgeR pledgeR = new PledgeR();
+        pledgeR.setUserName(pledge.getUserName());
+        pledgeR.setUscc(pledge.getUscc());
+        pledgeR.setNewUserName(pledge.getNewUserName());
+        pledgeR.setNewUserNameUscc(pledge.getNewUserNameUscc());
+        pledgeR.setCargos(pledge.getCargos());
+        if ((int) result.get("code") != 200) {
+            pledgeR.setResult("N");
+            pledgeR.setReason((String) result.get("msg"));
+        } else {
+            pledgeR.setResult("Y");
+        }
+        return JSON.toJSONString(pledgeR);
+    }
+
+    @Override
+    public String cargoPledgeOut(String json) {
+        Pledge pledge = JSON.parseObject(json, Pledge.class);
+        List<String> billNoList = pledge.getCargos()
+                .stream()
+                .map(CargoDetail::getTakeVoucher)
+                .collect(Collectors.toList());
+
+        // 解质处理
+        AjaxResult result = ccbService.unlockStock(billNoList, false);
+
+        PledgeR pledgeR = new PledgeR();
+        pledgeR.setUserName(pledge.getNewUserName());
+        pledgeR.setUscc(pledge.getNewUserNameUscc());
+        pledgeR.setCargos(pledge.getCargos());
+        if ((int) result.get("code") != 200) {
+            pledgeR.setResult("N");
+            pledgeR.setReason((String) result.get("msg"));
+        } else {
+            pledgeR.setResult("Y");
+        }
+        return JSON.toJSONString(pledgeR);
+    }
+
+    @Override
+    public String moveCargoReq(String json) {
+        return null;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String inCargoReq(String json) {
+        InOutCargo inOutCargo = JSON.parseObject(json, InOutCargo.class);
+        List<TWarehousebillsitems> items = convert(inOutCargo.getCargos());
+        AjaxResult result = ccbService.inAndOutStock("SJRK", items);
+
+        InOutCargoR inOutCargoR = new InOutCargoR();
+        inOutCargoR.setUserName(inOutCargo.getUserName());
+        inOutCargoR.setUscc(inOutCargo.getUscc());
+        inOutCargoR.setReqUser(inOutCargo.getReqUser());
+        if ((int) result.get("code") != 200) {
+            inOutCargoR.setResult("N");
+            inOutCargoR.setReason((String) result.get("msg"));
+        } else {
+            inOutCargoR.setResult("Y");
+        }
+        return JSON.toJSONString(inOutCargoR);
+    }
+
+    @Override
+    public String outCargoReq(String json) {
+        InOutCargo inOutCargo = JSON.parseObject(json, InOutCargo.class);
+        List<TWarehousebillsitems> items = convert(inOutCargo.getCargos());
+        AjaxResult result = ccbService.inAndOutStock("SJCK", items);
+
+        InOutCargoR inOutCargoR = new InOutCargoR();
+        inOutCargoR.setUserName(inOutCargo.getUserName());
+        inOutCargoR.setUscc(inOutCargo.getUscc());
+        inOutCargoR.setReqUser(inOutCargo.getReqUser());
+        if ((int) result.get("code") != 200) {
+            inOutCargoR.setResult("N");
+            inOutCargoR.setReason((String) result.get("msg"));
+        } else {
+            inOutCargoR.setResult("Y");
+            inOutCargoR.setReason("");
+        }
+        return JSON.toJSONString(inOutCargoR);
+    }
+
+    @Override
+    public String checkCargoCmd(String json) {
+        return null;
+    }
+
+    @Override
+    public String syncOrg(String json) {
+        SyncOrg syncOrg = JSON.parseObject(json, SyncOrg.class);
+
+        Page page = syncOrg.getPage();
+        if (ObjectUtil.isNull(page)) {
+            page = new Page();
+            page.setPageNo(1);
+            page.setPageSize(10);
+        }
+
+        List<Map<String, Object>> orgList = ccbService.getSyncOrg(page.getPageNo(), page.getPageSize(), syncOrg.getRegisterAfter());
+        page.setTotalRecords(new PageInfo<>(orgList).getTotal());
+
+        List<SyncedOrg> orgListR = orgList.stream()
+                .map(e -> JSON.parseObject(JSON.toJSONString(e), SyncedOrg.class))
+                .collect(Collectors.toList());
+        page.setContent(orgListR);
+        return JSON.toJSONString(page);
+    }
+
+    @Override
+    public String generateWrNumber(String json) {
+        Pledge pledge = JSON.parseObject(json, Pledge.class);
+        List<CargoDetail> cargos = pledge.getCargos();
+        List<String> billNoList = cargos.stream()
+                .map(CargoDetail::getTakeVoucher)
+                .collect(Collectors.toList());
+
+        AjaxResult result = ccbService.unlockStock(billNoList, true);
+
+        PledgeR pledgeR = new PledgeR();
+        pledgeR.setUserName(pledge.getUserName());
+        pledgeR.setUscc(pledge.getUscc());
+        pledgeR.setNewUserName(pledge.getNewUserName());
+        pledgeR.setNewUserNameUscc(pledge.getNewUserNameUscc());
+        if ((int) result.get("code") != 200) {
+            pledgeR.setResult("N");
+            pledgeR.setReason((String) result.get("msg"));
+        } else {
+            pledgeR.setResult("Y");
+            cargos.forEach(cargo -> cargo.setWrNumber(cargo.getTakeVoucher()));
+        }
+        pledgeR.setCargos(cargos);
+        return JSON.toJSONString(pledgeR);
+    }
+
+    @Override
+    public String cancelWrNumber(String json) {
+        Pledge pledge = JSON.parseObject(json, Pledge.class);
+        List<String> billNoList = pledge.getCargos()
+                .stream()
+                .map(CargoDetail::getTakeVoucher)
+                .collect(Collectors.toList());
+
+        // 解质处理
+        AjaxResult result = ccbService.unlockStock(billNoList, true);
+
+        PledgeR pledgeR = new PledgeR();
+        pledgeR.setUserName(pledge.getUserName());
+        pledgeR.setUscc(pledge.getUscc());
+        pledgeR.setNewUserName(pledge.getNewUserName());
+        pledgeR.setNewUserNameUscc(pledge.getNewUserNameUscc());
+        if ((int) result.get("code") != 200) {
+            pledgeR.setResult("N");
+            pledgeR.setReason((String) result.get("msg"));
+        } else {
+            pledgeR.setResult("Y");
+        }
+        pledgeR.setCargos(pledge.getCargos());
+        return JSON.toJSONString(pledgeR);
+    }
+
+    @Override
+    public String blNumberIsExist(String json) {
+        return null;
+    }
+
+    @Override
+    public String blNumberDetail(String json) {
+        return null;
+    }
+
+    @Override
+    public String queryAssets(String json) {
+        return null;
+    }
+
+    /**
+     * 数据转换
+     *
+     * @param cargos 出入库数据
+     * @return 结果
+     */
+    private List<TWarehousebillsitems> convert(List<CargoDetail> cargos) {
+        List<TWarehousebillsitems> items = new ArrayList<>();
+        for (CargoDetail cargo : cargos) {
+            TWarehousebillsitems item = new TWarehousebillsitems();
+            item.setCargoNo(cargo.getCargoNo());
+            item.setCargoBelong(cargo.getCargoBelong());
+            item.setfMblno(cargo.getBlNumber());
+            item.setfPackagespecs(cargo.getSpeci());
+            item.setfOriginalbillno(cargo.getBlNumber());
+            item.setfBillingway(3L);
+            item.setfCntqty(1L);
+            item.setWarehouseNo(cargo.getWarehouseNo());
+            item.setShelvesNo(cargo.getShelvesName());
+
+            if (ObjectUtil.isNotNull(cargo.getNumber())) {
+                item.setfPlanqty(cargo.getNumber());
+                item.setfQty(cargo.getNumber());
+            } else {
+                String[] s = String.valueOf(cargo.getWeight()).split("\\.");
+                item.setfPlanqty(Long.parseLong(s[0]));
+                item.setfQty(Long.parseLong(s[0]));
+            }
+            if (ObjectUtil.isNotNull(cargo.getWeight())) {
+                item.setfPlangrossweight(BigDecimal.valueOf(cargo.getWeight()));
+                item.setfPlannetweight(BigDecimal.valueOf(cargo.getWeight()));
+                item.setfGrossweight(BigDecimal.valueOf(cargo.getWeight()));
+                item.setfNetweight(BigDecimal.valueOf(cargo.getWeight()));
+            } else {
+                item.setfPlangrossweight(BigDecimal.valueOf(cargo.getNumber()));
+                item.setfPlannetweight(BigDecimal.valueOf(cargo.getNumber()));
+                item.setfGrossweight(BigDecimal.valueOf(cargo.getNumber()));
+                item.setfNetweight(BigDecimal.valueOf(cargo.getNumber()));
+            }
+
+            // fSealno代替保税字段
+            item.setfSealno(cargo.getBondedStatus());
+            item.setfPlanvolumn(BigDecimal.ZERO);
+            item.setfVolumn(BigDecimal.ZERO);
+            item.setfBillstatus(10L);
+            item.setElectronicTags(cargo.getElectronicTags());
+            items.add(item);
+        }
+        return items;
+    }
+
+}

+ 11 - 3
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/domain/TCorps.java

@@ -1,11 +1,8 @@
 package com.ruoyi.basicData.domain;
 
-import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 
 import java.util.Date;
 
@@ -231,6 +228,9 @@ public class TCorps extends BaseEntity {
     /** 部门 */
     private String deptId;
 
+    /** 社会统一信用代码 */
+    private String uscc;
+
     public String getfStatusString() {
         return fStatusString;
     }
@@ -655,6 +655,14 @@ public class TCorps extends BaseEntity {
         this.deptId = deptId;
     }
 
+    public String getUscc() {
+        return uscc;
+    }
+
+    public void setUscc(String uscc) {
+        this.uscc = uscc;
+    }
+
     @Override
     public String toString() {
         return "TCorps{" +

+ 18 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TCorpsMapper.java

@@ -6,6 +6,7 @@ import com.ruoyi.basicData.domain.TCorps;
 import com.ruoyi.basicData.domain.TCorps;
 import com.ruoyi.basicData.domain.TCustomerContact;
 import com.ruoyi.common.core.domain.entity.SysDictData;
+import org.apache.ibatis.annotations.MapKey;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -181,4 +182,21 @@ public interface TCorpsMapper extends BaseMapper<TCorps> {
 
     public int getCorpCount();
 
+    /**
+     * 获取客户ID
+     *
+     * @param fName 客户名
+     * @return ID
+     */
+    public TCorps getCorpByName(String fName);
+
+    /**
+     * 查询客户详情列表
+     *
+     * @param time 注册时间
+     * @return 客户详情集合
+     */
+    @MapKey(value = "fId")
+    public List<Map<String, Object>> getSyncCorpList(String time);
+
 }

+ 3 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TGoodsMapper.java

@@ -88,4 +88,7 @@ public interface TGoodsMapper {
      * @return
      */
     List<TGoods> selectByIds(@Param("ids") List<Long> ids);
+
+    public TGoods getGoodsByNo(String fNo);
+
 }

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TWarehouseMapper.java

@@ -179,4 +179,6 @@ public interface TWarehouseMapper {
      */
     public List<Map<String, Object>> biWarehouseList(@Param("external") String external);
 
+    public TWarehouse getWarehouseByNo(String fNo);
+
 }

+ 61 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/domain/TWhgenleg.java

@@ -247,6 +247,27 @@ public class TWhgenleg extends BaseEntity {
      */
     private String fEmsSeqNo;
 
+    /**
+     * 锁定状态
+     */
+    private Integer lockStatus;
+    /**
+     * 质押归属人
+     */
+    private String belongTo;
+    /**
+     * 锁定时间
+     */
+    private Date lockTime;
+    /**
+     * 解锁时间
+     */
+    private Date unlockTime;
+    /**
+     * 舱单编号
+     */
+    private String wrNumber;
+
     /** 是否按照箱号 */
     private Long isCntrno;
     /** 是否按照提单号 */
@@ -667,5 +688,45 @@ public class TWhgenleg extends BaseEntity {
                 ", fCustomno='" + fCustomno + '\'' +
                 '}';
     }
+
+    public Integer getLockStatus() {
+        return lockStatus;
+    }
+
+    public void setLockStatus(Integer lockStatus) {
+        this.lockStatus = lockStatus;
+    }
+
+    public String getBelongTo() {
+        return belongTo;
+    }
+
+    public void setBelongTo(String belongTo) {
+        this.belongTo = belongTo;
+    }
+
+    public Date getLockTime() {
+        return lockTime;
+    }
+
+    public void setLockTime(Date lockTime) {
+        this.lockTime = lockTime;
+    }
+
+    public Date getUnlockTime() {
+        return unlockTime;
+    }
+
+    public void setUnlockTime(Date unlockTime) {
+        this.unlockTime = unlockTime;
+    }
+
+    public String getWrNumber() {
+        return wrNumber;
+    }
+
+    public void setWrNumber(String wrNumber) {
+        this.wrNumber = wrNumber;
+    }
 }
 

+ 4 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/mapper/TWhgenlegMapper.java

@@ -241,4 +241,8 @@ public interface TWhgenlegMapper {
 
     public List<Map<String, Object>> warehouseSupervise(@Param("parent") Integer parent);
 
+    public List<Map<String, Object>> selectStockList(@Param("billNo") String billNo, @Param("corpId") Long corpId);
+
+    public int changeBelongTo(TWhgenleg tWhgenleg);
+
 }

+ 2 - 2
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/service/impl/TWhgenlegServiceImpl.java

@@ -145,7 +145,7 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
                 if ("保税".equals(map.get("fGoodsType"))) {
                     String strEmsSeqNo;
                     if (StringUtils.isNull(map.get("fEmsSeqNo"))) {
-                        strEmsSeqNo = "        <EmsSeqNo></EmsSeqNo>\n";
+                        strEmsSeqNo = "        <EmsSeqNo>" + map.get("fId") + "</EmsSeqNo>\n";
                     } else {
                         strEmsSeqNo = "        <EmsSeqNo>" + map.get("fEmsSeqNo") + "</EmsSeqNo>\n";
                     }
@@ -294,7 +294,7 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
                     bw.write("                <LocationInfo>\n"
                             + "                    <LocationId>" + area.get("fNo") + "</LocationId>\n"
                             + "                    <LocationName>" + area.get("fName") + "</LocationName>\n"
-                            + "                    <PlaceId>" + area.get("fNo") + "</PlaceId>\n"
+                            + "                    <PlaceId>" + area.get("fId") + "</PlaceId>\n"
                             + "                    <PlaceName>" + area.get("fName") + "</PlaceName>\n"
                             + "                </LocationInfo>\n"
                     );

+ 61 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitems.java

@@ -7,6 +7,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
 
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 仓库明细从表对象 t_warehousebillsitems
@@ -372,6 +373,18 @@ public class TWarehousebillsitems extends BaseEntity {
     @TableField(exist = false)
     private Long fTocorpid;
 
+    private List<TWarehousebillsitemsElabel> labelList;
+
+    private List<String> electronicTags;
+
+    private String cargoNo;
+
+    private String cargoBelong;
+
+    private String warehouseNo;
+
+    private String shelvesNo;
+
     public String getfElabel() {
         return fElabel;
     }
@@ -1006,4 +1019,52 @@ public class TWarehousebillsitems extends BaseEntity {
                 ", fCartypeId='" + fCartypeId + '\'' +
                 '}';
     }
+
+    public List<TWarehousebillsitemsElabel> getLabelList() {
+        return labelList;
+    }
+
+    public void setLabelList(List<TWarehousebillsitemsElabel> labelList) {
+        this.labelList = labelList;
+    }
+
+    public List<String> getElectronicTags() {
+        return electronicTags;
+    }
+
+    public void setElectronicTags(List<String> electronicTags) {
+        this.electronicTags = electronicTags;
+    }
+
+    public String getCargoNo() {
+        return cargoNo;
+    }
+
+    public void setCargoNo(String cargoNo) {
+        this.cargoNo = cargoNo;
+    }
+
+    public String getCargoBelong() {
+        return cargoBelong;
+    }
+
+    public void setCargoBelong(String cargoBelong) {
+        this.cargoBelong = cargoBelong;
+    }
+
+    public String getWarehouseNo() {
+        return warehouseNo;
+    }
+
+    public void setWarehouseNo(String warehouseNo) {
+        this.warehouseNo = warehouseNo;
+    }
+
+    public String getShelvesNo() {
+        return shelvesNo;
+    }
+
+    public void setShelvesNo(String shelvesNo) {
+        this.shelvesNo = shelvesNo;
+    }
 }

+ 20 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitemsElabel.java

@@ -23,6 +23,10 @@ public class TWarehousebillsitemsElabel extends BaseEntity {
     private Long fQty;
     /** 重量 */
     private BigDecimal fWeight;
+    /** 1入库 2出库 3库存总账 */
+    private Integer fType;
+    /** 0在库 1出库 */
+    private Integer fStatus;
 
     public Long getfId() {
         return fId;
@@ -71,4 +75,20 @@ public class TWarehousebillsitemsElabel extends BaseEntity {
     public void setfWeight(BigDecimal fWeight) {
         this.fWeight = fWeight;
     }
+
+    public Integer getfType() {
+        return fType;
+    }
+
+    public void setfType(Integer fType) {
+        this.fType = fType;
+    }
+
+    public Integer getfStatus() {
+        return fStatus;
+    }
+
+    public void setfStatus(Integer fStatus) {
+        this.fStatus = fStatus;
+    }
 }

+ 9 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehousebillsitemsElabelMapper.java

@@ -17,6 +17,10 @@ public interface TWarehousebillsitemsElabelMapper {
      */
     void updateById(TWarehousebillsitemsElabel elabel);
     /**
+     * 修改状态
+     */
+    void updateStatus(TWarehousebillsitemsElabel elabel);
+    /**
      * 删一条
      */
     int deleteById(Long id);
@@ -42,4 +46,9 @@ public interface TWarehousebillsitemsElabelMapper {
      * 根据父级的父级 id 获取数据
      */
     List<TWarehousebillsitemsElabel> selectByfGPid(Long fGPid);
+
+    /**
+     * 获取电子标签
+     */
+    List<String> getLabel(String billNo);
 }

+ 71 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/IWarehouseBillsCcbService.java

@@ -0,0 +1,71 @@
+package com.ruoyi.warehouseBusiness.service;
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.warehouseBusiness.domain.TWarehousebillsitems;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 建行仓库接口
+ *
+ * @author s
+ */
+public interface IWarehouseBillsCcbService {
+
+    /**
+     * 出入库
+     *
+     * @param billType 单据类型
+     * @param cargos 出入库数据
+     * @return 结果
+     */
+    AjaxResult inAndOutStock(String billType, List<TWarehousebillsitems> cargos);
+
+    /**
+     * 获取库存
+     *
+     * @param takeVoucher 保管凭证号
+     * @param corpName 客户名
+     * @return 库存列表
+     */
+    List<Map<String, Object>> getStockList(String takeVoucher, String corpName);
+
+    /**
+     * 锁定库存
+     *
+     * @param belongTo 归属人
+     * @param billNoList 业务编号
+     * @param isWrNumber 是否仓单编号请求
+     * @return 结果
+     */
+    AjaxResult lockStock(String belongTo, List<String> billNoList, boolean isWrNumber);
+
+    /**
+     * 解锁库存
+     *
+     * @param billNoList 业务编号
+     * @param isWrNumber 是否仓单编号请求
+     * @return 结果
+     */
+    AjaxResult unlockStock(List<String> billNoList, boolean isWrNumber);
+
+    /**
+     * 获取同步客户
+     *
+     * @param page 页数
+     * @param size 单页大小
+     * @param time 注册时间
+     * @return 结果
+     */
+    List<Map<String, Object>> getSyncOrg(Integer page, Integer size, String time);
+
+    /**
+     * 获取电子标签
+     *
+     * @param billNo 业务编号
+     * @return 结果
+     */
+    List<String> getLabel(String billNo);
+
+}

+ 41 - 20
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -1,6 +1,7 @@
 package com.ruoyi.warehouseBusiness.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -717,14 +718,14 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             // 提单号
             tWhgenleg.setfMblno(warehousebillsitems.getfMblno());
             // 原始单号
-            tWhgenleg.setfOriginalbillno(warehousebillsitems.getfMblno());
+            tWhgenleg.setfOriginalbillno(warehousebillsitems.getfBillno());
         } else {
             // 客户
             tWhgenleg.setfCorpid(warehouseBills.getfCorpid());
             // 提单号
             tWhgenleg.setfMblno(warehouseBills.getfMblno());
             // 原始单号
-            tWhgenleg.setfOriginalbillno(warehouseBills.getfMblno());
+            tWhgenleg.setfOriginalbillno(warehouseBills.getfBillno());
         }
         // 库内箱号
         if (StringUtils.isNotEmpty(warehousebillsitems.getfLocalcntrno())) {
@@ -781,6 +782,17 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         // 结余件数
         tWhgenleg.setfQtyblc(warehousebillsitems.getfQty());
         tWhgenlegMapper.insertTWhgenleg(tWhgenleg);
+
+        warehousebillsitems.getElectronicTags().forEach(tag -> {
+            TWarehousebillsitemsElabel eLabel = new TWarehousebillsitemsElabel();
+            eLabel.setfGPid(tWhgenleg.getfId());
+            eLabel.setfPid(tWhgenleg.getfId());
+            eLabel.setfContent(tag);
+            eLabel.setfType(3);
+            eLabel.setfStatus(0);
+            warehousebillsitemsElabelMapper.insert(eLabel);
+        });
+
         return tWhgenleg.getfId();
     }
 
@@ -926,27 +938,26 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                         insertTWarehousebillsLog(wbItem, 10L);
                     }
                 }
+
                 // 获取前端是否传递电子标签数据
-                if (StringUtils.isNotNull(wbItem.getfElabel())) { // 如果电子标签有数据
-                    Date now = new Date();
-                    TWarehousebillsitemsElabel result = warehousebillsitemsElabelMapper.selectByfPid(wbItem.getfId());
-                    if (StringUtils.isNotNull(result)) {
-                        result.setfQty(wbItem.getfQty());
-                        result.setfContent(wbItem.getfElabel());
-                        result.setUpdateBy(loginUser.getUser().getUserName());
-                        result.setUpdateTime(now);
-                        warehousebillsitemsElabelMapper.updateById(result);
+                wbItem.getLabelList().forEach(label -> {
+                    if (ObjectUtil.isNull(label.getfId())) {
+                        label.setfGPid(wbItem.getfPid());
+                        label.setfPid(wbItem.getfId());
+                        if ("SJRK".equals(billsType)) {
+                            label.setfType(1);
+                        } else {
+                            label.setfType(2);
+                        }
+                        label.setCreateBy(loginUser.getUser().getUserName());
+                        label.setCreateTime(new Date());
+                        warehousebillsitemsElabelMapper.insert(label);
                     } else {
-                        TWarehousebillsitemsElabel elabel = new TWarehousebillsitemsElabel();
-                        elabel.setfGPid(wbItem.getfPid());
-                        elabel.setfPid(wbItem.getfId());
-                        elabel.setfContent(wbItem.getfElabel());
-                        elabel.setfQty(wbItem.getfQty());
-                        elabel.setCreateBy(loginUser.getUser().getUserName());
-                        elabel.setCreateTime(now);
-                        warehousebillsitemsElabelMapper.insert(elabel);
+                        label.setUpdateBy(loginUser.getUser().getUserName());
+                        label.setUpdateTime(new Date());
+                        warehousebillsitemsElabelMapper.updateById(label);
                     }
-                }
+                });
             }
         }
         //  附件添加
@@ -4371,6 +4382,16 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 judgeItemQty(tWhgenle, wbItem, i);
                 // 更新库存总账
                 updateTWhgenlegData(wbItem, tWhgenle.getfId(), billsType);
+                // 处理电子标签
+                List<String> labelList = wbItem.getLabelList().stream().map(TWarehousebillsitemsElabel::getfContent).collect(toList());
+                labelList.forEach(label -> {
+                    TWarehousebillsitemsElabel eLabel = new TWarehousebillsitemsElabel();
+                    eLabel.setfStatus(1);
+                    eLabel.setfContent(label);
+                    eLabel.setfType(3);
+                    warehousebillsitemsElabelMapper.updateStatus(eLabel);
+                });
+
                 wbItem.setfBillstatus(40L);
             } else if (WarehouseTypeEnum.CKDB.getType().equals(billsType) || WarehouseTypeEnum.HWTG.getType().equals(billsType)) { // 调拨查询
                 //校验计费日期是等于库存总帐计费日,如果不相等则报错

+ 244 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/WarehouseBillsCcbServiceImpl.java

@@ -0,0 +1,244 @@
+package com.ruoyi.warehouseBusiness.service.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.github.pagehelper.PageHelper;
+import com.ruoyi.basicData.domain.TCorps;
+import com.ruoyi.basicData.domain.TGoods;
+import com.ruoyi.basicData.mapper.TCorpsMapper;
+import com.ruoyi.basicData.mapper.TGoodsMapper;
+import com.ruoyi.basicData.mapper.TWarehouseMapper;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.TWarehouse;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.reportManagement.domain.TWhgenleg;
+import com.ruoyi.reportManagement.mapper.TWhgenlegMapper;
+import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
+import com.ruoyi.warehouseBusiness.domain.TWarehousebillsitems;
+import com.ruoyi.warehouseBusiness.domain.TWarehousebillsitemsElabel;
+import com.ruoyi.warehouseBusiness.mapper.TWarehouseBillsMapper;
+import com.ruoyi.warehouseBusiness.mapper.TWarehousebillsitemsElabelMapper;
+import com.ruoyi.warehouseBusiness.mapper.TWarehousebillsitemsMapper;
+import com.ruoyi.warehouseBusiness.service.IWarehouseBillsCcbService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 建行接口实现
+ *
+ * @author s
+ */
+@Service
+@AllArgsConstructor
+public class WarehouseBillsCcbServiceImpl implements IWarehouseBillsCcbService {
+
+    private final BillnoSerialServiceImpl serialServiceImpl;
+
+    private final TWarehouseBillsMapper billMapper;
+
+    private final TWarehousebillsitemsMapper billItemMapper;
+
+    private final TWarehousebillsitemsElabelMapper eLabelMapper;
+
+    private final TCorpsMapper corpMapper;
+
+    private final TGoodsMapper goodsMapper;
+
+    private final TWarehouseMapper warehouseMapper;
+
+    private final TWhgenlegMapper stockMapper;
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public AjaxResult inAndOutStock(String billType, List<TWarehousebillsitems> items) {
+        for (TWarehousebillsitems item : items) {
+            // 获取客户信息
+            TCorps corp = corpMapper.getCorpByName(item.getCargoBelong());
+            if (ObjectUtil.isNull(corp)) {
+                return AjaxResult.error("客户不存在!");
+            }
+
+            // 初始化数据
+            Date bsDate = new Date();
+            String billNo = serialServiceImpl.getBillNo(billType, bsDate);
+            String dateChanged = DateUtils.getTimestamp(bsDate).toString() + (int) (Math.random() * 900) + 100;
+            Long billId;
+
+            // 组装主表数据
+            TWarehouseBills bill = new TWarehouseBills();
+            bill.setfDeptid(100L);
+            bill.setCreateBy("CCB");
+            bill.setfStorekeeper("CCB");
+            bill.setfContacts("CCB");
+            bill.setfIfdamage("1");
+            bill.setfIfweigh("1");
+            bill.setfChargetype("1");
+            bill.setfStltypeid(1L);
+            if ("1".equals(item.getfSealno())) {
+                bill.setfTrademodeid(273L);
+            } else {
+                bill.setfTrademodeid(1L);
+            }
+
+            bill.setfGoodsid(item.getfGoodsid());
+            bill.setfPlanqty(item.getfPlanqty());
+            bill.setfPlangrossweight(item.getfPlangrossweight());
+            bill.setfPlannetweight(item.getfPlannetweight());
+            bill.setfPlanvolumn(BigDecimal.ZERO);
+            bill.setfQty(item.getfQty());
+            bill.setfGrossweight(item.getfGrossweight());
+            bill.setfNetweight(item.getfNetweight());
+            bill.setfVolumn(BigDecimal.ZERO);
+
+            bill.setfBsdeptid(100L);
+            bill.setfBillno(billNo);
+            bill.setfCorpid(corp.getfId());
+
+            bill.setfShipper(corp.getfCname());
+            bill.setfStltypeid(corp.getfStltypeid());
+
+            bill.setfBillingway(2L);
+            bill.setfTrademodeid(1L);
+            bill.setfMblno(item.getfMblno());
+            bill.setfBilltype(billType);
+
+            bill.setCreateTime(bsDate);
+            bill.setfDateChanged(dateChanged);
+            bill.setfBillstatus(2L);
+            bill.setfItemsStatus(2L);
+            bill.setfBsdate(bsDate);
+            bill.setfBstime(bsDate);
+
+            if ("SJRK".equals(billType)) {
+                String bsCorpNo = serialServiceImpl.getCorpNo(corp.getfId(), bsDate);
+                bill.setfBscorpno(bsCorpNo);
+                bill.setfBusinessType("0");
+            } else {
+                TWarehouse warehouse = warehouseMapper.getWarehouseByNo(item.getWarehouseNo());
+                if (ObjectUtil.isNull(warehouse)) {
+                    return AjaxResult.error("仓库不存在!");
+                }
+
+                bill.setfWarehouseid(warehouse.getfId());
+                bill.setfChargedate(bsDate);
+                bill.setfBusinessType("5");
+            }
+
+            billMapper.insertTWarehousebills(bill);
+            billId = bill.getfId();
+
+            // 从表数据处理
+            TGoods goods = goodsMapper.getGoodsByNo(item.getCargoNo());
+            if (ObjectUtil.isNull(goods)) {
+                return AjaxResult.error("商品不存在!");
+            }
+
+            item.setfGoodsid(goods.getfId());
+            item.setfPid(billId);
+            item.setfBillno(billNo);
+            item.setfShipper(bill.getfShipper());
+            item.setfBilltype(billType);
+            item.setCreateBy("CCB");
+            item.setCreateTime(bsDate);
+            item.setfBsdate(bill.getfBsdate());
+            item.setfBusinessType(1L);
+
+            if ("SJCK".equals(billType)) {
+                TWarehouse warehouse = warehouseMapper.getWarehouseByNo(item.getShelvesNo());
+                if (ObjectUtil.isNull(warehouse)) {
+                    return AjaxResult.error("库区不存在!");
+                }
+                item.setfWarehouselocid(warehouse.getfId());
+                item.setfWarehouseInformation(warehouse.getfWarehouseInformation());
+
+                TWhgenleg temp = new TWhgenleg();
+                temp.setfCorpid(bill.getfCorpid());
+                temp.setfMblno(item.getfMblno());
+                temp.setfWarehouseLocationid(item.getfWarehouselocid());
+                temp.setfTrademodeid(bill.getfTrademodeid());
+                temp.setfGoodsid(item.getfGoodsid());
+                temp.setfLocation(1L);
+                TWhgenleg stock = stockMapper.selectTWhgenleg(temp);
+                if (ObjectUtil.isNull(stock)) {
+                    return AjaxResult.error("未找到库存!");
+                }
+                item.setfSrcid(stock.getfId());
+                item.setfSrcBsdate(stock.getfBsdate());
+            }
+            billItemMapper.insertTWarehousebillsitems(item);
+
+            if ("SJCK".equals(billType)) {
+                item.getElectronicTags().forEach(tag -> {
+                    TWarehousebillsitemsElabel eLabel = new TWarehousebillsitemsElabel();
+                    eLabel.setfGPid(billId);
+                    eLabel.setfPid(item.getfId());
+                    eLabel.setfContent(tag);
+                    eLabel.setfType(2);
+                    eLabel.setCreateBy("CCB");
+                    eLabel.setCreateTime(bsDate);
+                    eLabelMapper.insert(eLabel);
+                });
+            }
+        }
+        return AjaxResult.success();
+    }
+
+    @Override
+    public List<Map<String, Object>> getStockList(String takeVoucher, String corpName) {
+        // 获取客户信息
+        TCorps corp = corpMapper.getCorpByName(corpName);
+        if (ObjectUtil.isNull(corp)) {
+            return Collections.emptyList();
+        }
+        return stockMapper.selectStockList(takeVoucher, corp.getfId());
+    }
+
+    @Override
+    public AjaxResult lockStock(String belongTo, List<String> billNoList, boolean isWrNumber) {
+        billNoList.forEach(billNo -> {
+            TWhgenleg stock = new TWhgenleg();
+            stock.setfOriginalbillno(billNo);
+            stock.setLockStatus(1);
+            stock.setBelongTo(belongTo);
+            stock.setLockTime(new Date());
+            if (isWrNumber) {
+                stock.setWrNumber(billNo);
+            }
+            stockMapper.changeBelongTo(stock);
+        });
+        return AjaxResult.success();
+    }
+
+    @Override
+    public AjaxResult unlockStock(List<String> billNoList, boolean isWrNumber) {
+        billNoList.forEach(billNo -> {
+            TWhgenleg stock = new TWhgenleg();
+            stock.setfOriginalbillno(billNo);
+            stock.setLockStatus(0);
+            stock.setUnlockTime(new Date());
+            if (isWrNumber) {
+                stock.setWrNumber("");
+            }
+            stockMapper.changeBelongTo(stock);
+        });
+        return AjaxResult.success();
+    }
+
+    @Override
+    public List<Map<String, Object>> getSyncOrg(Integer page, Integer size, String time) {
+        PageHelper.startPage(page, size);
+        return corpMapper.getSyncCorpList(time);
+    }
+
+    @Override
+    public List<String> getLabel(String billNo) {
+        return eLabelMapper.getLabel(billNo);
+    }
+
+}

+ 23 - 1
ruoyi-warehouse/src/main/resources/mapper/basicData/TCorpsMapper.xml

@@ -63,6 +63,7 @@
         <result property="registerdAddress"    column="registerd_address"    />
         <result property="manageScope"    column="manage_scope"    />
         <result property="deptId"    column="dept_id"    />
+        <result property="uscc"    column="uscc"    />
     </resultMap>
 
     <sql id="selectTCorpsVo">
@@ -76,7 +77,7 @@
                , del_flag, create_by, create_time, update_by, update_time, remark, f_typename, login_account, credit_lv,
            payment_days, car_num, head_office, registerd_capital, legal_person, insdustry, credit_num, taxpayer_num, industry_commerce_num,
             organization_num, register_organization, date_of_establishment, company_type, business_deadline, business_area, annual_date,
-             registerd_address, manage_scope, dept_id from t_corps
+             registerd_address, manage_scope, dept_id, uscc from t_corps
     </sql>
 
     <select id="selectTCorpsList" parameterType="TCorps" resultMap="TCorpsResult">
@@ -309,6 +310,7 @@
             <if test="registerdAddress != null">registerd_address,</if>
             <if test="manageScope != null">manage_scope,</if>
             <if test="deptId != null">dept_id,</if>
+            <if test="uscc != null">uscc,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fPid != null and fPid != ''">#{fPid},</if>
@@ -367,6 +369,7 @@
             <if test="registerdAddress != null">#{registerdAddress},</if>
             <if test="manageScope != null">#{manageScope},</if>
             <if test="deptId != null">#{deptId},</if>
+            <if test="uscc != null">#{uscc},</if>
         </trim>
     </insert>
 
@@ -409,6 +412,7 @@
             <if test="remark != null">remark = #{remark},</if>
             <if test="fTypename != null">f_typename = #{fTypename},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="uscc != null">dept_id = #{uscc},</if>
         </trim>
         where f_id = #{fId}
     </update>
@@ -519,4 +523,22 @@
         select count(f_id) from t_corps where f_typename like '%客户%'
     </select>
 
+    <select id="getCorpByName" parameterType="String" resultMap="TCorpsResult">
+        <include refid="selectTCorpsVo"/>
+        where f_name = #{fName} limit 1
+    </select>
+
+    <select id="getSyncCorpList" parameterType="String" resultType="map">
+        select f_id as fId,
+               f_no as foreignId,
+               f_name as userName,
+               uscc,
+               f_tel as contractNo,
+               f_addr as address,
+               date_format(create_time, '%Y-%m-%d %H:%i:%S') as registrationTime
+        from t_corps
+        where f_status = 0
+            and create_time &gt; #{time}
+    </select>
+
 </mapper>

+ 4 - 0
ruoyi-warehouse/src/main/resources/mapper/basicData/TGoodsMapper.xml

@@ -177,5 +177,9 @@
         </foreach>
     </select>
 
+    <select id="getGoodsByNo" parameterType="String" resultMap="TGoodsResult">
+        <include refid="selectTGoodsVo"/>
+        where f_no = #{fNo} limit 1
+    </select>
 
 </mapper>

+ 7 - 0
ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseMapper.xml

@@ -348,4 +348,11 @@
         </if>
         order by convert(f_name using gbk)
     </select>
+
+    <select id="getWarehouseByNo" parameterType="String" resultMap="TWarehouseResult">
+        <include refid="selectTWarehouseVo"/>
+        <where>
+            f_no = #{fNo} limit 1
+        </where>
+    </select>
 </mapper>

+ 74 - 3
ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml

@@ -46,6 +46,11 @@
         <result property="fLocalcntrno" column="f_localcntrno"/>
         <result property="fCustomno" column="f_customno"/>
         <result property="fEmsSeqNo" column="f_ems_seq_no"/>
+        <result property="lockStatus" column="lock_status"/>
+        <result property="belongTo" column="belong_to"/>
+        <result property="lockTime" column="lock_time"/>
+        <result property="unlockTime" column="unlock_time"/>
+        <result property="wrNumber" column="wr_number"/>
     </resultMap>
 
     <resultMap type="CalculateStorageFeesInfoVO" id="StorageFeesInfoResult">
@@ -94,7 +99,8 @@
         select f_id, f_accyear, f_accmonth, f_corpid, f_shipper, f_mblno, f_originalbillno, f_warehouse_locationid, f_goodsid, f_trademodeid, f_preqty,
          f_pregrossweight, f_warehouseid, f_prenetweight, f_bsdate, f_chargedate, f_volumnD, f_qtyD, f_billingway, f_grossweightD, f_netweightD, f_volumnC,
           f_qtyC, f_grossweightC, f_qtyblc, f_grossweightblc, f_netweightC, f_netweightblc, f_cntrno, f_status, del_flag, f_marks, create_by,
-           create_time, update_by, f_volumnblc, update_time, remark, f_business_type, f_originalbilldate, f_localcntrno,f_customno,f_ems_seq_no from t_whgenleg
+           create_time, update_by, f_volumnblc, update_time, remark, f_business_type, f_originalbilldate, f_localcntrno,f_customno,f_ems_seq_no,
+               lock_status, belong_to, lock_time, unlock_time, wr_number from t_whgenleg
     </sql>
 
     <select id="selectTWhgenlegList" parameterType="TWhgenleg" resultMap="TWhgenlegResult">
@@ -219,6 +225,11 @@
             <if test="fOriginalbilldate != null">f_originalbilldate,</if>
             <if test="fLocalcntrno != null">f_localcntrno,</if>
             <if test="fEmsSeqNo != null">f_ems_seq_no,</if>
+            <if test="lockStatus != null">lock_status,</if>
+            <if test="belongTo != null">belong_to,</if>
+            <if test="lockTime != null">lock_time,</if>
+            <if test="unlockTime != null">unlock_time,</if>
+            <if test="wrNumber != null">wr_number,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fAccyear != null">#{fAccyear},</if>
@@ -262,6 +273,11 @@
             <if test="fOriginalbilldate != null">#{fOriginalbilldate},</if>
             <if test="fLocalcntrno != null">#{fLocalcntrno},</if>
             <if test="fEmsSeqNo != null">#{fEmsSeqNo},</if>
+            <if test="lockStatus != null">#{lockStatus},</if>
+            <if test="belongTo != null">#{belongTo},</if>
+            <if test="lockTime != null">#{lockTime},</if>
+            <if test="unlockTime != null">#{unlockTime},</if>
+            <if test="wrNumber != null">#{wrNumber},</if>
         </trim>
     </insert>
 
@@ -309,6 +325,11 @@
             <if test="fOriginalbilldate != null">f_originalbilldate = #{fOriginalbilldate},</if>
             <if test="fLocalcntrno != null">f_localcntrno = #{fLocalcntrno},</if>
             <if test="fEmsSeqNo != null">f_ems_seq_no = #{fEmsSeqNo},</if>
+            <if test="lockStatus != null">lock_status = #{lockStatus},</if>
+            <if test="belongTo != null">belong_to = #{belongTo},</if>
+            <if test="lockTime != null">lock_time = #{lockTime},</if>
+            <if test="unlockTime != null">unlock_time = #{unlockTime},</if>
+            <if test="wrNumber != null">wr_number = #{wrNumber},</if>
         </trim>
         where f_id = #{fId}
     </update>
@@ -662,7 +683,6 @@
             DISTINCT
             leg.f_id AS fId,
             leg.f_corpid AS fCorpIds,
-            elabel.f_content as fElabel,
             leg.f_bsdate AS fBsdate,
             corp.f_name AS fCorpid,
             leg.f_shipper AS fShipper,
@@ -700,7 +720,6 @@
         FROM
             t_whgenleg leg
             LEFT JOIN t_warehousebillsitems wt on wt.f_marks = leg.f_marks
-            LEFT JOIN t_warehousebillsitems_elabel elabel on elabel.f_pid = wt.f_id
             left join sys_user u on leg.create_by = u.user_name
             left join sys_dept d on u.dept_id = d.dept_id
             LEFT JOIN t_corps corp ON corp.f_id = leg.f_corpid
@@ -1366,4 +1385,56 @@
         </where>
     </select>
 
+    <select id="selectStockList" parameterType="TWhgenleg" resultType="Map">
+        select
+               t3.dict_label as cargoType,
+               t2.f_no as cargoNo,
+               t2.f_name as cargoName,
+               t1.f_qtyD as number,
+               t1.f_qtyblc as numberLeft,
+               t1.f_grossweightD as weight,
+               t1.f_grossweightblc as weightLeft,
+               t6.f_packagespecs as speci,
+               t6.f_sealno as bondedStatus,
+               t4.f_no as shelvesName,
+               t5.f_no as warehouseNo,
+               t5.f_name as warehouseName,
+               t1.f_originalbillno as takeVoucher,
+               date_format(t1.f_bsdate, '%Y-%m-%d %H:%i:%S') as inStorageDate,
+               t1.f_mblno as blNumber,
+               date_format(t1.update_time, '%Y-%m-%d %H:%i:%S') as latestOptDate,
+               t1.lock_status as lockStatus,
+               t1.belong_to as belongTo,
+               t1.lock_time as lockTime,
+               t1.unlock_time as unlockTime,
+               t1.wr_number as wrNumber
+        from t_whgenleg t1
+            left join t_goods t2 on t2.f_id = t1.f_goodsid
+            left join sys_dict_data t3 on t3.dict_value = t2.f_typeid
+            left join t_warehouse t4 on t4.f_id = t1.f_warehouse_locationid
+            left join t_warehouse t5 on t5.f_id = t1.f_warehouseid
+            left join t_warehousebillsitems t6 on t6.f_billno = f_originalbillno
+        <where>
+            t3.status = '0'
+            and t3.dict_type = 'data_goods_category'
+            and t1.f_qtyD != 0
+            and t1.f_qtyblc &gt; 0
+            and t1.f_grossweightblc &gt; 0
+            <if test="billNo != null and billNo != ''">and t1.f_originalbillno = #{billNo}</if>
+            <if test="corpId != null ">and t1.f_corpid = #{corpId}</if>
+        </where>
+    </select>
+
+    <update id="changeBelongTo" parameterType="TWhgenleg">
+        update t_whgenleg
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="lockStatus != null">lock_status = #{lockStatus},</if>
+            <if test="belongTo != null">belong_to = #{belongTo},</if>
+            <if test="lockTime != null">lock_time = #{lockTime},</if>
+            <if test="unlockTime != null">unlock_time = #{unlockTime},</if>
+            <if test="wrNumber != null">wr_number = #{wrNumber},</if>
+        </trim>
+        where f_originalbillno = #{fOriginalbillno}
+    </update>
+
 </mapper>

+ 27 - 0
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsElabelMapper.xml

@@ -11,6 +11,8 @@
         <result property="fContent"    column="f_content"    />
         <result property="fQty"    column="f_qty"    />
         <result property="fWeight"    column="f_weight"    />
+        <result property="fType"    column="f_type"    />
+        <result property="fStatus"    column="f_status"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
@@ -25,6 +27,8 @@
             <if test="fContent != null">f_content,</if>
             <if test="fQty != null">f_qty,</if>
             <if test="fWeight != null">f_weight,</if>
+            <if test="fType != null">f_type,</if>
+            <if test="fStatus != null">f_status,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
@@ -36,6 +40,8 @@
             <if test="fContent != null">#{fContent},</if>
             <if test="fQty != null">#{fQty},</if>
             <if test="fWeight != null">#{fWeight},</if>
+            <if test="fType != null">#{fType},</if>
+            <if test="fStatus != null">#{fStatus},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
@@ -52,6 +58,8 @@
             <if test="fContent != null">f_content = #{fContent},</if>
             <if test="fQty != null">f_qty = #{fQty},</if>
             <if test="fWeight != null">f_weight = #{fWeight},</if>
+            <if test="fType != null">f_type = #{fType},</if>
+            <if test="fStatus != null">f_status = #{fStatus},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
@@ -61,6 +69,10 @@
             f_id = #{fId}
     </update>
 
+    <update id="updateStatus" parameterType="com.ruoyi.warehouseBusiness.domain.TWarehousebillsitemsElabel">
+        update t_warehousebillsitems_elabel set f_status = #{fStatus} where f_content = #{fContent} and f_type = #{fType}
+    </update>
+
     <delete id="deleteById" parameterType="com.ruoyi.warehouseBusiness.domain.TWarehousebillsitemsElabel">
         delete from t_warehousebillsitems_elabel where f_id = #{id}
     </delete>
@@ -77,6 +89,8 @@
             f_content,
             f_qty,
             f_weight,
+            f_type,
+            f_status,
             create_by,
             create_time,
             update_by,
@@ -94,6 +108,8 @@
             f_content,
             f_qty,
             f_weight,
+            f_type,
+            f_status,
             create_by,
             create_time,
             update_by,
@@ -111,6 +127,8 @@
             f_content,
             f_qty,
             f_weight,
+            f_type,
+            f_status,
             create_by,
             create_time,
             update_by,
@@ -128,6 +146,8 @@
             f_content,
             f_qty,
             f_weight,
+            f_type,
+            f_status,
             create_by,
             create_time,
             update_by,
@@ -136,4 +156,11 @@
             t_warehousebillsitems_elabel
         WHERE f_g_pid = #{fGPid}
     </select>
+
+    <select id="getLabel" parameterType="string" resultType="string">
+        select t1.f_content
+        from t_warehousebillsitems_elabel t1
+            left join t_whgenleg t2 on t2.f_id = t1.f_pid
+        where t2.f_originalbillno = #{billNo} and t1.f_type = 3 and t1.f_status = 0
+    </select>
 </mapper>

+ 0 - 2
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

@@ -189,7 +189,6 @@
             item.f_srcid AS fSrcid,
             item.f_lineno AS fLineno,
             item.f_billno AS fBillno,
-            elb.f_content AS fElabel,
             item.f_shipper AS fShipper,
             item.f_goodsid AS fGoodsid,
             goods.f_name AS fGoodsids,
@@ -252,7 +251,6 @@
         FROM
             t_warehousebills w
             LEFT JOIN t_warehousebillsitems item ON item.f_pid = w.f_id
-            LEFT JOIN t_warehousebillsitems_elabel elb ON elb.f_pid = item.f_id
             LEFT JOIN t_goods goods ON goods.f_id = item.f_goodsid
             LEFT JOIN t_warehouse_area area ON area.f_id = item.f_warehouselocid
             LEFT JOIN t_warehouse ware ON ware.f_id = area.f_warehouseid

+ 0 - 4
ruoyi-wechatProgram/pom.xml

@@ -16,10 +16,6 @@
             <artifactId>jackson-annotations</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-annotations</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
         </dependency>