|  |  | 
 |  |  |  | 
 |  |  | import com.zy.asrs.entity.WrkMast; | 
 |  |  | import com.zy.asrs.service.WrkMastService; | 
 |  |  | import com.zy.asrs.task.core.ReturnT; | 
 |  |  | import com.zy.asrs.task.handler.WorkMastHandler; | 
 |  |  | import org.slf4j.Logger; | 
 |  |  | import org.slf4j.LoggerFactory; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.scheduling.annotation.Scheduled; | 
 |  |  | import org.springframework.stereotype.Component; | 
 |  |  |  | 
 |  |  | import java.util.Date; | 
 |  |  | import java.util.List; | 
 |  |  | 
 |  |  | /** | 
 |  |  |  * Created by vincent on 2020/7/7 | 
 |  |  |  */ | 
 |  |  | //@Component | 
 |  |  | @Component | 
 |  |  | public class WorkMastScheduler { | 
 |  |  |  | 
 |  |  |     private static final Logger log = LoggerFactory.getLogger(WorkMastScheduler.class); | 
 |  |  | 
 |  |  |             ReturnT<String> returnT = workMastHandler.start(wrkMast); | 
 |  |  |             if (!returnT.isSuccess()) { | 
 |  |  |                 wrkMast.setUpdMk("X"); | 
 |  |  |                 if (returnT.getMsg().length() > 255) { | 
 |  |  |                     returnT.setMsg(returnT.getMsg().substring(0, 150)); | 
 |  |  |                 } | 
 |  |  |                 wrkMast.setErrorMemo(returnT.getMsg()); | 
 |  |  |                 wrkMast.setErrorTime(new Date()); | 
 |  |  |                 if (!wrkMastService.updateById(wrkMast)) { |