| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | @Transactional(propagation = Propagation.REQUIRES_NEW) |
| | | public void distribute(String taskNo, Long userId) { |
| | | TaskWrk taskWrk = this.selectByTaskNo(taskNo); |
| | | if (taskWrk == null) { |
| | |
| | | //创建任务 |
| | | if (taskWrk.getIoType() == 1) { |
| | | //1.入库 |
| | | if (taskWrk.getStartPoint() == null || taskWrk.getTargetPoint() == null) { |
| | | throw new CoolException("未接收到起点和终点,不进行派发"); |
| | | } |
| | | startup(taskWrk, userId); |
| | | }else if(taskWrk.getIoType() == 2){ |
| | | //2.出库 |