|
|
|
@ -1914,6 +1914,7 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
CommodityCodeEntity commodityCodeOld = collect.get(itemInfo.getZxbm()); |
|
|
|
|
if(commodityCodeOld == null){ |
|
|
|
|
commodityCodeEntity.setId(baseService.getGenerateShotKey()); |
|
|
|
|
commodityCodeEntity.setCommodityId(commodityCodeEntity.getId()); |
|
|
|
|
commodityCodeEntity.setCreateTime(new Date()); |
|
|
|
|
commodityCodeEntity.setUserId(userInfoService.getUser().getUserId() != null ? userInfoService.getUser().getUserId().toString():"sync"); |
|
|
|
|
i = commodityMapper.insertCommodity(commodityCodeEntity); |
|
|
|
@ -1950,7 +1951,6 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
|
|
|
|
|
private CommodityCodeEntity buildCommodity(OrderItemInfo itemInfo,OrderInfoVo orderInfoVo,Map<String, TaxClassCodeEntity> spbm ) throws Exception{ |
|
|
|
|
CommodityCodeEntity comm = new CommodityCodeEntity(); |
|
|
|
|
comm.setCommodityId(comm.getId()); |
|
|
|
|
comm.setSortId(0L); |
|
|
|
|
comm.setXhfNsrsbh(orderInfoVo.getXhfNsrsbh()); |
|
|
|
|
TaxClassCodeEntity taxClassCodeEntity = spbm.get(itemInfo.getSpbm()); |
|
|
|
@ -1964,7 +1964,7 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
comm.setSpsm(taxClassCodeEntity.getSm()); |
|
|
|
|
comm.setSpjm(""); |
|
|
|
|
String sl = itemInfo.getSl().replace("%", ""); |
|
|
|
|
comm.setSl(format.format(new BigDecimal("1.3").divide(new BigDecimal("100"), 3, RoundingMode.HALF_UP)));//不需要转换%
|
|
|
|
|
comm.setSl(format.format(new BigDecimal(sl).divide(new BigDecimal("100"), 3, RoundingMode.HALF_UP)));//不需要转换%
|
|
|
|
|
comm.setGgxh(StringUtils.isNotBlank(itemInfo.getGgxh())?BaseServiceBeanTransitionUtils.ggxhTransition(itemInfo.getGgxh()):"");//切除40
|
|
|
|
|
comm.setXmdw(itemInfo.getXmdw()); |
|
|
|
|
comm.setXmdj(StringUtils.isNotBlank(itemInfo.getXmdj())?itemInfo.getXmdj():""); |
|
|
|
|