去除多选日期时分秒

This commit is contained in:
zhaokaiyao@91isoft.com
2021-12-06 14:06:20 +08:00
parent 691e7b6bcc
commit 3e877d48fe
2 changed files with 27 additions and 4 deletions
@@ -46,6 +46,7 @@ import java.net.URLEncoder;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* <p>
@@ -110,9 +111,24 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
page.setUserId(LoginUserUtil.getUserId());
}
List<SarStandardsInfo> rows = sarStandardsInfoEOService.getSarStandardsInfoPage(page);
// 去掉日期时分秒
rows.forEach(item->{
Optional.ofNullable(item.getSSRQ())
.ifPresent(SSRQ -> item.setSSRQ(item.getSSRQ().replaceAll("\\s[0-6][0-9]\\:[0-6][0-9]\\:[0-6][0-9]", "")));
Optional.ofNullable(item.getXCXSSRQ())
.ifPresent(SSRQ ->item.setXCXSSRQ(item.getXCXSSRQ().replaceAll("\\s[0-6][0-9]\\:[0-6][0-9]\\:[0-6][0-9]", "")));
Optional.ofNullable(item.getZCCSSRQ())
.ifPresent(SSRQ ->item.setZCCSSRQ(item.getZCCSSRQ().replaceAll("\\s[0-6][0-9]\\:[0-6][0-9]\\:[0-6][0-9]", "")));
});
return Result.success(getPageInfo(page.getPager(), rows));
}
private void nowOrderFunc(SarStandardsInfoEOPage page) {
switch (page.getNowOrderBy()) {
case 1: