yujia 7 лет назад
Родитель
Сommit
9f947a45ad

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/dao/ReleaseProductByBatchDao.java

@@ -98,7 +98,7 @@ public interface ReleaseProductByBatchDao
 	 * @param isPersonal 是否是个人
 	 * @param enuu 公司enuu
 	 */
-	@Procedure(procedureName = "PRODUCT_RELEASE_EXIST_VALID_V3")
+	@Procedure(procedureName = "PRODUCT_RELEASE_EXIST_VALID_V4")
 	void callReleaseExistValidProcedure(String batch, Boolean isPersonal, Long enuu);
 
 	/**

+ 0 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/model/ReleaseProductByBatch.java

@@ -833,7 +833,6 @@ public class ReleaseProductByBatch implements Serializable {
 		} catch (UnsupportedEncodingException e) {
 			throw new RuntimeException(e + "指定字符集不支持");
 		}
-
 	}
 
 	public void setSizeByExcel(Object value) {

+ 7 - 11
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java

@@ -261,7 +261,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		}
 		Long enUU = SystemSession.getUser().getEnterprise().getUu();
 		if (!isAPerson) {
-			//1:比较品牌、型号、自定义标签是否重复,2:比较六要素是否重复
+			//1:比较品牌、型号、是否重复,一个EXCEL中只能有一条物料信息
 			for(int i = releaseProductByBatchs.size() - 1; i > -1; i--) {
 				ReleaseProductByBatch releaseProductByBatch = releaseProductByBatchs.get(i);
 				for(int j = i - 1; j > -1; j--) {
@@ -269,15 +269,11 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 					if(releaseProductByBatch.compareSameProductTagInfo(byBatch)) {
 						releaseProductByBatch.setTag("");
 						releaseProductByBatch.setTagstr("");
-						if (releaseProductByBatch.compareSameProductSixEle(byBatch)) {
-							releaseProductByBatch.addErrmsg(ErrorInfoConstant.REPEAT_IN_EXCEL.getInfo());
-							releaseProductByBatch.setReleaseStatus(ReleaseStatus.had_exists.getPhrase());
-							releaseProductByBatch.setReleaseCode(ReleaseStatus.had_exists.value());
-                            if (!StringUtilB2C.isEmpty(releaseProductByBatch.getErrmsg())) {
-                                if (releaseProductByBatch.getErrmsg().substring(0, 1).equals(",")) {
-                                    releaseProductByBatch.setErrmsg(releaseProductByBatch.getErrmsg().substring(1));
-                                }
-                            }
+						releaseProductByBatch.addErrmsg(ErrorInfoConstant.REPEAT_IN_EXCEL.getInfo());
+						releaseProductByBatch.setReleaseStatus(ReleaseStatus.had_exists.getPhrase());
+						releaseProductByBatch.setReleaseCode(ReleaseStatus.had_exists.value());
+						if (releaseProductByBatch.getErrmsg().substring(0, 1).equals(",")) {
+							releaseProductByBatch.setErrmsg(releaseProductByBatch.getErrmsg().substring(1));
 						}
 					}
 				}
@@ -1171,7 +1167,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 
 //			Object tagValue = readWorkBookCell(row.getCell(UploadConstant.CUSTOM_LABEL), Cell.CELL_TYPE_STRING,
 //					rowNum, UploadConstant.CUSTOM_LABEL);
-//			aProduct.setTagByExcel(tagValue);
+			aProduct.setTagByExcel("");
 //			// 自定义标签不为null,则检查是否重复
 //			if (aProduct.getCode() != null && aProduct.getBrandNameEn() != null && aProduct.getTag() != null) {
 //				resetTag(aProduct);