Commit 47511e13 authored by suhuiguang's avatar suhuiguang

fix(设备创建) :es双写优化

1.写es移动到最后执行
parent 0fde1e3f
......@@ -1860,9 +1860,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper<IdxBizJgOtherInfo> lambdaOth = new QueryWrapper<IdxBizJgOtherInfo>().lambda();
lambdaOth.eq(IdxBizJgOtherInfo::getRecord, String.valueOf(mapData.get("equipId")));
IdxBizJgOtherInfo otherInfo = otherInfoMapper.selectOne(lambdaOth);
// 更新代办
TaskV2Model taskV2Model = updateAgency(jgUseRegistration);
ESEquipmentCategoryDto esData = processMapData(sequenceNbr, mapData, jgUseRegistration, jgRegistrationHistory, registerInfo, otherInfo, taskV2Model, jsonObject, Boolean.FALSE, null, mapData, Boolean.FALSE);
Optional.ofNullable(registerInfo).ifPresent(info -> {
// 生成证书管理表记录
generateRegistrationManage(jgUseRegistration, registerInfo, Boolean.FALSE, null);
......@@ -1884,7 +1884,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
this.getBaseMapper().updateById(jgUseRegistration);
commonServiceImpl.saveExecuteFlowData2Redis(jgUseRegistration.getInstanceId(), this.buildInstanceRuntimeData(jgUseRegistration));
// 更新es
ESEquipmentCategoryDto esData = processMapData(sequenceNbr, mapData, jgUseRegistration, jgRegistrationHistory, registerInfo, otherInfo, taskV2Model, jsonObject, Boolean.FALSE, null, mapData, Boolean.FALSE);
esEquipmentCategory.saveWithFallback(esData);
eventPublisher.publish(new EquipCreateOrEditEvent(this, BusinessTypeEnum.JG_USAGE_REGISTRATION.name(), Sets.newHashSet(registerInfo.getRecord()), EquipCreateOrEditEvent.EquipType.equip));
}
......
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