|
|
@@ -202,20 +202,22 @@ public class PtlAgreementDispatchServiceImpl extends ServiceImpl<PtlAgreementDis
|
|
|
}
|
|
|
}
|
|
|
}else if("change_bs_account".equals(action.getActionCode())){
|
|
|
- String accountId = action.getActionJson().get("accountId").toString();
|
|
|
- if(Objects.nonNull(accountId)){
|
|
|
- HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution2(accountId);
|
|
|
- //HttpResult<PtlAgreementAttribution> agreementAttribution = esmInsCompanyClient.getAgreementAttribution(accountId);
|
|
|
- if (agreementAttribution.getCode() == 200) {
|
|
|
- PtlAgreementAttribution data = agreementAttribution.getData();
|
|
|
- action.getActionJson().put("userName", data.getUsername());
|
|
|
- action.getActionJson().put("companyName", data.getInsCompanyName());
|
|
|
+ if (action.getActionJson() != null && !action.getActionJson().isEmpty()) {
|
|
|
+ // 修改这里:直接使用 getString,即使值为 null 也不会报错
|
|
|
+ String accountId = action.getActionJson().getString("accountId");
|
|
|
+ // 你的 Objects.nonNull 判断依然有效且非常规范
|
|
|
+ if (Objects.nonNull(accountId)) {
|
|
|
+ HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution2(accountId);
|
|
|
+ if (agreementAttribution.getCode() == 200) {
|
|
|
+ PtlAgreementAttribution data = agreementAttribution.getData();
|
|
|
+ action.getActionJson().put("userName", data.getUsername());
|
|
|
+ action.getActionJson().put("companyName", data.getInsCompanyName());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
PtlAgreementDispatchVo.DispatchVo vo = new PtlAgreementDispatchVo.DispatchVo(dispatch,attrLinks,actions);
|
|
|
dispatchVos.getDispatchVos().add(vo);
|
|
|
}
|