|
|
@@ -1,6 +1,8 @@
|
|
|
package com.uas.platform.b2b.service.impl;
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
@@ -66,7 +68,10 @@ public class PurcProductServiceImpl implements PurcProductService {
|
|
|
row.getCell(2).setCellType(Cell.CELL_TYPE_STRING);
|
|
|
product.setCmpCode(row.getCell(2).getStringCellValue().trim());
|
|
|
if (product.getCode() == null) {
|
|
|
- product.setCode(product.getCmpCode());
|
|
|
+ // 生成随机物料编码
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("mmsssss");
|
|
|
+ String code = SystemSession.getUser().getEnterprise().getUu() + sdf.format(new Date());
|
|
|
+ product.setCode(code);
|
|
|
}
|
|
|
}
|
|
|
|