|  |  |  | 
|---|
|  |  |  | import com.zy.common.model.TaskDto; | 
|---|
|  |  |  | import com.zy.common.web.BaseController; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.PostMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestBody; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestParam; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("/out/pakout/auth") | 
|---|
|  |  |  | @ManagerAuth(memo = "订单出库") | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public synchronized R pakout(@RequestBody List<LocDto> locDtos) throws InterruptedException { | 
|---|
|  |  |  | if (Cools.isEmpty(locDtos)) { | 
|---|
|  |  |  | return R.parse(BaseRes.PARAM); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // ----------------------------------------------------------------------------------------------- | 
|---|
|  |  |  | List<String> excludeLocNos = taskDtos.stream().map(TaskDto::getLocNo).distinct().collect(Collectors.toList()); | 
|---|
|  |  |  | for (TaskDto taskDto : taskDtos) { | 
|---|
|  |  |  | BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); | 
|---|
|  |  |  | workService.stockOut(staNo, taskDto, getUserId()); | 
|---|
|  |  |  | locMastService.breakUp(taskDto.getLocNo(), excludeLocNos); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | } | 
|---|