瀏覽代碼

fix(批量导入及上架):处理选择忽略导入时,交期会被覆盖的问题。

yuj 6 年之前
父節點
當前提交
062327e524
共有 1 個文件被更改,包括 5 次插入6 次删除
  1. 5 6
      src/main/java/com/uas/platform/b2c/prod/commodity/model/Goods.java

+ 5 - 6
src/main/java/com/uas/platform/b2c/prod/commodity/model/Goods.java

@@ -2005,10 +2005,10 @@ public class Goods implements Serializable {
 	 * @return
 	 */
 	public Goods updateGoodsByReleaseProductByBatch(ReleaseProductByBatch releaseProductByBatch, TradeDeliveryDelayTime deliveryDelayTime, Integer ignoreImport) {
-		if (IntegerConstant.NO_INT.equals(ignoreImport) || org.apache.commons.lang.StringUtils.isNotEmpty(this.tag)) {
+		if (IntegerConstant.NO_INT.equals(ignoreImport) || org.apache.commons.lang.StringUtils.isEmpty(this.tag)) {
 			this.tag = StringUtils.isEmpty(releaseProductByBatch.getTag()) ? "类型1" : releaseProductByBatch.getTag();
 		}
-		if (IntegerConstant.NO_INT.equals(ignoreImport) || org.apache.commons.lang.StringUtils.isNotEmpty(this.unit)) {
+		if (IntegerConstant.NO_INT.equals(ignoreImport) || org.apache.commons.lang.StringUtils.isEmpty(this.unit)) {
 			this.unit = StringUtils.isEmpty(releaseProductByBatch.getUnit()) ? StringConstant.UNIT : releaseProductByBatch.getUnit();
 		}
 		this.brandNameCn = releaseProductByBatch.getB2cBrandcn();
@@ -2018,9 +2018,8 @@ public class Goods implements Serializable {
 		this.code = releaseProductByBatch.getB2cCode();
 		this.uuid = releaseProductByBatch.getComponentUuId();
 		this.img = releaseProductByBatch.getImg();
-		if (IntegerConstant.NO_INT.equals(ignoreImport) || org.apache.commons.lang.StringUtils.isNotEmpty(this.kindNameCn) || releaseProductByBatch.getKindUuid() != null) {
-			this.kindNameCn = releaseProductByBatch.getKindName();
-			this.kindUuid = releaseProductByBatch.getKindUuid();
+		if (IntegerConstant.NO_INT.equals(ignoreImport) || (StringUtilB2C.isEmpty(this.kindNameCn) && StringUtilB2C.isEmpty(this.uuid))) {
+			this.kindNameCn = releaseProductByBatch.getTitle();
 		}
 		if (IntegerConstant.NO_INT.equals(ignoreImport) || this.minBuyQty == null) {
 			this.minBuyQty = releaseProductByBatch.getMinBuyQty();
@@ -2057,7 +2056,7 @@ public class Goods implements Serializable {
 		this.returnInWeek = releaseProductByBatch.getReturnInWeek();
 		this.sampleQty = releaseProductByBatch.getSampleqty();
 		this.updateDate = releaseProductByBatch.getCreateDate();
-		if (IntegerConstant.NO_INT.equals(ignoreImport) || releaseProductByBatch.getSelfMinDelivery() != null) {
+		if ((IntegerConstant.NO_INT.equals(ignoreImport) || this.maxDelivery == null) && releaseProductByBatch.getSelfMinDelivery() != null) {
 			this.maxDelivery = releaseProductByBatch.getSelfMaxDelivery();
 			this.minDelivery = releaseProductByBatch.getSelfMinDelivery();
 			if (this.minDelivery == null) {