2026-04-27 f8a1b2069044f16707eedaa22b57d542081d5e26
src/main/java/com/ruoyi/sales/service/impl/ShippingInfoServiceImpl.java
@@ -23,6 +23,7 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collections;
@@ -34,22 +35,28 @@
 */
@Service
@Slf4j
@RequiredArgsConstructor
public class ShippingInfoServiceImpl extends ServiceImpl<ShippingInfoMapper, ShippingInfo> implements ShippingInfoService {
    private final ShippingInfoMapper shippingInfoMapper;
    private final TempFileServiceImpl tempFileService;
    private final SalesLedgerProductMapper salesLedgerProductMapper;
    private final StockUtils stockUtils;
    private final CommonFileServiceImpl commonFileService;
    private final ApproveProcessServiceImpl approveProcessService;
    private final FileUtil fileUtil;
    @Autowired
    private ShippingInfoMapper shippingInfoMapper;
    @Autowired
    private TempFileServiceImpl tempFileService;
    @Autowired
    private SalesLedgerProductMapper salesLedgerProductMapper;
    @Autowired
    private StockUtils stockUtils;
    @Autowired
    private CommonFileServiceImpl commonFileService;
    @Autowired
    private ApproveProcessServiceImpl approveProcessService;
    @Autowired
    private FileUtil fileUtil;
    @Override
    public IPage<ShippingInfoDto> listPage(Page page, ShippingInfo req) {
        IPage<ShippingInfoDto> listPage = shippingInfoMapper.listPage(page, req);
        listPage.getRecords().forEach(item ->{
            item.setStorageBlobVOs(fileUtil.getStorageBlobVOsByApplicationAndRecordTypeAndRecordId(ApplicationTypeEnum.IMAGE, RecordTypeEnum.ShippingInfo, item.getId()));
            item.setStorageBlobVOs(fileUtil.getStorageBlobVOsByApplicationAndRecordTypeAndRecordId(ApplicationTypeEnum.IMAGE, RecordTypeEnum.SHIPPING_INFO, item.getId()));
        });
        return listPage;
    }
@@ -72,7 +79,7 @@
        byId.setShippingDate(req.getShippingDate());
        boolean update = this.updateById(byId);
        // 保存文件
        fileUtil.saveStorageAttachment(ApplicationTypeEnum.IMAGE, RecordTypeEnum.ShippingInfo, req.getId(), req.getStorageBlobDTOs());
        fileUtil.saveStorageAttachment(ApplicationTypeEnum.IMAGE, RecordTypeEnum.SHIPPING_INFO, req.getId(), req.getStorageBlobDTOs());
        return update ;
    }