自动化立体仓库 - WMS系统
LSH
2023-07-13 298b0fc5c2e2e7725cdf0a2f0a0650cd5d66f873
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -31,6 +31,7 @@
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;
@@ -177,7 +178,13 @@
                }
                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("组托数量已超出订单需求量,请检查是否有其他的组托已完成");
                }
            }