自动化立体仓库 - WMS系统
*
lsh
9 天以前 9701924a0a0c30e54f379ec226acb09f71d6686f
*
6个文件已修改
96 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/BasErrorDeviceController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/LocMastMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/LocMastService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocMastMapper.xml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/deviceOperate/errorTaskOperate.html 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/BasErrorDeviceController.java
@@ -47,4 +47,10 @@
        return R.ok(errorDeviceParamList);
    }
    @RequestMapping(value = "/locSts/adjacentLocMast")
    @ManagerAuth
    public R adjacentLocMast() {
        return R.ok(locMastService.adjacentLocMast());
    }
}
src/main/java/com/zy/asrs/mapper/LocMastMapper.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.zy.asrs.entity.LocMast;
import com.zy.asrs.entity.param.ErrorDeviceParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@@ -16,6 +17,7 @@
    LocMast queryFreeLocMast(@Param("row") Integer row, @Param("locType1") Short locType1);
    List<LocMast> asrLocMastNotInDetl1();
    List<LocMast> asrLocMastNotInDetl2();
    List<ErrorDeviceParam> adjacentLocMast();
    @Select("select loc_no from asr_loc_mast where 1=1 and loc_sts = 'O' and crn_no = #{crnNo}")
    List<String> queryGroupEmptyStock(Integer crnNo);
src/main/java/com/zy/asrs/service/LocMastService.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.service.IService;
import com.zy.asrs.entity.LocDetl;
import com.zy.asrs.entity.LocMast;
import com.zy.asrs.entity.param.ErrorDeviceParam;
import java.util.List;
@@ -14,6 +15,7 @@
    LocMast queryFreeLocMast(Integer row, Short locType1);
    List<LocMast>  asrLocMastNotInDetl1();
    List<LocMast>  asrLocMastNotInDetl2();
    List<ErrorDeviceParam>  adjacentLocMast();
    /**
     * 获取同组货架的空库位
src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java
@@ -4,6 +4,7 @@
import com.core.common.Cools;
import com.zy.asrs.entity.LocDetl;
import com.zy.asrs.entity.LocMast;
import com.zy.asrs.entity.param.ErrorDeviceParam;
import com.zy.asrs.mapper.LocMastMapper;
import com.zy.asrs.service.LocMastService;
import com.zy.asrs.service.RowLastnoService;
@@ -35,6 +36,11 @@
    }
    @Override
    public List<ErrorDeviceParam>  adjacentLocMast() {
        return this.baseMapper.adjacentLocMast();
    }
    @Override
    public List<String> queryGroupEmptyStock(String sourceLocNo) {
        if (Cools.isEmpty(sourceLocNo)) {
            return null;
src/main/resources/mapper/LocMastMapper.xml
@@ -37,6 +37,16 @@
    </resultMap>
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMapError" type="com.zy.asrs.entity.param.ErrorDeviceParam">
        <result column="category" property="category" />
        <result column="equipmentNo" property="equipmentNo" />
        <result column="categoryOther" property="categoryOther" />
        <result column="equipmentNoOther" property="equipmentNoOther" />
        <result column="errorM" property="errorM" />
    </resultMap>
    <select id="queryFreeLocMast" resultMap="BaseResultMap">
        select top 1 *
        from asr_loc_mast
@@ -69,6 +79,38 @@
          )
    </select>
    <!--    深浅库位不一致-->
    <select id="adjacentLocMast" resultMap="BaseResultMapError">
        SELECT
            a.loc_no AS category,
            a.loc_sts AS equipmentNo,
            neighbor.loc_no AS categoryOther,
            neighbor.loc_sts AS equipmentNoOther,
            "深浅库位不一致" AS errorM
        FROM
            asr_loc_mast AS a
                JOIN
            asr_loc_mast AS neighbor ON
                a.bay1 = neighbor.bay1 AND
                a.lev1 = neighbor.lev1 AND
                (
                    (a.row1 = 1 AND neighbor.row1 = 2) OR
                    (a.row1 = 2 AND neighbor.row1 = 1) OR
                    (a.row1 = 3 AND neighbor.row1 = 4) OR
                    (a.row1 = 4 AND neighbor.row1 = 3) OR
                    (a.row1 = 5 AND neighbor.row1 = 6) OR
                    (a.row1 = 6 AND neighbor.row1 = 5) OR
                    (a.row1 = 7 AND neighbor.row1 = 8) OR
                    (a.row1 = 8 AND neighbor.row1 = 7)
                    )
        WHERE
            a.row1 IN (2,3,6,7)
          AND NOT (
            a.loc_sts = neighbor.loc_sts OR
            (a.loc_sts IN ('F', 'D') AND neighbor.loc_sts IN ('F', 'D'))
            )
    </select>
    <select id="queryShallowLocFMast" resultMap="BaseResultMap">
        select * from asr_loc_mast
        where 1=1
src/main/webapp/views/deviceOperate/errorTaskOperate.html
@@ -19,8 +19,7 @@
<body>
    <div id="app" style="display: flex;justify-content: center;flex-wrap: wrap;">
        <div style="width: 100%;">
            <el-table border ref="singleTable" :data="tableData" highlight-current-row
                max-height="350" style="width: 100%">
            <el-table border ref="singleTable" :data="tableData" style="width: 100%">
                <el-table-column property="category" label="类别">
                </el-table-column>
                <el-table-column property="equipmentNo" label="设备号">
@@ -33,13 +32,28 @@
                </el-table-column>
            </el-table>
        </div>
        <div style="width: 100%;">
            <el-table border ref="singleTable" :data="adjacentLocMast" style="width: 100%">
                <el-table-column property="category" label="当前库位">
                </el-table-column>
                <el-table-column property="equipmentNo" label="当前库位状态">
                </el-table-column>
                <el-table-column property="categoryOther" label="相邻库位">
                </el-table-column>
                <el-table-column property="equipmentNoOther" label="相邻库位状态">
                </el-table-column>
                <el-table-column property="errorM" label="异常描述">
                </el-table-column>
            </el-table>
        </div>
    </div>
    <script>
        var app = new Vue({
            el: '#app',
            data: {
                tableData: []
                tableData: [],
                adjacentLocMast: []
            },
            created() {
                this.init()
@@ -49,9 +63,11 @@
            methods: {
                init() {
                    this.getTableData()
                    this.getAdjacentLocMast()
                    setInterval(() => {
                        this.getTableData()
                        this.getAdjacentLocMast()
                        // this.demoStatus()
                    }, 1000)
                },
@@ -74,6 +90,22 @@
                            that.tableData = res.data
                        }
                    });
                },
                getAdjacentLocMast() {
                    let that = this;
                    $.ajax({
                        url: baseUrl + "/error/device/locSts/adjacentLocMast",
                        headers: {
                            'token': localStorage.getItem('token')
                        },
                        data: {},
                        dataType: 'json',
                        contentType: 'application/json;charset=UTF-8',
                        method: 'post',
                        success: function (res) {
                            that.adjacentLocMast = res.data
                        }
                    });
                }
            }
        })