package com.ruoyi.inspect.service.impl;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.ruoyi.basic.dto.IfsInventoryQuantityDto;
|
import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto;
|
import com.ruoyi.basic.mapper.StandardTreeMapper;
|
import com.ruoyi.basic.pojo.IfsInventoryQuantity;
|
import com.ruoyi.common.enums.OrderType;
|
import com.ruoyi.common.utils.QueryWrappers;
|
import com.ruoyi.inspect.service.OutsourcingFinishProductInspectionService;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
/**
|
* 外购成品检验serviceImpl
|
*/
|
@Slf4j
|
@Service
|
public class OutsourcingFinishProductInspectionServiceImpl implements OutsourcingFinishProductInspectionService {
|
|
@Autowired
|
private StandardTreeMapper standardTreeMapper;
|
|
@Override
|
public IPage<IfsInventoryQuantity> getWarehouseSubmit(Page page, IfsInventoryQuantity ifsInventoryQuantity) {
|
ifsInventoryQuantity.setOrderType(OrderType.WG.getValue());
|
return standardTreeMapper.selectIfsPage(page, QueryWrappers.queryWrappers(ifsInventoryQuantity));
|
}
|
|
@Override
|
public IPage<IfsInventoryQuantitySupplierDto> getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) {
|
String beginDeclareDate = ifsInventoryQuantityDto.getBeginDeclareDate();
|
String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate();
|
ifsInventoryQuantityDto.setBeginDeclareDate(null);
|
ifsInventoryQuantityDto.setEndDeclareDate(null);
|
ifsInventoryQuantityDto.setOrderType(OrderType.WG.getValue());
|
IPage<IfsInventoryQuantitySupplierDto> ifsByOver = standardTreeMapper.getIfsByOver(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate);
|
ifsByOver.getRecords().forEach(r->r.setOrderTypeName(OrderType.getLabelByValue(r.getOrderType())));
|
return ifsByOver;
|
}
|
|
@Override
|
public IPage<IfsInventoryQuantityDto> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, IfsInventoryQuantityDto ifsInventoryQuantityDto) {
|
ifsInventoryQuantityDto.setOrderType(OrderType.WG.getValue());
|
return standardTreeMapper.getIfsByStateOne(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto));
|
}
|
}
|