修复bug:综合管理 — 三项制度管理 — 安全生产责任制列表与总数不相符的问题

dev
WL 2024-06-20 09:09:31 +08:00
parent 8b0567523c
commit b93c729c4b
2 changed files with 19 additions and 13 deletions

View File

@ -92,17 +92,6 @@ public class TextLibraryServiceImpl implements TextLibraryService {
*/ */
public List<PageData> list(Page page) throws Exception { public List<PageData> list(Page page) throws Exception {
List<PageData> list = textlibraryMapper.datalistPage(page); List<PageData> list = textlibraryMapper.datalistPage(page);
list = list.stream().parallel().distinct().collect(Collectors.toList());
page.setTotalResult(list.size());
if (page.getTotalResult() % page.getShowCount() == 0)
page.setTotalPage(page.getTotalResult() / page.getShowCount());
else
page.setTotalPage(page.getTotalResult() / page.getShowCount() + 1);
if (page.getCurrentPage() <= 0)
page.getPd().put("currentResult", (page.getCurrentPage()) * page.getShowCount());
else
page.getPd().put("currentResult", (page.getCurrentPage() - 1) * page.getShowCount());
for (PageData entity : list) { for (PageData entity : list) {
List<PageData> _labels = libraryLabelsMapper.findBylibraryId(entity); List<PageData> _labels = libraryLabelsMapper.findBylibraryId(entity);
// 安全操作规程 // 安全操作规程

View File

@ -137,8 +137,25 @@
<!-- 列表 --> <!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd"> <select id="datalistPage" parameterType="page" resultType="pd">
select select DISTINCT
<include refid="Field"></include>, ( f.BUS_TEXT_LIBRARY_ID ),
f.REMARKS,
f.TYPE,
f.TYPE_NAME,
f.FILE_NAME,
f.UPLOAD_TIME,
f.UPLOAD_USER,
f.UPLOAD_USER_NAME,
f.PATH,
f.REMOTE_PATH,
f.CREATED_TIME,
f.ISDELETE,
f.REMOTE_FILE_NAME,
f.LOCKTOOL,
f.ISTOPTIME,
f.ASSOCIATION,
f.STATUS,
f.CORPINFO_ID,
bci.CORP_NAME bci.CORP_NAME
from from
<include refid="tableName"></include> f <include refid="tableName"></include> f