pjb
2024-06-24 67ab31a722e788e748befb37024c0879159a660a
# 捷众二期开发
5个文件已修改
47 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/model/MatDto.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/LedThread.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/WrkDetlMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -823,8 +823,17 @@
                    News.error(""+mark+" - 1"+" - 2"+" - 入库 ===>> 堆垛机站点在数据库不存在, 站点编号={}", crnStn.getStaNo());
                    continue;
                }
                // 获取工作状态为2(设备上走)的入库工作档
                WrkMast wrkMast = wrkMastMapper.selectPakInStep2(slave.getId(), staProtocol.getWorkNo().intValue(), crnStn.getStaNo());
                if (null == wrkMast) {
                    News.infoNoLog(""+mark+" - 1"+" - 4"+" - 查询无待入库数据--wrk_sts=2, 工作号={}", staProtocol.getWorkNo());
//                log.error("查询无待入库数据--wrk_sts=2, 工作号={}", staProtocol.getWorkNo());
                    continue;
                }
                if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() <= 9000 && staProtocol.isInEnable()
                if (staProtocol.isAutoing() && staProtocol.isLoading() &&
                        (staProtocol.getWorkNo() <= 9000 || (slave.getId() == 1 && (wrkMast.getIoType() == 53 || wrkMast.getIoType() == 57)))
                        && staProtocol.isInEnable()
                        && staDetl.getCanining() != null && staDetl.getCanining().equals("Y")) {
                    flag = true;
                }
@@ -835,13 +844,7 @@
                            +"能入信号(wms设置).equals(\"Y\")"+staDetl.getCanining());
                    continue;
                }
                // 获取工作状态为2(设备上走)的入库工作档
                WrkMast wrkMast = wrkMastMapper.selectPakInStep2(slave.getId(), staProtocol.getWorkNo().intValue(), crnStn.getStaNo());
                if (null == wrkMast) {
                    News.infoNoLog(""+mark+" - 1"+" - 4"+" - 查询无待入库数据--wrk_sts=2, 工作号={}", staProtocol.getWorkNo());
//                log.error("查询无待入库数据--wrk_sts=2, 工作号={}", staProtocol.getWorkNo());
                    continue;
                }
                // 获取库位信息
                LocMast locMast = locMastService.selectById(wrkMast.getLocNo());
                if (locMast == null) {
@@ -1647,7 +1650,7 @@
//                ledCommand.setSourceStaNo(wrkMast.getSourceStaNo());
                if (wrkMast.getIoType() != 110 && wrkMast.getIoType() != 10) {
                    List<WrkDetl> wrkDetls = wrkDetlService.findByWorkNo(wrkMast.getWrkNo());
                    wrkDetls.forEach(wrkDetl -> ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getAnfme(),wrkDetl.getSpecs())));
                    wrkDetls.forEach(wrkDetl -> ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getAnfme(),wrkDetl.getSpecs(),wrkDetl.getBatch())));
                }
                commands.add(ledCommand);
            }
src/main/java/com/zy/common/model/MatDto.java
@@ -23,6 +23,9 @@
    // 库位数量
    private Double total;
    // 批次
    private String batch;
    public MatDto() {
    }
@@ -37,6 +40,13 @@
        this.maknx = maknx;
        this.count = count;
    }
    public MatDto(String matNo, String maknx, Double count,String specs,String batch) {
        this.batch = batch;
        this.specs = specs;
        this.matnr = matNo;
        this.maknx = maknx;
        this.count = count;
    }
    public MatDto(String matNo, String maknx, Double count,Double total,String specs) {
        this.specs = specs;
        this.matnr = matNo;
src/main/java/com/zy/core/thread/LedThread.java
@@ -1,8 +1,5 @@
package com.zy.core.thread;
import com.alibaba.fastjson.JSON;
import com.core.common.Cools;
import com.zy.common.entity.Parameter;
import com.zy.common.model.MatDto;
import com.zy.common.utils.News;
import com.zy.core.Slave;
@@ -117,8 +114,6 @@
        TextBxPage page = new TextBxPage();
        for (LedCommand command : list) {
            page.newLine(command.getTitle() +"("+command.getWorkNo()+")");
            page.newLine("库位:"+ (command.getIoType() < 100 ? command.getLocNo() : command.getSourceLocNo()));
            page.newLine("目标站:"+command.getStaNo());
            if (!command.isEmptyMk()) {
                for (MatDto matDto : command.getMatDtos()) {
                    //去掉小数点
@@ -127,7 +122,11 @@
                    if(idx >= 0){
                        strQty.substring(0,idx);
                    }
                    page.newLine(matDto.getMaknx() + "[数量" + strQty +"]");
                    page.newLine(matDto.getBatch() + "[数量" + strQty +"]");
                    page.newLine(matDto.getMatnr());
                    page.newLine(matDto.getMaknx());
//                    page.newLine(matDto.getMaknx() + "[数量" + strQty +"]");
//                    page.newLine(matDto.getMaknx() + "【数量" + matDto.getCount() +"】");
                }
            }
src/main/resources/application.yml
@@ -8,7 +8,7 @@
    name: @pom.build.finalName@
  datasource:
    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    url: jdbc:sqlserver://127.0.0.1:1433;databasename=sxjzasrs
    url: jdbc:sqlserver://172.17.20.240:1433;databasename=sxjzasrs
    username: sa
    password: sa@123
  mvc:
src/main/resources/mapper/WrkDetlMapper.xml
@@ -9,6 +9,7 @@
        <result column="matnr" property="matnr" />
        <result column="maktx" property="maktx" />
        <result column="specs" property="specs" />
        <result column="batch" property="batch" />
        <result column="size" property="size" />
        <result column="color" property="color" />
        <result column="weight" property="weight" />
@@ -27,7 +28,7 @@
    </resultMap>
    <select id="findByWorkNo" resultMap="BaseResultMap">
        select wrk_no, mat_no as matnr, mat_name as maktx, qty as anfme ,specs from asr_wrk_detl where 1=1 and wrk_no = #{workNo}
        select wrk_no, mat_no as matnr, mat_name as maktx, qty as anfme ,specs, supplier as batch from asr_wrk_detl where 1=1 and wrk_no = #{workNo}
    </select>
    <update id="updateIoTime">