zhangchao
2024-08-31 894a07f2b00cda82dc6dd7db2e9348c48a7927bc
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -91,6 +91,20 @@
    @Value("${wms.url}")
    private String wmsUrl;
    private Short getWorkMode(Integer bay) {
        if (bay == 2 || bay == 7) {
            return (short) 3;
        } else if (bay == 3) {
            return (short) 1;
        } else if (bay == 4) {
            return (short) 2;
        } else if (bay == 5) {
            return (short) 1;
        }else {
            return (short) 0;
        }
    }
    /**
     * 组托
     * 入库站,根据条码扫描生成入库工作档,工作状态 2
@@ -218,6 +232,14 @@
                        param.setIoType(1);
                        param.setSourceStaNo(inSta.getStaNo());
                        param.setLocType1(locTypeDto.getLocType1());
                        if (inSta.getStaNo() == 102) {
                            param.setLocType2((short) 3);
                        } else if (inSta.getStaNo() == 211) {
                            param.setLocType1((short) 5);
                            param.setLocType2((short) 4);
                        } else if (inSta.getStaNo() == 201) {
                            param.setLocType2((short) 4);
                        }
                        String response = new HttpHandler.Builder()
                                .setUri(wmsUrl)
                                .setPath("/rpc/pakin/loc/v1")
@@ -709,7 +731,7 @@
                        + "能入信号(wms设置).equals(\"Y\")" + staDetl.getCanining());
                continue;
            }
            System.out.println("wrkMast:" + slave.getId() + "-" + staProtocol.getWorkNo().intValue() + "-" + crnStn.getStaNo() );
            System.out.println("wrkMast:" + slave.getId() + "-" + staProtocol.getWorkNo().intValue() + "-" + crnStn.getStaNo());
            // 获取工作状态为2(设备上走)的入库工作档
            WrkMast wrkMast = wrkMastMapper.selectPakInStep2(slave.getId(), staProtocol.getWorkNo().intValue(), crnStn.getStaNo());
            System.out.println("wrkMast:" + wrkMast);
@@ -1717,7 +1739,7 @@
            LocMast loc = null;
            for (Integer row : rows) {
                if (Utils.isDeepLoc(slaveProperties, row)) {
                    loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1());
                    loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1(), shallowLoc.getLocType2());
                    if (loc != null) {
                        if (Utils.isDeepLoc(slaveProperties, loc.getLocNo())) {
@@ -1736,7 +1758,7 @@
            if (null == loc) {
                for (Integer row : rows) {
                    if (Utils.isShallowLoc(slaveProperties, row)) {
                        loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1());
                        loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1(), shallowLoc.getLocType2());
                        if (null != loc) {//对应深库位非在库状态,不能移库
                            String deepLoc = Utils.getDeepLoc(slaveProperties, loc.getLocNo());