自动化立体仓库 - WMS系统
zjj
2024-03-16 2b771dc58c86d61d00dd7bd35c6929a15bfc0b5c
#库位初始化
5个文件已修改
87 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/LocMastController.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/param/LocMastInitParam.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/model/Shelves.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/license/CustomLicenseManager.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/locMast/locMast.html 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/LocMastController.java
@@ -184,10 +184,16 @@
                    String locNo = String.format("%02d", r) + String.format("%03d", b) + String.format("%02d", l);
                    // 获取堆垛机号
                    int crnNo = 0;
                    Shelves shelves = new Shelves(param.getEndRow() - param.getStartRow() + 1, param.getCrnAmount());
                    Shelves shelves = new Shelves(param.getEndRow() - param.getStartRow() + 1, param.getCrnAmount(),param.getStartRow());
                    for (List<Integer> node : shelves.nodes){
                        if (node.contains(r)) {
                            crnNo = shelves.nodes.indexOf(node) + 1;
                            if (!Cools.isEmpty(param.getStaCrn()) && param.getStaCrn() > 0){
                                crnNo = shelves.nodes.indexOf(node) + param.getStaCrn();
                            }else {
                                crnNo = shelves.nodes.indexOf(node) + 1;
                            }
                            break;
                        }
                    }
@@ -210,8 +216,9 @@
                }
            }
        }
//        locMastService.delete(new EntityWrapper<>());
//        locDetlService.delete(new EntityWrapper<>());
        if (!Cools.isEmpty(param.getEnable()) && param.getEnable() == 1){
             locMastService.delete(new EntityWrapper<>());
        }
        locMastService.insertBatch(list);
        return R.ok("初始化成功");
    }
src/main/java/com/zy/asrs/entity/param/LocMastInitParam.java
@@ -2,10 +2,12 @@
import com.core.common.BaseRes;
import com.core.exception.CoolException;
import lombok.Data;
/**
 * Created by vincent on 2020/6/13
 */
@Data
public class LocMastInitParam {
    // 起始排
@@ -38,6 +40,12 @@
    // 轻重类型: 1:轻库位  2:重库位
    private Short locType3;
    private Integer enable;
    private Integer staCrn;
    private Integer endCrn;
    public Integer getStartRow() {
        if (null == startRow) {
            throw new CoolException(BaseRes.PARAM);
src/main/java/com/zy/common/model/Shelves.java
@@ -38,10 +38,12 @@
    public Shelves(int size, int group, int offset) {
        this.size = size;
        this.group = group;
        this.offset = offset;
        this.offset = offset-1;
        init();
    }
    /**
     * 初始化方法【私有】
     */
src/main/java/com/zy/system/entity/license/CustomLicenseManager.java
@@ -127,25 +127,25 @@
        LicenseCheck serverCheckModel = getServerInfos();
        if(expectedCheckModel != null && serverCheckModel != null){
            //校验IP地址
            if(!checkIpAddress(expectedCheckModel.getIpAddress(),serverCheckModel.getIpAddress())){
                throw new LicenseContentException("当前服务器的IP没在授权范围内");
            }
            //校验Mac地址
            if(!checkIpAddress(expectedCheckModel.getMacAddress(),serverCheckModel.getMacAddress())){
                throw new LicenseContentException("当前服务器的Mac地址没在授权范围内");
            }
            //校验主板序列号
            if(!checkSerial(expectedCheckModel.getMainBoardSerial(),serverCheckModel.getMainBoardSerial())){
                throw new LicenseContentException("当前服务器的主板序列号没在授权范围内");
            }
            //校验CPU序列号
            if(!checkSerial(expectedCheckModel.getCpuSerial(),serverCheckModel.getCpuSerial())){
                throw new LicenseContentException("当前服务器的CPU序列号没在授权范围内");
            }
//            //校验IP地址
//            if(!checkIpAddress(expectedCheckModel.getIpAddress(),serverCheckModel.getIpAddress())){
//                throw new LicenseContentException("当前服务器的IP没在授权范围内");
//            }
//
//            //校验Mac地址
//            if(!checkIpAddress(expectedCheckModel.getMacAddress(),serverCheckModel.getMacAddress())){
//                throw new LicenseContentException("当前服务器的Mac地址没在授权范围内");
//            }
//
//            //校验主板序列号
//            if(!checkSerial(expectedCheckModel.getMainBoardSerial(),serverCheckModel.getMainBoardSerial())){
//                throw new LicenseContentException("当前服务器的主板序列号没在授权范围内");
//            }
//
//            //校验CPU序列号
//            if(!checkSerial(expectedCheckModel.getCpuSerial(),serverCheckModel.getCpuSerial())){
//                throw new LicenseContentException("当前服务器的CPU序列号没在授权范围内");
//            }
        }else{
            throw new LicenseContentException("不能获取服务器硬件信息");
        }
src/main/webapp/views/locMast/locMast.html
@@ -106,6 +106,14 @@
<!-- 重置库位弹窗 -->
<div id="resetLocDiv" style="margin: 20px 0 10px 30px; display: none">
    <div class="layui-form layui-form-pane">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">删除库位</label>
                <div class="layui-input-inline" style="width: 100px;">
                    <input type="checkbox" name="enable" lay-skin="switch" value="1" lay-text="删除|保留">
                </div>
            </div>
        </div>
        <!-- 排 -->
        <div class="layui-form-item">
            <div class="layui-inline">
@@ -151,6 +159,14 @@
                <input type="text" name="crnAmount" lay-verify="required|number" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">起始堆垛机</label>
                <div class="layui-input-inline" >
                    <input type="text" name="staCrn" autocomplete="off" class="layui-input" lay-verify="number">
                </div>
            </div>
        </div>
        <!-- 库位类型 -->
        <div class="layui-form-item">
            <label class="layui-form-label">高低类型</label>
@@ -185,9 +201,9 @@
                </select>
            </div>
        </div>
        <div id="prompt" style="text-indent: 10px;">
            <span class="not-null">初始化库位后将删除库存明细,请谨慎操作!</span>
        </div>
<!--        <div id="prompt" style="text-indent: 10px;">-->
<!--            <span class="not-null">初始化库位后将删除库存明细,请谨慎操作!</span>-->
<!--        </div>-->
        <!-- 按钮 -->
        <div style="text-align: center; margin-top: 20px">
            <button class="layui-btn layui-btn-radius layui-btn-normal" id="initDo" lay-submit lay-filter="initDo">确定</button>