写入目标表失败,更新同步标识特殊处理(未配置失败code报错)

tags/yfai-mes-ext-v1.6 yfai-mes-ext-v1.6
jun 9 months ago
parent ad72e55de7
commit 3e7c2c75c5

@ -338,9 +338,11 @@ public class WmsSAPDbWriter extends WmsSAPDbSyncBase {
return updateSyncMap;
}
boolean containsColon = false;
for (UpdateSyncItem item : this.getSrcUpdateSync()) {
Object updateValue = item.getUpdateValue();
if(!StringUtils.isEmpty(item.getUpdateValue()) && item.getUpdateValue().contains(MesExtConstWords.COLON)){
containsColon = true;
updateValue = isSuccess ? item.getUpdateValue().split(MesExtConstWords.COLON)[0]:item.getUpdateValue().split(MesExtConstWords.COLON)[1];
}
@ -351,6 +353,11 @@ public class WmsSAPDbWriter extends WmsSAPDbSyncBase {
updateSyncMap.put(item.getColumnName(), updateValue);
}
//如果未配置失败的标识报错
if(!isSuccess && !containsColon){
LOGGER.error("WmsSAPDbWriter.saveSrcData 失败标识未配置");
throw new Exception("WmsSAPDbWriter.saveSrcData 失败标识未配置");
}
return updateSyncMap;
}

Loading…
Cancel
Save