|
@ -46,12 +46,16 @@ import com.yxt.wms.feign.base.basegoodspu.BaseGoodsSpu; |
|
|
import com.yxt.wms.feign.base.basegoodspu.BaseGoodsSpuFeign; |
|
|
import com.yxt.wms.feign.base.basegoodspu.BaseGoodsSpuFeign; |
|
|
import com.yxt.wms.feign.base.basegoodssku.BaseGoodsSkuDetailsVo; |
|
|
import com.yxt.wms.feign.base.basegoodssku.BaseGoodsSkuDetailsVo; |
|
|
import com.yxt.wms.feign.base.basegoodssku.BaseGoodsSkuFeign; |
|
|
import com.yxt.wms.feign.base.basegoodssku.BaseGoodsSkuFeign; |
|
|
|
|
|
import com.yxt.wms.feign.base.basegoodsskuextend.BaseGoodsSkuExtendFeign; |
|
|
import com.yxt.wms.feign.portal.privilege.PrivilegeQuery; |
|
|
import com.yxt.wms.feign.portal.privilege.PrivilegeQuery; |
|
|
import com.yxt.wms.feign.portal.sysorganization.SysOrganizationFeign; |
|
|
import com.yxt.wms.feign.portal.sysorganization.SysOrganizationFeign; |
|
|
import com.yxt.wms.feign.portal.sysorganization.SysOrganizationVo; |
|
|
import com.yxt.wms.feign.portal.sysorganization.SysOrganizationVo; |
|
|
import com.yxt.wms.feign.portal.sysstafforg.SysStaffOrgFeign; |
|
|
import com.yxt.wms.feign.portal.sysstafforg.SysStaffOrgFeign; |
|
|
import com.yxt.wms.feign.portal.sysuser.SysUserFeign; |
|
|
import com.yxt.wms.feign.portal.sysuser.SysUserFeign; |
|
|
import com.yxt.wms.feign.portal.sysuser.SysUserVo; |
|
|
import com.yxt.wms.feign.portal.sysuser.SysUserVo; |
|
|
|
|
|
import com.yxt.wms.feign.sms.smspricestrategybilldetail.SmsPricesTrategyBillDetailFeign; |
|
|
|
|
|
import com.yxt.wms.feign.sms.smsspricestrategybillgoodstypedetail.SmsPricesTrategyBillGoodsTypeDetailFeign; |
|
|
|
|
|
import com.yxt.wms.feign.sms.smsspricestrategybillgoodstypedetail.SmsPricestrategyBillGoodstypedetailDetailsVo; |
|
|
import com.yxt.wms.utils.BillNo; |
|
|
import com.yxt.wms.utils.BillNo; |
|
|
import com.yxt.wms.utils.Rule; |
|
|
import com.yxt.wms.utils.Rule; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
@ -110,7 +114,11 @@ public class WmsShelfBillService extends MybatisBaseService<WmsShelfBillMapper, |
|
|
@Autowired |
|
|
@Autowired |
|
|
private AsBusrepairInventorybillFeign asBusrepairInventorybillFeign; |
|
|
private AsBusrepairInventorybillFeign asBusrepairInventorybillFeign; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private AsBusrepairBillFeign asBusrepairBillFeign; |
|
|
private SmsPricesTrategyBillDetailFeign smsPricesTrategyBillDetailFeign; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private SmsPricesTrategyBillGoodsTypeDetailFeign smsPricesTrategyBillGoodsTypeDetailFeign; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private BaseGoodsSkuExtendFeign baseGoodsSkuExtendFeign; |
|
|
|
|
|
|
|
|
public PagerVo<WmsShelfBillVo> listPage(PagerQuery<WmsShelfBillQuery> pq) { |
|
|
public PagerVo<WmsShelfBillVo> listPage(PagerQuery<WmsShelfBillQuery> pq) { |
|
|
WmsShelfBillQuery query = pq.getParams(); |
|
|
WmsShelfBillQuery query = pq.getParams(); |
|
@ -750,6 +758,23 @@ public class WmsShelfBillService extends MybatisBaseService<WmsShelfBillMapper, |
|
|
WmsGoodsTag wmsGoodsTag = wmsGoodsTagService.selByBillSidAndGoodsID(sourceBillSid, goodsID); |
|
|
WmsGoodsTag wmsGoodsTag = wmsGoodsTagService.selByBillSidAndGoodsID(sourceBillSid, goodsID); |
|
|
String goodsSkuCode = wmsGoodsTag.getGoodsSkuCode(); |
|
|
String goodsSkuCode = wmsGoodsTag.getGoodsSkuCode(); |
|
|
WmsShelfBillDetail shelfBillGoods = wmsShelfBillDetailService.selByBillSidAndSkuCode(shelvesId, goodsSkuCode); |
|
|
WmsShelfBillDetail shelfBillGoods = wmsShelfBillDetailService.selByBillSidAndSkuCode(shelvesId, goodsSkuCode); |
|
|
|
|
|
WmsReceiptBillDetail receiptBillDetail = wmsReceiptBillDetailService.selectByBillSidAndGoodsSkuCode(sourceBillSid, goodsSkuCode); |
|
|
|
|
|
//计算sku销售价
|
|
|
|
|
|
BaseGoodsSpu baseGoodsSpu = baseGoodsSpuFeign.fetchEntityBySid(shelfBillGoods.getGoodsSpuSid()).getData(); |
|
|
|
|
|
String tjmxSid = smsPricesTrategyBillDetailFeign.selSid(baseGoodsSpu.getGoodsTypeSid(), deptSid).getData(); |
|
|
|
|
|
if (StringUtils.isBlank(tjmxSid)){ |
|
|
|
|
|
return rb.setMsg("该商品类型没有对应的定调价策略,无法上架"); |
|
|
|
|
|
}else { |
|
|
|
|
|
List<SmsPricestrategyBillGoodstypedetailDetailsVo> data = smsPricesTrategyBillGoodsTypeDetailFeign.selByMainSid(tjmxSid).getData(); |
|
|
|
|
|
for (SmsPricestrategyBillGoodstypedetailDetailsVo smsPricestrategyBillGoodstypedetailDetailsVo : data) { |
|
|
|
|
|
BigDecimal cost = receiptBillDetail.getCost(); |
|
|
|
|
|
if (cost.compareTo(smsPricestrategyBillGoodstypedetailDetailsVo.getRangeStart()) != -1 && cost.compareTo(smsPricestrategyBillGoodstypedetailDetailsVo.getRangeEnd()) != 1) { |
|
|
|
|
|
BigDecimal markupRate = smsPricestrategyBillGoodstypedetailDetailsVo.getMarkupRate(); |
|
|
|
|
|
cost = cost.add(cost.multiply(markupRate).divide(new BigDecimal("100"))); |
|
|
|
|
|
baseGoodsSkuExtendFeign.updateSalesPrice(shelfBillGoods.getGoodsSkuSid(), cost.toString()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
BigDecimal actualCount = BigDecimal.ZERO; |
|
|
BigDecimal actualCount = BigDecimal.ZERO; |
|
|
if (null != shelfBillGoods.getActualCount()) { |
|
|
if (null != shelfBillGoods.getActualCount()) { |
|
|
actualCount = shelfBillGoods.getActualCount(); |
|
|
actualCount = shelfBillGoods.getActualCount(); |
|
@ -784,7 +809,6 @@ public class WmsShelfBillService extends MybatisBaseService<WmsShelfBillMapper, |
|
|
recordDto.setWarehouseRackCode(houseInfoVo.getWarehouseRackCode()); |
|
|
recordDto.setWarehouseRackCode(houseInfoVo.getWarehouseRackCode()); |
|
|
recordDto.setCount(count); |
|
|
recordDto.setCount(count); |
|
|
recordDto.setCurrentCount(count); |
|
|
recordDto.setCurrentCount(count); |
|
|
WmsReceiptBillDetail receiptBillDetail = wmsReceiptBillDetailService.selectByBillSidAndGoodsSkuCode(sourceBillSid, goodsSkuCode); |
|
|
|
|
|
if (null != receiptBillDetail) { |
|
|
if (null != receiptBillDetail) { |
|
|
if (null != receiptBillDetail.getCost()) { |
|
|
if (null != receiptBillDetail.getCost()) { |
|
|
BigDecimal num = new BigDecimal(count); |
|
|
BigDecimal num = new BigDecimal(count); |
|
|