Browse Source

商品表增加是否共享标识、增加查询条件、导出列

liyuan 7 months ago
parent
commit
11dd03a52d

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

@@ -310,4 +310,17 @@ public class PjGoodsDesc implements Serializable {
 	@TableField(exist = false)
 	private String goodIds;
 
+	/**
+	 * 共享的
+	 * 1 是
+	 */
+	@ApiModelProperty(value = "共享的")
+	private Integer shared;
+
+	/**
+	 * 共享的
+	 * 1 是
+	 */
+	@TableField(exist = false)
+	private String sharedStr;
 }

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

@@ -105,4 +105,10 @@ public class GoodsDescExportExcel implements Serializable {
 	private String goodIds;
 
 
+	/**
+	 * 是否共享
+	 */
+	@ExcelProperty(value = "共享商品")
+	private String sharedStr;
+
 }

+ 4 - 1
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/controller/GoodsDescController.java

@@ -133,7 +133,9 @@ public class GoodsDescController extends BladeController {
 			.eq(ObjectUtils.isNotNull(goods.getWhetherIntegral()), PjGoodsDesc::getWhetherIntegral, goods.getWhetherIntegral())//是否是积分商品
 			.eq(ObjectUtils.isNotNull(goods.getEnableOrNot()), PjGoodsDesc::getEnableOrNot, goods.getEnableOrNot())//状态
 			.eq(ObjectUtils.isNotEmpty(goods.getWhether()), PjGoodsDesc::getWhether, goods.getWhether())//是否管理到批次号
-			.eq(ObjectUtils.isNotEmpty(goods.getExplosionProof()), PjGoodsDesc::getExplosionProof, goods.getExplosionProof());//是否防爆
+			.eq(ObjectUtils.isNotEmpty(goods.getExplosionProof()), PjGoodsDesc::getExplosionProof, goods.getExplosionProof())//是否防爆
+			//是否共享商品
+			.eq(ObjectUtils.isNotEmpty(goods.getShared()), PjGoodsDesc::getShared, goods.getShared());
 		if (ObjectUtil.isNotEmpty(goods.getCname())) {
 			lambdaQueryWrapper.and(i -> i.like(PjGoodsDesc::getCname, goods.getCname()).or().like(PjGoodsDesc::getCnameInt, goods.getCname()));
 		}
@@ -343,6 +345,7 @@ public class GoodsDescController extends BladeController {
 		List<PjGoodsDesc> list = goodsDescService.list(lambdaQueryWrapper);
 		list.forEach(e -> {
 			String typeId = e.getGoodsTypeId();
+			e.setSharedStr(Objects.equals(e.getShared(), 1) ? "是" : "否");
 			if (ObjectUtils.isNotNull(typeId)) {
 				String[] split = typeId.split(",");
 				List<String> stringList = Arrays.asList(split);

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

@@ -454,6 +454,7 @@ public class SharePutOnShelvesServiceImpl extends ServiceImpl<SharePutOnShelvesM
 			goodsDesc.setSelfRecovery(item.getSelfRecovery());
 			goodsDesc.setWhetherIntegral("0");
 			goodsDesc.setGoodsSize(item.getGoodsSize());
+			goodsDesc.setShared(1);
 			if (!goodsDescList.isEmpty()) {
 				PjGoodsDesc goodsDetail = goodsDescList.stream().filter(e -> e.getCode().equals(item.getSrcGoodsCode())).findFirst().orElse(null);
 				if (goodsDetail == null) {