* request
* @return IResult
*/
public IResult jobModify(IRequest request) {
AjaxFormResult result = new AjaxFormResult();
BatchJob job = batchSrv.findJobById(request.get("jobId"));
boolean isnew = false;
if (job == null) {
isnew = true;
job = new BatchJob();
}
String oldResource = job.getJobResource();
CapBeanUtil.map2Bean(request, job, BatchJob.class);
checkFileExist(job);
if (oldResource == null || !oldResource.equals(job.getJobResource())) {
jobRegistryLoad(job); // 重新註冊
}
job.setUpdater(CapSecurityContext.getUserId());
job.setUpdateTime(CapDate.getCurrentTimestamp());
if (isnew) {
batchSrv.insertJob(job);
} else {
batchSrv.updateJob(job);
}