|
|
@ -9,6 +9,7 @@ import org.jeecg.modules.fieldx.service.IFieldxService; |
|
|
|
import org.jeecg.modules.tablex.entity.Tablex; |
|
|
|
import org.jeecg.modules.tablex.entity.Tablex; |
|
|
|
import org.jeecg.modules.tablex.service.ITablexService; |
|
|
|
import org.jeecg.modules.tablex.service.ITablexService; |
|
|
|
import org.jeecg.modules.tablex.ws.WebSocketUtils; |
|
|
|
import org.jeecg.modules.tablex.ws.WebSocketUtils; |
|
|
|
|
|
|
|
import org.jsoup.helper.StringUtil; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
@ -40,12 +41,16 @@ public class FieldxServiceImpl extends ServiceImpl<FieldxMapper, Fieldx> impleme |
|
|
|
try { |
|
|
|
try { |
|
|
|
Thread.sleep(500L); |
|
|
|
Thread.sleep(500L); |
|
|
|
message.put("uploaded", String.valueOf(i + 1)); |
|
|
|
message.put("uploaded", String.valueOf(i + 1)); |
|
|
|
this.save(fieldxList.get(i)); |
|
|
|
Fieldx fieldx=fieldxList.get(i); |
|
|
|
if(fieldxList.get(i).getAssociateTable()==null&&fieldxList.get(i).getAssociateField()==null){ |
|
|
|
this.save(fieldx); |
|
|
|
Tablex tablex = tablexService.getById(fieldxList.get(i).getTableId()); |
|
|
|
if(!StringUtil.isBlank(fieldx.getAssociateTable())||!StringUtil.isBlank(fieldx.getAssociateField())){ |
|
|
|
tablexService.updateVersion(fieldxList.get(i).getTableId(), tablex.getVerison() + 1); |
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
tablexService.updateSql(fieldxList.get(i).getTableId(), fieldxController.createSql(fieldxList.get(i).getTableId())); |
|
|
|
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); |
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
} catch (InterruptedException e) { |
|
|
|
} catch (InterruptedException e) { |
|
|
|
log.error(e.getMessage(), e); |
|
|
|
log.error(e.getMessage(), e); |
|
|
|