| | |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private OrderService orderService; |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | @Autowired |
| | | private DocTypeService docTypeService; |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | |
| | | return R.ok("下架成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | // 组托 ---------------------------------------------------------------------------------------------------- |
| | | |
| | | /** |
| | | * 根据单号检索单据数据 |
| | | * http://localhost:8081/jkwms/mobile/order/serach/orderNo/auth?orderNo=123123 |
| | | */ |
| | | // @RequestMapping("/order/search/orderNo/auth") |
| | | // @ManagerAuth |
| | | // public R orderSearchByBarcode(@RequestParam String orderNo){ |
| | | // Order order = orderService.selectByNo(orderNo); |
| | | // if (order == null) { |
| | | // return R.ok(); |
| | | // } |
| | | // DocType docType = docTypeService.selectById(order.getDocType()); |
| | | // if (docType.getPakin() == null || docType.getPakin() != 1) { |
| | | // return R.ok(); |
| | | // } |
| | | // if (order.getSettle() > 2) { |
| | | // return R.ok(); |
| | | // } |
| | | // List<OrderDetl> orderDetls = orderService.selectWorkingDetls(order.getId()); |
| | | // if (Cools.isEmpty(orderDetls)) { |
| | | // return R.ok(); |
| | | // } |
| | | // return R.ok().add(orderDetls); |
| | | // } |
| | | |
| | | |
| | | // @RequestMapping("/order/search/orderNo/auth") |
| | | // @ManagerAuth |
| | | // public R orderSearchByBarcode(@RequestParam String orderNo){ |
| | | // if (Cools.isEmpty(orderNo)){ |
| | | // orderNo=null; |
| | | // } |
| | | //// List<Order> orders = orderService.selectorderNoL(orderNo); |
| | | // List<Order> orders = OrderInAndOutUtil.selectOrderNoL(null, orderNo); |
| | | // if (Cools.isEmpty(orders)){ |
| | | // return R.ok(); |
| | | // } |
| | | // LinkedList<CombParam> combParams = new LinkedList<>(); |
| | | // if (!Cools.isEmpty(orders)){ |
| | | // for (Order order:orders){ |
| | | // CombParam combParam=new CombParam(); |
| | | // if (order == null) { |
| | | // continue; |
| | | // } |
| | | // DocType docType = docTypeService.selectById(order.getDocType()); |
| | | // if (docType.getPakin() == null || docType.getPakin() != 1) { |
| | | // continue; |
| | | // } |
| | | // if (order.getSettle() > 2) { |
| | | // continue; |
| | | // } |
| | | //// List<OrderDetl> orderDetls = orderService.selectWorkingDetls(order.getId()); |
| | | // List<OrderDetl> orderDetls = OrderInAndOutUtil.selectWorkingDetls(order.getPakinPakoutStatus$(), order.getId()); |
| | | // if (!Cools.isEmpty(orderDetls)) { |
| | | // LinkedList<CombParam.CombMat> combMats = new LinkedList<>(); |
| | | // for (OrderDetl orderDetl:orderDetls){ |
| | | // CombParam.CombMat combMat = new CombParam.CombMat(); |
| | | // combMat.setMatnr(orderDetl.getMatnr()); |
| | | // combMat.setBatch(orderDetl.getBatch()); |
| | | // combMat.setAnfme(orderDetl.getAnfme()-orderDetl.getWorkQty()); |
| | | // combMat.setMaktx(orderDetl.getMaktx()); |
| | | // combMat.setSpecs(orderDetl.getSpecs()); |
| | | // combMats.add(combMat); |
| | | // } |
| | | // combParam.setCombMats(combMats); |
| | | // } |
| | | // combParam.setOrderNo(order.getOrderNo()); |
| | | // combParams.add(combParam); |
| | | // } |
| | | // } |
| | | // return R.ok().add(combParams); |
| | | // } |
| | | @RequestMapping("/order/search/orderNo/auth") |
| | | @ManagerAuth |
| | | public R orderSearchByBarcode(@RequestParam String orderNo){ |
| | |
| | | combMat.setMaktx(orderDetl.getMaktx()); |
| | | combMat.setSpecs(orderDetl.getSpecs()); |
| | | combMat.setBrand(orderDetl.getBrand()); |
| | | combMat.setSku(orderDetl.getSku()); |
| | | combMat.setMemo(orderDetl.getMemo()); |
| | | combMat.setBoxType1(orderDetl.getBoxType1()); |
| | | combMat.setBoxType2(orderDetl.getBoxType2()); |
| | | combMat.setBoxType3(orderDetl.getBoxType3()); |
| | |
| | | } |
| | | |
| | | @RequestMapping("/comb/auth") |
| | | // @ManagerAuth(memo = "组托") |
| | | @ManagerAuth(memo = "组托") |
| | | public R comb(@RequestBody CombParam combParam){ |
| | | // mobileService.comb(combParam, getUserId()); |
| | | mobileService.comb(combParam, 9999L); |
| | | mobileService.comb(combParam, getUserId()); |
| | | return R.ok("组托成功"); |
| | | } |
| | | |
| | | @RequestMapping("/kitting/query/auth") |
| | | @ManagerAuth(memo = "齐套入库查询") |
| | | public R kittingQuery(@RequestBody CombParam combParam){ |
| | | try { |
| | | return mobileService.kittingQuery(combParam, getUserId()); |
| | | } catch (Exception e){ |
| | | |
| | | } |
| | | // return R.ok("齐套入库查询成功"); |
| | | return R.error("齐套入库查询失败"); |
| | | } |
| | | |
| | | @RequestMapping("/kitting/call/auth") |
| | | @ManagerAuth(memo = "齐套入库呼叫") |
| | | public R kittingCall(@RequestParam("locNo") String locNo){ |
| | | mobileService.kittingCall(locNo, getUserId()); |
| | | return R.ok("齐套入库呼叫成功"); |
| | | } |
| | | |
| | | @RequestMapping("/kitting/call/all/auth") |
| | | @ManagerAuth(memo = "齐套入库呼叫") |
| | | public R kittingCall(@RequestBody CombParam combParam){ |
| | | List<CombParam.CombMat> combMats = combParam.getCombMats(); |
| | | for (CombParam.CombMat locDetl : combMats) { |
| | | mobileService.kittingCall(locDetl.getMemo(), getUserId()); |
| | | } |
| | | return R.ok("齐套入库呼叫成功"); |
| | | } |
| | | |
| | | @RequestMapping("/pack/get/auth") |
| | | @ManagerAuth |
| | | public R packGet(@RequestParam String barcode){ |
| | |
| | | void comb(CombParam param, Long userId); |
| | | |
| | | /** |
| | | * 齐套入库查询 |
| | | */ |
| | | R kittingQuery(CombParam combParam, Long userId); |
| | | |
| | | /** |
| | | * 齐套入库呼叫 |
| | | */ |
| | | void kittingCall(String locNo, Long userId); |
| | | |
| | | /** |
| | | * 上架 |
| | | */ |
| | | void onSale(CombParam param); |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public R kittingQuery(CombParam combParam, Long userId) { |
| | | List<LocDetl> locDetlList = locDetlService.selectList(new EntityWrapper<LocDetl>()); |
| | | return R.ok().add(locDetlList); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void kittingCall(String locNo, Long userId) { |
| | | |
| | | } |
| | | |
| | | // 商品上架 |
| | | @Override |
| | | public void onSale(CombParam param) { |
| | |
| | | } |
| | | |
| | | // 开始查找库位 ==============================>> |
| | | if (staDescId == 10 && Cools.isEmpty(locMast) && crnNo != 0) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()) |
| | | .orderBy("lev1", false).orderBy("bay1", true)); |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | | } |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | | } |
| | | } else { |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | | } |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | | } else { |
| | | locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "F").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } else { |
| | | locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "D").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | // 1.按规则查找库位 |
| | | if (Cools.isEmpty(locMast) && crnNo != 0) { |
| | |
| | | ,{field: 'sku', align: 'center',title: '工序', hide: false} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '在库标记', hide: false} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | |
| | | ,{field: 'sku', align: 'center',title: '工序', hide: false} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '在库标记', hide: false} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | |
| | | ,{field: 'sku', align: 'center',title: '工序', hide: false} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '在库标记', hide: false} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | |
| | | ,{field: 'source$', align: 'center',title: '制购', hide: true} |
| | | ,{field: 'check$', align: 'center',title: '要求检验', hide: true} |
| | | ,{field: 'danger$', align: 'center',title: '危险品', hide: true} |
| | | ,{field: 'frozen$', align: 'center',title: '冻结否', |
| | | ,{field: 'frozen$', align: 'center',title: '冻结否', hide: true, |
| | | templet: function(d) { |
| | | // 根据条件判断字体颜色 |
| | | if (d.frozen$ === '已冻结') { |
| | |
| | | ,{field: 'sku', align: 'center',title: '工序', hide: false} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '在库标记', hide: false} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | |
| | | ,{field: 'sku', align: 'center',title: '工序', hide: false} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '在库标记', hide: false} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |