标签:des style blog color io for ar 2014
<!-- 定时检查捡货路径不完整的, 是否有补货进来, 如果补货了,则重新跑捡货路径 --> <bean id="xsaCheckUnCompletePathIsSupplied" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail"> <ref bean="xsaCheckUnCompletePathIsSuppliedJobDetail"/> </property> <property name="cronExpression"> <value>${checkUnCompletePathIsSuppliedCron}</value> </property> </bean> <bean id="xsaCheckUnCompletePathIsSuppliedJobDetail" class="springframework.scheduling.quartz.BeanInvokingJobDetailFactoryBean"> <property name="targetBean" value="runPickupPathService" /> <property name="targetMethod" value="checkUnCompletePathIsSupplied" /> </bean> <!-- 对于所有没有跑的捡货路径,进行跑捡货路径工作 --> <bean id="xsaRunUnRunPickupPath" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail"> <ref bean="xsaRunUnRunPickupPathJobDetail"/> </property> <property name="cronExpression"> <value>${runUnRunPathCron}</value> </property> </bean> <bean id="xsaRunUnRunPickupPathJobDetail" class="springframework.scheduling.quartz.BeanInvokingJobDetailFactoryBean"> <property name="targetBean" value="autoRunPickupPathService" /> <property name="targetMethod" value="runAllUnRunPickupPath" /> </bean>
@Service public class AutoRunPickupPathService { private final static Logger logger = LoggerFactory.getLogger(RunPickupPathService.class); @Resource private RunPickupPathService runPickupPathService; @Resource private XsaPickupPathMapper xsaPickupPathMapper; /** * 对于所有没有跑捡货路径的单据,跑捡货路径, 此方法设置为定时 * @throws Exception */ public void runAllUnRunPickupPath() { synchronized (RunPickupPathService.class) { List<XsaPickupPath> pathList = xsaPickupPathMapper.getAllUnRunPickUpPath(); if(null != pathList && pathList.size() > 0) { for(XsaPickupPath p : pathList) { try { runPickupPathService.runPickupPath(p.getServiceno(), true); } catch (Exception e) { logger.error("Auto Run Pickup Path Error, Transfer NO: " + p.getServiceno() + ", " + e.getMessage()); } } } } } }
定时任务服务器不定时重启原因解析,布布扣,bubuko.com
标签:des style blog color io for ar 2014
原文地址:http://www.cnblogs.com/seanvon/p/3919863.html