|
@@ -0,0 +1,41 @@
|
|
|
+package com.sd.business.service.in.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
+import com.sd.business.entity.bom.po.BomSpec;
|
|
|
+import com.sd.business.entity.in.dto.PurchaseWarehousingDto;
|
|
|
+import com.sd.business.entity.in.emums.InDetailTypeEnum;
|
|
|
+import com.sd.business.entity.in.emums.InOutTypeEnum;
|
|
|
+import com.sd.business.entity.in.po.InOutStorage;
|
|
|
+import com.sd.business.entity.in.vo.PurchaseWarehousingVo;
|
|
|
+import com.sd.business.entity.purchase.po.Purchase;
|
|
|
+import com.sd.business.entity.supplier.po.Supplier;
|
|
|
+import com.sd.business.mapper.in.PurchaseWarehousingServiceMapper;
|
|
|
+import com.sd.business.service.in.PurchaseWarehousingService;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
+@Service
|
|
|
+public class PurchaseWarehousingServiceImpl implements PurchaseWarehousingService {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private PurchaseWarehousingServiceMapper purchaseWarehousingServiceMapper;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<PurchaseWarehousingVo> getPage(PurchaseWarehousingDto dto) {
|
|
|
+
|
|
|
+ IWrapper<Object> wrapper = IWrapper.getWrapper();
|
|
|
+ wrapper.eq("ios", InOutStorage::getType, InOutTypeEnum.IN.getKey());
|
|
|
+ wrapper.eq("ios", InOutStorage::getDetailType, InDetailTypeEnum.PURCHASE.getKey());
|
|
|
+ wrapper.like("p", Purchase::getCode, dto.getPurchaseCode());
|
|
|
+ wrapper.like("s", Supplier::getName, dto.getSupplierName());
|
|
|
+ wrapper.like("bs", BomSpec::getCode, dto.getBomSpecCode());
|
|
|
+ wrapper.like("bs", BomSpec::getName, dto.getBomSpecName());
|
|
|
+ wrapper.ge("ios", InOutStorage::getCreateTime, dto.getBeginTime());
|
|
|
+ wrapper.le("ios", InOutStorage::getCreateTime, dto.getEndTime());
|
|
|
+
|
|
|
+ return purchaseWarehousingServiceMapper.getPage(dto.getPage(), wrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|