|
@@ -0,0 +1,53 @@
|
|
|
+package org.dromara.InventoryManagement.service.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import org.dromara.InventoryManagement.domain.PutInStorage;
|
|
|
+import org.dromara.InventoryManagement.domain.bo.PutInStorageBo;
|
|
|
+import org.dromara.InventoryManagement.domain.vo.PutInStorageVo;
|
|
|
+import org.dromara.InventoryManagement.mapper.PutInStorageMapper;
|
|
|
+import org.dromara.InventoryManagement.service.PutInStorageService;
|
|
|
+import org.dromara.commodityManagement.domain.bo.DiBuBo;
|
|
|
+import org.dromara.commodityManagement.service.impl.DiBuServiceImpl;
|
|
|
+import org.dromara.common.core.utils.MapstructUtils;
|
|
|
+import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
+import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+
|
|
|
+@Service
|
|
|
+@RequiredArgsConstructor
|
|
|
+public class PutInStorageServiceImpl implements PutInStorageService {
|
|
|
+
|
|
|
+ private final PutInStorageMapper putInStorageMapper;
|
|
|
+
|
|
|
+ private final DiBuServiceImpl diBuService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询入库订单分页列表
|
|
|
+ * @param putInStorageBo
|
|
|
+ * @param pageQuery
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public TableDataInfo<PutInStorageVo> selectPutInStoragePageList(PutInStorageBo putInStorageBo, PageQuery pageQuery) {
|
|
|
+ QueryWrapper<PutInStorage> qw = new QueryWrapper<>();
|
|
|
+ qw.like(StringUtils.isNotBlank(putInStorageBo.getCode()), "code", putInStorageBo.getCode());
|
|
|
+ qw.eq(StringUtils.isNotBlank(putInStorageBo.getStatus()), "status", putInStorageBo.getStatus());
|
|
|
+// qw.eq(StringUtils.isNotBlank();
|
|
|
+
|
|
|
+ List<PutInStorage> page = putInStorageMapper.selectList(pageQuery.build(), qw);
|
|
|
+ List<PutInStorageVo> supplierVoList = MapstructUtils.convert(page, PutInStorageVo.class);
|
|
|
+ return TableDataInfo.build(supplierVoList);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int insertInventory(PutInStorageBo putInStorageBo) {
|
|
|
+ PutInStorage putInStorage = MapstructUtils.convert(putInStorageBo, PutInStorage.class);
|
|
|
+ // 入库数
|
|
|
+ return putInStorageMapper.insert(putInStorage);
|
|
|
+ }
|
|
|
+}
|