|
|
|
@ -67,6 +67,7 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
import java.math.RoundingMode; |
|
|
|
|
import java.text.DecimalFormat; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
@ -178,6 +179,8 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
@Resource |
|
|
|
|
private CommodityMapper commodityMapper; |
|
|
|
|
|
|
|
|
|
DecimalFormat format = new DecimalFormat("#.###"); |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public PageUtils selectOrderInfo(Map<String, Object> map, List<String> shList, List<String> entList) { |
|
|
|
|
return orderProcessService.selectOrderInfo(map, shList, entList); |
|
|
|
@ -1930,9 +1933,11 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
if(items.size() > 0){ |
|
|
|
|
orderItemInfoMapper.updateOrderItemId(items); |
|
|
|
|
} |
|
|
|
|
if(sb.length() == 0){ |
|
|
|
|
return R.ok(); |
|
|
|
|
} |
|
|
|
|
String substring = sb.substring(0, sb.length() - 1) + "税编有误请检查"; |
|
|
|
|
|
|
|
|
|
return sb.length() == 0 ? R.ok() :R.error(substring); |
|
|
|
|
return R.error(substring); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private CommodityCodeEntity buildCommodity(OrderItemInfo itemInfo,OrderInfoVo orderInfoVo,Map<String, TaxClassCodeEntity> spbm ) throws Exception{ |
|
|
|
@ -1950,7 +1955,8 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
comm.setZxbm(StringUtils.isNotBlank(itemInfo.getZxbm())?itemInfo.getZxbm():comm.getId()); |
|
|
|
|
comm.setSpsm(taxClassCodeEntity.getSm()); |
|
|
|
|
comm.setSpjm(""); |
|
|
|
|
comm.setSl(itemInfo.getSl());//不需要转换%
|
|
|
|
|
String sl = itemInfo.getSl().replace("%", ""); |
|
|
|
|
comm.setSl(format.format(new BigDecimal("1.3").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():""); |
|
|
|
|