BigDecimal outValue = new BigDecimal(sapVerifyInventory.getQuantity()); BigDecimal inValue = new BigDecimal(shouldCredentialPayableDetail.getQuantity()); System.out.println("outValue======"+outValue+"---inValue====="+inValue+"---(outValue.compareTo(inValue)===="+outValue.compareTo(inValue)); //如果库存小于 提交的数量 if(outValue.compareTo(inValue)<0){ System.out.println("库存小于提交的数量>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); sapList.add(sapVerifyInventory); judge=true; }
//Long值比较大小
long1.longValue()==long2.longValue()