提交 8325d5f8 编写于 作者: tangyaolong's avatar tangyaolong

Merge remote-tracking branch 'origin/master'

...@@ -6,6 +6,7 @@ import cn.ibizlab.core.rule.domain.ExecLog; ...@@ -6,6 +6,7 @@ import cn.ibizlab.core.rule.domain.ExecLog;
import cn.ibizlab.core.rule.domain.ExecResult; import cn.ibizlab.core.rule.domain.ExecResult;
import cn.ibizlab.core.rule.service.IExecLogService; import cn.ibizlab.core.rule.service.IExecLogService;
import cn.ibizlab.core.rule.service.IExecResultService; import cn.ibizlab.core.rule.service.IExecResultService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DataObject; import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.helper.RuleUtils; import cn.ibizlab.util.helper.RuleUtils;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
...@@ -29,7 +30,6 @@ import org.springframework.stereotype.Service; ...@@ -29,7 +30,6 @@ import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
...@@ -129,21 +129,24 @@ public class BaseEntityServiceImpl implements BaseEntityService ...@@ -129,21 +129,24 @@ public class BaseEntityServiceImpl implements BaseEntityService
result.setDimField(DataObject.getStringValue(obj,null)); result.setDimField(DataObject.getStringValue(obj,null));
if(StringUtils.isEmpty(result.getDimField())) if(StringUtils.isEmpty(result.getDimField()))
continue; continue;
result.setId(result.getDefaultKey(true).toString());
if(result.getRetValue()==1) ExecResult result2=new ExecResult();
CachedBeanCopier.copy(result, result2);
result2.setId(result.getDefaultKey(true).toString());
if(result2.getRetValue()==1)
{ {
result.setRuleId(RULECODE); result2.setRuleId(RULECODE);
result.setDomainsField(DataObject.getStringValue(valueOf(DOMAINSFIELD),result.getDimField())); result2.setDomainsField(DataObject.getStringValue(valueOf(DOMAINSFIELD),result.getDimField()));
ruExecResultService.saveAsync(result); ruExecResultService.saveAsync(result2);
} }
else else
{ {
ruExecResultService.deleteAsync(result); ruExecResultService.deleteAsync(result2);
} }
} }
} }
private Object valueOf(Object val) protected Object valueOf(Object val)
{ {
Object rt=null; Object rt=null;
if(val!=null && val instanceof List) if(val!=null && val instanceof List)
...@@ -162,7 +165,7 @@ public class BaseEntityServiceImpl implements BaseEntityService ...@@ -162,7 +165,7 @@ public class BaseEntityServiceImpl implements BaseEntityService
return rt; return rt;
} }
private String valuesOf(Object val) protected String valuesOf(Object val)
{ {
String rt=null; String rt=null;
if(val!=null && val instanceof List) if(val!=null && val instanceof List)
......
...@@ -226,7 +226,7 @@ public class ExecResultExService extends ExecResultServiceImpl { ...@@ -226,7 +226,7 @@ public class ExecResultExService extends ExecResultServiceImpl {
dstDataSourceService.initDataSource(dsName); dstDataSourceService.initDataSource(dsName);
DynamicDataSourceContextHolder.push(dsName); DynamicDataSourceContextHolder.push(dsName);
} }
//result = execResultExMapper.clearBatch(execResults, tableName); result = execResultExMapper.clearBatch(execResults, tableName);
} catch (Exception ex) { } catch (Exception ex) {
log.error("存储规则结果发生异常,详细错误信息:" + ex.getMessage()); log.error("存储规则结果发生异常,详细错误信息:" + ex.getMessage());
} finally { } finally {
......
package cn.ibizlab.core.lite.extensions.service; package cn.ibizlab.core.lite.extensions.service;
import cn.ibizlab.core.extensions.domain.AssembleModel;
import cn.ibizlab.core.lite.domain.DstApp; import cn.ibizlab.core.lite.domain.DstApp;
import cn.ibizlab.core.lite.domain.DstSystem; import cn.ibizlab.core.lite.domain.DstSystem;
import cn.ibizlab.core.lite.domain.MetaEntity; import cn.ibizlab.core.lite.domain.MetaEntity;
...@@ -312,14 +311,5 @@ public class LiteModelService { ...@@ -312,14 +311,5 @@ public class LiteModelService {
out.close(); out.close();
} }
public String exportFile(List<MetaModel> model){
List<AssembleModel> temp = new ArrayList<>();
for (MetaModel ignored : model) {
temp.add(null);
}
String json = JSON.toJSONString(temp);
String fileName = this.saveFile(json);
return fileName;
}
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册