|
|
@ -853,13 +853,15 @@ public class WmsShelfBillService extends MybatisBaseService<WmsShelfBillMapper, |
|
|
|
//推送商品销售列表
|
|
|
|
//计算sku销售价
|
|
|
|
BigDecimal cost = BigDecimal.ZERO;//入库价
|
|
|
|
if (null != receiptBillDetail.getCost()) { |
|
|
|
cost = receiptBillDetail.getCost(); |
|
|
|
} |
|
|
|
BigDecimal price = BigDecimal.ZERO;//计算后的销售价
|
|
|
|
BaseGoodsSpu baseGoodsSpu = baseGoodsSpuFeign.fetchEntityBySid(shelfBillGoods.getGoodsSpuSid()).getData(); |
|
|
|
String tjmxSid = smsPricesTrategyBillDetailFeign.selSid(baseGoodsSpu.getGoodsTypeSid(), deptSid).getData(); |
|
|
|
if (StringUtils.isNotBlank(tjmxSid)) { |
|
|
|
List<SmsPricestrategyBillGoodstypedetailDetailsVo> data = smsPricesTrategyBillGoodsTypeDetailFeign.selByMainSid(tjmxSid).getData(); |
|
|
|
for (SmsPricestrategyBillGoodstypedetailDetailsVo smsPricestrategyBillGoodstypedetailDetailsVo : data) { |
|
|
|
cost = receiptBillDetail.getCost(); |
|
|
|
if (cost.compareTo(smsPricestrategyBillGoodstypedetailDetailsVo.getRangeStart()) != -1 && cost.compareTo(smsPricestrategyBillGoodstypedetailDetailsVo.getRangeEnd()) != 1) { |
|
|
|
BigDecimal markupRate = smsPricestrategyBillGoodstypedetailDetailsVo.getMarkupRate(); |
|
|
|
price = cost.add(cost.multiply(markupRate).divide(new BigDecimal("100"))); |
|
|
@ -873,8 +875,13 @@ public class WmsShelfBillService extends MybatisBaseService<WmsShelfBillMapper, |
|
|
|
smsGoodsDto.setCreateOrgSid(createOrgSid); |
|
|
|
smsGoodsDto.setGoodsID(goodsID); |
|
|
|
smsGoodsDto.setGoodsTypeSid(baseGoodsSpu.getGoodsTypeSid()); |
|
|
|
String typeName = baseGoodsSpuFeign.selGoodsTypeBySid(baseGoodsSpu.getGoodsTypeSid()).getData(); |
|
|
|
if (StringUtils.isNotBlank(typeName)) { |
|
|
|
smsGoodsDto.setGoodsTypeName(typeName); |
|
|
|
} |
|
|
|
smsGoodsDto.setSupplierSid(supplierSid); |
|
|
|
smsGoodsDto.setSupplierName(supplierName); |
|
|
|
smsGoodsDto.setGoodsSkuTitle(baseGoodsSpu.getGoodsName()); |
|
|
|
smsGoodsDto.setCost(cost.toString()); |
|
|
|
if (price.compareTo(BigDecimal.ZERO) != 0) { |
|
|
|
smsGoodsDto.setPrice(price.toString()); |
|
|
|