| 
					
				 | 
			
			
				@@ -27,6 +27,7 @@ import com.kmall.common.constant.Dict; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.kmall.admin.fromcomm.entity.SysUserEntity; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.kmall.common.utils.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.kmall.manager.manager.redis.JedisUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import io.swagger.models.auth.In; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.transaction.annotation.Transactional; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2132,13 +2133,22 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return goodsDao.queryObjectBySn(goodsSn); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void syncOmsHsCodeTask() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<String> skuList = goodsDao.queryNonSyncOmsHsCodeSkuList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        syncOmsHsCode(skuList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void syncOmsHsCodeGoode(List<Integer> ids) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        syncOmsHsCode(goodsDao.syncOmsHsCodeGoode(ids)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Transactional 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void syncOmsHsCode() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<String> skuList = goodsDao.queryNonSyncOmsHsCodeSkuList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void syncOmsHsCode(List<String> skuList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (Objects.nonNull(skuList) && skuList.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String result = HttpUtil.get("https://oms.ds-bay.com/oms-controller-mgt/pdProductRecord/hsCodeMapBySkuList?skuList=" + skuList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //String result = HttpUtil.get("https://oms.ds-bay.com/oms-controller-mgt/pdProductRecord/hsCodeMapBySkuList?skuList=" + skuList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            String result = HttpUtil.get("http://183.3.221.143:8080/oms-controller-mgt/pdProductRecord/hsCodeMapBySkuList?skuList=" + skuList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Map<String,Map> map = JSON.parseObject(result, Map.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (String sku : skuList) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2177,24 +2187,8 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Transactional 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void syncOmsGoodsRate() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<GoodsEntity> list = goodsDao.queryNonSyncOmsGoodsRateSkuList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (Objects.nonNull(list) && list.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String result = HttpUtil.get("https://oms.ds-bay.com/oms-controller-mgt/taxBill/queryGoodsRate?thirdPartyMerchCode=CW001"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            Map<String,String> map = JSON.parseObject(result, Map.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            for (GoodsEntity goodsEntity : list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                String goodsRate = map.get(goodsEntity.getHsCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (StringUtils.isNotEmpty(goodsRate)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    goodsEntity.setIsSyncGoodsRate("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    goodsEntity.setGoodsRate(new BigDecimal(goodsRate)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    goodsDao.update(goodsEntity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Transactional 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2214,6 +2208,7 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //                    BigDecimal goodsRate = calculateTax.divide(actualPaymentAmount, 4, BigDecimal.ROUND_HALF_UP); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     BigDecimal goodsRate =CalculateTax.calculateGoodsRate(goodsEntity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     goodsEntity.setGoodsRate(goodsRate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    goodsEntity.setIsSyncHsCode("0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     goodsDao.update(goodsEntity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2269,6 +2264,8 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return goodsDao.queryAllList(page,pageSize); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private void calculeatePromotion(SysUserEntity user, GoodsEntity goods, List<Map<String, String>> errorPriceSkuList, List<ShopErrorPriceRecordEntity> shopErrorPriceRecordEntities) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String prodBarcode = goods.getProdBarcode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String storeId = goods.getStoreId()+""; 
			 |