feature:同步公司库返回报错提示语

release
gaorl 2 years ago
parent 13163d4a32
commit bfb037cf46
  1. 12
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/OrderInfoServiceImpl.java
  2. 3
      order-management-invoice/src/main/resources/mybatis/mapper/OrderItemInfoMapper.xml

@ -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():"");

@ -320,9 +320,6 @@
<if test="item.tswl != null and item.znfm != ''" >
tswl = #{item.tswl,jdbcType=VARCHAR},
</if>
<if test="item.znfm != null and item.znfm != ''" >
znfm = #{item.znfm,jdbcType=VARCHAR},
</if>
</set>
<where>
id = #{item.id,jdbcType=VARCHAR}

Loading…
Cancel
Save