| package com.zy.asrs.task.handler; | 
|   | 
| import com.baomidou.mybatisplus.mapper.EntityWrapper; | 
| import com.core.common.Cools; | 
| import com.zy.asrs.entity.LocMast; | 
| import com.zy.asrs.service.LocMastService; | 
| import com.zy.asrs.service.WorkService; | 
| import com.zy.asrs.task.AbstractHandler; | 
| import com.zy.asrs.task.core.ReturnT; | 
| import lombok.extern.slf4j.Slf4j; | 
| import org.springframework.beans.factory.annotation.Autowired; | 
| import org.springframework.stereotype.Service; | 
| import org.springframework.transaction.annotation.Transactional; | 
| import org.springframework.transaction.interceptor.TransactionAspectSupport; | 
|   | 
| /** | 
|  * Created by vincent on 2020/7/6 | 
|  */ | 
| @Slf4j | 
| @Service | 
| public class LocMoveAllHandler extends AbstractHandler<String> { | 
|   | 
|     @Autowired | 
|     private WorkService workService; | 
|     @Autowired | 
|     private LocMastService locMastService; | 
|     private final Integer BAY = 28;//YINGTAN | 
|   | 
|   | 
|     @Transactional | 
|     public ReturnT<String> start(LocMast locMastStart, LocMast locMastEnd, Integer crnNo) { | 
|         try { | 
|             LocMast locMastEndNew = null; | 
|   | 
|   | 
|             workService.locMove(locMastStart.getLocNo(), locMastEnd.getLocNo(), 77L); | 
|         } catch (Exception e) { | 
|             log.error("fail", e); | 
|             e.printStackTrace(); | 
|             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); | 
|             return FAIL.setMsg(e.getMessage()); | 
|         } | 
|         return SUCCESS; | 
|     } | 
|   | 
| } |