自动化立体仓库 - WCS系统
#
lsh
2024-01-26 ad214d47abef40ddca668854bbfeefcf5ac9f33d
src/main/java/com/zy/asrs/controller/SiteController.java
@@ -16,6 +16,7 @@
import com.zy.core.model.protocol.StaProtocol;
import com.zy.core.properties.SlaveProperties;
import com.zy.core.DevpThread;
import com.zy.core.thread.SiemensDevpThread;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -36,6 +37,21 @@
    private SlaveProperties slaveProperties;
    @Autowired
    private BasDevpService basDevpService;
    @GetMapping("/io/mode/info/site")
    @ManagerAuth(memo = "入出库模式")
    public R ioMode(){
        List<Map<String, Object>> res = new ArrayList<>();
        for (DevpSlave devp : slaveProperties.getDevp()) {
            SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
            Map<String, Object> map2 = new HashMap<>();
            map2.put("floor", 2);
            map2.put("modeVal", devpThread.ioModeOf2F.id);
            map2.put("modeDesc", devpThread.ioModeOf2F.desc);
            res.add(map2);
        }
        return R.ok().add(res);
    }
    @PostMapping("/table/site")
    @ManagerAuth(memo = "站点信息表")
@@ -150,8 +166,8 @@
    @PostMapping("/detl/update")
    @ManagerAuth(memo = "修改站点数据")
    public R siteDetlUpdate(@RequestParam Integer siteId,
                            @RequestParam Short workNo,
                            @RequestParam Short staNo,
                            @RequestParam Integer workNo,
                            @RequestParam Integer staNo,
                            @RequestParam String pakMk){
        for (DevpSlave devp : slaveProperties.getDevp()) {
            DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
@@ -173,7 +189,7 @@
                    if (pakMk != null) {
                        staProtocol.setPakMk(pakMk.equals("Y"));
                    }
                    boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                    boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(5, staProtocol));
                    if (result) {
                        return R.ok();
                    } else {