|
|
@ -157,8 +157,8 @@ public class GoodsCustomerPriceServiceImpl extends ServiceImpl<GoodsCustomerPric |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void syncCustomerPrice() { |
|
|
|
final String DICT_KEY = "sync-customer-price-max-id"; |
|
|
|
public void syncCustomerPrice(String dictKey,String dictTitle,String url) { |
|
|
|
final String DICT_KEY = dictKey; |
|
|
|
SysDictData dictData = sysDictDataMapper |
|
|
|
.selectOne(new LambdaQueryWrapper<SysDictData>() |
|
|
|
.eq(SysDictData::getGroupKey,DICT_KEY)); |
|
|
@ -168,7 +168,7 @@ public class GoodsCustomerPriceServiceImpl extends ServiceImpl<GoodsCustomerPric |
|
|
|
} |
|
|
|
List<InventoryCusPrice> allCusPriceList = new ArrayList<>(); |
|
|
|
|
|
|
|
R<String> res = seeYonRequestBaseService.postBase(TbsSeeYonConst.ERP_CUS_INV_LAST_UPD+"/"+maxId,null,"查询最近更新的客户特殊价"); |
|
|
|
R<String> res = seeYonRequestBaseService.postBase(url+"/"+maxId,null,"查询最近更新的客户特殊价"); |
|
|
|
if(res.getStatus().equals(200)){ |
|
|
|
allCusPriceList = JsonUtil.jsonToList(res.getData(), InventoryCusPrice.class); |
|
|
|
} |
|
|
@ -195,9 +195,9 @@ public class GoodsCustomerPriceServiceImpl extends ServiceImpl<GoodsCustomerPric |
|
|
|
dictData.setDictId(0L); |
|
|
|
dictData.setGroupKey(DICT_KEY); |
|
|
|
dictData.setKeyVal(maxId+""); |
|
|
|
dictData.setLabel("同步客户特殊价最大值ID"); |
|
|
|
dictData.setLabel(dictTitle); |
|
|
|
dictData.setSort(0); |
|
|
|
dictData.setRemark("同步客户特殊价最大值ID"); |
|
|
|
dictData.setRemark(dictTitle); |
|
|
|
sysDictDataMapper.insert(dictData); |
|
|
|
}else { |
|
|
|
dictData.setKeyVal(maxId+""); |
|
|
@ -206,6 +206,20 @@ public class GoodsCustomerPriceServiceImpl extends ServiceImpl<GoodsCustomerPric |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void syncCustomerPrice() { |
|
|
|
// 客户特殊价,新增和更新的触发器
|
|
|
|
String dictKey = "sync-customer-price-max-id"; |
|
|
|
String url = TbsSeeYonConst.ERP_CUS_INV_LAST_UPD; |
|
|
|
String title = "同步客户特殊价最大值ID"; |
|
|
|
this.syncCustomerPrice(dictKey,title,url); |
|
|
|
// 客户特殊价,删除的触发器
|
|
|
|
String dictKey2 = "sync-customer-price-del-max-id"; |
|
|
|
String url2 = TbsSeeYonConst.ERP_CUS_INV_LAST_DEL; |
|
|
|
String title2 = "同步客户特殊价最大值ID(PriceJustify_DeleteLog)"; |
|
|
|
this.syncCustomerPrice(dictKey2,title2,url2); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void syncCustomerPrice(String cusCode) { |
|
|
|
this.flushSupplierSkuPrices(cusCode); |
|
|
|