| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.Iterator; |
| | |
| | | } |
| | | Double anfme = orderDetl.getAnfme(); |
| | | Double workQty = orderDetl.getWorkQty(); |
| | | if ( anfme - (workQty+combMat.getAnfme()) < 0) { |
| | | BigDecimal a1 = new BigDecimal(orderDetl.getAnfme()); |
| | | BigDecimal b1 = new BigDecimal(orderDetl.getWorkQty()); |
| | | BigDecimal c1 = new BigDecimal(combMat.getAnfme()); |
| | | double e1 = b1.add(c1).doubleValue(); |
| | | BigDecimal f1 = new BigDecimal(e1); |
| | | Double d1 = a1.subtract(f1).doubleValue(); |
| | | if ( d1 < 0.0) { |
| | | throw new CoolException("组托数量已超出订单需求量,请检查是否有其他的组托已完成"); |
| | | } |
| | | } |