Commit 4f6d0024 authored by tianbo's avatar tianbo

refactor(amos-boot-module-jg): 优化代码结构和可读性

- 重构了 create96333Code 方法的返回结果处理逻辑 - 移除了 updateUseRegistrationManage 最后更新historyData逻辑
parent 04f37f80
......@@ -867,12 +867,14 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
Map<String, Object> result = tzsServiceFeignClient.createCode(map).getResult();
return ImmutableMap.<String, String>builder()
.put("superviseCode", superviseCode)
.put("code96333", Optional.ofNullable(result)
.map(r -> (String) r.get("code96333"))
.orElse(null))
.build();
ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
builder.put("superviseCode", superviseCode);
Optional.ofNullable(result)
.map(r -> (String) r.get("code96333"))
.ifPresent(code -> builder.put("code96333", code));
return builder.build();
}
public void saveChangeRecord(JgChangeRegistrationTransfer transfer, TaskV2Model taskV2Model) {
......@@ -1095,10 +1097,6 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
// 批量保存新的注册管理对象
useRegistrationManageService.saveOrUpdateBatch(newRegistrationList);
// 保存历史数据
historyJson.put("registrationList", updatedRegistrationList);
historyData.setChangeData(JSONObject.toJSONString(historyJson));
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment