|
|
@ -466,12 +466,32 @@ public class HandlingUnitSpecialServiceImpl extends ServiceImpl<HandlingUnitSpec |
|
|
result.setFailCount(0); |
|
|
result.setFailCount(0); |
|
|
result.setFailedUnitIds(new ArrayList<>()); |
|
|
result.setFailedUnitIds(new ArrayList<>()); |
|
|
result.setFailedReasons(new ArrayList<>()); |
|
|
result.setFailedReasons(new ArrayList<>()); |
|
|
|
|
|
} else if (processResult.contains("所有标签IFS修改WDR失败")) { |
|
|
|
|
|
// 全部失败的情况(格式:所有标签IFS修改WDR失败:xxx, xxx)- rqrq |
|
|
|
|
|
List<String> failedUnitIds = new ArrayList<>(); |
|
|
|
|
|
List<String> failedReasons = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
int startIdx = processResult.indexOf(":"); |
|
|
|
|
|
if (startIdx > 0) { |
|
|
|
|
|
String failedPart = processResult.substring(startIdx + 1); |
|
|
|
|
|
String[] failedIds = failedPart.split(", "); |
|
|
|
|
|
for (String id : failedIds) { |
|
|
|
|
|
failedUnitIds.add(id.trim()); |
|
|
|
|
|
failedReasons.add("IFS修改WDR失败"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
result.setSuccessCount(0); |
|
|
|
|
|
result.setFailCount(failedUnitIds.isEmpty() ? handlingUnits.size() : failedUnitIds.size()); |
|
|
|
|
|
result.setFailedUnitIds(failedUnitIds); |
|
|
|
|
|
result.setFailedReasons(failedReasons); |
|
|
|
|
|
|
|
|
|
|
|
log.warn("全部标签IFS修改WDR失败 - rqrq,失败列表:{}", failedUnitIds); |
|
|
} else if (processResult.contains("IFS修改WDR失败")) { |
|
|
} else if (processResult.contains("IFS修改WDR失败")) { |
|
|
// 解析失败的标签 - rqrq |
|
|
|
|
|
|
|
|
// 部分失败的情况(格式:以下标签IFS修改WDR失败:xxx, xxx;成功处理X个标签)- rqrq |
|
|
List<String> failedUnitIds = new ArrayList<>(); |
|
|
List<String> failedUnitIds = new ArrayList<>(); |
|
|
List<String> failedReasons = new ArrayList<>(); |
|
|
List<String> failedReasons = new ArrayList<>(); |
|
|
|
|
|
|
|
|
// 提取失败的标签ID - rqrq |
|
|
|
|
|
int startIdx = processResult.indexOf(":"); |
|
|
int startIdx = processResult.indexOf(":"); |
|
|
int endIdx = processResult.indexOf(";"); |
|
|
int endIdx = processResult.indexOf(";"); |
|
|
if (startIdx > 0 && endIdx > startIdx) { |
|
|
if (startIdx > 0 && endIdx > startIdx) { |
|
|
@ -487,8 +507,10 @@ public class HandlingUnitSpecialServiceImpl extends ServiceImpl<HandlingUnitSpec |
|
|
result.setSuccessCount(handlingUnits.size() - failedUnitIds.size()); |
|
|
result.setSuccessCount(handlingUnits.size() - failedUnitIds.size()); |
|
|
result.setFailedUnitIds(failedUnitIds); |
|
|
result.setFailedUnitIds(failedUnitIds); |
|
|
result.setFailedReasons(failedReasons); |
|
|
result.setFailedReasons(failedReasons); |
|
|
|
|
|
|
|
|
|
|
|
log.warn("部分标签IFS修改WDR失败 - rqrq,失败列表:{}", failedUnitIds); |
|
|
} else { |
|
|
} else { |
|
|
// 全部失败 - rqrq |
|
|
|
|
|
|
|
|
// 未知情况,按全部失败处理 - rqrq |
|
|
List<String> failedUnitIds = new ArrayList<>(); |
|
|
List<String> failedUnitIds = new ArrayList<>(); |
|
|
for (HandlingUnit hu : handlingUnits) { |
|
|
for (HandlingUnit hu : handlingUnits) { |
|
|
failedUnitIds.add(hu.getUnitId()); |
|
|
failedUnitIds.add(hu.getUnitId()); |
|
|
@ -496,7 +518,9 @@ public class HandlingUnitSpecialServiceImpl extends ServiceImpl<HandlingUnitSpec |
|
|
result.setSuccessCount(0); |
|
|
result.setSuccessCount(0); |
|
|
result.setFailCount(handlingUnits.size()); |
|
|
result.setFailCount(handlingUnits.size()); |
|
|
result.setFailedUnitIds(failedUnitIds); |
|
|
result.setFailedUnitIds(failedUnitIds); |
|
|
result.setFailedReasons(Arrays.asList("IFS修改WDR失败")); |
|
|
|
|
|
|
|
|
result.setFailedReasons(Arrays.asList("处理异常")); |
|
|
|
|
|
|
|
|
|
|
|
log.error("WDR修改返回未知结果 - rqrq,返回内容:{}", processResult); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
result.setMessage(processResult); |
|
|
result.setMessage(processResult); |
|
|
|