自动化立体仓库 - WMS系统
zyh
昨天 3eee2147f220634b620b7ed84c97fbd8257205d5
src/main/java/com/zy/asrs/controller/DigitalTwinController.java
@@ -31,16 +31,16 @@
//    @ManagerAuth
    public R overview(@RequestParam(required = false) String areaId){
        //digitalTwinService.overview(areaId);
        DtOverviewVo dtOverviewVo = digitalTwinService.overview(areaId);
        DtOverviewVo dtOverviewVo = DtOverviewVo.builder()
                .totalLoc(999)
                .useLoc(900)
                .idleLoc(99)
                .todayOutbound(160)
                .todayWarehousing(170)
                .remainingStock(180)
                .build();
//        DtOverviewVo dtOverviewVo = DtOverviewVo.builder()
//                .totalLoc(999)
//                .useLoc(900)
//                .idleLoc(99)
//                .todayOutbound(160)
//                .todayWarehousing(170)
//                .remainingStock(180)
//                .build();
        return R.ok().add(dtOverviewVo);
    }
@@ -57,19 +57,19 @@
    public R recentOrder(@RequestParam(required = false) String startDate,
                         @RequestParam(required = false) String endDate){
//        digitalTwinService.order(startDate, endDate);
        List<DtOrderVo> orderVoList = digitalTwinService.order(startDate, endDate);
        DtOrderVo dtOrderVo = DtOrderVo.builder()
                .orderDate("2025-10-22")
                .orderNum(156)
                .build();
        DtOrderVo dtOrderVo2 = DtOrderVo.builder()
                .orderDate("2025-10-23")
                .orderNum(166)
                .build();
        List<DtOrderVo> orderVoList = new ArrayList<>();
        orderVoList.add(dtOrderVo);
        orderVoList.add(dtOrderVo2);
//        DtOrderVo dtOrderVo = DtOrderVo.builder()
//                .orderDate("2025-10-22")
//                .orderNum(156)
//                .build();
//        DtOrderVo dtOrderVo2 = DtOrderVo.builder()
//                .orderDate("2025-10-23")
//                .orderNum(166)
//                .build();
//        List<DtOrderVo> orderVoList = new ArrayList<>();
//        orderVoList.add(dtOrderVo);
//        orderVoList.add(dtOrderVo2);
        return R.ok().add(orderVoList);
    }
@@ -86,22 +86,9 @@
//    @ManagerAuth
    public R recentIdleLoc(@RequestParam(required = false) String areaId,
                           @RequestParam(required = false) String startDate,
                         @RequestParam(required = false) String endDate){
                           @RequestParam(required = false) String endDate){
//        digitalTwinService.recentLoc(areaId, startDate, endDate);
        DtLocVo dtLocVo = DtLocVo.builder()
                .locDate("2025-10-22")
                .idleNum(208)
                .build();
        DtLocVo dtLocVo2 = DtLocVo.builder()
                .locDate("2025-10-23")
                .idleNum(177)
                .build();
        List<DtLocVo> locVoList = new ArrayList<>();
        locVoList.add(dtLocVo);
        locVoList.add(dtLocVo2);
        List<DtLocVo> locVoList = digitalTwinService.recentLoc(areaId, startDate, endDate);
        return R.ok().add(locVoList);
    }
@@ -116,24 +103,24 @@
    @RequestMapping(value = "/recentInAndOutBound")
//    @ManagerAuth
    public R recentInAndOutBound(@RequestParam(required = false) String areaId,
                           @RequestParam(required = false) String startDate,
                           @RequestParam(required = false) String endDate){
                                 @RequestParam(required = false) String startDate,
                                 @RequestParam(required = false) String endDate){
//        digitalTwinService.inAndOutBound(areaId, startDate, endDate);
        DtInAndOutBoundVo dtInAndOutBoundVo = DtInAndOutBoundVo.builder()
                .boundDate("2025-10-22")
                .inBoundNum(237)
                .outBoundNum(487)
                .build();
        DtInAndOutBoundVo dtInAndOutBoundVo2 = DtInAndOutBoundVo.builder()
                .boundDate("2025-10-23")
                .inBoundNum(187)
                .outBoundNum(287)
                .build();
        List<DtInAndOutBoundVo> inAndOutBoundVoList = new ArrayList<>();
        inAndOutBoundVoList.add(dtInAndOutBoundVo);
        inAndOutBoundVoList.add(dtInAndOutBoundVo2);
        List<DtInAndOutBoundVo> inAndOutBoundVoList = digitalTwinService.inAndOutBound(areaId, startDate, endDate);
//
//        DtInAndOutBoundVo dtInAndOutBoundVo = DtInAndOutBoundVo.builder()
//                .boundDate("2025-10-22")
//                .inBoundNum(237)
//                .outBoundNum(487)
//                .build();
//        DtInAndOutBoundVo dtInAndOutBoundVo2 = DtInAndOutBoundVo.builder()
//                .boundDate("2025-10-23")
//                .inBoundNum(187)
//                .outBoundNum(287)
//                .build();
//        List<DtInAndOutBoundVo> inAndOutBoundVoList = new ArrayList<>();
//        inAndOutBoundVoList.add(dtInAndOutBoundVo);
//        inAndOutBoundVoList.add(dtInAndOutBoundVo2);
        return R.ok().add(inAndOutBoundVoList);
    }
@@ -152,32 +139,7 @@
                             @RequestParam(required = false) Integer pageIndex,
                             @RequestParam(required = false) Integer pageSize){
//        digitalTwinService.recentDetainMat(areaId, overDayNum, pageIndex, pageSize);
        DtDetainMatVo dtDetainMatVo = DtDetainMatVo.builder()
                .belongAreaId("A1")
                .belongAreaName("刀具库")
                .matId("mat10001")
                .matName("道具把")
                .lokId("loc1001")
                .lokName("库位10001")
                .detainTime(765)
                .inBoundTime("2025-10-11T11:15:16")
                .build();
        DtDetainMatVo dtDetainMatVo2 = DtDetainMatVo.builder()
                .belongAreaId("A1")
                .belongAreaName("刀具库")
                .matId("mat10002")
                .matName("道具把")
                .lokId("loc1002")
                .lokName("库位10002")
                .detainTime(665)
                .inBoundTime("2025-10-10T11:15:16")
                .build();
        List<DtDetainMatVo> detainMatVoList = new ArrayList<>();
        detainMatVoList.add(dtDetainMatVo);
        detainMatVoList.add(dtDetainMatVo2);
        List<DtDetainMatVo> detainMatVoList = digitalTwinService.recentDetainMat(areaId, overDayNum, pageIndex, pageSize);
        return R.ok().add(detainMatVoList);
    }
@@ -191,35 +153,7 @@
//    @ManagerAuth
    public R equipment(@RequestParam(required = false) String areaId){
        DtEquipmentVo dtDetainMatVo = DtEquipmentVo.builder()
                .equipmentId("eq1001")
                .equipmentName("堆垛机1")
                .equipmentType(1)
                .belongAreaId("A1")
                .belongAreaName("刀具库")
                .verticalSpeed(288)
                .horizontalSpeed(203)
                .voltage(48)
                .status(1)
                .operateMethod(1)
                .build();
        DtEquipmentVo dtDetainMatVo2 = DtEquipmentVo.builder()
                .equipmentId("eq1002")
                .equipmentName("堆垛机2")
                .equipmentType(1)
                .belongAreaId("A1")
                .belongAreaName("刀具库")
                .verticalSpeed(208)
                .horizontalSpeed(253)
                .voltage(48)
                .status(1)
                .operateMethod(1)
                .build();
        List<DtEquipmentVo> dtEquipmentVoList = new ArrayList<>();
        dtEquipmentVoList.add(dtDetainMatVo);
        dtEquipmentVoList.add(dtDetainMatVo2);
        return R.ok().add(dtEquipmentVoList);
        return R.ok(digitalTwinService.equipment(areaId));
    }
    /**
@@ -232,61 +166,60 @@
//    @ManagerAuth
    public R warehouseDetail(@RequestParam(required = false) String areaId){
//        digitalTwinService.warehouseDetail(areaId);
        List<DtLocDetailVo> dtLocDetailVoList = new ArrayList<>();
        DtLocDetailVo dtLocDetailVo = new DtLocDetailVo();
        dtLocDetailVo.setLocNo("CA0100202");
        dtLocDetailVo.setLocSts("O");
        dtLocDetailVo.setAreaId(10010L);
        dtLocDetailVo.setAreaName("刀具库");
        dtLocDetailVo.setRow1(1);
        dtLocDetailVo.setBay1(2);
        dtLocDetailVo.setLev1(2);
        LocMast locMast = new LocMast();
        locMast.setLocNo("CA0100202");
        locMast.setLocSts("O");
        locMast.setRow1(1);
        locMast.setBay1(2);
        locMast.setLev1(2);
        dtLocDetailVo.setLocMast(locMast);
        LocDetl locDetl = new LocDetl();
        locDetl.setLocNo("CA0100202");
        locDetl.setAreaId(10010L);
        locDetl.setAreaName("刀具库");
        locDetl.setMatnr("mat10001");
        locDetl.setMaktx("刀把");
        dtLocDetailVo.setLocDetl(locDetl);
        dtLocDetailVoList.add(dtLocDetailVo);
        DtLocDetailVo dtLocDetailVo2 = new DtLocDetailVo();
        dtLocDetailVo2.setLocNo("CA0100202");
        dtLocDetailVo2.setLocSts("O");
        dtLocDetailVo2.setAreaId(10010L);
        dtLocDetailVo2.setAreaName("刀具库");
        dtLocDetailVo2.setRow1(1);
        dtLocDetailVo2.setBay1(2);
        dtLocDetailVo2.setLev1(2);
        LocMast locMast2 = new LocMast();
        locMast2.setLocNo("CA0100203");
        locMast2.setLocSts("O");
        locMast2.setRow1(1);
        locMast2.setBay1(2);
        locMast2.setLev1(3);
        dtLocDetailVo2.setLocMast(locMast2);
        LocDetl locDetl2 = new LocDetl();
        locDetl2.setLocNo("CA0100203");
        locDetl2.setAreaId(10010L);
        locDetl2.setAreaName("刀具库");
        locDetl2.setMatnr("mat10001");
        locDetl2.setMaktx("刀把");
        dtLocDetailVo2.setLocDetl(locDetl2);
        dtLocDetailVoList.add(dtLocDetailVo2);
        return R.ok(digitalTwinService.warehouseDetail(areaId));
//        List<DtLocDetailVo> dtLocDetailVoList = new ArrayList<>();
//        DtLocDetailVo dtLocDetailVo = new DtLocDetailVo();
//        dtLocDetailVo.setLocNo("CA0100202");
//        dtLocDetailVo.setLocSts("O");
//        dtLocDetailVo.setAreaId(10010L);
//        dtLocDetailVo.setAreaName("刀具库");
//        dtLocDetailVo.setRow1(1);
//        dtLocDetailVo.setBay1(2);
//        dtLocDetailVo.setLev1(2);
//
//        LocMast locMast = new LocMast();
//        locMast.setLocNo("CA0100202");
//        locMast.setLocSts("O");
//        locMast.setRow1(1);
//        locMast.setBay1(2);
//        locMast.setLev1(2);
//        dtLocDetailVo.setLocMast(locMast);
//
//        LocDetl locDetl = new LocDetl();
//        locDetl.setLocNo("CA0100202");
//        locDetl.setAreaId(10010L);
//        locDetl.setAreaName("刀具库");
//        locDetl.setMatnr("mat10001");
//        locDetl.setMaktx("刀把");
//        dtLocDetailVo.setLocDetl(locDetl);
//        dtLocDetailVoList.add(dtLocDetailVo);
//
//
//        DtLocDetailVo dtLocDetailVo2 = new DtLocDetailVo();
//        dtLocDetailVo2.setLocNo("CA0100202");
//        dtLocDetailVo2.setLocSts("O");
//        dtLocDetailVo2.setAreaId(10010L);
//        dtLocDetailVo2.setAreaName("刀具库");
//        dtLocDetailVo2.setRow1(1);
//        dtLocDetailVo2.setBay1(2);
//        dtLocDetailVo2.setLev1(2);
//
//        LocMast locMast2 = new LocMast();
//        locMast2.setLocNo("CA0100203");
//        locMast2.setLocSts("O");
//        locMast2.setRow1(1);
//        locMast2.setBay1(2);
//        locMast2.setLev1(3);
//        dtLocDetailVo2.setLocMast(locMast2);
//
//        LocDetl locDetl2 = new LocDetl();
//        locDetl2.setLocNo("CA0100203");
//        locDetl2.setAreaId(10010L);
//        locDetl2.setAreaName("刀具库");
//        locDetl2.setMatnr("mat10001");
//        locDetl2.setMaktx("刀把");
//        dtLocDetailVo2.setLocDetl(locDetl2);
//        dtLocDetailVoList.add(dtLocDetailVo2);
//        LocDetl locDetl2 = new LocDetl();
@@ -300,7 +233,7 @@
////        locDetlList.add(locDetl);
////        locDetlList.add(locDetl2);
        return R.ok().add(dtLocDetailVoList);
//        return R.ok().add(dtLocDetailVoList);
    }
}