自动化立体仓库 - WMS系统
LSH
2023-07-17 924bc6bf86386856b7946e98a88af1a95821be98
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("组托数量已超出订单需求量,请检查是否有其他的组托已完成");
                }
            }
@@ -755,6 +762,13 @@
        } else if (waitPakins.get(0).getIoStatus() == "Y") {
            return R.error("组托已经生成工作档");
        }
        for (WaitPakin waitPakin: waitPakins) {
            List<ManLocDetl> manLocDetls = manLocDetlService.selectList(new EntityWrapper<ManLocDetl>().eq("zpallet", waitPakin.getZpallet()));
            if (!Cools.isEmpty(manLocDetls) || manLocDetls.size()>0){
                return R.error("所在库位已存在明细");
            }
        }
        //判断订单是否完成
        boolean log =true;