feat(pocket): 实现工厂状态数据分页查询功能

- 为Klptcm1ProPlantStateCurrent实体补充VALUE1至VALUE99字段定义及注释
- 更新Klptcm1ProPlantStateCurrentMapper.xml,完善所有VALUE字段的resultMap和column list映射- 修改IKlptcm1ProPlantStateCurrentService接口,将selectAll方法改为支持分页查询- 调整Klptcm1ProPlantStateCurrentController控制器,继承BaseController并支持分页参数- 新增Klptcm1ProPlantStateDefine相关组件(domain、controller、service、mapper),实现状态定义表的分页查询能力- 引入PageQuery与TableDataInfo等通用分页工具类,统一前后端分页交互格式
- 更新Mapper XML配置文件,优化SQL结构并确保大数据量下的查询性能
This commit is contained in:
2025-10-27 18:07:12 +08:00
parent 6ff235d56d
commit bbecc3c55f
12 changed files with 923 additions and 13 deletions

View File

@@ -1,6 +1,9 @@
package com.klp.pocket.controller;
import com.klp.common.core.controller.BaseController;
import com.klp.common.core.domain.PageQuery;
import com.klp.common.core.domain.R;
import com.klp.common.core.page.TableDataInfo;
import com.klp.pocket.domain.Klptcm1ProPlantStateCurrent;
import com.klp.pocket.service.IKlptcm1ProPlantStateCurrentService;
import org.springframework.web.bind.annotation.*;
@@ -8,8 +11,8 @@ import javax.annotation.Resource;
import java.util.List;
@RestController
@RequestMapping("/api/klptcm1ProPlantStateCurrent")
public class Klptcm1ProPlantStateCurrentController {
@RequestMapping("/pocket/proPlantStateCurrent")
public class Klptcm1ProPlantStateCurrentController extends BaseController {
@Resource
private IKlptcm1ProPlantStateCurrentService klptcm1ProPlantStateCurrentService;
@@ -18,9 +21,9 @@ public class Klptcm1ProPlantStateCurrentController {
* 查询所有数据
*/
@GetMapping("/selectAll")
public R<List<Klptcm1ProPlantStateCurrent>> selectAll() {
List<Klptcm1ProPlantStateCurrent> result = klptcm1ProPlantStateCurrentService.selectAll();
return R.ok(result);
public TableDataInfo<Klptcm1ProPlantStateCurrent> selectAll(PageQuery pageQuery) {
return klptcm1ProPlantStateCurrentService.selectAll(pageQuery);
}
}

View File

@@ -0,0 +1,34 @@
package com.klp.pocket.controller;
import com.klp.common.core.controller.BaseController;
import com.klp.common.core.domain.PageQuery;
import com.klp.common.core.page.TableDataInfo;
import com.klp.pocket.domain.Klptcm1ProPlantStateDefine;
import com.klp.pocket.service.IKlptcm1ProPlantStateDefineService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
/**
* 工厂状态定义表Controller
* 提供RESTful接口处理前端请求
*/
@RestController
@RequestMapping("/pocket/proPlantStateDefine")
public class Klptcm1ProPlantStateDefineController extends BaseController {
@Resource
private IKlptcm1ProPlantStateDefineService defineService;
/**
* 分页查询状态定义列表
* @param pageQuery 分页参数(请求参数,如?pageNum=1&pageSize=10
* @return 分页表格数据
*/
@GetMapping("/listPage")
public TableDataInfo<Klptcm1ProPlantStateDefine> getDefinePage(PageQuery pageQuery) {
return defineService.getDefinePage(pageQuery);
}
}