|
|
@@ -1307,14 +1307,27 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public boolean checkORderDun(String orderNo) {
|
|
|
- List<OutNewOrderDunBo> list=newOrderDunMapper.selectListNewOrderDun(orderNo, null);
|
|
|
- if (list==null||list.size()<1) {
|
|
|
- return true;
|
|
|
- }else {
|
|
|
- return false;
|
|
|
+ public boolean checkOrderAmount(TOrderNewWithBLOBs t) {
|
|
|
+ BigDecimal orderAmount=t.getTotalAmount();
|
|
|
+ if (orderAmount==null){
|
|
|
+ TOrderNew tOrderNew=tOrderNewMapper.getOrderNewDetail(t.getOrderNo());
|
|
|
+ orderAmount=tOrderNew.getTotalAmount();
|
|
|
}
|
|
|
|
|
|
+ List<TOrderTaskBo> tOrderTaskBos = tOrderTaskMapper.selectOrderTaskAll(t.getOrderNo());
|
|
|
+ List<OutNewOrderDunBo> tOrderDuns = newOrderDunMapper.selectListNewOrderDun(t.getOrderNo(),null);
|
|
|
+ BigDecimal taskAmount=new BigDecimal(0);
|
|
|
+ for (TOrderTaskBo tOrderTaskBo : tOrderTaskBos) {
|
|
|
+ taskAmount=taskAmount.add(tOrderTaskBo.getCommodityPrice().multiply(new BigDecimal(tOrderTaskBo.getCommodityQuantity())));
|
|
|
+ }
|
|
|
+ BigDecimal dunAmount=new BigDecimal(0);
|
|
|
+ for (OutNewOrderDunBo tOrderDun : tOrderDuns) {
|
|
|
+ dunAmount=dunAmount.add(tOrderDun.getMoney());
|
|
|
+ }
|
|
|
+ if (orderAmount.compareTo(taskAmount)==0&&orderAmount.compareTo(dunAmount)==0){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
/**
|