自动化立体仓库 - WMS系统
#
18516761980
2022-06-15 e84281f41a5c9b9e60b1d01684b642e7eaca7a36
#
8个文件已修改
221 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/LocDetlController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/LocDetlMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/BasCrnpServiceImpl.java 104 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/basDevp/basDevp.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/locDetl/locDetl.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/basDevp/basDevp_detail.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -90,15 +90,7 @@
                  @RequestParam(required = false)String orderByField,
                  @RequestParam(required = false)String orderByType,
                  @RequestParam(required = false)String condition,
                  @RequestParam Map<String, Object> param,
                  @RequestParam(required = false)Boolean unreason){
        if (unreason) {
            return R.ok(locDetlService.selectPage(new Page<>(curr, limit), new EntityWrapper<LocDetl>()
                    .where(" DATALENGTH( batch ) != 11 or\n" +
                            "            batch LIKE '%[a-z]%'")));
        }
        param.remove("unreason");
                  @RequestParam Map<String, Object> param){
//        String row = "";
        EntityWrapper<LocDetl> wrapper = new EntityWrapper<>();
//        if (param.get("row") != null) {
@@ -119,7 +111,6 @@
//            wrapper.and()
//                    .where("loc_no like '" +row +"%'");
//        }
        return R.ok(locDetlService.selectPage(new Page<>(curr, limit), wrapper));
    }
src/main/java/com/zy/asrs/mapper/LocDetlMapper.java
@@ -30,7 +30,7 @@
    @Update("update asr_loc_detl set loc_no = #{newLocNo}, modi_time=getDate() where loc_no = #{oldLocNo}")
    int updateLocNo(String newLocNo, String oldLocNo);
    @Select("SELECT ld.loc_no FROM asr_loc_detl ld LEFT JOIN asr_loc_mast lm ON ld.loc_no = lm.loc_no WHERE (1 = 1 AND ld.matnr = #{matnr} AND (lm.row1 >= #{start} AND lm.row1 <= #{end})  AND lm.loc_sts = 'F' AND DateDiff(dd, lm.modi_time, getdate()) = 0) ORDER BY lm.modi_time ASC")
    @Select("SELECT ld.loc_no FROM asr_loc_detl ld LEFT JOIN asr_loc_mast lm ON ld.loc_no = lm.loc_no WHERE (1 = 1 AND ld.matnr = #{matnr} AND (lm.row1 >= #{start} AND lm.row1 <= #{end})  AND lm.loc_sts = 'F' AND DateDiff(dd, lm.appe_time, getdate()) = 0) ORDER BY lm.appe_time ASC")
    List<String> selectSameDetlToday(@Param("matnr") String matnr, @Param("start") Integer start, @Param("end") Integer end);
    List<LocDetl> getStockStatis(Map<String, Object> map);
src/main/java/com/zy/asrs/service/impl/BasCrnpServiceImpl.java
@@ -56,58 +56,58 @@
        }
        if (pakin) {
            //TODO控制入库暂存数,防止主干道堵塞,2022-5-24 ADD
            int staNo = 0;
            switch (crnNo){
                case 1:
                    staNo = 123;
                    break;
                case 2:
                    staNo = 121;
                    break;
                case 3:
                    staNo = 119;
                    break;
                case 4:
                    staNo = 117;
                    break;
                case 5:
                    staNo = 115;
                    break;
                case 6:
                    staNo = 113;
                    break;
                case 7:
                    staNo = 111;
                    break;
                case 8:
                    staNo = 109;
                    break;
                case 9:
                    staNo = 106;
                    break;
                case 10:
                    staNo = 105;
                    break;
                case 11:
                    staNo = 103;
                    break;
                case 12:
                    staNo = 101;
                    break;
            }
            int maxCount = 2;
            BasDevp devp = basDevpService.selectById(staNo);
            if(!Cools.isEmpty(devp)){
                maxCount = devp.getInQty();
            }
            int storeCount = wrkMastService.getStoreCount(crnNo);
            if(storeCount >= maxCount){
                log.error("{}号堆垛机暂存数已满!", crnNo);
                return false;
            }
//            //TODO控制入库暂存数,防止主干道堵塞,2022-5-24 ADD
//            int staNo = 0;
//            switch (crnNo){
//                case 1:
//                    staNo = 123;
//                    break;
//                case 2:
//                    staNo = 121;
//                    break;
//                case 3:
//                    staNo = 119;
//                    break;
//                case 4:
//                    staNo = 117;
//                    break;
//                case 5:
//                    staNo = 115;
//                    break;
//                case 6:
//                    staNo = 113;
//                    break;
//                case 7:
//                    staNo = 111;
//                    break;
//                case 8:
//                    staNo = 109;
//                    break;
//                case 9:
//                    staNo = 106;
//                    break;
//                case 10:
//                    staNo = 105;
//                    break;
//                case 11:
//                    staNo = 103;
//                    break;
//                case 12:
//                    staNo = 101;
//                    break;
//            }
//            int maxCount = 2;
//            BasDevp devp = basDevpService.selectById(staNo);
//            if(!Cools.isEmpty(devp)){
//                maxCount = devp.getInQty();
//            }
//
//            int storeCount = wrkMastService.getStoreCount(crnNo);
//
//            if(storeCount >= maxCount){
//                log.error("{}号堆垛机暂存数已满!", crnNo);
//                return false;
//            }
            if ("N".equals(crnp.getInEnable())) {
                log.error("{}号堆垛机不可入", crnNo);
src/main/java/com/zy/common/service/CommonService.java
@@ -97,10 +97,19 @@
     */
    @Transactional
    public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto, int times) {
        whsType = getWhsType(sourceStaNo, times);
//        whsType = getWhsType(sourceStaNo, times);
        StartupDto startupDto = new StartupDto();
        // 生成工作号
        int workNo = getWorkNo(0);
        if (sourceStaNo < 200){
            whsType = 1;
        } else if (sourceStaNo > 199 && sourceStaNo < 300){
            whsType = 2;
        } else if (sourceStaNo > 299 && sourceStaNo < 400){
            whsType = 3;
        } else if (sourceStaNo > 399){
            whsType = 4;
        }
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        if (Cools.isEmpty(rowLastno)) {
            throw new CoolException("数据异常,请联系管理员");
@@ -164,36 +173,22 @@
        // 如果没有相近物料,则按规则轮询货架
        if (null == locMast) {
            Shelves shelves = new Shelves(rowCount, crn_qty);
            if (whsType != 4) {
                int divides = (int) Arith.divides(1, curRow - 1, 16);
                curRow = (int) Arith.remainder(curRow, 16);
                if (curRow == 0) {
                    curRow = 16;
            int divides = (int) Arith.divides(1, curRow - 1, 4);
            curRow = (int) Arith.remainder(curRow, 4);
            if (curRow == 0) {
                curRow = 4;
            }
            for (int i = 0; i < shelves.group; i ++) {
                curRow = shelves.start(curRow);
                if (curRow < 0) {
                    throw new CoolException("检索库位失败,请联系管理员");
                }
                for (int i = 0; i < shelves.group; i ++) {
                    curRow = shelves.start(curRow);
                    if (curRow < 0) {
                        throw new CoolException("检索库位失败,请联系管理员");
                    }
                    Integer crnNo1 = shelves.get(curRow);
                    crnNo1 = crnNo1 + divides*4;
                    if (basCrnpService.checkSiteError(crnNo1, true)) {
                        crnNo = crnNo1;
                        curRow = curRow + divides*16;
                        break;
                    }
                }
            } else {
                for (int i = 0; i < shelves.group; i ++) {
                    curRow = shelves.start(curRow);
                    if (curRow < 0) {
                        throw new CoolException("检索库位失败,请联系管理员");
                    }
                    Integer crnNo1 = shelves.get(curRow);
                    if (basCrnpService.checkSiteError(crnNo1, true)) {
                        crnNo = crnNo1;
                        break;
                    }
                Integer crnNo1 = shelves.get(curRow);
                crnNo1 = crnNo1 + divides*1;
                if (basCrnpService.checkSiteError(crnNo1, true)) {
                    crnNo = crnNo1;
                    curRow = curRow + divides*4;
                    break;
                }
            }
        }
@@ -215,6 +210,7 @@
        if (!staNo.getAutoing().equals("Y")) {
            throw new CoolException("目标站"+staDesc.getCrnStn()+"不可用");
        }
        // 更新库位排号
        rowLastno.setCurrentRow(curRow);
        rowLastnoService.updateById(rowLastno);
@@ -273,6 +269,8 @@
        }
        String locNo = locMast.getLocNo();
        // 生成工作号
        int workNo = getWorkNo(0);
        // 返回dto
        startupDto.setWorkNo(workNo);
        startupDto.setCrnNo(crnNo);
src/main/webapp/static/js/basDevp/basDevp.js
@@ -450,7 +450,7 @@
            maxWt: $('#maxWt').val(),
            grossWt: $('#grossWt').val(),
            cartPos: $('#cartPos').val(),
            locType1:$('#locType1').val()
        };
        $.ajax({
            url: baseUrl+"/basDevp/"+name+"/auth",
src/main/webapp/static/js/common.js
@@ -225,7 +225,7 @@
    {field: 'matnr', align: 'center',title: '商品编号', sort:true}
    ,{field: 'maktx', align: 'center',title: '商品名称', sort:true}
    ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false}
    ,{field: 'batch', align: 'center',title: '序列码', width: 300, sort:true}
    ,{field: 'batch', align: 'center',title: '批号', width: 300, sort:true}
    ,{field: 'anfme', align: 'center',title: '数量'}
    ,{field: 'zpallet', align: 'center',title: '托盘条码'}
src/main/webapp/static/js/locDetl/locDetl.js
@@ -5,10 +5,9 @@
        {field: 'matnr', align: 'center',title: '商品编号', sort:true}
        ,{field: 'maktx', align: 'center',title: '商品名称', sort:true}
        ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false}
        ,{field: 'batch', align: 'center',title: '序列码', width: 300, sort:true}
        ,{field: 'batch', align: 'center',title: '批号', width: 300, sort:true}
        ,{field: 'anfme', align: 'center',title: '数量'}
        ,{field: 'zpallet', align: 'center',title: '托盘条码'}
        ,{field: 'specs', align: 'center',title: '配置'}
        ,{field: 'model', align: 'center',title: '代码', hide: true}
        ,{field: 'color', align: 'center',title: '颜色', hide: true}
@@ -58,11 +57,8 @@
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/locDetl/list/auth',
        page: true,
        limit: 20,
        where:{
          unreason: false
        },
        limits: [20, 30, 50, 100, 200, 500],
        limit: 16,
        limits: [16, 30, 50, 100, 200, 500],
        even: true,
        toolbar: '#toolbar',
        cellMinWidth: 50,
@@ -458,29 +454,6 @@
        tableReload(false);
    });
    //查看异常数据
    form.on('submit(unreason)', function (data) {
        pageCurr = 1;
        tableIns.reload({
            where: {
                unreason: true
            },
            page: {
                curr: pageCurr
            },
            done: function (res, curr, count) {
                if (res.code === 403) {
                    top.location.href = baseUrl+"/";
                }
                pageCurr=curr;
                limit(child);
            }
        });
    });
    // 时间选择器
    layDate.render({
        elem: '#modiTime\\$',
@@ -501,7 +474,6 @@
function tableReload(child) {
    var searchData = {
        unreason: false
    };
    $.each($('#search-box [name]').serializeArray(), function() {
        searchData[this.name] = this.value;
src/main/webapp/views/basDevp/basDevp_detail.html
@@ -121,9 +121,9 @@
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">容器类型:</label>
            <label class="layui-form-label">高低类型:</label>
            <div class="layui-input-inline">
                <input id="ctnType" class="layui-input" type="text">
                <input id="locType1" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">