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

Commit f4c9b3d4 authored by 胡佳晨's avatar 胡佳晨

erp 添加 同步库存 如果无库存同步 反馈异常文案

parent 2f2250d1
......@@ -89,6 +89,10 @@ public class WdtServiceImpl implements IGoblinErpService {
param.put("spec_no", skuInfoVo.getSkuErpCode());
json = erpWdtClient.execute(ErpEnum.WdtAPI.STOCK_QUERY.getUri(), param);
ArrayList<SyncStockVo> list = baseStock(json);
String error = syncStockError(list,json);
if(!"".equals(error)){
return ResponseDto.failure(error);
}
syncStock(list);
}
}
......@@ -113,6 +117,14 @@ public class WdtServiceImpl implements IGoblinErpService {
return ResponseDto.success();
}
private String syncStockError(ArrayList<SyncStockVo> list,String json){
if(list.size()==0){
log.error("无数据同步 json : {}",json);
return "无数据同步";
}
return "";
}
private ArrayList<SyncStockVo> baseStock(String json) {
ArrayList<SyncStockVo> stockMap = ErpObjectUtil.syncStockVoList();
try {
......
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