pang.jiabao
3 天以前 c5698e42c67e32892424a1a94ed9e7b532f0f7b8
济南二机床wcs功能调试完善
12个文件已修改
613 ■■■■■ 已修改文件
pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/model/LocTypeDto.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/model/SearchLocParam.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/MainProcess.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/protocol/StaProtocol.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/SiemensDevpThread.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/entity/WrkDetl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/service/impl/MainServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 152 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/console.map.js 352 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/console.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -185,7 +185,7 @@
    </dependencies>
    <build>
        <finalName>jsjwcs</finalName>
        <finalName>jgwcs</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
src/main/java/com/zy/common/model/LocTypeDto.java
@@ -1,6 +1,7 @@
package com.zy.common.model;
import com.zy.core.model.protocol.StaProtocol;
import com.zy.utils.News;
import lombok.Data;
/**
@@ -30,7 +31,22 @@
    }
    public LocTypeDto(StaProtocol staProtocol) {
        this.locType1 = staProtocol.getGoodsHeight();
        if (staProtocol.isHigh() == staProtocol.isLow() || staProtocol.isChang() == staProtocol.isDuan()) {
                    News.error("plc高低/长短检测异常,high:{},low:{},chang:{},duan:{}",staProtocol.isHigh(),staProtocol.isLow(),staProtocol.isChang(),staProtocol.isDuan());
                    return;
        }
        if (staProtocol.isHigh()) {
            this.locType1 = 2;
        } else {
            this.locType1 = 1;
        }
        if (staProtocol.isChang()) {
            this.locType2 = 2; // 长库位
        } else {
            this.locType2 = 1; // 短库位
        }
    }
    /**
src/main/java/com/zy/common/model/SearchLocParam.java
@@ -15,9 +15,12 @@
    private String barcode;
    // 库位规格( 0:未知, 1:低库位, 2:中库位, 3:高库位 )
    // 库位规格( 0:未知, 1:低库位, 2:高库位 )
    private Short locType1;
    // 库位规格( 0:未知, 1:短库位, 2:长库位 )
    private Short locType2;
    public static void main(String[] args) {
        SearchLocParam searchLocParam = new SearchLocParam();
        searchLocParam.setIoType(1);
src/main/java/com/zy/core/MainProcess.java
@@ -41,7 +41,7 @@
                    }
                    // 拣料、并板、盘点再入库
                    mainService.stnToCrnStnPick(3);
//                    mainService.stnToCrnStnPick(3);
                    // 入库  ===>> 入库站到堆垛机站,根据条码扫描生成入库工作档
                    mainService.generateStoreWrkFile(); // 组托
src/main/java/com/zy/core/model/protocol/StaProtocol.java
@@ -40,15 +40,21 @@
    // 满托盘
    private boolean fullPlt;
    // 高
    // 高库位 放6层
    private boolean high;
    // 中
    private boolean center;
    // 低
    // 低 15层
    private boolean low;
    // 长托盘 放后三列
    private boolean chang;
    // 短托盘 2-14 列
    private boolean duan;
    // 锁定标记
    private boolean pakMk = true;
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -45,20 +45,20 @@
    private short heartBeatVal = 1;
    private StaError1 staError1;
    public static final ArrayList<Integer> staNos = new ArrayList<Integer>() {{
        add(101);add(102);add(103);add(104);add(105);add(106);add(107);add(108);
        add(201);add(202);add(203);add(204);add(205);
    }};
    public static final ArrayList<Integer> BarcodeList = new ArrayList<Integer>() {{
        add(1); add(2);
        add(1); add(2);add(3);
    }};
    public static final ArrayList<Integer> staNosErrList = new ArrayList<Integer>() {{
        add(104); add(106);
        add(201); add(203); add(205);
    }};
    /**
     * 条码数量
     */
    private int barcodeSize = 2;
    private int barcodeSize = 3;
    /**
     * 入出库模式
@@ -183,7 +183,7 @@
    private void read() {
        // 站点信息
        OperateResultExOne<byte[]> result = siemensS7Net.Read("DB101.0", (short) (8*8));
        OperateResultExOne<byte[]> result = siemensS7Net.Read("DB101.0", (short) (8*5));
        if (result.IsSuccess) {
            for (int i = 0; i < staNos.size(); i++) {
                Integer siteId = staNos.get(i); // 站点编号
@@ -205,8 +205,9 @@
                staProtocol.setEmptyMk(status[4]);  // 空板信号
                staProtocol.setFullPlt(status[5]);  // 满托盘
                staProtocol.setHigh(status[6]);     // 高库位
                staProtocol.setLow(status[7]);      // 中库位
                staProtocol.setCenter(status[8]);   // 低库位
                staProtocol.setLow(status[7]);      // 低库位
                staProtocol.setChang(status[8]);   // 长托盘
                staProtocol.setDuan(status[9]);   // 短托盘
                if (!staProtocol.isPakMk() && !staProtocol.isLoading()) {
                    staProtocol.setPakMk(true);
@@ -220,7 +221,7 @@
        }
        // 条码扫描器
        OperateResultExOne<byte[]> barcodeResult = siemensS7Net.Read("DB101.400", (short) (BarcodeList.size() * 10));
        OperateResultExOne<byte[]> barcodeResult = siemensS7Net.Read("DB101.600", (short) (BarcodeList.size() * 10));
        if (barcodeResult.IsSuccess) {
            for (int i = 0; i < BarcodeList.size(); i++) {
                String barcode = siemensS7Net.getByteTransform().TransString(barcodeResult.Content,i*10 + 2,8, "UTF-8");
@@ -232,28 +233,28 @@
        }
        // 外形检测
        OperateResultExOne<byte[]> resultErr = siemensS7Net.Read("DB101.430", (short) (staNosErrList.size() *4)); // 不连续,多读中间一个
        OperateResultExOne<byte[]> resultErr = siemensS7Net.Read("DB101.700", (short) (staNosErrList.size() *4)); // 不连续,多读中间一个
        if (resultErr.IsSuccess){
            for (int i = 0;i<staNosErrList.size();i++){
                boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErr.Content, i*4, 1);
                boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErr.Content, i*4 + 2, 1);
                StaProtocol staProtocol = station.get(staNosErrList.get(i));
                staProtocol.setFrontErr(status[0]);
                staProtocol.setBackErr(status[1]);
                staProtocol.setHighErr(status[2]);
                staProtocol.setLeftErr(status[3]);
                staProtocol.setRightErr(status[4]);
                staProtocol.setGroupSupportErr(status[5]);
//                staProtocol.setGroupSupportErr(status[5]);
                staProtocol.setWeightErr(status[5]);
                staProtocol.setBarcodeErr(status[6]);
                staProtocol.setWeightErr(status[7]);
                short goodsHeight = siemensS7Net.getByteTransform().TransInt16(resultErr.Content, i * 4 + 2);
                staProtocol.setGoodsHeight(goodsHeight);
//                short goodsHeight = siemensS7Net.getByteTransform().TransInt16(resultErr.Content, i * 4 + 2);
//                staProtocol.setGoodsHeight(goodsHeight);
            }
        }
        // 故障信息反馈
        OperateResultExOne<byte[]> resultErr2 = siemensS7Net.Read("DB101.442", (short) (staNos.size() * 4));
        OperateResultExOne<byte[]> resultErr2 = siemensS7Net.Read("DB101.400", (short) (staNos.size() * 4));
        if (resultErr2.IsSuccess) {
            for (int i = 0; i < staNos.size(); i++) {
        for (int i = 0; i < staNos.size(); i++) {
                boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErr2.Content, i*4 + 2, 1);
                StaProtocol staProtocol = station.get(staNos.get(i)); // 站点编号
                staProtocol.setBreakerErr(status[0]);
@@ -305,15 +306,15 @@
            return;
        }
        int address = staNos.indexOf(staProtocol.getSiteId()) * 4;
        int address = staNos.indexOf(staProtocol.getSiteId()) * 6;
        OperateResult write;
        OperateResult write1;
        //任务下发次数
        int writeCount = 0;
        do {
            write = siemensS7Net.Write("DB100." + address, staProtocol.getWorkNo().shortValue());    // 工作号
            write1 = siemensS7Net.Write("DB100." + (address + 2), staProtocol.getStaNo());    // 目标站
            write1 = siemensS7Net.Write("DB100." + (address + 4), staProtocol.getStaNo());    // 目标站
            write = siemensS7Net.Write("DB100." + address, staProtocol.getWorkNo());    // 工作号
            Thread.sleep(200);
            if(write.IsSuccess && write1.IsSuccess){
                break;
src/main/java/com/zy/entity/WrkDetl.java
@@ -166,8 +166,8 @@
    /**
     * 长度
     */
    @ApiModelProperty(value= "长度")
    private Double length;
//    @ApiModelProperty(value= "长度")
//    private Double length;
    /**
     * 体积
src/main/java/com/zy/service/impl/MainServiceImpl.java
@@ -93,7 +93,7 @@
    @Value("${wms.url}")
    private String wmsUrl;
    public Integer wrkNo = 9997;
    public Integer wrkNo = 9999;
    /**
     * 组托
@@ -152,7 +152,7 @@
                    back = true;
                }
                // 退回
                if (back && (staProtocol.getWorkNo() == 9999 || staProtocol.getWorkNo() == 9998)  && staProtocol.isInEnable() && staProtocol.isLoading() && staProtocol.isPakMk()) {
                if (back && (staProtocol.getWorkNo() >= 9993 && staProtocol.getWorkNo() <= 9995) && staProtocol.isLoading() && staProtocol.isPakMk()) {
                    MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errMsg));
                    staProtocol.setWorkNo(wrkNo);
                    News.info("{}入库回退:{},任务号:{}", inSta.getStaNo(), errMsg,wrkNo);
@@ -168,7 +168,7 @@
                        && staProtocol.isLoading()
                        && staProtocol.isInEnable()
                        && !staProtocol.isEmptyMk()
                        && staProtocol.isPakMk() && staProtocol.getWorkNo() == 9999) {
                        && staProtocol.isPakMk() && staProtocol.getWorkNo() >= 9993 && staProtocol.getWorkNo() <= 9995) { // 9990-9992空托,9993-9995 满托,9999回退
                    if(Cools.isEmpty(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode)) {
                        News.info("{}条码扫描错误:{}",barcodeThread.getSlave().getId(),barcode);
                        continue;
@@ -191,6 +191,7 @@
                        param.setIoType(1);
                        param.setSourceStaNo(inSta.getStaNo());
                        param.setLocType1(locTypeDto.getLocType1());
                        param.setLocType2(locTypeDto.getLocType2());
                        String response = new HttpHandler.Builder()
                                .setUri(wmsUrl)
                                .setPath("/rpc/pakin/loc/v1")
@@ -597,6 +598,9 @@
            crnCommand.setTaskMode(CrnTaskModeType.LOC_MOVE); // 任务模式:  库位移转
            crnCommand.setSourcePosX(crnStn.getRow().shortValue());     // 源库位排
            crnCommand.setSourcePosY(crnStn.getBay().shortValue());     // 源库位列
            if(crnStn.getBay() == 1 && locMast.getBay1() >= 15) { // 入库 长库位则取货位置为0列
                crnCommand.setSourcePosY((short) 0);
            }
            crnCommand.setSourcePosZ(crnStn.getLev().shortValue());     // 源库位层
            crnCommand.setDestinationPosX(locMast.getRow1().shortValue());     // 目标库位排
            crnCommand.setDestinationPosY(locMast.getBay1().shortValue());     // 目标库位列
@@ -741,6 +745,9 @@
                    crnCommand.setSourcePosZ(sourceSta.getLev1().shortValue());     // 源库位层
                    crnCommand.setDestinationPosX(crnStn.getRow().shortValue());     // 目标库位排
                    crnCommand.setDestinationPosY(crnStn.getBay().shortValue());     // 目标库位列
                    if(crnStn.getBay() == 1 && sourceSta.getBay1() >= 15) { // 长库位 出库放货列 为0
                        crnCommand.setDestinationPosY((short) 0);
                    }
                    crnCommand.setDestinationPosZ(crnStn.getLev().shortValue());     // 目标库位层
                    crnCommand.setTraySize(sourceSta.getLocType1() == 2);     //库位类型
                    if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) {
@@ -1038,7 +1045,7 @@
                        && staProtocol.isInEnable()
                        && staProtocol.isEmptyMk()
                        && staProtocol.isPakMk()
                        && staProtocol.getWorkNo() == 9998 // 9997 回退 9998 空 9999 满
                        && staProtocol.getWorkNo() >= 9990 && staProtocol.getWorkNo() <= 9992 // 9990-9992空托,9993-9995 满托,9999回退
                        ) {
                    News.warnNoLog(""+mark+" - 0"+" - 开始执行:空栈板初始化入库,叉车入库站放货");
@@ -1049,6 +1056,7 @@
                        param.setIoType(10);
                        param.setSourceStaNo(emptyInSta.getStaNo());
                        param.setLocType1(locTypeDto.getLocType1());
                        param.setLocType2(locTypeDto.getLocType2());
                        String response = new HttpHandler.Builder()
                                .setUri(wmsUrl)
                                .setPath("/rpc/pakin/loc/v1")
@@ -1056,6 +1064,7 @@
                                .build()
                                .doPost();
                        JSONObject jsonObject = JSON.parseObject(response);
                        log.info("空托入库请求wms原始返回:" + jsonObject);
                        if (jsonObject.getInteger("code").equals(200)) {
                            StartupDto dto = jsonObject.getObject("data", StartupDto.class);
@@ -1067,7 +1076,7 @@
                            log.error("输送线下发6:"+dto.getWorkNo()+","+staProtocol.getSiteId());
                            if (!result) {
                                News.errorNoLog(""+mark+" - 1"+" - 更新plc站点信息失败");
                                throw new CoolException("更新plc站点信息失败");
                                throw new CoolException("SiemensDevp - 5");
                            }
                            if (ledThread != null) {
@@ -1613,8 +1622,8 @@
                CrnCommand crnCommand = new CrnCommand();
                crnCommand.setCrnNo(crn.getId()); // 堆垛机编号
                crnCommand.setTaskNo((short) 9999); // 工作号
                crnCommand.setTaskMode(CrnTaskModeType.GO_ORIGIN); // 任务模式:  回原点
                crnCommand.setSourcePosX((short) (crn.getId() == 1 ? 3 : 6));     // 源库位排
                crnCommand.setTaskMode((short)8); // 任务模式:  回原点
                crnCommand.setSourcePosX((short) 1);     // 源库位排
                crnCommand.setSourcePosY((short) 1);     // 源库位列
                crnCommand.setSourcePosZ((short) 1);     // 源库位层
                crnCommand.setDestinationPosX((short) 0);     // 目标库位排
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=jsjasrs
    url: jdbc:sqlserver://127.0.0.1:1433;databasename=jgwms
    username: sa
    password: sa@123
  mvc:
@@ -34,21 +34,21 @@
  enable: false
wms:
  url: 127.0.0.1:8080/jsjwms
  url: 127.0.0.1:8089/jgwms
# 下位机配置
wcs-slave:
  # 双深
  doubleDeep: true
  doubleDeep: false
  # 双深库位排号
  doubleLocs: 1,4,5,8
  # 一个堆垛机负责的货架排数
  groupCount: 4
  groupCount: 2
  # 堆垛机1
  crn[0]:
    id: 1
    ip: 192.168.5.10
    ip: 172.26.11.31
    port: 102
    rack: 0
    slot: 0
@@ -58,103 +58,119 @@
    # 堆垛机入库站点
    crnInStn[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 104
      row: 3
      bay: 1
      lev: 1
    # 堆垛机出库站点
    crnOutStn[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 102
      staNo: 201
      row: 2
      bay: 1
      lev: 1
  # 堆垛机2
  crn[1]:
    id: 2
    ip: 192.168.5.20
    port: 102
    rack: 0
    slot: 0
    # 偏移量,当堆垛机站点列号=1时,偏移量=2
    offset: 2
    demo: false
    # 堆垛机入库站点
    crnInStn[0]:
    # 堆垛机入库站点2
    crnInStn[1]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 106
      row: 6
      staNo: 203
      row: 1
      bay: 1
      lev: 1
    # 堆垛机出库站点
    # 堆垛机出库站点1
    crnOutStn[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 108
      row: 7
      staNo: 203
      row: 1
      bay: 1
      lev: 1
    # 堆垛机出库站点2
    crnOutStn[1]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 205
      row: 1
      bay: 9
      lev: 1
    # 堆垛机出库站点3
    crnOutStn[2]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 201
      row: 2
      bay: 1
      lev: 1
  # 输送线1
  devp[0]:
    id: 1
    ip: 192.168.5.40
    ip: 172.26.11.41
    port: 102
    rack: 0
    slot: 0
    # 入库口1
    inSta[0]:
      staNo: 104
      staNo: 201
      barcode: ${wcs-slave.barcode[0].id}
      backSta: 103
      led: ${wcs-slave.led[1].id}
      backSta: 202
      led: ${wcs-slave.led[0].id}
    # 入库口2
    inSta[1]:
      staNo: 106
      barcode: ${wcs-slave.barcode[1].id}
      backSta: 105
      staNo: 205
      barcode: ${wcs-slave.barcode[2].id}
      led: ${wcs-slave.led[2].id}
    # 入库口3
    inSta[2]:
      staNo: 203
      barcode: ${wcs-slave.barcode[1].id}
      led: ${wcs-slave.led[1].id}
      backSta: 204
    # 空板入库口1
    emptyInSta[0]:
      staNo: 104
      staNo: 201
      barcode: ${wcs-slave.barcode[0].id}
      backSta: 103
      led: ${wcs-slave.led[1].id}
      backSta: 202
      led: ${wcs-slave.led[0].id}
    # 空板入库口2
    emptyInSta[1]:
      staNo: 106
      barcode: ${wcs-slave.barcode[1].id}
      backSta: 105
      staNo: 205
      barcode: ${wcs-slave.barcode[2].id}
      led: ${wcs-slave.led[2].id}
    # 拣料入库口1
    pickSta[0]:
      staNo: 104
      barcode: ${wcs-slave.barcode[0].id}
      backSta: 103
    # 空板入库口3
    emptyInSta[2]:
      staNo: 203
      barcode: ${wcs-slave.barcode[1].id}
      backSta: 204
      led: ${wcs-slave.led[1].id}
    # 拣料入库口2
    pickSta[1]:
      staNo: 106
      barcode: ${wcs-slave.barcode[1].id}
      backSta: 105
      led: ${wcs-slave.led[2].id}
#    # 拣料入库口1
#    pickSta[0]:
#      staNo: 104
#      barcode: ${wcs-slave.barcode[0].id}
#      backSta: 103
#      led: ${wcs-slave.led[1].id}
#    # 拣料入库口2
#    pickSta[1]:
#      staNo: 106
#      barcode: ${wcs-slave.barcode[1].id}
#      backSta: 105
#      led: ${wcs-slave.led[2].id}
    # 出库口1
    outSta[0]:
      staNo: 101
      led: ${wcs-slave.led[0].id}
      staNo: 204
      led: ${wcs-slave.led[1].id}
    # 出库口2
    outSta[1]:
      staNo: 107
      led: ${wcs-slave.led[3].id}
      staNo: 205
      led: ${wcs-slave.led[2].id}
    # 出库口3
    outSta[2]:
      staNo: 202
      led: ${wcs-slave.led[1].id}
  # 条码扫描仪1
  barcode[0]:
    id: 1
    ip: 192.168.5.42
    ip: 172.26.11.43
    port: 51236
  # 条码扫描仪2
  barcode[1]:
    id: 2
    ip: 192.168.5.43
    ip: 172.26.11.44
    port: 51236
  # 条码扫描仪3
  barcode[2]:
    id: 3
    ip: 172.26.11.45
    port: 51236
  # LED1
@@ -163,7 +179,7 @@
    ip: 192.168.5.104
    port: 5005
    devpPlcId: ${wcs-slave.devp[0].id}
    staArr: 101
    staArr: 202
    crnId: 1
  # LED2
  led[1]:
@@ -171,7 +187,7 @@
    ip: 192.168.5.105
    port: 5005
    devpPlcId: ${wcs-slave.devp[0].id}
    staArr: 104
    staArr: 204
    crnId: 1
  # LED3
  led[2]:
@@ -179,13 +195,5 @@
    ip: 192.168.5.106
    port: 5005
    devpPlcId: ${wcs-slave.devp[0].id}
    staArr: 106
    crnId: 2
  # LED4
  led[3]:
    id: 4
    ip: 192.168.5.107
    port: 5005
    devpPlcId: ${wcs-slave.devp[0].id}
    staArr: 107
    crnId: 2
    staArr: 205
    crnId: 1
src/main/webapp/static/js/common.js
@@ -1,4 +1,4 @@
var baseUrl = "/jsjwcs";
var baseUrl = "/jgwcs";
// 赋值
function setVal(el, val) {
src/main/webapp/static/js/console.map.js
@@ -3,245 +3,64 @@
    "rackCount": 8,
    "crnCount": 2,
    "stbCount": 18,
    "hpPosition": 0,
    "hpPosition": 1,
    "minBayNo": 1,
    "floors": 1,
    "racks": [
    {
        "type": "rack",
        "id": "rack1",
        "top": 189,
        "left": 400,
        "top": 250,
        "left": 270,
        "width": 1350,
        "height": 23,
        "minBayNo": 1,
        "maxBayNo": 27
    },
    {
        "type": "rack",
        "id": "rack8",
        "top": 457,
        "left": 400,
        "width": 1350,
        "height": 23,
        "minBayNo": 1,
        "maxBayNo": 27
    },
    {
        "type": "rack",
        "id": "rack7",
        "top": 430,
        "left": 400,
        "width": 1350,
        "height": 23,
        "minBayNo": 1,
        "maxBayNo": 27
    },
    {
        "type": "rack",
        "id": "rack6",
        "top": 365,
        "left": 400,
        "width": 1350,
        "height": 23,
        "minBayNo": 1,
        "maxBayNo": 27
    },
    {
        "type": "rack",
        "id": "rack5",
        "top": 338,
        "left": 400,
        "width": 1350,
        "height": 23,
        "minBayNo": 1,
        "maxBayNo": 27
    },
    {
        "type": "rack",
        "id": "rack4",
        "top": 311,
        "left": 400,
        "width": 1350,
        "height": 23,
        "minBayNo": 1,
        "maxBayNo": 27
    },
    {
        "type": "rack",
        "id": "rack3",
        "top": 283,
        "left": 400,
        "width": 1350,
        "height": 23,
        "minBayNo": 1,
        "maxBayNo": 27
    },
    {
        "type": "rack",
        "id": "rack2",
        "top": 217,
        "left": 400,
        "width": 1350,
        "height": 23,
        "minBayNo": 1,
        "maxBayNo": 27
    },
    {
        "type": "rack",
        "id": "rack9",
        "top": 500,
        "left": 300,
        "width": 1500,
        "height": 23,
        "minBayNo": 1,
        "maxBayNo": 32
    },
    {
        "type": "rack",
        "id": "rack10",
        "top": 570,
        "left": 300,
        "width": 656,
        "height": 23,
        "minBayNo": 1,
        "maxBayNo": 14
    },
    {
        "type": "rack",
        "id": "rack11",
        "top": 570,
        "left": 1143,
        "width": 656,
        "height": 23,
        "minBayNo": 19,
        "maxBayNo": 14
    }
        "height": 30,
        "minBayNo": 2,
        "maxBayNo": 17
    }, {
            "type": "rack",
            "id": "rack2",
            "top": 325,
            "left": 270,
            "width": 1350,
            "height": 30,
            "minBayNo": 2,
            "maxBayNo": 17
        }
],
    "rackDescs": [
        {
            "type": "rackDescs",
            "id": "lb_desc14",
            "text": "》》》入库",
            "top": 339,
            "left": 303,
            "width": 100,
            "height": 23
        },
        {
            "type": "rackDescs",
            "id": "lb_desc13",
            "text": "》》》入库",
            "top": 312,
            "left": 303,
            "text": "》》》出库",
            "top": 360,
            "left": 1600,
            "width": 100,
            "height": 23
        },
        {
            "type": "rackDescs",
            "id": "lb_desc12",
            "text": "《《《 出库",
            "top": 459,
            "left": 303,
            "text": "《《《 入库",
            "top": 220,
            "left": 1600,
            "width": 100,
            "height": 23
        },
        {
            "type": "rackDescs",
            "id": "lb_desc11",
            "text": "《《《 出库",
            "top": 190,
            "left": 303,
            "width": 100,
            "height": 23
        },
        {
            "type": "rackDescs",
            "id": "lb_desc10",
            "text": "#10",
            "top": 570,
            "left": 1800,
            "width": 33,
            "height": 23
        },
        {
            "type": "rackDescs",
            "id": "lb_desc9",
            "text": "#9",
            "top": 500,
            "left": 1800,
            "width": 33,
            "height": 23
        },
    {
        "type": "rackDescs",
        "id": "lb_desc8",
        "text": "#8",
        "top": 460,
        "left": 1750,
        "width": 33,
        "height": 23
    },
    {
        "type": "rackDescs",
        "id": "lb_desc7",
        "text": "#7",
        "top": 430,
        "left": 1750,
        "width": 33,
        "height": 23
    },
    {
        "type": "rackDescs",
        "id": "lb_desc6",
        "text": "#6",
        "top": 370,
        "left": 1750,
        "width": 33,
        "height": 23
    },
    {
        "type": "rackDescs",
        "id": "lb_desc5",
        "text": "#5",
        "top": 340,
        "left": 1750,
        "width": 33,
        "height": 23
    },
    {
        "type": "rackDescs",
        "id": "lb_desc4",
        "text": "#4",
        "top": 310,
        "left": 1750,
        "width": 33,
        "height": 23
    },
    {
        "type": "rackDescs",
        "id": "lb_desc3",
        "text": "#3",
        "top": 280,
        "left": 1750,
        "width": 33,
        "height": 23
    },
    {
        "type": "rackDescs",
        "id": "lb_desc2",
        "text": "#2",
        "top": 218,
        "left": 1750,
        "text": "#1",
        "top": 330,
        "left": 233,
        "width": 33,
        "height": 23
    },
    {
        "type": "rackDescs",
        "id": "lb_desc1",
        "text": "#1",
        "top": 190,
        "left": 1750,
        "text": "#2",
        "top": 255,
        "left": 235,
        "width": 33,
        "height": 23
    }
@@ -251,35 +70,17 @@
        "type": "crane",
        "id": "crn-1",
        "text": "1",
        "top": 250,
        "left": 350,
        "width": 101,
        "top": 285,
        "left": 270,
        "width": 100,
        "height": 32
    },
    {
        "type": "track",
        "id": "lb_track3",
        "text": "",
        "top": 265,
        "left": 400,
        "width": 1350,
        "height": 1
    },
    {
        "type": "crane",
        "id": "crn-2",
        "text": "2",
        "top": 393,
        "left": 350,
        "width": 101,
        "height": 29
    },
    {
        "type": "track",
        "id": "lb_track4",
        "text": "",
        "top": 408,
        "left": 400,
        "top": 302,
        "left": 270,
        "width": 1350,
        "height": 1
    }
@@ -305,75 +106,48 @@
                "stns": [
                    {
                        "type": "stn",
                        "id": "site-101",
                        "text": "101",
                        "top": 218,
                        "left": 260,
                        "width": 65,
                        "height": 22
                        "id": "site-201",
                        "text": "201",
                        "top": 250,
                        "left": 1620,
                        "width": 70,
                        "height": 30
                    },
                    {
                        "type": "stn",
                        "id": "site-102",
                        "text": "102",
                        "top": 218,
                        "left": 330,
                        "width": 68,
                        "height": 22
                        "id": "site-202",
                        "text": "202",
                        "top": 250,
                        "left": 1691,
                        "width": 70,
                        "height": 30
                    },
                    {
                        "type": "stn",
                        "id": "site-103",
                        "text": "103",
                        "top": 284,
                        "left": 260,
                        "width": 65,
                        "height": 22
                        "id": "site-203",
                        "text": "203",
                        "top": 325,
                        "left": 1620,
                        "width": 70,
                        "height": 30
                    },
                    {
                        "type": "stn",
                        "id": "site-104",
                        "text": "104",
                        "top": 284,
                        "left": 330,
                        "width": 68,
                        "height": 22
                        "id": "site-204",
                        "text": "204",
                        "top": 325,
                        "left": 1691,
                        "width": 70,
                        "height": 30
                    },
                    {
                        "type": "stn",
                        "id": "site-105",
                        "text": "105",
                        "top": 367,
                        "left": 260,
                        "width": 65,
                        "height": 22
                    },
                    {
                        "type": "stn",
                        "id": "site-106",
                        "text": "106",
                        "top": 367,
                        "left": 330,
                        "width": 68,
                        "height": 22
                    },
                    {
                        "type": "stn",
                        "id": "site-107",
                        "text": "107",
                        "top": 431,
                        "left": 260,
                        "width": 65,
                        "height": 22
                    },
                    {
                        "type": "stn",
                        "id": "site-108",
                        "text": "108",
                        "top": 431,
                        "left": 330,
                        "width": 68,
                        "height": 22
                        "id": "site-205",
                        "text": "205",
                        "top": 325,
                        "left": 945,
                        "width": 83,
                        "height": 30
                    }
                ]
            }
src/main/webapp/views/console.html
@@ -600,12 +600,12 @@
                            crns[i].bay = 1
                        }
                        var offSet = 350;
                        var offSet = 1620;
                        if(crns[i].bay === 1){
                            crnEl.animate({left: offSet + 'px'}, 1000);
                        } else {
                            let lf = (offSet + (crns[i].bay - 1 )* 50);
                            let lf = (offSet - (crns[i].bay - 1 )* 84);
                            crnEl.animate({left: lf + 'px'}, 1000);
                        }