|
|
|
@ -264,6 +264,7 @@ public class PurchaseOcrPictureServiceImpl implements PurchaseOcrPictureService |
|
|
|
purchaseDetail.setProductSn(product.getProductSn()); |
|
|
|
purchaseDetail.setProductCount(0); |
|
|
|
purchaseDetail.setSupplierName(product.getSupplierName()); |
|
|
|
purchaseDetail.setCustomerCategoryRule(product.getCustomerCategoryRule()); |
|
|
|
// ai语音入库旧商品 如果通义千问返回的价格为0,返回当前采购价 ,采购价:purchasePrice
|
|
|
|
if (price.compareTo(BigDecimal.ZERO) == 0) { |
|
|
|
purchaseDetail.setPurchasePrice(product.getPurchasePrice()); |
|
|
|
@ -338,6 +339,7 @@ public class PurchaseOcrPictureServiceImpl implements PurchaseOcrPictureService |
|
|
|
final String attribute = "{\"颜色\":\"" + productAttributeValueVo.getValue() + "\",\"尺码\":\"" + attributeValueVo.getValue() + "\"}"; |
|
|
|
stockLog.setAttributeList(attribute); |
|
|
|
stockLog.setProductCount(productCount); |
|
|
|
stockLog.setStockCount(stockMap.getOrDefault(attribute, null)); |
|
|
|
purchaseDetail.setProductCount(purchaseDetail.getProductCount() + productCount); |
|
|
|
stockLogList.add(stockLog); |
|
|
|
} |
|
|
|
@ -352,6 +354,7 @@ public class PurchaseOcrPictureServiceImpl implements PurchaseOcrPictureService |
|
|
|
final String attribute = "{\"颜色\":\"" + productAttributeValueVo.getValue() + "\",\"尺码\":\"" + size + "\"}"; |
|
|
|
stockLog.setAttributeList(attribute); |
|
|
|
stockLog.setProductCount(productCount); |
|
|
|
stockLog.setStockCount(stockMap.getOrDefault(attribute, null)); |
|
|
|
purchaseDetail.setProductCount(purchaseDetail.getProductCount() + productCount); |
|
|
|
stockLogList.add(stockLog); |
|
|
|
} |
|
|
|
@ -365,6 +368,7 @@ public class PurchaseOcrPictureServiceImpl implements PurchaseOcrPictureService |
|
|
|
final String attribute = "{\"颜色\":\"" + color + "\",\"尺码\":\"" + attributeValueVo.getValue() + "\"}"; |
|
|
|
stockLog.setAttributeList(attribute); |
|
|
|
stockLog.setProductCount(productCount); |
|
|
|
stockLog.setStockCount(stockMap.getOrDefault(attribute, null)); |
|
|
|
purchaseDetail.setProductCount(purchaseDetail.getProductCount() + productCount); |
|
|
|
stockLogList.add(stockLog); |
|
|
|
} |
|
|
|
@ -376,6 +380,7 @@ public class PurchaseOcrPictureServiceImpl implements PurchaseOcrPictureService |
|
|
|
final String attribute = "{\"颜色\":\"" + color + "\",\"尺码\":\"" + size + "\"}"; |
|
|
|
stockLog.setAttributeList(attribute); |
|
|
|
stockLog.setProductCount(productCount); |
|
|
|
stockLog.setStockCount(stockMap.getOrDefault(attribute, null)); |
|
|
|
purchaseDetail.setProductCount(purchaseDetail.getProductCount() + productCount); |
|
|
|
stockLogList.add(stockLog); |
|
|
|
|
|
|
|
|