| | |
| | | return gdTaskResultList; |
| | | } |
| | | |
| | | @Override |
| | | public boolean saveBatchTaskResult(List<GdTaskResultEntity> gdTaskResultEntities) { |
| | | gdTaskResultEntities.forEach(gdTaskResult -> { |
| | | String areaCode = gdTaskResult.getAreaCode(); |
| | | if (areaCode != null && !areaCode.isEmpty()) { |
| | | // 分割区域代码并只取最后一组 |
| | | String[] codes = areaCode.split(","); |
| | | if (codes.length > 0) { |
| | | // 取最后一组并去除空格 |
| | | String lastCode = codes[codes.length - 1].trim(); |
| | | if (!lastCode.isEmpty()) { |
| | | // 补零到12位 |
| | | String padded = lastCode + "000000000000".substring(lastCode.length()); |
| | | gdTaskResult.setAreaCode(padded); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | // 执行批量保存并返回结果 |
| | | return saveBatch(gdTaskResultEntities); |
| | | } |
| | | |
| | | /** |
| | | * 将URL中的HTML/XML转义字符还原为原始字符 |
| | | * 主要处理 & 转换为 & |