|
|
@@ -18,7 +18,6 @@ import com.uas.platform.b2c.core.support.SystemSession;
|
|
|
import com.uas.platform.b2c.core.utils.DoubleArith;
|
|
|
import com.uas.platform.b2c.core.utils.FastjsonUtils;
|
|
|
import com.uas.platform.b2c.core.utils.NumberUtil;
|
|
|
-import com.uas.platform.b2c.core.utils.PatternUtil;
|
|
|
import com.uas.platform.b2c.external.erp.commodity.util.ModelConverter;
|
|
|
import com.uas.platform.b2c.prod.commodity.constant.DoubleConstant;
|
|
|
import com.uas.platform.b2c.prod.commodity.constant.IntegerConstant;
|
|
|
@@ -252,9 +251,14 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
// if (!PatternUtil.matchChineseAndEnglish(goods.getPackaging())) {
|
|
|
// throw new IllegalOperatorException("包装信息只能包含中文和英文");
|
|
|
// }
|
|
|
- if (goods.getProduceDate().length() > 12) {
|
|
|
- throw new IllegalOperatorException("产品生产日期不能超过12个字符");
|
|
|
+ if (StringUtils.isEmpty(goods.getProduceDate())) {
|
|
|
+ throw new IllegalOperatorException("型号" + goods.getCode()+"品牌" + goods.getBrandNameEn() +"的产品生产日期为空");
|
|
|
+ } else {
|
|
|
+ if (goods.getProduceDate().length() > 12) {
|
|
|
+ throw new IllegalOperatorException("产品生产日期不能超过12个字符");
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
if (goods.getOriginal() == null) {
|
|
|
throw new IllegalOperatorException("必须选择库存类型");
|
|
|
}
|