|
|
@@ -18,6 +18,7 @@ package org.springblade.deliver.goods.receiving;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
import com.trade.purchase.order.enums.OrderTypeEnum;
|
|
|
@@ -25,6 +26,11 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
+import org.springblade.client.entity.CorpsDesc;
|
|
|
+import org.springblade.client.entity.StorageDesc;
|
|
|
+import org.springblade.client.feign.ICorpsDescClient;
|
|
|
+import org.springblade.client.feign.IStorageClient;
|
|
|
+import org.springblade.client.storage.feign.StorageClient;
|
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
@@ -38,6 +44,7 @@ import org.springblade.deliver.goods.vo.DeliveryVO;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 国内收货通知单 控制器
|
|
|
@@ -53,6 +60,11 @@ public class ReCeVingController extends BladeController {
|
|
|
|
|
|
private final IDeliveryService deliveryService;
|
|
|
|
|
|
+ private ICorpsDescClient corpsDescClient;//获取客户信息
|
|
|
+
|
|
|
+ private IStorageClient iStorageClient;//库存信息
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 详情
|
|
|
*/
|
|
|
@@ -78,6 +90,33 @@ public class ReCeVingController extends BladeController {
|
|
|
.between(StringUtils.isNotBlank(delivery.getCreateStartTime())&&StringUtils.isNotBlank(delivery.getCreateEndTime()),"create_time",delivery.getCreateStartTime(),delivery.getCreateEndTime())
|
|
|
.between(StringUtils.isNotBlank(delivery.getBusinessStartDate())&&StringUtils.isNotBlank(delivery.getBusinessEndDate()),"business_date",delivery.getBusinessStartDate(),delivery.getBusinessEndDate());
|
|
|
IPage<Delivery> pages = deliveryService.page(Condition.getPage(query), queryWrapper);
|
|
|
+ //解决回显字段问题
|
|
|
+ List<Delivery> records = pages.getRecords();
|
|
|
+ if(CollectionUtils.isNotEmpty(records))
|
|
|
+ {
|
|
|
+ records.forEach(e->{
|
|
|
+ //供应商信息
|
|
|
+ R<CorpsDesc> corps = corpsDescClient.getCorpMessage(e.getCorpId());
|
|
|
+ if(corps.getData()!=null)
|
|
|
+ {
|
|
|
+ e.setCorpsName(corps.getData().getCname());
|
|
|
+ }
|
|
|
+ //所属公司信息
|
|
|
+ R<CorpsDesc> company = corpsDescClient.getCorpMessage(e.getSalesCompany());
|
|
|
+ if(company.getData()!=null)
|
|
|
+ {
|
|
|
+ e.setSalesCompanyName(company.getData().getCname());
|
|
|
+ }
|
|
|
+ //仓库信息
|
|
|
+ StorageDesc storageDesc = iStorageClient.findById(e.getStorageId());
|
|
|
+ if(storageDesc!=null)
|
|
|
+ {
|
|
|
+ e.setStorageName(storageDesc.getCname());
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+ pages.setRecords(records);
|
|
|
return R.data(pages);
|
|
|
}
|
|
|
/**
|