diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/service/impl/FieldxServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/service/impl/FieldxServiceImpl.java index b8366ca..e56838e 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/service/impl/FieldxServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/service/impl/FieldxServiceImpl.java @@ -9,6 +9,7 @@ import org.jeecg.modules.fieldx.service.IFieldxService; import org.jeecg.modules.tablex.entity.Tablex; import org.jeecg.modules.tablex.service.ITablexService; import org.jeecg.modules.tablex.ws.WebSocketUtils; +import org.jsoup.helper.StringUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -40,12 +41,16 @@ public class FieldxServiceImpl extends ServiceImpl impleme try { Thread.sleep(500L); message.put("uploaded", String.valueOf(i + 1)); - this.save(fieldxList.get(i)); - if(fieldxList.get(i).getAssociateTable()==null&&fieldxList.get(i).getAssociateField()==null){ - Tablex tablex = tablexService.getById(fieldxList.get(i).getTableId()); - tablexService.updateVersion(fieldxList.get(i).getTableId(), tablex.getVerison() + 1); - tablexService.updateSql(fieldxList.get(i).getTableId(), fieldxController.createSql(fieldxList.get(i).getTableId())); + Fieldx fieldx=fieldxList.get(i); + this.save(fieldx); + if(!StringUtil.isBlank(fieldx.getAssociateTable())||!StringUtil.isBlank(fieldx.getAssociateField())){ + webSocketUtils.sendMessage(loginUser.getId(), message); + break; } + Tablex tablex = tablexService.getById(fieldx.getTableId()); + tablexService.updateVersion(fieldx.getTableId(), tablex.getVerison() + 1); + tablexService.updateSql(fieldx.getTableId(), fieldxController.createSql(fieldx.getTableId())); + webSocketUtils.sendMessage(loginUser.getId(), message); } catch (InterruptedException e) { log.error(e.getMessage(), e);