From b7951bdbb8925131cbc76be4902fcef0e88d0506 Mon Sep 17 00:00:00 2001 From: ytfl <ytfl@qq.com> Date: 星期二, 19 八月 2025 18:22:03 +0800 Subject: [PATCH] #自动获取电视机配置信息 --- src/main/java/com/zy/asrs/controller/CrnController.java | 31 +++++++++++++++++++++++++++++-- 1 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/CrnController.java b/src/main/java/com/zy/asrs/controller/CrnController.java index 5425e8f..dd358b1 100644 --- a/src/main/java/com/zy/asrs/controller/CrnController.java +++ b/src/main/java/com/zy/asrs/controller/CrnController.java @@ -35,6 +35,8 @@ import com.zy.core.model.protocol.CrnProtocol; import com.zy.core.properties.SlaveProperties; import com.zy.core.properties.SystemProperties; +import com.zy.system.entity.Config; +import com.zy.system.service.ConfigService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -68,6 +70,8 @@ private MainServiceImpl mainService; @Autowired private LocMastService locMastService; + @Autowired + private ConfigService configService; @ManagerAuth(memo = "杩涜涓殑鍛戒护") @@ -138,6 +142,16 @@ @PostMapping("/table/crn/msg") @ManagerAuth(memo = "鍫嗗灈鏈烘暟鎹〃") public R crnMsgTable(){ + Config crnSearchDetectTaskCountConfig = configService.selectOne(new EntityWrapper<Config>() + .eq("code", "crnSearchDetectTaskCount") + ); + int crnSearchDetectTaskCount = Integer.parseInt(crnSearchDetectTaskCountConfig.getValue()); + + Config applyInTaskTotalCountConfig = configService.selectOne(new EntityWrapper<Config>() + .eq("code", "applyInTaskTotalCount") + ); + int applyInTaskTotalCount = Integer.parseInt(applyInTaskTotalCountConfig.getValue()); + List<CrnMsgTableVo> list = new ArrayList<>(); List<BasCrnp> crnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().orderBy("crn_no")); for (BasCrnp basCrnp : crnps) { @@ -175,6 +189,20 @@ vo.setYdistance(crnProtocol.getYDistance()); // 鍗囬檷璺濈(Km) vo.setXduration(crnProtocol.getXDuration()); // 璧拌鏃堕暱(H) vo.setYduration(crnProtocol.getYDuration()); // 鍗囬檷鏃堕暱(H) + vo.setCrnSearchDetectTaskCount(crnSearchDetectTaskCount); + vo.setApplyInTaskTotalCount(applyInTaskTotalCount); + + List<WrkMast> inWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() + .eq("crn_no", basCrnp.getCrnNo()) + .in("io_type", 1, 10, 53, 57) + ); + vo.setCurrentInTask(inWrkMasts.size()); + + List<WrkMast> wrkMastsList = wrkMastService.selectList(new EntityWrapper<WrkMast>() + .eq("crn_no", basCrnp.getCrnNo()) + .in("io_type", 1, 10, 53, 57, 101, 103, 107, 110) + ); + vo.setCurrentTotalTask(wrkMastsList.size()); } return R.ok().add(list); } @@ -357,8 +385,7 @@ command.setDestinationPosZ(param.getLev()); // 鐩爣搴撲綅灞� staNoProcess(param, command); - boolean offer = MessageQueue.offer(SlaveType.Crn, param.getCrnNo(), new Task(4, command)); - return offer?R.ok():R.error(); + return crnControl(command)?R.ok():R.error(); } @ManagerAuth(memo = "浠诲姟瀹屾垚") -- Gitblit v1.9.1