#
tqs
2024-05-17 6dc8121c05bec103386cd85df1b1f7603ec52788
#
3个文件已修改
63 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/mapper/WrkMastMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/WrkMastMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/WrkMastMapper.java
@@ -39,6 +39,8 @@
//    @Select("select top 1 * from asr_wrk_mast where wrk_no=#{workNo} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104)")
    WrkMast selectPickStep(@Param("barcode")String barcode);
    WrkMast selectPickStep1(@Param("workNo")Integer workNo);
    // 出库第一步,从库位到堆垛机出库站
//    @Select("select top 1 * from dbo.asr_wrk_mast where crn_no=#{crnNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc")
    WrkMast selectPakOutStep1(@Param("crnNo")Integer crnNO, @Param("sourceStaNo")Integer sourceStaNo);
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -437,33 +437,39 @@
                }
                String barcode = barcodeThread.getBarcode();
                if (!Cools.isEmpty(barcode)) {
                WrkMast wrkMast1 = wrkMastMapper.selectPickStep1(staProtocol.getWorkNo().intValue());
                //任务号如果在工作档中存在,就不用去判断条码
                if(Cools.isEmpty(wrkMast1)) {
                    if (!Cools.isEmpty(barcode)) {
//                    log.info("{}号条码扫描器检测条码信息:{}", pickSta.getBarcode(), barcode);
                    if ("NG".endsWith(barcode) || "NoRead".equals(barcode) && staProtocol.isPakMk() ) {
                        if (!staProtocol.isLoading()) {
                        if ("NG".endsWith(barcode) || "NoRead".equals(barcode) && staProtocol.isPakMk()) {
                            if (!staProtocol.isLoading()) {
                                continue;
                            }
                            if (!staProtocol.isPakMk()) {
                                continue;
                            }
                            if (staProtocol.getWorkNo() != 0) {
                                continue;
                            }
                            staProtocol.setWorkNo(wrkNo);
                            wrkNo++;
                            staProtocol.setStaNo(pickSta.getBackSta().shortValue());
                            devpThread.setPakMk(staProtocol.getSiteId(), false);
                            MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                            // led 异常显示
                            if (ledThread != null) {
                                String errorMsg = "扫码失败,请重试";
                                News.error(methodName + ":扫码失败,请重试");
                                MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(3, errorMsg));
                            }
                            continue;
                        }
                        if (!staProtocol.isPakMk()) {
                            continue;
                        }
                        if(staProtocol.getWorkNo() != 0) {
                            continue;
                        }
                        staProtocol.setWorkNo(wrkNo);
                        wrkNo++;
                        staProtocol.setStaNo(pickSta.getBackSta().shortValue());
                        devpThread.setPakMk(staProtocol.getSiteId(), false);
                        MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                        // led 异常显示
                        if (ledThread != null) {
                            String errorMsg = "扫码失败,请重试";
                            News.error(methodName + ":扫码失败,请重试");
                            MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(3, errorMsg));
                        }
                    } else {
                        continue;
                    }
                } else {
                    continue;
                }
@@ -477,7 +483,12 @@
//                        && (staProtocol.getWorkNo() == 9999 || staProtocol.getWorkNo() == 9997 || staProtocol.getWorkNo() == 9995)
                        && staProtocol.isPakMk()) {
                    WrkMast wrkMast = wrkMastMapper.selectPickStep(barcode);
                    WrkMast wrkMast = null;
                    //优先查询任务号对应的工作档有没有,如果有的话就不用查条码号
                    wrkMast = wrkMastMapper.selectPickStep1(staProtocol.getWorkNo().intValue());
                    if(Cools.isEmpty(wrkMast)) {
                        wrkMast = wrkMastMapper.selectPickStep(barcode);
                    }
//                    WrkMast wrkMast = wrkMastMapper.selectPakInStep3(staProtocol.getWorkNo().intValue());
                    if (wrkMast == null) {
                        // 无拣料数据
src/main/resources/mapper/WrkMastMapper.xml
@@ -103,6 +103,10 @@
        select top 1 * from asr_wrk_mast where barcode=#{barcode} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104)
    </select>
    <select id="selectPickStep1" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast where wrk_no=#{workNo} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104)
    </select>
    <select id="selectPakOutStep1" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc
    </select>