自动化立体仓库 - WMS系统
#
lsh
2024-06-12 c372044e2081581bcf7df4969ea33552ad3bd9d8
#
6个文件已修改
74 ■■■■ 已修改文件
src/main/java/com/zy/asrs/utils/Utils.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/CodeBuilder.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/config/AdminInterceptor.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/properties/SystemProperties.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/task/ActivateScheduler.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/Utils.java
@@ -279,30 +279,31 @@
    //库位排号分配
    public static int[] LocNecessaryParameters(Integer whsType, Integer curRow, Integer crnNumber) {
        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        switch (whsType){
            case 1://经典双伸库位
                return LocNecessaryParametersDoubleExtension(whsType, curRow, crnNumber); //已完善
                return LocNecessaryParametersDoubleExtension(rowLastno, curRow, crnNumber); //已完善
            case 2://经典单伸库位(2排货架)
                return LocNecessaryParametersDoubleExtension2(whsType, curRow, crnNumber); //已完善
                return LocNecessaryParametersDoubleExtension2(rowLastno, curRow, crnNumber); //已完善
            case 3://经典单双伸库位  左单右双(小单大双)
                return LocNecessaryParametersDoubleExtension3(whsType, curRow, crnNumber); //未完善
                return LocNecessaryParametersDoubleExtension3(rowLastno, curRow, crnNumber); //未完善
            case 4://经典单双伸库位  左双右单(小双大单)
                return LocNecessaryParametersDoubleExtension4(whsType, curRow, crnNumber); //未完善
                return LocNecessaryParametersDoubleExtension4(rowLastno, curRow, crnNumber); //未完善
            case 5://双工位单伸库位(4排货架)
                return LocNecessaryParametersDoubleExtension5(whsType, curRow, crnNumber); //已完善
                return LocNecessaryParametersDoubleExtension5(rowLastno, curRow, crnNumber); //已完善
            default:
                return LocNecessaryParametersMove(whsType, curRow, crnNumber);//moveCrnNo
                return LocNecessaryParametersMove(rowLastno, curRow, crnNumber);//moveCrnNo
        }
    }
    //经典双伸库位
    public static int[] LocNecessaryParametersDoubleExtension(Integer whsType, Integer curRow, Integer crnNumber) {
    public static int[] LocNecessaryParametersDoubleExtension(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        Integer sRow = rowLastno.getsRow();
        Integer sCrnNo = rowLastno.getsCrnNo();
        if (BooleanWhsTypeSta(whsType)) {
        if (BooleanWhsTypeSta(rowLastno.getWhsType())) {
            necessaryParameters[0] = crnNumber; // 轮询次数
            //满板正常入库
            if (curRow.equals(crnNumber * 4 + sRow - 1)) {
@@ -335,7 +336,7 @@
    }
    //经典双伸库位移库
    public static int[] LocNecessaryParametersMove(Integer whsType, Integer curRow, Integer moveCrnNo) {
    public static int[] LocNecessaryParametersMove(RowLastno rowLastno, Integer curRow, Integer moveCrnNo) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        necessaryParameters[0] = 2; // 轮询次数
        if (curRow.equals(moveCrnNo*4-2)){
@@ -351,13 +352,11 @@
    }
    //经典单伸库位
    public static int[] LocNecessaryParametersDoubleExtension2(Integer whsType, Integer curRow, Integer crnNumber) {
    public static int[] LocNecessaryParametersDoubleExtension2(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        Integer sRow = rowLastno.getsRow();
        Integer sCrnNo = rowLastno.getsCrnNo();
        if (BooleanWhsTypeSta(whsType)) {
        if (BooleanWhsTypeSta(rowLastno.getWhsType())) {
            necessaryParameters[0] = crnNumber; // 轮询次数
            //满板正常入库
            if (curRow.equals(crnNumber * 2 + sRow - 1)) {
@@ -390,13 +389,11 @@
    }
    //经典单双伸库位  左单右双(小单大双)
    public static int[] LocNecessaryParametersDoubleExtension3(Integer whsType, Integer curRow, Integer crnNumber) {
    public static int[] LocNecessaryParametersDoubleExtension3(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        Integer sRow = rowLastno.getsRow();
        Integer sCrnNo = rowLastno.getsCrnNo();
        if (BooleanWhsTypeSta(whsType)) {
        if (BooleanWhsTypeSta(rowLastno.getWhsType())) {
            necessaryParameters[0] = crnNumber; // 轮询次数
            //满板正常入库
            if (curRow.equals(crnNumber * 3 + sRow - 1)) {
@@ -429,13 +426,11 @@
    }
    //经典单双伸库位  左双右单(小双大单)
    public static int[] LocNecessaryParametersDoubleExtension4(Integer whsType, Integer curRow, Integer crnNumber) {
    public static int[] LocNecessaryParametersDoubleExtension4(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        Integer sRow = rowLastno.getsRow();
        Integer sCrnNo = rowLastno.getsCrnNo();
        if (BooleanWhsTypeSta(whsType)) {
        if (BooleanWhsTypeSta(rowLastno.getWhsType())) {
            necessaryParameters[0] = crnNumber; // 轮询次数
            //满板正常入库
            if (curRow.equals(crnNumber * 3 + sRow - 1)) {
@@ -468,13 +463,11 @@
    }
    //双工位单伸库位
    public static int[] LocNecessaryParametersDoubleExtension5(Integer whsType, Integer curRow, Integer crnNumber) {
    public static int[] LocNecessaryParametersDoubleExtension5(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        Integer sRow = rowLastno.getsRow();
        Integer sCrnNo = rowLastno.getsCrnNo();
        if (BooleanWhsTypeSta(whsType)) {
        if (BooleanWhsTypeSta(rowLastno.getWhsType())) {
            necessaryParameters[0] = crnNumber; // 轮询次数
            //满板正常入库
            if (curRow.equals(crnNumber * 4 + sRow - 1)) {
src/main/java/com/zy/common/CodeBuilder.java
@@ -17,10 +17,10 @@
//        generator.table="sys_host";
        // sqlserver
        generator.sqlOsType = SqlOsType.SQL_SERVER;
        generator.url="192.168.4.15:1433;databasename=gdykasrs";
        generator.url="192.168.4.15:1433;databasename=source";
        generator.username="sa";
        generator.password="sa@123";
        generator.table="man_auto_move";
        generator.table="asr_row_lastno_type";
        generator.packagePath="com.zy.asrs";
        generator.build();
    }
src/main/java/com/zy/common/config/AdminInterceptor.java
@@ -141,13 +141,13 @@
                    Http.response(response, BaseRes.NO_ACTIVATION);
                    return false;
                }
                // 记录操作日志
                OperateLog operateLog = new OperateLog();
                operateLog.setAction(Cools.isEmpty(memo)?request.getRequestURI():memo);
                operateLog.setIp(request.getRemoteAddr());
                operateLog.setUserId(user.getId());
                operateLog.setRequest(JSON.toJSONString(request.getParameterMap()));
                request.setAttribute("operateLog", operateLog);
//                // 记录操作日志
//                OperateLog operateLog = new OperateLog();
//                operateLog.setAction(Cools.isEmpty(memo)?request.getRequestURI():memo);
//                operateLog.setIp(request.getRemoteAddr());
//                operateLog.setUserId(user.getId());
//                operateLog.setRequest(JSON.toJSONString(request.getParameterMap()));
//                request.setAttribute("operateLog", operateLog);
            }
            return true;
        } catch (Exception e){
src/main/java/com/zy/common/properties/SystemProperties.java
@@ -15,7 +15,8 @@
    public static final String SALT = "123456789qwertyu";
    // 系统激活状态 (默认未激活)
    public static boolean SYSTEM_ACTIVATION = Boolean.FALSE;
//    public static boolean SYSTEM_ACTIVATION = Boolean.FALSE;
    public static boolean SYSTEM_ACTIVATION = Boolean.TRUE;
    public static String getActivationCode(String fileName){
        StringBuilder activationCode = new StringBuilder();
src/main/java/com/zy/common/service/CommonService.java
@@ -137,7 +137,7 @@
        if (Cools.isEmpty(matnr)) {  //物料号
            matnr = "";
        }
        if (Cools.isEmpty(batch)) {  //箱号
        if (Cools.isEmpty(batch)) {  //批次
            batch = "";
        }
        if (Cools.isEmpty(grade)) {  //备用
src/main/java/com/zy/common/task/ActivateScheduler.java
@@ -18,8 +18,8 @@
public class ActivateScheduler {
//    @Scheduled(cron = "0/1 * 8 * * ? ") // 每天8点
    @Scheduled(cron = "* 0/1 * * * ? ") // 每分钟
    @PostConstruct
//    @Scheduled(cron = "* 0/1 * * * ? ") // 每分钟
//    @PostConstruct
    private void execute(){
        // 获取激活码
        String activationCode = SystemProperties.getActivationCode(OSinfo.getOSname().getActivationCodePath());