|
|
@@ -37,6 +37,7 @@ import org.springblade.core.tool.utils.ObjectUtil;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
+import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -82,7 +83,7 @@ public class PurchaseOrderController extends BladeController {
|
|
|
@GetMapping("/list")
|
|
|
@ApiOperationSupport(order = 2)
|
|
|
@ApiOperation(value = "采购订单表列表(内贸 外贸 出口)", notes = "传入order")
|
|
|
- public R<IPage<Order>> list( @RequestParam(name = "current", defaultValue = "1") Integer current,
|
|
|
+ public R<?> list( @RequestParam(name = "current", defaultValue = "1") Integer current,
|
|
|
@RequestParam(name = "size", defaultValue = "10") Integer size,
|
|
|
@RequestParam(value = "strCorpName",required = false) String strCorpName,//供应商名称
|
|
|
@RequestParam(value = "strPurchaserName",required = false) String strPurchaserName,//采购商名称
|
|
|
@@ -110,10 +111,16 @@ public class PurchaseOrderController extends BladeController {
|
|
|
List<Long> corpIds = corpsDescs.stream().map(CorpsDesc::getId).collect(Collectors.toList());
|
|
|
queryWrapper.in("corp_id",corpIds);
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return R.data(Collections.EMPTY_LIST,"暂无相关数据");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|
|
|
//采购商
|
|
|
- if(StringUtils.isBlank(strPurchaserName))
|
|
|
+ if(StringUtils.isNotBlank(strPurchaserName))
|
|
|
{
|
|
|
List<CorpsDesc> corpsDescs = corpsDescClient.listCorpByName(strPurchaserName);
|
|
|
if(CollectionUtils.isNotEmpty(corpsDescs))
|
|
|
@@ -121,6 +128,11 @@ public class PurchaseOrderController extends BladeController {
|
|
|
List<Long> purchaserIds = corpsDescs.stream().map(CorpsDesc::getId).collect(Collectors.toList());
|
|
|
queryWrapper.in("purchaser_id",purchaserIds);
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return R.data(Collections.EMPTY_LIST,"暂无相关数据");
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
queryWrapper.eq("tenant_id",AuthUtil.getTenantId());
|
|
|
queryWrapper.eq("bill_type",OrderTypeEnum.PURCHASE.getType());
|