|
@@ -0,0 +1,37 @@
|
|
|
+package org.dromara.InventoryManagement.service.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import org.dromara.InventoryManagement.domain.InventoryFlow;
|
|
|
+import org.dromara.InventoryManagement.domain.bo.InventoryFlowBo;
|
|
|
+import org.dromara.InventoryManagement.domain.vo.InventoryFlowVo;
|
|
|
+import org.dromara.InventoryManagement.mapper.InventoryFlowMapper;
|
|
|
+import org.dromara.InventoryManagement.service.InventoryFlowService;
|
|
|
+import org.dromara.common.core.utils.StringUtils;
|
|
|
+import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
+import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 库存流水服务实现
|
|
|
+ */
|
|
|
+@RequiredArgsConstructor
|
|
|
+@Service
|
|
|
+public class InventoryFlowServiceImpl implements InventoryFlowService {
|
|
|
+ private final InventoryFlowMapper inventoryFlowMapper;
|
|
|
+ /**
|
|
|
+ * 根据InventoryFlow对象分页查询库存流水数据
|
|
|
+ *
|
|
|
+ * @param inventoryFlowBo 库存流水Bo对象
|
|
|
+ * @param pageQuery 分页信息
|
|
|
+ * @return 分页结果
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public TableDataInfo<InventoryFlowVo> selectPageInventoryFlowList(InventoryFlowBo inventoryFlowBo, PageQuery pageQuery) {
|
|
|
+ QueryWrapper<InventoryFlow> qw = new QueryWrapper<>();
|
|
|
+ qw.eq(StringUtils.isNotBlank(inventoryFlowBo.getName()),"name",inventoryFlowBo.getName());
|
|
|
+ Page<InventoryFlowVo> page= inventoryFlowMapper.selectVoPage(pageQuery.build(), qw);
|
|
|
+ return TableDataInfo.build(page);
|
|
|
+ }
|
|
|
+}
|