|
|
@@ -8,6 +8,7 @@ import java.util.Map;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
+import org.apache.xmlbeans.BindingConfig;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -50,13 +51,17 @@ public class OrderInvoiceServiceImpl extends BaseMybatisDao<TOrderInvoiceMapper>
|
|
|
TOrderNew tn=tOrderNewMapper.selectByPrimaryKey(t.getOrderNo());
|
|
|
|
|
|
Double i=tOrderInvoiceMapper.checkApplyAmount(t.getOrderNo(),t.getId());//新建时直接查所有数据,修改时除掉修改订单
|
|
|
- int flag=t.getAmount().add(new BigDecimal(i)).compareTo(tn.getTotalAmount());
|
|
|
+ //处理精度问题
|
|
|
+ BigDecimal q=t.getAmount().add(new BigDecimal(i)).setScale(4, BigDecimal.ROUND_DOWN);;
|
|
|
+ BigDecimal w=tn.getTotalAmount();
|
|
|
+ int flag=q.compareTo(w);
|
|
|
if (flag>0) {
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@Override
|
|
|
public Pagination<TOrderInvoiceBo> financeOrderInvoiceList(String orderDep, String orderNo, String name, Integer type,Integer pageNo,
|