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.IfsInventoryQuantitySupplierDto; import com.ruoyi.basic.mapper.StandardTreeMapper; import com.ruoyi.common.enums.OrderType; import com.ruoyi.common.utils.QueryWrappers; import com.ruoyi.inspect.service.IfsOrderInspectionService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** * 销售订单报检service */ @Slf4j @Service public class IfsOrderInspectionServiceImpl implements IfsOrderInspectionService { @Autowired private StandardTreeMapper standardTreeMapper; @Override public IPage getIfsByOver(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) { // todo: 只看我 String beginDeclareDate = ifsInventoryQuantityDto.getBeginDeclareDate(); String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate(); ifsInventoryQuantityDto.setBeginDeclareDate(null); ifsInventoryQuantityDto.setEndDeclareDate(null); IPage ifsByOver = standardTreeMapper.getIfsByOver(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate); ifsByOver.getRecords().forEach(r->r.setOrderTypeName(OrderType.getLabelByValue(r.getOrderType()))); return ifsByOver; } }