|
|
@@ -35,10 +35,11 @@ public class ProdServiceImpl implements ProdService {
|
|
|
if (prod.getPr_uuid() == null) {
|
|
|
if (prod.getPr_code() != null) {
|
|
|
List<Component> components = componentDao.findByCode(prod.getPr_code());
|
|
|
- if (components.size() == 1) {
|
|
|
+ if (components.size() == 1) {// 如果查询是标准数据,给个标准赋值
|
|
|
prod.setPr_uuid(components.get(0).getUuid());
|
|
|
prod.setPr_brand(components.get(0).getBrand().getNameEn());
|
|
|
prod.setPbrand(components.get(0).getBrand().getNameEn());
|
|
|
+ prod.setKind(components.get(0).getKind().getNameEn());
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
@@ -46,6 +47,10 @@ public class ProdServiceImpl implements ProdService {
|
|
|
prod.setPr_uuid(component.getUuid());
|
|
|
prod.setPr_brand(component.getBrand().getNameEn());
|
|
|
prod.setPbrand(component.getBrand().getNameEn());
|
|
|
+ prod.setKind(component.getKind().getNameEn());
|
|
|
+ }
|
|
|
+ if (prod.getPr_orispeccode() == null) {// 如果原厂型号不存在,将型号赋值给原厂型号
|
|
|
+ prod.setPr_orispeccode(prod.getPr_spec());
|
|
|
}
|
|
|
List<Product> prodResult = productDao.findByEnUUAndCode(enUU, prod.getPr_code());
|
|
|
if (CollectionUtils.isEmpty(prodResult)) {// 平台上不存在的新上传上来的物料,新增
|