rentaiming
2024-07-01 da07a87738f5c06f6cccf5c8e76f7bec13d253e7
ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/SlVolumeProductionRkServiceImpl.java
@@ -6,6 +6,7 @@
import com.ruoyi.common.core.utils.page.PageDTO;
import com.ruoyi.management.domain.*;
import com.ruoyi.management.domain.dto.ManagementimgVolumeProductionRkQuery;
import com.ruoyi.management.domain.dto.SlGoodsMaterialsSlVolumeProductionRkQuery;
import com.ruoyi.management.domain.vo.ManagementimgVolumeProductionRkVO;
import com.ruoyi.management.domain.vo.SlGoodsShelfVO;
import com.ruoyi.management.mapper.*;
@@ -67,4 +68,30 @@
        }
        return SlGoodsShelfDTO;
    }
    @Override
    public PageDTO<ManagementimgVolumeProductionRkVO> getSlGoodsMaterialsSlVolumeProductionRkList(SlGoodsMaterialsSlVolumeProductionRkQuery SlGoodsMaterialsSlVolumeProductionRkDTO) {
        Page<SlVolumeProductionRk> page = new Page<>(SlGoodsMaterialsSlVolumeProductionRkDTO.getPageCurr(), SlGoodsMaterialsSlVolumeProductionRkDTO.getPageSize());
        LambdaQueryWrapper< SlVolumeProductionRk> wrapper1= Wrappers.lambdaQuery();
        wrapper1.like(SlVolumeProductionRk::getMaterialsId,SlGoodsMaterialsSlVolumeProductionRkDTO.getSlGoodsMaterialsid());
        wrapper1.eq( SlVolumeProductionRk::getDelFlag,0);
        wrapper1.orderByDesc(SlVolumeProductionRk::getCreateTime);
        Page<SlVolumeProductionRk> page2 = this.page(page, wrapper1);
        PageDTO<ManagementimgVolumeProductionRkVO> SlGoodsShelfDTO = PageDTO.of(page2, ManagementimgVolumeProductionRkVO.class);
        List<ManagementimgVolumeProductionRkVO> list2 = SlGoodsShelfDTO.getList();
        for(ManagementimgVolumeProductionRkVO list:list2) {{
            SlGoodsMaterials slGoodsMaterials = slGoodsMaterialsMapper.selectById(list.getMaterialsId());
            SlVolumeProductionRkgl byId = slVolumeProductionRkglMapper.selectById(list.getVolumeProductionRkglId());
            SysUser data = sysUserClient.getSysUser(byId.getSupplierId()).getData();
            list.setGoodsMaterialsName(slGoodsMaterials.getGoodsMaterialsName());
            list.setIsConsume(slGoodsMaterials.getIsConsume());
            list.setSupplierName(data.getNickName());
            SlGoodsShelf slGoodsShelf = slGoodsShelfMapper.selectById(list.getShelfId());
            list.setGoodsShelfName(slGoodsShelf.getGoodsShelfName());
        }
        }
        return SlGoodsShelfDTO;
    }
}