src/main/java/com/zy/asrs/controller/LocMastController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/webapp/static/js/locMast/locMast.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/webapp/static/js/stoMan/stoQue.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/webapp/views/locMast/locMast.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/controller/LocMastController.java
@@ -180,55 +180,68 @@ @ManagerAuth(memo = "初始化库位") // @Transactional public R init(LocMastInitParam param) { List<LocMast> list = new ArrayList<>(); BasWhs basWhs = basWhsService.selectByIdentifying(param.getIdentifying()); if (Cools.isEmpty(basWhs)){ return R.error("库型不存在!!!"); } for (int r=param.getStartRow(); r<=param.getEndRow(); r++){ for (int b=param.getStartBay(); b<=param.getEndBay(); b++) { for (int l=param.getStartLev(); l<=param.getEndLev(); l++) { // 获取库位号 String locNo = String.format("%02d", r) + String.format("%03d", b) + String.format("%02d", l); // 获取堆垛机号 int crnNo = 0; Shelves shelves = new Shelves(param.getEndRow() - param.getStartRow() + 1, param.getCrnAmount(),param.getStartRow()); for (List<Integer> node : shelves.nodes){ try{ List<LocMast> list = new ArrayList<>(); BasWhs basWhs = basWhsService.selectByIdentifying(param.getIdentifying()); if (Cools.isEmpty(basWhs)){ return R.error("库型不存在!!!"); } for (int r=param.getStartRow(); r<=param.getEndRow(); r++){ for (int b=param.getStartBay(); b<=param.getEndBay(); b++) { for (int l=param.getStartLev(); l<=param.getEndLev(); l++) { // 获取库位号 String locNo = String.format("%02d", r) + String.format("%03d", b) + String.format("%02d", l); // 获取堆垛机号 int crnNo = 0; if (basWhs.getIdentifying().equals("1") || basWhs.getIdentifying().equals("3")){ try{ Shelves shelves = new Shelves(param.getEndRow() - param.getStartRow() + 1, param.getCrnAmount(),param.getStartRow()); for (List<Integer> node : shelves.nodes){ if (node.contains(r)) { if (!Cools.isEmpty(param.getStaCrn()) && param.getStaCrn() > 0){ crnNo = shelves.nodes.indexOf(node) + param.getStaCrn(); }else { crnNo = shelves.nodes.indexOf(node) + 1; if (node.contains(r)) { if (!Cools.isEmpty(param.getStaCrn()) && param.getStaCrn() > 0){ crnNo = shelves.nodes.indexOf(node) + param.getStaCrn(); }else { crnNo = shelves.nodes.indexOf(node) + 1; } break; } } }catch (Exception e){ throw new Exception("解析堆垛机号失败,请填写正确的数据!!!"); } break; }else { crnNo = param.getStaCrn(); } Date now = new Date(); LocMast locMast = new LocMast(); locMast.setLocNo(locNo); locMast.setLocSts("O"); locMast.setRow1(r); // 排 locMast.setBay1(b); // 列 locMast.setLev1(l); // 层 locMast.setGro1(0); // 组 locMast.setCrnNo(crnNo); // 堆垛机 locMast.setLocType1(!Cools.isEmpty(param.getLocType1()) ? param.getLocType1() : 1); locMast.setLocType2(param.getLocType2()); locMast.setLocType3(param.getLocType3()); locMast.setAppeUser(getUserId()); locMast.setAppeTime(now); locMast.setModiUser(getUserId()); locMast.setModiTime(now); locMast.setWhsType(basWhs.getId()); list.add(locMast); } Date now = new Date(); LocMast locMast = new LocMast(); locMast.setLocNo(locNo); locMast.setLocSts("O"); locMast.setRow1(r); // 排 locMast.setBay1(b); // 列 locMast.setLev1(l); // 层 locMast.setCrnNo(crnNo); // 堆垛机 locMast.setLocType1(!Cools.isEmpty(param.getLocType1()) ? param.getLocType1() : 1); locMast.setLocType2(param.getLocType2()); locMast.setLocType3(param.getLocType3()); locMast.setAppeUser(getUserId()); locMast.setAppeTime(now); locMast.setModiUser(getUserId()); locMast.setModiTime(now); locMast.setWhsType(basWhs.getId()); list.add(locMast); } } if (!Cools.isEmpty(param.getEnable()) && param.getEnable() == 1){ locMastService.delete(new EntityWrapper<>()); } locMastService.insertBatch(list); return R.ok("初始化成功"); }catch (Exception e){ return R.error("初始化失败===>"+e.getMessage()); } if (!Cools.isEmpty(param.getEnable()) && param.getEnable() == 1){ locMastService.delete(new EntityWrapper<>()); } locMastService.insertBatch(list); return R.ok("初始化成功"); } } src/main/webapp/static/js/locMast/locMast.js
@@ -32,6 +32,7 @@ ,{field: 'row1', align: 'center',title: '排', sort:true, hide:false} ,{field: 'bay1', align: 'center',title: '列', sort:true, hide:false} ,{field: 'lev1', align: 'center',title: '层', sort:true, hide:false} ,{field: 'gro1', align: 'center',title: '组', sort:true, hide:false} ,{field: 'fullPlt', align: 'center',title: '满板', templet:function(row){ var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' disabled table-index='"+row.LAY_TABLE_INDEX+"'"; if(row.fullPlt === 'Y'){html += " checked ";} src/main/webapp/static/js/stoMan/stoQue.js
@@ -33,6 +33,7 @@ ,{field: 'row1', align: 'center',title: '排', sort:true, hide:true} ,{field: 'bay1', align: 'center',title: '列', sort:true, hide:true} ,{field: 'lev1', align: 'center',title: '层', sort:true, hide:true} ,{field: 'gro1', align: 'center',title: '组', sort:true, hide:true} ,{field: 'fullPlt', align: 'center',title: '满板', templet:function(row){ var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; if(row.fullPlt === 'Y'){html += " checked ";} src/main/webapp/views/locMast/locMast.html
@@ -125,16 +125,35 @@ </div> </div> </div> <div class="layui-inline" style="width:80%"> <label class="layui-form-label"><span class="not-null">*</span>库位类型:</label> <div class="layui-input-inline cool-auto-complete"> <input id="identifying" class="layui-input" type="text" style="display: none"> <input id="identifying$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" onfocus=this.blur() disabled="disabled"> <div class="cool-auto-complete-window"> <input class="cool-auto-complete-window-input" data-key="basWhsQueryBywhsType" onkeyup="autoLoad(this.getAttribute('data-key'))"> <select class="cool-auto-complete-window-select" data-key="basWhsQueryBywhsTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> </select> </div> <!-- <div class="layui-inline" style="width:80%">--> <!-- <label class="layui-form-label"><span class="not-null">*</span>库位类型:</label>--> <!-- <div class="layui-input-inline cool-auto-complete">--> <!-- <input id="identifying" class="layui-input" type="text" style="display: none">--> <!-- <input id="identifying$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" onfocus=this.blur()>--> <!-- <div class="cool-auto-complete-window">--> <!-- <input class="cool-auto-complete-window-input" data-key="basWhsQueryBywhsType" onkeyup="autoLoad(this.getAttribute('data-key'))">--> <!-- <select class="cool-auto-complete-window-select" data-key="basWhsQueryBywhsTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">--> <!-- </select>--> <!-- </div>--> <!-- </div>--> <!-- </div>--> <!-- /** * 库型 1: 标准堆垛机库 2: 平库 3: 穿梭板 4: 四向车 5: AGV 0: 未知 */ --> <div class="layui-form-item"> <label class="layui-form-label">库位类型:</label> <div class="layui-input-inline"> <select name="identifying"> <!-- <option style="display: none"></option>--> <!-- <option value="0">未知</option>--> <option value="1" style="display: none">标准堆垛机库</option> <option value="2">平库</option> <option value="3">穿梭板</option> <option value="4">四向车</option> <option value="5">AGV</option> </select> </div> </div> <!-- 排 -->