
5 changed files with 172 additions and 0 deletions
@ -0,0 +1,37 @@ |
|||
package com.yxt.oms.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.oms.biz.func.goodsspu.GoodsSpuService; |
|||
import com.yxt.oms.biz.func.goodsspu.SalesGoodsQuery; |
|||
import com.yxt.oms.biz.func.goodsspu.SalesGoodsVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.io.IOException; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2024/3/7 16:58 |
|||
*/ |
|||
@Api(tags = "商品spu") |
|||
@RestController |
|||
@RequestMapping("/apiadmin/base/basegoodsspu") |
|||
public class GoodsSpuRest { |
|||
@Autowired |
|||
GoodsSpuService goodsSpuService; |
|||
|
|||
|
|||
@ApiOperation("销售订单获取商品") |
|||
@PostMapping("/getGoodsForSales") |
|||
public ResultBean<PagerVo<SalesGoodsVo>> getGoodsForSales(@RequestBody PagerQuery<SalesGoodsQuery> pq) { |
|||
return goodsSpuService.getGoodsForSales(pq); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.oms.biz.func.goodsspu; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.oms.feign.goods.goodsSpu.GoodsSpuFeign; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.io.IOException; |
|||
import java.util.*; |
|||
import java.util.concurrent.ConcurrentHashMap; |
|||
import java.util.function.Function; |
|||
import java.util.function.Predicate; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2024/2/26 13:40 |
|||
*/ |
|||
@Service |
|||
public class GoodsSpuService { |
|||
private GoodsSpuFeign goodsSpuFeign; |
|||
|
|||
|
|||
public ResultBean<PagerVo<SalesGoodsVo>> getGoodsForSales(PagerQuery<SalesGoodsQuery> pq) { |
|||
return goodsSpuFeign.getGoodsForSales(pq); |
|||
} |
|||
} |
@ -0,0 +1,15 @@ |
|||
package com.yxt.oms.biz.func.goodsspu; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Fan |
|||
* @description |
|||
* @date 2024/7/19 17:42 |
|||
*/ |
|||
@Data |
|||
public class SalesGoodsQuery implements Query { |
|||
private String goodsName; |
|||
private String createOrgSid; |
|||
} |
@ -0,0 +1,62 @@ |
|||
package com.yxt.oms.biz.func.goodsspu; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Fan |
|||
* @description |
|||
* @date 2024/7/19 17:43 |
|||
*/ |
|||
@Data |
|||
public class SalesGoodsVo implements Vo { |
|||
|
|||
/** |
|||
* 辅单位数量 |
|||
*/ |
|||
private String auxiliaryUnit; |
|||
/** |
|||
* 数量 |
|||
*/ |
|||
private String count; |
|||
/** |
|||
* 商品基础信息Sid |
|||
*/ |
|||
private String goodSpuSid; |
|||
/** |
|||
* 商品编码 |
|||
*/ |
|||
private String goodsSkuCode; |
|||
/** |
|||
* 规格型号 |
|||
*/ |
|||
private String goodsSkuOwnSpec; |
|||
/** |
|||
* 商品Skusid |
|||
*/ |
|||
private String goodsSkuSid; |
|||
/** |
|||
* 商品Sku名称 |
|||
*/ |
|||
private String goodsSkuTitle; |
|||
/** |
|||
* 商品名称 |
|||
*/ |
|||
private String goodsSpuName; |
|||
/** |
|||
* 销售单价 |
|||
*/ |
|||
private String price; |
|||
/** |
|||
* 计量单位 |
|||
*/ |
|||
private String unit; |
|||
/** |
|||
* 体积(立方米) |
|||
*/ |
|||
private String volume; |
|||
/** |
|||
* 重量(kg) |
|||
*/ |
|||
private String weight; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.oms.feign.goods.goodsSpu; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.oms.biz.func.goodsspu.SalesGoodsQuery; |
|||
import com.yxt.oms.biz.func.goodsspu.SalesGoodsVo; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fzz |
|||
* @date: 2024/7/4 |
|||
**/ |
|||
@FeignClient( |
|||
contextId = "ss-goods-GoodsSpu", |
|||
name = "ss-goods", |
|||
path = "/apiadmin/base/basegoodsspu") |
|||
public interface GoodsSpuFeign { |
|||
|
|||
@ApiOperation("销售订单获取商品") |
|||
@PostMapping("/getGoodsForSales") |
|||
public ResultBean<PagerVo<SalesGoodsVo>> getGoodsForSales(@RequestBody PagerQuery<SalesGoodsQuery> pq); |
|||
} |
Loading…
Reference in new issue