From 253351bf40fca4961a8e94dcbf23ef2004a51b95 Mon Sep 17 00:00:00 2001 From: qiezi <15576055375@163.com> Date: Tue, 12 Nov 2024 10:13:22 +0800 Subject: [PATCH] 20241112 --- .../controller/PartInformationController.java | 18 ++++++ .../part/mapper/PartInformationMapper.java | 4 ++ .../part/service/PartInformationService.java | 4 ++ .../impl/PartInformationServiceImpl.java | 12 ++++ .../modules/part/vo/PartInformationVo.java | 3 + .../mapper/part/PartInformationMapper.xml | 62 +++++++++++++++++++ 6 files changed, 103 insertions(+) diff --git a/src/main/java/com/xujie/sys/modules/part/controller/PartInformationController.java b/src/main/java/com/xujie/sys/modules/part/controller/PartInformationController.java index 3b1fb7d1..c3c26d93 100644 --- a/src/main/java/com/xujie/sys/modules/part/controller/PartInformationController.java +++ b/src/main/java/com/xujie/sys/modules/part/controller/PartInformationController.java @@ -1,5 +1,6 @@ package com.xujie.sys.modules.part.controller; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.xujie.sys.common.utils.PageUtils; import com.xujie.sys.common.utils.R; import com.xujie.sys.modules.base.entity.Chooselist; @@ -55,6 +56,23 @@ public class PartInformationController { return R.ok().put("page", page); } + + @PostMapping + @ResponseBody + public R handleQueryPart(@RequestBody PartInformationVo part){ + List list = partInformationService.handleQueryPart(part); + return R.ok().put("rows", list); + } + + @PostMapping("/{no}/{size}") + @ResponseBody + public R handleQueryPartByPage(@RequestBody PartInformationVo part, + @PathVariable int no, + @PathVariable int size){ + IPage page = partInformationService.handleQueryPartByPage(part, no, size); + return R.ok().put("rows",page.getRecords()).put("total",page.getTotal()); + } + /** * @description: 材料信息新增 * @author: fengyuan_yang diff --git a/src/main/java/com/xujie/sys/modules/part/mapper/PartInformationMapper.java b/src/main/java/com/xujie/sys/modules/part/mapper/PartInformationMapper.java index 29240a75..700813ee 100644 --- a/src/main/java/com/xujie/sys/modules/part/mapper/PartInformationMapper.java +++ b/src/main/java/com/xujie/sys/modules/part/mapper/PartInformationMapper.java @@ -143,4 +143,8 @@ public interface PartInformationMapper extends BaseMapper void savePartDefaultLocation(List ifsDefaultLocations); String getNextPartNo2(PartInformationVo data); + + IPage handleQueryPartByPage(@Param("page") Page page,@Param("params") PartInformationVo part); + + List handleQueryPart(PartInformationVo part); } diff --git a/src/main/java/com/xujie/sys/modules/part/service/PartInformationService.java b/src/main/java/com/xujie/sys/modules/part/service/PartInformationService.java index 86d6679b..0c23fd91 100644 --- a/src/main/java/com/xujie/sys/modules/part/service/PartInformationService.java +++ b/src/main/java/com/xujie/sys/modules/part/service/PartInformationService.java @@ -1,5 +1,6 @@ package com.xujie.sys.modules.part.service; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.xujie.sys.common.utils.PageUtils; import com.xujie.sys.modules.part.entity.*; @@ -81,4 +82,7 @@ public interface PartInformationService extends IService void copyPart(PartInformationVo inData); + List handleQueryPart(PartInformationVo part); + + IPage handleQueryPartByPage(PartInformationVo part, int no, int size); } diff --git a/src/main/java/com/xujie/sys/modules/part/service/impl/PartInformationServiceImpl.java b/src/main/java/com/xujie/sys/modules/part/service/impl/PartInformationServiceImpl.java index ea552a87..18ec9edf 100644 --- a/src/main/java/com/xujie/sys/modules/part/service/impl/PartInformationServiceImpl.java +++ b/src/main/java/com/xujie/sys/modules/part/service/impl/PartInformationServiceImpl.java @@ -696,4 +696,16 @@ public class PartInformationServiceImpl extends ServiceImpl handleQueryPart(PartInformationVo part) { + return baseMapper.handleQueryPart(part); + } + + @Override + public IPage handleQueryPartByPage(PartInformationVo part, int no, int size) { + Page page = new Page<>(no, size); + return baseMapper.handleQueryPartByPage(page, part); + } } diff --git a/src/main/java/com/xujie/sys/modules/part/vo/PartInformationVo.java b/src/main/java/com/xujie/sys/modules/part/vo/PartInformationVo.java index 4931a463..25f0b899 100644 --- a/src/main/java/com/xujie/sys/modules/part/vo/PartInformationVo.java +++ b/src/main/java/com/xujie/sys/modules/part/vo/PartInformationVo.java @@ -87,6 +87,8 @@ public class PartInformationVo extends PartInformationEntity { * 模板名称 **/ private String codeDesc; + + private Integer buId; /** * 代理商集合 */ @@ -120,4 +122,5 @@ public class PartInformationVo extends PartInformationEntity { private String activeDesc; private String partType2Desc; + } diff --git a/src/main/resources/mapper/part/PartInformationMapper.xml b/src/main/resources/mapper/part/PartInformationMapper.xml index 8253477b..ecdbe370 100644 --- a/src/main/resources/mapper/part/PartInformationMapper.xml +++ b/src/main/resources/mapper/part/PartInformationMapper.xml @@ -771,4 +771,66 @@ + + + +