记得上下班打卡 | git大法好,push需谨慎

Commit 9d0f56e4 authored by 胡佳晨's avatar 胡佳晨

需改 erphosting 不是1不处理

parent c2dcf08e
...@@ -108,8 +108,8 @@ public class WdtServiceImpl implements IGoblinErpService { ...@@ -108,8 +108,8 @@ public class WdtServiceImpl implements IGoblinErpService {
// for (int i = 0; i < pageCount; i++) { // for (int i = 0; i < pageCount; i++) {
// param.put("page_no", i + ""); // param.put("page_no", i + "");
GoblinStoreErpConfigVo storeErpConfigVo = goblinRedisUtils.getStoreErpConfigVoByStoreId(data.getStoreId()); GoblinStoreErpConfigVo storeErpConfigVo = goblinRedisUtils.getStoreErpConfigVoByStoreId(data.getStoreId());
if(storeErpConfigVo==null){ if (storeErpConfigVo == null) {
log.error("storeId:{},查询失败",data.getStoreId()); log.error("storeId:{},查询失败", data.getStoreId());
continue; continue;
} }
json = erpWdtClient.execute(ErpEnum.WdtAPI.STOCK_QUERY.getUri(), param, storeErpConfigVo.getAppKey(), storeErpConfigVo.getSid(), storeErpConfigVo.getAppSecret()); json = erpWdtClient.execute(ErpEnum.WdtAPI.STOCK_QUERY.getUri(), param, storeErpConfigVo.getAppKey(), storeErpConfigVo.getSid(), storeErpConfigVo.getAppSecret());
...@@ -163,7 +163,7 @@ public class WdtServiceImpl implements IGoblinErpService { ...@@ -163,7 +163,7 @@ public class WdtServiceImpl implements IGoblinErpService {
for (SyncStockVo vo : stockMap) { for (SyncStockVo vo : stockMap) {
String skuId = ""; String skuId = "";
try { try {
GoblinGoodsSkuInfoVo skuInfoVo = mongoTemplate.findOne(Query.query(Criteria.where("skuErpCode").is(vo.getSpecNo()).and("erpWarehouseNo").is(vo.getWarehouseNo())), GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName()); GoblinGoodsSkuInfoVo skuInfoVo = mongoTemplate.findOne(Query.query(Criteria.where("skuErpCode").is(vo.getSpecNo()).and("erpWarehouseNo").is(vo.getWarehouseNo()).and("erpHosting").is(1)), GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
int changeStock = vo.getStockErpNum().subtract(BigDecimal.valueOf(skuInfoVo.getSkuStock())).intValue(); int changeStock = vo.getStockErpNum().subtract(BigDecimal.valueOf(skuInfoVo.getSkuStock())).intValue();
skuId = skuInfoVo.getSkuId(); skuId = skuInfoVo.getSkuId();
//mongo修改 //mongo修改
...@@ -207,9 +207,13 @@ public class WdtServiceImpl implements IGoblinErpService { ...@@ -207,9 +207,13 @@ public class WdtServiceImpl implements IGoblinErpService {
String orderId = goblinRedisUtils.erpLeftPop(shopNo); String orderId = goblinRedisUtils.erpLeftPop(shopNo);
if (orderId != null) { if (orderId != null) {
list.add(orderId); list.add(orderId);
} else {
break;
} }
} }
orderIdList.add(list); if (list.size() != 0) {
orderIdList.add(list);
}
} else { } else {
List<String> a = CollectionUtil.arrayListString(); List<String> a = CollectionUtil.arrayListString();
a.add(singleId); a.add(singleId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment