| | |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.OffSaleParam; |
| | | import com.zy.asrs.entity.result.MobileAdjustResult; |
| | | import com.zy.asrs.mapper.ManLocDetlMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.LocDto; |
| | | import com.zy.common.model.TaskDto; |
| | |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private PackService packService; |
| | | @Autowired |
| | | private ManLocDetlMapper manLocDetlMapper; |
| | | |
| | | |
| | | // 商品上架 |
| | | @RequestMapping("/mat/onSale/auth") |
| | | @ManagerAuth |
| | | public R matOnSale(@RequestBody CombParam combParam){ |
| | | mobileService.onSale(combParam); |
| | | return R.ok("上架成功"); |
| | | } |
| | | // 商品下架 |
| | | @RequestMapping("/mat/offSale/auth") |
| | | //@ManagerAuth |
| | | public R matOffSale(@RequestBody OffSaleParam offSaleParam){ |
| | | mobileService.offSale(offSaleParam); |
| | | return R.ok("下架成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | // 组托 ---------------------------------------------------------------------------------------------------- |
| | | |
| | |
| | | return R.ok().add(Cools.add("wrkNo", wrkMast.getWrkNo()).add("ioType", wrkMast.getIoType()).add("list", wrkDetls)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | // 根据库位码和商品码搜索商品 |
| | | @RequestMapping("/mat/find/auth") |
| | | public R find(@RequestParam(required = false) String locNo |
| | | , @RequestParam(required = false) String matnr){ |
| | | //List<ManLocDetl> manLocDetls = manLocDetlMapper.selectItem0(locNo, matnr); |
| | | ManLocDetl manLocDetl = manLocDetlMapper.selectLocNo0(locNo, matnr); |
| | | return R.ok(manLocDetl); |
| | | //return R.ok(manLocDetlMapper.selectItem0(locNo, matnr)); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | @PostMapping("/order/out/pakout/auth") |
| | | // @ManagerAuth(memo = "根据订单出库") |
| | | @ManagerAuth(memo = "订单出库") |
| | | public synchronized R pakoutByOrder(@RequestBody JSONObject param) { |
| | | if(!param.containsKey("staNo") || !param.containsKey("orderNo")){ |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | mobileService.pakoutByOrder(param,getUserId()); |
| | | return R.ok("出库成功"); |
| | | |
| | | // if (Cools.isEmpty(locDtos)) { |
| | | // return R.parse(BaseRes.PARAM); |
| | | // } |
| | | // boolean lack = true; |
| | | // for (LocDto locDto : locDtos) { |
| | | // if (!locDto.isLack()) { |
| | | // lack = false; |
| | | // break; |
| | | // } |
| | | // } |
| | | // if (lack) { |
| | | // return R.error("库存不足"); |
| | | // } |
| | | // |
| | | // Thread.sleep(1000L); |
| | | // |
| | | // List<TaskDto> taskDtos = new ArrayList<>(); |
| | | // // 根据 (库位 & 出库站) 分组; 理想状态:一组为一次出库任务 |
| | | // for (LocDto locDto : locDtos) { |
| | | // if (locDto.isLack()) { continue; } |
| | | // TaskDto taskDto = new TaskDto(locDto.getLocNo(), locDto.getStaNo(), locDto); |
| | | // if (TaskDto.has(taskDtos, taskDto)) { |
| | | // TaskDto dto = TaskDto.find(taskDtos, taskDto); |
| | | // assert dto != null; |
| | | // dto.getLocDtos().addAll(taskDto.getLocDtos()); |
| | | // } else { |
| | | // taskDtos.add(taskDto); |
| | | // } |
| | | // } |
| | | // // ----------------------------------------------------------------------------------------------- |
| | | // for (TaskDto taskDto : taskDtos) { |
| | | // BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); |
| | | // workService.stockOut(staNo, taskDto, getUserId()); |
| | | // } |
| | | // return R.ok(); |
| | | } |
| | | |
| | | } |