|
|
@@ -16,15 +16,14 @@ import com.uas.platform.b2c.prod.commodity.model.Goods;
|
|
|
import com.uas.platform.b2c.prod.commodity.model.Product;
|
|
|
import com.uas.platform.b2c.prod.commodity.model.ProductDetail;
|
|
|
import com.uas.platform.b2c.prod.commodity.service.GoodsService;
|
|
|
-import com.uas.platform.b2c.trade.support.ResultMap;
|
|
|
import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
|
-import org.apache.log4j.Logger;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.util.CollectionUtils;
|
|
|
-
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
+import org.apache.log4j.Logger;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
/**
|
|
|
* 针对ERP物料交易详情接口
|
|
|
@@ -93,6 +92,8 @@ public class ProductDetailERPServiceImpl implements ProductDetailERPService {
|
|
|
|
|
|
@Override
|
|
|
public void updateReserve(List<ProductDetailERP> productDetailERPList) {
|
|
|
+ SimpleDateFormat dateFormat=new SimpleDateFormat("yy-MM-dd");
|
|
|
+ SimpleDateFormat timeFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
List<Product> productList = new ArrayList<Product>();
|
|
|
Long enuu = SystemSession.getUser().getEnterprise().getUu();
|
|
|
for (ProductDetailERP productDetailERP : productDetailERPList) {
|
|
|
@@ -148,7 +149,14 @@ public class ProductDetailERPServiceImpl implements ProductDetailERPService {
|
|
|
}
|
|
|
|
|
|
products.get(0).setErpReserve(productDetailERP.getReserve() == null ? 0 : productDetailERP.getReserve());
|
|
|
- products.get(0).setProduceDate(productDetailERP.getProduceDate());
|
|
|
+ if (productDetailERP.getProduceDate() != null) {
|
|
|
+ try {
|
|
|
+ products.get(0).setProduceDate(dateFormat.format(timeFormat.parse(productDetailERP.getProduceDate())));
|
|
|
+ } catch (Exception e) {
|
|
|
+ products.get(0).setProduceDate(productDetailERP.getProduceDate());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
products.get(0).setPrice(productDetailERP.getPrice());
|
|
|
productList.add(products.get(0));
|
|
|
}
|