虚拟清单发布--站内消息去掉空行

This commit is contained in:
zhn
2022-06-21 14:37:03 +08:00
parent eb7c4568b2
commit 650e0b6f0e
@@ -429,10 +429,17 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
if(CollectionUtils.isNotEmpty(updateLogList)){
List<String> contentLogList = updateLogList.stream().map(e -> e.getLogContent()).collect(Collectors.toList());
for(int i=0 ; i < contentLogList.size() ;i++){
contentLog += ""+ (i+1) +"" + contentLogList.get(i) + "</br>";
String content = contentLogList.get(i);
if(StringUtils.isNotBlank(content) && content.endsWith("</br>")){
content = content.substring(0,content.length()-5);
}
contentLog += ""+ (i+1) +"" + content + "</br>";
}
}
}
if(StringUtils.isNotBlank(contentLog) && contentLog.endsWith("</br>")){
contentLog = contentLog.substring(0,contentLog.length()-5);
}
//列表,维护清单不同的字段,addSerialNumber,deleteSerialNumber都为空->证明是没有更新的数据,不发送消息,数据不处理
if(MapUtils.isNotEmpty(baseDiff) || StringUtils.isNotEmpty(contentLog)) {
@@ -481,7 +488,14 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
List<String> contentLogList = updateLogList.stream().map(e -> e.getLogContent()).collect(Collectors.toList());
for(int i=0 ; i < contentLogList.size() ;i++){
contentLog += ""+ (i+1) +"" + contentLogList.get(i) + "</br>";
String content = contentLogList.get(i);
if(StringUtils.isNotBlank(content) && content.endsWith("</br>")){
content = content.substring(0,content.length()-5);
}
contentLog += ""+ (i+1) +"" + content + "</br>";
}
if(StringUtils.isNotBlank(contentLog) && contentLog.endsWith("</br>")){
contentLog = contentLog.substring(0,contentLog.length()-5);
}
iDummyContentChangeEOService.saveBatch(list);
sendMsg(null,dummyInventoryInfoEOList.get(0).getDummyInventoryBaseId(),contentLog ,dummyInventoryBaseEO.getState(),dummyInventoryBaseEO.getCut());