自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-08-16 98c48cd18c0de3141e444b86886f816931f51cc2
#
2个文件已修改
82 ■■■■ 已修改文件
src/main/java/com/zy/common/properties/SystemProperties.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/properties/SystemProperties.java
@@ -63,7 +63,7 @@
    // 生成激活码
    public static void main(String[] args) {
        String timeStr = "2021-08-01 17:48:35";
        String timeStr = "2099-08-01 17:48:35";
        Date exprTime = DateUtils.convert(timeStr);
        String code = AesUtils.encrypt(DateUtils.convert(exprTime, DateUtils.yyyyMMddHHmmss), SystemProperties.SALT);
        System.out.println("激活码:"+code);
src/main/java/com/zy/common/service/CommonService.java
@@ -102,11 +102,7 @@
     */
    public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto, LocTypeDto oldLocType, int times) {
        StartupDto startupDto = new StartupDto();
        if (sourceStaNo == 100) { // 轻货信号
            whsType = 1;    // 1 - 11 左
        } else if (sourceStaNo == 200) { // 重货信号
            whsType = 2;    // 12 - 21 右
        }
        whsType = 1;
        // 生成工作号
        int workNo = getWorkNo(0);
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
@@ -168,59 +164,29 @@
            int t = 0;
            boolean execute = true;
            int crnNo1;
            // 1 - 11排
            if (whsType == 1) {
                while (execute && t < 4) {
                    t++;
                    switch (curRow) {
                        case 3:
                            curRow = 11;
                            crnNo1 = 2;
                            break;
                        case 11:
                            curRow = 4;
                            crnNo1 = 1;
                            break;
                        case 4:
                            curRow = 12;
                            crnNo1 = 2;
                            break;
                        default:
                            curRow = 3;
                            crnNo1 = 1;
                            break;
                    }
                    if (basCrnpService.checkSiteError(crnNo1, true)) {
                        crnNo = crnNo1;
                        execute = false;
                    }
            while (execute && t < 4) {
                t++;
                switch (curRow) {
                    case 3:
                        curRow = 11;
                        crnNo1 = 2;
                        break;
                    case 11:
                        curRow = 4;
                        crnNo1 = 1;
                        break;
                    case 4:
                        curRow = 12;
                        crnNo1 = 2;
                        break;
                    default:
                        curRow = 3;
                        crnNo1 = 1;
                        break;
                }
                // 12 - 21排
            } else {
                while (execute && t < 4) {
                    t++;
                    switch (curRow) {
                        case 11:
                            curRow = 18;
                            crnNo1 = 3;
                            break;
                        case 18:
                            curRow = 12;
                            crnNo1 = 2;
                            break;
                        case 12:
                            curRow = 19;
                            crnNo1 = 3;
                            break;
                        default:
                            curRow = 11;
                            crnNo1 = 2;
                            break;
                    }
                    if (basCrnpService.checkSiteError(crnNo1, true)) {
                        crnNo = crnNo1;
                        execute = false;
                    }
                if (basCrnpService.checkSiteError(crnNo1, true)) {
                    crnNo = crnNo1;
                    execute = false;
                }
            }
        }