erp定时任务去除try/catch
This commit is contained in:
@@ -110,7 +110,6 @@ public class ErpAssetServiceImpl implements ErpAssetService {
|
||||
@Transactional
|
||||
@XxlJob("getErpAssetTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.资产卡片;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
String key = "erpMap" + funcnr;
|
||||
@@ -144,11 +143,6 @@ public class ErpAssetServiceImpl implements ErpAssetService {
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -222,7 +216,7 @@ public class ErpAssetServiceImpl implements ErpAssetService {
|
||||
.in(ErpAssetDO::getMainAssetNumber, result.toInsert.stream().map(ErpAssetDO::getMainAssetNumber).collect(Collectors.toList()))
|
||||
);
|
||||
Map<String, Long> numberIdMap = insertedRecords.stream()
|
||||
.collect(Collectors.toMap(asset -> asset.getCompanyNumber() + "-" + asset.getMainAssetNumber(), ErpAssetDO::getId));
|
||||
.collect(Collectors.toMap(asset -> asset.getCompanyNumber() + "-" + asset.getMainAssetNumber(), ErpAssetDO::getId,(existing, replacement) -> replacement));
|
||||
myRedisConfig.addRedisCacheMap(result.key, numberIdMap);
|
||||
}
|
||||
if (!result.toUpdate.isEmpty()) {
|
||||
|
||||
@@ -117,7 +117,6 @@ public class ErpBomServiceImpl implements ErpBomService {
|
||||
@Transactional
|
||||
@XxlJob("getErpBomTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.BOM清单;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
String key = "erpMap" + funcnr;
|
||||
@@ -150,11 +149,6 @@ public class ErpBomServiceImpl implements ErpBomService {
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -121,7 +121,6 @@ public class ErpCompanyServiceImpl implements ErpCompanyService {
|
||||
@Transactional
|
||||
@XxlJob("getCompanyTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.公司代码;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
//防止缓存数据丢失
|
||||
@@ -141,12 +140,6 @@ public class ErpCompanyServiceImpl implements ErpCompanyService {
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
// log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw e;
|
||||
// throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -183,7 +183,6 @@ public class ErpContractServiceImpl implements ErpContractService {
|
||||
@Transactional
|
||||
@XxlJob("getErpContractTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.合同信息;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
|
||||
@@ -225,11 +224,6 @@ public class ErpContractServiceImpl implements ErpContractService {
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -110,7 +110,6 @@ public class ErpCostcenterServiceImpl implements ErpCostcenterService {
|
||||
@Transactional
|
||||
@XxlJob("getErpCostcenterTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.成本中心;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
//防止缓存数据丢失
|
||||
@@ -145,11 +144,6 @@ public class ErpCostcenterServiceImpl implements ErpCostcenterService {
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,6 +238,7 @@ public class ErpCostcenterServiceImpl implements ErpCostcenterService {
|
||||
this.key = key;
|
||||
}
|
||||
}
|
||||
|
||||
private void initializeMap(String key) {
|
||||
Map<String, Long> existingNumbers = erpCostcenterMapper.selectList(new LambdaQueryWrapperX<ErpCostcenterDO>())
|
||||
.stream()
|
||||
|
||||
@@ -110,7 +110,6 @@ public class ErpCustomerServiceImpl implements ErpCustomerService {
|
||||
@Transactional
|
||||
@XxlJob("getErpCustomerTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.客商信息;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
|
||||
@@ -149,11 +148,6 @@ public class ErpCustomerServiceImpl implements ErpCustomerService {
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -169,25 +163,30 @@ public class ErpCustomerServiceImpl implements ErpCustomerService {
|
||||
for (int i = 0; i < dataArray.size(); i++) {
|
||||
JSONObject dataJson = dataArray.getJSONObject(i);
|
||||
if (dataJson != null) {
|
||||
String number = dataJson.getString(funcnrEnum.getDatakey()).trim();
|
||||
String number = dataJson.getString(funcnrEnum.getDatakey());
|
||||
if (number != null) {
|
||||
number = number.trim();
|
||||
}
|
||||
ErpCustomerDO DO = new ErpCustomerDO();
|
||||
DO.setName(dataJson.getString("NAME_ORG1"));
|
||||
DO.setNumber(number);
|
||||
DO.setAccountGroup(dataJson.getString("BU_GROUP"));
|
||||
DO.setDescription(dataJson.getString("BU_SORT1"));
|
||||
DO.setCenterNumber(dataJson.getString("BU_SORT2"));
|
||||
if (!dataJson.getString("CRDAT").equals("0000-00-00")) {
|
||||
DO.setCreateDate(LocalDateTime.parse(dataJson.getString("CRDAT") + "T00:00:00"));
|
||||
String crdat = dataJson.getString("CRDAT");
|
||||
if (crdat != null && !crdat.equals("0000-00-00")) {
|
||||
DO.setCreateDate(LocalDateTime.parse(crdat + "T00:00:00"));
|
||||
}
|
||||
if (!dataJson.getString("CHDAT").equals("0000-00-00")) {
|
||||
DO.setRepairDate(LocalDateTime.parse(dataJson.getString("CHDAT") + "T00:00:00"));
|
||||
String chdat = dataJson.getString("CHDAT");
|
||||
if (chdat != null && !chdat.equals("0000-00-00")) {
|
||||
DO.setRepairDate(LocalDateTime.parse(chdat + "T00:00:00"));
|
||||
}
|
||||
DO.setIsGiveback(dataJson.getString("XDELE"));
|
||||
DO.setIsProvisional(dataJson.getString("XBLCK"));
|
||||
// DO.setType(type.modetype);
|
||||
|
||||
// 使用 Map 优化查找效率,避免每次遍历 comnumbers 列表
|
||||
if (numbers.get(number)!=null) {
|
||||
if (number != null && numbers.get(number) != null) {
|
||||
// 更新
|
||||
DO.setId(numbers.get(number));
|
||||
toUpdate.add(DO);
|
||||
|
||||
@@ -164,7 +164,6 @@ public class ErpFactoryServiceImpl implements ErpFactoryService {
|
||||
@Transactional
|
||||
@XxlJob("getErpFactoryTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.工厂信息;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
//防止缓存数据丢失
|
||||
@@ -206,11 +205,6 @@ public class ErpFactoryServiceImpl implements ErpFactoryService {
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -108,7 +108,6 @@ public class ErpInternalOrderServiceImpl implements ErpInternalOrderService {
|
||||
@Transactional
|
||||
@XxlJob("getErpInternalOrderTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.内部订单;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
//防止缓存数据丢失
|
||||
@@ -144,11 +143,6 @@ public class ErpInternalOrderServiceImpl implements ErpInternalOrderService {
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -178,7 +178,6 @@ public class ErpMaterialServiceImpl implements ErpMaterialService {
|
||||
@Transactional
|
||||
@XxlJob("getErpMaterialTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.物料数据;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
//防止缓存数据丢失
|
||||
@@ -210,11 +209,6 @@ public class ErpMaterialServiceImpl implements ErpMaterialService {
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -118,7 +118,7 @@ public class ErpProcessDetailServiceImpl implements ErpProcessDetailService {
|
||||
if (updateReqVO.getProcessingName() == null || updateReqVO.getProcessingName().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
String mapKey = updateReqVO.getProcessId() + "-" + updateReqVO.getProcessingNumber();
|
||||
String mapKey = updateReqVO.getProcessId() + "-" + updateReqVO.getProcessingNumber()+"-" + updateReqVO.getWorkCenterNumber();
|
||||
if (existingNumbers.containsKey(mapKey)) {
|
||||
updateReqVO.setId(existingNumbers.get(mapKey));
|
||||
}
|
||||
@@ -149,10 +149,12 @@ public class ErpProcessDetailServiceImpl implements ErpProcessDetailService {
|
||||
new LambdaQueryWrapperX<ErpProcessDetailDO>()
|
||||
.in(ErpProcessDetailDO::getProcessId, result.toInsert.stream().map(ErpProcessDetailDO::getProcessId).distinct().collect(Collectors.toList()))
|
||||
.in(ErpProcessDetailDO::getProcessingNumber, result.toInsert.stream().map(ErpProcessDetailDO::getProcessingNumber).distinct().collect(Collectors.toList()))
|
||||
// .in(ErpProcessDetailDO::getProcessingName, result.toInsert.stream().map(ErpProcessDetailDO::getProcessingName).distinct().collect(Collectors.toList()))
|
||||
.in(ErpProcessDetailDO::getWorkCenterNumber, result.toInsert.stream().map(ErpProcessDetailDO::getWorkCenterNumber).distinct().collect(Collectors.toList()))
|
||||
);
|
||||
Map<String, Long> numberIdMap = insertedRecords.stream()
|
||||
.collect(Collectors.toMap(asset -> asset.getProcessId() + "-" + asset.getProcessingNumber(), ErpProcessDetailDO::getId));
|
||||
.collect(Collectors.toMap(
|
||||
asset -> asset.getProcessId() + "-" + asset.getProcessingNumber() + "-" + asset.getWorkCenterNumber(),
|
||||
ErpProcessDetailDO::getId, (existing, replacement) -> replacement));
|
||||
myRedisConfig.addRedisCacheMap(result.key, numberIdMap);
|
||||
}
|
||||
if (!result.toUpdate.isEmpty()) {
|
||||
@@ -186,7 +188,7 @@ public class ErpProcessDetailServiceImpl implements ErpProcessDetailService {
|
||||
List<ErpProcessDetailDO> assets = erpProcessDetailMapper.selectList(new LambdaQueryWrapperX<ErpProcessDetailDO>());
|
||||
Map<String, Long> existingNumbers = new HashMap<>();
|
||||
for (ErpProcessDetailDO asset : assets) {
|
||||
String mapKey = asset.getProcessId() + "-" + asset.getProcessingNumber();
|
||||
String mapKey = asset.getProcessId() + "-" + asset.getProcessingNumber()+ "-" + asset.getWorkCenterNumber();
|
||||
existingNumbers.put(mapKey, asset.getId());
|
||||
}
|
||||
myRedisConfig.addRedisCacheMap(key, existingNumbers);
|
||||
|
||||
@@ -114,7 +114,6 @@ public class ErpProcessServiceImpl implements ErpProcessService {
|
||||
@Transactional
|
||||
@XxlJob("getErpProcessTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.工艺路线;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
String key = "erpMap" + funcnr;
|
||||
@@ -148,11 +147,6 @@ public class ErpProcessServiceImpl implements ErpProcessService {
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -171,16 +165,25 @@ public class ErpProcessServiceImpl implements ErpProcessService {
|
||||
JSONObject dataJson = dataArray.getJSONObject(i);
|
||||
if (dataJson != null) {
|
||||
ErpProcessDO DO = new ErpProcessDO();
|
||||
DO.setFactoryNumber(dataJson.getString("WERKS"));
|
||||
DO.setMaterialNumber(dataJson.getString("MATNR"));
|
||||
DO.setMaterialName(dataJson.getString("MAKTX"));
|
||||
DO.setBlineGroup(dataJson.getString("PLNAL"));
|
||||
DO.setGroupCount(dataJson.getLong("PLNNR"));
|
||||
DO.setBlineDescription(dataJson.getString("KTEXT"));
|
||||
DO.setUom(dataJson.getString("PLNME"));
|
||||
DO.setUseDescription(dataJson.getString("VERWE"));
|
||||
DO.setStatus(dataJson.getString("STATU"));
|
||||
String number = DO.getFactoryNumber() + "-" + DO.getMaterialNumber() + "-" + DO.getBlineGroup();
|
||||
DO.setFactoryNumber(dataJson.getString("WERKS").trim());
|
||||
DO.setMaterialNumber(dataJson.getString("MATNR").trim());
|
||||
DO.setMaterialName(dataJson.getString("MAKTX").trim());
|
||||
DO.setBlineGroup(dataJson.getString("PLNAL").trim());
|
||||
Long groupCount = null;
|
||||
String plnnrStr = dataJson.getString("PLNNR");
|
||||
if (plnnrStr != null && !plnnrStr.trim().isEmpty()) {
|
||||
try {
|
||||
groupCount = Long.valueOf(plnnrStr.trim());
|
||||
} catch (NumberFormatException e) {
|
||||
log.error("转换PLNNR为Long类型失败: " + plnnrStr, e);
|
||||
}
|
||||
}
|
||||
DO.setGroupCount(groupCount);
|
||||
DO.setBlineDescription(dataJson.getString("KTEXT").trim());
|
||||
DO.setUom(dataJson.getString("PLNME").trim());
|
||||
DO.setUseDescription(dataJson.getString("VERWE").trim());
|
||||
DO.setStatus(dataJson.getString("STATU").trim());
|
||||
String number = DO.getFactoryNumber() + "-" + DO.getMaterialNumber() + "-" + DO.getBlineGroup().trim()+"-" + DO.getGroupCount();
|
||||
dataArrayNumbers.add(number);
|
||||
if (numbers.get(number) != null) {
|
||||
// 更新
|
||||
@@ -271,7 +274,7 @@ public class ErpProcessServiceImpl implements ErpProcessService {
|
||||
List<ErpProcessDO> bomList = erpProcessMapper.selectList(new LambdaQueryWrapperX<ErpProcessDO>());
|
||||
Map<String, Long> existingNumbers = new HashMap<>();
|
||||
for (ErpProcessDO bom : bomList) {
|
||||
String mapKey = bom.getFactoryNumber() + "-" + bom.getMaterialNumber() + "-" + bom.getBlineGroup();
|
||||
String mapKey = bom.getFactoryNumber() + "-" + bom.getMaterialNumber() + "-" + bom.getBlineGroup()+"-" + bom.getGroupCount();
|
||||
existingNumbers.put(mapKey, bom.getId());
|
||||
}
|
||||
myRedisConfig.addRedisCacheMap(key, existingNumbers);
|
||||
|
||||
@@ -183,7 +183,6 @@ public class ErpProductiveOrderServiceImpl implements ErpProductiveOrderService
|
||||
@Transactional
|
||||
@XxlJob("getErpProductiveOrderTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.生产订单;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
|
||||
@@ -221,11 +220,6 @@ public class ErpProductiveOrderServiceImpl implements ErpProductiveOrderService
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -108,7 +108,6 @@ public class ErpProductiveVersionServiceImpl implements ErpProductiveVersionServ
|
||||
@Transactional
|
||||
@XxlJob("getErpProductiveVersionTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.生产版本;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
//防止缓存数据丢失
|
||||
@@ -144,11 +143,6 @@ public class ErpProductiveVersionServiceImpl implements ErpProductiveVersionServ
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -165,13 +159,15 @@ public class ErpProductiveVersionServiceImpl implements ErpProductiveVersionServ
|
||||
JSONObject dataJson = dataArray.getJSONObject(i);
|
||||
if (dataJson != null) {
|
||||
ErpProductiveVersionDO DO = new ErpProductiveVersionDO();
|
||||
DO.setFactoryNumber(dataJson.getString("MATNR").trim());
|
||||
DO.setMaterialNumber(dataJson.getString("WERKS").trim());
|
||||
DO.setProductiveVersionNumber(dataJson.getString("VERID").trim());
|
||||
DO.setFactoryNumber(dataJson.getString("MATNR") != null ? dataJson.getString("MATNR").trim() : null);
|
||||
DO.setMaterialNumber(dataJson.getString("WERKS") != null ? dataJson.getString("WERKS").trim() : null);
|
||||
DO.setProductiveVersionNumber(dataJson.getString("VERID") != null ? dataJson.getString("VERID").trim() : null);
|
||||
DO.setProductiveVersionName(dataJson.getString("TEXT1"));
|
||||
DO.setBomNumber(dataJson.getString("STLAL"));
|
||||
DO.setBlineGroup(dataJson.getString("PLNNR"));
|
||||
DO.setGroupCount(Long.valueOf(dataJson.getString("ALNAL").trim()));
|
||||
String alnalValue = dataJson.getString("ALNAL");
|
||||
// 修复:增加对空字符串的判断
|
||||
DO.setGroupCount(alnalValue != null && !alnalValue.trim().isEmpty() ? Long.valueOf(alnalValue.trim()) : null);
|
||||
String number = dataJson.getString("MATNR").trim() + "-" + dataJson.getString("WERKS").trim() + "-" + dataJson.getString("VERID").trim();
|
||||
if (numbers.get(number) != null) {
|
||||
// 更新
|
||||
|
||||
@@ -108,7 +108,6 @@ public class ErpPurchaseOrganizationServiceImpl implements ErpPurchaseOrganizati
|
||||
@Transactional
|
||||
@XxlJob("getErpPurchaseOrganizationTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.采购组织;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
//防止缓存数据丢失
|
||||
@@ -152,11 +151,6 @@ public class ErpPurchaseOrganizationServiceImpl implements ErpPurchaseOrganizati
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -108,7 +108,6 @@ public class ErpSalesOrganizationServiceImpl implements ErpSalesOrganizationServ
|
||||
@Transactional
|
||||
@XxlJob("getErpSalesOrganizationTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.销售组织;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
//防止缓存数据丢失
|
||||
@@ -151,11 +150,6 @@ public class ErpSalesOrganizationServiceImpl implements ErpSalesOrganizationServ
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -169,7 +169,6 @@ public class ErpWarehouseServiceImpl implements ErpWarehouseService {
|
||||
@Transactional
|
||||
@XxlJob("getErpWarehouseTask")
|
||||
public void callErpRfcInterface() {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.库位信息;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
//防止缓存数据丢失
|
||||
@@ -212,11 +211,6 @@ public class ErpWarehouseServiceImpl implements ErpWarehouseService {
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("调用ERP RFC接口失败: {}", e);
|
||||
throw new RuntimeException("调用ERP RFC接口失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user