提交 b3b08247 编写于 作者: sq3536's avatar sq3536

reset逻辑修复

上级 e9a0b07f
...@@ -65,7 +65,7 @@ public class BaseData implements IEntityDTO { ...@@ -65,7 +65,7 @@ public class BaseData implements IEntityDTO {
public void setEnableAny(Boolean enableAny) public void setEnableAny(Boolean enableAny)
{ {
this.actionInputDTO=enableAny.booleanValue(); this.enableAny=enableAny.booleanValue();
} }
@Override @Override
...@@ -419,15 +419,13 @@ public class BaseData implements IEntityDTO { ...@@ -419,15 +419,13 @@ public class BaseData implements IEntityDTO {
@JSONField(serialize = false) @JSONField(serialize = false)
public void resetAll() { public void resetAll() {
getMap().keySet().forEach(key->{ getMap().keySet().forEach(key->{
if(!key.equals("map")) if(!_SYSTEMPROP.contains(key))
map.put(key,null); map.put(key,null);
}); });
this.paramMap.clear(); this.paramMap.clear();
this.focusNull.clear(); this.focusNull.clear();
} }
public void copyTo(IEntity iEntity) { public void copyTo(IEntity iEntity) {
copyTo(iEntity, false); copyTo(iEntity, false);
} }
...@@ -770,8 +768,10 @@ public class BaseData implements IEntityDTO { ...@@ -770,8 +768,10 @@ public class BaseData implements IEntityDTO {
public Map<String, Object> toMap() public Map<String, Object> toMap()
{ {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.putAll((JSONObject)JSON.toJSON(this)); map.putAll(JSON.parseObject(JSON.toJSONString(this)));
focusNull.forEach(item->map.put(item,null)); focusNull.forEach(item->{
map.put(item,null);
});
return map; return map;
} }
...@@ -891,6 +891,7 @@ public class BaseData implements IEntityDTO { ...@@ -891,6 +891,7 @@ public class BaseData implements IEntityDTO {
return TypeUtils.castToJavaBean(objValue,clazz); return TypeUtils.castToJavaBean(objValue,clazz);
} }
private static Set<String> _SYSTEMPROP=new BaseData().getMap().keySet();
} }
package net.ibizsys.central.plugin.boot.core.service;
import net.ibizsys.central.dataentity.IDataEntityRuntime;
import net.ibizsys.central.dataentity.IDataEntityRuntimeContext;
import net.ibizsys.central.plugin.boot.core.domain.BaseData;
import net.ibizsys.central.plugin.boot.core.filter.BaseFilter;
import net.ibizsys.central.plugin.boot.core.helper.StringAdvUtils;
import net.ibizsys.central.plugin.boot.core.runtime.IBootService;
import net.ibizsys.central.plugin.boot.core.runtime.IBootSystemRuntime;
import net.ibizsys.model.dataentity.action.IPSDEAction;
import net.ibizsys.model.dataentity.ds.IPSDEDataSet;
import org.springframework.data.domain.Page;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
public interface IServiceApiService<T extends BaseData, F extends BaseFilter> extends IBaseService<T,F>{
default Object onRealAction(String strActionName,Object arg) throws Throwable{
return this.getDataEntityRuntimeContext().executeActionReal(strActionName, null, new Object[]{arg}, null);
}
default Object onRealFetch(String dsName,F arg) throws Throwable{
return this.getDataEntityRuntimeContext().fetchDataSetReal("DEFAULT", arg.getDataSet(), new Object[]{arg}, null);
}
default <K extends Serializable> T onGet(K key) throws Throwable {
return (T)onRealAction("Get",key);
}
default T onGetDraft(T dto) throws Throwable {
return (T)onRealAction("GetDraft",dto);
}
default Integer onCheckKey(T dto) throws Throwable {
return (Integer) onRealAction("CheckKey",dto);
}
default Page<T> onFetchDefault(F dto) throws Throwable {
return (Page) onRealFetch("DEFAULT",dto);
}
default List<T> selectDefault(F dto) throws Throwable {
return (List)this.getRuntimeService().getDataEntityRuntime().selectDataQuery("DEFAULT", dto);
}
default List<T> selectSimple(F dto) throws Throwable {
return (List)this.getRuntimeService().getDataEntityRuntime().selectDataQuery("SIMPLE", dto);
}
default List<T> selectView(F dto) throws Throwable {
return (List)this.getRuntimeService().getDataEntityRuntime().selectDataQuery("VIEW", dto);
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册