|
|
@@ -58,6 +58,7 @@ import org.apache.poi.ss.usermodel.Cell;
|
|
|
import org.apache.poi.ss.usermodel.Row;
|
|
|
import org.apache.poi.ss.usermodel.Sheet;
|
|
|
import org.apache.poi.ss.usermodel.Workbook;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
@@ -451,10 +452,12 @@ public class BaseInfoServiceImpl implements BaseInfoService {
|
|
|
if (CollectionUtils.isEmpty(existedProdStatus)) {
|
|
|
ProductStatus productStatus = new ProductStatus(product.getId(), Constant.YES);
|
|
|
productStatusDao.save(productStatus);
|
|
|
- product.setErpDate(new Date());
|
|
|
- product.setIsPurchase(Constant.NO);
|
|
|
- product.setIsSale(Constant.NO);
|
|
|
- ProductUtils.updateOne(product);
|
|
|
+ Product newProduct = new Product();
|
|
|
+ BeanUtils.copyProperties(product, newProduct);
|
|
|
+ newProduct.setErpDate(new Date());
|
|
|
+ newProduct.setIsPurchase(Constant.NO);
|
|
|
+ newProduct.setIsSale(Constant.NO);
|
|
|
+ ProductUtils.updateOne(newProduct);
|
|
|
}
|
|
|
}
|
|
|
}
|