|
@ -45,19 +45,20 @@ public class PortalGoodsController { |
|
|
*/ |
|
|
*/ |
|
|
@PostMapping("getSpuBySku") |
|
|
@PostMapping("getSpuBySku") |
|
|
public List<OmsSpuToSkuKey> getSpuBySku(@RequestBody SkuToGetSpuParam param){ |
|
|
public List<OmsSpuToSkuKey> getSpuBySku(@RequestBody SkuToGetSpuParam param){ |
|
|
LambdaQueryWrapper<SysDictData> lqw = new LambdaQueryWrapper<>(); |
|
|
// LambdaQueryWrapper<SysDictData> lqw = new LambdaQueryWrapper<>();
|
|
|
lqw.eq(SysDictData::getGroupKey,"book-code-to-belong"); |
|
|
// lqw.eq(SysDictData::getGroupKey,"book-code-to-belong");
|
|
|
List<SysDictData> sysDictDataList = dictDataService.list(lqw); |
|
|
// List<SysDictData> sysDictDataList = dictDataService.list(lqw);
|
|
|
String placeName = null; |
|
|
// String placeName = null;
|
|
|
for (SysDictData dictData : sysDictDataList) { |
|
|
// for (SysDictData dictData : sysDictDataList) {
|
|
|
if(dictData.getKeyVal().equals(param.getPlaceName())){ |
|
|
// if(dictData.getKeyVal().equals(param.getPlaceName())){
|
|
|
placeName = dictData.getLabel(); |
|
|
// placeName = dictData.getLabel();
|
|
|
} |
|
|
// }
|
|
|
} |
|
|
// }
|
|
|
if(placeName==null){ |
|
|
// if(placeName==null){
|
|
|
log.warn("字典缺账套{}配置",param.getPlaceName()); |
|
|
// log.warn("字典缺账套{}配置",param.getPlaceName());
|
|
|
Assert.throwEx("缺账套["+param.getPlaceName()+"]配置"); |
|
|
// Assert.throwEx("缺账套["+param.getPlaceName()+"]配置");
|
|
|
} |
|
|
// }
|
|
|
|
|
|
String placeName = param.getPlaceName(); |
|
|
|
|
|
|
|
|
List<GoodsSku> skuList = goodsSkuService.getByCodes(param.getInvCodes()); |
|
|
List<GoodsSku> skuList = goodsSkuService.getByCodes(param.getInvCodes()); |
|
|
List<OmsSpuToSkuKey> specialSkuKey = new ArrayList<>(); |
|
|
List<OmsSpuToSkuKey> specialSkuKey = new ArrayList<>(); |
|
@ -73,7 +74,7 @@ public class PortalGoodsController { |
|
|
spuLqw.eq(GoodsSpu::getShelf,1); |
|
|
spuLqw.eq(GoodsSpu::getShelf,1); |
|
|
spuLqw.in(GoodsSpu::getId,spuIds); |
|
|
spuLqw.in(GoodsSpu::getId,spuIds); |
|
|
List<GoodsSpu> spuList = goodsSpuService.list(spuLqw); |
|
|
List<GoodsSpu> spuList = goodsSpuService.list(spuLqw); |
|
|
spuIds = spuList.stream().map(a->a.getId).collect(Collectors.toList()); |
|
|
spuIds = spuList.stream().map(a->a.getId()).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
if(spuIds.size()==0){ |
|
|
if(spuIds.size()==0){ |
|
|
spuIds.add(0L); |
|
|
spuIds.add(0L); |
|
|