纪新园 1 год назад
Родитель
Сommit
794590b288
21 измененных файлов с 1543 добавлено и 8 удалено
  1. 2 2
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/PjBrandDesc.java
  2. 2 2
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/PjGoodsDesc.java
  3. 8 2
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/PjProductLaunch.java
  4. 34 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/excel/SharePutOnShelvesImportExcel.java
  5. 34 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/share/dto/SharePutOnShelvesDTO.java
  6. 269 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/share/entity/SharePutOnShelves.java
  7. 36 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/share/vo/SharePutOnShelvesVO.java
  8. 5 0
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClient.java
  9. 5 0
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClientFallback.java
  10. 85 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/productLaunch/controller/ProductLaunchController.java
  11. 223 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/controller/SharePutOnShelvesController.java
  12. 46 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/mapper/SharePutOnShelvesMapper.java
  13. 66 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/mapper/SharePutOnShelvesMapper.xml
  14. 59 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/service/ISharePutOnShelvesService.java
  15. 645 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/service/impl/SharePutOnShelvesServiceImpl.java
  16. 2 2
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/stock/controller/StockDescController.java
  17. 5 0
      blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java
  18. 4 0
      blade-service/blade-system/src/main/java/org/springblade/system/mapper/DeptMapper.java
  19. 6 0
      blade-service/blade-system/src/main/java/org/springblade/system/mapper/DeptMapper.xml
  20. 2 0
      blade-service/blade-system/src/main/java/org/springblade/system/service/IDeptService.java
  21. 5 0
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java

+ 2 - 2
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/PjBrandDesc.java

@@ -114,9 +114,9 @@ public class PjBrandDesc implements Serializable {
 	@ApiModelProperty(value = "订单状态")
 	private String status;
 	/**
-	 * 是否启用(0启用,1停用)
+	 * 是否启用(1启用,0停用)
 	 */
-	@ApiModelProperty(value = "是否启用(0启用,1停用)")
+	@ApiModelProperty(value = "是否启用(1启用,0停用)")
 	private Integer enableOrNot;
 	/**
 	 * 品牌名称

+ 2 - 2
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/PjGoodsDesc.java

@@ -163,9 +163,9 @@ public class PjGoodsDesc implements Serializable {
 	private String cnameInt;
 
 	/**
-	 * 是否启用(0启用,1停用)
+	 * 是否启用(1启用,0停用)
 	 */
-	@ApiModelProperty(value = "是否启用(0启用,1停用)")
+	@ApiModelProperty(value = "是否启用(1启用,0停用)")
 	private Integer enableOrNot;
 	/**
 	 * 商品描述

+ 8 - 2
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/PjProductLaunch.java

@@ -243,9 +243,9 @@ public class PjProductLaunch implements Serializable {
 	private String brandName;
 
 	/**
-	 * 是否共享(0 共享,1 取消共享)
+	 * 共享(0 未共享,1 已共享)
 	 */
-	@ApiModelProperty(value = "是否共享(0 共享,1 取消共享)")
+	@ApiModelProperty(value = "共享 0 未共享,1 已共享)")
 	private Integer whetherShare;
 
 	/**
@@ -321,6 +321,12 @@ public class PjProductLaunch implements Serializable {
 	private String code;
 
 	/**
+	 * 商品尺寸
+	 */
+	@TableField(exist = false)
+	private String goodsSize;
+
+	/**
 	 * 商品IDS
 	 */
 	@TableField(exist = false)

+ 34 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/excel/SharePutOnShelvesImportExcel.java

@@ -0,0 +1,34 @@
+package org.springblade.salesPart.excel;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * 导入模板实体类
+ */
+@Data
+@ColumnWidth(25)
+@HeadRowHeight(20)
+@ContentRowHeight(18)
+public class SharePutOnShelvesImportExcel implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 商品名称
+	 */
+	@ExcelProperty(value = "*商品名称")
+	private String goodsName;
+	/**
+	 * 共享成本
+	 */
+	@ExcelProperty(value = "*共享成本")
+	private BigDecimal shareCost;
+
+}

+ 34 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/share/dto/SharePutOnShelvesDTO.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.salesPart.share.dto;
+
+import org.springblade.salesPart.share.entity.SharePutOnShelves;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 轮胎商城-共享上架表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2025-01-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class SharePutOnShelvesDTO extends SharePutOnShelves {
+	private static final long serialVersionUID = 1L;
+
+}

+ 269 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/share/entity/SharePutOnShelves.java

@@ -0,0 +1,269 @@
+/*
+ *      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.salesPart.share.entity;
+
+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 2025-01-10
+ */
+@Data
+@TableName("pjpf_share_put_on_shelves")
+@ApiModel(value = "SharePutOnShelves对象", description = "轮胎商城-共享上架表")
+public class SharePutOnShelves implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键
+	 */
+	@ApiModelProperty(value = "主键")
+	private Long id;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private Long createUser;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private Long updateUser;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private Integer isDeleted;
+	/**
+	 * 租户id
+	 */
+	@ApiModelProperty(value = "租户id")
+	private String tenantId;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 商品id
+	 */
+	@ApiModelProperty(value = "商品id")
+	private Long goodsId;
+	/**
+	 * 商品编码
+	 */
+	@ApiModelProperty(value = "商品编码")
+	private String goodsCode;
+	/**
+	 * 名称
+	 */
+	@ApiModelProperty(value = "名称")
+	private String goodsName;
+	/**
+	 * 快捷商品查询
+	 */
+	@ApiModelProperty(value = "快捷商品查询")
+	private String goodsInt;
+	/**
+	 * 规格型号
+	 */
+	@ApiModelProperty(value = "规格型号")
+	private String specificationAndModel;
+	/**
+	 * 商品尺寸
+	 */
+	@ApiModelProperty(value = "商品尺寸")
+	private String goodsSize;
+	/**
+	 * 品牌id
+	 */
+	@ApiModelProperty(value = "品牌id")
+	private Long brandId;
+	/**
+	 * 品牌名称
+	 */
+	@ApiModelProperty(value = "品牌名称")
+	private String brandName;
+	/**
+	 * 商品描述
+	 */
+	@ApiModelProperty(value = "商品描述")
+	private String goodsDescription;
+	/**
+	 * 花纹
+	 */
+	@ApiModelProperty(value = "花纹")
+	private String brandItem;
+	/**
+	 * 产地
+	 */
+	@ApiModelProperty(value = "产地")
+	private String placeProduction;
+	/**
+	 * 防爆(0否,1是)
+	 */
+	@ApiModelProperty(value = "防爆(0否,1是)")
+	private Integer explosionProof;
+	/**
+	 * 原厂
+	 */
+	@ApiModelProperty(value = "原厂")
+	private String originalFactory;
+	/**
+	 * 自修补
+	 */
+	@ApiModelProperty(value = "自修补")
+	private String selfRecovery;
+	/**
+	 * 所属公司id
+	 */
+	@ApiModelProperty(value = "所属公司id")
+	private Long salesCompanyId;
+	/**
+	 * 所属公司名称
+	 */
+	@ApiModelProperty(value = "所属公司名称")
+	private String salesCompanyName;
+	/**
+	 * 库存
+	 */
+	@ApiModelProperty(value = "库存")
+	private BigDecimal inventory;
+	/**
+	 * 共享成本
+	 */
+	@ApiModelProperty(value = "共享成本")
+	private BigDecimal shareCost;
+	/**
+	 * 售价1
+	 */
+	@ApiModelProperty(value = "售价1")
+	private BigDecimal priceOne;
+	/**
+	 * 售价2
+	 */
+	@ApiModelProperty(value = "售价2")
+	private BigDecimal priceTwo;
+	/**
+	 * 售价3
+	 */
+	@ApiModelProperty(value = "售价3")
+	private BigDecimal priceThree;
+	/**
+	 * 售价4
+	 */
+	@ApiModelProperty(value = "售价4")
+	private BigDecimal priceFour;
+	/**
+	 * 来源上架id
+	 */
+	@ApiModelProperty(value = "来源上架id")
+	private Long productLaunchId;
+	/**
+	 * 来源共享id
+	 */
+	@ApiModelProperty(value = "来源共享id")
+	private Long srcSharedId;
+	/**
+	 * 来源租户
+	 */
+	@ApiModelProperty(value = "来源租户")
+	private String srcTenantId;
+	/**
+	 * 来源所属公司id
+	 */
+	@ApiModelProperty(value = "来源所属公司id")
+	private Long srcSalesCompanyId;
+	/**
+	 * 来源公司名称
+	 */
+	@ApiModelProperty(value = "来源公司名称")
+	private String srcSalesCompanyName;
+	/**
+	 * 共享状态  暂存 已共享 已确认
+	 */
+	@ApiModelProperty(value = "共享状态")
+	private String shareStatus;
+	/**
+	 * 来源商品id
+	 */
+	@ApiModelProperty(value = "来源商品id")
+	private Long srcGoodsId;
+	/**
+	 * 来源商品编码
+	 */
+	@ApiModelProperty(value = "来源商品编码")
+	private String srcGoodsCode;
+	/**
+	 * 来源商品名称
+	 */
+	@ApiModelProperty(value = "来源商品名称")
+	private String srcGoodsName;
+	/**
+	 * 来源品牌id
+	 */
+	@ApiModelProperty(value = "来源品牌id")
+	private Long srcBrandId;
+	/**
+	 * 来源品牌名称
+	 */
+	@ApiModelProperty(value = "来源品牌名称")
+	private String srcBrandName;
+	/**
+	 * 0 共享原单据,1共享单据
+	 */
+	@ApiModelProperty(value = "0 共享原单据,1共享单据")
+	private Integer billType;
+	/**
+	 * 共享公司
+	 */
+	@ApiModelProperty(value = "共享公司")
+	private String sharedCompany;
+	/**
+	 * 共享公司id
+	 */
+	@ApiModelProperty(value = "共享公司id")
+	private String sharedCompanyId;
+
+	/**
+	 * 商品图片
+	 */
+	@ApiModelProperty(value = "商品图片")
+	private String url;
+
+
+}

+ 36 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/share/vo/SharePutOnShelvesVO.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.salesPart.share.vo;
+
+import org.springblade.salesPart.share.entity.SharePutOnShelves;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 轮胎商城-共享上架表视图实体类
+ *
+ * @author BladeX
+ * @since 2025-01-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "SharePutOnShelvesVO对象", description = "轮胎商城-共享上架表")
+public class SharePutOnShelvesVO extends SharePutOnShelves {
+	private static final long serialVersionUID = 1L;
+
+}

+ 5 - 0
blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClient.java

@@ -80,6 +80,8 @@ public interface ISysClient {
 
 	String GET_TENANT_LIST = API_PREFIX + "/getTenantList";
 
+	String GET_DEPT_LIST_BY_NAMES = API_PREFIX + "/getDeptListByNames";
+
 
 	/**
 	 * 通过租户id获取全部租户别名
@@ -395,4 +397,7 @@ public interface ISysClient {
 
 	@GetMapping(GET_TENANT_LIST)
 	List<Tenant> getTenantList(@RequestParam(value = "tenantId", required = false) String tenantId);
+
+	@GetMapping(GET_DEPT_LIST_BY_NAMES)
+	List<Dept> getDeptListByNames(@RequestParam(value = "sharedCompany", required = false) String sharedCompany);
 }

+ 5 - 0
blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClientFallback.java

@@ -220,4 +220,9 @@ public class ISysClientFallback implements ISysClient {
 		return null;
 	}
 
+	@Override
+	public List<Dept> getDeptListByNames(String sharedCompany) {
+		return null;
+	}
+
 }

+ 85 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/productLaunch/controller/ProductLaunchController.java

@@ -842,4 +842,89 @@ public class ProductLaunchController extends BladeController {
 		return R.data(list);
 	}
 
+	/**
+	 * 共享上架获取上架管理商品
+	 */
+	@GetMapping("/shareGetProductLaunchList")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入productLaunch")
+	public R<IPage<PjProductLaunch>> shareGetProductLaunchList(PjProductLaunch productLaunch, Query query) {
+		LambdaQueryWrapper<PjProductLaunch> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(PjProductLaunch::getTenantId, AuthUtil.getTenantId())
+			.eq(PjProductLaunch::getIsDeleted, 0)
+			.eq(ObjectUtils.isNotNull(productLaunch.getBrandId()), PjProductLaunch::getBrandId, productLaunch.getBrandId())
+			.eq(PjProductLaunch::getWhetherIntegral, 0)
+			.like(ObjectUtils.isNotNull(productLaunch.getBrandItem()), PjProductLaunch::getBrandItem, productLaunch.getBrandItem())
+		;
+		if (ObjectUtils.isNotEmpty(productLaunch.getExplosionProof())
+			|| ObjectUtils.isNotEmpty(productLaunch.getOriginalFactory())
+			|| ObjectUtils.isNotEmpty(productLaunch.getSelfRecovery())) {
+			lambdaQueryWrapper.and(i -> i.eq(ObjectUtils.isNotEmpty(productLaunch.getExplosionProof()), PjProductLaunch::getExplosionProof, productLaunch.getExplosionProof())//防爆
+				.or().eq(ObjectUtils.isNotEmpty(productLaunch.getOriginalFactory()), PjProductLaunch::getOriginalFactory, productLaunch.getOriginalFactory())//原厂
+				.or().eq(ObjectUtils.isNotEmpty(productLaunch.getSelfRecovery()), PjProductLaunch::getSelfRecovery, productLaunch.getSelfRecovery())//自修补
+			);
+		}
+		lambdaQueryWrapper.like(ObjectUtils.isNotEmpty(productLaunch.getSpecificationAndModel()), PjProductLaunch::getSpecificationAndModel, productLaunch.getSpecificationAndModel())//规格型号
+			.eq(ObjectUtil.isNotEmpty(productLaunch.getUpAndDownShelves()), PjProductLaunch::getUpAndDownShelves, productLaunch.getUpAndDownShelves());//上下架
+		if (ObjectUtil.isNotEmpty(productLaunch.getCname())) {
+			if (productLaunch.getCname().contains(",")) {
+				String brandName = productLaunch.getCname().substring(0, productLaunch.getCname().indexOf(","));
+				String cname = productLaunch.getCname().substring(productLaunch.getCname().indexOf(",") + 1);
+				lambdaQueryWrapper.and(i -> i.like(PjProductLaunch::getCname, cname)
+					.or().like(PjProductLaunch::getCnameInt, cname)
+					.or().like(PjProductLaunch::getBrandItem, cname)
+					.or().like(PjProductLaunch::getSpecificationAndModel, cname)
+				);
+				lambdaQueryWrapper.like(PjProductLaunch::getBrandName, brandName);
+			} else {
+				String[] chineseWords = productLaunch.getCname().split("[^一-龥]");
+				if (chineseWords.length > 0) {
+					String cname = productLaunch.getCname().substring(chineseWords[0].length());
+					if (ObjectUtils.isNotNull(cname)) {
+						lambdaQueryWrapper.and(i -> i.like(PjProductLaunch::getCname, cname)
+							.or().like(PjProductLaunch::getCnameInt, cname)
+							.or().like(PjProductLaunch::getBrandItem, cname)
+							.or().like(PjProductLaunch::getSpecificationAndModel, cname)
+						);
+						lambdaQueryWrapper.like(PjProductLaunch::getBrandName, chineseWords[0]);
+					} else {
+						lambdaQueryWrapper.and(i -> i.like(PjProductLaunch::getCname, chineseWords[0])
+							.or().like(PjProductLaunch::getCnameInt, chineseWords[0])
+							.or().like(PjProductLaunch::getBrandItem, chineseWords[0])
+							.or().like(PjProductLaunch::getSpecificationAndModel, chineseWords[0])
+						);
+						lambdaQueryWrapper.like(PjProductLaunch::getBrandName, chineseWords[0]);
+					}
+				} else {
+					lambdaQueryWrapper.and(i -> i.like(PjProductLaunch::getCname, productLaunch.getCname())
+						.or().like(PjProductLaunch::getCnameInt, productLaunch.getCname())
+						.or().like(PjProductLaunch::getBrandItem, productLaunch.getCname())
+						.or().like(PjProductLaunch::getSpecificationAndModel, productLaunch.getCname())
+						.or().like(PjProductLaunch::getBrandName, productLaunch.getCname())
+					);
+				}
+			}
+		}
+		lambdaQueryWrapper.eq(PjProductLaunch::getSalesCompanyId, AuthUtil.getDeptId());
+		lambdaQueryWrapper.eq(PjProductLaunch::getWhetherShare, 0);
+		IPage<PjProductLaunch> pages = productLaunchService.page(Condition.getPage(query), lambdaQueryWrapper);
+		if (!pages.getRecords().isEmpty()) {
+			List<Long> goodsId = pages.getRecords().stream().map(PjProductLaunch::getGoodsId).distinct().collect(Collectors.toList());
+			List<PjGoodsDesc> goodsDescList = goodsDescService.list(new LambdaQueryWrapper<PjGoodsDesc>()
+				.eq(PjGoodsDesc::getTenantId, AuthUtil.getTenantId())
+				.eq(PjGoodsDesc::getIsDeleted, 0)
+				.in(PjGoodsDesc::getId, goodsId));
+			if (!goodsDescList.isEmpty()) {
+				for (PjProductLaunch item : pages.getRecords()) {
+					PjGoodsDesc goodsDesc = goodsDescList.stream().filter(e -> e.getId().equals(item.getGoodsId())).findFirst().orElse(null);
+					if (goodsDesc != null) {
+						item.setCode(goodsDesc.getCode());
+						item.setGoodsSize(goodsDesc.getGoodsSize());
+					}
+				}
+			}
+		}
+		return R.data(pages);
+	}
+
 }

+ 223 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/controller/SharePutOnShelvesController.java

@@ -0,0 +1,223 @@
+/*
+ *      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.salesPart.share.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.ObjectUtils;
+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.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.salesPart.entity.PjProductLaunch;
+import org.springblade.salesPart.excel.ProductLaunchImportExcel;
+import org.springblade.salesPart.excel.SharePutOnShelvesImportExcel;
+import org.springblade.salesPart.share.entity.SharePutOnShelves;
+import org.springblade.salesPart.share.service.ISharePutOnShelvesService;
+import org.springblade.salesPart.share.vo.SharePutOnShelvesVO;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 轮胎商城-共享上架表 控制器
+ *
+ * @author BladeX
+ * @since 2025-01-10
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/shareputonshelves")
+@Api(value = "轮胎商城-共享上架表", tags = "轮胎商城-共享上架表接口")
+public class SharePutOnShelvesController extends BladeController {
+
+	private final ISharePutOnShelvesService sharePutOnShelvesService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入sharePutOnShelves")
+	public R<SharePutOnShelves> detail(SharePutOnShelves sharePutOnShelves) {
+		SharePutOnShelves detail = sharePutOnShelvesService.getOne(Condition.getQueryWrapper(sharePutOnShelves));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 轮胎商城-共享上架表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入sharePutOnShelves")
+	public R<IPage<SharePutOnShelves>> list(SharePutOnShelves sharePutOnShelves, Query query) {
+		LambdaQueryWrapper<SharePutOnShelves> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(SharePutOnShelves::getTenantId, AuthUtil.getTenantId())
+			.eq(SharePutOnShelves::getIsDeleted, 0)
+			.eq(SharePutOnShelves::getSalesCompanyId, AuthUtil.getDeptId())
+			.eq(ObjectUtils.isNotNull(sharePutOnShelves.getExplosionProof()), SharePutOnShelves::getExplosionProof, sharePutOnShelves.getExplosionProof())
+			.eq(ObjectUtils.isNotNull(sharePutOnShelves.getOriginalFactory()), SharePutOnShelves::getOriginalFactory, sharePutOnShelves.getOriginalFactory())
+			.eq(ObjectUtils.isNotNull(sharePutOnShelves.getSelfRecovery()), SharePutOnShelves::getSelfRecovery, sharePutOnShelves.getSelfRecovery())
+			.and(ObjectUtils.isNotNull(sharePutOnShelves.getGoodsName()), i -> i.like(SharePutOnShelves::getGoodsName, sharePutOnShelves.getGoodsName())
+				.or().like(SharePutOnShelves::getGoodsInt, sharePutOnShelves.getGoodsName())
+				.or().like(SharePutOnShelves::getBrandItem, sharePutOnShelves.getGoodsName())
+				.or().like(SharePutOnShelves::getSpecificationAndModel, sharePutOnShelves.getGoodsName())
+				.or().like(SharePutOnShelves::getGoodsSize, sharePutOnShelves.getGoodsName())
+				.or().like(SharePutOnShelves::getGoodsCode, sharePutOnShelves.getGoodsName())
+			)
+			.like(ObjectUtils.isNotNull(sharePutOnShelves.getGoodsDescription()), SharePutOnShelves::getGoodsDescription, sharePutOnShelves.getGoodsDescription())
+			.like(ObjectUtils.isNotNull(sharePutOnShelves.getPlaceProduction()), SharePutOnShelves::getPlaceProduction, sharePutOnShelves.getPlaceProduction())
+			.like(ObjectUtils.isNotNull(sharePutOnShelves.getBrandName()), SharePutOnShelves::getBrandName, sharePutOnShelves.getBrandName())
+			.eq(ObjectUtils.isNotNull(sharePutOnShelves.getBillType()), SharePutOnShelves::getBillType, sharePutOnShelves.getBillType())
+			.eq(ObjectUtils.isNotNull(sharePutOnShelves.getShareStatus()), SharePutOnShelves::getShareStatus, sharePutOnShelves.getShareStatus())
+		;
+		IPage<SharePutOnShelves> pages = sharePutOnShelvesService.page(Condition.getPage(query), lambdaQueryWrapper);
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 轮胎商城-共享上架表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入sharePutOnShelves")
+	public R<IPage<SharePutOnShelvesVO>> page(SharePutOnShelvesVO sharePutOnShelves, Query query) {
+		IPage<SharePutOnShelvesVO> pages = sharePutOnShelvesService.selectSharePutOnShelvesPage(Condition.getPage(query), sharePutOnShelves);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 轮胎商城-共享上架表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入sharePutOnShelves")
+	public R save(@Valid @RequestBody SharePutOnShelves sharePutOnShelves) {
+		return R.status(sharePutOnShelvesService.save(sharePutOnShelves));
+	}
+
+	/**
+	 * 修改 轮胎商城-共享上架表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入sharePutOnShelves")
+	public R update(@Valid @RequestBody SharePutOnShelves sharePutOnShelves) {
+		return R.status(sharePutOnShelvesService.updateById(sharePutOnShelves));
+	}
+
+	/**
+	 * 新增或修改 轮胎商城-共享上架表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入sharePutOnShelves")
+	public R submit(@Valid @RequestBody SharePutOnShelves sharePutOnShelves) {
+		return R.status(sharePutOnShelvesService.saveOrUpdate(sharePutOnShelves));
+	}
+
+
+	/**
+	 * 删除 轮胎商城-共享上架表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return sharePutOnShelvesService.deleteByIds(Func.toLongList(ids));
+	}
+
+	/**
+	 * 共享商品导入共享上架
+	 */
+	@PostMapping("/shareProductLaunchImport")
+	public R shareProductLaunchImport(List<PjProductLaunch> pjProductLaunchList) {
+		return sharePutOnShelvesService.shareProductLaunchImport(pjProductLaunchList);
+	}
+
+	/**
+	 * 导出共享商品模板  Excel
+	 */
+	@GetMapping("/exportShareProductLaunch")
+	@ApiOperationSupport(order = 10)
+	@ApiOperation(value = "导出模板")
+	public void exportShareProductLaunch(HttpServletResponse response) {
+		List<SharePutOnShelvesImportExcel> list = new ArrayList<>();
+		ExcelUtil.export(response, "导入模板-共享上架", "导入数据表", list, SharePutOnShelvesImportExcel.class);
+	}
+
+	/**
+	 * 共享商品导入共享上架  Excel
+	 */
+	@PostMapping("/importShareProductLaunch")
+	@ApiOperationSupport(order = 9)
+	@ApiOperation(value = "导入共享上架信息", notes = "传入list")
+	public R importShareProductLaunch(MultipartFile file) {
+		List<SharePutOnShelvesImportExcel> excelList = ExcelUtil.read(file, SharePutOnShelvesImportExcel.class);
+		if (CollectionUtils.isEmpty(excelList)) {
+			throw new SecurityException("数据不能为空");
+		}
+		return sharePutOnShelvesService.importShareProductLaunch(excelList);
+	}
+
+	/**
+	 * 批量确认共享接口
+	 */
+	@GetMapping("/batchConfirmSharing")
+	public R batchConfirmSharing(@RequestParam("ids") String ids, @RequestParam("sharedCompany") String sharedCompany) {
+		return sharePutOnShelvesService.batchConfirmSharing(ids, sharedCompany);
+	}
+
+	/**
+	 * 批量撤销共享接口
+	 */
+	@GetMapping("/batchRevokeSharing")
+	public R batchRevokeSharing(@RequestParam("ids") String ids) {
+		return sharePutOnShelvesService.batchRevokeSharing(ids);
+	}
+
+	/**
+	 * 批量共享确认接口
+	 */
+	@GetMapping("/batchSharingConfirm")
+	public R batchSharingConfirm(@RequestParam("ids") String ids) {
+		return sharePutOnShelvesService.batchSharingConfirm(ids);
+	}
+
+	/**
+	 * 批量共享撤销接口
+	 */
+	@GetMapping("/batchSharingRevoke")
+	public R batchSharingRevoke(@RequestParam("ids") String ids) {
+		return sharePutOnShelvesService.batchSharingRevoke(ids);
+	}
+
+
+}

+ 46 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/mapper/SharePutOnShelvesMapper.java

@@ -0,0 +1,46 @@
+/*
+ *      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.salesPart.share.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.core.tenant.annotation.TenantIgnore;
+import org.springblade.salesPart.share.entity.SharePutOnShelves;
+import org.springblade.salesPart.share.vo.SharePutOnShelvesVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 轮胎商城-共享上架表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2025-01-10
+ */
+public interface SharePutOnShelvesMapper extends BaseMapper<SharePutOnShelves> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param sharePutOnShelves
+	 * @return
+	 */
+	List<SharePutOnShelvesVO> selectSharePutOnShelvesPage(IPage page, SharePutOnShelvesVO sharePutOnShelves);
+
+	@TenantIgnore
+	int deleteBySharedId(@Param("ids")String ids);
+}

+ 66 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/mapper/SharePutOnShelvesMapper.xml

@@ -0,0 +1,66 @@
+<?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.salesPart.share.mapper.SharePutOnShelvesMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="sharePutOnShelvesResultMap" type="org.springblade.salesPart.share.entity.SharePutOnShelves">
+        <id column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+        <result column="goods_id" property="goodsId"/>
+        <result column="goods_code" property="goodsCode"/>
+        <result column="goods_name" property="goodsName"/>
+        <result column="goods_int" property="goodsInt"/>
+        <result column="specification_and_model" property="specificationAndModel"/>
+        <result column="goods_size" property="goodsSize"/>
+        <result column="brand_id" property="brandId"/>
+        <result column="brand_name" property="brandName"/>
+        <result column="goods_description" property="goodsDescription"/>
+        <result column="brand_item" property="brandItem"/>
+        <result column="place_production" property="placeProduction"/>
+        <result column="explosion_proof" property="explosionProof"/>
+        <result column="original_factory" property="originalFactory"/>
+        <result column="self_recovery" property="selfRecovery"/>
+        <result column="sales_company_id" property="salesCompanyId"/>
+        <result column="sales_company_name" property="salesCompanyName"/>
+        <result column="inventory" property="inventory"/>
+        <result column="share_cost" property="shareCost"/>
+        <result column="price_one" property="priceOne"/>
+        <result column="price_two" property="priceTwo"/>
+        <result column="price_three" property="priceThree"/>
+        <result column="price_four" property="priceFour"/>
+        <result column="product_launch_id" property="productLaunchId"/>
+        <result column="src_tenant_id" property="srcTenantId"/>
+        <result column="src_sales_company_id" property="srcSalesCompanyId"/>
+        <result column="src_sales_company_name" property="srcSalesCompanyName"/>
+        <result column="share_status" property="shareStatus"/>
+        <result column="src_goods_id" property="srcGoodsId"/>
+        <result column="src_goods_code" property="srcGoodsCode"/>
+        <result column="src_goods_name" property="srcGoodsName"/>
+        <result column="src_brand_id" property="srcBrandId"/>
+        <result column="src_brand_name" property="srcBrandName"/>
+        <result column="bill_type" property="billType"/>
+        <result column="shared_company" property="sharedCompany"/>
+        <result column="shared_company_id" property="sharedCompanyId"/>
+        <result column="src_shared_id" property="srcSharedId"/>
+        <result column="url" property="url"/>
+    </resultMap>
+
+    <update id="deleteBySharedId">
+        update blade_dept set is_deleted = '1'
+        where is_deleted = 0
+        and id in
+        <foreach collection="array" item="ids" index="index" open="(" close=")" separator=",">
+            #{ids}
+        </foreach>
+    </update>
+
+    <select id="selectSharePutOnShelvesPage" resultMap="sharePutOnShelvesResultMap">
+        select * from pjpf_share_put_on_shelves where is_deleted = 0
+    </select>
+
+</mapper>

+ 59 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/service/ISharePutOnShelvesService.java

@@ -0,0 +1,59 @@
+/*
+ *      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.salesPart.share.service;
+
+import org.springblade.core.tool.api.R;
+import org.springblade.salesPart.entity.PjProductLaunch;
+import org.springblade.salesPart.excel.SharePutOnShelvesImportExcel;
+import org.springblade.salesPart.share.entity.SharePutOnShelves;
+import org.springblade.salesPart.share.vo.SharePutOnShelvesVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 轮胎商城-共享上架表 服务类
+ *
+ * @author BladeX
+ * @since 2025-01-10
+ */
+public interface ISharePutOnShelvesService extends IService<SharePutOnShelves> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param sharePutOnShelves
+	 * @return
+	 */
+	IPage<SharePutOnShelvesVO> selectSharePutOnShelvesPage(IPage<SharePutOnShelvesVO> page, SharePutOnShelvesVO sharePutOnShelves);
+
+	R shareProductLaunchImport(List<PjProductLaunch> pjProductLaunchList);
+
+	R deleteByIds(List<Long> longList);
+
+	R batchConfirmSharing(String ids, String sharedCompany);
+
+	R batchRevokeSharing(String ids);
+
+	R batchSharingConfirm(String ids);
+
+	R batchSharingRevoke(String ids);
+
+	R importShareProductLaunch(List<SharePutOnShelvesImportExcel> excelList);
+}

+ 645 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/service/impl/SharePutOnShelvesServiceImpl.java

@@ -0,0 +1,645 @@
+/*
+ *      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.salesPart.share.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.AllArgsConstructor;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.salesPart.brand.service.IBrandDescService;
+import org.springblade.salesPart.brand.service.IBrandFigureService;
+import org.springblade.salesPart.brand.service.IBrandFilesService;
+import org.springblade.salesPart.entity.*;
+import org.springblade.salesPart.excel.SharePutOnShelvesImportExcel;
+import org.springblade.salesPart.goods.service.IGoodsDescService;
+import org.springblade.salesPart.productLaunch.service.IProductLaunchFilesService;
+import org.springblade.salesPart.productLaunch.service.IProductLaunchService;
+import org.springblade.salesPart.share.entity.SharePutOnShelves;
+import org.springblade.salesPart.share.mapper.SharePutOnShelvesMapper;
+import org.springblade.salesPart.share.service.ISharePutOnShelvesService;
+import org.springblade.salesPart.share.vo.SharePutOnShelvesVO;
+import org.springblade.system.entity.Dept;
+import org.springblade.system.feign.ISysClient;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 轮胎商城-共享上架表 服务实现类
+ *
+ * @author BladeX
+ * @since 2025-01-10
+ */
+@Service
+@AllArgsConstructor
+public class SharePutOnShelvesServiceImpl extends ServiceImpl<SharePutOnShelvesMapper, SharePutOnShelves> implements ISharePutOnShelvesService {
+
+
+	private final IProductLaunchService productLaunchService;
+
+	private final IGoodsDescService goodsDescService;
+
+	private final ISysClient iSysClient;
+
+	private final IBrandDescService brandDescService;
+
+	private final IProductLaunchFilesService productLaunchFilesService;
+
+	private final IBrandFilesService brandFilesService;
+
+	private final IBrandFigureService brandFigureService;
+
+	@Override
+	public IPage<SharePutOnShelvesVO> selectSharePutOnShelvesPage(IPage<SharePutOnShelvesVO> page, SharePutOnShelvesVO sharePutOnShelves) {
+		return page.setRecords(baseMapper.selectSharePutOnShelvesPage(page, sharePutOnShelves));
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public R shareProductLaunchImport(List<PjProductLaunch> pjProductLaunchList) {
+		if (pjProductLaunchList.isEmpty()) {
+			throw new RuntimeException("请选择导入共享商品");
+		}
+		List<PjProductLaunchFiles> pjProductLaunchFilesList = new ArrayList<>();
+		List<PjBrandFiles> pjBrandFilesList = new ArrayList<>();
+		List<BrandFigure> brandFigureList = new ArrayList<>();
+		List<Long> ids = pjProductLaunchList.stream().map(PjProductLaunch::getId).collect(Collectors.toList());
+		List<Long> brandIds = pjProductLaunchList.stream().map(PjProductLaunch::getBrandId).collect(Collectors.toList());
+		if (!ids.isEmpty()) {
+			pjProductLaunchFilesList = productLaunchFilesService.list(new QueryWrapper<PjProductLaunchFiles>()
+				.in("pid", ids).eq("is_deleted", 0));
+		}
+		if (!brandIds.isEmpty()) {
+			pjBrandFilesList = brandFilesService.list(new QueryWrapper<PjBrandFiles>()
+				.in("pid", brandIds).eq("is_deleted", 0));
+			brandFigureList = brandFigureService.list(new QueryWrapper<BrandFigure>()
+				.in("pid", brandIds).eq("is_deleted", 0));
+		}
+
+		List<SharePutOnShelves> sharePutOnShelvesList = new ArrayList<>();
+		for (PjProductLaunch item : pjProductLaunchList) {
+			item.setWhetherShare(1);
+			if (!pjProductLaunchFilesList.isEmpty()) {
+				List<PjProductLaunchFiles> list = pjProductLaunchFilesList.stream().filter(e -> e.getPid().equals(item.getId())).collect(Collectors.toList());
+				if (!list.isEmpty()) {
+					item.setFilesList(list);
+				} else {
+					if (ObjectUtils.isNotNull(item.getBrandId())) {
+						if (!brandFigureList.isEmpty()) {
+							List<BrandFigure> brandFigureList1 = brandFigureList.stream()
+								.filter(e -> e.getPid().equals(item.getBrandId()) && e.getFigure().equals(item.getBrandItem()))
+								.collect(Collectors.toList());
+							if (!brandFigureList1.isEmpty()) {
+								item.setFilesList(BeanUtil.copy(brandFigureList1, PjProductLaunchFiles.class));
+							} else {
+								if (!pjBrandFilesList.isEmpty()) {
+									List<PjBrandFiles> pjBarndFilesList1 = pjBrandFilesList.stream()
+										.filter(e -> e.getPid().equals(item.getBrandId()))
+										.collect(Collectors.toList());
+									if (!pjBarndFilesList1.isEmpty()) {
+										item.setFilesList(BeanUtil.copy(pjBarndFilesList1, PjProductLaunchFiles.class));
+									}
+								}
+							}
+						} else {
+							if (!pjBrandFilesList.isEmpty()) {
+								List<PjBrandFiles> pjBarndFilesList1 = pjBrandFilesList.stream()
+									.filter(e -> e.getPid().equals(item.getBrandId()))
+									.collect(Collectors.toList());
+								if (!pjBarndFilesList1.isEmpty()) {
+									item.setFilesList(BeanUtil.copy(pjBarndFilesList1, PjProductLaunchFiles.class));
+								}
+							}
+						}
+					}
+				}
+			} else {
+				if (ObjectUtils.isNotNull(item.getBrandId())) {
+					if (!brandFigureList.isEmpty()) {
+						List<BrandFigure> brandFigureList1 = brandFigureList.stream()
+							.filter(e -> e.getPid().equals(item.getBrandId()) && e.getFigure().equals(item.getBrandItem()))
+							.collect(Collectors.toList());
+						if (!brandFigureList1.isEmpty()) {
+							item.setFilesList(BeanUtil.copy(brandFigureList1, PjProductLaunchFiles.class));
+						} else {
+							if (!pjBrandFilesList.isEmpty()) {
+								List<PjBrandFiles> pjBarndFilesList1 = pjBrandFilesList.stream()
+									.filter(e -> e.getPid().equals(item.getBrandId()))
+									.collect(Collectors.toList());
+								if (!pjBarndFilesList1.isEmpty()) {
+									item.setFilesList(BeanUtil.copy(pjBarndFilesList1, PjProductLaunchFiles.class));
+								}
+							}
+						}
+					} else {
+						if (!pjBrandFilesList.isEmpty()) {
+							List<PjBrandFiles> pjBarndFilesList1 = pjBrandFilesList.stream()
+								.filter(e -> e.getPid().equals(item.getBrandId()))
+								.collect(Collectors.toList());
+							if (!pjBarndFilesList1.isEmpty()) {
+								item.setFilesList(BeanUtil.copy(pjBarndFilesList1, PjProductLaunchFiles.class));
+							}
+						}
+					}
+				}
+			}
+			SharePutOnShelves sharePutOnShelves = new SharePutOnShelves();
+			sharePutOnShelves.setCreateUser(AuthUtil.getUserId());
+			sharePutOnShelves.setCreateTime(new Date());
+			sharePutOnShelves.setTenantId(AuthUtil.getTenantId());
+			sharePutOnShelves.setGoodsId(item.getGoodsId());
+			sharePutOnShelves.setGoodsCode(item.getCode());
+			sharePutOnShelves.setGoodsName(item.getCname());
+			sharePutOnShelves.setGoodsInt(item.getCnameInt());
+			sharePutOnShelves.setSpecificationAndModel(item.getSpecificationAndModel());
+			sharePutOnShelves.setGoodsSize(item.getGoodsSize());
+			sharePutOnShelves.setBrandId(item.getBrandId());
+			sharePutOnShelves.setBrandName(item.getBrandName());
+			sharePutOnShelves.setGoodsDescription(item.getDetailsText());
+			sharePutOnShelves.setBrandItem(item.getBrandItem());
+			sharePutOnShelves.setPlaceProduction(item.getPlaceProduction());
+			sharePutOnShelves.setExplosionProof(item.getExplosionProof());
+			sharePutOnShelves.setOriginalFactory(item.getOriginalFactory());
+			sharePutOnShelves.setSelfRecovery(item.getSelfRecovery());
+			sharePutOnShelves.setSalesCompanyId(item.getSalesCompanyId());
+			sharePutOnShelves.setSalesCompanyName(item.getSalesCompanyName());
+			sharePutOnShelves.setInventory(item.getInventory());
+			sharePutOnShelves.setShareCost(item.getShareCost());
+			sharePutOnShelves.setPriceOne(item.getPriceOne());
+			sharePutOnShelves.setPriceTwo(item.getPriceTwo());
+			sharePutOnShelves.setPriceThree(item.getPriceThree());
+			sharePutOnShelves.setPriceFour(item.getPriceFour());
+			sharePutOnShelves.setProductLaunchId(item.getId());
+			sharePutOnShelves.setSrcTenantId(item.getTenantId());
+			sharePutOnShelves.setSrcSalesCompanyId(item.getSalesCompanyId());
+			sharePutOnShelves.setSrcSalesCompanyName(item.getSourceCompanyName());
+			sharePutOnShelves.setSrcGoodsId(item.getGoodsId());
+			sharePutOnShelves.setSrcGoodsCode(item.getCode());
+			sharePutOnShelves.setSrcGoodsName(item.getCname());
+			sharePutOnShelves.setSrcBrandId(item.getBrandId());
+			sharePutOnShelves.setSrcBrandName(item.getBrandName());
+			sharePutOnShelves.setBillType(0);
+			if (ObjectUtils.isNotNull(item.getFilesList()) && !item.getFilesList().isEmpty()) {
+				sharePutOnShelves.setUrl(item.getFilesList().get(0).getUrl());
+			}
+			sharePutOnShelvesList.add(sharePutOnShelves);
+		}
+		productLaunchService.updateBatchById(pjProductLaunchList);
+		this.saveOrUpdateBatch(sharePutOnShelvesList);
+		return R.data(sharePutOnShelvesList);
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public R deleteByIds(List<Long> idList) {
+		List<SharePutOnShelves> sharePutOnShelvesList = baseMapper.selectList(new LambdaQueryWrapper<SharePutOnShelves>()
+			.in(SharePutOnShelves::getId, idList)
+			.eq(SharePutOnShelves::getTenantId, AuthUtil.getTenantId())
+			.eq(SharePutOnShelves::getIsDeleted, 0));
+		List<Long> productLaunchId = new ArrayList<>();
+		for (SharePutOnShelves item : sharePutOnShelvesList) {
+			if (0 == item.getBillType() && !"暂存".equals(item.getShareStatus())) {
+				throw new RuntimeException("商品:" + item.getGoodsName() + "已共享,请先取消共享后在操作");
+			} else if (1 == item.getBillType()) {
+				throw new RuntimeException("商品:" + item.getGoodsName() + "为共享商品,删除失败");
+			} else {
+				productLaunchId.add(item.getProductLaunchId());
+			}
+		}
+		if (!productLaunchId.isEmpty()) {
+			List<PjProductLaunch> productLaunchList = productLaunchService.list(new LambdaQueryWrapper<PjProductLaunch>()
+				.eq(PjProductLaunch::getIsDeleted, 0)
+				.eq(PjProductLaunch::getTenantId, AuthUtil.getTenantId())
+				.in(PjProductLaunch::getId, productLaunchId));
+			if (!productLaunchList.isEmpty()) {
+				for (PjProductLaunch item : productLaunchList) {
+					item.setWhetherShare(0);
+				}
+				productLaunchService.updateBatchById(productLaunchList);
+			}
+		}
+		baseMapper.deleteBatchIds(idList);
+		return R.success("操作成功");
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public R batchConfirmSharing(String ids, String sharedCompany) {
+		List<SharePutOnShelves> sharePutOnShelvesList = baseMapper.selectList(new LambdaQueryWrapper<SharePutOnShelves>()
+			.eq(SharePutOnShelves::getTenantId, AuthUtil.getTenantId())
+			.eq(SharePutOnShelves::getIsDeleted, 0)
+			.apply("find_in_set(id,'" + ids + "')"));
+		if (sharePutOnShelvesList.isEmpty()) {
+			throw new RuntimeException("请选择共享商品");
+		}
+		List<Dept> deptList = iSysClient.getDeptListByNames(sharedCompany);
+		if (deptList.isEmpty()) {
+			throw new RuntimeException("请选择共享公司");
+		}
+		List<SharePutOnShelves> sharePutOnShelves = new ArrayList<>();
+		for (Dept deptItem : deptList) {
+			for (SharePutOnShelves item : sharePutOnShelvesList) {
+				if (0 != item.getBillType()) {
+					throw new RuntimeException(item.getGoodsName() + "商品为被共享商品,共享失败");
+				}
+				item.setShareStatus("已共享");
+				SharePutOnShelves shelves = new SharePutOnShelves();
+				shelves.setShareStatus("暂存");
+				shelves.setTenantId(deptItem.getTenantId());
+				shelves.setGoodsCode(item.getGoodsCode());
+				shelves.setGoodsName(item.getGoodsName());
+				shelves.setGoodsInt(item.getGoodsInt());
+				shelves.setSpecificationAndModel(item.getSpecificationAndModel());
+				shelves.setGoodsSize(item.getGoodsSize());
+				shelves.setBrandName(item.getBrandName());
+				shelves.setGoodsDescription(item.getGoodsDescription());
+				shelves.setBrandItem(item.getBrandItem());
+				shelves.setPlaceProduction(item.getPlaceProduction());
+				shelves.setExplosionProof(item.getExplosionProof());
+				shelves.setOriginalFactory(item.getOriginalFactory());
+				shelves.setSelfRecovery(item.getSelfRecovery());
+				shelves.setSalesCompanyId(deptItem.getId());
+				shelves.setSalesCompanyName(deptItem.getDeptName());
+				shelves.setInventory(item.getInventory());
+				shelves.setShareCost(item.getShareCost());
+				shelves.setPriceOne(item.getPriceOne());
+				shelves.setPriceTwo(item.getPriceTwo());
+				shelves.setPriceThree(item.getPriceThree());
+				shelves.setPriceFour(item.getPriceFour());
+				shelves.setProductLaunchId(item.getProductLaunchId());
+				shelves.setSrcTenantId(item.getSrcTenantId());
+				shelves.setSrcSalesCompanyId(item.getSrcSalesCompanyId());
+				shelves.setSrcSalesCompanyName(item.getSrcSalesCompanyName());
+				shelves.setSrcGoodsId(item.getGoodsId());
+				shelves.setSrcGoodsCode(item.getGoodsCode());
+				shelves.setSrcGoodsName(item.getGoodsName());
+				shelves.setSrcBrandId(item.getBrandId());
+				shelves.setSrcBrandName(item.getBrandName());
+				shelves.setBillType(1);
+				shelves.setSrcSharedId(item.getId());
+				shelves.setUrl(item.getUrl());
+				sharePutOnShelves.add(shelves);
+			}
+		}
+		this.updateBatchById(sharePutOnShelvesList);
+		if (!sharePutOnShelves.isEmpty()) {
+			this.saveBatch(sharePutOnShelves);
+		}
+		return R.success("操作成功");
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public R batchRevokeSharing(String ids) {
+		List<SharePutOnShelves> sharePutOnShelvesList = baseMapper.selectList(new LambdaQueryWrapper<SharePutOnShelves>()
+			.eq(SharePutOnShelves::getTenantId, AuthUtil.getTenantId())
+			.eq(SharePutOnShelves::getIsDeleted, 0)
+			.apply("find_in_set(id,'" + ids + "')"));
+		if (sharePutOnShelvesList.isEmpty()) {
+			throw new RuntimeException("请选择撤销共享商品");
+		}
+		for (SharePutOnShelves item : sharePutOnShelvesList) {
+			if (0 != item.getBillType()) {
+				throw new RuntimeException(item.getGoodsName() + "商品为被共享商品,撤销失败");
+			}
+			item.setShareStatus("暂存");
+		}
+		this.updateBatchById(sharePutOnShelvesList);
+		baseMapper.deleteBySharedId(ids);
+		return R.success("操作成功");
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public R batchSharingConfirm(String ids) {
+		List<SharePutOnShelves> sharePutOnShelvesList = baseMapper.selectList(new LambdaQueryWrapper<SharePutOnShelves>()
+			.eq(SharePutOnShelves::getTenantId, AuthUtil.getTenantId())
+			.eq(SharePutOnShelves::getIsDeleted, 0)
+			.apply("find_in_set(id,'" + ids + "')"));
+		if (sharePutOnShelvesList.isEmpty()) {
+			throw new RuntimeException("请选择商品");
+		}
+		String goodsCode = sharePutOnShelvesList.stream().map(SharePutOnShelves::getSrcGoodsCode).distinct().collect(Collectors.joining(","));
+		String brandName = sharePutOnShelvesList.stream().map(SharePutOnShelves::getSrcBrandName).distinct().collect(Collectors.joining(","));
+		List<PjGoodsDesc> goodsDescList = goodsDescService.list(new LambdaQueryWrapper<PjGoodsDesc>()
+			.eq(PjGoodsDesc::getIsDeleted, 0)
+			.eq(PjGoodsDesc::getTenantId, AuthUtil.getTenantId())
+			.apply("find_in_set(code,'" + goodsCode + "')"));
+		List<PjBrandDesc> brandDescList = brandDescService.list(new LambdaQueryWrapper<PjBrandDesc>()
+			.eq(PjBrandDesc::getIsDeleted, 0)
+			.eq(PjBrandDesc::getTenantId, AuthUtil.getTenantId())
+			.apply("find_in_set(cname,'" + brandName + "')"));
+
+		List<PjBrandDesc> brandDescListNew = new ArrayList<>();
+		for (SharePutOnShelves item : sharePutOnShelvesList) {
+			if (0 == item.getBillType()) {
+				throw new RuntimeException(item.getGoodsName() + "商品为共享商品,上架失败");
+			}
+			//品牌
+			PjBrandDesc brandDescSave = new PjBrandDesc();
+			brandDescSave.setCreateUser(AuthUtil.getUserId());
+			brandDescSave.setCreateDept(Long.parseLong(AuthUtil.getDeptId()));
+			brandDescSave.setCreateTime(new Date());
+			brandDescSave.setEnableOrNot(1);
+			brandDescSave.setCname(item.getSrcBrandName());
+			brandDescSave.setSalesCompanyId(item.getSalesCompanyId());
+			brandDescSave.setSalesCompanyName(item.getSalesCompanyName());
+			brandDescSave.setType("PP");
+			brandDescSave.setSort(1);
+			brandDescSave.setWhetherIntegral("0");
+			if (!brandDescList.isEmpty()) {
+				PjBrandDesc brandDesc = brandDescList.stream().filter(e -> e.getCname().equals(item.getSrcBrandName())).findFirst().orElse(null);
+				if (brandDesc == null) {
+					brandDescListNew.add(brandDescSave);
+				}
+			} else {
+				brandDescListNew.add(brandDescSave);
+			}
+		}
+		if (!brandDescListNew.isEmpty()) {
+			brandDescService.saveBatch(brandDescListNew);
+			if (!brandDescList.isEmpty()) {
+				brandDescList.addAll(brandDescListNew);
+			} else {
+				brandDescList = brandDescListNew;
+			}
+		}
+		List<PjGoodsDesc> goodsDescListNew = new ArrayList<>();
+		for (SharePutOnShelves item : sharePutOnShelvesList) {
+			//商品
+			PjGoodsDesc goodsDesc = new PjGoodsDesc();
+			goodsDesc.setCreateUser(AuthUtil.getUserId());
+			goodsDesc.setCreateDept(Long.parseLong(AuthUtil.getDeptId()));
+			goodsDesc.setCreateTime(new Date());
+			goodsDesc.setCode(item.getSrcGoodsCode());
+			goodsDesc.setCname(item.getSrcGoodsName());
+			PjBrandDesc brandDesc = brandDescList.stream().filter(e -> e.getCname().equals(item.getSrcBrandName())).findFirst().orElse(null);
+			if (brandDesc != null) {
+				goodsDesc.setBrandId(brandDesc.getId());
+				goodsDesc.setBrandName(brandDesc.getCname());
+			}
+			goodsDesc.setSpecificationAndModel(item.getSpecificationAndModel());
+			goodsDesc.setBrandItem(item.getBrandItem());
+			goodsDesc.setPlaceProduction(item.getPlaceProduction());
+			goodsDesc.setCnameInt(item.getGoodsInt());
+			goodsDesc.setEnableOrNot(1);
+			goodsDesc.setGoodsDescription(item.getGoodsDescription());
+			goodsDesc.setSalesCompanyId(item.getSalesCompanyId());
+			goodsDesc.setSalesCompanyName(item.getSalesCompanyName());
+			goodsDesc.setExplosionProof(item.getExplosionProof());
+			goodsDesc.setOriginalFactory(item.getOriginalFactory());
+			goodsDesc.setSelfRecovery(item.getSelfRecovery());
+			goodsDesc.setWhetherIntegral("0");
+			goodsDesc.setGoodsSize(item.getGoodsSize());
+			if (!goodsDescList.isEmpty()) {
+				PjGoodsDesc goodsDetail = goodsDescList.stream().filter(e -> e.getCode().equals(item.getSrcGoodsCode())).findFirst().orElse(null);
+				if (goodsDetail == null) {
+					goodsDescListNew.add(goodsDesc);
+				}
+			} else {
+				goodsDescListNew.add(goodsDesc);
+			}
+		}
+		if (!goodsDescListNew.isEmpty()) {
+			goodsDescService.saveBatch(goodsDescListNew);
+			if (!goodsDescList.isEmpty()) {
+				goodsDescList.addAll(goodsDescListNew);
+			} else {
+				goodsDescList = goodsDescListNew;
+			}
+		}
+		for (SharePutOnShelves item : sharePutOnShelvesList) {
+			item.setShareStatus("已确认");
+			item.setUpdateTime(new Date());
+			item.setUpdateUser(AuthUtil.getUserId());
+			if (!brandDescList.isEmpty()) {
+				PjBrandDesc brandDesc = brandDescList.stream().filter(e -> e.getCname().equals(item.getSrcBrandName())).findFirst().orElse(null);
+				if (brandDesc != null) {
+					item.setBrandId(brandDesc.getId());
+					item.setBrandName(brandDesc.getCname());
+				} else {
+					throw new RuntimeException("品牌:" + item.getSrcBrandName() + "数据错误,请联系管理员");
+				}
+			} else {
+				throw new RuntimeException("品牌:" + item.getSrcBrandName() + "数据错误,请联系管理员");
+			}
+			if (!goodsDescList.isEmpty()) {
+				PjGoodsDesc goodsDesc = goodsDescList.stream().filter(e -> e.getCode().equals(item.getSrcGoodsCode())).findFirst().orElse(null);
+				if (goodsDesc != null) {
+					item.setGoodsId(goodsDesc.getId());
+					item.setGoodsCode(goodsDesc.getCode());
+					item.setGoodsName(goodsDesc.getCname());
+					item.setGoodsInt(goodsDesc.getCnameInt());
+					item.setSpecificationAndModel(goodsDesc.getSpecificationAndModel());
+					item.setGoodsSize(goodsDesc.getGoodsSize());
+					item.setGoodsDescription(goodsDesc.getGoodsDescription());
+					item.setBrandItem(goodsDesc.getBrandItem());
+					item.setPlaceProduction(goodsDesc.getPlaceProduction());
+					item.setExplosionProof(goodsDesc.getExplosionProof());
+					item.setOriginalFactory(goodsDesc.getOriginalFactory());
+				} else {
+					throw new RuntimeException("商品编码:" + item.getSrcGoodsCode() + "数据错误,请联系管理员");
+				}
+			} else {
+				throw new RuntimeException("商品编码:" + item.getSrcGoodsCode() + "数据错误,请联系管理员");
+			}
+		}
+		this.updateBatchById(sharePutOnShelvesList);
+		return R.success("操作成功");
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public R batchSharingRevoke(String ids) {
+		List<SharePutOnShelves> sharePutOnShelvesList = baseMapper.selectList(new LambdaQueryWrapper<SharePutOnShelves>()
+			.eq(SharePutOnShelves::getTenantId, AuthUtil.getTenantId())
+			.eq(SharePutOnShelves::getIsDeleted, 0)
+			.apply("find_in_set(id,'" + ids + "')"));
+		if (sharePutOnShelvesList.isEmpty()) {
+			throw new RuntimeException("请选择撤销商品");
+		}
+		for (SharePutOnShelves item : sharePutOnShelvesList) {
+			if (0 == item.getBillType()) {
+				throw new RuntimeException(item.getGoodsName() + "商品为共享商品,撤销失败");
+			}
+			item.setShareStatus("暂存");
+			item.setUpdateTime(new Date());
+			item.setUpdateUser(AuthUtil.getUserId());
+		}
+		this.updateBatchById(sharePutOnShelvesList);
+		return R.success("操作成功");
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public R importShareProductLaunch(List<SharePutOnShelvesImportExcel> excelList) {
+		String goodsName = excelList.stream().map(SharePutOnShelvesImportExcel::getGoodsName).collect(Collectors.joining(","));
+		List<PjProductLaunch> pjProductLaunchList = productLaunchService.list(new LambdaQueryWrapper<PjProductLaunch>()
+			.eq(PjProductLaunch::getTenantId, AuthUtil.getTenantId())
+			.eq(PjProductLaunch::getIsDeleted, 0)
+			.eq(PjProductLaunch::getWhetherIntegral, "0")
+			.eq(PjProductLaunch::getUpAndDownShelves, 1)
+			.apply("find_in_set(cname,'" + goodsName + "')"));
+		if (pjProductLaunchList.isEmpty()) {
+			throw new RuntimeException("未查到上架数据");
+		}
+		List<PjProductLaunchFiles> pjProductLaunchFilesList = new ArrayList<>();
+		List<PjBrandFiles> pjBrandFilesList = new ArrayList<>();
+		List<BrandFigure> brandFigureList = new ArrayList<>();
+		List<Long> ids = pjProductLaunchList.stream().map(PjProductLaunch::getId).collect(Collectors.toList());
+		List<Long> brandIds = pjProductLaunchList.stream().map(PjProductLaunch::getBrandId).collect(Collectors.toList());
+		if (!ids.isEmpty()) {
+			pjProductLaunchFilesList = productLaunchFilesService.list(new QueryWrapper<PjProductLaunchFiles>()
+				.in("pid", ids).eq("is_deleted", 0));
+		}
+		if (!brandIds.isEmpty()) {
+			pjBrandFilesList = brandFilesService.list(new QueryWrapper<PjBrandFiles>()
+				.in("pid", brandIds).eq("is_deleted", 0));
+			brandFigureList = brandFigureService.list(new QueryWrapper<BrandFigure>()
+				.in("pid", brandIds).eq("is_deleted", 0));
+		}
+
+		List<SharePutOnShelves> sharePutOnShelvesList = new ArrayList<>();
+		List<PjProductLaunch> pjProductLaunchListNew = new ArrayList<>();
+		for (SharePutOnShelvesImportExcel excel : excelList) {
+			PjProductLaunch item = pjProductLaunchList.stream().filter(e -> e.getCname().equals(excel.getGoodsName())).findFirst().orElse(null);
+			if (item != null) {
+				item.setWhetherShare(1);
+				if (!pjProductLaunchFilesList.isEmpty()) {
+					List<PjProductLaunchFiles> list = pjProductLaunchFilesList.stream().filter(e -> e.getPid().equals(item.getId())).collect(Collectors.toList());
+					if (!list.isEmpty()) {
+						item.setFilesList(list);
+					} else {
+						if (ObjectUtils.isNotNull(item.getBrandId())) {
+							if (!brandFigureList.isEmpty()) {
+								List<BrandFigure> brandFigureList1 = brandFigureList.stream()
+									.filter(e -> e.getPid().equals(item.getBrandId()) && e.getFigure().equals(item.getBrandItem()))
+									.collect(Collectors.toList());
+								if (!brandFigureList1.isEmpty()) {
+									item.setFilesList(BeanUtil.copy(brandFigureList1, PjProductLaunchFiles.class));
+								} else {
+									if (!pjBrandFilesList.isEmpty()) {
+										List<PjBrandFiles> pjBarndFilesList1 = pjBrandFilesList.stream()
+											.filter(e -> e.getPid().equals(item.getBrandId()))
+											.collect(Collectors.toList());
+										if (!pjBarndFilesList1.isEmpty()) {
+											item.setFilesList(BeanUtil.copy(pjBarndFilesList1, PjProductLaunchFiles.class));
+										}
+									}
+								}
+							} else {
+								if (!pjBrandFilesList.isEmpty()) {
+									List<PjBrandFiles> pjBarndFilesList1 = pjBrandFilesList.stream()
+										.filter(e -> e.getPid().equals(item.getBrandId()))
+										.collect(Collectors.toList());
+									if (!pjBarndFilesList1.isEmpty()) {
+										item.setFilesList(BeanUtil.copy(pjBarndFilesList1, PjProductLaunchFiles.class));
+									}
+								}
+							}
+						}
+					}
+				} else {
+					if (ObjectUtils.isNotNull(item.getBrandId())) {
+						if (!brandFigureList.isEmpty()) {
+							List<BrandFigure> brandFigureList1 = brandFigureList.stream()
+								.filter(e -> e.getPid().equals(item.getBrandId()) && e.getFigure().equals(item.getBrandItem()))
+								.collect(Collectors.toList());
+							if (!brandFigureList1.isEmpty()) {
+								item.setFilesList(BeanUtil.copy(brandFigureList1, PjProductLaunchFiles.class));
+							} else {
+								if (!pjBrandFilesList.isEmpty()) {
+									List<PjBrandFiles> pjBarndFilesList1 = pjBrandFilesList.stream()
+										.filter(e -> e.getPid().equals(item.getBrandId()))
+										.collect(Collectors.toList());
+									if (!pjBarndFilesList1.isEmpty()) {
+										item.setFilesList(BeanUtil.copy(pjBarndFilesList1, PjProductLaunchFiles.class));
+									}
+								}
+							}
+						} else {
+							if (!pjBrandFilesList.isEmpty()) {
+								List<PjBrandFiles> pjBarndFilesList1 = pjBrandFilesList.stream()
+									.filter(e -> e.getPid().equals(item.getBrandId()))
+									.collect(Collectors.toList());
+								if (!pjBarndFilesList1.isEmpty()) {
+									item.setFilesList(BeanUtil.copy(pjBarndFilesList1, PjProductLaunchFiles.class));
+								}
+							}
+						}
+					}
+				}
+				SharePutOnShelves sharePutOnShelves = new SharePutOnShelves();
+				sharePutOnShelves.setCreateUser(AuthUtil.getUserId());
+				sharePutOnShelves.setCreateTime(new Date());
+				sharePutOnShelves.setTenantId(AuthUtil.getTenantId());
+				sharePutOnShelves.setGoodsId(item.getGoodsId());
+				sharePutOnShelves.setGoodsCode(item.getCode());
+				sharePutOnShelves.setGoodsName(item.getCname());
+				sharePutOnShelves.setGoodsInt(item.getCnameInt());
+				sharePutOnShelves.setSpecificationAndModel(item.getSpecificationAndModel());
+				sharePutOnShelves.setGoodsSize(item.getGoodsSize());
+				sharePutOnShelves.setBrandId(item.getBrandId());
+				sharePutOnShelves.setBrandName(item.getBrandName());
+				sharePutOnShelves.setGoodsDescription(item.getDetailsText());
+				sharePutOnShelves.setBrandItem(item.getBrandItem());
+				sharePutOnShelves.setPlaceProduction(item.getPlaceProduction());
+				sharePutOnShelves.setExplosionProof(item.getExplosionProof());
+				sharePutOnShelves.setOriginalFactory(item.getOriginalFactory());
+				sharePutOnShelves.setSelfRecovery(item.getSelfRecovery());
+				sharePutOnShelves.setSalesCompanyId(item.getSalesCompanyId());
+				sharePutOnShelves.setSalesCompanyName(item.getSalesCompanyName());
+				sharePutOnShelves.setInventory(item.getInventory());
+				sharePutOnShelves.setShareCost(item.getShareCost());
+				sharePutOnShelves.setPriceOne(item.getPriceOne());
+				sharePutOnShelves.setPriceTwo(item.getPriceTwo());
+				sharePutOnShelves.setPriceThree(item.getPriceThree());
+				sharePutOnShelves.setPriceFour(item.getPriceFour());
+				sharePutOnShelves.setProductLaunchId(item.getId());
+				sharePutOnShelves.setSrcTenantId(item.getTenantId());
+				sharePutOnShelves.setSrcSalesCompanyId(item.getSalesCompanyId());
+				sharePutOnShelves.setSrcSalesCompanyName(item.getSourceCompanyName());
+				sharePutOnShelves.setSrcGoodsId(item.getGoodsId());
+				sharePutOnShelves.setSrcGoodsCode(item.getCode());
+				sharePutOnShelves.setSrcGoodsName(item.getCname());
+				sharePutOnShelves.setSrcBrandId(item.getBrandId());
+				sharePutOnShelves.setSrcBrandName(item.getBrandName());
+				sharePutOnShelves.setBillType(0);
+				if (ObjectUtils.isNotNull(item.getFilesList()) && !item.getFilesList().isEmpty()) {
+					sharePutOnShelves.setUrl(item.getFilesList().get(0).getUrl());
+				}
+				sharePutOnShelvesList.add(sharePutOnShelves);
+				pjProductLaunchListNew.add(item);
+			} else {
+				throw new RuntimeException("商品:" + excel.getGoodsName() + "未查到上架数据");
+			}
+		}
+		productLaunchService.updateBatchById(pjProductLaunchListNew);
+		this.saveOrUpdateBatch(sharePutOnShelvesList);
+		return R.data(sharePutOnShelvesList);
+	}
+
+}

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

@@ -340,7 +340,7 @@ public class StockDescController extends BladeController {
 		if ("0".equals(stockDesc.getWhether())) {
 			IPage<PjStockDesc> pages = stockDescService.selectStockDescPage(Condition.getPage(query), stockDesc);
 			for (PjStockDesc item : pages.getRecords()){
-				if (new BigDecimal("0.00").compareTo(item.getIntegral()) == 0){
+				if (ObjectUtils.isNotNull(item.getIntegral()) && new BigDecimal("0.00").compareTo(item.getIntegral()) == 0){
 					item.setIntegral(null);
 				}
 			}
@@ -348,7 +348,7 @@ public class StockDescController extends BladeController {
 		} else {
 			IPage<PjStockDesc> pages = stockDescService.selectStockDescPageZero(Condition.getPage(query), stockDesc);
 			for (PjStockDesc item : pages.getRecords()){
-				if (new BigDecimal("0.00").compareTo(item.getIntegral()) == 0){
+				if (ObjectUtils.isNotNull(item.getIntegral()) && new BigDecimal("0.00").compareTo(item.getIntegral()) == 0){
 					item.setIntegral(null);
 				}
 			}

+ 5 - 0
blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java

@@ -295,6 +295,11 @@ public class SysClient implements ISysClient {
 	}
 
 	@Override
+	public List<Dept> getDeptListByNames(String sharedCompany) {
+		return deptService.getDeptByName(sharedCompany);
+	}
+
+	@Override
 	@GetMapping(TENANT_ID)
 	public R<Tenant> getTenant(String tenantId) {
 		return R.data(tenantService.getByTenantId(tenantId));

+ 4 - 0
blade-service/blade-system/src/main/java/org/springblade/system/mapper/DeptMapper.java

@@ -18,6 +18,7 @@ package org.springblade.system.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;
+import org.springblade.core.tenant.annotation.TenantIgnore;
 import org.springblade.system.entity.Dept;
 import org.springblade.system.vo.DeptVO;
 
@@ -83,4 +84,7 @@ public interface DeptMapper extends BaseMapper<Dept> {
 	List<Dept> selectByDeptIds(@Param("ids") List<Long> ids);
 
     Dept selectDept(@Param("tenantId") String tenantIdCopy);
+
+	@TenantIgnore
+	List<Dept> getDeptByName(@Param("sharedCompany")String sharedCompany);
 }

+ 6 - 0
blade-service/blade-system/src/main/java/org/springblade/system/mapper/DeptMapper.xml

@@ -152,4 +152,10 @@
         from blade_dept
         where is_deleted = 0 and tenant_id = #{tenantId} limit 1
     </select>
+    <select id="getDeptByName" resultType="org.springblade.system.entity.Dept">
+        select *
+        from blade_dept
+        where is_deleted = '0'
+          and find_in_set(dept_name, #{sharedCompany})
+    </select>
 </mapper>

+ 2 - 0
blade-service/blade-system/src/main/java/org/springblade/system/service/IDeptService.java

@@ -152,4 +152,6 @@ public interface IDeptService extends IService<Dept> {
     Dept getDetailPol(Dept dept);
 
     Dept selectDept(String tenantIdCopy);
+
+    List<Dept> getDeptByName(String sharedCompany);
 }

+ 5 - 0
blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java

@@ -276,6 +276,11 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
 		return baseMapper.selectDept(tenantIdCopy);
 	}
 
+	@Override
+	public List<Dept> getDeptByName(String sharedCompany) {
+		return baseMapper.getDeptByName(sharedCompany);
+	}
+
 	private Dept getParentId(Long parentId) {
 		Dept detail = baseMapper.selectById(parentId);
 		if (0 == detail.getParentId()) {