|  | @@ -120,6 +120,31 @@ public class D00008Service extends D00008BaseModel implements ExecProcessFlow {
 | 
	
		
			
				|  |  |  		return job;
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 任务成功
 | 
	
		
			
				|  |  | +	 * @param jid
 | 
	
		
			
				|  |  | +	 * @return
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	private void JobSucces(Integer jid) {
 | 
	
		
			
				|  |  | +		DJobMapper dJobDao= (DJobMapper) UtilTools.getBean("dJobMapper");
 | 
	
		
			
				|  |  | +		DJob job =dJobDao.selectByPrimaryKey(jid);
 | 
	
		
			
				|  |  | +		job.setEndtime(XIDateTimeUtils.getNowStr());
 | 
	
		
			
				|  |  | +		job.setState("1");//完成
 | 
	
		
			
				|  |  | +		dJobDao.updateByPrimaryKey(job);
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 任务失败
 | 
	
		
			
				|  |  | +	 * @param jid
 | 
	
		
			
				|  |  | +	 * @return
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	private void JobError(Integer jid) {
 | 
	
		
			
				|  |  | +		DJobMapper dJobDao= (DJobMapper) UtilTools.getBean("dJobMapper");
 | 
	
		
			
				|  |  | +		DJob job =dJobDao.selectByPrimaryKey(jid);
 | 
	
		
			
				|  |  | +		job.setEndtime(XIDateTimeUtils.getNowStr());
 | 
	
		
			
				|  |  | +		job.setState("-1");//任务失败
 | 
	
		
			
				|  |  | +		dJobDao.updateByPrimaryKey(job);
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  	private DJob getNewJob(Integer aid, DJobMapper dJobDao) {
 | 
	
		
			
				|  |  |  		DJobSQLBuilder jsb = new DJobSQLBuilder();
 | 
	
		
			
				|  |  |  		DJobSQLBuilder.Criteria jsc =jsb.createCriteria();
 | 
	
	
		
			
				|  | @@ -175,8 +200,11 @@ public class D00008Service extends D00008BaseModel implements ExecProcessFlow {
 | 
	
		
			
				|  |  |  					System.out.println(line);
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  				LogService.addLog(aid,jid,"Water","求解——————————————————成功");
 | 
	
		
			
				|  |  | +				JobSucces(jid);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  			} catch (IOException e) {
 | 
	
		
			
				|  |  |  				LogService.addLog(aid,jid,"Water","求解——————————————————失败");
 | 
	
		
			
				|  |  | +				JobError(jid);
 | 
	
		
			
				|  |  |  				e.printStackTrace();
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  			return null;
 | 
	
	
		
			
				|  | @@ -204,9 +232,11 @@ public class D00008Service extends D00008BaseModel implements ExecProcessFlow {
 | 
	
		
			
				|  |  |  				System.out.println(line);
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  			LogService.addLog(aid,jid,"Fire","求解——————————————————成功");
 | 
	
		
			
				|  |  | +				JobSucces(jid);
 | 
	
		
			
				|  |  |  			} catch (IOException e) {
 | 
	
		
			
				|  |  |  				LogService.addLog(aid,jid,"Fire","求解——————————————————失败");
 | 
	
		
			
				|  |  |  				e.printStackTrace();
 | 
	
		
			
				|  |  | +				JobError(jid);
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  			return null;
 | 
	
		
			
				|  |  |  		});
 |