fix:退料页面优化,对账修改关闭逐个查询
This commit is contained in:
@@ -32,7 +32,7 @@ import java.util.stream.Collectors;
|
||||
public class SapStockQueryService {
|
||||
|
||||
/** 单次请求的最大物料数,避免报文过大 */
|
||||
private static final int BATCH_SIZE = 200;
|
||||
private static final int BATCH_SIZE = 10000;
|
||||
|
||||
private final SapApi sapApi;
|
||||
|
||||
@@ -77,8 +77,9 @@ public class SapStockQueryService {
|
||||
JSONObject result = sapApi.stockQueryBatch(chunk, SapConstant.WERKS, targetLgort);
|
||||
mergeInto(merged, parse(result));
|
||||
} catch (Exception e) {
|
||||
log.warn("SAP库存批量查询失败({}个物料),退回逐个查询:{}", chunk.size(), e.getMessage());
|
||||
queryOneByOne(merged, chunk, targetLgort, failedMaterials);
|
||||
throw new BadRequestException("SAP库存查询失败:" + e.getMessage());
|
||||
// log.warn("SAP库存批量查询失败({}个物料),退回逐个查询:{}", chunk.size(), e.getMessage());
|
||||
// queryOneByOne(merged, chunk, targetLgort, failedMaterials);
|
||||
}
|
||||
}
|
||||
return merged;
|
||||
|
||||
@@ -52,9 +52,6 @@
|
||||
<if test="query.sourceHouseCode != null and query.sourceHouseCode != ''">
|
||||
and source_house_code like concat('%', #{query.sourceHouseCode}, '%')
|
||||
</if>
|
||||
<if test="query.sourceHouseCode != null and query.sourceHouseCode != ''">
|
||||
and target_house_code like concat('%', #{query.targetHouseCode}, '%')
|
||||
</if>
|
||||
<if test="query.status != null">
|
||||
and status = #{query.status}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user