自动化立体仓库 - WMS系统
Junjie
2023-06-05 4a0cfe4d2800769f1cbf34418397160a0aaac0b8
库位规则
7个文件已修改
39 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/LocRuleController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | 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 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocMastMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/locRule/locRule.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/locRule/locRule.html 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/LocRuleController.java
@@ -10,6 +10,7 @@
import com.core.common.DateUtils;
import com.core.common.R;
import com.zy.asrs.entity.LocRule;
import com.zy.asrs.service.LocMastService;
import com.zy.asrs.service.LocRuleService;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
@@ -22,6 +23,8 @@
    @Autowired
    private LocRuleService locRuleService;
    @Autowired
    private LocMastService locMastService;
    @RequestMapping(value = "/locRule/{id}/auth")
    @ManagerAuth
@@ -76,11 +79,14 @@
        locRule.setCreateTime(now);
        locRule.setUpdateBy(getUserId());
        locRule.setUpdateTime(now);
        Integer locType2 = 1;//单品区域
        if (locRule.getMixed() == 1) {
            //混载
            locRule.setMatnr("00000000");
            locType2 = 2;//混放区域
        }
        locRuleService.insert(locRule);
        locMastService.updateLocType2ByRBL(locType2, locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd());
        return R.ok();
    }
@@ -102,11 +108,14 @@
        locRule.setUpdateBy(getUserId());
        locRule.setUpdateTime(new Date());
        locRuleService.updateById(locRule);
        Integer locType2 = 1;//单品区域
        if (locRule.getMixed() == 0) {
            locRuleService.updateKeepGoByMatnr(locRule.getMatnr(), locRule.getKeepGo());
        }else {//混载
            locRuleService.updateKeepGoByMixed(locRule.getKeepGo());
            locType2 = 2;//混放区域
        }
        locMastService.updateLocType2ByRBL(locType2, locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd());
        return R.ok();
    }
@@ -114,7 +123,9 @@
    @ManagerAuth
    public R delete(@RequestParam(value="ids[]") Long[] ids){
         for (Long id : ids){
            locRuleService.deleteById(id);
             LocRule locRule = locRuleService.selectById(id);
             locMastService.updateLocType2ByRBL(1, locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd());
             locRuleService.deleteById(id);
        }
        return R.ok();
    }
src/main/java/com/zy/asrs/mapper/LocMastMapper.java
@@ -37,4 +37,6 @@
    List<LocMast> selectEmptyByLocNos(@Param("locNos") List<String> locNos);
    Integer updateLocType2ByRBL(Integer locType2, Integer startRow, Integer endRow, Integer startBay, Integer endBay, Integer startLev, Integer endLev);
}
src/main/java/com/zy/asrs/service/LocMastService.java
@@ -65,4 +65,6 @@
    List<LocMast> selectEmptyByLocNos(List<String> locNos);
    Integer updateLocType2ByRBL(Integer locType2, Integer startRow, Integer endRow, Integer startBay, Integer endBay, Integer startLev, Integer endLev);
}
src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java
@@ -189,4 +189,9 @@
    public List<LocMast> selectEmptyByLocNos(List<String> locNos) {
        return this.baseMapper.selectEmptyByLocNos(locNos);
    }
    @Override
    public Integer updateLocType2ByRBL(Integer locType2, Integer startRow, Integer endRow, Integer startBay, Integer endBay, Integer startLev, Integer endLev) {
        return this.baseMapper.updateLocType2ByRBL(locType2, startRow, endRow, startBay, endBay, startLev, endLev);
    }
}
src/main/resources/mapper/LocMastMapper.xml
@@ -197,4 +197,11 @@
        ORDER BY
        row1 ASC
    </select>
    <select id="updateLocType2ByRBL" resultMap="BaseResultMap">
        update asr_loc_mast set loc_type2 = #{locType2}
        where (row1 &gt;= #{startRow} and row1 &lt;= #{endRow})
        and (bay1 &gt;= #{startBay} and bay1 &lt;= #{endBay})
        and (lev1 &gt;= #{startLev} and lev1 &lt;= #{endLev})
    </select>
</mapper>
src/main/webapp/static/js/locRule/locRule.js
@@ -43,7 +43,7 @@
            ,{field: 'updateTime$', align: 'center',title: '修改时间', hide: true}
            ,{field: 'memo', align: 'center',title: '备注', hide: true}
            ,{field: 'mixed$', align: 'center',title: '混载'}
            ,{field: 'keepGo$', align: 'center',title: '继续搜索'}
            // ,{field: 'keepGo$', align: 'center',title: '继续搜索'}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120}
        ]],
src/main/webapp/views/locRule/locRule.html
@@ -118,12 +118,12 @@
                    <label class="layui-form-label">混载: </label>
                    <div class="layui-input-block">
                        <select name="mixed">
                            <option value="1">是</option>
                            <option value="0" selected>否</option>
                            <option value="1" selected>是</option>
                            <option value="0">否</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
<!--                <div class="layui-form-item">
                    <label class="layui-form-label">混载未找到库位继续搜索: </label>
                    <div class="layui-input-block">
                        <select name="keepGo">
@@ -131,7 +131,7 @@
                            <option value="0" selected>否</option>
                        </select>
                    </div>
                </div>
                </div>-->
             </div>