*
lsh
2025-10-24 209626ba2b4797f7d1c003a2876026ffcd39928a
src/main/java/com/zy/asrs/controller/RgvController.java
@@ -61,6 +61,8 @@
    @Autowired
    private BasRgvService basRgvService;
    @Autowired
    private BasDevpService basDevpService;
    @Autowired
    private MainServiceImpl mainService;
    @Autowired
    private BasDevpPositionService basDevpPositionService;
@@ -353,12 +355,14 @@
//            double[] doubles = Utils.RingThroughXY2(perimeter, NumUtils.GetRandomIntInRange(183));
//            double[] doubles = Utils.RingThroughXYRgv(perimeter, perimeter-rgvProtocol.RgvPos.doubleValue());
            double[] doubles = Utils.getRgvPosNew(perimeter, rgvProtocol.RgvPos.doubleValue());
//            double[] doubles = Utils.RingThroughXY2(183.0, 100*i );
            ringThroughParam.setValueX(doubles[0]-2.94);
            ringThroughParam.setValueY(doubles[1]-2.94);
            ringThroughParam.setValueX(doubles[0]);
            ringThroughParam.setValueY(doubles[1]);
            ringThroughParam.setModeColor(rgvProtocol.modeType.color);
            ringThroughParam.setStatusColor(rgvProtocol.statusType.color);
            if (rgvProtocol.getModeType() == RgvModeType.AUTO){
                ringThroughParam.setAnimation(2);
            }
            result.add(ringThroughParam);
        }
        return R.ok().add(result);
@@ -371,10 +375,35 @@
        List<RingThroughParam> result = new ArrayList<>();
        List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<>());
        for (BasDevpPosition basDevpPosition : basDevpPositions){
            if (basDevpPosition.getDevNo() == 134){
            if (basDevpPosition.getDevRegion() == 0){
                continue;
            }
            RingThroughParam ringThroughParam = new RingThroughParam();
            ringThroughParam.setModeColor("#FFFFFF");
            ringThroughParam.setStatusColor("#FFFFFF");
            try{
                BasDevp basDevp = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no",basDevpPosition.getDevNo()));
                if (basDevp.getAutoing().equals("Y")){
                    if (basDevp.getLoading().equals("Y")){
                        ringThroughParam.setModeColor("#ab1839");
                        ringThroughParam.setStatusColor("#ab1839");
                    }
                    if (basDevp.getLoading().equals("N")){
                        ringThroughParam.setModeColor("#27AE60");
                        ringThroughParam.setStatusColor("#27AE60");
                    }
                } else {
                    ringThroughParam.setModeColor("#C0392B");
                    ringThroughParam.setStatusColor("#C0392B");
                }
            } catch (Exception e){
                System.out.println(e.getMessage());
                ringThroughParam.setModeColor("#000000");
                ringThroughParam.setStatusColor("#000000");
            }
            ringThroughParam.setIndex(basDevpPosition.getDevNo());
//            double[] doubles = Utils.RingThroughXYSta(perimeter, perimeter-basDevpPosition.getPlcPosition());
//            ringThroughParam.setValueX(doubles[0]>50? doubles[0]+6:doubles[0]-1);
@@ -545,4 +574,23 @@
        return R.ok();
    }
    @PostMapping("/disable/task/delete1")
//    @ManagerAuth(memo = "初始化任务")
    public R taskDisabledelete1(@RequestParam Long wrkNo){
        Date now = new Date();
        log.info("/disable/task/delete1===》初始化任务!!!wrkNo:{},data:{}",wrkNo,new Date());
        WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", wrkNo));
        if (Cools.isEmpty(wrkMast)){
            return R.error().add("未找到此任务,异常!!!");
        }
        wrkMast.setWrkSts(1L);
        wrkMast.setRgvNo(0);
        wrkMast.setAppeTime(now);
        wrkMast.setLogErrTime(now);
        if (wrkMastService.updateById(wrkMast)){
            return R.ok();
        }
        return R.error("初始化失败!!!");
    }
}