|
|
@@ -161,6 +161,9 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
|
|
|
validEnableUpdateCode(product.getId());
|
|
|
}
|
|
|
|
|
|
+ //上传至B2B
|
|
|
+ uploadChangeToB2B(product);
|
|
|
+
|
|
|
//明细数据有更新/插入动作
|
|
|
if (productDetailList.size() > 0){
|
|
|
//物料发生过除库存初始化外的出入库单时,不能新增,修改,删除
|
|
|
@@ -222,6 +225,21 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
|
|
|
return docBaseDTO;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 物料规格/型号/品牌三者任何一个发生变化时,将物料的B2B上传状态更新为 "待上传",
|
|
|
+ * 用户在下一次点击上传产品库时一起上传至B2B
|
|
|
+ * @param product
|
|
|
+ */
|
|
|
+ private void uploadChangeToB2B(Product product) {
|
|
|
+ if (ConfigsCache.current().enableB2B()){
|
|
|
+ Product oldProduct = getMapper().selectByPrimaryKey(product.getId());
|
|
|
+ if (!oldProduct.getPr_spec().equals(product.getPr_spec()) || !oldProduct.getPr_orispeccode().equals(product.getPr_orispeccode())
|
|
|
+ || !oldProduct.getPr_brand().equals(product.getPr_brand())){
|
|
|
+ updateB2BStatus(String.valueOf(product.getId()), "待上传");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 校验明细仓库是否重复
|
|
|
* @param productDetailList
|