认证-参数项收集-分页
This commit is contained in:
+6
-3
@@ -74,8 +74,10 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
@ApiOperation(value="参数项收集清单-列表查询", notes="参数项收集清单-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
// @RequiresPermissions("params:collectManifest:list")
|
||||
public Result<List<Map<String, Object>>> queryList(ParamsCollectManifestEO paramsCollectManifestEO,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
public Result<?> queryList(ParamsCollectManifestEO paramsCollectManifestEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="500") Integer pageSize,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) {
|
||||
paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%"));
|
||||
}
|
||||
@@ -86,7 +88,8 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
paramsCollectManifestEO.setDre(paramsCollectManifestEO.getDre().replace("%","\\%"));
|
||||
}
|
||||
|
||||
List<Map<String, Object>> list = paramsCollectManifestEOService.queryList(paramsCollectManifestEO, cut);
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage list = paramsCollectManifestEOService.queryList(page, paramsCollectManifestEO, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
|
||||
+8
-3
@@ -1,5 +1,7 @@
|
||||
package com.jero.modules.cert.collect.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
@@ -64,8 +66,10 @@ public class ParamsCollectManifestHistoryEOController extends JeroController<Par
|
||||
@ApiOperation(value="历史参数项收集清单-列表查询", notes="历史参数项收集清单-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
// @RequiresPermissions("params:manifest:history")
|
||||
public Result<List<Map<String, Object>>> queryList(ParamsCollectManifestEO paramsCollectManifestEO,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
public Result<?> queryList(ParamsCollectManifestEO paramsCollectManifestEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="500") Integer pageSize,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) {
|
||||
paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%"));
|
||||
}
|
||||
@@ -76,7 +80,8 @@ public class ParamsCollectManifestHistoryEOController extends JeroController<Par
|
||||
paramsCollectManifestEO.setDre(paramsCollectManifestEO.getDre().replace("%","\\%"));
|
||||
}
|
||||
|
||||
List<Map<String, Object>> list = paramsCollectManifestHistoryEOService.queryList(paramsCollectManifestEO, cut);
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage list = paramsCollectManifestHistoryEOService.queryList(page, paramsCollectManifestEO, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -2,6 +2,7 @@ package com.jero.modules.cert.collect.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
@@ -15,4 +16,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
public interface ParamsCollectManifestEOMapper extends BaseMapper<ParamsCollectManifestEO> {
|
||||
|
||||
List<ParamsCollectManifestEO> listInfo(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
|
||||
|
||||
IPage pageInfo(@Param("page") IPage page, @Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
|
||||
}
|
||||
|
||||
+3
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.cert.collect.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestHistoryEO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -16,4 +17,6 @@ import java.util.List;
|
||||
public interface ParamsCollectManifestHistoryEOMapper extends BaseMapper<ParamsCollectManifestHistoryEO> {
|
||||
|
||||
List<ParamsCollectManifestHistoryEO> listInfo(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
|
||||
|
||||
IPage pageInfo(@Param("page") IPage page, @Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
|
||||
}
|
||||
|
||||
+7
@@ -79,4 +79,11 @@
|
||||
order by del_flag desc, add_flag desc, change_flag desc, nio_number asc
|
||||
</select>
|
||||
|
||||
<select id="pageInfo" resultMap="ParamsCollectManifestEOResultMap">
|
||||
select *
|
||||
from params_collect_manifest
|
||||
<include refid="BaseQuerySql"/>
|
||||
order by del_flag desc, add_flag desc, change_flag desc, nio_number asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+7
@@ -59,4 +59,11 @@
|
||||
<include refid="BaseQuerySql"/>
|
||||
order by nio_number asc
|
||||
</select>
|
||||
|
||||
<select id="pageInfo" resultMap="ParamsCollectManifestHistoryEOResultMap">
|
||||
select *
|
||||
from params_collect_manifest_history
|
||||
<include refid="BaseQuerySql"/>
|
||||
order by nio_number asc
|
||||
</select>
|
||||
</mapper>
|
||||
+3
-1
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.cert.collect.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO;
|
||||
@@ -58,11 +59,12 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
* @param page
|
||||
* @param paramsCollectManifestEO
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> queryList(ParamsCollectManifestEO paramsCollectManifestEO, String cut);
|
||||
IPage queryList(IPage page, ParamsCollectManifestEO paramsCollectManifestEO, String cut);
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
|
||||
+3
-1
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.cert.collect.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestHistoryEO;
|
||||
@@ -17,11 +18,12 @@ public interface IParamsCollectManifestHistoryEOService extends IService<ParamsC
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
* @param page
|
||||
* @param paramsCollectManifestEO
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> queryList(ParamsCollectManifestEO paramsCollectManifestEO, String cut);
|
||||
IPage queryList(IPage page, ParamsCollectManifestEO paramsCollectManifestEO, String cut);
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
|
||||
+6
-3
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
@@ -243,7 +244,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryList(ParamsCollectManifestEO paramsCollectManifestEO, String cut) {
|
||||
public IPage queryList(IPage page, ParamsCollectManifestEO paramsCollectManifestEO, String cut) {
|
||||
String paramsManifestId = paramsCollectManifestEO.getParamsManifestId();
|
||||
|
||||
String userTypes = paramsCollectManifestEO.getUserTypes();
|
||||
@@ -273,7 +274,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
paramsCollectManifestEO.setSdt(loginUser.getUsername());
|
||||
paramsCollectManifestEO.setDreForAuth(loginUser.getUsername());
|
||||
}
|
||||
List<ParamsCollectManifestEO> list = paramsCollectManifestEOMapper.listInfo(paramsCollectManifestEO); // 查询固定列
|
||||
IPage pageInfo = paramsCollectManifestEOMapper.pageInfo(page, paramsCollectManifestEO); // 查询固定列
|
||||
List<ParamsCollectManifestEO> list = pageInfo.getRecords(); // 查询固定列
|
||||
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询配置列
|
||||
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
||||
List<ParamsConfigDataEO> paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(paramsConfigIdList); // 查询所有配置数据
|
||||
@@ -365,7 +367,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
listMap.add(manifestMap);
|
||||
});
|
||||
|
||||
return listMap;
|
||||
pageInfo.setRecords(listMap);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+6
-3
@@ -2,6 +2,7 @@ package com.jero.modules.cert.collect.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
@@ -72,10 +73,11 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryList(ParamsCollectManifestEO paramsCollectManifestEO, String cut) {
|
||||
public IPage queryList(IPage page, ParamsCollectManifestEO paramsCollectManifestEO, String cut) {
|
||||
String paramsManifestId = paramsCollectManifestEO.getParamsManifestId();
|
||||
|
||||
List<ParamsCollectManifestHistoryEO> list = paramsCollectManifestHistoryEOMapper.listInfo(paramsCollectManifestEO); // 查询固定列
|
||||
IPage pageInfo = paramsCollectManifestHistoryEOMapper.pageInfo(page, paramsCollectManifestEO); // 查询固定列
|
||||
List<ParamsCollectManifestHistoryEO> list = pageInfo.getRecords(); // 查询固定列
|
||||
List<ParamsConfigHistoryEO> paramsConfigEOList = paramsConfigHistoryEOService.queryList(paramsManifestId); // 查询配置列
|
||||
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
||||
List<ParamsConfigDataHistoryEO> paramsConfigDataEOList = paramsConfigDataHistoryEOService.queryListByConfigIdList(paramsConfigIdList); // 查询所有配置数据
|
||||
@@ -168,7 +170,8 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
listMap.add(manifestMap);
|
||||
});
|
||||
|
||||
return listMap;
|
||||
pageInfo.setRecords(listMap);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user