| | |
| | | @ManagerAuth(memo = "初始化库位") |
| | | // @Transactional |
| | | public R init(LocMastInitParam param) { |
| | | try{ |
| | | List<LocMast> list = new ArrayList<>(); |
| | | BasWhs basWhs = basWhsService.selectByIdentifying(param.getIdentifying()); |
| | | if (Cools.isEmpty(basWhs)){ |
| | |
| | | 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){ |
| | | |
| | |
| | | break; |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | throw new Exception("解析堆垛机号失败,请填写正确的数据!!!"); |
| | | } |
| | | }else { |
| | | crnNo = param.getStaCrn(); |
| | | } |
| | | Date now = new Date(); |
| | | LocMast locMast = new LocMast(); |
| | | locMast.setLocNo(locNo); |
| | |
| | | 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()); |
| | |
| | | } |
| | | locMastService.insertBatch(list); |
| | | return R.ok("初始化成功"); |
| | | }catch (Exception e){ |
| | | return R.error("初始化失败===>"+e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | ,{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 ";} |
| | |
| | | ,{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 ";} |
| | |
| | | </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"> |
| | | <!-- <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> |
| | | </div> |
| | | <!-- 排 --> |