Browse Source

多个任务关联同一个流程模板时,camel quartz问题修改

huangzhiyong 8 years ago
parent
commit
2fc4021f6a

+ 15 - 3
hos-rest/src/main/java/com/yihu/hos/rest/services/crawler/CrawlerManager.java

@ -164,9 +164,21 @@ public class CrawlerManager {
//            }
            //getRemoteVersion
            if (!dispatch.getRemoteVersion(patient.getOrgCode())) {
                logger.error("远程版本获取失败");
                return false;
//            if (!dispatch.getRemoteVersion(patient.getOrgCode())) {
//                logger.error("远程版本获取失败");
//                return false;
//            }
            if (StringUtil.isEmpty(sysConfig.getVersionMap().get(patient.getOrgCode()))) {
                Map.Entry<String, AdapterDataSet> next = adapterDataSetMap.entrySet().iterator().next();
                Integer schemeId = next.getValue().getAdapterDataSetT().getSchemeId();
                AdapterSchemeModel schemeModel = adapterSchemeService.getEntity(AdapterSchemeModel.class, schemeId);
                if (schemeModel.getStdVersion() != null) {
                    SysConfig.getInstance().getVersionMap().put(patient.getOrgCode(), schemeModel.getStdVersion());
                } else {
                    logger.error("版本获取失败");
                    return false;
                }
            }
            if(StringUtil.isEmpty(sysConfig.getVersionMap().get(patient.getOrgCode()))){

+ 2 - 2
src/main/java/com/yihu/hos/system/service/FlowManager.java

@ -25,7 +25,6 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.File;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.*;
@ -75,6 +74,7 @@ public class FlowManager {
            String text = new String(content, StandardCharsets.UTF_8);
            if (text.contains("?cron=")) {
                text = text.replace("?cron=",routeId+"?cron=");//job名重新命名
                String oldStr = text.substring(text.indexOf("?cron=") + 6);
                String cron = oldStr.substring(0, oldStr.indexOf("\""));
                text = text.replace(cron, newCron);
@ -751,7 +751,7 @@ public class FlowManager {
    /**
     * 解析文件 包名和类名
     *
     * @param fileInput java文件流
     * @param file java文件流
     * @return
     */
    public Map<String, String> uploadAndParse(File file) {