自动化立体仓库 - WCS系统
#
zjj
2023-12-11 c8b2322c5c43b6e627ff724405281bc53c6c98f5
src/main/java/com/zy/asrs/service/impl/TaskWrkServiceImpl.java
@@ -24,6 +24,7 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
@@ -59,7 +60,7 @@
    }
    @Override
    @Transactional
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public void distribute(String taskNo, Long userId) {
        TaskWrk taskWrk = this.selectByTaskNo(taskNo);
        if (taskWrk == null) {
@@ -73,6 +74,9 @@
        //创建任务
        if (taskWrk.getIoType() == 1) {
            //1.入库
            if (taskWrk.getStartPoint() == null || taskWrk.getTargetPoint() == null) {
                throw new CoolException("未接收到起点和终点,不进行派发");
            }
            startup(taskWrk, userId);
        }else if(taskWrk.getIoType() == 2){
            //2.出库