whycq
2024-10-28 f8a5192aa2797e83f5000ff9035f149b0a1b00a1
zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/LocDetlController.java
@@ -46,6 +46,22 @@
        return R.ok(detls);
    }
    @RequestMapping(value = "/locDetl/forlocNo/auth/v1")
    @ManagerAuth
    public R forlocNoV1(@RequestParam String locNo,@RequestParam String matnr) {
        LambdaQueryWrapper<LocDetl> locDetlLambdaQueryWrapper = new LambdaQueryWrapper<LocDetl>()
                .eq(LocDetl::getLocNo, locNo)
                .eq(LocDetl::getHostId, getHostId());
        if (!Cools.isEmpty(matnr)) {
            locDetlLambdaQueryWrapper.eq(LocDetl::getMatnr, matnr);
        }
        List<LocDetl> detls = locDetlService.list(locDetlLambdaQueryWrapper);
        if (Cools.isEmpty(detls)){
            return R.error("未查询到库存数据");
        }
        return R.ok(detls);
    }
    @RequestMapping(value = "/locDetl/forlocNo/auth")
    @ManagerAuth
    public R forlocNo(@RequestParam String orderNo,@RequestParam String locNo,@RequestParam String batch,@RequestParam String matnr) {
@@ -137,12 +153,6 @@
                  @RequestParam(required = false) String timeRange,
                  @RequestParam Map<String, Object> param) {
        QueryWrapper<LocDetl> wrapper = new QueryWrapper<>();
        Object barcode = null;
        if (!Cools.isEmpty(param.get("barcode"))) {
            barcode = param.get("barcode");
        }
        param.remove("zpallet");
        param.remove("barcode");
        if (!Cools.isEmpty(param.get("decrees"))) {
            ArrayList<String> mats = new ArrayList<>();
@@ -154,7 +164,6 @@
                    mats.add(mat.getMatnr());
                }
            }
            wrapper.in("matnr", mats);
            param.remove("decrees");
        }
@@ -170,18 +179,16 @@
            wrapper.le("appe_time", DateUtils.convert(range[1]));
        }
        if (!Cools.isEmpty(param.get("locNo"))) {
            wrapper.eq("loc_no", param.get("locNo"));
            wrapper.like("loc_no", param.get("locNo"));
        }
        if (!Cools.isEmpty(barcode)) {
            wrapper.eq("zpallet", barcode);
        if (!Cools.isEmpty(param.get("zpallet"))) {
            wrapper.like("zpallet", param.get("zpallet"));
        }
        if (!Cools.isEmpty(orderByField)){
            wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));
        }
        param.remove("locNo");
        param.remove("owner");