纪新园 2 лет назад
Родитель
Сommit
8d62e7e54b
35 измененных файлов с 1589 добавлено и 18 удалено
  1. 26 0
      blade-cargo-api/pom.xml
  2. 34 0
      blade-cargo-api/src/main/java/org/springblade/cargo/parities/dto/ParitiesDTO.java
  3. 34 0
      blade-cargo-api/src/main/java/org/springblade/cargo/parities/dto/ParitiesItemDTO.java
  4. 160 0
      blade-cargo-api/src/main/java/org/springblade/cargo/parities/entity/Parities.java
  5. 140 0
      blade-cargo-api/src/main/java/org/springblade/cargo/parities/entity/ParitiesItem.java
  6. 36 0
      blade-cargo-api/src/main/java/org/springblade/cargo/parities/vo/ParitiesItemVO.java
  7. 48 0
      blade-cargo-api/src/main/java/org/springblade/cargo/parities/vo/ParitiesVO.java
  8. 133 0
      blade-cargo/pom.xml
  9. 39 0
      blade-cargo/src/main/java/org/springblade/cargo/CargoApplication.java
  10. 229 0
      blade-cargo/src/main/java/org/springblade/cargo/parities/controller/ParitiesController.java
  11. 147 0
      blade-cargo/src/main/java/org/springblade/cargo/parities/controller/ParitiesItemController.java
  12. 50 0
      blade-cargo/src/main/java/org/springblade/cargo/parities/mapper/ParitiesItemMapper.java
  13. 35 0
      blade-cargo/src/main/java/org/springblade/cargo/parities/mapper/ParitiesItemMapper.xml
  14. 43 0
      blade-cargo/src/main/java/org/springblade/cargo/parities/mapper/ParitiesMapper.java
  15. 32 0
      blade-cargo/src/main/java/org/springblade/cargo/parities/mapper/ParitiesMapper.xml
  16. 47 0
      blade-cargo/src/main/java/org/springblade/cargo/parities/service/IParitiesItemService.java
  17. 55 0
      blade-cargo/src/main/java/org/springblade/cargo/parities/service/IParitiesService.java
  18. 51 0
      blade-cargo/src/main/java/org/springblade/cargo/parities/service/impl/ParitiesItemServiceImpl.java
  19. 120 0
      blade-cargo/src/main/java/org/springblade/cargo/parities/service/impl/ParitiesServiceImpl.java
  20. 13 0
      blade-cargo/src/main/resources/application-dev.yml
  21. 10 0
      blade-cargo/src/main/resources/application-prod.yml
  22. 10 0
      blade-cargo/src/main/resources/application-test.yml
  23. 6 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/vo/PjOrderStatisticsWeb.java
  24. 1 3
      blade-service/blade-pay/src/main/java/org/springblade/pay/tonglianPayment/feign/PaymentClient.java
  25. 47 0
      blade-service/blade-pay/src/main/java/org/springblade/pay/tonglianPayment/utils/SybPayService.java
  26. 1 1
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/mapper/CorpsTypeMapper.java
  27. 3 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/mapper/CorpsTypeMapper.xml
  28. 5 3
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/service/impl/CorpsTypeServiceImpl.java
  29. 3 1
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/mapper/GoodsTypeMapper.java
  30. 3 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/mapper/GoodsTypeMapper.xml
  31. 5 1
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/service/impl/GoodsTypeServiceImpl.java
  32. 2 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/controller/OrderController.java
  33. 2 2
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/mapper/OrderMapper.xml
  34. 17 7
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/stock/controller/StockDescController.java
  35. 2 0
      pom.xml

+ 26 - 0
blade-cargo-api/pom.xml

@@ -0,0 +1,26 @@
+<?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>BladeX</artifactId>
+        <groupId>org.springblade</groupId>
+        <version>2.8.2.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>blade-cargo-api</artifactId>
+    <dependencies>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-system-api</artifactId>
+            <version>2.8.2.RELEASE</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+</project>

+ 34 - 0
blade-cargo-api/src/main/java/org/springblade/cargo/parities/dto/ParitiesDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.cargo.parities.entity.Parities;
+
+/**
+ * 汇率管理主表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ParitiesDTO extends Parities {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-cargo-api/src/main/java/org/springblade/cargo/parities/dto/ParitiesItemDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.cargo.parities.entity.ParitiesItem;
+
+/**
+ * 汇率管理明细表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ParitiesItemDTO extends ParitiesItem {
+	private static final long serialVersionUID = 1L;
+
+}

+ 160 - 0
blade-cargo-api/src/main/java/org/springblade/cargo/parities/entity/Parities.java

@@ -0,0 +1,160 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 汇率管理主表实体类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Data
+@TableName("basic_parities")
+@ApiModel(value = "Parities对象", description = "汇率管理主表")
+public class Parities implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 货币币别
+	*/
+		@ApiModelProperty(value = "货币币别")
+		private String code;
+	/**
+	* 货币名称
+	*/
+		@ApiModelProperty(value = "货币名称")
+		private String cname;
+	/**
+	* 符号
+	*/
+		@ApiModelProperty(value = "符号")
+		private String symbol;
+	/**
+	* 本位币 0 否 1 是
+	*/
+		@ApiModelProperty(value = "本位币 0 否 1 是")
+		private Integer standardMoney;
+	/**
+	* 默认汇率
+	*/
+		@ApiModelProperty(value = "默认汇率")
+		private BigDecimal parities;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	 * 租户id
+	 */
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private Date createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private Date updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@TableLogic
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+	/**
+	 * 汇率明细
+	 */
+		@ApiModelProperty(value = "汇率明细")
+		@TableField(exist = false)
+		private List<ParitiesItem> paritiesItemList;
+	/**
+	 * 创建人中文名
+	 */
+		@ApiModelProperty(value = "创建人中文名")
+		@TableField(exist = false)
+		private String createUserName;
+	/**
+	 * 修改人中文名
+	 */
+		@ApiModelProperty(value = "修改人中文名")
+		@TableField(exist = false)
+		private String updateUserName;
+	/**
+	 * 年
+	 */
+	@ApiModelProperty(value = "年")
+	private String annual;
+	/**
+	 * 月
+	 */
+	@ApiModelProperty(value = "月")
+	private String moon;
+	/**
+	 * 汇率类型
+	 */
+	@ApiModelProperty(value = "汇率类型")
+	private String paritiesType;
+
+
+}

+ 140 - 0
blade-cargo-api/src/main/java/org/springblade/cargo/parities/entity/ParitiesItem.java

@@ -0,0 +1,140 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 汇率管理明细表实体类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Data
+@TableName("basic_parities_item")
+@ApiModel(value = "ParitiesItem对象", description = "汇率管理明细表")
+public class ParitiesItem implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 主表id
+	*/
+		@ApiModelProperty(value = "主表id")
+		private Long pid;
+	/**
+	* 年
+	*/
+		@ApiModelProperty(value = "年")
+		private String annual;
+	/**
+	* 月
+	*/
+		@ApiModelProperty(value = "月")
+		private String moon;
+	/**
+	* 日
+	*/
+		@ApiModelProperty(value = "日")
+		private String national;
+	/**
+	* 应收汇率
+	*/
+		@ApiModelProperty(value = "应收汇率")
+		private BigDecimal receivableParities;
+	/**
+	* 应付汇率
+	*/
+		@ApiModelProperty(value = "应付汇率")
+		private BigDecimal handleParities;
+	/**
+	* 实收汇率
+	*/
+		@ApiModelProperty(value = "实收汇率")
+		private BigDecimal receiptsParities;
+	/**
+	* 实付汇率
+	*/
+		@ApiModelProperty(value = "实付汇率")
+		private BigDecimal actuallyParities;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	 * 租户id
+	 */
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private Date createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private Date updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@TableLogic
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+
+
+}

+ 36 - 0
blade-cargo-api/src/main/java/org/springblade/cargo/parities/vo/ParitiesItemVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.vo;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.cargo.parities.entity.ParitiesItem;
+
+/**
+ * 汇率管理明细表视图实体类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "ParitiesItemVO对象", description = "汇率管理明细表")
+public class ParitiesItemVO extends ParitiesItem {
+	private static final long serialVersionUID = 1L;
+
+}

+ 48 - 0
blade-cargo-api/src/main/java/org/springblade/cargo/parities/vo/ParitiesVO.java

@@ -0,0 +1,48 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.cargo.parities.entity.Parities;
+
+import java.util.Date;
+
+/**
+ * 汇率管理主表视图实体类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "ParitiesVO对象", description = "汇率管理主表")
+public class ParitiesVO extends Parities {
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 业务日期
+	 */
+	@ApiModelProperty(value = "业务日期")
+	private Date businesDate;
+	/**
+	 * 货币币别
+	 */
+	@ApiModelProperty(value = "货币币别")
+	private String currency;
+}

+ 133 - 0
blade-cargo/pom.xml

@@ -0,0 +1,133 @@
+<?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>BladeX</artifactId>
+        <groupId>org.springblade</groupId>
+        <version>2.8.2.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>blade-cargo</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-cargo-api</artifactId>
+            <version>2.8.2.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mapstruct</groupId>
+            <artifactId>mapstruct</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mapstruct</groupId>
+            <artifactId>mapstruct-processor</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok-mapstruct-binding</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-core-boot</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-excel</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-swagger</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-mock</artifactId>
+            <version>2.0.8</version>
+        </dependency>
+        <!--Oss-->
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-oss</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-transaction</artifactId>
+        </dependency>
+        <!-- websocket -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-websocket</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <version>3.12.0</version>
+        </dependency>
+        <dependency>
+            <groupId>joda-time</groupId>
+            <artifactId>joda-time</artifactId>
+            <version>2.10.10</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-undertow</artifactId>
+        </dependency>
+        <!-- spring web排除tomcat -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>e-iceblue</groupId>
+            <artifactId>spire.pdf</artifactId>
+            <version>3.8.5</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.6.6</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.jimmyshi</groupId>
+            <artifactId>bean-query</artifactId>
+            <version>1.1.5</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-collections4</artifactId>
+            <version>4.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-user-api</artifactId>
+            <version>2.8.2.RELEASE</version>
+            <scope>compile</scope>
+        </dependency>
+        <!-- PDF -->
+    </dependencies>
+    <repositories>
+        <repository>
+            <id>com.e-iceblue</id>
+            <url>http://repo.e-iceblue.cn/repository/maven-public/</url>
+        </repository>
+    </repositories>
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+    </properties>
+
+</project>

+ 39 - 0
blade-cargo/src/main/java/org/springblade/cargo/CargoApplication.java

@@ -0,0 +1,39 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo;
+
+
+import org.springblade.core.cloud.feign.EnableBladeFeign;
+import org.springblade.core.launch.BladeApplication;
+import org.springblade.core.transaction.annotation.SeataCloudApplication;
+import org.springframework.cloud.client.SpringCloudApplication;
+
+/**
+ * 启动器
+ *
+ * @author Chill
+ */
+@EnableBladeFeign
+@SpringCloudApplication
+@SeataCloudApplication
+public class CargoApplication {
+
+	public static void main(String[] args) {
+		BladeApplication.run("blade-cargo", CargoApplication.class, args);
+	}
+
+}

+ 229 - 0
blade-cargo/src/main/java/org/springblade/cargo/parities/controller/ParitiesController.java

@@ -0,0 +1,229 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.cargo.parities.entity.Parities;
+import org.springblade.cargo.parities.entity.ParitiesItem;
+import org.springblade.cargo.parities.service.IParitiesItemService;
+import org.springblade.cargo.parities.service.IParitiesService;
+import org.springblade.cargo.parities.vo.ParitiesVO;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.SecureUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.feign.IUserClient;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 汇率管理主表 控制器
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/parities")
+@Api(value = "汇率管理主表", tags = "汇率管理主表接口")
+public class ParitiesController extends BladeController {
+
+	private final IParitiesService paritiesService;
+	private final IParitiesItemService paritiesItemService;
+	private final IUserClient userClient;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入parities")
+	public R<Parities> detail(Parities parities) {
+		parities.setTenantId(SecureUtil.getTenantId());
+		Parities detail = paritiesService.getOne(Condition.getQueryWrapper(parities));
+		if (detail != null){
+			//获取明细数据
+			LambdaQueryWrapper<ParitiesItem> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+			lambdaQueryWrapper.eq(ParitiesItem::getPid,detail.getId());
+			lambdaQueryWrapper.eq(ParitiesItem::getIsDeleted,0);
+			lambdaQueryWrapper.eq(ParitiesItem::getTenantId, SecureUtil.getTenantId());
+			detail.setParitiesItemList(paritiesItemService.list(lambdaQueryWrapper));
+		}
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 汇率管理主表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入parities")
+	public R<IPage<Parities>> list(Parities parities, Query query) {
+		parities.setTenantId(SecureUtil.getTenantId());
+		IPage<Parities> pages = paritiesService.page(Condition.getPage(query), Condition.getQueryWrapper(parities));
+		if (CollectionUtils.isNotEmpty(pages.getRecords())){
+			pages.getRecords().stream().forEach(item ->{
+				R<User> create = userClient.userInfoById(item.getCreateUser());
+				if (create.isSuccess() && create.getData() != null){
+					item.setCreateUserName(create.getData().getName());
+				}
+				if (item.getUpdateUser() !=null){
+					R<User> update = userClient.userInfoById(item.getUpdateUser());
+					if (update.isSuccess() && update.getData() != null){
+						item.setUpdateUserName(update.getData().getName());
+					}
+				}
+			});
+		}
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 汇率管理主表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入parities")
+	public R<IPage<Parities>> page(Parities parities, Query query) {
+		parities.setTenantId(SecureUtil.getTenantId());
+		IPage<Parities> pages = paritiesService.page(Condition.getPage(query), Condition.getQueryWrapper(parities));
+		if (CollectionUtils.isNotEmpty(pages.getRecords())){
+			pages.getRecords().stream().forEach(item ->{
+				R<User> create = userClient.userInfoById(item.getCreateUser());
+				if (create.isSuccess() && create.getData() != null){
+					item.setCreateUserName(create.getData().getName());
+				}
+				if (item.getUpdateUser() !=null){
+					R<User> update = userClient.userInfoById(item.getUpdateUser());
+					if (update.isSuccess() && update.getData() != null){
+						item.setUpdateUserName(update.getData().getName());
+					}
+				}
+			});
+		}
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 汇率管理主表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入parities")
+	public R save(@Valid @RequestBody Parities parities) {
+		return R.status(paritiesService.save(parities));
+	}
+
+	/**
+	 * 修改 汇率管理主表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入parities")
+	public R update(@Valid @RequestBody Parities parities) {
+		return R.status(paritiesService.updateById(parities));
+	}
+
+	/**
+	 * 新增或修改 汇率管理主表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入parities")
+	public R submit(@Valid @RequestBody Parities parities) {
+		if (StringUtils.isBlank(parities.getCname())){
+			throw new SecurityException("货币名称不能为空");
+		}
+		if (StringUtils.isBlank(parities.getCode())){
+			throw new SecurityException("货币币别不能为空");
+		}
+		if (StringUtils.isBlank(parities.getAnnual())){
+			throw new SecurityException("汇率年度不能为空");
+		}
+		LambdaQueryWrapper<Parities> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(Parities::getCode,parities.getCode());
+		lambdaQueryWrapper.eq(Parities::getAnnual,parities.getAnnual());
+		lambdaQueryWrapper.eq(Parities::getTenantId,SecureUtil.getTenantId());
+		lambdaQueryWrapper.eq(Parities::getIsDeleted,0);
+		Parities serviceOne = paritiesService.getOne(lambdaQueryWrapper);
+		if (parities.getId() ==null && serviceOne !=null){
+			throw new SecurityException("该年度的货币汇率已存在");
+		}
+		if (parities.getId() !=null && serviceOne !=null && parities.getId().longValue() != serviceOne.getId().longValue()){
+			throw new SecurityException("该年度的货币汇率已存在");
+		}
+		return R.data(paritiesService.saveParities(parities));
+	}
+
+
+	/**
+	 * 删除 汇率管理主表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(paritiesService.removeByIds(Func.toLongList(ids)));
+	}
+	/**
+	 * 新增 汇率管理主表
+	 */
+	@PostMapping("/getParities")
+	@ApiOperationSupport(order = 9)
+	@ApiOperation(value = "业务获取汇率", notes = "传入currency 币别 businesDate 业务日期")
+	public R getParities(@Valid @RequestBody ParitiesVO parities) {
+		if (StringUtils.isBlank(parities.getCurrency())){
+			throw new SecurityException("缺少必要的参数币别,请选择币别");
+		}
+		if (parities.getBusinesDate() == null){
+			throw new SecurityException("缺少必要的参数业务日期,请选择业务日期");
+		}
+		return R.data(paritiesService.getParities(parities));
+	}
+	/**
+	 * 业务获取币别
+	 */
+	@GetMapping("/getCode")
+	@ApiOperationSupport(order = 10)
+	@ApiOperation(value = "业务获取币别", notes = "传入parities")
+	public R<List<String>> getCode(Parities parities) {
+		parities.setTenantId(SecureUtil.getTenantId());
+		List<Parities> paritiesList = paritiesService.list(Condition.getQueryWrapper(parities));
+		List<String> list = new ArrayList<>();
+		if (CollectionUtils.isNotEmpty(paritiesList)){
+			list = paritiesList.stream().filter(e -> StringUtils.isNotBlank(e.getCode())).map(Parities::getCode).collect(Collectors.toList());
+		}
+		return R.data(list);
+	}
+
+
+}

+ 147 - 0
blade-cargo/src/main/java/org/springblade/cargo/parities/controller/ParitiesItemController.java

@@ -0,0 +1,147 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.cargo.parities.entity.ParitiesItem;
+import org.springblade.cargo.parities.service.IParitiesItemService;
+import org.springblade.cargo.parities.vo.ParitiesItemVO;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.SecureUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.Date;
+
+/**
+ * 汇率管理明细表 控制器
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/paritiesitem")
+@Api(value = "汇率管理明细表", tags = "汇率管理明细表接口")
+public class ParitiesItemController extends BladeController {
+
+	private final IParitiesItemService paritiesItemService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入paritiesItem")
+	public R<ParitiesItem> detail(ParitiesItem paritiesItem) {
+		paritiesItem.setTenantId(SecureUtil.getTenantId());
+		ParitiesItem detail = paritiesItemService.getOne(Condition.getQueryWrapper(paritiesItem));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 汇率管理明细表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入paritiesItem")
+	public R<IPage<ParitiesItem>> list(ParitiesItem paritiesItem, Query query) {
+		paritiesItem.setTenantId(SecureUtil.getTenantId());
+		IPage<ParitiesItem> pages = paritiesItemService.page(Condition.getPage(query), Condition.getQueryWrapper(paritiesItem));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 汇率管理明细表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入paritiesItem")
+	public R<IPage<ParitiesItemVO>> page(ParitiesItemVO paritiesItem, Query query) {
+		paritiesItem.setTenantId(SecureUtil.getTenantId());
+		IPage<ParitiesItemVO> pages = paritiesItemService.selectParitiesItemPage(Condition.getPage(query), paritiesItem);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 汇率管理明细表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入paritiesItem")
+	public R save(@Valid @RequestBody ParitiesItem paritiesItem) {
+		return R.status(paritiesItemService.save(paritiesItem));
+	}
+
+	/**
+	 * 修改 汇率管理明细表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入paritiesItem")
+	public R update(@Valid @RequestBody ParitiesItem paritiesItem) {
+		return R.status(paritiesItemService.updateById(paritiesItem));
+	}
+
+	/**
+	 * 新增或修改 汇率管理明细表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入paritiesItem")
+	public R submit(@Valid @RequestBody ParitiesItem paritiesItem) {
+		paritiesItem.setTenantId(SecureUtil.getTenantId());
+		if (paritiesItem.getId() == null){
+			paritiesItem.setCreateUser(SecureUtil.getUserId());
+			paritiesItem.setCreateTime(new Date());
+		}else {
+			paritiesItem.setUpdateUser(SecureUtil.getUserId());
+			paritiesItem.setUpdateTime(new Date());
+		}
+		return R.status(paritiesItemService.saveOrUpdate(paritiesItem));
+	}
+
+
+	/**
+	 * 删除 汇率管理明细表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(paritiesItemService.removeByIds(Func.toLongList(ids)));
+	}
+	/**
+	 * 修改 汇率管理明细表
+	 */
+	@PostMapping("/updateByPid")
+	@ApiOperationSupport(order = 9)
+	@ApiOperation(value = "根据主表id删除汇率明细", notes = "传入主表id")
+	public R updateByPid(@ApiParam(value = "主键集合", required = true) @RequestParam Long id) {
+		return R.status(paritiesItemService.updateByPid(id));
+	}
+
+}

+ 50 - 0
blade-cargo/src/main/java/org/springblade/cargo/parities/mapper/ParitiesItemMapper.java

@@ -0,0 +1,50 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.cargo.parities.entity.ParitiesItem;
+import org.springblade.cargo.parities.vo.ParitiesItemVO;
+
+import java.util.List;
+
+/**
+ * 汇率管理明细表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+public interface ParitiesItemMapper extends BaseMapper<ParitiesItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param paritiesItem
+	 * @return
+	 */
+	List<ParitiesItemVO> selectParitiesItemPage(IPage page, ParitiesItemVO paritiesItem);
+
+	/**
+	 * 根据主表id删除汇率明细
+	 * @param pid
+	 */
+	Integer updateByPid(@Param("pid") Long pid);
+
+}

+ 35 - 0
blade-cargo/src/main/java/org/springblade/cargo/parities/mapper/ParitiesItemMapper.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.cargo.parities.mapper.ParitiesItemMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="paritiesItemResultMap" type="org.springblade.cargo.parities.entity.ParitiesItem">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="annual" property="annual"/>
+        <result column="moon" property="moon"/>
+        <result column="national" property="national"/>
+        <result column="receivable_parities" property="receivableParities"/>
+        <result column="handle_parities" property="handleParities"/>
+        <result column="receipts_parities" property="receiptsParities"/>
+        <result column="actually_parities" property="actuallyParities"/>
+        <result column="remarks" property="remarks"/>
+        <result column="version" property="version"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectParitiesItemPage" resultMap="paritiesItemResultMap">
+        select * from basic_parities_item where is_deleted = 0
+    </select>
+    <update id="updateByPid" parameterType="long">
+         update basic_parities_item set is_deleted = '1' where pid = #{pid}
+    </update>
+
+</mapper>

+ 43 - 0
blade-cargo/src/main/java/org/springblade/cargo/parities/mapper/ParitiesMapper.java

@@ -0,0 +1,43 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.cargo.parities.entity.Parities;
+import org.springblade.cargo.parities.vo.ParitiesVO;
+
+import java.util.List;
+
+/**
+ * 汇率管理主表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+public interface ParitiesMapper extends BaseMapper<Parities> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param parities
+	 * @return
+	 */
+	List<ParitiesVO> selectParitiesPage(IPage page, ParitiesVO parities);
+
+}

+ 32 - 0
blade-cargo/src/main/java/org/springblade/cargo/parities/mapper/ParitiesMapper.xml

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.cargo.parities.mapper.ParitiesMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="paritiesResultMap" type="org.springblade.cargo.parities.entity.Parities">
+        <id column="id" property="id"/>
+        <result column="code" property="code"/>
+        <result column="cname" property="cname"/>
+        <result column="symbol" property="symbol"/>
+        <result column="standard_money" property="standardMoney"/>
+        <result column="parities" property="parities"/>
+        <result column="remarks" property="remarks"/>
+        <result column="version" property="version"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="annual" property="annual"/>
+        <result column="moon" property="moon"/>
+        <result column="parities_type" property="paritiesType"/>
+    </resultMap>
+
+
+    <select id="selectParitiesPage" resultMap="paritiesResultMap">
+        select * from basic_parities where is_deleted = 0
+    </select>
+
+</mapper>

+ 47 - 0
blade-cargo/src/main/java/org/springblade/cargo/parities/service/IParitiesItemService.java

@@ -0,0 +1,47 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.cargo.parities.entity.ParitiesItem;
+import org.springblade.cargo.parities.vo.ParitiesItemVO;
+
+/**
+ * 汇率管理明细表 服务类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+public interface IParitiesItemService extends IService<ParitiesItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param paritiesItem
+	 * @return
+	 */
+	IPage<ParitiesItemVO> selectParitiesItemPage(IPage<ParitiesItemVO> page, ParitiesItemVO paritiesItem);
+
+	/**
+	 * 根据主表id删除汇率明细
+	 * @param pid
+	 */
+	boolean updateByPid(Long pid);
+
+}

+ 55 - 0
blade-cargo/src/main/java/org/springblade/cargo/parities/service/IParitiesService.java

@@ -0,0 +1,55 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.cargo.parities.entity.Parities;
+import org.springblade.cargo.parities.entity.ParitiesItem;
+import org.springblade.cargo.parities.vo.ParitiesVO;
+
+/**
+ * 汇率管理主表 服务类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+public interface IParitiesService extends IService<Parities> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param parities
+	 * @return
+	 */
+	IPage<ParitiesVO> selectParitiesPage(IPage<ParitiesVO> page, ParitiesVO parities);
+
+	/**
+	 * 保存汇率信息
+	 * @param parities
+	 * @return
+	 */
+	Parities saveParities(Parities parities);
+
+	/**
+	 * 业务获取汇率
+	 * @param paritiesVO
+	 */
+	ParitiesItem getParities(ParitiesVO paritiesVO);
+
+}

+ 51 - 0
blade-cargo/src/main/java/org/springblade/cargo/parities/service/impl/ParitiesItemServiceImpl.java

@@ -0,0 +1,51 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.cargo.parities.entity.ParitiesItem;
+import org.springblade.cargo.parities.mapper.ParitiesItemMapper;
+import org.springblade.cargo.parities.service.IParitiesItemService;
+import org.springblade.cargo.parities.vo.ParitiesItemVO;
+import org.springframework.stereotype.Service;
+
+/**
+ * 汇率管理明细表 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Service
+public class ParitiesItemServiceImpl extends ServiceImpl<ParitiesItemMapper, ParitiesItem> implements IParitiesItemService {
+
+	@Override
+	public IPage<ParitiesItemVO> selectParitiesItemPage(IPage<ParitiesItemVO> page, ParitiesItemVO paritiesItem) {
+		return page.setRecords(baseMapper.selectParitiesItemPage(page, paritiesItem));
+	}
+
+	@Override
+	public boolean updateByPid(Long pid) {
+		Integer i = baseMapper.updateByPid(pid);
+		if (i != null && i >=1){
+			return true;
+		}else {
+			return false;
+		}
+	}
+
+}

+ 120 - 0
blade-cargo/src/main/java/org/springblade/cargo/parities/service/impl/ParitiesServiceImpl.java

@@ -0,0 +1,120 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.cargo.parities.service.impl;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.AllArgsConstructor;
+import org.springblade.cargo.parities.entity.Parities;
+import org.springblade.cargo.parities.entity.ParitiesItem;
+import org.springblade.cargo.parities.mapper.ParitiesItemMapper;
+import org.springblade.cargo.parities.mapper.ParitiesMapper;
+import org.springblade.cargo.parities.service.IParitiesService;
+import org.springblade.cargo.parities.vo.ParitiesVO;
+import org.springblade.core.secure.utils.SecureUtil;
+import org.springframework.stereotype.Service;
+
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * 汇率管理主表 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Service
+@AllArgsConstructor
+public class ParitiesServiceImpl extends ServiceImpl<ParitiesMapper, Parities> implements IParitiesService {
+
+	private final ParitiesItemMapper paritiesItemMapper;
+	@Override
+	public IPage<ParitiesVO> selectParitiesPage(IPage<ParitiesVO> page, ParitiesVO parities) {
+		return page.setRecords(baseMapper.selectParitiesPage(page, parities));
+	}
+
+	@Override
+	public Parities saveParities(Parities parities) {
+		parities.setTenantId(SecureUtil.getTenantId());
+		if (parities.getId() == null){
+			parities.setCreateTime(new Date());
+			parities.setCreateUser(SecureUtil.getUserId());
+			baseMapper.insert(parities);
+		}else {
+			parities.setUpdateTime(new Date());
+			parities.setUpdateUser(SecureUtil.getUserId());
+			baseMapper.updateById(parities);
+		}
+		if (CollectionUtils.isNotEmpty(parities.getParitiesItemList())){
+			parities.getParitiesItemList().stream().forEach(item ->{
+				item.setPid(parities.getId());
+				item.setTenantId(SecureUtil.getTenantId());
+				if (item.getId() == null){
+					item.setCreateTime(new Date());
+					item.setCreateUser(SecureUtil.getUserId());
+					paritiesItemMapper.insert(item);
+				}else {
+					item.setUpdateTime(new Date());
+					item.setUpdateUser(SecureUtil.getUserId());
+					paritiesItemMapper.updateById(item);
+				}
+			});
+		}
+		return parities;
+	}
+
+	@Override
+	public ParitiesItem getParities(ParitiesVO paritiesVO) {
+		ParitiesItem paritiesItem = new ParitiesItem();
+		//处理业务日期
+		Calendar calendar = Calendar.getInstance();
+		calendar.setTime(paritiesVO.getBusinesDate());
+		int year = calendar.get(Calendar.YEAR);//处理业务日期获取年
+		int month = calendar.get(Calendar.MONTH) + 1;//处理业务日期获取月
+		int date = calendar.get(Calendar.DATE);//处理业务日期获取日
+		//获取汇率类型
+		LambdaQueryWrapper<Parities> queryWrapper = new LambdaQueryWrapper<>();
+		queryWrapper.eq(Parities::getIsDeleted,0);
+		queryWrapper.eq(Parities::getTenantId,SecureUtil.getTenantId());
+		queryWrapper.eq(Parities::getCode,paritiesVO.getCurrency());
+		queryWrapper.eq(Parities::getAnnual,year);
+		Parities parities = baseMapper.selectOne(queryWrapper);
+		if (parities != null){
+			//获取汇率明细
+			LambdaQueryWrapper<ParitiesItem> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+			lambdaQueryWrapper.eq(ParitiesItem::getIsDeleted,0);
+			lambdaQueryWrapper.eq(ParitiesItem::getTenantId,SecureUtil.getTenantId());
+			lambdaQueryWrapper.eq(ParitiesItem::getPid,parities.getId());
+			if (parities.getParitiesType().equals("年汇率")){
+				lambdaQueryWrapper.eq(ParitiesItem::getAnnual,year);
+			}else if (parities.getParitiesType().equals("月汇率")){
+				lambdaQueryWrapper.eq(ParitiesItem::getAnnual,year);
+				lambdaQueryWrapper.eq(ParitiesItem::getMoon,month);
+			}else if (parities.getParitiesType().equals("日汇率")){
+				lambdaQueryWrapper.eq(ParitiesItem::getAnnual,year);
+				lambdaQueryWrapper.eq(ParitiesItem::getMoon,month);
+				lambdaQueryWrapper.eq(ParitiesItem::getNational,date);
+			}
+			paritiesItem = paritiesItemMapper.selectOne(lambdaQueryWrapper);
+		}
+		return paritiesItem;
+	}
+
+}

+ 13 - 0
blade-cargo/src/main/resources/application-dev.yml

@@ -0,0 +1,13 @@
+#服务器端口
+server:
+  port: 8099
+#数据源配置
+spring:
+  datasource:
+    url: ${blade.datasource.dev.url}
+    username: ${blade.datasource.dev.username}
+    password: ${blade.datasource.dev.password}
+#mybatis-plus:
+#  mapper-locations: classpath:com/yh/project/mapper/*Mapper.xml
+#  type-aliases-package: com.yh.project.*.entity
+#swagger文档

+ 10 - 0
blade-cargo/src/main/resources/application-prod.yml

@@ -0,0 +1,10 @@
+#服务器端口
+server:
+  port: 8099
+
+#数据源配置
+spring:
+  datasource:
+    url: ${blade.datasource.prod.url}
+    username: ${blade.datasource.prod.username}
+    password: ${blade.datasource.prod.password}

+ 10 - 0
blade-cargo/src/main/resources/application-test.yml

@@ -0,0 +1,10 @@
+#服务器端口
+server:
+  port: 8099
+
+#数据源配置
+spring:
+  datasource:
+    url: ${blade.datasource.test.url}
+    username: ${blade.datasource.test.username}
+    password: ${blade.datasource.test.password}

+ 6 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/vo/PjOrderStatisticsWeb.java

@@ -104,5 +104,11 @@ public class PjOrderStatisticsWeb implements Serializable {
 	@TableField(exist = false)
 	private Long salesCompanyId;
 
+	/**
+	 * 租户
+	 */
+	@TableField(exist = false)
+	private String tenantId;
+
 
 }

+ 1 - 3
blade-service/blade-pay/src/main/java/org/springblade/pay/tonglianPayment/feign/PaymentClient.java

@@ -58,14 +58,12 @@ public class PaymentClient implements IPaymentClient {
 	@Override
 	public R<Map<Object, Object>> payPrepay(PaymentDTO paymentDTO) {
 		SybPayService service = new SybPayService();
-		//https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=7_7&index=3
 		Map<Object, Object> resultObj = new TreeMap();
-		//"https://test.allinpaygd.com/JWeb/NotifyServlet"
 		try {
 			System.out.println("支付函数数据======》" + paymentDTO.toString());
 			String status = sysClient.getParamServiceNew("cashier.payment");
 			if ("1".equals(status)) {
-				Map<String, String> map = service.pay(paymentDTO.getTrxamt(), paymentDTO.getReqsn(), paymentDTO.getPaytype(),
+				Map<String, String> map = service.payNew(paymentDTO.getTrxamt(), paymentDTO.getReqsn(), paymentDTO.getPaytype(),
 					paymentDTO.getBody(), paymentDTO.getRemark(), paymentDTO.getAcct(), paymentDTO.getValidtime(), paymentDTO.getNotify_url(),
 					paymentDTO.getLimit_pay(), paymentDTO.getIdno(), paymentDTO.getTruename(), paymentDTO.getAsinfo(),
 					paymentDTO.getSub_appid(), paymentDTO.getGoods_tag(), paymentDTO.getBenefitdetail(), paymentDTO.getChnlstoreid(),

+ 47 - 0
blade-service/blade-pay/src/main/java/org/springblade/pay/tonglianPayment/utils/SybPayService.java

@@ -114,6 +114,53 @@ public class SybPayService {
 		return map;
 	}
 
+	public Map<String, String> payNew(long trxamt, String reqsn, String paytype, String body, String remark, String acct, String validtime, String notify_url, String limit_pay,
+								   String idno, String truename, String asinfo, String sub_appid, String goods_tag, String benefitdetail, String chnlstoreid, String subbranch,
+								   String extendparams, String cusip, String fqnum, String cusId, String appId, String orgid, String transactionType, String sybMdAppkey,
+								   String sybRsacusprikey, String sybRsatlpubkey, String sybSmpprivatekey, String sybSmtlpubkey) throws Exception {
+
+
+		TreeMap<String, String> params = new TreeMap<String, String>();
+		params.put("cusid", cusId);
+		params.put("appid", appId);
+		if (!SybUtil.isEmpty(orgid)) {
+			params.put("orgid", orgid);
+		}
+		params.put("version", "11");
+		params.put("trxamt", String.valueOf(trxamt));
+		params.put("reqsn", reqsn);
+		params.put("paytype", paytype);
+		params.put("randomstr", SybUtil.getValidatecode(8));
+		params.put("body", body);
+		params.put("remark", remark);
+		params.put("validtime", validtime);
+		params.put("acct", acct);
+		params.put("notify_url", notify_url);
+		params.put("limit_pay", limit_pay);
+		params.put("sub_appid", sub_appid);
+		params.put("goods_tag", goods_tag);
+		params.put("benefitdetail", benefitdetail);
+		params.put("chnlstoreid", chnlstoreid);
+		params.put("subbranch", subbranch);
+		params.put("extendparams", extendparams);
+		params.put("cusip", cusip);
+		params.put("fqnum", fqnum);
+		params.put("idno", idno);
+		params.put("truename", truename);
+		params.put("asinfo", asinfo);
+		params.put("signtype", transactionType);
+		String appkey = "";
+		if (transactionType.equals("RSA")) {
+			appkey = sybRsacusprikey;
+		} else if (transactionType.equals("SM2")) {
+			appkey = sybSmpprivatekey;
+		} else {
+			appkey = sybMdAppkey;
+		}
+		params.put("sign", SybUtil.unionSign(params, appkey, transactionType));
+		return params;
+	}
+
 	public Map<String, String> cancel(long trxamt, String reqsn, String oldtrxid, String oldreqsn) throws Exception {
 		TreeMap<String, String> params = new TreeMap<String, String>();
 		if (!SybUtil.isEmpty(SybConstants.SYB_ORGID)) {

+ 1 - 1
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/mapper/CorpsTypeMapper.java

@@ -46,7 +46,7 @@ public interface CorpsTypeMapper extends BaseMapper<PjCorpsType> {
 	 * @param tenantId
 	 * @return
 	 */
-	List<CorpsTypeVO> tree(String tenantId,String corpType);
+	List<CorpsTypeVO> tree(String tenantId,String corpType,Long salesCompanyId);
 
 	/**
 	 * 懒加载

+ 3 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/mapper/CorpsTypeMapper.xml

@@ -130,6 +130,9 @@
         <if test="tenantId!=null and tenantId!=''">
             and tenant_id = #{tenantId}
         </if>
+        <if test="salesCompanyId!=null">
+            and sales_company_id = #{salesCompanyId}
+        </if>
         ORDER BY sort
     </select>
     <select id="lazyTree" resultMap="treeNodeResultMap" >

+ 5 - 3
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/service/impl/CorpsTypeServiceImpl.java

@@ -121,9 +121,11 @@ public class CorpsTypeServiceImpl extends ServiceImpl<CorpsTypeMapper, PjCorpsTy
 		if (StringUtils.isBlank(tenantId)) {
 			tenantId = SecureUtil.getTenantId();
 		}
-
-		return ForestNodeMerger.merge(baseMapper.tree(tenantId, corpType));
-
+		if (!AuthUtil.getUserRole().contains("admin")) {
+			return ForestNodeMerger.merge(baseMapper.tree(tenantId, corpType,Long.parseLong(AuthUtil.getDeptId())));
+		}else{
+			return ForestNodeMerger.merge(baseMapper.tree(tenantId, corpType,null));
+		}
 	}
 
 	@Override

+ 3 - 1
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/mapper/GoodsTypeMapper.java

@@ -50,7 +50,9 @@ public interface GoodsTypeMapper extends BaseMapper<PjGoodsType> {
 	 * @param type
 	 * @return
 	 */
-	List<GoodsTypeVO> tree(@Param("tenantId") String tenantId, @Param("type") Long type);
+	List<GoodsTypeVO> tree(@Param("tenantId") String tenantId,
+						   @Param("type") Long type,
+						   @Param("salesCompanyId") Long salesCompanyId);
 	/**
 	 * 懒加载
 	 * @param tenantId

+ 3 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/mapper/GoodsTypeMapper.xml

@@ -125,6 +125,9 @@ WHERE
         <if test="tenantId!=null and tenantId!=''">
             and tenant_id = #{tenantId}
         </if>
+        <if test="salesCompanyId!=null">
+            and sales_company_id = #{salesCompanyId}
+        </if>
         and type = #{type}
         ORDER BY sort
     </select>

+ 5 - 1
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/service/impl/GoodsTypeServiceImpl.java

@@ -86,7 +86,11 @@ public class GoodsTypeServiceImpl extends ServiceImpl<GoodsTypeMapper, PjGoodsTy
 		if (StringUtils.isBlank(tenantId)) {
 			tenantId = SecureUtil.getTenantId();
 		}
-		return ForestNodeMerger.merge(baseMapper.tree(tenantId, type));
+		if (!AuthUtil.getUserRole().contains("admin")) {
+			return ForestNodeMerger.merge(baseMapper.tree(tenantId, type,Long.parseLong(AuthUtil.getDeptId())));
+		}else{
+			return ForestNodeMerger.merge(baseMapper.tree(tenantId, type,null));
+		}
 	}
 
 	@Override

+ 2 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/controller/OrderController.java

@@ -748,6 +748,7 @@ public class OrderController extends BladeController {
 		if (!AuthUtil.getUserRole().contains("admin")) {
 			order.setSalesCompanyId(Long.parseLong(AuthUtil.getDeptId()));
 		}
+		order.setTenantId(AuthUtil.getTenantId());
 		IPage<PjOrderStatisticsWeb> pages = orderService.statisticsPage(Condition.getPage(query), order);
 		return R.data(pages);
 	}
@@ -761,6 +762,7 @@ public class OrderController extends BladeController {
 		if (!AuthUtil.getUserRole().contains("admin")) {
 			order.setSalesCompanyId(Long.parseLong(AuthUtil.getDeptId()));
 		}
+		order.setTenantId(AuthUtil.getTenantId());
 		List<PjOrderStatisticsExcel> list = orderService.statisticsExport(order);
 		ExcelUtil.export(response, "利润统计", "利润统计", list, PjOrderStatisticsExcel.class);
 	}

+ 2 - 2
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/mapper/OrderMapper.xml

@@ -257,7 +257,7 @@
         FROM
             pjpf_order o
         WHERE
-            o.tenant_id = '883868'
+            o.tenant_id = #{order.tenantId}
           AND o.is_deleted = '0'
         <if test="order.customerId!=null">
             and o.customer_id = #{order.customerId}
@@ -304,7 +304,7 @@
         FROM
         pjpf_order o
         WHERE
-        o.tenant_id = '883868'
+        o.tenant_id = #{order.tenantId}
         AND o.is_deleted = '0'
         <if test="order.customerId!=null">
             and o.customer_id = #{order.customerId}

+ 17 - 7
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/stock/controller/StockDescController.java

@@ -34,15 +34,12 @@ import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.ObjectUtil;
 import org.springblade.salesPart.brand.service.IBrandFilesService;
-import org.springblade.salesPart.entity.PjBrandFiles;
-import org.springblade.salesPart.entity.PjGoodsFiles;
-import org.springblade.salesPart.entity.PjProductLaunch;
-import org.springblade.salesPart.entity.PjStockDesc;
+import org.springblade.salesPart.entity.*;
 import org.springblade.salesPart.excel.StockExportExcel;
+import org.springblade.salesPart.goods.service.IGoodsDescService;
 import org.springblade.salesPart.goods.service.IGoodsFilesService;
 import org.springblade.salesPart.productLaunch.service.IProductLaunchService;
 import org.springblade.salesPart.stock.service.IStockDescService;
-import org.springblade.salesPart.vo.StockDescVO;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
@@ -66,6 +63,7 @@ public class StockDescController extends BladeController {
 	private final IStockDescService stockDescService;
 	private final IProductLaunchService productLaunchService;
 	private final IGoodsFilesService goodsFilesService;
+	private final IGoodsDescService goodsDescService;
 	private final IBrandFilesService brandFilesService;
 
 	/**
@@ -91,7 +89,6 @@ public class StockDescController extends BladeController {
 			.eq(PjStockDesc::getIsDeleted, 0)
 			.eq(PjStockDesc::getSalesCompanyId, AuthUtil.getDeptId())//公司
 			.like(ObjectUtil.isNotEmpty(stockDesc.getCode()), PjStockDesc::getCode, stockDesc.getCode())
-			.like(ObjectUtil.isNotEmpty(stockDesc.getCname()), PjStockDesc::getCname, stockDesc.getCname())
 			.like(ObjectUtil.isNotEmpty(stockDesc.getTypeno()), PjStockDesc::getTypeno, stockDesc.getTypeno())
 			.eq(ObjectUtil.isNotEmpty(stockDesc.getStorageId()), PjStockDesc::getStorageId, stockDesc.getStorageId())
 			.eq(ObjectUtil.isNotEmpty(stockDesc.getBrandId()), PjStockDesc::getBrandId, stockDesc.getBrandId())
@@ -101,8 +98,21 @@ public class StockDescController extends BladeController {
 		if ("0".equals(stockDesc.getWhether())) {
 			lambdaQueryWrapper.ne(PjStockDesc::getStoreInventory, 0);
 		}
+		if (ObjectUtil.isNotEmpty(stockDesc.getCname())) {
+			List<PjGoodsDesc> pjGoodsDescs = goodsDescService.list(new LambdaQueryWrapper<PjGoodsDesc>()
+				.eq(PjGoodsDesc::getTenantId, AuthUtil.getTenantId())
+				.eq(PjGoodsDesc::getIsDeleted, 0)
+				.like(PjGoodsDesc::getCnameInt, stockDesc.getCname()));
+			if (pjGoodsDescs.size() > 0) {
+				List<Long> ids = pjGoodsDescs.stream().map(PjGoodsDesc::getId).collect(Collectors.toList());
+				lambdaQueryWrapper.and(i -> i.like(PjStockDesc::getCname, stockDesc.getCname())
+					.or().in(PjStockDesc::getGoodsId, ids));
+			} else {
+				lambdaQueryWrapper.like(PjStockDesc::getCname, stockDesc.getCname());
+			}
+		}
 		IPage<PjStockDesc> pages = stockDescService.page(Condition.getPage(query), lambdaQueryWrapper);
-		for (PjStockDesc item:pages.getRecords()) {
+		for (PjStockDesc item : pages.getRecords()) {
 			List<PjGoodsFiles> goodsFilesList = new ArrayList<>();
 			goodsFilesList = goodsFilesService.list(new LambdaQueryWrapper<PjGoodsFiles>()
 				.eq(PjGoodsFiles::getMainImage, 0)

+ 2 - 0
pom.xml

@@ -41,6 +41,8 @@
         <module>blade-plugin-api</module>
         <module>blade-service</module>
         <module>blade-service-api</module>
+        <module>blade-cargo</module>
+        <module>blade-cargo-api</module>
     </modules>
 
     <dependencyManagement>