|
|
@@ -6303,28 +6303,30 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
});
|
|
|
shipItemsService.saveOrUpdateBatch(shipItemsList);
|
|
|
} else {
|
|
|
- PjShipItems pjShipItems = new PjShipItems();
|
|
|
- pjShipItems.setPid(ship.getId());
|
|
|
- pjShipItems.setCreateUser(AuthUtil.getUserId());
|
|
|
- pjShipItems.setCreateTime(new Date());
|
|
|
- pjShipItems.setSalesCompanyId(ship.getSalesCompanyId());
|
|
|
- pjShipItems.setSalesCompanyName(ship.getSalesCompanyName());
|
|
|
- pjShipItems.setGoodsNum(ship.getGoodsTotalNum());
|
|
|
- PjGoodsDesc goodsDesc = goodsDescMapper.selectById(ship.getGoodsId());
|
|
|
- if (goodsDesc != null) {
|
|
|
- pjShipItems.setGoodsNo(goodsDesc.getCode());
|
|
|
- pjShipItems.setGoodsName(goodsDesc.getCname());
|
|
|
- pjShipItems.setGoodsId(goodsDesc.getId());
|
|
|
- pjShipItems.setBrandId(goodsDesc.getBrandId());
|
|
|
- pjShipItems.setBrandName(goodsDesc.getBrandName());
|
|
|
- pjShipItems.setPropertyName(goodsDesc.getSpecificationAndModel());
|
|
|
- pjShipItems.setPattern(goodsDesc.getBrandItem());
|
|
|
- pjShipItems.setGoodsDescription(goodsDesc.getGoodsDescription());
|
|
|
- pjShipItems.setUnits(goodsDesc.getUnit());
|
|
|
- shipItemsService.save(pjShipItems);
|
|
|
- shipItemsList.add(pjShipItems);
|
|
|
- } else {
|
|
|
- throw new RuntimeException("产品不存");
|
|
|
+ if (!ship.getBizTypeName().equals(OrderTypeEnum.SCLL.getType())) {
|
|
|
+ PjShipItems pjShipItems = new PjShipItems();
|
|
|
+ pjShipItems.setPid(ship.getId());
|
|
|
+ pjShipItems.setCreateUser(AuthUtil.getUserId());
|
|
|
+ pjShipItems.setCreateTime(new Date());
|
|
|
+ pjShipItems.setSalesCompanyId(ship.getSalesCompanyId());
|
|
|
+ pjShipItems.setSalesCompanyName(ship.getSalesCompanyName());
|
|
|
+ pjShipItems.setGoodsNum(ship.getGoodsTotalNum());
|
|
|
+ PjGoodsDesc goodsDesc = goodsDescMapper.selectById(ship.getGoodsId());
|
|
|
+ if (goodsDesc != null) {
|
|
|
+ pjShipItems.setGoodsNo(goodsDesc.getCode());
|
|
|
+ pjShipItems.setGoodsName(goodsDesc.getCname());
|
|
|
+ pjShipItems.setGoodsId(goodsDesc.getId());
|
|
|
+ pjShipItems.setBrandId(goodsDesc.getBrandId());
|
|
|
+ pjShipItems.setBrandName(goodsDesc.getBrandName());
|
|
|
+ pjShipItems.setPropertyName(goodsDesc.getSpecificationAndModel());
|
|
|
+ pjShipItems.setPattern(goodsDesc.getBrandItem());
|
|
|
+ pjShipItems.setGoodsDescription(goodsDesc.getGoodsDescription());
|
|
|
+ pjShipItems.setUnits(goodsDesc.getUnit());
|
|
|
+ shipItemsService.save(pjShipItems);
|
|
|
+ shipItemsList.add(pjShipItems);
|
|
|
+ } else {
|
|
|
+ throw new RuntimeException("产品不存");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
ship.setShipItemsList(shipItemsList);
|