| | |
| | | import com.ruoyi.basic.pojo.Product; |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import com.ruoyi.basic.service.IProductService; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.sales.service.impl.CommonFileServiceImpl; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | |
| | | private ProductMapper productMapper; |
| | | |
| | | private ProductModelMapper productModelMapper; |
| | | |
| | | private final CommonFileServiceImpl commonFileService; |
| | | |
| | | @Override |
| | | public List<ProductTreeDto> selectProductList(ProductDto productDto) { |
| | |
| | | |
| | | @Override |
| | | public AjaxResult listPage(Page page, ProductAndModelDto productDto) { |
| | | return AjaxResult.success(productModelMapper.listPage(page, productDto)); |
| | | IPage<ProductAndModelDto> productAndModelDtoIPage = productModelMapper.listPage(page, productDto); |
| | | productAndModelDtoIPage.getRecords().forEach(item -> { |
| | | item.setSalesLedgerFiles(commonFileService.getFileListByBusinessId(item.getId(), FileNameType.PRODUCT_MODEL.getValue())); |
| | | }); |
| | | return AjaxResult.success(productAndModelDtoIPage); |
| | | } |
| | | |
| | | |