Revert "#"
This reverts commit 1e4fc6b112f7350735aa3666d46e4b1a926ffdf9.
# Conflicts:
# src/main/java/com/zy/asrs/task/handler/StandingHandler.java
| | |
| | | locMastService.insertBatch(list); |
| | | return R.ok("初始化成功"); |
| | | } |
| | | @RequestMapping(value = "/locMast/disableALL/auth") |
| | | @ManagerAuth(memo = "禁用指定设备号库位") |
| | | public R disableALL(@RequestParam String param){ |
| | | return updateAll(param,"O"); |
| | | } |
| | | @RequestMapping(value = "/locMast/openAll/auth") |
| | | @ManagerAuth(memo = "打开指定设备号库位") |
| | | public R openAll(@RequestParam String param){ |
| | | return updateAll(param,"X"); |
| | | } |
| | | |
| | | private R updateAll(String param,String locSts){ |
| | | List<LocMast> list = JSONArray.parseArray(param, LocMast.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | } |
| | | int locType2=99; |
| | | for (LocMast locMast : list){ |
| | | if (!locMast.getLocSts().equals(locSts)){ |
| | | if (locSts.equals("O")){ |
| | | return R.error("此设备下有库位非空,库位号:"+locMast.getLocNo()+"\t请查看库位"); |
| | | }else if (locSts.equals("X")){ |
| | | return R.error("此设备下有库位非禁用状态,库位号:"+locMast.getLocNo()+"\t请查看库位"); |
| | | } |
| | | }else if (locType2==99){ |
| | | locType2 = locMast.getLocType2(); |
| | | }else if(locType2 != locMast.getLocType2()){ |
| | | return R.error("请选择同一设备号下的库位"); |
| | | } |
| | | } |
| | | if (locSts.equals("O")){ |
| | | locSts="X"; |
| | | }else if (locSts.equals("X")){ |
| | | locSts="O"; |
| | | } |
| | | for (LocMast locMast : list){ |
| | | if (Cools.isEmpty(locMast) || null==locMast.getLocNo()){ |
| | | return R.error("库位号为空:"+locMast); |
| | | } |
| | | locMast.setModiUser(getUserId()); |
| | | locMast.setModiTime(new Date()); |
| | | locMast.setLocSts(locSts); |
| | | locMastService.updateById(locMast); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | mobileService.startUpTestPACK(testMast); //提交测试系统 |
| | | return R.ok(); |
| | | } |
| | | @PostMapping("/test/transplant/auth") |
| | | @ManagerAuth(memo = "移库确认") |
| | | public synchronized R transplant(@RequestBody Review review) { |
| | | if (Cools.isEmpty(review)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | mobileService.transplant(review); //移库确认 |
| | | return R.ok(); |
| | | } |
| | | @PostMapping("/test/suspend/auth") |
| | | // @ManagerAuth(memo = "暂停测试") |
| | | public synchronized R suspendTestPACK() { |
| | |
| | | case 0: |
| | | return "未知"; |
| | | case 1: |
| | | return "低库位"; |
| | | return "测试库位"; |
| | | case 2: |
| | | return "高库位"; |
| | | return "静置库位"; |
| | | default: |
| | | return String.valueOf(this.locType1); |
| | | } |
| | |
| | | if (null == this.locType2){ return null; } |
| | | switch (this.locType2){ |
| | | case 0: |
| | | return "未知"; |
| | | return "无设备"; |
| | | case 1: |
| | | return "窄库位"; |
| | | return "1号设备"; |
| | | case 2: |
| | | return "宽库位"; |
| | | return "2号设备"; |
| | | case 3: |
| | | return "3号设备"; |
| | | case 4: |
| | | return "4号设备"; |
| | | case 5: |
| | | return "5号设备"; |
| | | case 6: |
| | | return "6号设备"; |
| | | default: |
| | | return String.valueOf(this.locType2); |
| | | } |
| | |
| | | void startUpTestPACK(TestMast testMast); |
| | | //暂停测试 |
| | | void suspendTestPACK(); |
| | | //移库确认 |
| | | void transplant(Review review); |
| | | |
| | | } |
| | |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | @Transactional |
| | | public void transplant(Review review){ |
| | | //移库开始,查询目标库位 |
| | | LocMast targetLocNo = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1",2) |
| | | .eq("loc_sts","O") |
| | | .eq("fire_status", 0) |
| | | .eq("pack_status",0)); |
| | | if (targetLocNo != null){ |
| | | workService.locMove(review.getLocNo(),targetLocNo.getLocNo(),(long)Integer.parseInt(review.getUserId())); |
| | | }else { |
| | | throw new CoolException("没有空库位"); |
| | | } |
| | | } |
| | | /*...........................赣州新增..............以上.............赣州新增...........................*/ |
| | | } |
| | |
| | | } else { |
| | | throw new CoolException("状态异常"); |
| | | } |
| | | |
| | | //移库开始,查询目标库位 |
| | | LocMast targetLocNo = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1",2) |
| | | .eq("loc_sts","O") |
| | | .eq("fire_status", 0) |
| | | .eq("pack_status",0)); |
| | | if (targetLocNo != null){ |
| | | workService.locMove(review.getLocNo(),targetLocNo.getLocNo(),(long)Integer.parseInt(review.getUserId())); |
| | | }else { |
| | | throw new CoolException("没有空库位"); |
| | | } |
| | | return success; |
| | | } |
| | | |
| | |
| | | ,{field: 'locSts$', align: 'center',title: '库位状态',width:200} |
| | | ,{field: 'fireStatus$', align: 'center',title: '消防状态', hide:false} |
| | | ,{field: 'packStatus$', align: 'center',title: '产品状态', hide:false} |
| | | ,{field: 'locType1$', align: 'center',title: '库位类型'} |
| | | ,{field: 'locType2$', align: 'center',title: '测试设备号'} |
| | | // ,{field: 'whsType$', align: 'center',title: '库位类型'} |
| | | // ,{field: 'pltType', align: 'center',title: ''} |
| | | // ,{field: 'ctnType', align: 'center',title: ''} |
| | | // ,{field: 'locSts', align: 'center',title: ''} |
| | | // ,{field: 'sheetNo', align: 'center',title: ''} |
| | | ,{field: 'crnNo', align: 'center',title: '堆垛机号'} |
| | | // ,{field: 'crnNo', align: 'center',title: '堆垛机号'} |
| | | ,{field: 'row1', align: 'center',title: '排', sort:true} |
| | | ,{field: 'bay1', align: 'center',title: '列', sort:true} |
| | | ,{field: 'lev1', align: 'center',title: '层', sort:true} |
| | |
| | | }) |
| | | }); |
| | | break; |
| | | case 'disableALL': |
| | | var data = checkStatus.data; |
| | | if (data.length !=8 ){ |
| | | layer.msg('请选择此设备所有数据再进行禁用操作'); |
| | | } else { |
| | | layer.confirm('确定禁用'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/locMast/disableALL/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: JSON.stringify(data)}, |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | break; |
| | | case 'openAll': |
| | | var data = checkStatus.data; |
| | | if (data.length !=8 ){ |
| | | layer.msg('请选择此设备所有数据再进行启用操作'); |
| | | } else { |
| | | layer.confirm('确定启用'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/locMast/openAll/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: JSON.stringify(data)}, |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | break; |
| | | } |
| | | }); |
| | | |
| | |
| | | position: relative; |
| | | overflow: visible !important; |
| | | } |
| | | |
| | | </style> |
| | | </head> |
| | | <body> |
| | |
| | | <input class="layui-input" type="text" name="lev1" placeholder="层" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="loc_type2" id="loc_type2" class="layui-input" type="text" placeholder="设备号" autocomplete="off"> |
| | | <!-- <option style="display: none"></option>--> |
| | | <option value="">设备号</option> |
| | | <option value="0">静置库位</option> |
| | | <option value="1">1号设备</option> |
| | | <option value="2">2号设备</option> |
| | | <option value="3">3号设备</option> |
| | | <option value="4">4号设备</option> |
| | | <option value="5">5号设备</option> |
| | | <option value="6">6号设备</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary" id="btn-init" lay-event="init">初始化</button> |
| | | <button class="layui-btn layui-btn-primary" id="disable-ALL" lay-event="disableALL">所选全部禁用</button> |
| | | <button class="layui-btn layui-btn-primary" id="open-All" lay-event="openAll">所选全部打开</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |
| | | </script> |
| | |
| | | </div> |
| | | <!-- 库位类型 --> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">高低类型</label> |
| | | <label class="layui-form-label">库位类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="locType1"> |
| | | <option style="display: none"></option> |
| | | <option value="0">未知</option> |
| | | <option value="1">低库位</option> |
| | | <option value="2">高库位</option> |
| | | <option value="1">测试库位</option> |
| | | <option value="2">静置库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">宽窄类型</label> |
| | | <label class="layui-form-label">设备号</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="locType2"> |
| | | <option style="display: none"></option> |
| | | <option value="0">未知</option> |
| | | <option value="1">窄库位</option> |
| | | <option value="2">宽库位</option> |
| | | <option value="1">1号设备</option> |
| | | <option value="2">2号设备</option> |
| | | <option value="3">3号设备</option> |
| | | <option value="4">4号设备</option> |
| | | <option value="5">5号设备</option> |
| | | <option value="6">6号设备</option> |
| | | </select> |
| | | </div> |
| | | </div> |