纪新园 2 лет назад
Родитель
Сommit
5e52a33738

+ 125 - 121
blade-service-api/blade-deliver-goods-api/src/main/java/org/springblade/deliver/goods/entity/DeliveryFees.java

@@ -16,17 +16,15 @@
  */
 package org.springblade.deliver.goods.entity;
 
-import java.math.BigDecimal;
-
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
-import java.io.Serializable;
-import java.util.Date;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
 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;
 
 /**
  * 发货费用明细表实体类
@@ -42,143 +40,149 @@ public class DeliveryFees implements Serializable {
 	private static final long serialVersionUID = 1L;
 
 	/**
-	* 主键
-	*/
-		@ApiModelProperty(value = "主键")
-		private Long id;
-	/**
-	* 主表id
-	*/
-		@ApiModelProperty(value = "主表id")
-		private Long pid;
-	/**
-	* 排序
-	*/
-		@ApiModelProperty(value = "排序")
-		private Integer sort;
-	/**
-	* 费用id
-	*/
-		@ApiModelProperty(value = "费用id")
-		private Long itemId;
-	/**
-	* 客户id
-	*/
-		@ApiModelProperty(value = "客户id")
-		private Long corpId;
-	/**
-	* 数量
-	*/
-		@ApiModelProperty(value = "数量")
-		private BigDecimal quantity;
-	/**
-	* 计费单位
-	*/
-		@ApiModelProperty(value = "计费单位")
-		private String unit;
-	/**
-	* 单价
-	*/
-		@ApiModelProperty(value = "单价")
-		private BigDecimal price;
-	/**
-	* 金额
-	*/
-		@ApiModelProperty(value = "金额")
-		private BigDecimal amount;
-	/**
-	* 币别
-	*/
-		@ApiModelProperty(value = "币别")
-		private String currency;
-	/**
-	* 汇率
-	*/
-		@ApiModelProperty(value = "汇率")
-		private BigDecimal exchangeRate;
-	/**
-	* 税率
-	*/
-		@ApiModelProperty(value = "税率")
-		private BigDecimal taxRate;
-	/**
-	* 核销金额
-	*/
-		@ApiModelProperty(value = "核销金额")
-		private BigDecimal settlmentAmount;
-	/**
-	* 备注
-	*/
-		@ApiModelProperty(value = "备注")
-		private String remarks;
-	/**
-	* 版本
-	*/
-		@ApiModelProperty(value = "版本")
-		private String version;
+	 * 主键
+	 */
+	@ApiModelProperty(value = "主键")
+	private Long id;
+	/**
+	 * 主表id
+	 */
+	@ApiModelProperty(value = "主表id")
+	private Long pid;
+	/**
+	 * 排序
+	 */
+	@ApiModelProperty(value = "排序")
+	private Integer sort;
+	/**
+	 * 费用id
+	 */
+	@ApiModelProperty(value = "费用id")
+	private Long itemId;
+	/**
+	 * 客户id
+	 */
+	@ApiModelProperty(value = "客户id")
+	private Long corpId;
+	/**
+	 * 数量
+	 */
+	@ApiModelProperty(value = "数量")
+	private BigDecimal quantity;
+	/**
+	 * 计费单位
+	 */
+	@ApiModelProperty(value = "计费单位")
+	private String unit;
+	/**
+	 * 单价
+	 */
+	@ApiModelProperty(value = "单价")
+	private BigDecimal price;
+	/**
+	 * 金额
+	 */
+	@ApiModelProperty(value = "金额")
+	private BigDecimal amount;
+	/**
+	 * 币别
+	 */
+	@ApiModelProperty(value = "币别")
+	private String currency;
+	/**
+	 * 汇率
+	 */
+	@ApiModelProperty(value = "汇率")
+	private BigDecimal exchangeRate;
+	/**
+	 * 税率
+	 */
+	@ApiModelProperty(value = "税率")
+	private BigDecimal taxRate;
+	/**
+	 * 核销金额
+	 */
+	@ApiModelProperty(value = "核销金额")
+	private BigDecimal settlmentAmount;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 版本
+	 */
+	@ApiModelProperty(value = "版本")
+	private String version;
 	/**
 	 * 租户id
 	 */
-		@ApiModelProperty(value = "租户id")
-		private String tenantId;
+	@ApiModelProperty(value = "租户id")
+	private String tenantId;
 	/**
-	* 创建人
-	*/
-		@ApiModelProperty(value = "创建人")
-		private Long createUser;
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private Long createUser;
 	/**
-	* 创建部门
-	*/
-		@ApiModelProperty(value = "创建部门")
-		private Long createDept;
+	 * 创建部门
+	 */
+	@ApiModelProperty(value = "创建部门")
+	private Long createDept;
 	/**
-	* 创建时间
-	*/
-		@ApiModelProperty(value = "创建时间")
-		private Date createTime;
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
 	/**
-	* 修改人
-	*/
-		@ApiModelProperty(value = "修改人")
-		private Long updateUser;
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private Long updateUser;
 	/**
-	* 修改时间
-	*/
-		@ApiModelProperty(value = "修改时间")
-		private Date updateTime;
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
 	/**
-	* 状态(0 正常 1停用)
-	*/
-		@ApiModelProperty(value = "状态(0 正常 1停用)")
-		private Integer status;
+	 * 状态(0 正常 1停用)
+	 */
+	@ApiModelProperty(value = "状态(0 正常 1停用)")
+	private Integer status;
 	/**
-	* 是否已删除(0 否 1是)
-	*/
-		@ApiModelProperty(value = "是否已删除(0 否 1是)")
-		private Integer isDeleted;
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private Integer isDeleted;
 	/**
 	 * 费用编码
 	 */
-		@ApiModelProperty(value = "费用编码")
-		@TableField(exist = false)
-		private String code;
+	@ApiModelProperty(value = "费用编码")
+	@TableField(exist = false)
+	private String code;
 	/**
 	 * 费用名称
 	 */
-		@ApiModelProperty(value = "费用名称")
-		@TableField(exist = false)
-		private String feeName;
+	@ApiModelProperty(value = "费用名称")
+	@TableField(exist = false)
+	private String feeName;
 	/**
 	 * 支付方名称
 	 */
-		@ApiModelProperty(value = "支付方名称")
-		@TableField(exist = false)
-		private String corpName;
+	@ApiModelProperty(value = "支付方名称")
+	@TableField(exist = false)
+	private String corpName;
 	/**
 	 * 1.应收 2.应付
 	 */
 	@ApiModelProperty(value = "1.应收 2.应付")
-		private int feesType;
+	private int feesType;
+
+	/**
+	 * 来源id
+	 */
+	@ApiModelProperty(value = "来源id")
+	private Long srcId;
 
 	private String srcOrderNo;
 	private BigDecimal refundSettlmentAmount;

+ 224 - 220
blade-service-api/blade-deliver-goods-api/src/main/java/org/springblade/deliver/goods/entity/DeliveryItems.java

@@ -16,19 +16,17 @@
  */
 package org.springblade.deliver.goods.entity;
 
-import java.math.BigDecimal;
-
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
-import java.io.Serializable;
-import java.util.Date;
-
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.NullSerializer;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
 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;
 
 /**
  * 发货明细实体类
@@ -44,272 +42,278 @@ public class DeliveryItems implements Serializable {
 	private static final long serialVersionUID = 1L;
 
 	/**
-	* 主键
-	*/
-		@ApiModelProperty(value = "主键")
-		private Long id;
-	/**
-	* 主表id
-	*/
-		@ApiModelProperty(value = "主表id")
-		private Long pid;
-	/**
-	* 排序
-	*/
-		@ApiModelProperty(value = "排序")
-		private Integer sort;
-	/**
-	* 类型(货物,赠品)
-	*/
-		@ApiModelProperty(value = "类型(货物,赠品)")
-		private String billType;
-	/**
-	* 生产年份
-	*/
-		@ApiModelProperty(value = "生产年份")
-		private Long goodsYear;
-	/**
-	* 货物id
-	*/
-		@ApiModelProperty(value = "货物id")
-		private Long itemId;
-	/**
-	* 数量
-	*/
-		@ApiModelProperty(value = "数量")
-		private BigDecimal actualQuantity;
-	/**
-	* 箱量(基础资料带过来 可以修改)
-	*/
-		@ApiModelProperty(value = "箱量(基础资料带过来 可以修改)")
-		private BigDecimal containerQuantity;
-	/**
-	* 折合箱量(立方)
-	*/
-		@ApiModelProperty(value = "折合箱量(立方)")
-		private BigDecimal containerVolume;
-	/**
-	* 重量
-	*/
-		@ApiModelProperty(value = "重量")
-		private BigDecimal actualWeight;
-	/**
-	* 合计重量
-	*/
-		@ApiModelProperty(value = "合计重量")
-		private BigDecimal totalWeight;
-	/**
-	* 包装要求
-	*/
-		@ApiModelProperty(value = "包装要求")
-		private String packageRemarks;
-	/**
-	* 原始订单号
-	*/
-		@ApiModelProperty(value = "原始订单号")
-		private String orgOrderNo;
-	/**
-	* 来源订单号
-	*/
-		@ApiModelProperty(value = "来源订单号")
-		private String srcOrderNo;
-	/**
-	* 来源id
-	*/
-		@ApiModelProperty(value = "来源id")
-		private Long srcId;
-	/**
-	* 库存数量
-	*/
-		@ApiModelProperty(value = "库存数量")
-		private BigDecimal inventoryNumber;
-	/**
-	* 备注
-	*/
-		@ApiModelProperty(value = "备注")
-		private String remarks;
-	/**
-	* 版本
-	*/
-		@ApiModelProperty(value = "版本")
-		private String version;
+	 * 主键
+	 */
+	@ApiModelProperty(value = "主键")
+	private Long id;
+	/**
+	 * 主表id
+	 */
+	@ApiModelProperty(value = "主表id")
+	private Long pid;
+	/**
+	 * 排序
+	 */
+	@ApiModelProperty(value = "排序")
+	private Integer sort;
+	/**
+	 * 类型(货物,赠品)
+	 */
+	@ApiModelProperty(value = "类型(货物,赠品)")
+	private String billType;
+	/**
+	 * 生产年份
+	 */
+	@ApiModelProperty(value = "生产年份")
+	private Long goodsYear;
+	/**
+	 * 货物id
+	 */
+	@ApiModelProperty(value = "货物id")
+	private Long itemId;
+	/**
+	 * 数量
+	 */
+	@ApiModelProperty(value = "数量")
+	private BigDecimal actualQuantity;
+	/**
+	 * 箱量(基础资料带过来 可以修改)
+	 */
+	@ApiModelProperty(value = "箱量(基础资料带过来 可以修改)")
+	private BigDecimal containerQuantity;
+	/**
+	 * 折合箱量(立方)
+	 */
+	@ApiModelProperty(value = "折合箱量(立方)")
+	private BigDecimal containerVolume;
+	/**
+	 * 重量
+	 */
+	@ApiModelProperty(value = "重量")
+	private BigDecimal actualWeight;
+	/**
+	 * 合计重量
+	 */
+	@ApiModelProperty(value = "合计重量")
+	private BigDecimal totalWeight;
+	/**
+	 * 包装要求
+	 */
+	@ApiModelProperty(value = "包装要求")
+	private String packageRemarks;
+	/**
+	 * 原始订单号
+	 */
+	@ApiModelProperty(value = "原始订单号")
+	private String orgOrderNo;
+	/**
+	 * 来源订单号
+	 */
+	@ApiModelProperty(value = "来源订单号")
+	private String srcOrderNo;
+	/**
+	 * 来源id
+	 */
+	@ApiModelProperty(value = "来源id")
+	private Long srcId;
+	/**
+	 * 库存数量
+	 */
+	@ApiModelProperty(value = "库存数量")
+	private BigDecimal inventoryNumber;
+	/**
+	 * 备注
+	 */
+	@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停用)")
-		@JsonSerialize(nullsUsing = NullSerializer.class)
-		private Integer status;
-	/**
-	* 是否已删除(0 否 1是)
-	*/
-		@ApiModelProperty(value = "是否已删除(0 否 1是)")
-		@JsonSerialize(nullsUsing = NullSerializer.class)
-		private Integer isDeleted;
-	/**
-	* 商品类别
-	*/
-		@ApiModelProperty(value = "商品类别")
-		private String priceCategory;
-	/**
-	* 库存金额
-	*/
-		@ApiModelProperty(value = "库存金额")
-		private BigDecimal inventoryAmount;
-	/**
-	* 出库金额
-	*/
-		@ApiModelProperty(value = "出库金额")
-		private BigDecimal deliveryAmount;
-	/**
-	* 提单号
-	*/
-		@ApiModelProperty(value = "提单号")
-		private String billNo;
-	/**
-	* 合同号
-	*/
-		@ApiModelProperty(value = "合同号")
-		private String contractNumber;
+	@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停用)")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer status;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isDeleted;
+	/**
+	 * 商品类别
+	 */
+	@ApiModelProperty(value = "商品类别")
+	private String priceCategory;
+	/**
+	 * 库存金额
+	 */
+	@ApiModelProperty(value = "库存金额")
+	private BigDecimal inventoryAmount;
+	/**
+	 * 出库金额
+	 */
+	@ApiModelProperty(value = "出库金额")
+	private BigDecimal deliveryAmount;
+	/**
+	 * 提单号
+	 */
+	@ApiModelProperty(value = "提单号")
+	private String billNo;
+	/**
+	 * 合同号
+	 */
+	@ApiModelProperty(value = "合同号")
+	private String contractNumber;
 
 	@ApiModelProperty(value = "合同类型")
 	private String orderType;
 	/**
-	* 发票重量
-	*/
-		@ApiModelProperty(value = "发票重量")
-		private BigDecimal invoiceWeight;
+	 * 发票重量
+	 */
+	@ApiModelProperty(value = "发票重量")
+	private BigDecimal invoiceWeight;
 	/**
-	* 码单重量
-	*/
-		@ApiModelProperty(value = "码单重量")
-		private BigDecimal billWeight;
+	 * 码单重量
+	 */
+	@ApiModelProperty(value = "码单重量")
+	private BigDecimal billWeight;
 	/**
-	* 单价
-	*/
-		@ApiModelProperty(value = "单价")
-		private BigDecimal price;
+	 * 单价
+	 */
+	@ApiModelProperty(value = "单价")
+	private BigDecimal price;
 	/**
-	* 合同金额
-	*/
-		@ApiModelProperty(value = "合同金额")
-		private BigDecimal contractAmount;
+	 * 合同金额
+	 */
+	@ApiModelProperty(value = "合同金额")
+	private BigDecimal contractAmount;
 	/**
-	* 税率
-	*/
-		@ApiModelProperty(value = "税率")
-		private BigDecimal taxRate;
+	 * 税率
+	 */
+	@ApiModelProperty(value = "税率")
+	private BigDecimal taxRate;
 	/**
 	 * 商品编码
 	 */
-		@ApiModelProperty(value = "商品编码")
-		@TableField(exist = false)
-		private String code;
+	@ApiModelProperty(value = "商品编码")
+	@TableField(exist = false)
+	private String code;
 	/**
 	 * 商品名称
 	 */
-		@ApiModelProperty(value = "商品名称")
-		@TableField(exist = false)
-		private String cname;
+	@ApiModelProperty(value = "商品名称")
+	@TableField(exist = false)
+	private String cname;
 	/**
 	 * 规格编码
 	 */
-		@ApiModelProperty(value = "规格编码")
-		@TableField(exist = false)
-		private String typeno;
+	@ApiModelProperty(value = "规格编码")
+	@TableField(exist = false)
+	private String typeno;
 	/**
 	 * 规格型号
 	 */
-		@ApiModelProperty(value = "规格型号")
-		/*@TableField(exist = false)*/
-		private String specificationAndModel;
+	@ApiModelProperty(value = "规格型号")
+	/*@TableField(exist = false)*/
+	private String specificationAndModel;
 
 	/**
 	 * 采购金额
 	 */
-		@ApiModelProperty(value = "采购金额")
-		private BigDecimal purchaseAmount;
+	@ApiModelProperty(value = "采购金额")
+	private BigDecimal purchaseAmount;
 	/**
 	 * 采购数量
 	 */
-		@ApiModelProperty(value = "采购数量")
-		private BigDecimal purchaseQuantity;
+	@ApiModelProperty(value = "采购数量")
+	private BigDecimal purchaseQuantity;
 
-	    @ApiModelProperty(value = "计价单位")
-		private String  unit;
+	@ApiModelProperty(value = "计价单位")
+	private String unit;
 
-	    @ApiModelProperty(value = "产品描述")
-	    private String productDesc;
+	@ApiModelProperty(value = "产品描述")
+	private String productDesc;
 
-		@ApiModelProperty(value = "商品类别名称")
-		private String priceCategoryNames;
+	@ApiModelProperty(value = "商品类别名称")
+	private String priceCategoryNames;
 
-		@ApiModelProperty(value = "箱号")
-		private String cntrNo;
+	@ApiModelProperty(value = "箱号")
+	private String cntrNo;
 	/**
 	 * 产品属性
 	 */
-		@ApiModelProperty(value = "产品属性")
-		private String itemProp;
+	@ApiModelProperty(value = "产品属性")
+	private String itemProp;
 
-    	@ApiModelProperty(value = "库存重量")
-		private BigDecimal inWeight;
-		@ApiModelProperty(value = "币别")
-    	private String currency;
+	@ApiModelProperty(value = "库存重量")
+	private BigDecimal inWeight;
+	@ApiModelProperty(value = "币别")
+	private String currency;
 
-		@ApiModelProperty(value = "汇率")
-    	private BigDecimal exRate;
+	@ApiModelProperty(value = "汇率")
+	private BigDecimal exRate;
 
-		private String cntrNoList;
+	private String cntrNoList;
 	/**
 	 * 单据状态字典表
 	 */
-		@ApiModelProperty(value = "单据状态字典表")
-		private String deliveryStatus;
+	@ApiModelProperty(value = "单据状态字典表")
+	private String deliveryStatus;
 	/**
 	 * 供应商
 	 */
-		@ApiModelProperty(value = "供应商")
-		private Long corpId;
+	@ApiModelProperty(value = "供应商")
+	private Long corpId;
 	/**
 	 * 供应商名称
 	 */
-		@ApiModelProperty(value = "供应商名称")
-		private String corpName;
+	@ApiModelProperty(value = "供应商名称")
+	private String corpName;
+
+	/**
+	 * 英文名称
+	 */
+	@ApiModelProperty(value = "英文名称")
+	private String ename;
 	/**
 	 * 商品类型 默认0 为商品 1 为赠品
 	 */
 	@ApiModelProperty(value = "商品类型 默认0 为商品 1 为赠品")
-		private int goodType;
+	private int goodType;
 	@ApiModelProperty(value = "商品叫积分倍数 正品叫积分数")
 	private BigDecimal integralMultiples;
 	@ApiModelProperty(value = "商品叫赠送积分 赠品叫兑换积分")

+ 33 - 0
blade-service/blade-client/src/main/java/org/springblade/client/goods/controller/GoodsDescController.java

@@ -428,6 +428,39 @@ public class GoodsDescController extends BladeController {
 	}
 
 	/**
+	 * 获取商品详情
+	 */
+	@GetMapping("/selectGoodsAll")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "获取商品详情", notes = "传入goodsDesc")
+	public R<List<GoodsDescVO>> selectGoodsAll(GoodsDescVO goodsDesc) {
+		goodsDesc.setIsDeleted(0);
+		goodsDesc.setTenantId(AuthUtil.getTenantId());
+		goodsDesc.setType(GoodsTypeEnum.GOODS.getType());
+		List<Long> goodsIdList = new ArrayList<>();
+		if (StringUtils.isNotEmpty(goodsDesc.getGoodsTypeId())) {
+			Long goodsId = Long.parseLong(goodsDesc.getGoodsTypeId());
+			selectChildById(goodsId, goodsIdList);
+			goodsIdList.add(goodsId);
+		}
+		if (CollectionUtils.isNotEmpty(goodsIdList)) {
+			goodsDesc.setGoodsTypeIdList(goodsIdList);
+		}
+		List<GoodsDescVO> list = goodsDescService.selectGoodsAll(goodsDesc);
+		if (CollectionUtils.isNotEmpty(list)) {
+			list.forEach(e -> {
+				LambdaQueryWrapper<GoodsSpecification> specificationWrapper = new LambdaQueryWrapper<>();
+				specificationWrapper.eq(GoodsSpecification::getPid, e.getId());
+				specificationWrapper.eq(GoodsSpecification::getIsDeleted, 0);
+				specificationWrapper.eq(GoodsSpecification::getTenantId, SecureUtil.getTenantId());
+				List<GoodsSpecification> goodsSpecificationList = goodsSpecificationService.list(specificationWrapper);
+				e.setGoodsSpecificationList(goodsSpecificationList);
+			});
+		}
+		return R.data(list);
+	}
+
+	/**
 	 * 导入商品
 	 */
 	@PostMapping("/import-desc")

+ 1 - 0
blade-service/blade-client/src/main/java/org/springblade/client/goods/mapper/GoodsDescMapper.java

@@ -75,4 +75,5 @@ public interface GoodsDescMapper extends BaseMapper<GoodsDesc> {
 	GoodsDesc getTerraceCode(@Param("code") String code,
 							 @Param("tenantId") String tenantId);
 
+    List<GoodsDescVO> selectGoodsAll(GoodsDesc goodsDesc);
 }

+ 61 - 0
blade-service/blade-client/src/main/java/org/springblade/client/goods/mapper/GoodsDescMapper.xml

@@ -233,5 +233,66 @@
         and code = #{code}
         and tenant_id = #{tenantId}
     </select>
+    <select id="selectGoodsAll" resultType="org.springblade.client.vo.GoodsDescVO">
+        select
+        bg.*,
+        ba.cname AS goodsTypeName,
+        bcd.code AS corpCode
+        from basic_goods_desc bg
+        LEFT JOIN basic_goods_type ba ON ba.id = bg.goods_type_id AND ba.status = 0 AND ba.is_deleted = 0
+        LEFT JOIN basic_corps_desc bcd ON bg.corp_id = bcd.id
+        where bg.is_deleted = 0
+        <if test="id!=null">
+            and bg.id = #{id}
+        </if>
+        <if test="cname!=null and cname != ''">
+            and bg.cname like concat(concat('%',  #{cname}),'%')
+        </if>
+        <if test="ename!=null and ename != ''">
+            and bg.ename like concat(concat('%',  #{ename}),'%')
+        </if>
+        <if test="code!=null and code != ''">
+            and bg.code like concat(concat('%',  #{code}),'%')
+        </if>
+        <if test="typeno!=null and typeno != ''">
+            and bg.typeno like concat(concat('%',  #{typeno}),'%')
+        </if>
+        <if test="brand!=null and brand != ''">
+            and bg.brand like concat(concat('%',  #{brand}),'%')
+        </if>
+        <if test="brandItem!=null and brandItem != ''">
+            and bg.brand_item like concat(concat('%',  #{brandItem}),'%')
+        </if>
+        <if test="specs!=null and specs != ''">
+            and bg.specs like concat(concat('%',  #{specs}),'%')
+        </if>
+        <if test="category!=null and category != ''">
+            and bg.category = #{category}
+        </if>
+        <if test="providers!=null and providers != ''">
+            and bg.providers = #{providers}
+        </if>
+        <if test="unit!=null and unit != ''">
+            and bg.unit = #{unit}
+        </if>
+        <if test="packgeunit!=null and packgeunit != ''">
+            and bg.packgeunit = #{packgeunit}
+        </if>
+        <if test="tenantId!=null and tenantId != ''">
+            and bg.tenant_id = #{tenantId}
+        </if>
+        <if test="url!=null and url != ''">
+            and bg.url = #{url}
+        </if>
+        <if test="status!=null">
+            and bg.status = #{status}
+        </if>
+        <if test='goodsTypeIdList!=null and goodsTypeIdList != ""'>
+            AND goods_type_id  in
+            <foreach collection="goodsTypeIdList" index="index" item="item" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+    </select>
 
 </mapper>

+ 8 - 0
blade-service/blade-client/src/main/java/org/springblade/client/goods/service/IGoodsDescService.java

@@ -88,6 +88,14 @@ public interface IGoodsDescService extends IService<GoodsDesc> {
 	IPage<GoodsDescVO> selectGoods(IPage<GoodsDescVO> page, GoodsDesc goodsDesc);
 
 	/**
+	 * 下单查询商品信息
+	 *
+	 * @param goodsDesc
+	 * @return
+	 */
+	List<GoodsDescVO> selectGoodsAll(GoodsDesc goodsDesc);
+
+	/**
 	 * 根据销售明细的商品id获得商品信息
 	 *
 	 * @param itemIds

+ 5 - 0
blade-service/blade-client/src/main/java/org/springblade/client/goods/service/impl/GoodsDescServiceImpl.java

@@ -190,6 +190,11 @@ public class GoodsDescServiceImpl extends ServiceImpl<GoodsDescMapper, GoodsDesc
 		return page.setRecords(baseMapper.selectGoods(page, goodsDesc));
 	}
 
+	@Override
+	public List<GoodsDescVO> selectGoodsAll(GoodsDesc goodsDesc) {
+		return baseMapper.selectGoodsAll(goodsDesc);
+	}
+
 	/**
 	 * 根据销售明细的商品id获得商品信息
 	 *

+ 57 - 1
blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/feign/DeliveryClient.java

@@ -16,6 +16,7 @@ import org.springblade.deliver.goods.service.IDeliveryFeesService;
 import org.springblade.deliver.goods.service.IDeliveryItemsService;
 import org.springblade.deliver.goods.service.IDeliveryService;
 import org.springblade.purchase.sales.entity.Order;
+import org.springblade.purchase.sales.entity.OrderFees;
 import org.springblade.purchase.sales.entity.OrderItems;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -109,6 +110,7 @@ public class DeliveryClient implements IDeliveryClient {
 
 		Delivery deliveryNew = new Delivery();
 		List<DeliveryItems> deliveryItemsList = new ArrayList<>();
+		List<DeliveryFees> deliveryFeesList = new ArrayList<>();
 		LambdaQueryWrapper<Delivery> lambdaQueryWrapper = new LambdaQueryWrapper<>();
 		lambdaQueryWrapper.eq(Delivery::getIsDeleted, 0)
 			.eq(Delivery::getTenantId, AuthUtil.getTenantId())
@@ -208,7 +210,8 @@ public class DeliveryClient implements IDeliveryClient {
 					deliveryItems1.setPackageRemarks(orderItems.getPartsColourName());//包装要求
 					deliveryItems1.setActualQuantity(orderItems.getOrderQuantity());//数量
 					deliveryItems1.setPrice(orderItems.getPrice());//单价
-					deliveryItems1.setPurchaseAmount(orderItems.getAmount());//采购金额
+					deliveryItems1.setPurchaseAmount(orderItems.getAmount());//销售金额
+					deliveryItems1.setContractAmount(orderItems.getAmount());//销售金额
 					deliveryItems1.setPurchaseTotalAmount(orderItems.getAmount());//采购总价
 					deliveryItems1.setPurchaseQuantity(orderItems.getOrderQuantity());//采购数量
 					deliveryItems1.setUnit(orderItems.getUnit());//计量单位
@@ -216,6 +219,7 @@ public class DeliveryClient implements IDeliveryClient {
 					deliveryItems1.setCurrency(order.getCurrency());//币别
 					deliveryItems1.setExRate(order.getExchangeRate());//汇率
 					deliveryItems1.setGoodType(0);//默认0为商品信息 1为赠品信息
+					deliveryItems1.setEname(orderItems.getEname());
 					deliveryItemsService.updateById(deliveryItems1);
 					deliveryItemsList.add(deliveryItems1);
 				}else{
@@ -245,11 +249,63 @@ public class DeliveryClient implements IDeliveryClient {
 					deliveryItems.setCreateUser(order.getDocumenterId());
 					deliveryItems.setCreateTime(new Date());
 					deliveryItems.setTenantId(SecureUtil.getTenantId());
+					deliveryItems.setEname(orderItems.getEname());
 					deliveryItemsService.save(deliveryItems);
 					deliveryItemsList.add(deliveryItems);
 				}
 			}
+			if (ObjectUtils.isNotNull(order.getOrderFeesList()) && order.getOrderFeesList().size() > 0) {
+				for (OrderFees orderFees : order.getOrderFeesList()) {
+					LambdaQueryWrapper<DeliveryFees> itemsLambdaQueryWrapper = new LambdaQueryWrapper<>();
+					itemsLambdaQueryWrapper.eq(DeliveryFees::getIsDeleted, 0)
+						.eq(DeliveryFees::getTenantId, AuthUtil.getTenantId())
+						.eq(DeliveryFees::getSrcId, orderFees.getId())
+						.eq(DeliveryFees::getSrcOrderNo, order.getOrderNo());
+					DeliveryFees deliveryFees1 = feesService.getOne(itemsLambdaQueryWrapper);
+					if (ObjectUtils.isNotNull(deliveryFees1)) {
+						deliveryFees1.setSrcId(orderFees.getId());//来源id
+						deliveryFees1.setItemId(orderFees.getItemId());//费用名称
+						deliveryFees1.setCorpId(orderFees.getCorpId());//客户
+						deliveryFees1.setQuantity(orderFees.getQuantity());//数量
+						deliveryFees1.setUnit(orderFees.getUnit());//计价单位
+						deliveryFees1.setPrice(orderFees.getPrice());//单价
+						deliveryFees1.setAmount(orderFees.getAmount());//金额
+						deliveryFees1.setCurrency(orderFees.getCurrency());//币别
+						deliveryFees1.setExchangeRate(orderFees.getExchangeRate());//汇率
+						deliveryFees1.setTaxRate(orderFees.getTaxRate());//税率
+						deliveryFees1.setSettlmentAmount(orderFees.getSettlmentAmount());//结算金额
+						deliveryFees1.setRefundSettlmentAmount(orderFees.getRefundSettlmentAmount());//退费金额
+						deliveryFees1.setFeesType(orderFees.getFeesType());//类型
+						feesService.updateById(deliveryFees1);
+						deliveryFeesList.add(deliveryFees1);
+					} else {
+						DeliveryFees deliveryFees = new DeliveryFees();
+						deliveryFees.setPid(deliveryNew.getId());
+						deliveryFees.setSort(1);
+						deliveryFees.setSrcOrderNo(order.getOrderNo());//来源订单号
+						deliveryFees1.setSrcId(orderFees.getId());//来源id
+						deliveryFees1.setItemId(orderFees.getItemId());//费用名称
+						deliveryFees1.setCorpId(orderFees.getCorpId());//客户
+						deliveryFees1.setQuantity(orderFees.getQuantity());//数量
+						deliveryFees1.setUnit(orderFees.getUnit());//计价单位
+						deliveryFees1.setPrice(orderFees.getPrice());//单价
+						deliveryFees1.setAmount(orderFees.getAmount());//金额
+						deliveryFees1.setCurrency(orderFees.getCurrency());//币别
+						deliveryFees1.setExchangeRate(orderFees.getExchangeRate());//汇率
+						deliveryFees1.setTaxRate(orderFees.getTaxRate());//税率
+						deliveryFees1.setSettlmentAmount(orderFees.getSettlmentAmount());//结算金额
+						deliveryFees1.setRefundSettlmentAmount(orderFees.getRefundSettlmentAmount());//退费金额
+						deliveryFees1.setFeesType(orderFees.getFeesType());//类型
+						deliveryFees.setCreateUser(order.getDocumenterId());
+						deliveryFees.setCreateTime(new Date());
+						deliveryFees.setTenantId(SecureUtil.getTenantId());
+						feesService.save(deliveryFees);
+						deliveryFeesList.add(deliveryFees);
+					}
+				}
+			}
 			deliveryNew.setDeliveryItemsList(deliveryItemsList);
+			deliveryNew.setDeliveryFeesList(deliveryFeesList);
 		}
 		return R.data(deliveryNew);
 	}

+ 5 - 3
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/impl/OrderServiceImpl.java

@@ -5059,16 +5059,18 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 				orderMessage.setCorpName(corpMessage.getData());
 			}
 		}
-		LambdaQueryWrapper<OrderItems> lambdaQueryWrapper = new LambdaQueryWrapper<>();
-		lambdaQueryWrapper.eq(OrderItems::getPid, orderMessage.getId()).eq(OrderItems::getIsDeleted, 0).eq(OrderItems::getTenantId, AuthUtil.getTenantId());
 		// 获取销售单明细数据
-		List<OrderItems> orderItemsList = orderItemsService.list(lambdaQueryWrapper);
+		List<OrderItems> orderItemsList = orderItemsService.getOrderItems(order);
 		orderMessage.setOrderItemsList(orderItemsList);
 		orderMessage.setDeliverQuantity(orderItemsList.stream().map(OrderItems::getOrderQuantity).reduce(BigDecimal.ZERO, BigDecimal::add));
 		orderMessage.setDocumentaryStatus("跟单中");
 		orderMessage.setDocumentaryDate(order.getDocumentaryDate());
 		baseMapper.updateById(orderMessage);
 
+		// 获取订单费用信息
+		List<OrderFees> orderFeesList = orderFeesService.getOrderFees(order);
+		orderMessage.setOrderFeesList(orderFeesList);
+
 		//发送消息
 		Message sendMessage = new Message();
 		sendMessage.setParameter(String.valueOf(orderMessage.getId()));

+ 5 - 5
blade-service/trade-purchase/src/main/java/com/trade/purchase/order/component/impl/DefaultOrderSaveImpl.java

@@ -241,6 +241,8 @@ public class DefaultOrderSaveImpl implements IOrderSave {
 					order.setFudaPurchaseDate(new Date());
 					order.setFudaPurchaseStatus("采购中");
 				}
+				order.setBuyerName(order.get$buyerId());
+				order.setDocumenterName(order.get$documenterId());
 			} else {
 				if (StringUtils.isBlank(order.getOrderNo())) {
 					//生成订单号
@@ -262,12 +264,10 @@ public class DefaultOrderSaveImpl implements IOrderSave {
 				//order.setOrderNo(order.getOrderNo().toUpperCase());
 				//order.setSysNo(order.getSysNo().toUpperCase());
 				//order.setBillNo(order.getBillNo().toUpperCase());
-				order.setCreateTime(new Date());
-				order.setCreateUser(AuthUtil.getUserId());
-				order.setBuyerName(order.get$buyerId());
-				order.setDocumenterName(order.get$documenterId());
-				orderService.insert(order);
 			}
+			order.setCreateTime(new Date());
+			order.setCreateUser(AuthUtil.getUserId());
+			orderService.insert(order);
 		} else {
 			if ("577435".equals(AuthUtil.getTenantId())) {
 				LambdaQueryWrapper<Order> orderLambdaQueryWrapper = new LambdaQueryWrapper<>();