|  |  | 
 |  |  |         if (Cools.isEmpty(orderNo)){ | 
 |  |  |             orderNo=null; | 
 |  |  |         } | 
 |  |  |         List<Order> orders = orderService.selectorderNoL(orderNo); | 
 |  |  |         List<Order> orders = orderService.selectorderNoLT(orderNo); | 
 |  |  |         if (Cools.isEmpty(orders)){ | 
 |  |  |             return R.ok(); | 
 |  |  |         } | 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping("/wrkDetl/search/batch/auth") | 
 |  |  | //    @ManagerAuth(memo = "出库确认获取信息") | 
 |  |  |     @ManagerAuth(memo = "出库确认获取信息") | 
 |  |  |     public R wrkDetlSearchByBatch(@RequestBody OrderGiftParam param){ | 
 |  |  |         try{ | 
 |  |  |             String length = param.getLength(); | 
 |  |  |             String lengthS = length.split(" ")[0]; | 
 |  |  |             Double price = Double.valueOf(lengthS); | 
 |  |  |             String grossWeight = param.getGrossWeight(); | 
 |  |  |             String grossWeightS = grossWeight.split(" ")[0]; | 
 |  |  |             Double volume = Double.valueOf(grossWeightS); | 
 |  |  |             String netWeight = param.getNetWeight(); | 
 |  |  |             String netWeightS = netWeight.split(" ")[0]; | 
 |  |  |             Double weight = Double.valueOf(netWeightS); | 
 |  |  |             String splices = param.getSplices(); | 
 |  |  |             String splicesS = splices.split(" ")[0]; | 
 |  |  |             List<OrderDetlGift> orderDetlGifts = orderDetlGiftService.selectList(new EntityWrapper<OrderDetlGift>() | 
 |  |  |                     .eq("matnr", param.getSpecs()) | 
 |  |  |                     .eq("batch", param.getBoxNo()) | 
 |  |  |                     .eq("model", param.getRollNo()) | 
 |  |  |                     .eq("price", param.getLength()) | 
 |  |  |                     .eq("weight", param.getNetWeight()) | 
 |  |  |                     .eq("volume", param.getGrossWeight()) | 
 |  |  |                     .eq("specs", param.getSplices())); | 
 |  |  |                     .eq("price", price) | 
 |  |  |                     .eq("weight", weight) | 
 |  |  |                     .eq("volume", volume) | 
 |  |  |                     .eq("specs", splicesS)); | 
 |  |  |             if (orderDetlGifts.isEmpty()){ | 
 |  |  |                 return R.error("查询信息异常,未匹配到明细").add(JSONObject.toJSONString(param)); | 
 |  |  |                 return R.error("查询信息异常,未匹配到明细").add("未匹配到明细"); | 
 |  |  |             } | 
 |  |  |             if (orderDetlGifts.size()>1){ | 
 |  |  |                 return R.error("查询信息异常,存在多条明细").add(JSONObject.toJSONString(orderDetlGifts)); | 
 |  |  |                 return R.error("查询信息异常,存在多条明细").add("存在多条明细"); | 
 |  |  |             } | 
 |  |  |             OrderDetlGift orderDetlGift = orderDetlGifts.get(0); | 
 |  |  | //            orderDetlGift.setSource(1); | 
 |  |  | //            orderDetlGift.setDeadTime(orderDetlGift.getSource$()); | 
 |  |  | //            orderDetlGiftService.updateById(orderDetlGift); | 
 |  |  |             return R.ok("确认成功").add(orderDetlGift); | 
 |  |  |         } catch (Exception e){ | 
 |  |  |             return R.error("查询信息异常,未匹配到明细").add(JSONObject.toJSONString(param)); | 
 |  |  |             return R.error("查询信息异常,未匹配到明细").add("未匹配到明细"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping("/order/search/batch/auth") | 
 |  |  |     @ManagerAuth(memo = "出库确认") | 
 |  |  |     public R orderSearchByBatch(@RequestBody String batch){ | 
 |  |  |     public R orderSearchByBatch(@RequestBody OrderGiftParam param){ | 
 |  |  |         try{ | 
 |  |  |             if (Cools.isEmpty(batch)){ | 
 |  |  |                 return R.error("参数为空"); | 
 |  |  |             String length = param.getLength(); | 
 |  |  |             String lengthS = length.split(" ")[0]; | 
 |  |  |             Double price = Double.valueOf(lengthS); | 
 |  |  |             String grossWeight = param.getGrossWeight(); | 
 |  |  |             String grossWeightS = grossWeight.split(" ")[0]; | 
 |  |  |             Double volume = Double.valueOf(grossWeightS); | 
 |  |  |             String netWeight = param.getNetWeight(); | 
 |  |  |             String netWeightS = netWeight.split(" ")[0]; | 
 |  |  |             Double weight = Double.valueOf(netWeightS); | 
 |  |  |             String splices = param.getSplices(); | 
 |  |  |             String splicesS = splices.split(" ")[0]; | 
 |  |  |             List<OrderDetlGift> orderDetlGifts = orderDetlGiftService.selectList(new EntityWrapper<OrderDetlGift>() | 
 |  |  |                     .eq("matnr", param.getSpecs()) | 
 |  |  |                     .eq("batch", param.getBoxNo()) | 
 |  |  |                     .eq("model", param.getRollNo()) | 
 |  |  |                     .eq("price", price) | 
 |  |  |                     .eq("weight", weight) | 
 |  |  |                     .eq("volume", volume) | 
 |  |  |                     .eq("specs", splicesS)); | 
 |  |  |             if (orderDetlGifts.isEmpty()){ | 
 |  |  |                 return R.error("查询信息异常,未匹配到明细").add("未匹配到明细"); | 
 |  |  |             } | 
 |  |  | //            String[] batch1 = batch.split("箱号:"); | 
 |  |  | //            String[] batch2 = batch1[1].split("规格:"); | 
 |  |  | //            batch = batch2[0]; | 
 |  |  |             String orderNo = ""; | 
 |  |  | //            WrkDetl wrkDetl = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>().eq("batch", batch).and().ne("order_no","").and().isNotNull("order_no").orderBy("io_time",false)); | 
 |  |  |             WrkDetl wrkDetl = wrkDetlService.selectWrkDetlByOrderNoNotNull(batch); | 
 |  |  |             if (Cools.isEmpty(wrkDetl)) { | 
 |  |  | //                WrkDetlLog wrkDetlLog = wrkDetlLogService.selectOne(new EntityWrapper<WrkDetlLog>().eq("batch", batch).and().ne("order_no","").and().isNotNull("order_no").orderBy("io_time",false)); | 
 |  |  |                 WrkDetlLog wrkDetlLog = wrkDetlLogService.selectWrkDetlLogByOrderNoNotNull(batch); | 
 |  |  |                 if (Cools.isEmpty(wrkDetlLog)) { | 
 |  |  |                     return R.error("未查到数据:工作明细为空"); | 
 |  |  |                 } | 
 |  |  |                 if (wrkDetlLog.getDeadTime().equals("已确认")) { | 
 |  |  |                     return R.error("当前任务已确认,请重置!"); | 
 |  |  |                 } | 
 |  |  |                 wrkDetlLog.setSource(1); | 
 |  |  |                 wrkDetlLogService.update(wrkDetlLog,new EntityWrapper<WrkDetlLog>().eq("batch",wrkDetlLog.getBatch()).eq("wrk_no",wrkDetlLog.getWrkNo())); | 
 |  |  |                 orderNo=wrkDetlLog.getOrderNo(); | 
 |  |  |             }else { | 
 |  |  |                 if (wrkDetl.getDeadTime().equals("已确认")) { | 
 |  |  |                     return R.error("当前任务已确认,请重置!"); | 
 |  |  |                 } | 
 |  |  |                 wrkDetl.setSource(1); | 
 |  |  |                 wrkDetlService.update(wrkDetl,new EntityWrapper<WrkDetl>().eq("batch",wrkDetl.getBatch()).eq("wrk_no",wrkDetl.getWrkNo())); | 
 |  |  |                 orderNo=wrkDetl.getOrderNo(); | 
 |  |  |             if (orderDetlGifts.size()>1){ | 
 |  |  |                 return R.error("查询信息异常,存在多条明细").add("存在多条明细"); | 
 |  |  |             } | 
 |  |  | //        List<Order> orders = orderService.selectorderNoL(batch); | 
 |  |  |             OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("batch", batch).eq("order_no",orderNo)); | 
 |  |  |             if (Cools.isEmpty(orderDetl)){ | 
 |  |  |                 return R.error("未查到数据:订单明细为空"+orderNo); | 
 |  |  |             } | 
 |  |  |             if (!orderDetl.getQty$().equals("已完成")){ | 
 |  |  |                 return R.error("任务未完成"); | 
 |  |  |             } | 
 |  |  |             if (!Cools.isEmpty(orderDetl.getSource()) && orderDetl.getSource()==1){ | 
 |  |  |                 return R.error("任务已确认,请勿重复确认!!!"); | 
 |  |  |             } | 
 |  |  |             orderDetl.setSource(1); | 
 |  |  |             orderDetlService.updateById(orderDetl); | 
 |  |  |             return R.ok(); | 
 |  |  |             OrderDetlGift orderDetlGift = orderDetlGifts.get(0); | 
 |  |  |             orderDetlGift.setSource(1); | 
 |  |  |             orderDetlGiftService.updateById(orderDetlGift); | 
 |  |  |             orderDetlGift.setDeadTime(orderDetlGift.getSource$()); | 
 |  |  |             return R.ok("确认成功").add(orderDetlGift); | 
 |  |  |         } catch (Exception e){ | 
 |  |  |             return R.error().add(e.getMessage()); | 
 |  |  |             return R.error("查询信息异常,未匹配到明细").add("未匹配到明细"); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping("/order/search/batch/new/auth") | 
 |  |  |     @ManagerAuth(memo = "出库确认") | 
 |  |  |     public R orderSearchByBatchNew(@RequestBody OrderGiftParam param){ | 
 |  |  |         try{ | 
 |  |  | //            String length = param.getLength(); | 
 |  |  | //            String lengthS = length.split(" ")[0]; | 
 |  |  | //            Double price = Double.valueOf(lengthS); | 
 |  |  | //            String grossWeight = param.getGrossWeight(); | 
 |  |  | //            String grossWeightS = grossWeight.split(" ")[0]; | 
 |  |  | //            Double volume = Double.valueOf(grossWeightS); | 
 |  |  |             String netWeight = param.getNetWeight(); | 
 |  |  |             String netWeightS = netWeight.split(" ")[0]; | 
 |  |  |             Double weight = Double.valueOf(netWeightS); | 
 |  |  | //            String splices = param.getSplices(); | 
 |  |  | //            String splicesS = splices.split(" ")[0]; | 
 |  |  |             List<OrderDetlGift> orderDetlGifts = orderDetlGiftService.selectList(new EntityWrapper<OrderDetlGift>() | 
 |  |  |                     .eq("order_no", param.getOrderNo()) | 
 |  |  | //                    .eq("matnr", param.getSpecs()) | 
 |  |  |                     .eq("batch", param.getBoxNo()) | 
 |  |  | //                    .eq("model", param.getRollNo()) | 
 |  |  | //                    .eq("price", price) | 
 |  |  |                     .eq("weight", weight)); | 
 |  |  | //                    .eq("volume", volume) | 
 |  |  | //                    .eq("specs", splicesS)); | 
 |  |  |             if (orderDetlGifts.isEmpty()){ | 
 |  |  |                 return R.error("查询信息异常,未匹配到明细").add("未匹配到明细"); | 
 |  |  |             } | 
 |  |  |             if (orderDetlGifts.size()>1){ | 
 |  |  |                 return R.error("查询信息异常,存在多条明细").add("存在多条明细"); | 
 |  |  |             } | 
 |  |  |             OrderDetlGift orderDetlGift = orderDetlGifts.get(0); | 
 |  |  |             orderDetlGift.setSource(1); | 
 |  |  |             orderDetlGiftService.updateById(orderDetlGift); | 
 |  |  |             orderDetlGift.setDeadTime(orderDetlGift.getSource$()); | 
 |  |  |             return R.ok("确认成功").add(orderDetlGift); | 
 |  |  |         } catch (Exception e){ | 
 |  |  |             return R.error("查询信息异常,未匹配到明细").add("未匹配到明细"); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | //    @RequestMapping("/wrkDetl/search/batch/auth") | 
 |  |  | //    @ManagerAuth(memo = "出库确认获取信息") | 
 |  |  | //    public R wrkDetlSearchByBatch(@RequestBody String batch){ | 
 |  |  | //        if (Cools.isEmpty(batch)){ | 
 |  |  | //            return R.error("参数为空"); | 
 |  |  | //        } | 
 |  |  | //        String[] batch1 = batch.split("箱号:"); | 
 |  |  | //        String[] batch2 = batch1[1].split("规格:"); | 
 |  |  | //        batch = batch2[0].replaceAll(" ", ""); | 
 |  |  | ////        List<Order> orders = orderService.selectorderNoL(batch); | 
 |  |  | //        WrkDetl wrkDetl = wrkDetlService.selectWrkDetlByOrderNoNotNull(batch); | 
 |  |  | ////        WrkDetl wrkDetl = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>().eq("batch", batch).and().ne("order_no","").and().isNotNull("order_no").orderBy("io_time",false)); | 
 |  |  | //        if (Cools.isEmpty(wrkDetl)){ | 
 |  |  | //            WrkDetlLog wrkDetlLog = wrkDetlLogService.selectWrkDetlLogByOrderNoNotNull(batch); | 
 |  |  | ////            WrkDetlLog wrkDetlLog = wrkDetlLogService.selectOne(new EntityWrapper<WrkDetlLog>().eq("batch", batch).and().ne("order_no","").and().isNotNull("order_no").orderBy("io_time",false)); | 
 |  |  | //            if (Cools.isEmpty(wrkDetlLog)){ | 
 |  |  | //                return R.error("未查到数据"); | 
 |  |  | //            } | 
 |  |  | //            wrkDetl = new WrkDetl(); | 
 |  |  | //            wrkDetl.sync(wrkDetlLog); | 
 |  |  | //            wrkDetl.setBatch(wrkDetlLog.getBatch()); | 
 |  |  | //            wrkDetl.setBarcode(wrkDetlLog.getBarcode()); | 
 |  |  | //            wrkDetl.setDeadTime(wrkDetlLog.getDeadTime()); | 
 |  |  | //        } | 
 |  |  | //        if (Cools.isEmpty(wrkDetl)){ | 
 |  |  | //            return R.error("未查到数据"); | 
 |  |  | //        } | 
 |  |  | //        return R.ok().add(wrkDetl); | 
 |  |  | //    } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | //    @RequestMapping("/order/search/batch/auth") | 
 |  |  | //    @ManagerAuth(memo = "出库确认") | 
 |  |  | //    public R orderSearchByBatch(@RequestBody String batch){ | 
 |  |  | //        try{ | 
 |  |  | //            if (Cools.isEmpty(batch)){ | 
 |  |  | //                return R.error("参数为空"); | 
 |  |  | //            } | 
 |  |  | ////            String[] batch1 = batch.split("箱号:"); | 
 |  |  | ////            String[] batch2 = batch1[1].split("规格:"); | 
 |  |  | ////            batch = batch2[0]; | 
 |  |  | //            String orderNo = ""; | 
 |  |  | ////            WrkDetl wrkDetl = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>().eq("batch", batch).and().ne("order_no","").and().isNotNull("order_no").orderBy("io_time",false)); | 
 |  |  | //            WrkDetl wrkDetl = wrkDetlService.selectWrkDetlByOrderNoNotNull(batch); | 
 |  |  | //            if (Cools.isEmpty(wrkDetl)) { | 
 |  |  | ////                WrkDetlLog wrkDetlLog = wrkDetlLogService.selectOne(new EntityWrapper<WrkDetlLog>().eq("batch", batch).and().ne("order_no","").and().isNotNull("order_no").orderBy("io_time",false)); | 
 |  |  | //                WrkDetlLog wrkDetlLog = wrkDetlLogService.selectWrkDetlLogByOrderNoNotNull(batch); | 
 |  |  | //                if (Cools.isEmpty(wrkDetlLog)) { | 
 |  |  | //                    return R.error("未查到数据:工作明细为空"); | 
 |  |  | //                } | 
 |  |  | //                if (wrkDetlLog.getDeadTime().equals("已确认")) { | 
 |  |  | //                    return R.error("当前任务已确认,请重置!"); | 
 |  |  | //                } | 
 |  |  | //                wrkDetlLog.setSource(1); | 
 |  |  | //                wrkDetlLogService.update(wrkDetlLog,new EntityWrapper<WrkDetlLog>().eq("batch",wrkDetlLog.getBatch()).eq("wrk_no",wrkDetlLog.getWrkNo())); | 
 |  |  | //                orderNo=wrkDetlLog.getOrderNo(); | 
 |  |  | //            }else { | 
 |  |  | //                if (wrkDetl.getDeadTime().equals("已确认")) { | 
 |  |  | //                    return R.error("当前任务已确认,请重置!"); | 
 |  |  | //                } | 
 |  |  | //                wrkDetl.setSource(1); | 
 |  |  | //                wrkDetlService.update(wrkDetl,new EntityWrapper<WrkDetl>().eq("batch",wrkDetl.getBatch()).eq("wrk_no",wrkDetl.getWrkNo())); | 
 |  |  | //                orderNo=wrkDetl.getOrderNo(); | 
 |  |  | //            } | 
 |  |  | ////        List<Order> orders = orderService.selectorderNoL(batch); | 
 |  |  | //            OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("batch", batch).eq("order_no",orderNo)); | 
 |  |  | //            if (Cools.isEmpty(orderDetl)){ | 
 |  |  | //                return R.error("未查到数据:订单明细为空"+orderNo); | 
 |  |  | //            } | 
 |  |  | //            if (!orderDetl.getQty$().equals("已完成")){ | 
 |  |  | //                return R.error("任务未完成"); | 
 |  |  | //            } | 
 |  |  | //            if (!Cools.isEmpty(orderDetl.getSource()) && orderDetl.getSource()==1){ | 
 |  |  | //                return R.error("任务已确认,请勿重复确认!!!"); | 
 |  |  | //            } | 
 |  |  | //            orderDetl.setSource(1); | 
 |  |  | //            orderDetlService.updateById(orderDetl); | 
 |  |  | //            return R.ok(); | 
 |  |  | //        } catch (Exception e){ | 
 |  |  | //            return R.error().add(e.getMessage()); | 
 |  |  | //        } | 
 |  |  | //    } | 
 |  |  |  | 
 |  |  | //    @RequestMapping("/truss/auth") | 
 |  |  | //    @ManagerAuth(memo = "退库,1楼桁架退库") | 
 |  |  | 
 |  |  |     @PostMapping("/balcony/complete/car/auth/v1") | 
 |  |  | //    @AppAuth(memo = "中控:2楼212叫托盘") | 
 |  |  |     public synchronized R balconyCompleteCar() { | 
 |  |  |         mobileService.trussComb2Car(212); | 
 |  |  |         return R.ok(); | 
 |  |  | //        mobileService.trussComb2Car(212); | 
 |  |  |         return R.error("已禁用").add("已禁用"); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** |