自动化立体仓库 - WMS系统
pang.jiabao
2025-02-17 8be136c5e451b623cec21e806bd30e6e2698587d
src/main/java/com/zy/asrs/service/impl/PlaServiceImpl.java
@@ -30,7 +30,7 @@
    private PlaQtyService plaQtyService;
    public Pla selectByBatchAndPackageNo(String batch, Integer packageNo, String brand) {
        return this.selectOne(new EntityWrapper<Pla>().eq("batch",batch).eq("package_no",packageNo).eq("brand",brand).eq(false,"status","全部出库"));
        return this.selectOne(new EntityWrapper<Pla>().eq("batch",batch).eq("package_no",packageNo).eq("brand",brand));
    }
    @Override
@@ -125,12 +125,19 @@
            //pla.setStatus(GlobleParameter.PLA_STATUS_0);
            pla.setModifyTime(new Date());
            // 退货人 modify_user,退货备注 create_user,退货标识 transfer
            pla.setModifyUser(user.getUsername());
            pla.setCreateUser(plaQty.getMemo());
            pla.setTransfer("退货");
            pla.setStash(""); // 库区
            pla.setLocNo(""); // 库位
            pla.setWeightAnfme(pla.getWeightAnfme() + plaQty.getOrderWeight());
            pla.setStatus(GlobleParameter.PLA_STATUS_1);
            this.updateById(pla);
            SaasUtils.insertLog(0,pla.getLocNo(),pla.getBrand(),plaQty.getOrderWeight(),user.getUsername(),
                    null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop());
            SaasUtils.insertLog(4,pla.getLocNo(),pla.getBrand(),plaQty.getOrderWeight(),user.getUsername(),
                    null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop(),null);
        });
    }
@@ -163,13 +170,17 @@
        Object create_time = page.getCondition().get("create_time");
        Object brand = page.getCondition().get("brand");
        Object status = page.getCondition().get("status");
        String type = (String) page.getCondition().get("type");
        String workshop = (String) page.getCondition().get("workshop");
        String transfer = (String) page.getCondition().get("transfer");
        String createTime = create_time == null ? null : create_time.toString();
        if(!Cools.isEmpty(createTime)){
            String[] dates = createTime.split(" - ");
            stime = DateUtils.convert(dates[0]);
            etime = DateUtils.convert(dates[1]);
        }
        plaList=baseMapper.getStockStatisAll(brand == null ? null:brand.toString(), status == null ? null:status.toString(),  stime,etime);
        plaList=baseMapper.getStockStatisAll(brand == null ? null:brand.toString(), status == null ? null:status.toString(),  stime,etime, type, workshop, transfer);
        double weightSum = plaList.stream().mapToDouble(Pla::getWeight).sum();