| | |
| | | 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; |
| | |
| | | */ |
| | | @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; |
| | | } |
| | |
| | | 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 ; |
| | | } |
| | | |