自动化立体仓库 - WCS系统
#
luxiaotao1123
2022-01-06 006ca71bd84497f2ff53630a3f9257f7a6e29391
#
3个文件已修改
107 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/css/crn.css 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/crn.html 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1191,82 +1191,6 @@
    /**
     * 堆垛机演示  ===>> 库位移转
     */
    @Async
    public void crnDemoOfLocMove(Integer crn){
        for (int i = 0; i < 5; i++) {
            LocMast sourceLoc = locMastService.queryDemoSourceLoc(crn);
            LocMast loc = locMastService.queryDemoLoc(crn);
            if (null == sourceLoc || null == loc) {
                break;
            }
            String sourceLocNo = sourceLoc.getLocNo();
            String locNo = loc.getLocNo();
            // 获取工作号
            int workNo = commonService.getWorkNo(WorkNoType.PICK.type);
            // 保存工作档
            WrkMast wrkMast = new WrkMast();
            wrkMast.setWrkNo(workNo);
            wrkMast.setIoTime(new Date());
            wrkMast.setWrkSts(11L); // 工作状态:11.生成出库ID
            wrkMast.setIoType(11); // 入出库状态: 11.库格移载
            wrkMast.setIoPri(13D);
            wrkMast.setCrnNo(crn);
            wrkMast.setSourceLocNo(sourceLocNo); // 源库位
            wrkMast.setLocNo(locNo); // 目标库位
            wrkMast.setFullPlt("N"); // 满板:Y
            wrkMast.setPicking("N"); // 拣料
            wrkMast.setExitMk("N"); // 退出
            wrkMast.setEmptyMk(sourceLoc.getLocSts().equals("D")?"Y":"N"); // 空板
            wrkMast.setBarcode(sourceLoc.getBarcode()); // 托盘码
            wrkMast.setLinkMis("N");
            wrkMast.setAppeTime(new Date());
            wrkMast.setModiTime(new Date());
            int res = wrkMastMapper.insert(wrkMast);
            if (res == 0) {
                throw new CoolException("保存工作档失败");
            }
            // 工作档明细保存
            List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", sourceLocNo));
            for (LocDetl locDetl : locDetls) {
                WrkDetl wrkDetl = new WrkDetl();
                wrkDetl.setWrkNo(workNo);
                wrkDetl.setIoTime(new Date());
                wrkDetl.setAnfme(locDetl.getAnfme());
                VersionUtils.setWrkDetl(wrkDetl, locDetl); // 版本控制
                wrkDetl.setAppeTime(new Date());
                wrkDetl.setModiTime(new Date());
                if (!wrkDetlService.insert(wrkDetl)) {
                    throw new CoolException("保存工作档明细失败");
                }
            }
            // 修改源库位状态
            if (sourceLoc.getLocSts().equals("D") || sourceLoc.getLocSts().equals("F")) {
                sourceLoc.setLocSts("R"); // R.出库预约
                sourceLoc.setModiTime(new Date());
                if (!locMastService.updateById(sourceLoc)){
                    throw new CoolException("更新源库位状态失败");
                }
            } else {
                throw new CoolException("源库位出库失败");
            }
            // 修改目标库位状态
            if (loc.getLocSts().equals("O")) {
                loc.setLocSts("S"); // S.入库预约
                loc.setModiTime(new Date());
                if (!locMastService.updateById(loc)) {
                    throw new CoolException("更新目标库位状态失败");
                }
            } else {
                throw new CoolException("移转失败");
            }
        }
    }
    /**
     * 堆垛机演示  ===>> 库位移转
     */
    public synchronized void crnDemoOfLocMove1(){
        for (CrnSlave crn : slaveProperties.getCrn()) {
            if (!crn.getDemo()) { continue; }   // 必须为演示状态
src/main/webapp/static/css/crn.css
@@ -22,7 +22,7 @@
    padding: 10px;
}
.crn-command-item {
    padding: 20px 0;
    padding: 4px 0;
}
.crn-command-item label {
    font-size: 20px;
@@ -77,7 +77,7 @@
.crn-msg {
    overflow: auto;
    margin-top: 10px;
    height: 20%;
    height: 23%;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 3px rgba(0,0,0,.3);
@@ -226,7 +226,7 @@
/* -------------------- 第四模块 -------------------- */
.crn-output-board {
    margin-top: 10px;
    height: 23%;
    height: 20%;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 3px rgba(0,0,0,.3);
src/main/webapp/views/crn.html
@@ -47,7 +47,7 @@
    <!-- 执行命令 -->
    <div class="command-log">
        <h2>执行中的命令</h2>
        <h3>执行中的命令</h3>
        <div class="crn-command-item">
            <label>1#</label>
            <button id="demoBtn-1" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>
@@ -59,6 +59,24 @@
            <button id="demoBtn-2" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>
            <!--            <span>&nbsp;</span>-->
            <input id="crn2" disabled="disabled">
        </div>
        <div class="crn-command-item">
            <label>3#</label>
            <button id="demoBtn-3" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>
            <!--            <span>&nbsp;</span>-->
            <input id="crn3" disabled="disabled">
        </div>
        <div class="crn-command-item">
            <label>4#</label>
            <button id="demoBtn-4" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>
            <!--            <span>&nbsp;</span>-->
            <input id="crn4" disabled="disabled">
        </div>
        <div class="crn-command-item">
            <label>5#</label>
            <button id="demoBtn-5" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>
            <!--            <span>&nbsp;</span>-->
            <input id="crn5" disabled="disabled">
        </div>
    </div>
    <!-- 堆垛机状态位信息 -->
@@ -129,6 +147,9 @@
            <div class="select-container">
                <label><input type="radio" name="crnSelect" value="1" checked>&nbsp;1号堆垛机</label>
                <label><input type="radio" name="crnSelect" value="2">&nbsp;2号堆垛机</label>
                <label><input type="radio" name="crnSelect" value="3">&nbsp;3号堆垛机</label>
                <label><input type="radio" name="crnSelect" value="4">&nbsp;4号堆垛机</label>
                <label><input type="radio" name="crnSelect" value="5">&nbsp;5号堆垛机</label>
            </div>
        </div>
        <!-- 源站/源库位 选择 -->
@@ -618,4 +639,4 @@
    }
</script>
</html>
</html>