luxiaotao1123
2022-02-22 04ef1a453d35fab8742f185a33d2659f623b038c
Merge branch 'xgmwcs' of http://47.97.1.152:5880/r/zy-wcs into xgmwcs
4个文件已修改
29 ■■■■ 已修改文件
src/main/java/com/zy/asrs/mapper/WrkMastMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/WrkMastMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/WrkMastMapper.java
@@ -35,7 +35,7 @@
    // 拣料再入库时,站点有物且需求时查询
//    @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("workNo")Integer workNo);
    WrkMast selectPickStep(@Param("barcode")String barcode);
    // 出库第一步,从库位到堆垛机出库站
//    @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")
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -303,6 +303,21 @@
        for (DevpSlave devp : slaveProperties.getDevp()) {
            // 遍历拣料入库口
            for (DevpSlave.Sta pickSta : devp.getPickSta()) {
                // 获取条码扫描仪信息
                BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, pickSta.getBarcode());
                if (barcodeThread == null) {
                    continue;
                }
                String barcode = barcodeThread.getBarcode();
                if(!Cools.isEmpty(barcode)) {
                    log.info("{}号条码扫描器检测条码信息:{}", pickSta.getBarcode(), barcode);
                    if("NG".endsWith(barcode) || "NoRead".equals(barcode)) {
                        continue;
                    }
                } else {
                    continue;
                }
                // 获取拣料入库站信息
                DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
                StaProtocol staProtocol = devpThread.getStation().get(pickSta.getStaNo());
@@ -311,9 +326,8 @@
                } else {
                    staProtocol = staProtocol.clone();
                }
                if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable()
                    && staProtocol.getWorkNo() > 0 && staProtocol.isPakMk()){
                    WrkMast wrkMast = wrkMastMapper.selectPickStep(staProtocol.getWorkNo().intValue());
                if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isPakMk()){
                    WrkMast wrkMast = wrkMastMapper.selectPickStep(barcode);
                    if (wrkMast == null) {
                        // 无拣料数据
                        continue;
src/main/resources/application.yml
@@ -180,7 +180,8 @@
      staNo: 182
    # 拣料入库口
    pickSta[0]:
      staNo: 172
      staNo: 173
      barcode: ${wcs-slave.barcode[0].id}
  # 条码扫描仪
  barcode[0]:
    id: 1
@@ -199,4 +200,4 @@
    ip: 10.10.10.61
    port: 5005
    devpPlcId: ${wcs-slave.devp[0].id}
    staArr: 182
    staArr: 182
src/main/resources/mapper/WrkMastMapper.xml
@@ -96,7 +96,7 @@
    </select>
    <select id="selectPickStep" resultMap="BaseResultMap">
        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)
        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="selectPakOutStep1" resultMap="BaseResultMap">