|
@ -46,7 +46,6 @@ public class StdService implements IStdService {
|
|
|
private AdapterSchemeVersionService adapterSchemeVersion;
|
|
|
|
|
|
|
|
|
|
|
|
/**************************** 适配方案 **************************************************/
|
|
|
/**
|
|
|
* 获取适配方案列表
|
|
@ -66,8 +65,8 @@ public class StdService implements IStdService {
|
|
|
/**
|
|
|
* 通过适配方案+应用数据集ID获取数据集列表
|
|
|
*/
|
|
|
public List<AdapterDatasetModel> getDatasetByScheme(String schemeVersion,String adapterDatasetId) {
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
public List<AdapterDatasetModel> getDatasetByScheme(String schemeVersion, String adapterDatasetId) {
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
map.put("adapterDatasetId", adapterDatasetId);
|
|
|
AdapterVersion version = new AdapterVersion(schemeVersion);
|
|
|
return datasetService.getList(AdapterDatasetModel.class, version.getDataSetTableName(), net.sf.json.JSONObject.fromObject(map).toString(), null, null, null);
|
|
@ -78,7 +77,7 @@ public class StdService implements IStdService {
|
|
|
* 通过适配方案获取字段列表
|
|
|
*/
|
|
|
public List<AdapterMetadataResultDetailModel> getDatacolByScheme(String schemeVersion, String datasetId) throws Exception {
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
map.put("adapterDatasetId", datasetId);
|
|
|
return metadataService.getInfoList(schemeVersion, net.sf.json.JSONObject.fromObject(map).toString(), null, null, null);
|
|
|
}
|
|
@ -87,7 +86,7 @@ public class StdService implements IStdService {
|
|
|
* 通过适配方案获取字典列表
|
|
|
*/
|
|
|
public List<AdapterDictEntryModel> getDictByScheme(String schemeVersion, String dictId) {
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
map.put("stdDictId", dictId);
|
|
|
AdapterVersion version = new AdapterVersion(schemeVersion);
|
|
|
return dictentryService.getList(AdapterDictEntryModel.class, version.getDictEntryTableName(), net.sf.json.JSONObject.fromObject(map).toString(), null, null, null);
|
|
@ -98,20 +97,18 @@ public class StdService implements IStdService {
|
|
|
*/
|
|
|
public DictionaryResult getDictResultByVersion(String schemeVersion, String dictId) throws Exception {
|
|
|
DictionaryResult re = new DictionaryResult();
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
map.put("stdDictId", dictId);
|
|
|
AdapterVersion version = new AdapterVersion(schemeVersion);
|
|
|
List<AdapterDictEntryModel> dictentryList = dictentryService.getList(AdapterDictEntryModel.class, version.getDictEntryTableName(), net.sf.json.JSONObject.fromObject(map).toString(), null, null, null);
|
|
|
List<AdapterDictEntryModel> dictentryList = dictentryService.getList(AdapterDictEntryModel.class, version.getDictEntryTableName(), net.sf.json.JSONObject.fromObject(map).toString(), null, null, null);
|
|
|
|
|
|
|
|
|
List<DictItem> list = new ArrayList<>();
|
|
|
if(!CollectionUtil.isEmpty(dictentryList)) {
|
|
|
for(AdapterDictEntryModel adapterDictEntryModel : dictentryList)
|
|
|
{
|
|
|
if (!CollectionUtil.isEmpty(dictentryList)) {
|
|
|
for (AdapterDictEntryModel adapterDictEntryModel : dictentryList) {
|
|
|
String code = adapterDictEntryModel.getAdapterEntryCode();
|
|
|
if(code!=null)
|
|
|
{
|
|
|
DictItem dict = new DictItem();
|
|
|
if (code != null) {
|
|
|
DictItem dict = new DictItem();
|
|
|
dict.setCode(code);
|
|
|
dict.setValue(adapterDictEntryModel.getAdapterEntryValue());
|
|
|
list.add(dict);
|
|
@ -126,20 +123,18 @@ public class StdService implements IStdService {
|
|
|
|
|
|
/**
|
|
|
* 通过适配方案+标准数据集CODE获取数据集
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
public AdapterDatasetModel getDatasetByCode(String schemeVersion,String stdDatasetCode) throws Exception
|
|
|
{
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
public AdapterDatasetModel getDatasetByCode(String schemeVersion, String stdDatasetCode) throws Exception {
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
map.put("stdDatasetCode", stdDatasetCode);
|
|
|
AdapterVersion version = new AdapterVersion(schemeVersion);
|
|
|
List<AdapterDatasetModel> list = datasetService.getList(AdapterDatasetModel.class, version.getDataSetTableName(), net.sf.json.JSONObject.fromObject(map).toString(), null, null, null);
|
|
|
List<AdapterDatasetModel> list = datasetService.getList(AdapterDatasetModel.class, version.getDataSetTableName(), net.sf.json.JSONObject.fromObject(map).toString(), null, null, null);
|
|
|
|
|
|
if(list!=null&&list.size()>0)
|
|
|
{
|
|
|
if (list != null && list.size() > 0) {
|
|
|
return list.get(0);
|
|
|
}
|
|
|
else{
|
|
|
} else {
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
@ -154,6 +149,7 @@ public class StdService implements IStdService {
|
|
|
|
|
|
/**
|
|
|
* 根据数据集code得到数据元
|
|
|
*
|
|
|
* @param params
|
|
|
* @return
|
|
|
* @throws Exception
|
|
@ -164,6 +160,7 @@ public class StdService implements IStdService {
|
|
|
|
|
|
/**
|
|
|
* 得到全部版本的数据元
|
|
|
*
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
@ -175,4 +172,5 @@ public class StdService implements IStdService {
|
|
|
public List datasetVersionListByName(String rsResourceImportDatasetDialogName) throws Exception {
|
|
|
return stdDatasetService.datasetVersionListByName(rsResourceImportDatasetDialogName);
|
|
|
}
|
|
|
|
|
|
}
|