mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
配件列表分页,查询参数修改
This commit is contained in:
+1
-1
@@ -124,7 +124,7 @@ public class PackController {
|
|||||||
@GetMapping("/getParts")
|
@GetMapping("/getParts")
|
||||||
@Operation(summary = "查看配件列表")
|
@Operation(summary = "查看配件列表")
|
||||||
@PreAuthorize("@ss.hasPermission('manage:pack-parts:query')")
|
@PreAuthorize("@ss.hasPermission('manage:pack-parts:query')")
|
||||||
public CommonResult<List<OrderPartsRespVO>> getParts(@Valid OrderPartsReqVO reqVO) {
|
public CommonResult<PageResult<OrderPartsRespVO>> getParts(@Valid OrderPartsReqVO reqVO) {
|
||||||
|
|
||||||
return success(packService.getPartsList(reqVO));
|
return success(packService.getPartsList(reqVO));
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@ public interface OrderPartsMapper extends BaseMapperX<OrderPartsNDO> {
|
|||||||
IPage<PackageDetailsRespVO> selectParts(@Param("page") IPage page, @Param("packageId") Long packageId, @Param("organId") Long organId);
|
IPage<PackageDetailsRespVO> selectParts(@Param("page") IPage page, @Param("packageId") Long packageId, @Param("organId") Long organId);
|
||||||
|
|
||||||
|
|
||||||
List<OrderPartsRespVO> selectPartsList( @Param("orderId") Long orderId , @Param("organId") Long organId);
|
IPage<OrderPartsRespVO> selectPartsList(@Param("page") IPage page, @Param("orderId") Long orderId , @Param("organId") Long organId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ public interface PackService {
|
|||||||
|
|
||||||
|
|
||||||
// 查看配件列表分页
|
// 查看配件列表分页
|
||||||
List<OrderPartsRespVO> getPartsList(OrderPartsReqVO reqVO);
|
PageResult<OrderPartsRespVO> getPartsList(OrderPartsReqVO reqVO);
|
||||||
|
|
||||||
OrderPackRespVO updateParts(OrderPartsReqVO reqVO);
|
OrderPackRespVO updateParts(OrderPartsReqVO reqVO);
|
||||||
|
|
||||||
|
|||||||
+7
-5
@@ -170,15 +170,17 @@ public class PackServiceImpl implements PackService {
|
|||||||
|
|
||||||
// 查看配件列表分页
|
// 查看配件列表分页
|
||||||
@Override
|
@Override
|
||||||
public List<OrderPartsRespVO> getPartsList(OrderPartsReqVO reqVO) {
|
public PageResult<OrderPartsRespVO> getPartsList(OrderPartsReqVO reqVO) {
|
||||||
|
|
||||||
// PageDTO<OrderPartsRespVO> page = new PageDTO<>(reqVO.getPageNo(), reqVO.getPageSize());
|
PageDTO<OrderPartsRespVO> page = new PageDTO<>(reqVO.getPageNo(), reqVO.getPageSize());
|
||||||
|
|
||||||
List<OrderPartsRespVO> orderPartsRespVOS = orderPartsMapper.selectPartsList(reqVO.getOrderId(),getUserOrganId());
|
IPage<OrderPartsRespVO> orderPartsRespVOS = orderPartsMapper.selectPartsList(page,reqVO.getOrderId(),getUserOrganId());
|
||||||
|
|
||||||
|
if (CollectionUtil.isEmpty(orderPartsRespVOS.getRecords())) {
|
||||||
|
return new PageResult<>();
|
||||||
|
}
|
||||||
|
|
||||||
return orderPartsRespVOS;
|
return new PageResult<>(orderPartsRespVOS.getRecords(), orderPartsRespVOS.getTotal());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
|
|
||||||
select distinct
|
select distinct
|
||||||
op.id as partsId,op.name,op.model,op.spec,oi.num as num,op.unit,op.brand,op.factory,op.remark
|
op.id as partsId,op.name,op.model,op.spec,oi.num as num,op.unit,op.brand,op.factory,op.remark,op.type
|
||||||
from order_parts op
|
from order_parts op
|
||||||
join order_item oi on op.id = oi.parts_id and op.organ_id = oi.organ_id
|
join order_item oi on op.id = oi.parts_id and op.organ_id = oi.organ_id
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user