自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-10-17 c8630dc9c82a3b44cf33a3db73accec4018c8fbb
src/main/java/com/zy/asrs/controller/OutController.java
@@ -11,10 +11,8 @@
import com.zy.common.model.TaskDto;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.util.*;
import java.util.stream.Collectors;
@@ -88,6 +86,7 @@
    @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);
@@ -149,11 +148,23 @@
            }
        }
        // -----------------------------------------------------------------------------------------------
        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();
    }
    /**
     * 合并订单汇总预览
     */
    @RequestMapping(value = "/order/merge/preview/auth")
    @ManagerAuth
    public R mergePreview(@RequestParam(value = "orderIds[]") List<Long> orderIds){
        return R.ok().add(orderService.mergePreview(orderIds));
    }
}